Target FP: Introduce target-float.{c,h}
[external/binutils.git] / gdb / ChangeLog
1 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * Makefile.c (SFILES): Add target-float.c.
4         (HFILES_NO_SRCDIR): Add target-float.h.
5         (COMMON_OBS): Add target-float.o.
6         * target-float.h: New file.
7         * target-float.c: New file.
8
9         * doublest.c (floatformat_classify): Fix detection of float_zero.
10
11         * gdbtypes.c (is_floating_type): New function.
12         * gdbtypes.h (is_floating_type): Add prototype.
13
14         * value.c: Do not include "floatformat.h".
15         (unpack_double): Use target_float_is_valid.
16         (is_floating_value): New function.
17         * value.h (is_floating_value): Add prototype-
18
19         * valarith.c: Include "target-float.h".
20         (value_logical_not): Use target_float_is_zero.
21
22         * python/py-value.c: Include "target-float.h".
23         (valpy_nonzero): Use target_float_is_zero.
24
25 2017-11-04  Tom Tromey  <tom@tromey.com>
26
27         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
28
29 2017-11-04  Tom Tromey  <tom@tromey.com>
30
31         * breakpoint.c (set_momentary_breakpoint): Return
32         breakpoint_up.
33         (until_break_command): Update.
34         (new_until_break_fsm): Change argument types to
35         breakpoint_up.
36         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
37         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
38         Remove.
39         * infcmd.c (finish_forward): Update.
40         * breakpoint.h (set_momentary_breakpoint)
41         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
42         (make_cleanup_delete_breakpoint): Remove.
43         (struct breakpoint_deleter): New.
44         (breakpoint_up): New typedef.
45         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
46         (insert_exception_resume_breakpoint): Update.
47         (insert_exception_resume_from_probe): Update.
48         (insert_longjmp_resume_breakpoint): Update.
49         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
50         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
51         * infcall.c (call_function_by_hand_dummy): Update
52
53 2017-11-04  Tom Tromey  <tom@tromey.com>
54
55         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
56
57 2017-11-04  Tom Tromey  <tom@tromey.com>
58
59         * linux-tdep.c (linux_core_info_proc_mappings): Use
60         gdb::def_vector.
61         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
62         "size" argument.
63         (linux_corefile_thread): Update.
64         (linux_make_corefile_notes): Remove unused variable.
65
66 2017-11-04  Tom Tromey  <tom@tromey.com>
67
68         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
69         gdb::byte_vector.
70
71 2017-11-04  Tom Tromey  <tom@tromey.com>
72
73         * objfiles.c (do_free_objfile_cleanup): Remove.
74         * compile/compile-object-load.c (compile_object_load): Update.
75         * objfiles.h (make_cleanup_free_objfile): Remove.
76
77 2017-11-04  Tom Tromey  <tom@tromey.com>
78
79         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
80         (adi_read_versions): Change "tags" to "gdb_byte *".
81         (adi_print_versions): Likewise.
82
83 2017-11-04  Tom Tromey  <tom@tromey.com>
84
85         * breakpoint.c
86         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
87         from start_rbreak_breakpoints.
88         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
89         * breakpoint.h (class scoped_rbreak_breakpoints): New.
90         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
91         * symtab.c (do_end_rbreak_breakpoints): Remove.
92         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
93
94 2017-11-04  Tom Tromey  <tom@tromey.com>
95
96         * cp-namespace.c (reset_directive_searched): Remove.
97         (cp_lookup_symbol_via_imports): Use scoped_restore.
98         * cp-support.c (reset_directive_searched): Remove.
99         (make_symbol_overload_list_using): Use scoped_restore.
100         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
101         (reset_directive_searched): Remove.
102
103 2017-11-04  Tom Tromey  <tom@tromey.com>
104
105         * symfile.c (find_separate_debug_file_by_debuglink): Use
106         unique_xmalloc_ptr.
107
108 2017-11-04  Tom Tromey  <tom@tromey.com>
109
110         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
111         type of "info".
112         (compute_stack_depth): Likewise.
113         (do_compile_dwarf_expr_to_c): Use std::vector.
114
115 2017-11-04  Tom Tromey  <tom@tromey.com>
116
117         * compile/compile-object-load.c (link_callbacks_einfo): Use
118         std::string.
119
120 2017-11-04  Tom Tromey  <tom@tromey.com>
121
122         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
123         Use scoped_free_pendings.
124         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
125         scoped_free_pendings.
126         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
127         (xcoff_initial_scan): Likewise.
128         * buildsym.c (reset_symtab_globals): Update comment.
129         (scoped_free_pendings): Rename from really_free_pendings.
130         (prepare_for_building): Update comment.
131         (buildsym_init): Likewise.
132         * buildsym.h (class scoped_free_pendings): New class.
133         (really_free_pendings): Don't declare.
134
135 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
136
137         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
138         output when converting a zero value to a special byteorder format.
139
140 2017-11-02  Yao Qi  <yao.qi@linaro.org>
141
142         * frame.c (do_frame_register_read): Remove aspace.
143         * jit.c (jit_frame_sniffer): Likwise.
144         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
145         * regcache.c (regcache::regcache): Pass nullptr.
146         (regcache_print): Caller updated.
147         * regcache.h (regcache::regcache): Remove one constructor
148         parameter aspace.
149
150 2017-11-02  Yao Qi  <yao.qi@linaro.org>
151
152         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
153
154 2017-11-02  Yao Qi  <yao.qi@linaro.org>
155
156         * breakpoint.c (insert_single_step_breakpoints): Update.
157         * frame.c (struct frame_info) <aspace>: Add const.
158         (frame_save_as_regcache): Add const.
159         (get_frame_address_space): Return const address_space *.
160         * frame.h (get_frame_address_space): Update declaration.
161         * infrun.c (struct step_over_info) <aspace>: Add const.
162         (set_step_over_info): Make aspace const.
163         (displaced_step_prepare_throw): Change variable const.
164         (resume): Likewise.
165         (proceed): Likewise.
166         (adjust_pc_after_break): Likewise.
167         (save_waitstatus): Likewise.
168         (handle_signal_stop): Likewise.
169         (keep_going_pass_signal): Likewise.
170         * jit.c (jit_frame_sniffer): Add const.
171         * mips-tdep.c (mips_single_step_through_delay): Likewise.
172         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
173         * record-full.c (record_full_wait_1): Likewise.
174         * regcache.c (regcache::regcache): Change parameter to const.
175         * regcache.h (regcache::regcache): Likewise.
176         (regcache::aspace): Return const address_space *.
177         (regcache) <m_aspace>: Add const.
178
179 2017-11-02  Yao Qi  <yao.qi@linaro.org>
180
181         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
182         * frame.c (create_sentinel_frame): Likewise.
183         * infrun.c (displaced_step_prepare_throw): Likewise.
184         (resume): Likewise.
185         (thread_still_needs_step_over_bp): Likewise.
186         (proceed): Likewise.
187         (do_target_wait): Likewise.
188         (adjust_pc_after_break): Likewise.
189         (handle_syscall_event): Likewise.
190         (save_waitstatus): Likewise.
191         (handle_inferior_event_1): Likewise.
192         (handle_signal_stop): Likewise.
193         (keep_going_pass_signal): Likewise.
194         * linux-nat.c (status_callback): Likewise.
195         (save_stop_reason): Likewise.
196         (resume_stopped_resumed_lwps): Likewise.
197         * record-full.c (record_full_exec_insn): Likewise.
198         (record_full_wait_1): Likewise.
199         * regcache.c (get_regcache_aspace): Remove.
200         * regcache.h (get_regcache_aspace): Remove.
201
202 2017-11-02  Yao Qi  <yao.qi@linaro.org>
203
204         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
205         (init_regcache_descr): Use gdbarch_num_regs.
206         (regcache::regcache): Likewise.
207         (regcache::get_register_status): Likewise.
208         (regcache::assert_raw_regnum): Likewise.
209         (regcache::cooked_read): Likewise.
210         (regcache::cooked_read_value): Likewise.
211         (regcache::cooked_write): Likewise.
212         (regcache::dump): Likewise.
213         (regcache::num_raw_registers): New method.
214         * regcache.h (class regcache) <num_raw_registers>: New.
215
216 2017-11-02  Yao Qi  <yao.qi@linaro.org>
217
218         * regcache.c (regcache::assert_regnum): New method.
219         (regcache::invalidate): Call assert_regnum.
220         (regcache::raw_update): Likewise.
221         (regcache::raw_write): Likewise.
222         (regcache::raw_read_part): Likewise.
223         (regcache::raw_write_part): Likewise.
224         (regcache::raw_supply): Likewise.
225         (regcache::raw_supply_integer): Likewise.
226         (regcache::raw_supply_zeroed): Likewise.
227         (regcache::raw_collect): Likewise.
228         (regcache::raw_collect_integer): Likewise.
229         * regcache.h (regcache::assert_regnum): Declare.
230
231 2017-11-02  Yao Qi  <yao.qi@linaro.org>
232
233         * regcache.c (regcache::dump): Remove code.
234
235 2017-11-02  Yao Qi  <yao.qi@linaro.org>
236
237         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
238         Remove.
239         <sizeof_cooked_register_status>: Remove.
240         (init_regcache_descr): Update.
241         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
242         (regcache::save): Likewise.
243         (regcache::dump): Likewise.
244
245 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
246
247         * ft32-tdep.c (ft32_fetch_instruction): New function.
248         (ft32_analyze_prologue): Use ft32_fetch_instruction().
249
250 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
251
252         * cli/cli-script.c (execute_control_command): Rename to ...
253         (execute_control_command_1): ... this.
254         (execute_control_command): New function.
255
256 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
257
258         * tracepoint.c (tfind_command): Remove const_cast.
259
260 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
261
262         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
263
264 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
265
266         * common/common-utils.h (in_inclusive_range): New function.
267         * arm-tdep.c (arm_record_extension_space): Use
268         in_inclusive_range.
269         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
270         * cris-tdep.c (cris_spec_reg_applicable): Use
271         in_inclusive_range.
272
273 2017-10-30  Pedro Alves  <palves@redhat.com>
274             Simon Marchi <simon.marchi@ericsson.com>
275
276         * remote.c (remote_set_syscall_catchpoint): Build a std::string
277         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
278
279 2017-10-30  Pedro Alves  <palves@redhat.com>
280
281         * common/common-utils.c (string_appendf, string_vappendf): New
282         functions.
283         * common/common-utils.h (string_appendf, string_vappendf): New
284         declarations.
285         * unittests/common-utils-selftests.c (string_appendf_func)
286         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
287         (string_vappendf_tests): New functions.
288         (_initialize_common_utils_selftests): Register "string_appendf" and
289         "string_vappendf tests".
290
291 2017-10-30  Pedro Alves  <palves@redhat.com>
292
293         * unittests/common-utils-selftests.c (format_func): New typedef.
294         (string_printf_tests, string_vprintf_tests): Tests factored out
295         and merged to ...
296         (test_format_func): ... this new function.
297         (string_printf_tests, string_vprintf_tests): Reimplement on top of
298         test_format_func.
299
300 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
301
302         * darwin-nat.c: Remove include of gdb.h.
303
304 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
305
306         * xtensa-xtregs.c: Fix formatting issues.
307
308 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
309
310         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
311
312 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
313
314         PR python/21213
315         * python/py-infthread.c (thpy_get_inferior): Increment reference
316         of inferior before returning it.
317
318 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
319
320         * unittests/common-utils-selftests.c (format): Add
321         ATTRIBUTE_PRINTF.
322
323 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
324
325         * xml-syscall.c (struct syscall_desc): Add constructor.
326         <name>: Change type to std::string.
327         (syscall_desc_up): New typedef.
328         (syscall_desc_p): Remove typeder.
329         (DEF_VEC_P(syscall_desc_p)): Remove.
330         (struct syscall_group_desc): Add constructor.
331         <name>: Change type to std::string.
332         <syscalls>: Change type to std::vector.
333         (syscall_group_desc_up): New typedef.
334         (syscall_group_desc_p): Remove typedef.
335         (DEF_VEC_P(syscall_group_desc_p)): Remove.
336         (struct syscalls_info) <syscalls>: Change type to std::vector of
337         unique_ptr.
338         <groups>: Likewise.
339         <my_gdb_datadir>: Change type to std::string.
340         (syscalls_info_up): New typedef.
341         (allocate_syscalls_info): Remove.
342         (syscalls_info_free_syscalls_desc): Remove.
343         (syscalls_info_free_syscall_group_desc): Remove.
344         (free_syscalls_info): Remove.
345         (make_cleanup_free_syscalls_info): Remove.
346         (syscall_group_create_syscall_group_desc): Adjust.
347         (syscall_group_add_syscall): Adjust.
348         (syscall_create_syscall_desc): Adjust.
349         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
350         (init_syscalls_info): Adjust.
351         (syscall_group_get_group_by_name): Adjust.
352         (xml_get_syscall_number): Adjust.
353         (xml_get_syscall_name): Adjust.
354         (xml_list_of_syscalls): Adjust.
355         (xml_list_syscalls_by_group): Adjust.
356         (xml_list_of_groups): Adjust.
357
358 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
359
360         * probe.h: Don't include gdb_vecs.h.
361         (DEF_VEC_P (probe_p)): Remove.
362         (find_probes_in_objfile): Return an std::vector.
363         * probe.c (find_probes_in_objfile): Likewise.
364         * breakpoint.c (breakpoint_objfile_data)
365         <longjmp_probes>: Change type to std::vector.
366         <exception_probes>: Likewise.
367         (free_breakpoint_probes): Don't manually free vectors.
368         (create_longjmp_master_breakpoint): Adjust.
369         (create_exception_master_breakpoint): Adjust.
370         * solib-svr4.c (svr4_create_probe_breakpoints): Change
371         parameter type, adjust.
372         (svr4_create_solib_event_breakpoints): Adjust.
373
374 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
375
376         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
377         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
378         with new.
379         (free_breakpoint_probes): Rename to ...
380         (free_breakpoint_objfile_data): ... this, and call delete on
381         bp_objfile_data..
382
383 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
384
385         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
386         (loaded_script_ptr): Remove typedef.
387         (DEF_VEC_P (loaded_script_ptr)): Remove.
388         (struct collect_matching_scripts_data): Add constructor.
389         <scripts_p>: Change type to (pointer to) std::vector.
390         (collect_matching_scripts_data): Adjust.
391         (sort_scripts_by_name): Make suitable for std::sort.
392         (print_scripts): Don't sort vector, adjust to std::vector.
393         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
394
395 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
396
397         * symfile.c (filename_language): Make struct, not typedef.  Add
398         constructor.
399         <ext>: Change type to std::string.
400         (DEF_VEC_O (filename_language)): Remove.
401         (filename_language_table): Change type to std::vector.
402         (add_filename_language): Adjust.
403         (set_ext_lang_command): Adjust.
404         (info_ext_lang_command): Adjust.
405         (deduce_language_from_filename): Adjust.
406         (class scoped_restore_filename_language_table): Remove.
407         (test_filename_language): Use scoped_restore.
408         (test_set_ext_lang_command): Use scoped_restore, adjust to
409         std::vector change.
410
411 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
412
413         * symfile.c: Include selftest.h.
414         (class scoped_restore_filename_language_table): New.
415         (test_filename_language): New test.
416         (test_set_ext_lang_command): New test.
417         (_initialize_symfile): Register tests.
418
419 2017-10-27  Keith Seitz  <keiths@redhat.com>
420
421         * breakpoint.c (print_breakpoint_location): Use the symbol saved
422         in the bp_location, falling back to find_pc_sect_function when
423         needed.
424         (add_location_to_breakpoint): Save sal->symbol.
425         * breakpoint.h (struct bp_location) <symbol>: New field.
426         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
427         * symtab.h (struct symtab_and_line) <symbol>: New field.
428
429 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
430
431         PR gdb/13669
432         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
433         to rewind obstack.
434
435 2017-10-26  Pedro Alves  <palves@redhat.com>
436
437         * remote.c (remote_async_terminal_ours_p): Delete.
438         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
439         Remove references to 'remote_async_terminal_ours_p'.
440
441 2017-10-26  Yao Qi  <yao.qi@linaro.org>
442
443         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
444
445 2017-10-26  Yao Qi  <yao.qi@linaro.org>
446
447         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
448         aspace const.
449         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
450         Likewise.
451         * breakpoint.c (bpstat_check_location): Remove cast.
452         (breakpoint_hit_catch_fork): Make aspce const.
453         (breakpoint_hit_catch_solib): Likewise.
454         (breakpoint_hit_catch_exec): Likewise.
455         (breakpoint_hit_ranged_breakpoint): Likewise.
456         (breakpoint_hit_watchpoint): Likewise.
457         (base_breakpoint_breakpoint_hit): Likewise.
458         (bkpt_breakpoint_hit): Likewise.
459         (dprintf_breakpoint_hit): Likewise.
460         (tracepoint_breakpoint_hit): Likewise.
461         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
462
463 2017-10-26  Yao Qi  <yao.qi@linaro.org>
464
465         * breakpoint.c (breakpoint_location_address_match): Change
466         "struct address_space *" to "const address_space".
467         (breakpoint_location_address_range_overlap): Likewise.
468         (breakpoint_here_p): Likewise.
469         (breakpoint_in_range_p): Likewise.
470         (moribund_breakpoint_here_p): Likewise.
471         (bp_location_inserted_here_p): Likewise.
472         (software_breakpoint_inserted_here_p): Likewise.
473         (hardware_breakpoint_inserted_here_p): Likewise.
474         (hardware_watchpoint_inserted_in_range): Likewise.
475         (bpstat_check_location): Likewise.
476         (bpstat_stop_status): Likewise.
477         (breakpoint_address_match): Likewise.
478         (breakpoint_address_match_range): Likewise.
479         (breakpoint_location_address_match): Likewise.
480         (breakpoint_location_address_range_overlap): Likewise.
481         (insert_single_step_breakpoint): Likewise.
482         (breakpoint_has_location_inserted_here): Likewise.
483         (single_step_breakpoint_inserted_here_p): Likewise.
484         (pc_at_non_inline_function): Likewise.
485         * breakpoint.h (bpstat_stop_status): Update declaration.
486         (breakpoint_here_p): Likewise.
487         (breakpoint_in_range_p): Likewise.
488         (moribund_breakpoint_here_p): Likewise.
489         (breakpoint_inserted_here_p): Likewise.
490         (software_breakpoint_inserted_here_p): Likewise.
491         (hardware_breakpoint_inserted_here_p): Likewise.
492         (breakpoint_has_location_inserted_here): Likewise.
493         (single_step_breakpoint_inserted_here_p): Likewise.
494         (hardware_watchpoint_inserted_in_range): Likewise.
495         (breakpoint_address_match): Likewise.
496         (insert_single_step_breakpoint): Likewise.
497         (pc_at_non_inline_function): Likewise.
498         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
499         * record.c (record_check_stopped_by_breakpoint): Likewise.
500         * record.h (record_check_stopped_by_breakpoint): Likewise.
501         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
502
503 2017-10-25  Yao Qi  <yao.qi@linaro.org>
504
505         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
506         regcache->arch () instead get_regcache_arch.
507         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
508         Likewise.
509         (aarch64_fbsd_store_inferior_registers): Likewise.
510         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
511         (store_gregs_to_thread): Likewise.
512         (fetch_fpregs_from_thread): Likewise.
513         (store_fpregs_to_thread): Likewise.
514         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
515         (aarch64_store_return_value): Likewise.
516         (aarch64_software_single_step): Likewise.
517         * aix-thread.c (aix_thread_wait): Likewise.
518         (supply_reg32): Likewise.
519         (supply_sprs64): Likewise.
520         (supply_sprs32): Likewise.
521         (fill_gprs64): Likewise.
522         (fill_gprs32): Likewise.
523         (fill_sprs64): Likewise.
524         (fill_sprs32): Likewise.
525         (store_regs_user_thread): Likewise.
526         (store_regs_kernel_thread): Likewise.
527         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
528         (alphabsd_store_inferior_registers): Likewise.
529         * alpha-tdep.c (alpha_extract_return_value): Likewise.
530         (alpha_store_return_value): Likewise.
531         (alpha_deal_with_atomic_sequence): Likewise.
532         (alpha_next_pc): Likewise.
533         (alpha_software_single_step): Likewise.
534         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
535         (amd64bsd_store_inferior_registers): Likewise.
536         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
537         Likewise.
538         (amd64_linux_store_inferior_registers): Likewise.
539         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
540         (amd64_collect_native_gregset): Likewise.
541         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
542         (amd64obsd_collect_uthread): Likewise.
543         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
544         (amd64_collect_fpregset): Likewise.
545         (amd64_supply_fxsave): Likewise.
546         (amd64_supply_xsave): Likewise.
547         (amd64_collect_fxsave): Likewise.
548         (amd64_collect_xsave): Likewise.
549         * arc-tdep.c (arc_write_pc): Likewise.
550         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
551         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
552         (arm_fbsd_store_inferior_registers): Likewise.
553         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
554         (store_vfp_regs): Likewise.
555         (arm_linux_fetch_inferior_registers): Likewise.
556         (arm_linux_store_inferior_registers): Likewise.
557         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
558         (arm_linux_sigreturn_next_pc): Likewise.
559         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
560         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
561         (fetch_register): Likewise.
562         (store_register): Likewise.
563         * arm-tdep.c (arm_is_thumb): Likewise.
564         (displaced_in_arm_mode): Likewise.
565         (bx_write_pc): Likewise.
566         (arm_get_next_pcs_addr_bits_remove): Likewise.
567         (arm_software_single_step): Likewise.
568         (arm_extract_return_value): Likewise.
569         (arm_store_return_value): Likewise.
570         (arm_write_pc): Likewise.
571         * bfin-tdep.c (bfin_extract_return_value): Likewise.
572         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
573         (bsd_uthread_store_registers): Likewise.
574         * core-regset.c (fetch_core_registers): Likewise.
575         * corelow.c (get_core_registers): Likewise.
576         * cris-tdep.c (cris_store_return_value): Likewise.
577         (cris_extract_return_value): Likewise.
578         (find_step_target): Likewise.
579         (find_step_target): Likewise.
580         (cris_software_single_step): Likewise.
581         * ctf.c (ctf_fetch_registers): Likewise.
582         * darwin-nat.c (cancel_breakpoint): Likewise.
583         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
584         * frv-tdep.c (frv_extract_return_value): Likewise.
585         * ft32-tdep.c (ft32_store_return_value): Likewise.
586         (ft32_extract_return_value): Likewise.
587         * go32-nat.c (fetch_register): Likewise.
588         (go32_fetch_registers): Likewise.
589         (go32_store_registers): Likewise.
590         (store_register): Likewise.
591         * h8300-tdep.c (h8300_extract_return_value): Likewise.
592         (h8300_store_return_value): Likewise.
593         * hppa-linux-nat.c (fetch_register): Likewise.
594         (store_register): Likewise.
595         (hppa_linux_fetch_inferior_registers): Likewise.
596         (hppa_linux_store_inferior_registers): Likewise.
597         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
598         (i386_darwin_store_inferior_registers): Likewise.
599         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
600         (gnu_store_registers): Likewise.
601         * i386-linux-nat.c (fetch_register): Likewise.
602         (store_register): Likewise.
603         (supply_gregset): Likewise.
604         (fill_gregset): Likewise.
605         (i386_linux_fetch_inferior_registers): Likewise.
606         (i386_linux_store_inferior_registers): Likewise.
607         (i386_linux_resume): Likewise.
608         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
609         Likewise.
610         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
611         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
612         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
613         (i386obsd_collect_uthread): Likewise.
614         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
615         (i386_supply_gregset): Likewise.
616         (i386_collect_gregset): Likewise.
617         (i386_supply_fpregset): Likewise.
618         (i386_collect_fpregset): Likewise.
619         (i386_mpx_bd_base): Likewise.
620         * i386-v4-nat.c (supply_fpregset): Likewise.
621         (fill_fpregset): Likewise.
622         * i387-tdep.c (i387_supply_fsave): Likewise.
623         (i387_collect_fsave): Likewise.
624         (i387_supply_fxsave): Likewise.
625         (i387_collect_fxsave): Likewise.
626         (i387_supply_xsave): Likewise.
627         (i387_collect_xsave): Likewise.
628         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
629         (ia64_linux_store_registers): Likewise.
630         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
631         (ia64_extract_return_value): Likewise.
632         (ia64_store_return_value): Likewise.
633         (find_func_descr): Likewise.
634         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
635         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
636         (inf_ptrace_store_registers): Likewise.
637         * infrun.c (use_displaced_stepping): Likewise.
638         (displaced_step_prepare_throw): Likewise.
639         (resume): Likewise.
640         (proceed): Likewise.
641         (do_target_wait): Likewise.
642         (adjust_pc_after_break): Likewise.
643         (handle_inferior_event_1): Likewise.
644         (handle_signal_stop): Likewise.
645         (save_infcall_suspend_state): Likewise.
646         (restore_infcall_suspend_state): Likewise.
647         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
648         * jit.c (jit_frame_prev_register): Likewise.
649         * linux-nat.c (save_stop_reason): Likewise.
650         (linux_nat_wait_1): Likewise.
651         (resume_stopped_resumed_lwps): Likewise.
652         * linux-record.c (record_linux_sockaddr): Likewise.
653         (record_linux_msghdr): Likewise.
654         (record_linux_system_call): Likewise.
655         * linux-tdep.c (linux_collect_thread_registers): Likewise.
656         * lm32-tdep.c (lm32_extract_return_value): Likewise.
657         (lm32_store_return_value): Likewise.
658         * m32c-tdep.c (m32c_read_flg): Likewise.
659         (m32c_pseudo_register_read): Likewise.
660         (m32c_pseudo_register_write): Likewise.
661         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
662         (m32r_linux_collect_gregset): Likewise.
663         * m32r-tdep.c (m32r_store_return_value): Likewise.
664         (m32r_extract_return_value): Likewise.
665         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
666         (m68kbsd_collect_fpregset): Likewise.
667         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
668         * m68k-linux-nat.c (fetch_register): Likewise.
669         (old_fetch_inferior_registers): Likewise.
670         (old_store_inferior_registers): Likewise.
671         (store_regs): Likewise.
672         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
673         (m68k_svr4_store_return_value): Likewise.
674         * m88k-tdep.c (m88k_store_arguments): Likewise.
675         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
676         (mi_cmd_data_write_register_values): Likewise.
677         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
678         (mips_fbsd_store_inferior_registers): Likewise.
679         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
680         (mips_fbsd_supply_gregs): Likewise.
681         (mips_fbsd_collect_fpregs): Likewise.
682         (mips_fbsd_collect_gregs): Likewise.
683         (mips_fbsd_supply_fpregset): Likewise.
684         (mips_fbsd_collect_fpregset): Likewise.
685         (mips_fbsd_supply_gregset): Likewise.
686         (mips_fbsd_collect_gregset): Likewise.
687         * mips-linux-nat.c (supply_gregset): Likewise.
688         (fill_gregset): Likewise.
689         (supply_fpregset): Likewise.
690         (fill_fpregset): Likewise.
691         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
692         (mips_fill_gregset): Likewise.
693         (mips_supply_fpregset): Likewise.
694         (mips_fill_fpregset): Likewise.
695         (mips64_supply_gregset): Likewise.
696         (micromips_linux_sigframe_validate): Likewise.
697         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
698         (mipsnbsd_fetch_inferior_registers): Likewise.
699         (mipsnbsd_store_inferior_registers): Likewise.
700         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
701         (mipsnbsd_supply_gregset): Likewise.
702         (mipsnbsd_iterate_over_regset_sections): Likewise.
703         (mipsnbsd_supply_reg): Likewise.
704         (mipsnbsd_supply_fpreg): Likewise.
705         * mips-tdep.c (mips_in_frame_stub): Likewise.
706         (mips_dummy_id): Likewise.
707         (is_octeon_bbit_op): Likewise.
708         (micromips_bc1_pc): Likewise.
709         (extended_mips16_next_pc): Likewise.
710         (mips16_next_pc): Likewise.
711         (deal_with_atomic_sequence): Likewise.
712         * moxie-tdep.c (moxie_process_readu): Likewise.
713         * nios2-tdep.c (nios2_get_next_pc): Likewise.
714         * nto-procfs.c (procfs_store_registers): Likewise.
715         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
716         (ppcfbsd_store_inferior_registers): Likewise.
717         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
718         (fetch_altivec_register): Likewise.
719         (get_spe_registers): Likewise.
720         (fetch_spe_register): Likewise.
721         (fetch_altivec_registers): Likewise.
722         (fetch_all_gp_regs): Likewise.
723         (fetch_all_fp_regs): Likewise.
724         (store_vsx_register): Likewise.
725         (store_altivec_register): Likewise.
726         (set_spe_registers): Likewise.
727         (store_spe_register): Likewise.
728         (store_altivec_registers): Likewise.
729         (store_all_gp_regs): Likewise.
730         (store_all_fp_regs): Likewise.
731         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
732         (ppc_linux_collect_gregset): Likewise.
733         (ppc_canonicalize_syscall): Likewise.
734         (ppc_linux_record_signal): Likewise.
735         (ppu2spu_prev_register): Likewise.
736         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
737         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
738         (ppcobsd_store_registers): Likewise.
739         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
740         Likewise.
741         (ppc_ravenscar_generic_store_registers): Likewise.
742         * procfs.c (procfs_fetch_registers): Likewise.
743         (procfs_store_registers): Likewise.
744         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
745         (ravenscar_store_registers): Likewise.
746         (ravenscar_prepare_to_store): Likewise.
747         * record-btrace.c (record_btrace_fetch_registers): Likewise.
748         * record-full.c (record_full_wait_1): Likewise.
749         (record_full_registers_change): Likewise.
750         (record_full_store_registers): Likewise.
751         (record_full_core_fetch_registers): Likewise.
752         (record_full_save): Likewise.
753         (record_full_goto_insn): Likewise.
754         * regcache.c (regcache_register_size): Likewise.
755         (get_regcache_arch): Remove.
756         (regcache_read_pc): Likewise.
757         * regcache.h (get_regcache_arch): Remove.
758         * remote-sim.c (gdbsim_fetch_register): Likewise.
759         (gdbsim_store_register): Likewise.
760         * remote.c (fetch_register_using_p): Likewise.
761         (send_g_packet): Likewise.
762         (remote_prepare_to_store): Likewise.
763         (store_registers_using_G): Likewise.
764         * reverse.c (save_bookmark_command): Likewise.
765         (goto_bookmark_command): Likewise.
766         * rs6000-aix-tdep.c (branch_dest): Likewise.
767         * rs6000-nat.c (rs6000_ptrace64): Likewise.
768         (fetch_register): Likewise.
769         * rs6000-tdep.c (ppc_supply_reg): Likewise.
770         (ppc_collect_reg): Likewise.
771         (ppc_collect_gregset): Likewise.
772         (ppc_collect_fpregset): Likewise.
773         (ppc_collect_vsxregset): Likewise.
774         (ppc_collect_vrregset): Likewise.
775         (ppc_displaced_step_hw_singlestep): Likewise.
776         (rs6000_pseudo_register_read): Likewise.
777         (rs6000_pseudo_register_write): Likewise.
778         * s390-linux-nat.c (supply_gregset): Likewise.
779         (fill_gregset): Likewise.
780         (s390_linux_fetch_inferior_registers): Likewise.
781         * s390-linux-tdep.c (s390_write_pc): Likewise.
782         (s390_software_single_step): Likewise.
783         (s390_all_but_pc_registers_record): Likewise.
784         (s390_linux_syscall_record): Likewise.
785         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
786         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
787         (shnbsd_store_inferior_registers): Likewise.
788         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
789         (sh_extract_return_value_fpu): Likewise.
790         (sh_store_return_value_nofpu): Likewise.
791         (sh_corefile_supply_regset): Likewise.
792         (sh_corefile_collect_regset): Likewise.
793         * sh64-tdep.c (sh64_extract_return_value): Likewise.
794         (sh64_store_return_value): Likewise.
795         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
796         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
797         (sparc_store_inferior_registers): Likewise.
798         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
799         (sparc_ravenscar_prepare_to_store): Likewise.
800         * sparc-tdep.c (sparc32_store_arguments): Likewise.
801         (sparc_analyze_control_transfer): Likewise.
802         (sparc_step_trap): Likewise.
803         (sparc_software_single_step): Likewise.
804         (sparc32_gdbarch_init): Likewise.
805         (sparc_supply_rwindow): Likewise.
806         (sparc_collect_rwindow): Likewise.
807         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
808         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
809         (sparc64nbsd_collect_gregset): Likewise.
810         (sparc64nbsd_supply_fpregset): Likewise.
811         (sparc64nbsd_collect_fpregset): Likewise.
812         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
813         (sparc64_supply_gregset): Likewise.
814         (sparc64_collect_gregset): Likewise.
815         (sparc64_supply_fpregset): Likewise.
816         (sparc64_collect_fpregset): Likewise.
817         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
818         * spu-tdep.c (spu_unwind_sp): Likewise.
819         (spu2ppu_prev_register): Likewise.
820         (spu_memory_remove_breakpoint): Likewise.
821         * stack.c (return_command): Likewise.
822         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
823         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
824         * tracefile.c (trace_save_ctf): Likewise.
825         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
826         (do_windows_store_inferior_registers): Likewise.
827         (windows_resume): Likewise.
828         * xtensa-linux-nat.c (fill_gregset): Likewise.
829         (supply_gregset_reg): Likewise.
830         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
831         (xtensa_register_read_masked): Likewise.
832         (xtensa_supply_gregset): Likewise.
833         (xtensa_extract_return_value): Likewise.
834         (xtensa_store_return_value): Likewise.
835
836 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
837
838         * doublest.c (floatformat_from_string): New function.
839         * doublest.h (floatformat_from_string): Add prototype.
840
841         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
842         (OP_FLOAT): ... this.
843         * expression.h: Do not include "doublest.h".
844         (union exp_element): Replace doubleconst and decfloatconst by
845         new element floatconst.
846         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
847         (ada_evaluate_subexp): Likewise.
848         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
849         OP_DOUBLE and OP_DECFLOAT.
850         * expprint.c (print_subexp_standard): Likewise.
851         (dump_subexp_body_standard): Likewise.
852         * breakpoint.c (watchpoint_exp_is_const): Likewise.
853
854         * parse.c: Include "dfp.h".
855         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
856         (write_exp_elt_floatcst): New function.
857         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
858         and OP_DECFLOAT.
859         (operator_check_standard): Likewise.
860         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
861         Return target format buffer instead of host DOUBLEST.
862         Use floatformat_from_string and decimal_from_string to parse
863         either binary or decimal floating-point types.
864         (parse_c_float): Remove.
865         * parser-defs.h: Do not include "doublest.h".
866         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
867         (write_exp_elt_floatcst): Add prototype.
868         (parse_float): Update prototype.
869         (parse_c_float): Remove.
870
871         * c-exp.y: Do not include "dfp.h".
872         (typed_val_float): Use byte buffer instead of DOUBLEST.
873         (typed_val_decfloat): Remove.
874         (DECFLOAT): Remove.
875         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
876         (parse_number): Update to new parse_float interface.
877         Parse suffixes and determine type before calling parse_float.
878         Handle decimal and binary FP types the same way.
879
880         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
881         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
882         (parse_number): Update to new parse_float interface.
883         Parse suffixes and determine type before calling parse_float.
884
885         * f-exp.y: Replace dval by typed_val_float.
886         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
887         (parse_number): Use parse_float instead of atof.
888
889         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
890         (parse_go_float): Remove.
891         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
892         (parse_number): Call parse_float instead of parse_go_float.
893         Parse suffixes and determine type before calling parse_float.
894
895         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
896         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
897         (parse_number): Update to new parse_float interface.
898         Parse suffixes and determine type before calling parse_float.
899
900         * m2-exp.y: Replace dval by byte buffer val.
901         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
902         (parse_number): Call parse_float instead of atof.
903
904         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
905         (lex_number): Call parse_float instead of strtod.
906         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
907         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
908         Use write_exp_elt_floatcst.
909         (unit_testing): Remove static variable.
910         (rust_type): Do not check unit_testing.
911         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
912
913         * ada-exp.y (type_float, type_double): Remove.
914         (typed_val_float): Use byte buffer instead of DOUBLEST.
915         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
916         * ada-lex.l (processReal): Use parse_float instead of sscanf.
917
918 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
919
920         * aarch64-tdep.h (enum aarch64_regnum): Remove.
921         * arch/aarch64.h: New file.
922
923 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
924
925         * dfp.h (decimal_from_string): Use const reference for argument.
926         * dfp.c (decimal_from_string): Likewise.
927
928 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
929
930         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
931         * sh64-tdep.c (sh64_do_fp_register): Likewise.
932         * mips-tdep.c (mips_print_fp_register): Likewise.
933
934 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
935
936         * common/format.h (enum argclass): Replace decfloat_arg by
937         dec32float_arg, dec64float_arg, and dec128float_arg.
938         * common/format.c (parse_format_string): Update to return
939         new decimal float argument classes.
940
941         * printcmd.c (printf_decfloat): Rename to ...
942         (printf_floating): ... this.  Add argclass argument, and use it
943         instead of parsing the format string again.  Add support for
944         binary floating-point values, using floatformat_to_string.
945         Convert value to the target format if it doesn't already match.
946         (ui_printf): Call printf_floating instead of printf_decfloat,
947         also for double_arg / long_double_arg.  Pass argclass.
948
949         * dfp.c (decimal_to_string): Add format string argument.
950         * dfp.h (decimal_to_string): Likewise.
951
952         * doublest.c (floatformat_to_string): Add format string argument.
953         * doublest.h (floatformat_to_string): Likewise.
954
955 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
956
957         * doublest.c (floatformat_precision): New routine.
958         (floatformat_to_string): Likewise.
959         * doublest.c (floatformat_to_string): Add prototype.
960
961         * printcmd.c (print_scalar_formatted): Only call print_floating
962         on floating-point types.
963         * valprint.c: Do not include "floatformat.h".
964         (generic_val_print_decfloat): Remove.
965         (generic_val_print): Call generic_val_print_float for both
966         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
967         (print_floating): Use floatformat_to_string.  Handle decimal float.
968         (print_decimal_floating): Remove, merge into floatformat_to_string.
969         * value.h (print_decimal_floating): Remove.
970
971         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
972
973 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
974
975         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
976
977 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
978
979         * memattr.h: Don't include vec.h.
980         (struct mem_attrib): Initialize fields.
981         <unknown>: New static method.
982         (struct mem_region): Add constructors, operator<, initialize
983         fields.
984         * memattr.c: Include algorithm.
985         (default_mem_attrib, unknown_mem_attrib): Remove.
986         (user_mem_region_list): New global.
987         (target_mem_region_list, mem_region_list): Change type to
988         std::vector<mem_region>.
989         (mem_use_target): Now a function.
990         (target_mem_regions_valid): Change type to bool.
991         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
992         (require_user_regions): Adjust.
993         (require_target_regions): Adjust.
994         (create_mem_region): Adjust.
995         (lookup_mem_region): Adjust.
996         (invalidate_target_mem_regions): Adjust.
997         (mem_clear): Rename to...
998         (user_mem_clear): ... this, and adjust.
999         (mem_command): Adjust.
1000         (info_mem_command): Adjust.
1001         (mem_enable, enable_mem_command, mem_disable,
1002         disable_mem_command): Adjust.
1003         (mem_delete): Adjust.
1004         (delete_mem_command): Adjust.
1005         * memory-map.h (parse_memory_map): Return an std::vector.
1006         * memory-map.c (parse_memory_map): Likewise.
1007         (struct memory_map_parsing_data): Add constructor.
1008         <memory_map>: Point to std::vector.
1009         (memory_map_start_memory): Adjust.
1010         (memory_map_end_memory): Adjust.
1011         (memory_map_end_property): Adjust.
1012         (clear_result): Remove.
1013         * remote.c (remote_memory_map): Return an std::vector.
1014         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1015         Remove.
1016         (target_debug_print_mem_region_vector): New.
1017         * target-delegates.c: Regenerate.
1018         * target.h (mem_region_vector): New typedef.
1019         (to_memory_map): Return mem_region_vector.
1020         (target_memory_map): Return an std::vector.
1021         * target.c (target_memory_map): Return an std::vector.
1022         (flash_erase_command): Adjust.
1023
1024 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1025
1026         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1027         Change type to std::string.
1028         (memory_map_start_property): Adjust.
1029         (memory_map_end_property): Adjust.
1030
1031 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1032
1033         * infrun.h: Include common/byte-vector.h.
1034         (struct displaced_step_closure): New struct.
1035         (struct buf_displaced_step_closure): New struct.
1036         * infrun.c (displaced_step_closure::~displaced_step_closure):
1037         Provide default implementation.
1038         (displaced_step_clear): Deallocate step closure with delete.
1039         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1040         (aarch64_displaced_step_closure): ... this, extend
1041         displaced_step_closure.
1042         (aarch64_displaced_step_data) <dsc>: Change type to
1043         aarch64_displaced_step_closure.
1044         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1045         unique_ptr.
1046         (aarch64_displaced_step_fixup): Add cast for displaced step
1047         closure.
1048         * amd64-tdep.c (displaced_step_closure): Rename to ...
1049         (amd64_displaced_step_closure): ... this, extend
1050         displaced_step_closure.
1051         <insn_buf>: Change type to std::vector<gdb_byte>.
1052         <max_len>: Remove.
1053         (fixup_riprel): Change type of DSC parameter, adjust to type
1054         change of insn_buf.
1055         (fixup_displaced_copy): Change type of DSC parameter.
1056         (amd64_displaced_step_copy_insn): Instantiate
1057         amd64_displaced_step_closure.
1058         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1059         to type change of insn_buf.
1060         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1061         parameter DSC.
1062         (arm_linux_copy_svc): Likewise.
1063         (cleanup_kernel_helper_return): Likewise.
1064         (arm_catch_kernel_helper_return): Likewise.
1065         (arm_linux_displaced_step_copy_insn): Instantiate
1066         arm_displaced_step_closure.
1067         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1068         (displaced_read_reg): Change type of parameter DSC.
1069         (branch_write_pc): Likewise.
1070         (load_write_pc): Likewise.
1071         (alu_write_pc): Likewise.
1072         (displaced_write_reg): Likewise.
1073         (arm_copy_unmodified): Likewise.
1074         (thumb_copy_unmodified_32bit): Likewise.
1075         (thumb_copy_unmodified_16bit): Likewise.
1076         (cleanup_preload): Likewise.
1077         (install_preload): Likewise.
1078         (arm_copy_preload): Likewise.
1079         (thumb2_copy_preload): Likewise.
1080         (install_preload_reg): Likewise.
1081         (arm_copy_preload_reg): Likewise.
1082         (cleanup_copro_load_store): Likewise.
1083         (install_copro_load_store): Likewise.
1084         (arm_copy_copro_load_store) Likewise.
1085         (thumb2_copy_copro_load_store): Likewise.
1086         (cleanup_branch): Likewise.
1087         (install_b_bl_blx): Likewise.
1088         (arm_copy_b_bl_blx): Likewise.
1089         (thumb2_copy_b_bl_blx): Likewise.
1090         (thumb_copy_b): Likewise.
1091         (install_bx_blx_reg): Likewise.
1092         (arm_copy_bx_blx_reg): Likewise.
1093         (thumb_copy_bx_blx_reg): Likewise.
1094         (cleanup_alu_imm): Likewise.
1095         (arm_copy_alu_imm): Likewise.
1096         (thumb2_copy_alu_imm): Likewise.
1097         (cleanup_alu_reg): Likewise.
1098         (install_alu_reg): Likewise.
1099         (arm_copy_alu_reg): Likewise.
1100         (thumb_copy_alu_reg): Likewise.
1101         (cleanup_alu_shifted_reg): Likewise.
1102         (install_alu_shifted_reg): Likewise.
1103         (arm_copy_alu_shifted_reg): Likewise.
1104         (cleanup_load): Likewise.
1105         (cleanup_store): Likewise.
1106         (arm_copy_extra_ld_st): Likewise.
1107         (install_load_store): Likewise.
1108         (thumb2_copy_load_literal): Likewise.
1109         (thumb2_copy_load_reg_imm): Likewise.
1110         (arm_copy_ldr_str_ldrb_strb): Likewise.
1111         (cleanup_block_load_all): Likewise.
1112         (cleanup_block_store_pc): Likewise.
1113         (cleanup_block_load_pc): Likewise.
1114         (arm_copy_block_xfer): Likewise.
1115         (thumb2_copy_block_xfer): Likewise.
1116         (cleanup_svc): Likewise.
1117         (install_svc): Likewise.
1118         (arm_copy_svc): Likewise.
1119         (thumb_copy_svc): Likewise.
1120         (arm_copy_undef): Likewise.
1121         (thumb_32bit_copy_undef): Likewise.
1122         (arm_copy_unpred): Likewise.
1123         (arm_decode_misc_memhint_neon): Likewise.
1124         (arm_decode_unconditional): Likewise.
1125         (arm_decode_miscellaneous): Likewise.
1126         (arm_decode_dp_misc): Likewise.
1127         (arm_decode_ld_st_word_ubyte): Likewise.
1128         (arm_decode_media): Likewise.
1129         (arm_decode_b_bl_ldmstm): Likewise.
1130         (arm_decode_ext_reg_ld_st): Likewise.
1131         (thumb2_decode_dp_shift_reg): Likewise.
1132         (thumb2_decode_ext_reg_ld_st): Likewise.
1133         (arm_decode_svc_copro): Likewise.
1134         (thumb2_decode_svc_copro): Likewise.
1135         (install_pc_relative): Likewise.
1136         (thumb_copy_pc_relative_16bit): Likewise.
1137         (thumb_decode_pc_relative_16bit): Likewise.
1138         (thumb_copy_pc_relative_32bit): Likewise.
1139         (thumb_copy_16bit_ldr_literal): Likewise.
1140         (thumb_copy_cbnz_cbz): Likewise.
1141         (thumb2_copy_table_branch): Likewise.
1142         (cleanup_pop_pc_16bit_all): Likewise.
1143         (thumb_copy_pop_pc_16bit): Likewise.
1144         (thumb_process_displaced_16bit_insn): Likewise.
1145         (decode_thumb_32bit_ld_mem_hints): Likewise.
1146         (thumb_process_displaced_32bit_insn): Likewise.
1147         (thumb_process_displaced_insn): Likewise.
1148         (arm_process_displaced_insn): Likewise.
1149         (arm_displaced_init_closure): Likewise.
1150         (arm_displaced_step_fixup): Add cast for closure.
1151         * arm-tdep.h: Include infrun.h.
1152         (displaced_step_closure): Rename to ...
1153         (arm_displaced_step_closure): ... this, extend
1154         displaced_step_closure.
1155         <u::svc::copy_svc_os>: Change type of parameter DSC.
1156         <cleanup>: Likewise.
1157         (arm_process_displaced_insn): Likewise.
1158         (arm_displaced_init_closure): Likewise.
1159         (displaced_read_reg): Likewise.
1160         (displaced_write_reg): Likewise.
1161         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1162         Adjust.
1163         * i386-tdep.h: Include infrun.h.
1164         (i386_displaced_step_closure): New typedef.
1165         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1166         i386_displaced_step_closure.
1167         (i386_displaced_step_fixup): Adjust.
1168         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1169         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1170         and unique_ptr.
1171         (ppc_displaced_step_fixup): Adjust.
1172         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1173         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1174         and unique_ptr.
1175         (s390_displaced_step_fixup): Adjust.
1176
1177 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1178
1179         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1180         Remove declarations.
1181
1182 2017-10-20  Tom Tromey  <tom@tromey.com>
1183
1184         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1185         std::vector.
1186         (gdb_bfd_record_inclusion): Update.
1187         (bfdp): Remove typedef.
1188
1189 2017-10-20  Tom Tromey  <tom@tromey.com>
1190
1191         * gdb_bfd.c (gdb_bfd_ref): Use new.
1192         (struct gdb_bfd_data): Add constructor, destructor, and member
1193         initializers.
1194         (gdb_bfd_unref): Use delete.
1195
1196 2017-10-20  Tom Tromey  <tom@tromey.com>
1197
1198         * exec.c (exec_file_attach): Use new_bfd_ref.
1199         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1200         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1201         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1202         new_bfd_ref.
1203         * gdb_bfd.h (new_bfd_ref): New function.
1204
1205 2017-10-20  Pedro Alves  <palves@redhat.com>
1206
1207         * main.c (captured_command_loop): Add attribute noinline.
1208
1209 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1210
1211         * interps.c (struct interp_factory): Add constructor.
1212         (interp_factory_p): Remove typedef.
1213         (DEF_VEC_P(interp_factory_p)): Remove.
1214         (interpreter_factories): Change type to std::vector.
1215         (interp_factory_register): Adjust.
1216         (interp_lookup): Adjust.
1217         (interpreter_completer): Adjust.
1218
1219 2017-10-19  Tom Tromey  <tom@tromey.com>
1220
1221         * break-catch-syscall.c (catch_syscall_completer): Use
1222         std::string, gdb::unique_xmalloc_ptr.
1223
1224 2017-10-19  Tom Tromey  <tom@tromey.com>
1225
1226         * infcall.c (call_function_by_hand_dummy): Use std::string.
1227
1228 2017-10-19  Tom Tromey  <tom@tromey.com>
1229
1230         * mi/mi-main.c (mi_cmd_execute): Update.
1231         * top.h (prepare_execute_command): Return scoped_value_mark.
1232         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1233         Add move constructor.
1234         * top.c (prepare_execute_command): Return scoped_value_mark.
1235         (execute_command): Update.
1236
1237 2017-10-19  Pedro Alves  <palves@redhat.com>
1238
1239         * xml-support.c (xml_fetch_content_from_file): Check fread's
1240         return.
1241
1242 2017-10-19  Pedro Alves  <palves@redhat.com>
1243
1244         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1245         async.
1246         (handle_error_fd): New function.
1247         (ser_base_async): Add/delete an event loop file handler for
1248         error_fd.
1249
1250 2017-10-19  Pedro Alves  <palves@redhat.com>
1251
1252         * xml-support.c (xml_fetch_content_from_file): Don't read in
1253         chunks.  Instead use fseek to determine the file's size, and read
1254         it in one go.
1255
1256 2017-11-18  Keith Seitz  <keiths@redhat.com>
1257
1258         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1259         types.
1260         Add whitespace to front of type name.
1261
1262 2017-10-18  Keith Seitz  <keiths@redhat.com>
1263
1264         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1265         DW_AT_accessibility.
1266
1267 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1268
1269         * features/tic6x-c62x-linux.c: Remove.
1270
1271 2017-10-17  Tom Tromey  <tom@tromey.com>
1272
1273         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1274         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1275         (do_mixed_source_and_assembly): Likewise.
1276
1277 2017-10-17  Tom Tromey  <tom@tromey.com>
1278
1279         * regcache.c (regcache::xfer_part): Remove assertion.
1280
1281 2017-10-17  Pedro Alves  <palves@redhat.com>
1282
1283         * xml-support.c (xml_fetch_content_from_file): Call
1284         unique_ptr::release() instead unique_ptr::get() when passing
1285         through xrealloc.
1286
1287 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1288
1289         * regcache.c (regcache::xfer_part): Remove parameters read and
1290         write, add parameter is_raw.  All callers are updated.
1291
1292 2017-10-16  Keith Seitz  <keiths@redhat.com>
1293
1294         * c-typeprint.c (enum access_specifier): Moved here from
1295         c_type_print_base.
1296         (output_access_specifier): New function.
1297         (c_type_print_base): Consider typedefs when assessing
1298         whether access labels are needed.
1299         Use output_access_specifier as needed.
1300         Output access specifier for typedefs, if needed.
1301         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1302         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1303         fields.
1304         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1305         accessor macros.
1306
1307 2017-10-16  Tom Tromey  <tom@tromey.com>
1308
1309         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1310         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1311         * target.c (target_fileio_read_stralloc): Update.
1312         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1313         * target.h (target_fileio_read_stralloc): Return
1314         unique_xmalloc_ptr.
1315
1316 2017-10-16  Tom Tromey  <tom@tromey.com>
1317
1318         * xml-syscall.c (xml_init_syscalls_info): Update.
1319         * xml-support.c (xinclude_start_include): Update.
1320         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1321         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1322         (xml_fetch_content_from_file): Likewise.
1323         * osdata.c (get_osdata): Update.
1324         * target.h (target_read_stralloc, target_get_osdata): Return
1325         unique_xmalloc_ptr.
1326         * solib-aix.c (solib_aix_get_library_list): Update.
1327         * solib-target.c (solib_target_current_sos): Update.
1328         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1329         * xml-tdesc.c (fetch_available_features_from_target): Update.
1330         (target_fetch_description_xml): Update.
1331         (file_read_description_xml): Update.
1332         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1333         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1334         (remote_pid_to_exec_file): Update.
1335         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1336         (target_get_osdata): Likewise.
1337
1338 2017-10-16  Tom Tromey  <tom@tromey.com>
1339
1340         * remote.c (remote_register_number_and_offset): Use std::vector.
1341         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1342         (putpkt_binary): Use gdb::def_vector.
1343         (compare_sections_command): Use gdb::byte_vector.
1344
1345 2017-10-16  Tom Tromey  <tom@tromey.com>
1346
1347         * ppc-linux-nat.c (hwdebug_insert_point): Use
1348         gdb::unique_xmalloc_ptr, XDUP.
1349
1350 2017-10-16  Tom Tromey  <tom@tromey.com>
1351
1352         * probe.c (parse_probes): Use std::string.
1353         (info_probes_for_ops, enable_probes_command)
1354         (disable_probes_command): Remove cleanups.
1355
1356 2017-10-16  Tom Tromey  <tom@tromey.com>
1357
1358         * buildsym.c (block_compar): Remove.
1359         (end_symtab_get_static_block): Use std::vector.
1360
1361 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1362
1363         * memrange.h (struct mem_range): Define operator< and operator==.
1364         (mem_range_s): Remove.
1365         (DEF_VEC_O (mem_range_s)): Remove.
1366         (normalize_mem_ranges): Change parameter type to std::vector.
1367         * memrange.c (compare_mem_ranges): Remove.
1368         (normalize_mem_ranges): Change parameter type to std::vector,
1369         adjust to vector change.
1370         * exec.c (section_table_available_memory): Return vector, remove
1371         parameter.
1372         (section_table_read_available_memory): Adjust to std::vector
1373         change.
1374         * remote.c (remote_read_bytes): Adjust to std::vector
1375         change.
1376         * tracepoint.h (traceframe_available_memory): Change parameter
1377         type to std::vector.
1378         * tracepoint.c (traceframe_available_memory): Change parameter
1379         type to std::vector, adjust.
1380         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1381         std::vector change.
1382         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1383         unittests/memrange-selftests.c.
1384         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1385         * gdb/unittests/memrange-selftests.c: New file.
1386
1387 2017-10-16  Pedro Alves  <palves@redhat.com>
1388
1389         * elfread.c (probe_key_free): Rename range-for variable.
1390         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1391         (find_probe_by_pc, collect_probes): Rename range-for variable.
1392
1393 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1394
1395         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1396         * features/tic6x-c62x.c: Remove.
1397         * features/tic6x-c64x-linux.c: Remove.
1398         * features/tic6x-c64x.c: Remove.
1399         * features/tic6x-c64xp-linux.c: Remove.
1400         * features/tic6x-c64xp.c: Remove.
1401         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1402         initialize_tdesc_tic6x_*_linux functions.
1403         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1404         initialize_tdesc_tic6x_* functions.
1405
1406 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1407
1408         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1409         tic6x-c62x.
1410         * regformats/tic6x-c62x.dat: Remove.
1411         * regformats/tic6x-c64x.dat: Remove.
1412         * regformats/tic6x-c64xp.dat: Remove.
1413
1414 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1415
1416         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1417         (the !HAVE_LIBEXPAT version).
1418
1419 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1420
1421         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1422         const.
1423
1424 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1425
1426         * target.h: Include tracepoint.h.
1427         (enum trace_find_type): Move to tracepoint.h.
1428         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1429         * tracepoint.h: Don't include target.h
1430         (enum trace_find_type): Move from target.h.
1431         (parse_traceframe_info): Return a unique ptr.
1432         * tracepoint.c (current_traceframe_info): Change type to unique
1433         ptr.
1434         (free_traceframe_info): Remove.
1435         (clear_traceframe_info): Don't manually free
1436         current_traceframe_info.
1437         (free_result): Remove.
1438         (parse_traceframe_info): Return a unique ptr.
1439         (get_traceframe_info): Adjust to unique ptr.
1440         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1441         * remote.c (remote_traceframe_info): Return a unique ptr.
1442         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1443         ptr.
1444         * target-debug.h (target_debug_print_traceframe_info_up): New
1445         macro.
1446         * target-delegates.c: Regenerate.
1447
1448 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1449
1450         * memrange.h (struct mem_range): Add constructors.
1451         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1452         std::vector<mem_range>.
1453         * tracepoint.c (free_traceframe_info): Don't manually free
1454         vector.
1455         (traceframe_info_start_memory): Adjust to vector change.
1456         (traceframe_available_memory): Likewise.
1457         * tracefile-tfile.c (build_traceframe_info): Likewise.
1458         * ctf.c (ctf_traceframe_info): Likewise.
1459
1460 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1461
1462         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1463         std::vector<int>.
1464         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1465         (traceframe_info_start_tvar): Adjust to vector change.
1466         (parse_traceframe_info): Allocate with new.
1467         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1468         vector change.
1469         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1470         change.
1471         tfile_traceframe_info): Allocate with new.
1472         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1473         change.
1474
1475 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1476
1477         * tracepoint.c (traceframe_info): Rename to...
1478         (current_traceframe_info): ...this.
1479         (clear_traceframe_info): Adjust.
1480         (get_traceframe_info): Adjust.
1481
1482 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1483
1484         * nat/linux-osdata.c: Include algorithm.
1485         (compare_processes): Remove.
1486         (struct pid_pgid_entry): New struct.
1487         (linux_xfer_osdata_processgroups): Use std::vector instead of
1488         XNEWVEC.
1489
1490 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1491
1492         * objfiles.h: Don't include symfile.h.
1493         (struct partial_symbol): Remove forward-declaration.
1494         (struct objfile) <global_psymbols, static_psymbols>: Change type
1495         to std::vector<partial_symbol *>.
1496         * objfiles.c (objfile::objfile): Don't memset those fields.
1497         (objfile::~objfile): Don't free those fields.
1498         * psympriv.h (struct psymbol_allocation_list): Remove
1499         forward-declaration.
1500         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1501         to std::vector.
1502         (start_psymtab_common): Change parameters to std::vector.
1503         * psymtab.c: Include algorithm.
1504         (require_partial_symbols): Call shrink_to_fit.
1505         (find_pc_sect_psymbol): Adjust to vector change.
1506         (match_partial_symbol): Likewise.
1507         (lookup_partial_symbol): Likewise.
1508         (psym_relocate): Likewise.
1509         (dump_psymtab): Likewise.
1510         (recursively_search_psymtabs): Likewise.
1511         (compare_psymbols): Remove.
1512         (sort_pst_symbols): Adjust to vector change.
1513         (start_psymtab_common): Likewise.
1514         (end_psymtab_common): Likewise.
1515         (psymbol_bcache_full): De-constify return value.
1516         (add_psymbol_to_bcache): Likewise.
1517         (extend_psymbol_list): Remove.
1518         (append_psymbol_to_list): Adjust to vector change.
1519         (add_psymbol_to_list): Likewise.
1520         (init_psymbol_list): Likewise.
1521         (maintenance_info_psymtabs): Likewise.
1522         (maintenance_check_psymtabs): Likewise.
1523         * symfile.h (struct psymbol_allocation_list): Remove.
1524         * symfile.c (reread_symbols): Adjust to vector change.
1525         * dbxread.c (start_psymtab): Change type of parameters.
1526         (dbx_symfile_read): Adjust to vector change.
1527         (read_dbx_symtab): Likewise.
1528         (start_psymtab): Change type of parameters.
1529         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1530         (create_partial_symtab): Likewise.
1531         (add_partial_symbol): Likewise.
1532         (write_one_signatured_type): Likewise.
1533         (recursively_write_psymbols): Likewise.
1534         * mdebugread.c (parse_partial_symbols): Likewise.
1535         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1536         (scan_xcoff_symtab): Adjust to vector change.
1537         (xcoff_initial_scan): Likewise.
1538
1539 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1540
1541         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1542
1543 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1544
1545         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1546         Remove s390x-*-expedite, add s390x-expedite.
1547
1548 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1549
1550         * features/s390-gs-linux64.c: Regenerated.
1551         * features/s390x-gs-linux64.c: Regenerated.
1552
1553 2017-10-13  Tom Tromey  <tom@tromey.com>
1554
1555         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1556         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1557         delete.
1558         * symfile.c (symbol_file_add_with_addrs): Use new.
1559         (symbol_file_add_separate): Update comment.
1560         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1561         * jit.c (jit_object_close_impl): Use new.
1562         (jit_unregister_code): Use delete.
1563         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1564         (~objfile): Rename from free_objfile.
1565         (free_objfile_separate_debug, do_free_objfile_cleanup)
1566         (free_all_objfiles, objfile_purge_solibs): Use delete.
1567         * objfiles.h (struct objfile): Add constructor and destructor.
1568         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1569         (allocate_objfile, free_objfile): Don't declare.
1570         (struct objstats): Add initializers.
1571
1572 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1573
1574         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1575         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1576         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1577         * gdbarch.h: Regenerate.
1578         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1579         Adjust comment.
1580         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1581         (i386_displaced_step_fixup): Adjust comment.
1582         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1583
1584 2017-10-12  Tom Tromey  <tom@tromey.com>
1585
1586         * prologue-value.h (pv_area::store_would_trash): Return bool.
1587         (pv_area::find_reg): Likewise.
1588         * prologue-value.c (pv_area::store_would_trash): Return bool.
1589         (pv_area::find_reg): Likewise.
1590
1591 2017-10-12  Tom Tromey  <tom@tromey.com>
1592
1593         * s390-linux-tdep.c (s390_store, s390_load)
1594         (s390_check_for_saved, s390_analyze_prologue): Update.
1595         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1596         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1597         * prologue-value.h (class pv_area): Move from prologue-value.c.
1598         Change names of members.  Add constructor, destructor, member
1599         functions.
1600         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1601         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1602         (pv_area_fetch, pv_area_scan): Don't declare.
1603         * prologue-value.c (struct pv_area::area_entry): Now member of
1604         pv_area.
1605         (struct pv_area): Move to prologue-value.h.
1606         (pv_area::pv_area): Rename from make_pv_area.
1607         (pv_area::~pv_area): Rename from free_pv_area.
1608         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1609         (clear_entries, find_entry, overlaps, store_would_trash, store)
1610         (fetch, find_reg, scan): Now member of pv_area.
1611         Remove "area" argument.  Update.
1612         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1613         Update.
1614         * mn10300-tdep.c (push_reg, check_for_saved)
1615         (mn10300_analyze_prologue): Update.
1616         * mep-tdep.c (is_arg_spill, check_for_saved)
1617         (mep_analyze_prologue): Update.
1618         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1619         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1620         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1621         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1622         Update.
1623         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1624         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1625
1626 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1627
1628         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1629         * linux-nat.c (linux_nat_delete_thread): New variable.
1630         (lwp_free): Invoke linux_nat_delete_thread if set.
1631         (linux_nat_set_delete_thread): New function.
1632         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1633         thread delete callback.
1634         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1635         (_initialize_arm_linux_nat): Assign thread delete callback.
1636         * s390-linux-nat.c (s390_delete_thread): New function.
1637         (_initialize_s390_nat): Assign thread delete callback.
1638         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1639         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1640         function.
1641         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1642         declaration.
1643         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1644         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1645
1646 2017-10-09  Tom Tromey  <tom@tromey.com>
1647
1648         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1649         std::string.
1650         * tui/tui-layout.c (enum tui_status): Use std::string.
1651
1652 2017-10-11  Tom Tromey  <tom@tromey.com>
1653
1654         * gdbthread.h (thread_command): Constify.
1655         * inferior.h (detach_command): Constify.
1656         * top.h (set_history, show_history): Constify.
1657         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1658         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1659         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1660         * printcmd.c (set_command): Constify.
1661         (non_const_set_command): New function.
1662         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1663         * breakpoint.c (enable_command, disable_command, delete_command)
1664         (catch_command, tcatch_command, set_breakpoint_cmd)
1665         (show_breakpoint_cmd): Constify.
1666         * macrocmd.c (macro_command): Constify.
1667         * infcmd.c (unset_command, kill_command, detach_command)
1668         (info_proc_cmd): Constify.
1669         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1670         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1671         (info_auto_load_cmd): Constify.
1672         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1673         (unset_tdesc_cmd): Constify.
1674         * ada-lang.c (set_ada_command, show_ada_command)
1675         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1676         * guile/guile.c (set_guile_command, show_guile_command)
1677         (info_guile_command): Constify.
1678         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1679         Constify.
1680         * skip.c (skip_command): Constify.
1681         * compile/compile.c (_initialize_compile): Constify.
1682         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1683         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1684         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1685         (maint_btrace_pt_show_cmd): Constify.
1686         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1687         Constify.
1688         * python/python.c (user_show_python, user_set_python): Constify.
1689         * mips-tdep.c (set_mips_command, show_mips_command)
1690         (set_mipsfpu_command): Constify.
1691         * record-btrace.c (cmd_record_btrace_start)
1692         (cmd_set_record_btrace, cmd_show_record_btrace)
1693         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1694         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1695         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1696         Constify.
1697         * symfile.c (overlay_command): Constify.
1698         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1699         * cli/cli-logging.c (set_logging_command, show_logging_command):
1700         Constify.
1701         * cli/cli-dump.c (dump_command, append_command)
1702         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1703         (tekhex_dump_command, binary_dump_command)
1704         (binary_append_command): Constify.
1705         * cli/cli-decode.c (struct cmd_list_element): Change type of
1706         "fun".
1707         * cli/cli-cmds.c (info_command, show_command, set_debug)
1708         (show_debug): Constify.
1709         (show_command): Add non-const overload.
1710         * top.c (set_history, show_history): Constify.
1711         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1712         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1713         * target.c (target_command): Constify.
1714         * sparc64-tdep.c (info_adi_command): Constify.
1715         * record-full.c (cmd_record_full_start): Constify.
1716         (set_record_full_command): Constify.  Fix typo.
1717         (show_record_full_command): Constify.
1718         * thread.c (thread_command, thread_apply_command): Constify.
1719         * memattr.c (dummy_cmd): Constify.
1720         * value.c (function_command): Constify.
1721         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1722         * probe.c (info_probes_command): Constify.
1723         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1724         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1725         (show_thread_cmd, set_thread_default_cmd)
1726         (show_thread_default_cmd): Constify.
1727         (check_empty): Constify.
1728         * tracepoint.c (tfind_command): Constify.
1729         * cp-support.c (maint_cplus_command): Constify.
1730         * windows-tdep.c (info_w32_command): Constify.
1731         * record.c (cmd_record_start, set_record_command)
1732         (show_record_command, info_record_command, cmd_record_goto):
1733         Constify.
1734         * ravenscar-thread.c (set_ravenscar_command)
1735         (show_ravenscar_command): Constify.
1736         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1737         Constify.
1738         (add_internal_problem_command): Remove casts.
1739         * arc-tdep.c (maintenance_print_arc_command): Constify.
1740         * valprint.c (set_print, show_print, set_print_raw)
1741         (show_print_raw): Constify.
1742         * maint.c (maintenance_command, maintenance_info_command)
1743         (maintenance_print_command, maintenance_set_cmd)
1744         (maintenance_show_cmd, set_per_command_cmd)
1745         (show_per_command_cmd, maintenance_check_command): Constify.
1746         * language.c (set_check, show_check): Constify.
1747         * typeprint.c (show_print_type, set_print_type): Constify.
1748         * go32-nat.c (go32_info_dos_command): Constify.
1749
1750 2017-10-11  Tom Tromey  <tom@tromey.com>
1751
1752         * breakpoint.c (prepare_re_set_context): Remove.
1753         (breakpoint_re_set_one): Update.  Don't use cleanups.
1754         (breakpoint_re_set): Use scoped_restore, std::string, and
1755         scoped_restore_current_language.
1756
1757 2017-10-11  Tom Tromey  <tom@tromey.com>
1758
1759         * breakpoint.c (commands_command_1): Use std::string.
1760         (cleanup_executing_breakpoints): Remove.
1761         (bpstat_do_actions_1): Use scoped_restore.
1762         (bpstat_check_watchpoint): Use std::string.
1763         (decode_static_tracepoint_spec): Likewise.
1764         (break_range_command): Likewise.
1765         (watch_command_1): Likewise.
1766         (compare_breakpoints): Change argument types.
1767         (clear_command): Use std::vector.
1768         (cleanup_executing_breakpoints): Remove.
1769         (update_global_location_list): Use unique_xmalloc_ptr.
1770         (strace_command): Remove unused declaration.
1771
1772 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1773
1774         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1775         * NEWS: Mention new FreeBSD/arm native configuration.
1776         * configure.host: Add arm*-*-freebsd*.
1777         * configure.nat: Likewise.
1778         * arm-fbsd-nat.c: New file.
1779
1780 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1781
1782         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1783         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1784         * NEWS: Mention new FreeBSD/arm target.
1785         * configure.tgt: Add arm*-*-freebsd*.
1786         * arm-fbsd-tdep.c: New file.
1787         * arm-fbsd-tdep.h: New file.
1788
1789 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1790
1791         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1792         `gdbarch_elfcore_write_linux_prpsinfo'.
1793         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1794         method.
1795         (elf_internal_linux_prpsinfo): Remove declaration.
1796         * gdbarch.h: Regenerate.
1797         * gdbarch.c: Regenerate.
1798
1799 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1800
1801         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1802         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1803
1804 2017-10-11  Pedro Alves  <palves@redhat.com>
1805
1806         * breakpoint.c (reattach_breakpoints): Delete.
1807         * breakpoint.h (reattach_breakpoints): Delete.
1808
1809 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1810
1811         * symfile.c (registered_sym_fns): Make struct, not typedef.
1812         (DEF_VEC_O (registered_sym_fns)): Remove.
1813         (symtab_fns): Change type to std::vector.
1814         (add_symtab_fns): Adjust.
1815         (find_sym_fns): Adjust.
1816
1817 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1818
1819         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1820         * arc-tdep.h (arc_arch_is_em): New function.
1821         (arc_arch_is_hs): Likewise.
1822
1823 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1824
1825         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1826         parentheses in the declaration.
1827         (macro_lookup_inclusion): Likewise.
1828         (macro_lookup_definition): Likewise.
1829         * p-lang.h (pascal_builtin_types): Likewise.
1830         * tui/tui-data.c (tui_win_list): Likewise.
1831         * tui/tui-data.h (tui_win_list): Likewise.
1832         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1833
1834 2017-10-11  Mark Rages  <markrages@gmail.com>
1835
1836         * target-memory.c (block_boundaries): Fix for block address not
1837         aligned on block size.
1838
1839 2017-10-10  Pedro Alves <palves@redhat.com>
1840             Tom Tromey  <tom@tromey.com>
1841
1842         * breakpoint.c (struct captured_breakpoint_query_args)
1843         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1844         (print_breakpoint): New.
1845         * breakpoint.h (print_breakpoint): Declare.
1846         * common/common-exceptions.h (enum return_reason): Remove
1847         references to catch_exceptions.
1848         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1849         Delete.
1850         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1851         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1852         * gdb.h: Delete.
1853         * gdbthread.h (thread_select): Declare.
1854         * mi/mi-cmd-break.c: Don't include gdb.h.
1855         (breakpoint_notify): Use print_breakpoint.
1856         * mi/mi-cmd-catch.c: Don't include gdb.h.
1857         * mi/mi-interp.c: Don't include gdb.h.
1858         (mi_print_breakpoint_for_event): New.
1859         (mi_breakpoint_created, mi_breakpoint_modified): Use
1860         mi_print_breakpoint_for_event.
1861         * mi/mi-main.c: Don't include gdb.h.
1862         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1863         thread_select instead of gdb_thread_select.
1864         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1865         of using gdb_list_thread_ids.
1866         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1867         FILEIO_ENOSYS here.
1868         (remote_fileio_request): Use TRY/CATCH instead of
1869         catch_exceptions.
1870         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1871         (symbol_file_add_from_memory_wrapper): Delete.
1872         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1873         * thread.c: Don't include gdb.h.
1874         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1875         (thread_alive): Use thread_select.
1876         (do_captured_thread_select): Delete, parts salvaged as ...
1877         (thread_select): ... this new function.
1878         (gdb_thread_select): Delete.
1879
1880 2017-10-10  Pedro Alves  <palves@redhat.com>
1881             Tom Tromey  <tom@tromey.com>
1882
1883         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1884         and reverse logic.
1885         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1886         No longer macros.  Instead ...
1887         (enum wp_check_result): They're now values of this new
1888         enumeration.
1889         (watchpoint_check): Change return type to wp_check_result and
1890         parameter type to bpstat.
1891         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1892         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1893         catch_errors.  Reverse logic of watchpoint_check call.
1894         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1895         pointer as parameter.
1896         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1897         * common/common-exceptions.c (throw_exception_sjlj): Update
1898         comments to avoid mentioning catch_errors.
1899         * exceptions.c (catch_errors): Delete.
1900         * exceptions.h: Update comments to avoid mentioning catch_errors.
1901         (catch_errors_ftype, catch_errors): Delete.
1902         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1903         (hook_stop_stub): Delete.
1904         (restore_selected_frame): Change return type to void, and
1905         parameter type to const frame_id &.
1906         (restore_infcall_control_state): Use TRY/CATCH instead of
1907         catch_errors.
1908         * main.c (captured_command_loop): Return void and remove
1909         parameter.  Remove references to catch_errors.
1910         (captured_main): Use TRY/CATCH instead of catch_errors.
1911         * objc-lang.c (objc_submethod_helper_data)
1912         (find_objc_msgcall_submethod_helper): Delete.
1913         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1914         catch_errors.
1915         * record-full.c (record_full_message): Return void.
1916         (record_full_message_args, record_full_message_wrapper): Delete.
1917         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1918         instead of catch_errors.
1919         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1920         parameter type to int.
1921         * solib-darwin.c (open_symbol_file_object): Ditto.
1922         * solib-dsbt.c (open_symbol_file_object): Ditto.
1923         * solib-frv.c (open_symbol_file_object): Ditto.
1924         * solib-svr4.c (open_symbol_file_object): Ditto.
1925         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1926         * solib.c (update_solib_list): Use TRY/CATCH instead of
1927         catch_errors.
1928         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1929         Change type.
1930         * symmisc.c (struct print_symbol_args): Remove.
1931         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1932         (print_symbol): Change type.
1933         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1934         and remove parameters.
1935         (catch_errors): New.
1936         (get_windows_debug_event): Adjust.
1937
1938 2017-10-09  Tom Tromey  <tom@tromey.com>
1939
1940         * mi/mi-main.c (free_splay_tree): Remove.
1941         (list_available_thread_groups): Use splay_tree_up.
1942         * common/gdb_splay_tree.h: New file.
1943
1944 2017-10-09  Tom Tromey  <tom@tromey.com>
1945
1946         * mi/mi-main.c (do_nothing): Remove.
1947         (list_available_thread_groups): Update.
1948
1949 2017-10-09  Pedro Alves  <palves@redhat.com>
1950
1951         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1952         reading registers when switching context.
1953
1954 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1955
1956         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1957         (fbsd_convert_siginfo): Likewise.
1958         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1959
1960 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1961
1962         * configure.ac (try_guile_versions): Remove guile-2.2.
1963         * configure: Regenerate.
1964
1965 2017-10-09  Tom Tromey  <tom@tromey.com>
1966
1967         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1968         (COMPILE.pre): Use $(CXX).
1969
1970 2017-10-09  Pedro Alves  <palves@redhat.com>
1971
1972         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1973         Use bool.
1974         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1975         * cp-support.h (cp_remove_params): Now returns a
1976         gdb::unique_xmalloc_ptr.
1977         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1978         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1979         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1980         returning a gdb::unique_xmalloc_ptr.
1981         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1982         * stack.c (find_frame_funname): Adjust to cp_remove_params
1983         returning a gdb::unique_xmalloc_ptr.
1984
1985 2017-10-08  Tom Tromey  <tom@tromey.com>
1986
1987         * dwarf2read.c (dwarf2_get_dwz_file): Use
1988         gdb::unique_xmalloc_ptr.
1989         (find_slot_in_mapped_hash): Likewise.
1990         (dwarf2_physname): Likewise.
1991         (create_dwo_unit_in_dwp_v1): Use std::string.
1992         (create_dwo_unit_in_dwp_v2): Likewise.
1993         (lookup_dwo_cutu): Likewise.
1994         (inherit_abstract_dies): Use std::vector.
1995         (read_array_type): Likewise.
1996         (dwarf_decode_macros): Remove unused declaration.
1997         (unsigned_int_compar): Remove.
1998         (dwarf2_build_psymtabs_hard): Use scoped_restore.
1999         (psymtabs_addrmap_cleanup): Remove.
2000
2001 2017-10-08  Tom Tromey  <tom@tromey.com>
2002
2003         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2004         * frame.h (frame_cleanup_after_sniffer): Declare.
2005         (frame_prepare_for_sniffer): Return void.
2006         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2007         type of argument.
2008         (frame_prepare_for_sniffer): Return void.
2009
2010 2017-10-08  Tom Tromey  <tom@tromey.com>
2011
2012         * utils.h (make_cleanup_value_free): Remove.
2013         * utils.c (do_value_free, struct cleanup): Remove.
2014         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2015         Use gdb_value_up.
2016         * value.h (struct value_deleter): New.
2017         (gdb_value_up): New typedef.
2018
2019 2017-10-08  Tom Tromey  <tom@tromey.com>
2020
2021         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2022         (make_cleanup_free_search_symbols): Remove.
2023         (search_symbols): Return std::vector.
2024         (symbol_search::compare_search_syms): Now member of
2025         symbol_search.  Change arguments.
2026         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2027         (symtab_symbol_info, rbreak_command): Update.
2028         * symtab.h (struct symbol_search) <next>: Remove.
2029         Add constructors.
2030         (symbol_search::operator<): New function.
2031         (symbol_search::operator==): New function.
2032         (search_symbols): Remove std::vector.
2033         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2034         (symbol_search::compare_search_syms): Declare.
2035
2036 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2037
2038         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2039         arch/aarch64-insn.o.
2040         Remove one rule.
2041         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2042
2043 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2044
2045         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2046         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2047         arch/arm-linux.o respectively.
2048         * configure.tgt: Likewise.
2049
2050 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2051
2052         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2053         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2054
2055 2017-10-06  Pedro Alves  <palves@redhat.com>
2056
2057         * windows-nat.c: Include <algorithm>.
2058
2059 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2060
2061         * configure.tgt (i386_tobjs): New variable.
2062         (amd64_tobjs): New variable.
2063         Set $cpu_obs and $os_obs.
2064
2065 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2066
2067         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2068         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2069         (clean): Remove object files and dependency files.
2070         (distclean): Remove the directory.
2071         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2072         * configure: Re-generated.
2073         * configure.tgt: Replace amd64.o with arch/amd64.o.
2074
2075 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2076
2077         PR build/22188
2078         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2079         and SETEND.
2080
2081 2017-10-05  Pedro Alves  <palves@redhat.com>
2082
2083         * linux-nat.c (linux_child_follow_fork): When following the parent
2084         and detaching the child, consult the parent thread's architecture
2085         instead of the child's.
2086
2087 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2088
2089         * ax.h: Do not include "doublest.h".
2090         (union agent_val): Remove.
2091
2092 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2093
2094         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2095         (decimal_to_string): Return std::string object.
2096         (decimal_from_string): Accept std::string object.  Return bool.
2097         (decimal_from_integral, decimal_from_doublest): Remove.
2098         (decimal_from_longest): Add prototype.
2099         (decimal_from_ulongest): Likewise.
2100         (decimal_to_longest): Likewise.
2101         (decimal_from_doublest): Likewise.
2102         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2103         (MAX_DECIMAL_STRING): Move here.
2104         (decimal_to_string): Return std::string object.
2105         (decimal_from_string): Accept std::string object.  Return bool.
2106         (decimal_from_integral): Remove, replace by ...
2107         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2108         (decimal_to_longest): New function.
2109         (decimal_from_floating): Remove, replace by ...
2110         (decimal_from_doublest): ... this new function.
2111         (decimal_to_doublest): Update to new decimal_to_string interface.
2112
2113         * value.c (unpack_long): Use decimal_to_longest.
2114         * valops.c (value_cast): Use decimal_from_doublest instead of
2115         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2116         decimal_from_integral.
2117         * valarith.c (value_args_as_decimal): Likewise.
2118         * valprint.c (print_decimal_floating): Update to new
2119         decimal_to_string interface.
2120         * printcmd.c (printf_decfloat): Likewise.
2121         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2122
2123 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2124
2125         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2126         * gdbtypes.c: Include "floatformat.h".
2127         * value.c: Likewise.
2128         * m68k-tdep.c: Likewise.
2129
2130         * findvar.c: Do not include "floatformat.h".
2131         * amd64-darwin-tdep.c: Likewise.
2132         * arm-linux-tdep.c: Likewise.
2133         * i386-darwin-tdep.c: Likewise.
2134         * i387-tdep.c: Likewise.
2135         * m68k-linux-tdep.c: Likewise.
2136         * mep-tdep.c: Likewise.
2137         * mips-tdep.c: Likewise.
2138         * nios2-tdep.c: Likewise.
2139         * s390-linux-tdep.c: Likewise.
2140         * sparc-obsd-tdep.c: Likewise.
2141         * sparc-tdep.c: Likewise.
2142         * sparc64-tdep.c: Likewise.
2143         * spu-tdep.c: Likewise.
2144         * tic6x-tdep.c: Likewise.
2145         * tilegx-tdep.c: Likewise.
2146         * vax-tdep.c: Likewise.
2147         * xstormy16-tdep.c: Likewise.
2148         * xtensa-tdep.c: Likewise.
2149
2150         * top.c: Do not include "doublest.h".
2151         * aarch64-tdep.c: Likewise.
2152         * alpha-tdep.c: Likewise.
2153         * arm-linux-tdep.c: Likewise.
2154         * m68k-linux-tdep.c: Likewise.
2155         * tilegx-tdep.c: Likewise.
2156         * xstormy16-tdep.c: Likewise.
2157
2158 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2159
2160         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2161         (mipsn32_fbsd_sigframe): Define.
2162         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2163         for FreeBSD/mipsn32.
2164
2165 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2166
2167         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2168         AT_HWCAP.
2169
2170 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2171
2172         * MAINTAINERS (Misc): Update my email address.
2173
2174 2017-10-04  Pedro Alves  <palves@redhat.com>
2175
2176         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2177         it instead of target_gdbarch.
2178         (get_remote_state, get_remote_packet_size): Adjust
2179         get_remote_arch_state calls, passing down target_gdbarch
2180         explicitly.
2181         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2182         'gdbarch' and use it instead of target_gdbarch.
2183         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2184         passing down target_gdbarch explicitly.
2185         (struct stop_reply) <arch>: New field.
2186         (remote_parse_stop_reply): Use the stopped thread's architecture,
2187         not the current inferior's.  Save the architecture in the
2188         stop_reply.
2189         (process_stop_reply): Use the stop reply's architecture.
2190         (process_g_packet, remote_fetch_registers)
2191         (remote_prepare_to_store, store_registers_using_G)
2192         (remote_store_registers): Adjust get_remote_arch_state calls,
2193         using the regcache's architecture.
2194         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2195         passing down target_gdbarch explicitly.
2196         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2197         beneath instead of calling target_gdbarch.
2198         * target.c (default_thread_architecture): Use the specified
2199         inferior's architecture, instead of the current inferior's
2200         architecture (via target_gdbarch).
2201
2202 2017-10-04  Pedro Alves  <palves@redhat.com>
2203
2204         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2205         case.
2206         (regcache_print): Handle !target_has_registers here instead.
2207
2208 2017-10-04  Pedro Alves  <palves@redhat.com>
2209
2210         * frame.c (create_test_frame): Delete.
2211         * frame.h (create_test_frame): Delete.
2212         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2213         (class regcache_test): Delete.
2214         (test_target_has_registers, test_target_has_stack)
2215         (test_target_has_memory, test_target_prepare_to_store)
2216         (test_target_store_registers): New functions.
2217         (test_target_ops): New class.
2218         (register_to_value_test): Error out if there's already a
2219         process_stratum (or higher) target pushed.  Create a fuller mock
2220         environment, with mock target_ops, inferior, address space, thread
2221         and inferior_ptid.
2222         * progspace.c (struct address_space): Move to ...
2223         * progspace.h (struct address_space): ... here.
2224         * regcache.h (regcache::~regcache, regcache::raw_write)
2225         [GDB_SELF_TEST]: No longer virtual.
2226
2227 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2228
2229         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2230
2231 2017-10-04  Pedro Alves  <palves@redhat.com>
2232
2233         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2234         out of 'between TRY and CATCH'.
2235
2236 2017-10-04  Pedro Alves  <palves@redhat.com>
2237
2238         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2239         * common/common-exceptions.h (TRY): Open an outermost scope.
2240         Expand intro comment.
2241         (CATCH): Reindent.
2242         (END_CATCH): Close the outermost scope.
2243         * completer.c (complete_line_internal): Add missing END_CATCH.
2244
2245 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2246
2247         * NEWS (Changes since GDB 8.0): Add entry about new
2248         'set-cwd-on-gdbserver' feature.
2249         (New remote packets): Add entry for QSetWorkingDir.
2250         * common/common-inferior.h (set_inferior_cwd): New prototype.
2251         * infcmd.c (set_inferior_cwd): Remove "static".
2252         (show_cwd_command): Expand text to include remote debugging.
2253         * remote.c: Add PACKET_QSetWorkingDir.
2254         (remote_protocol_features) <QSetWorkingDir>: New entry for
2255         PACKET_QSetWorkingDir.
2256         (extended_remote_set_inferior_cwd): New function.
2257         (extended_remote_create_inferior): Call
2258         "extended_remote_set_inferior_cwd".
2259         (_initialize_remote): Call "add_packet_config_cmd" for
2260         QSetWorkingDir.
2261
2262 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2263
2264         * NEWS (New commands): Mention "set/show cwd".
2265         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2266         "cd" command's help text.
2267         * common/common-inferior.h (get_inferior_cwd): New prototype.
2268         * infcmd.c (inferior_cwd_scratch): New global variable.
2269         (set_inferior_cwd): New function.
2270         (get_inferior_cwd): Likewise.
2271         (set_cwd_command): Likewise.
2272         (show_cwd_command): Likewise.
2273         (_initialize_infcmd): Add "set/show cwd" commands.
2274         * inferior.h (class inferior) <cwd>: New field.
2275         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2276         (fork_inferior): Change inferior's cwd before its execution.
2277         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2278         to CreateProcess.
2279
2280 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2281
2282         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2283         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2284         (COMMON_OBS): Add gdb_tilde_expand.o.
2285         * common/gdb_tilde_expand.c: New file.
2286         * common/gdb_tilde_expand.h: Likewise.
2287
2288 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2289
2290         * gdbarch.sh (objfile): Remove duplicate declaration.
2291         * gdbarch.h: Regenerate.
2292
2293 2017-10-03  Tom Tromey  <tom@tromey.com>
2294
2295         * utils.c (internal_vproblem): Use string_vprintf.
2296
2297 2017-10-03  Tom Tromey  <tom@tromey.com>
2298
2299         * printcmd.c (info_symbol_command): Use std::string.
2300
2301 2017-10-03  Tom Tromey  <tom@tromey.com>
2302
2303         * top.c (gdb_safe_append_history): Use std::string.
2304
2305 2017-10-03  Tom Tromey  <tom@tromey.com>
2306
2307         * event-top.c (stdin_event_handler): Update.
2308         * main.c (captured_main_1): Update.
2309         * top.h (make_delete_ui_cleanup): Remove.
2310         (struct ui): Add constructor and destructor.
2311         (new_ui, delete_ui): Remove.
2312         * top.c (make_delete_ui_cleanup): Remove.
2313         (new_ui_command): Use std::unique_ptr.
2314         (delete_ui_cleanup): Remove.
2315         (ui::ui): Rename from new_ui.  Update.
2316         (free_ui): Remove.
2317         (ui::~ui): Rename from delete_ui.  Update.
2318
2319 2017-10-03  Tom Tromey  <tom@tromey.com>
2320
2321         * symfile.c (load_progress): Use gdb::byte_vector.
2322
2323 2017-10-03  Tom Tromey  <tom@tromey.com>
2324
2325         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2326         declaration.
2327         * printcmd.c (x_command): Remove unused declaration.
2328         * symfile.c (symbol_file_command): Remove unused declaration.
2329
2330 2017-10-03  Tom Tromey  <tom@tromey.com>
2331
2332         * utils.c (internal_vproblem): Use std::string.
2333         (defaulted_query): Likewise.
2334
2335 2017-10-03  Tom Tromey  <tom@tromey.com>
2336
2337         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2338         * top.c (execute_command_to_string): Update.
2339         * utils.c (make_cleanup_restore_page_info): Remove.
2340         (do_restore_page_info_cleanup): Remove.
2341         (set_batch_flag_and_restore_page_info):
2342         New.
2343         (make_cleanup_restore_page_info): Remove.
2344         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2345         (~set_batch_flag_and_restore_page_info): New
2346         (make_cleanup_restore_uinteger): Remove.
2347         (make_cleanup_restore_integer): Remove.
2348         (struct restore_integer_closure): Remove.
2349         (restore_integer): Remove.
2350         * utils.h (struct set_batch_flag_and_restore_page_info): New
2351         class.
2352         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2353         (make_cleanup_restore_page_info): Remove.
2354         (make_cleanup_restore_uinteger) Remove.
2355         (make_cleanup_restore_integer) Remove.
2356
2357 2017-10-03  Tom Tromey  <tom@tromey.com>
2358
2359         * record-full.h (record_full_gdb_operation_disable_set): Return
2360         scoped_restore_tmpl<int>.
2361         * infrun.c (adjust_pc_after_break): Update.
2362         (handle_signal_stop): Update.
2363         * record-full.c (record_full_gdb_operation_disable_set): Return
2364         scoped_restore_tmpl<int>.
2365         (record_full_wait_1, record_full_insert_breakpoint)
2366         (record_full_remove_breakpoint, record_full_save)
2367         (record_full_goto_insn): Update.
2368
2369 2017-10-02  Tom Tromey  <tom@tromey.com>
2370
2371         PR rust/22236:
2372         * rust-lang.c (rust_val_print_str): New function.
2373         (val_print_struct): Call it.
2374         (rust_subscript): Preserve name of slice type.
2375
2376 2017-10-02  Tom Tromey  <tom@tromey.com>
2377
2378         * rust-lang.c (rust_subscript): Handle slices in
2379         EVAL_AVOID_SIDE_EFFECTS case.
2380
2381 2017-10-02  Tom Tromey  <tom@tromey.com>
2382
2383         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2384
2385 2017-10-02  Tom Tromey  <tom@tromey.com>
2386
2387         * rust-lang.h (rust_slice_type): Add "extern".
2388
2389 2017-10-02  Tom Tromey  <tom@tromey.com>
2390             Pedro Alves  <palves@redhat.com>
2391
2392         * ada-lang.h (ada_exc_info::operator<): Make const.
2393         (ada_exc_info::operator==): Make const.
2394         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2395         Make const.
2396
2397 2017-09-29  Tom Tromey  <tom@tromey.com>
2398
2399         * target.c (read_whatever_is_readable): Change type of "result".
2400         Update.
2401         (free_memory_read_result_vector): Remove.
2402         (read_memory_robust): Change return type.  Update.
2403         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2404         bin2hex, std::string.
2405         * target.h (memory_read_result_s): Remove typedef.
2406         (free_memory_read_result_vector): Remove.
2407         (read_memory_robust): Return std::vector.
2408
2409 2017-09-29  Tom Tromey  <tom@tromey.com>
2410
2411         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2412
2413 2017-09-29  Tom Tromey  <tom@tromey.com>
2414
2415         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2416         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2417         operator< and operator==.
2418         (ada_exceptions_list): Return a std::vector.
2419         * ada-lang.c (ada_exc_info::operator<): Rename from
2420         compare_ada_exception_info.
2421         (ada_exc_info::operator==): New.
2422         (sort_remove_dups_ada_exceptions_list): Change type of
2423         "exceptions".
2424         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2425         (ada_add_global_exceptions): Likewise.
2426         (ada_exceptions_list_1): Return a std::vector.
2427         (ada_exceptions_list): Likewise.
2428
2429 2017-09-29  Tom Tromey  <tom@tromey.com>
2430
2431         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2432         'std::set *'.
2433         (print_one_inferior): Update.
2434         (free_vector_of_ints): Remove.
2435         (list_available_thread_groups): Change "ids" to std::set.
2436         (mi_cmd_list_thread_groups): Update.
2437         (struct collect_cores_data) <core>: Now a std::set.
2438         (collect_cores): Update.
2439         (unique): Remove.
2440         (print_one_inferior): Update.
2441
2442 2017-09-29  Tom Tromey  <tom@tromey.com>
2443
2444         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2445         (mi_execute_async_cli_command): Likewise.
2446         (mi_cmd_trace_frame_collected): Use field_fmt.
2447
2448 2017-09-29  Tom Tromey  <tom@tromey.com>
2449
2450         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2451         gdb::byte_vector.
2452
2453 2017-09-29  Tom Tromey  <tom@tromey.com>
2454
2455         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2456
2457 2017-09-29  Tom Tromey  <tom@tromey.com>
2458
2459         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2460
2461 2017-09-29  Tom Tromey  <tom@tromey.com>
2462
2463         * varobj.h (varobj_gen_name): Return std::string.
2464         * varobj.c (varobj_gen_name): Return std::string.
2465         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2466         (mi_cmd_var_delete): Don't copy "name".
2467
2468 2017-09-29  Tom Tromey  <tom@tromey.com>
2469
2470         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2471         (mi_cmd_break_insert_1): Update.
2472
2473 2017-09-29  Tom Tromey  <tom@tromey.com>
2474
2475         * target.h (make_scoped_defer_target_commit_resume): Update.
2476         * target.c (make_scoped_defer_target_commit_resume): Rename from
2477         make_cleanup_defer_target_commit_resume.  Return a
2478         scoped_restore.
2479         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2480
2481 2017-09-29  Tom Tromey  <tom@tromey.com>
2482
2483         * main.c (captured_main_1): Remove unused declaration.
2484         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2485
2486 2017-09-29  Tom Tromey  <tom@tromey.com>
2487
2488         * symtab.c (search_symbols): Remove unused outer cleanup.
2489         (make_source_files_completion_list): Remove unused declaration.
2490
2491 2017-09-29  Tom Tromey  <tom@tromey.com>
2492
2493         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2494
2495 2017-09-29  Tom Tromey  <tom@tromey.com>
2496
2497         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2498         gdb::byte_vector.
2499
2500 2017-09-29  Tom Tromey  <tom@tromey.com>
2501
2502         * complaints.c (vcomplaint): Use std::string.
2503
2504 2017-09-29  Tom Tromey  <tom@tromey.com>
2505
2506         * tracepoint.c (trace_variable_command): Use std::string.
2507         (encode_actions_1): Remove unused declarations.
2508         (create_tsv_from_upload): Use std::string.
2509
2510 2017-09-29  Tom Tromey  <tom@tromey.com>
2511
2512         * cp-support.c (gdb_demangle): Use std::string.
2513
2514 2017-09-29  Tom Tromey  <tom@tromey.com>
2515
2516         * stack.c (parse_frame_specification): Use std::string
2517         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2518
2519 2017-09-29  Tom Tromey  <tom@tromey.com>
2520
2521         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2522
2523 2017-09-29  Tom Tromey  <tom@tromey.com>
2524
2525         * utils.c (vfprintf_maybe_filtered): Use std::string.
2526         (vfprintf_unfiltered): Likewise.
2527
2528 2017-09-29  Tom Tromey  <tom@tromey.com>
2529
2530         * event-top.c (top_level_prompt): Return std::string.
2531         (display_gdb_prompt): Update.
2532
2533 2017-09-29  Tom Tromey  <tom@tromey.com>
2534
2535         * unittests/common-utils-selftests.c (format): New function.
2536         (string_vprintf_tests): New function.
2537         (_initialize_common_utils_selftests): Register new tests.
2538         * common/common-utils.c (string_vprintf): New function.
2539         * common/common-utils.h (string_vprintf): Declare.
2540
2541 2017-09-29  Pedro Alves  <palves@redhat.com>
2542
2543         * common/rsp-low.c (unpack_varlen_hex): Constify.
2544         * common/rsp-low.h (unpack_varlen_hex): Constify.
2545         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2546         Constify.
2547         * remote.c (remote_set_permissions, read_ptid)
2548         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2549         (remote_static_tracepoint_marker_at)
2550         (remote_static_tracepoint_markers_by_strid)
2551         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2552         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2553         (parse_tracepoint_definition, parse_tsv_definition)
2554         (parse_static_tracepoint_marker_definition): Constify.
2555         * tracepoint.h (parse_static_tracepoint_marker_definition)
2556         (parse_trace_status, parse_tracepoint_status)
2557         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2558
2559 2017-09-29  Pedro Alves  <palves@redhat.com>
2560
2561         * remote.c (target_buf, target_buf_size): Delete.
2562         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2563         Use the connection's packet buffer instead.
2564         All callers adjusted.
2565         (_initialize_remote): Remove references to target_buf and
2566         target_buf_size.
2567
2568 2017-09-28  Pedro Alves  <palves@redhat.com>
2569
2570         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2571         unittests/common-utils-selftests.c.
2572         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2573         (COMMON_OBS): Remove utils-selftests.o.
2574         * utils-selftests.c: Move to ...
2575         * unittests/common-utils-selftests.c: ... here and rename self
2576         test to "string_printf".
2577
2578 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2579
2580         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2581         having NULL cus or tus.
2582
2583 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2584
2585         * arm-tdep.c: (convert_from_extended): Remove.
2586         (convert_to_extended): Likewise.
2587         (arm_extract_return_value): Use convert_typed_floating.
2588         (arm_store_return_value): Likewise.
2589
2590         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2591         * sh-tdep.c: Do not include "floatformat.h".
2592         (sh_littlebyte_bigword_type): New function.
2593         (sh_register_convert_to_virtual): Use convert_typed_floating.
2594         (sh_register_convert_to_raw): Likewise.
2595         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2596         (sh64_littlebyte_bigword_type): New function.
2597         (sh64_extract_return_value): Use convert_typed_floating.
2598         (sh64_register_convert_to_virtual): Likewise.
2599         (sh64_register_convert_to_raw): Likewise.
2600
2601 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2602
2603         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2604         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2605
2606         * gdbtypes.h (union type_specific): Make field floatformat hold
2607         just a single struct floatformat, not an array.
2608         (floatformat_from_type): Move here.
2609         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2610         changed TYPE_FLOATFORMAT definition.
2611         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2612         (recursive_dump_type): Likewise.
2613         (init_float_type): Install correct floatformat for byte order.
2614         (arch_float_type): Likewise.
2615
2616 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2617
2618         * gdbtypes.c (init_type): Change incoming argument from
2619         length-in-bytes to length-in-bits.  Assert length is a
2620         multiple of TARGET_CHAR_BITS.
2621         (arch_type, arch_flags_type): Likewise.
2622         (init_integer_type): Update call to init_type.
2623         (init_character_type): Likewise.
2624         (init_boolean_type): Likewise.
2625         (init_float_type): Likewise.
2626         (init_decfloat_type): Likewise.
2627         (init_complex_type): Likewise.
2628         (init_pointer_type): Likewise.
2629         (objfile_type): Likewise.
2630         (arch_integer_type): Update call to arch_type.
2631         (arch_character_type): Likewise.
2632         (arch_boolean_type): Likewise.
2633         (arch_float_type): Likewise.
2634         (arch_decfloat_type): Likewise.
2635         (arch_complex_type): Likewise.
2636         (arch_pointer_type): Likewise.
2637         (gdbtypes_post_init): Likewise.
2638
2639         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2640         (read_base_type): Likewise.
2641         * mdebugread.c (basic_type): Likewise.
2642         * stabsread.c (dbx_init_float_type): Likewise.
2643         (rs6000_builtin_type): Likewise.
2644         (read_range_type): Likewise.  Also, fix call to init_integer_type
2645         with erroneous length argument.
2646
2647         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2648         * d-lang.c (build_d_types): Likewise.
2649         * f-lang.c (build_fortran_types): Likewise.
2650         * go-lang.c (build_go_types): Likewise.
2651         * opencl-lang.c (build_opencl_types): Likewise.
2652         * jit.c (finalize_symtab): Likewise.
2653         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2654         (build_std_type_info_type): Likewise.
2655         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2656         update call to arch_flags_type.
2657
2658         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2659         arch_type.
2660         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2661         * windows-tdep.c (windows_get_tlb_type): Likewise.
2662
2663         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2664         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2665         * m32c-tdep.c (make_types): Likewise.
2666         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2667         (rl78_psw_type): Update call to arch_flags_type.
2668         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2669         * rx-tdep.c (rx_psw_type): Likewise.
2670         (rx_fpsw_type): Likewise.
2671         * sparc-tdep.c (sparc_psr_type): Likewise.
2672         (sparc_fsr_type): Likewise.
2673         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2674         (sparc64_ccr_type): Likewise.
2675         (sparc64_fsr_type): Likewise.
2676         (sparc64_fprs_type): Likewise.
2677
2678 2017-09-27  Tom Tromey  <tom@tromey.com>
2679
2680         * findcmd.c (find_command): Constify.
2681
2682 2017-09-27  Tom Tromey  <tom@tromey.com>
2683
2684         * ada-tasks.c (task_command_1, task_command): Constify.
2685
2686 2017-09-27  Tom Tromey  <tom@tromey.com>
2687
2688         * symtab.c (maintenance_print_symbol_cache)
2689         (maintenance_flush_symbol_cache)
2690         (maintenance_print_symbol_cache_statistics): Constify.
2691
2692 2017-09-27  Tom Tromey  <tom@tromey.com>
2693
2694         * inferior.c (detach_inferior_command, kill_inferior_command)
2695         (inferior_command): Constify.
2696
2697 2017-09-27  Tom Tromey  <tom@tromey.com>
2698
2699         * regcache.c (regcache_print, maintenance_print_registers)
2700         (maintenance_print_raw_registers)
2701         (maintenance_print_cooked_registers)
2702         (maintenance_print_register_groups)
2703         (maintenance_print_remote_registers): Constify.
2704
2705 2017-09-27  Tom Tromey  <tom@tromey.com>
2706
2707         * printcmd.c (map_display_numbers, undisplay_command)
2708         (enable_disable_display_command, enable_display_command)
2709         (disable_display_command): Constify.
2710
2711 2017-09-27  Tom Tromey  <tom@tromey.com>
2712
2713         * breakpoint.h (delete_command): Don't declare.
2714         * breakpoint.c (delete_command, enable_once_command)
2715         (enable_count_command, enable_delete_command, breakpoint_1)
2716         (maintenance_info_breakpoints, stopin_command, stopat_command)
2717         (delete_command, delete_trace_command, save_breakpoints)
2718         (save_breakpoints_command, save_tracepoints_command): Constify.
2719
2720 2017-09-27  Tom Tromey  <tom@tromey.com>
2721
2722         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2723         (skip_ws, extract_identifier, macro_define_command)
2724         (macro_undef_command, macro_list_command): Constify.
2725
2726 2017-09-27  Tom Tromey  <tom@tromey.com>
2727
2728         * infcmd.c (environment_info, set_environment_command)
2729         (unset_environment_command, path_info, info_proc_cmd_1)
2730         (info_proc_cmd_mappings, info_proc_cmd_stat)
2731         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2732         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2733
2734 2017-09-27  Tom Tromey  <tom@tromey.com>
2735
2736         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2737         Constify.
2738
2739 2017-09-27  Tom Tromey  <tom@tromey.com>
2740
2741         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2742
2743 2017-09-27  Tom Tromey  <tom@tromey.com>
2744
2745         * demangle.c (demangle_command): Constify.
2746
2747 2017-09-27  Tom Tromey  <tom@tromey.com>
2748
2749         * progspace.c (maintenance_info_program_spaces_command):
2750         Constify.
2751
2752 2017-09-27  Tom Tromey  <tom@tromey.com>
2753
2754         * compile/compile.c (check_raw_argument, compile_file_command)
2755         (compile_code_command, compile_print_command): Constify.
2756
2757 2017-09-27  Tom Tromey  <tom@tromey.com>
2758
2759         * reggroups.c (maintenance_print_reggroups): Constify.
2760
2761 2017-09-27  Tom Tromey  <tom@tromey.com>
2762
2763         * dwarf2read.c (save_gdb_index_command): Constify.
2764
2765 2017-09-27  Tom Tromey  <tom@tromey.com>
2766
2767         * stap-probe.c (info_probes_stap_command): Constify.
2768
2769 2017-09-27  Tom Tromey  <tom@tromey.com>
2770
2771         * fork-child.c (unset_exec_wrapper_command): Constify.
2772
2773 2017-09-27  Tom Tromey  <tom@tromey.com>
2774
2775         * btrace.c (get_uint, get_context_size, no_chunk)
2776         (maint_btrace_packet_history_cmd)
2777         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2778         (maint_info_btrace_cmd): Constify.
2779
2780 2017-09-27  Tom Tromey  <tom@tromey.com>
2781
2782         * reverse.c (delete_bookmark_command): Constify.
2783
2784 2017-09-27  Tom Tromey  <tom@tromey.com>
2785
2786         * remote.c (set_memory_packet_size)
2787         (set_memory_write_packet_size, show_memory_write_packet_size)
2788         (set_memory_read_packet_size, show_memory_read_packet_size)
2789         (compare_sections_command, packet_command, remote_put_command)
2790         (remote_get_command, remote_delete_command): Constify.
2791
2792 2017-09-27  Tom Tromey  <tom@tromey.com>
2793
2794         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2795         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2796         (set_mipsfpu_auto_command): Constify.
2797
2798 2017-09-27  Tom Tromey  <tom@tromey.com>
2799
2800         * cli/cli-cmds.h (cd_command): Constify.
2801         * cli/cli-cmds.c (cd_command): Constify.
2802
2803 2017-09-27  Tom Tromey  <tom@tromey.com>
2804
2805         * thread.c (thread_name_command, thread_find_command): Constify.
2806
2807 2017-09-27  Tom Tromey  <tom@tromey.com>
2808
2809         * probe.c (enable_probes_command, disable_probes_command):
2810         Constify.
2811
2812 2017-09-27  Tom Tromey  <tom@tromey.com>
2813
2814         * symfile.c (symbol_file_command): Constify.
2815         * gdbcore.h (deprecated_file_changed_hook): Constify.
2816         * exec.c (deprecated_file_changed_hook, exec_file_command)
2817         (file_command): Constify.
2818         * defs.h (symbol_file_command): Constify.
2819
2820 2017-09-27  Tom Tromey  <tom@tromey.com>
2821
2822         * remote-fileio.c (set_system_call_allowed)
2823         (show_system_call_allowed): Constify.
2824
2825 2017-09-27  Tom Tromey  <tom@tromey.com>
2826
2827         * tracepoint.c (delete_trace_variable_command)
2828         (tfind_end_command, tfind_start_command, tfind_pc_command)
2829         (tfind_tracepoint_command, tfind_line_command)
2830         (tfind_range_command, tfind_outside_command): Constify.
2831
2832 2017-09-27  Tom Tromey  <tom@tromey.com>
2833
2834         * ax-gdb.c (maint_agent_printf_command, agent_command)
2835         (agent_eval_command): Constify.
2836
2837 2017-09-27  Tom Tromey  <tom@tromey.com>
2838
2839         * tracepoint.c (info_scope_command): Constify.
2840         * python/python.c (gdbpy_decode_line): Constify.
2841         * python/py-breakpoint.c (bppy_init): Constify.
2842         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2843         * location.h: (new_linespec_location)
2844         (string_to_event_location_basic, string_to_event_location):
2845         Constify.
2846         * location.c (new_linespec_location)
2847         (string_to_event_location_basic, string_to_event_location):
2848         Constify.
2849         * linespec.h (decode_line_with_current_source)
2850         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2851         * linespec.c (linespec_lex_to_end)
2852         (decode_line_with_current_source)
2853         (decode_line_with_last_displayed): Constify.
2854         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2855         Constify.
2856         * cli/cli-cmds.c (edit_command, list_command): Constify.
2857         * breakpoint.h (until_break_command, watch_command_wrapper)
2858         (awatch_command_wrapper, rwatch_command_wrapper)
2859         (init_ada_exception_breakpoint): Constify.
2860         * breakpoint.c (break_command_1, dprintf_command)
2861         (break_range_command, watch_command_wrapper)
2862         (rwatch_command_wrapper, awatch_command_wrapper)
2863         (until_break_command, init_ada_exception_breakpoint)
2864         (strace_marker_create_sals_from_location, trace_command)
2865         (ftrace_command, strace_command, struct tracepoint): Constify.
2866         * ax-gdb.c (agent_command_1): Constify.
2867         * ada-lang.c (ada_exception_sal): Constify.
2868
2869 2017-09-27  Tom Tromey  <tom@tromey.com>
2870
2871         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2872         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2873         (get_context_size, no_chunk, get_insn_history_modifiers)
2874         (cmd_record_insn_history, get_call_history_modifiers)
2875         (cmd_record_call_history): Constify.
2876
2877 2017-09-27  Tom Tromey  <tom@tromey.com>
2878
2879         * source.c (show_substitute_path_command)
2880         (unset_substitute_path_command, set_substitute_path_command):
2881         Constify.
2882
2883 2017-09-27  Tom Tromey  <tom@tromey.com>
2884
2885         * typeprint.c (maintenance_print_type): Constify.
2886         * maint.c (maintenance_dump_me, maintenance_demangle)
2887         (maintenance_time_display, maintenance_info_sections)
2888         (maintenance_print_statistics, maintenance_deprecate)
2889         (maintenance_undeprecate): Constify.
2890         (maintenance_do_deprecate): Constify.  Use std::string.
2891         (maintenance_selftest): Constify.
2892         * gdbtypes.h (maintenance_print_type): Constify.
2893
2894 2017-09-27  Tom Tromey  <tom@tromey.com>
2895
2896         * hppa-tdep.c (unwind_command): Constify.
2897
2898 2017-09-27  Tom Tromey  <tom@tromey.com>
2899
2900         * target-descriptions.c (unset_tdesc_filename_cmd)
2901         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2902         Constify.
2903
2904 2017-09-27  Tom Tromey  <tom@tromey.com>
2905
2906         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2907
2908 2017-09-27  Tom Tromey  <tom@tromey.com>
2909
2910         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2911
2912 2017-09-27  Tom Tromey  <tom@tromey.com>
2913
2914         * tui/tui-regs.c (tui_reg_command): Constify.
2915
2916 2017-09-27  Tom Tromey  <tom@tromey.com>
2917
2918         * skip.c (skip_file_command, skip_function_command)
2919         (skip_enable_command, skip_disable_command, skip_delete_command):
2920         Constify.
2921
2922 2017-09-27  Tom Tromey  <tom@tromey.com>
2923
2924         * record-btrace.c (cmd_record_btrace_bts_start)
2925         (cmd_record_btrace_pt_start): Constify.
2926
2927 2017-09-27  Tom Tromey  <tom@tromey.com>
2928
2929         * symmisc.c (maintenance_print_symbols)
2930         (maintenance_print_msymbols, maintenance_print_objfiles)
2931         (maintenance_info_symtabs, maintenance_check_symtabs)
2932         (maintenance_expand_symtabs, maintenance_info_line_tables):
2933         Constify.
2934
2935 2017-09-27  Tom Tromey  <tom@tromey.com>
2936
2937         * top.c (new_ui_command): Constify.
2938
2939 2017-09-27  Tom Tromey  <tom@tromey.com>
2940
2941         * symfile.c (add_symbol_file_command)
2942         (remove_symbol_file_command, list_overlays_command)
2943         (map_overlay_command, unmap_overlay_command)
2944         (overlay_auto_command, overlay_manual_command)
2945         (overlay_off_command, overlay_load_command): Constify.
2946
2947 2017-09-27  Tom Tromey  <tom@tromey.com>
2948
2949         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2950         (info_spu_mailbox_command, info_spu_dma_command)
2951         (info_spu_proxydma_command): Constify.
2952
2953 2017-09-27  Tom Tromey  <tom@tromey.com>
2954
2955         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2956
2957 2017-09-27  Tom Tromey  <tom@tromey.com>
2958
2959         * cli/cli-script.c (user_defined_command): Constify.
2960
2961 2017-09-27  Tom Tromey  <tom@tromey.com>
2962
2963         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2964         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2965         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2966         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2967         (dump_binary_value, append_binary_memory, append_binary_value):
2968         Constify.
2969         (struct dump_context) <func>: Constify.
2970         (add_dump_command): Update.
2971
2972 2017-09-27  Tom Tromey  <tom@tromey.com>
2973
2974         * cli/cli-cmds.c (show_version, show_configuration)
2975         (source_command, show_user): Constify.
2976
2977 2017-09-27  Tom Tromey  <tom@tromey.com>
2978
2979         * target.c (maintenance_print_target_stack): Constify.
2980
2981 2017-09-27  Tom Tromey  <tom@tromey.com>
2982
2983         * interps.c (interpreter_exec_cmd): Constify.
2984
2985 2017-09-27  Tom Tromey  <tom@tromey.com>
2986
2987         * record-full.c (cmd_record_full_restore): Constify.
2988
2989 2017-09-27  Tom Tromey  <tom@tromey.com>
2990
2991         * memattr.c (enable_mem_command, disable_mem_command)
2992         (delete_mem_command): Constify.
2993
2994 2017-09-27  Tom Tromey  <tom@tromey.com>
2995
2996         * value.c (show_convenience): Constify.
2997
2998 2017-09-27  Tom Tromey  <tom@tromey.com>
2999
3000         * gdbcore.h (core_file_command): Update.
3001         * corefile.c (core_file_command): Constify.
3002
3003 2017-09-27  Tom Tromey  <tom@tromey.com>
3004
3005         * user-regs.c (maintenance_print_user_registers): Constify.
3006
3007 2017-09-27  Tom Tromey  <tom@tromey.com>
3008
3009         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3010
3011 2017-09-27  Tom Tromey  <tom@tromey.com>
3012
3013         * cp-support.c (first_component_command): Constify.
3014
3015 2017-09-27  Tom Tromey  <tom@tromey.com>
3016
3017         * psymtab.c (maintenance_print_psymbols)
3018         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3019         Constify.
3020
3021 2017-09-27  Tom Tromey  <tom@tromey.com>
3022
3023         * windows-tdep.c (display_tib): Constify.
3024
3025 2017-09-27  Tom Tromey  <tom@tromey.com>
3026
3027         * linux-fork.c (delete_checkpoint_command)
3028         (detach_checkpoint_command): Constify.
3029
3030 2017-09-27  Tom Tromey  <tom@tromey.com>
3031
3032         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * arc-tdep.c (dump_arc_instruction_command): Constify.
3037
3038 2017-09-27  Tom Tromey  <tom@tromey.com>
3039
3040         * valprint.c (set_radix, show_radix): Constify.
3041
3042 2017-09-27  Tom Tromey  <tom@tromey.com>
3043
3044         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3045
3046 2017-09-27  Tom Tromey  <tom@tromey.com>
3047
3048         * command.h (not_just_help_class_command): Update.
3049         * cli/cli-decode.h (not_just_help_class_command): Update.
3050         * cli/cli-decode.c (not_just_help_class_command): Constify.
3051
3052 2017-09-27  Tom Tromey  <tom@tromey.com>
3053
3054         * gdb_bfd.c (maintenance_info_bfds): Constify.
3055
3056 2017-09-27  Tom Tromey  <tom@tromey.com>
3057
3058         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3059         overloads.
3060         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3061         (do_const_cfunc): New function.
3062         (cmd_cfunc_eq): New overload.
3063         (cli_user_command_p): Check do_const_cfunc.
3064         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3065         const_cfunc.
3066         * command.h (add_cmd): Add const overload and no-function
3067         overload.
3068         (set_cmd_cfunc): Add const overload.
3069         (cmd_const_cfunc_ftype): Declare.
3070         (cmd_cfunc_eq): Add const overload.
3071         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3072         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3073         overload.
3074
3075 2017-09-27  Tom Tromey  <tom@tromey.com>
3076
3077         * macroexp.c (get_next_token_for_substitution): New function.
3078         (substitute_args): Call it.  Check for __VA_OPT__.
3079
3080 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3081             Pedro Alves <palves@redhat.com>
3082
3083         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3084         producer_is_icc_lt_14.
3085         (producer_is_icc_lt_14): New function.
3086         (check_producer): Add code for checking version of ICC.
3087         (producer_is_icc): Move to producer.c.
3088         (read_structure_type): Restrict ICC workaround to ICC<14.
3089         * producer.c: Include selftest.h.
3090         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3091         New functions.
3092         * producer.h (producer_is_icc): New declaration.
3093
3094 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3095
3096         * Makefile.in (SFILES): Add producer.c.
3097         (COMMON_OBS): Add producer.o
3098         * amd64-tdep.c (producer.h): Add new include.
3099         * dwarf2read.c (producer.h): Add new include.
3100         * producer.c: New file.
3101         * producer.h: New file.
3102         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3103         producer.c.
3104         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3105         producer.h.
3106
3107 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3108
3109         * configure.ac: Search ncursesw before ncurses.
3110         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3111         * gdb_curses.h: Include <ncursesw/ncurses.h>
3112         * config.in, configure: Regenerate.
3113
3114 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3115
3116         PR gdb/22185
3117         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3118         obsolete.
3119         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3120         Remove i386sol2 support.
3121         * configure.nat <i386sol2>: Remove.
3122         <sol2-64>: Fold into ...
3123         <sol2>: ... this.
3124         Move common settings to default section.
3125         Add sol-thread.o.
3126         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3127         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3128         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3129         <i[34567]86-*-solaris*>: Remove.
3130         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3131
3132         * configure.ac: Remove wctype in libw check.
3133         (_MSE_INT_H): Don't define on Solaris 7-9.
3134         <solaris*>: Remove libthread_db.so.1 check.
3135         * configure: Regenerate.
3136         * config.in: Regenerate.
3137
3138         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3139         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3140         (gdb_ps_size_t): Remove.
3141         Use base types in users.
3142         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3143
3144         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3145
3146 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3147
3148         PR build/22206
3149         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3150         (adi_is_addr_mapped): Likewise.
3151         (PSR_ICC): Don't redefine.
3152         (PSR_IMPL): Likewise.
3153
3154 2017-09-25  Tom Tromey  <tom@tromey.com>
3155
3156         * regcache.c (regcache::dump): Use string_printf.
3157
3158 2017-09-25  Tom Tromey  <tom@tromey.com>
3159
3160         * regcache.c (class regcache_invalidator): New.
3161         (struct register_to_invalidate): Remove.
3162         (make_cleanup_regcache_invalidate): Remove.
3163         (regcache::raw_write): Use regcache_invalidator.
3164
3165 2017-09-25  Tom Tromey  <tom@tromey.com>
3166
3167         * spu-tdep.c (spu2ppu_sniffer): Update.
3168         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3169         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3170         Remove.
3171         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3172         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3173         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3174         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3175         (frame_pop): Update.
3176
3177 2017-09-25  Tom Tromey  <tom@tromey.com>
3178
3179         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3180         * regcache.h (regcache_xfree): Don't declare.
3181         * regcache.c (regcache_xfree): Remove.
3182         (do_regcache_xfree): Use delete.
3183         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3184         * linux-fork.c (free_fork): Use delete.
3185         (fork_save_infrun_state): Likewise.
3186         * jit.c (jit_dealloc_cache): Use delete.
3187         * infrun.c (discard_infcall_suspend_state): Use delete.
3188
3189 2017-09-25  Tom Tromey  <tom@tromey.com>
3190
3191         * regcache.h (regcache_xmalloc): Don't declare.
3192         (regcache_raw_set_cached_value): Update comment.
3193         * regcache.c (regcache_xmalloc): Remove.
3194         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3195         * jit.c (jit_frame_sniffer): Use new.
3196         * frame.c (frame_save_as_regcache): Use new.
3197
3198 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3199
3200         * NEWS: Advertise support for guarded-storage registers on IBM z.
3201
3202 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3203
3204         * s390-linux-nat.c (have_regset_gs): New static variable.
3205         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3206         control block and guarded-storage broadcast control regsets.
3207         (s390_read_description): Detect whether the target has
3208         guarded-storage support, return appropriate tdesc.
3209         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3210         (features/s390x-gs-linux64.c): Likewise.
3211         (struct gdbarch_tdep) <have_gs>: New field.
3212         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3213         (s390_gsbc_regset): New variables.
3214         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3215         and s390_gsbc_regset, if applicable.
3216         (s390_core_read_description): Check whether core file was from a
3217         target with guarded-storage support; include appropriate regsets.
3218         (s390_gdbarch_init): Add registers for guarded-storage support.
3219         (_initialize_s390_tdep): Initialize new target descriptions that
3220         include registers for guarded-storage support.
3221         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3222         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3223         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3224         (S390_NUM_REGS): Adjust macro definition.
3225         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3226         (tdesc_s390x_gs_linux64): New declarations.
3227
3228 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3229
3230         * features/s390-gs-linux64.xml: New file.
3231         * features/s390-gs.xml: New file.
3232         * features/s390-gsbc.xml: New file.
3233         * features/s390x-gs-linux64.xml: New file.
3234         * features/Makefile (WHICH): Add s390-gs-linux64 and
3235         s390x-gs-linux64.
3236         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3237         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3238         * features/s390-gs-linux64.c: New generated file.
3239         * features/s390x-gs-linux64.c: New file.
3240         * regformats/s390-gs-linux64.dat: New file.
3241         * regformats/s390x-gs-linux64.dat: New file.
3242
3243 2017-09-23  Tom Tromey  <tom@tromey.com>
3244
3245         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3246
3247 2017-09-22  Tom Tromey  <tom@tromey.com>
3248
3249         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3250         type to scoped_restore_tmpl.
3251         <scoped_input_handler>: Initialize m_quit_handler directly.
3252
3253 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3254
3255         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3256         (cd_command): Likewise.  Free "current_directory" before
3257         assigning to it.
3258         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3259         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3260         * top.c (gdb_dirbuf): Remove global declaration.
3261         * top.h (gdb_dirbuf): Likewise.
3262
3263 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3264
3265         * gnulib/aclocal.m4: Regenerate.
3266         * gnulib/config.in: Regenerate.
3267         * gnulib/configure: Regenerate.
3268         * gnulib/import/Makefile.am: Regenerate.
3269         * gnulib/import/Makefile.in: Regenerate.
3270         * gnulib/import/assure.h: New file.
3271         * gnulib/import/at-func.c: Likewise
3272         * gnulib/import/chdir-long.c: New file.
3273         * gnulib/import/chdir-long.h: New file.
3274         * gnulib/import/cloexec.c: New file.
3275         * gnulib/import/cloexec.h: New file.
3276         * gnulib/import/close.c: New file.
3277         * gnulib/import/closedir.c: New file.
3278         * gnulib/import/dirent-private.h: New file.
3279         * gnulib/import/dup-safer.c: New file.
3280         * gnulib/import/dup.c: New file.
3281         * gnulib/import/dup2.c: New file.
3282         * gnulib/import/error.c: New file.
3283         * gnulib/import/error.h: New file.
3284         * gnulib/import/exitfail.c: New file.
3285         * gnulib/import/exitfail.h: New file.
3286         * gnulib/import/fchdir.c: New file.
3287         * gnulib/import/fcntl.c: New file.
3288         * gnulib/import/fcntl.in.h: New file.
3289         * gnulib/import/fd-hook.c: New file.
3290         * gnulib/import/fd-hook.h: New file.
3291         * gnulib/import/fd-safer.c: New file.
3292         * gnulib/import/fdopendir.c: New file.
3293         * gnulib/import/filename.h: New file.
3294         * gnulib/import/filenamecat-lgpl.c: New file.
3295         * gnulib/import/filenamecat.h: New file.
3296         * gnulib/import/fstat.c: New file.
3297         * gnulib/import/fstatat.c: New file.
3298         * gnulib/import/getcwd-lgpl.c: New file.
3299         * gnulib/import/getcwd.c: New file.
3300         * gnulib/import/getdtablesize.c: New file.
3301         * gnulib/import/getlogin_r.c: New file.
3302         * gnulib/import/getprogname.c: New file.
3303         * gnulib/import/getprogname.h: New file.
3304         * gnulib/import/gettext.h: New file.
3305         * gnulib/import/glob-libc.h: New file.
3306         * gnulib/import/glob.c: New file.
3307         * gnulib/import/glob.in.h: New file.
3308         * gnulib/import/intprops.h: New file.
3309         * gnulib/import/m4/chdir-long.m4: New file.
3310         * gnulib/import/m4/close.m4: New file.
3311         * gnulib/import/m4/closedir.m4: New file.
3312         * gnulib/import/m4/d-ino.m4: New file.
3313         * gnulib/import/m4/d-type.m4: New file.
3314         * gnulib/import/m4/dup.m4: New file.
3315         * gnulib/import/m4/dup2.m4: New file.
3316         * gnulib/import/m4/error.m4: New file.
3317         * gnulib/import/m4/fchdir.m4: New file.
3318         * gnulib/import/m4/fcntl.m4: New file.
3319         * gnulib/import/m4/fcntl_h.m4: New file.
3320         * gnulib/import/m4/fdopendir.m4: New file.
3321         * gnulib/import/m4/filenamecat.m4: New file.
3322         * gnulib/import/m4/fstat.m4: New file.
3323         * gnulib/import/m4/fstatat.m4: New file.
3324         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3325         * gnulib/import/m4/getcwd-path-max.m4: New file.
3326         * gnulib/import/m4/getcwd.m4: New file.
3327         * gnulib/import/m4/getdtablesize.m4: New file.
3328         * gnulib/import/m4/getlogin_r.m4: New file.
3329         * gnulib/import/m4/getprogname.m4: New file.
3330         * gnulib/import/m4/glob.m4: New file.
3331         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3332         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3333         * gnulib/import/m4/mempcpy.m4: New file.
3334         * gnulib/import/m4/memrchr.m4: New file.
3335         * gnulib/import/m4/mode_t.m4: New file.
3336         * gnulib/import/m4/msvc-inval.m4: New file.
3337         * gnulib/import/m4/msvc-nothrow.m4: New file.
3338         * gnulib/import/m4/open.m4: New file.
3339         * gnulib/import/m4/openat.m4: New file.
3340         * gnulib/import/m4/opendir.m4: New file.
3341         * gnulib/import/m4/readdir.m4: New file.
3342         * gnulib/import/m4/realloc.m4: New file.
3343         * gnulib/import/m4/rewinddir.m4: New file.
3344         * gnulib/import/m4/save-cwd.m4: New file.
3345         * gnulib/import/m4/strdup.m4: New file.
3346         * gnulib/import/m4/strerror.m4: New file.
3347         * gnulib/import/m4/unistd-safer.m4: New file.
3348         * gnulib/import/mempcpy.c: New file.
3349         * gnulib/import/memrchr.c: New file.
3350         * gnulib/import/msvc-inval.c: New file.
3351         * gnulib/import/msvc-inval.h: New file.
3352         * gnulib/import/msvc-nothrow.c: New file.
3353         * gnulib/import/msvc-nothrow.h: New file.
3354         * gnulib/import/open.c: New file.
3355         * gnulib/import/openat-die.c: New file.
3356         * gnulib/import/openat-priv.h: New file.
3357         * gnulib/import/openat-proc.c: New file.
3358         * gnulib/import/openat.c: New file.
3359         * gnulib/import/openat.h: New file.
3360         * gnulib/import/opendir.c: New file.
3361         * gnulib/import/pipe-safer.c: New file.
3362         * gnulib/import/readdir.c: New file.
3363         * gnulib/import/realloc.c: New file.
3364         * gnulib/import/rewinddir.c: New file.
3365         * gnulib/import/save-cwd.c: New file.
3366         * gnulib/import/save-cwd.h: New file.
3367         * gnulib/import/strdup.c: New file.
3368         * gnulib/import/strerror-override.c: New file.
3369         * gnulib/import/strerror-override.h: New file.
3370         * gnulib/import/strerror.c: New file.
3371         * gnulib/import/unistd--.h: New file.
3372         * gnulib/import/unistd-safer.h: New file.
3373         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3374         "getcwd" and "glob".
3375         * ser-tcp.c: Undefine "close" before redefining it.
3376
3377 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3378
3379         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3380         get rid of res_val.
3381
3382 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3383
3384         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3385         <sol2,sparc>: Likewise.
3386         <sol2-64,i386>: Likewise.
3387
3388         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3389         -Wdeprecated-declarations on *-*-solaris*.
3390         * configure: Regenerate.
3391
3392         * procfs.c: Include "nat/inferior.h".
3393         (procfs_info_proc): Fix typo.
3394
3395 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3396
3397         * remote.c (vector): Include.
3398         (struct private_thread_info): Add field, thread_handle.
3399         (free_private_thread_info): Deallocate storage associated with
3400         thread handle.
3401         (get_private_info_thread): Initialize `thread_handle' field.
3402         (struct thread_item): Add field, thread_handle.
3403         (clear_threads_listing_context): Deallocate storage associated
3404         with thread handle.
3405         (start_thread): Add support for "handle" attribute.
3406         (thread_attributes): Add "handle".
3407         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3408         field.
3409         (remote_update_thread_list): Update thread_handle.
3410         (remote_thread_handle_to_thread_info): New function.
3411         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3412
3413 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3414
3415         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3416         function.
3417         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3418         * python/python-internal.h (thread_object_type): Declare.
3419
3420 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3421
3422         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3423         (target_thread_handle_to_thread_info): Declare.
3424         * target.c (target_thread_handle_to_thread_info): New function.
3425         * target-delegates.c: Regenerate.
3426         * gdbthread.h (find_thread_by_handle): Declare.
3427         * thread.c (find_thread_by_handle): New function.
3428         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3429         function.
3430         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3431
3432 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3433
3434         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3435
3436 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3437
3438         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3439
3440 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3441
3442         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3443         to gdb_target_obs.
3444
3445 2017-09-20  Tom Tromey  <tom@tromey.com>
3446
3447         * breakpoint.c (struct counted_command_line): Remove.
3448         (breakpoint_commands): Update.
3449         (alloc_counted_command_line, incref_counted_command_line)
3450         (decref_counted_command_line, do_cleanup_counted_command_line)
3451         (make_cleanup_decref_counted_command_line): Remove.
3452         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3453         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3454         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3455         (save_breakpoints): Update.
3456         * breakpoint.h (counted_command_line): Now a typedef to
3457         shared_ptr.
3458         (struct breakpoint) <commands>: Now a counted_command_line.
3459         (struct bpstats) <command>: Likewise.
3460
3461 2017-09-20  Tom Tromey  <tom@tromey.com>
3462
3463         * breakpoint.c (struct commands_info, do_map_commands_command):
3464         Remove.
3465         (commands_command_1): Update.
3466         (iterate_over_related_breakpoints): Take a function_view.
3467         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3468         (delete_command): Update.
3469         (map_breakpoint_numbers): Take a function_view.
3470         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3471         (disable_command): Update.
3472         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3473         (enable_command): Update.
3474         (struct disp_data, do_enable_breakpoint_disp)
3475         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3476         (do_map_enable_delete_breakpoint): Remove.
3477         (enable_once_command, enable_count_command, enable_delete_command)
3478         (delete_trace_variable_command): Update.
3479
3480 2017-09-20  Tom Tromey  <tom@tromey.com>
3481
3482         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3483         (bpstat_clear): Use delete.
3484         (bpstats): New constructors.
3485         (bpstat_copy, bpstat_stop_status): Use new.
3486         (dprintf_after_condition_true): Update.
3487         * breakpoint.h (bpstats::bpstats): Add constructors.
3488         (bpstats::~bpstats): Add destructor.
3489
3490 2017-09-20  Pedro Alves  <palves@redhat.com>
3491
3492         * eval.c (make_params): Delete, refactored as ...
3493         (class fake_method): ... this new type's ctor.
3494         (fake_method::~fake_method): New.
3495         (evaluate_subexp_standard): Use 'fake_method'.
3496
3497 2017-09-20  Tom Tromey  <tom@tromey.com>
3498
3499         * windows-nat.c (get_windows_debug_event, windows_wait)
3500         (do_initial_windows_stuff, windows_attach): Update.
3501         * utils.c (vwarning, internal_vproblem): Update.
3502         (ui_unregister_input_event_handler_cleanup)
3503         (prepare_to_handle_input): Remove.
3504         (class scoped_input_handler): New.
3505         (defaulted_query, prompt_for_continue): Update.
3506         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3507         Update.
3508         * top.c (undo_terminal_modifications_before_exit): Update.
3509         * target/target.h (target_terminal_init, target_terminal_inferior)
3510         (target_terminal_ours): Don't declare.
3511         (class target_terminal): New.
3512         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3513         (target_terminal_ours_for_output)
3514         (make_cleanup_restore_target_terminal): Don't declare.
3515         (target_terminal_info): Remove.
3516         * target.c (enum terminal_state, terminal_state): Remove.
3517         (target_terminal::terminal_state): Define.
3518         (target_terminal::init): Rename from target_terminal_init.
3519         (target_terminal::inferior): Rename from
3520         target_terminal_inferior.
3521         (target_terminal::ours): Rename from target_terminal_ours.
3522         (target_terminal::ours_for_output): Rename from
3523         target_terminal_ours_for_output.
3524         (target_terminal::info): New method.
3525         (cleanup_restore_target_terminal)
3526         (make_cleanup_restore_target_terminal): Remove.
3527         * solib.c (handle_solib_event): Update.
3528         * remote.c (remote_serial_quit_handler): Update.
3529         (remote_terminal_inferior, remote_wait_as): Update.
3530         * record-full.c (record_full_wait_1): Update.
3531         * nto-procfs.c (procfs_create_inferior): Update.
3532         * nat/fork-inferior.c (startup_inferior): Update.
3533         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3534         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3535         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3536         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3537         (mi_breakpoint_created, mi_breakpoint_deleted)
3538         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3539         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3540         (mi_user_selected_context_changed, report_initial_inferior):
3541         Update.
3542         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3543         (linux_nat_terminal_inferior): Update.
3544         * infrun.c (follow_fork_inferior)
3545         (handle_vfork_child_exec_or_exit, do_target_resume)
3546         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3547         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3548         Update.
3549         * inflow.c (child_terminal_init, info_terminal_command): Update.
3550         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3551         (attach_command): Update.
3552         * infcall.c (call_thread_fsm_should_stop): Update.
3553         * gnu-nat.c (gnu_attach): Update.
3554         * extension.c (struct active_ext_lang_state)
3555         (restore_active_ext_lang): Update.
3556         * exceptions.c (print_flush): Update.
3557         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3558         (struct quit_handler_cleanup_data, restore_quit_handler)
3559         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3560         Remove.
3561         * cp-support.c (gdb_demangle): Update.
3562         * breakpoint.c (update_inserted_breakpoint_locations)
3563         (insert_breakpoint_locations, handle_jit_event)
3564         (disable_breakpoints_in_unloaded_shlib): Update.
3565         * annotate.c (annotate_breakpoints_invalid)
3566         (annotate_frames_invalid): Update.
3567
3568 2017-09-20  Tom Tromey  <tom@tromey.com>
3569
3570         * main.c (catch_command_errors): Rename from
3571         catch_command_errors_const.
3572         (captured_main_1): Update.
3573
3574 2017-09-20  Pedro Alves  <palves@redhat.com>
3575
3576         * cli/cli-cmds.c (list_command): Use print_sal_location.
3577         (print_sal_location): New function.
3578         (ambiguous_line_spec): Use print_sal_location.
3579         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3580         * symtab.c (find_function_start_sal): Likewise.
3581         * symtab.h (symtab_and_line::symbol): New field.
3582
3583 2017-09-20  Pedro Alves  <palves@redhat.com>
3584
3585         * linespec.c (minsym_found): Handle non-text minsyms.
3586         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3587
3588 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3589
3590         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3591         backslash.
3592
3593 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3594
3595         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3596         vmovups instead vmovaps.
3597         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3598
3599 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3600
3601         * NEWS (Changes since GDB 8.0): Add starti.
3602         * infcmd.c (enum run_break): New.
3603         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3604         case.
3605         (run_command): Use enum run_how.
3606         (start_command): Likewise.
3607         (starti_command): New function.
3608         (RUN_ARGS_HELP): New macro.
3609         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3610         commands.  Add starti command.
3611
3612 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3613
3614         * Makefile.in (monitor.o): Remove the rule.
3615
3616 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3617
3618         * annotate.h (struct annotate_arg_emitter): Use
3619         DISABLE_COPY_AND_ASSIGN.
3620         * common/refcounted-object.h (refcounted_object): Likewise.
3621         * completer.h (struct completion_result): Likewise.
3622         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3623         * filename-seen-cache.h (filename_seen_cache): Likewise.
3624         * gdbcore.h (thread_section_name): Likewise.
3625         * gdb_regex.h (compiled_regex): Likewise.
3626         * gdbthread.h (scoped_restore_current_thread): Likewise.
3627         * inferior.h (scoped_restore_current_inferior): Likewise.
3628         * jit.c (jit_reader): Likewise.
3629         * linespec.h (struct linespec_result): Likewise.
3630         * mi/mi-parse.h (struct mi_parse): Likewise.
3631         * nat/fork-inferior.c (execv_argv): Likewise.
3632         * progspace.h (scoped_restore_current_program_space): Likewise.
3633         * python/python-internal.h (class gdbpy_enter): Likewise.
3634         * regcache.h (regcache): Likewise.
3635         * target-descriptions.c (struct tdesc_reg): Likewise.
3636         (struct tdesc_type): Likewise.
3637         (struct tdesc_feature): Likewise.
3638         * ui-out.h (ui_out_emit_type): Likewise.
3639
3640 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3641
3642         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3643         label abort_expression.
3644
3645 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3646
3647         * common/buffer.c (buffer_xml_printf): Adjust.
3648         * common/xml-utils.c (xml_escape_text): Change return type to
3649         std::string, update code accordingly.
3650         * common/xml-utils.h (xml_escape_text): Change return type to
3651         std::string.
3652         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3653         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3654         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3655         Adjust.
3656
3657 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3658
3659         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3660         (SUBDIR_UNITTESTS_OBS): Add new object file.
3661         * unittests/xml-utils-selftests.c: New file.
3662
3663 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3664
3665         * common/selftest.h (selftest): New struct/interface.
3666         (register_test): Add name parameter, add new overload.
3667         (run_tests): Add filter parameter.
3668         (for_each_selftest_ftype): New typedef.
3669         (for_each_selftest): New declaration.
3670         * common/selftest.c (tests): Change type to
3671         map<string, unique_ptr<selftest>>.
3672         (simple_selftest): New struct.
3673         (register_test): New function.
3674         (register_test): Add name parameter and use it.
3675         (run_tests): Add filter parameter and use it.  Add prints.
3676         Adjust to vector -> map change.
3677         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3678         registering selftests.
3679         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3680         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3681         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3682         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3683         * findvar.c (_initialize_findvar): Likewise.
3684         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3685         * maint.c (maintenance_selftest): Update call to run_tests.
3686         (maintenance_info_selftests): New function.
3687         (_initialize_maint_cmds): Register "maintenance info selftests"
3688         command.  Update "maintenance selftest" doc.
3689         * regcache.c (_initialize_regcache): Add names when registering
3690         selftests.
3691         * rust-exp.y (_initialize_rust_exp): Likewise.
3692         * selftest-arch.c (gdbarch_selftest): New struct.
3693         (gdbarch_tests): Remove.
3694         (register_test_foreach_arch): Add name parameter.  Call
3695         register_test.
3696         (tests_with_arch): Remove, move most content to
3697         gdbarch_selftest::operator().
3698         (_initialize_selftests_foreach_arch): Remove.
3699         * selftest-arch.h (register_test_foreach_arch): Add name
3700         parameter.
3701         (run_tests_with_arch): New declaration.
3702         * utils-selftests.c (_initialize_utils_selftests): Add names
3703         when registering selftests.
3704         * utils.c (_initialize_utils): Likewise.
3705         * unittests/array-view-selftests.c
3706         (_initialize_array_view_selftests): Likewise.
3707         * unittests/environ-selftests.c (_initialize_environ_selftests):
3708         Likewise.
3709         * unittests/function-view-selftests.c
3710         (_initialize_function_view_selftests): Likewise.
3711         * unittests/offset-type-selftests.c
3712         (_initialize_offset_type_selftests): Likewise.
3713         * unittests/optional-selftests.c
3714         (_initialize_optional_selftests): Likewise.
3715         * unittests/scoped_restore-selftests.c
3716         (_initialize_scoped_restore_selftests): Likewise.
3717         * NEWS: Document "maintenance selftest" and "maint info
3718         selftests".
3719
3720 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3721
3722         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3723         scoped_restore.
3724
3725 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3726
3727         * mi/mi-main.c (mi_load_progress): Make uiout variable
3728         a unique_ptr.
3729
3730 2017-09-15  Pedro Alves  <palves@redhat.com>
3731
3732         * compile/compile-c-types.c (convert_enum, convert_int)
3733         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3734
3735 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3736
3737         * dwarf2read.c (copy_string): Remove.
3738         (parse_macro_definition): Replace copy_string with savestring.
3739
3740 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3741
3742         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3743         gdb_target_obs.
3744         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3745         Likewise.
3746         (i[34567]86-*-linux*): Likewise.
3747
3748 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3749
3750         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3751         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3752         <stack>: Change type to std::vector.
3753         <stack_len, stack_allocated>: Remove.
3754         <grow_stack>: Remove.
3755         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3756         (dwarf_expr_context::~dwarf_expr_context): Remove.
3757         (dwarf_expr_context::grow_stack): Remove.
3758         (dwarf_expr_context::push): Adjust.
3759         (dwarf_expr_context::pop): Adjust.
3760         (dwarf_expr_context::fetch): Adjust.
3761         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3762         (dwarf_expr_context::stack_empty_p): Adjust.
3763         (dwarf_expr_context::execute_stack_op): Adjust.
3764
3765 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3766
3767         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3768         return type to bool.
3769         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3770
3771 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3772
3773         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3774         Change type to bool.
3775         (dwarf_stack_value) <in_stack_memory>: Likewise.
3776         (dwarf_expr_context) <push_address>: Change parameter type to
3777         bool.
3778         <fetch_in_stack_memory>: Change return type to bool.
3779         <push>: Change parameter type to bool.
3780         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3781         to bool.
3782         (dwarf_expr_context::push_address): Likewise.
3783         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3784         to bool.
3785         (dwarf_expr_context::execute_stack_op): Adjust.
3786         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3787
3788 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3789
3790         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3791         (struct dwarf_expr_context) <n_pieces>: Remove.
3792         <pieces>: Change type to std::vector.
3793         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3794         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3795         pieces.
3796         (dwarf_expr_context::add_piece): Adjust.
3797         * dwarf2loc.c (struct piece_closure): Initialize fields.
3798         <n_pieces>: Remove.
3799         <pieces>: Change type to std::vector.
3800         (allocate_piece_closure): Adjust, change parameter to
3801         std::vector rvalue and std::move it to piece_closure.
3802         (rw_pieced_value): Adjust.
3803         (check_pieced_synthetic_pointer): Adjust.
3804         (indirect_synthetic_pointer): Adjust.
3805         (coerce_pieced_ref): Adjust.
3806         (free_pieced_value_closure):  Adjust.  Use delete to free
3807         piece_closure.
3808         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3809         to allocate_piece_closure.
3810         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3811
3812 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3813
3814         * probe.h (probe_ops_cp): Remove typedef.
3815         (DEF_VEC_P (probe_ops_cp)): Remove.
3816         (all_probe_ops): Change type to std::vector.
3817         * probe.c (info_probes_for_ops): Adjust to vector change.
3818         (probe_linespec_to_ops): Likewise.
3819         (all_probe_ops): Change type to std::vector.
3820         (_initialize_probe): Adjust to vector change.
3821         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3822         * elfread.c (elf_get_probes): Likewise.
3823         * stap-probe.c (_initialize_stap_probe): Likewise.
3824
3825 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3826
3827         * probe.h (struct bound_probe): Define constructors.
3828         * probe.c (bound_probe_s): Remove typedef.
3829         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3830         (collect_probes): Change return type to std::vector, remove
3831         cleanup.
3832         (compare_probes): Return bool, change parameter type.  Change
3833         semantic to "less than".
3834         (gen_ui_out_table_header_info): Change parameter to std::vector
3835         and update.
3836         (exists_probe_with_pops): Likewise.
3837         (info_probes_for_ops): Update to std::vector change.
3838         (enable_probes_command): Likewise.
3839         (disable_probes_command): Likewise.
3840
3841 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3842
3843         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3844         vec to std::vector.
3845         * probe.c (parse_probes_in_pspace): Update.
3846         (find_probes_in_objfile): Update.
3847         (find_probe_by_pc): Update.
3848         (collect_probes): Update.
3849         (probe_any_get_probes): Update.
3850         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3851         return type to reference to std::vector.
3852         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3853         std::vector and update.
3854         (dtrace_process_dof): Likewise.
3855         (dtrace_get_probes): Likewise.
3856         * elfread.c (elf_get_probes): Change return type to std::vector,
3857         store an std::vector in bfd_data.
3858         (probe_key_free): Update to std::vector.
3859         * stap-probe.c (handle_stap_probe): Change parameter to
3860         std::vector and update.
3861         (stap_get_probes): Likewise.
3862         * symfile-debug.c (debug_sym_get_probes): Change return type to
3863         std::vector and update.
3864
3865 2017-09-11  Tom Tromey  <tom@tromey.com>
3866
3867         * breakpoint.c (program_breakpoint_here_p): Update.
3868         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3869         from make_show_memory_breakpoints_cleanup.  Return a
3870         scoped_restore_tmpl<int>.
3871         (restore_show_memory_breakpoints): Remove.
3872         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3873         * mem-break.c (memory_validate_breakpoint): Update.
3874         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3875         (ia64_memory_remove_breakpoint): Update.
3876         (ia64_breakpoint_from_pc): Update.
3877         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3878         from make_show_memory_breakpoints_cleanup.
3879
3880 2017-09-11  Tom Tromey  <tom@tromey.com>
3881
3882         * d-namespace.c (d_lookup_symbol): Use std::string.
3883         (find_symbol_in_baseclass): Likewise.
3884
3885 2017-09-11  Tom Tromey  <tom@tromey.com>
3886
3887         * ctf.c (ctf_start): Use std::string.
3888
3889 2017-09-11  Tom Tromey  <tom@tromey.com>
3890
3891         * ada-lang.c (is_known_support_routine): Update.
3892         (ada_unhandled_exception_name_addr_from_raise): Update.
3893         * guile/scm-frame.c (gdbscm_frame_name): Update.
3894         * python/py-frame.c (frapy_name): Update.
3895         (frapy_function): Update.
3896         * stack.h (find_frame_funname): Update.
3897         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3898         (print_frame): Update.
3899
3900 2017-09-11  Tom Tromey  <tom@tromey.com>
3901
3902         * findcmd.c (put_bits): Take a gdb::byte_vector.
3903         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3904         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3905         cleanups.
3906         (find_command): Update.
3907
3908 2017-09-11  Tom Tromey  <tom@tromey.com>
3909
3910         * cli/cli-script.c (class scoped_restore_hook_in): New.
3911         (clear_hook_in_cleanup): Remove.
3912         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3913         scoped_restore_hook_in.
3914
3915 2017-09-11  Tom Tromey  <tom@tromey.com>
3916
3917         * cli/cli-script.c (restore_interp): Remove.
3918         (read_command_lines): Use scoped_restore_interp.
3919         * interps.c (scoped_restore_interp::set_temp): Rename from
3920         interp_set_temp.
3921         * interps.h (class scoped_restore_interp): New.
3922         (interp_set_temp): Remove.
3923
3924 2017-09-11  Tom Tromey  <tom@tromey.com>
3925
3926         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3927         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3928         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3929         scoped_restore.
3930         (mi_cmd_break_insert_1): Update.
3931         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3932         scoped_restore.
3933
3934 2017-09-11  Tom Tromey  <tom@tromey.com>
3935
3936         * demangle.c (demangle_command): Update.
3937         * breakpoint.c (disable_command): Update.
3938         (enable_command): Update.
3939         (find_location_by_number): Make "number" const.  Use
3940         get_number_trailer.
3941         * cli/cli-utils.c (extract_arg): Return std::string.
3942         * probe.c (parse_probe_linespec): Update.  Change types.
3943         (collect_probes): Take string arguments.
3944         (parse_probe_linespec): Likewise.
3945         (info_probes_for_ops): Update.
3946         (enable_probes_command): Update.
3947         (disable_probes_command): Update.
3948         * break-catch-sig.c (catch_signal_split_args): Update.
3949         * mi/mi-parse.c (mi_parse): Update.
3950
3951 2017-09-11  Tom Tromey  <tom@tromey.com>
3952
3953         * language.h (language_enum): Make argument const.
3954         * language.c (language_enum): Make argument const.
3955
3956 2017-09-11  Tom Tromey  <tom@tromey.com>
3957
3958         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3959         as function.
3960         (skip_to_space): Rename from skip_to_space_const.
3961         * common/common-utils.c (skip_to_space): New function.
3962         (skip_to_space): Rename from skip_to_space_const.
3963         * cli/cli-utils.h (get_number): Rename from get_number_const.
3964         (extract_arg): Rename from extract_arg_const.
3965         * cli/cli-utils.c (get_number): Rename from get_number_const.
3966         (extract_arg): Rename from extract_arg_const.
3967         (number_or_range_parser::get_number): Use ::get_number.
3968         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3969         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3970         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3971         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3972         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3973         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3974         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3975         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3976
3977 2017-09-11  Tom Tromey  <tom@tromey.com>
3978
3979         * python/python.c (do_start_initialization): Use
3980         py-event-types.def to initialize types.
3981         Define all object type structures.
3982         * python/python-internal.h: Don't declare event initialization
3983         functions.
3984         * python/py-threadevent.c (thread_event_object_type): Don't
3985         define.
3986         * python/py-stopevent.c (stop_event_object_type): Don't define.
3987         * python/py-signalevent.c (signal_event_object_type): Don't
3988         declare or define.
3989         * python/py-newobjfileevent.c (new_objfile_event_object_type)
3990         (clear_objfiles_event_object_type): Don't declare or define.
3991         * python/py-infevents.c (inferior_call_pre_event_object_type)
3992         (inferior_call_post_event_object_type)
3993         (register_changed_event_object_type)
3994         (memory_changed_event_object_type): Don't declare or define.
3995         * python/py-inferior.c (new_thread_event_object_type)
3996         (new_inferior_event_object_type)
3997         (inferior_deleted_event_object_type): Don't declare or define.
3998         * python/py-exitedevent.c (exited_event_object_type): Don't
3999         declare or define.
4000         * python/py-evts.c (gdbpy_initialize_py_events): Use
4001         py-all-events.def.
4002         * python/py-events.h (thread_event_object_type): Don't declare.
4003         (events_object): Use py-all-events.def.
4004         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4005         py-event-types.def.
4006         * python/py-event-types.def: New file.
4007         * python/py-continueevent.c (create_continue_event_object): Don't
4008         declare or define.
4009         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4010         declare or define.
4011         * python/py-all-events.def: New file.
4012
4013 2017-09-11  Tom Tromey  <tom@tromey.com>
4014
4015         * python/py-threadevent.c (create_thread_event_object): Return
4016         gdbpy_ref.
4017         * python/py-stopevent.h (create_stop_event_object)
4018         (create_breakpoint_event_object, create_signal_event_object):
4019         Update.
4020         * python/py-stopevent.c (create_stop_event_object): Return
4021         gdbpy_ref.
4022         (emit_stop_event): Update.
4023         * python/py-signalevent.c (create_signal_event_object): Return
4024         gdbpy_ref.
4025         * python/py-infevents.c (create_inferior_call_event_object):
4026         Update.
4027         * python/py-event.h (create_event_object)
4028         (create_thread_event_object): Update.
4029         * python/py-event.c (create_event_object): Return gdbpy_ref.
4030         * python/py-continueevent.c: Return gdbpy_ref.
4031         * python/py-bpevent.c (create_breakpoint_event_object): Return
4032         gdbpy_ref.
4033
4034 2017-09-11  Tom Tromey  <tom@tromey.com>
4035
4036         PR python/15622:
4037         * NEWS: Add entry.
4038         * python/python.c (do_start_initialization): Initialize new event
4039         types.
4040         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4041         (gdbpy_initialize_inferior_deleted_event)
4042         (gdbpy_initialize_new_thread_event): Declare.
4043         * python/py-threadevent.c (create_thread_event_object): Add option
4044         "thread" parameter.
4045         * python/py-inferior.c (new_thread_event_object_type)
4046         (new_inferior_event_object_type)
4047         (inferior_deleted_event_object_type): Declare.
4048         (python_new_inferior, python_inferior_deleted): New functions.
4049         (add_thread_object): Emit new_thread event.
4050         (gdbpy_initialize_inferior): Attach new functions to corresponding
4051         observers.
4052         (new_thread, new_inferior, inferior_deleted): Define new event
4053         types.
4054         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4055         registries.
4056         * python/py-events.h (events_object) <new_inferior,
4057         inferior_deleted, new_thread>: New fields.
4058         * python/py-event.h (create_thread_event_breakpoint): Add optional
4059         "thread" parameter.
4060
4061 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4062
4063         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4064         check current_ui instead.
4065         (internal_vproblem): Likewise.
4066
4067 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4068
4069         * thread.c (print_thread_info_1): Remove unnecessary calls to
4070         uiout->is_mi_like_p.
4071
4072 2017-09-09  Tom Tromey  <tom@tromey.com>
4073
4074         * namespace.h (add_using_directive): Update.
4075         * namespace.c (add_using_directive): Change type of excludes to
4076         std::vector.
4077         * dwarf2read.c (read_import_statement): Use std::vector.
4078         (read_namespace): Update.
4079         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4080
4081 2017-09-09  Tom Tromey  <tom@tromey.com>
4082
4083         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4084
4085 2017-09-09  Tom Tromey  <tom@tromey.com>
4086
4087         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4088
4089 2017-09-09  Tom Tromey  <tom@tromey.com>
4090
4091         * stack.c (func_command): Use gdb::def_vector.
4092
4093 2017-09-09  Tom Tromey  <tom@tromey.com>
4094
4095         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4096         ui_out_emit_list, ui_out_emit_tuple.
4097         (mi_cmd_var_update): Likewise.
4098
4099 2017-09-09  Tom Tromey  <tom@tromey.com>
4100
4101         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4102         ui_out_redirect_pop.
4103         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4104         ui_out_redirect_pop.
4105         * utils.c (do_ui_out_redirect_pop)
4106         (make_cleanup_ui_out_redirect_pop): Remove.
4107         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4108         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4109         * ui-out.h (ui_out_redirect_pop): New class.
4110
4111 2017-09-09  Tom Tromey  <tom@tromey.com>
4112
4113         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4114         (list_available_thread_groups, mi_cmd_list_thread_groups)
4115         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4116         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4117         Likewise.
4118
4119 2017-09-09  Tom Tromey  <tom@tromey.com>
4120
4121         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4122         ui_out_emit_tuple.
4123
4124 2017-09-09  Tom Tromey  <tom@tromey.com>
4125
4126         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4127         * stack.c (print_frame): Use ui_out_emit_tuple.
4128         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4129         (info_spu_mailbox_command, info_spu_dma_command)
4130         (info_spu_proxydma_command): Likewise.
4131         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4132         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4133         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4134         ui_out_emit_tuple.
4135         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4136
4137 2017-09-09  Tom Tromey  <tom@tromey.com>
4138
4139         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4140         (class ui_out_emit_table): Update comment.
4141         * ui-out.c (do_cleanup_table_end)
4142         (make_cleanup_ui_out_table_begin_end): Remove.
4143         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4144         (info_spu_dma_cmdlist): Likewise.
4145         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4146         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4147         ui_out_emit_table.
4148
4149 2017-09-09  Tom Tromey  <tom@tromey.com>
4150
4151         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4152         ui_out_emit_list, gdb::optional.
4153
4154 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4155
4156         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4157         prototype.
4158         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4159         prototype.
4160         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4161         prototype.
4162         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4163         * ada-exp.y: Remove _initialize_ada_exp prototype.
4164         * ada-lang.c: Remove _initialize_ada_language prototype.
4165         * ada-tasks.c: Remove _initialize_tasks prototype.
4166         * addrmap.c: Remove _initialize_addrmap prototype.
4167         * agent.c: Remove _initialize_agent prototype.
4168         * aix-thread.c: Remove _initialize_aix_thread prototype.
4169         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4170         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4171         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4172         prototype.
4173         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4174         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4175         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4176         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4177         prototype.
4178         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4179         prototype.
4180         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4181         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4182         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4183         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4184         prototype.
4185         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4186         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4187         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4188         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4189         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4190         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4191         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4192         prototype.
4193         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4194         prototype.
4195         * annotate.c: Remove _initialize_annotate prototype.
4196         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4197         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4198         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4199         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4200         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4201         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4202         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4203         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4204         prototype.
4205         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4206         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4207         * auto-load.c: Remove _initialize_auto_load prototype.
4208         * auxv.c: Remove _initialize_auxv prototype.
4209         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4210         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4211         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4212         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4213         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4214         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4215         prototype.
4216         * break-catch-throw.c: Remove _initialize_break_catch_throw
4217         prototype.
4218         * breakpoint.c: Remove _initialize_breakpoint prototype.
4219         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4220         * btrace.c: Remove _initialize_btrace prototype.
4221         * charset.c: Remove _initialize_charset prototype.
4222         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4223         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4224         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4225         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4226         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4227         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4228         * coffread.c: Remove _initialize_coffread prototype.
4229         * compile/compile.c: Remove _initialize_compile prototype.
4230         * complaints.c: Remove _initialize_complaints prototype.
4231         * completer.c: Remove _initialize_completer prototype.
4232         * copying.awk: Remove _initialize_copying prototype.
4233         * copying.c: Regenerate.
4234         * core-regset.c: Remove _initialize_core_regset prototype.
4235         * corefile.c: Remove _initialize_core prototype.
4236         * corelow.c: Remove _initialize_corelow prototype.
4237         * cp-abi.c: Remove _initialize_cp_abi prototype.
4238         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4239         * cp-support.c: Remove _initialize_cp_support prototype.
4240         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4241         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4242         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4243         * ctf.c: Remove _initialize_ctf prototype.
4244         * d-lang.c: Remove _initialize_d_language prototype.
4245         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4246         prototype.
4247         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4248         * dbxread.c: Remove _initialize_dbxread prototype.
4249         * dcache.c: Remove _initialize_dcache prototype.
4250         * demangle.c: Remove _initialize_demangler prototype.
4251         * disasm-selftests.c: Remove _initialize_disasm_selftests
4252         prototype.
4253         * disasm.c: Remove _initialize_disasm prototype.
4254         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4255         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4256         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4257         prototype.
4258         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4259         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4260         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4261         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4262         * elfread.c: Remove _initialize_elfread prototype.
4263         * exec.c: Remove _initialize_exec prototype.
4264         * extension.c: Remove _initialize_extension prototype.
4265         * f-lang.c: Remove _initialize_f_language prototype.
4266         * f-valprint.c: Remove _initialize_f_valprint prototype.
4267         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4268         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4269         * filesystem.c: Remove _initialize_filesystem prototype.
4270         * findcmd.c: Remove _initialize_mem_search prototype.
4271         * fork-child.c: Remove _initialize_fork_child prototype.
4272         * frame-base.c: Remove _initialize_frame_base prototype.
4273         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4274         * frame.c: Remove _initialize_frame prototype.
4275         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4276         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4277         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4278         * gcore.c: Remove _initialize_gcore prototype.
4279         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4280         * gdbarch.c: Regenerate.
4281         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4282         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4283         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4284         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4285         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4286         * go-lang.c: Remove _initialize_go_language prototype.
4287         * go32-nat.c: Remove _initialize_go32_nat prototype.
4288         * guile/guile.c: Remove _initialize_guile prototype.
4289         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4290         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4291         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4292         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4293         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4294         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4295         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4296         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4297         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4298         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4299         prototype.
4300         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4301         prototype.
4302         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4303         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4304         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4305         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4306         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4307         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4308         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4309         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4310         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4311         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4312         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4313         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4314         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4315         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4316         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4317         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4318         prototype.
4319         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4320         prototype.
4321         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4322         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4323         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4324         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4325         * infcall.c: Remove _initialize_infcall prototype.
4326         * infcmd.c: Remove _initialize_infcmd prototype.
4327         * inferior.c: Remove _initialize_inferiors prototype.
4328         * inflow.c: Remove _initialize_inflow prototype.
4329         * infrun.c: Remove _initialize_infrun prototype.
4330         * interps.c: Remove _initialize_interpreter prototype.
4331         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4332         * jit.c: Remove _initialize_jit prototype.
4333         * language.c: Remove _initialize_language prototype.
4334         * linux-fork.c: Remove _initialize_linux_fork prototype.
4335         * linux-nat.c: Remove _initialize_linux_nat prototype.
4336         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4337         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4338         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4339         * m2-lang.c: Remove _initialize_m2_language prototype.
4340         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4341         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4342         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4343         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4344         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4345         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4346         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4347         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4348         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4349         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4350         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4351         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4352         * machoread.c: Remove _initialize_machoread prototype.
4353         * macrocmd.c: Remove _initialize_macrocmd prototype.
4354         * macroscope.c: Remove _initialize_macroscope prototype.
4355         * maint.c: Remove _initialize_maint_cmds prototype.
4356         * mdebugread.c: Remove _initialize_mdebugread prototype.
4357         * memattr.c: Remove _initialize_mem prototype.
4358         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4359         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4360         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4361         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4362         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4363         * microblaze-linux-tdep.c: Remove
4364         _initialize_microblaze_linux_tdep prototype.
4365         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4366         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4367         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4368         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4369         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4370         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4371         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4372         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4373         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4374         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4375         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4376         prototype.
4377         * mipsread.c: Remove _initialize_mipsread prototype.
4378         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4379         prototype.
4380         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4381         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4382         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4383         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4384         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4385         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4386         prototype.
4387         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4388         * nto-procfs.c: Remove _initialize_procfs prototype.
4389         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4390         * objc-lang.c: Remove _initialize_objc_language prototype.
4391         * objfiles.c: Remove _initialize_objfiles prototype.
4392         * observer.c: Remove observer_test_first_notification_function,
4393         observer_test_second_notification_function,
4394         observer_test_third_notification_function, and
4395         _initialize_observer prototypes.
4396         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4397         * osabi.c: Remove _initialize_gdb_osabi prototype.
4398         * osdata.c: Remove _initialize_osdata prototype.
4399         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4400         * parse.c: Remove _initialize_parse prototype.
4401         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4402         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4403         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4404         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4405         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4406         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4407         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4408         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4409         * printcmd.c: Remove _initialize_printcmd prototype.
4410         * probe.c: Remove _initialize_probe prototype.
4411         * proc-api.c: Remove _initialize_proc_api prototype.
4412         * proc-events.c: Remove _initialize_proc_events prototype.
4413         * proc-service.c: Remove _initialize_proc_service prototype.
4414         * procfs.c: Remove _initialize_procfs prototype.
4415         * psymtab.c: Remove _initialize_psymtab prototype.
4416         * python/python.c: Remove _initialize_python prototype.
4417         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4418         * record-btrace.c: Remove _initialize_record_btrace prototype.
4419         * record-full.c: Remove _initialize_record_full prototype.
4420         * record.c: Remove _initialize_record prototype.
4421         * regcache.c: Remove _initialize_regcache prototype.
4422         * reggroups.c: Remove _initialize_reggroup prototype.
4423         * remote-notif.c: Remove _initialize_notif prototype.
4424         * remote-sim.c: Remove _initialize_remote_sim prototype.
4425         * remote.c: Remove _initialize_remote prototype.
4426         * reverse.c: Remove _initialize_reverse prototype.
4427         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4428         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4429         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4430         prototype.
4431         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4432         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4433         * rust-exp.y: Remove _initialize_rust_exp prototype.
4434         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4435         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4436         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4437         * score-tdep.c: Remove _initialize_score_tdep prototype.
4438         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4439         prototype.
4440         * ser-go32.c: Remove _initialize_ser_dos prototype.
4441         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4442         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4443         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4444         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4445         * serial.c: Remove _initialize_serial prototype.
4446         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4447         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4448         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4449         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4450         * skip.c: Remove _initialize_step_skip prototype.
4451         * sol-thread.c: Remove _initialize_sol_thread prototype.
4452         * solib-aix.c: Remove _initialize_solib_aix prototype.
4453         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4454         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4455         * solib-frv.c: Remove _initialize_frv_solib prototype.
4456         * solib-spu.c: Remove _initialize_spu_solib prototype.
4457         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4458         * solib-target.c: Remove _initialize_solib_target prototype.
4459         * solib.c: Remove _initialize_solib prototype.
4460         * source.c: Remove _initialize_source prototype.
4461         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4462         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4463         prototype.
4464         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4465         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4466         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4467         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4468         prototype.
4469         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4470         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4471         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4472         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4473         prototype.
4474         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4475         prototype.
4476         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4477         prototype.
4478         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4479         prototype.
4480         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4481         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4482         prototype.
4483         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4484         prototype.
4485         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4486         prototype.
4487         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4488         prototype.
4489         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4490         prototype.
4491         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4492         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4493         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4494         * stabsread.c: Remove _initialize_stabsread prototype.
4495         * stack.c: Remove _initialize_stack prototype.
4496         * stap-probe.c: Remove _initialize_stap_probe prototype.
4497         * std-regs.c: Remove _initialize_frame_reg prototype.
4498         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4499         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4500         * symfile.c: Remove _initialize_symfile prototype.
4501         * symmisc.c: Remove _initialize_symmisc prototype.
4502         * symtab.c: Remove _initialize_symtab prototype.
4503         * target-dcache.c: Remove _initialize_target_dcache prototype.
4504         * target-descriptions.c: Remove _initialize_target_descriptions
4505         prototype.
4506         * thread.c: Remove _initialize_thread prototype.
4507         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4508         prototype.
4509         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4510         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4511         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4512         prototype.
4513         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4514         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4515         * tracefile.c: Remove _initialize_tracefile prototype.
4516         * tracepoint.c: Remove _initialize_tracepoint prototype.
4517         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4518         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4519         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4520         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4521         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4522         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4523         * tui/tui.c: Remove _initialize_tui prototype.
4524         * typeprint.c: Remove _initialize_typeprint prototype.
4525         * user-regs.c: Remove _initialize_user_regs prototype.
4526         * utils.c: Remove _initialize_utils prototype.
4527         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4528         * valarith.c: Remove _initialize_valarith prototype.
4529         * valops.c: Remove _initialize_valops prototype.
4530         * valprint.c: Remove _initialize_valprint prototype.
4531         * value.c: Remove _initialize_values prototype.
4532         * varobj.c: Remove _initialize_varobj prototype.
4533         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4534         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4535         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4536         * windows-nat.c: Remove _initialize_windows_nat,
4537         _initialize_check_for_gdb_ini, and _initialize_loadable
4538         prototypes.
4539         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4540         * xcoffread.c: Remove _initialize_xcoffread prototype.
4541         * xml-support.c: Remove _initialize_xml_support prototype.
4542         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4543         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4544         prototype.
4545         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4546         prototype.
4547         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4548
4549 2017-09-08  Keith Seitz  <keiths@redhat.com>
4550
4551         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4552         field.
4553
4554 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4555
4556         * f-valprint.c (f_val_print): Remove check for one byte
4557         sized integers. Remove printing of character type.
4558
4559 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4560             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4561             Bernhard Heckel  <bernhard.heckel@intel.com>
4562
4563         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4564         to maintain proper indentation when printing pointers/refs.
4565
4566 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4567
4568         GDB 8.0.1 released.
4569
4570 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4571
4572         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4573
4574 2017-09-05  Tom Tromey  <tom@tromey.com>
4575
4576         * parse.c (funcall_chain): Now a std::vector.
4577         (start_arglist, end_arglist): Simplify.
4578         (free_funcalls): Remove.
4579         (parse_exp_in_context_1): Remove cleanup.
4580
4581 2017-09-05  Tom Tromey  <tom@tromey.com>
4582
4583         * go-exp.y (go_parse): Don't create a cleanup.
4584
4585 2017-09-05  Tom Tromey  <tom@tromey.com>
4586
4587         * d-exp.y (PrimaryExpression): Use std::string.
4588         (d_parse): Don't create a cleanup.
4589
4590 2017-09-05  Tom Tromey  <tom@tromey.com>
4591
4592         * utils.c (do_clear_parser_state): Remove.
4593         (make_cleanup_clear_parser_state): Remove.
4594         * p-exp.y (pascal_parse): Use scoped_restore.
4595         * m2-exp.y (m2_parse): Use scoped_restore.
4596         * f-exp.y (f_parse): Use scoped_restore.
4597         * d-exp.y (d_parse): Use scoped_restore.
4598         * c-exp.y (c_parse): Use scoped_restore.
4599         * ada-exp.y (ada_parse): Use scoped_restore.
4600         * utils.h (make_cleanup_clear_parser_state): Remove.
4601
4602 2017-09-06  Keith Seitz  <keiths@redhat.com>
4603
4604         * dwarf2read.c (dw2_linkage_name_attr): New function.
4605         (dw2_linkage_name): New function.
4606         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4607         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4608         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4609
4610 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4611
4612         * config/djgpp/djconfig.sh: Correct shell portability issue.
4613
4614 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4615
4616         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4617
4618 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4619
4620         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4621         * NEWS: Mention new FreeBSD/mips native configuration.
4622         * configure.host: Add aarch64*-*-freebsd*.
4623         * configure.nat: Likewise.
4624         * aarch64-fbsd-nat.c: New file.
4625
4626 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4627
4628         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4629         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4630         * NEWS: Mention new FreeBSD/aarch64 target.
4631         * configure.tgt: Add aarch64*-*-freebsd*.
4632         * aarch64-fbsd-tdep.c: New file.
4633         * aarch64-fbsd-tdep.h: New file.
4634
4635 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4636
4637         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4638
4639 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4640
4641         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4642         of TLS symbols.
4643
4644 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4645
4646         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4647         call.
4648
4649 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4650
4651         * infrun.c (follow_exec): Call add_thread after
4652         target_find_description.
4653
4654 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4655
4656         * infrun.c (handle_inferior_event_1): When exec'ing, read
4657         stop_pc after follow_exec.
4658
4659 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4660
4661         * remote.c (process_g_packet): Update error message.
4662
4663 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4664
4665         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4666         targets.
4667
4668 2017-09-05  Pedro Alves  <palves@redhat.com>
4669
4670         * eval.c (eval_call, evaluate_funcall): New functions, factored
4671         out from ...
4672         (evaluate_subexp_standard): ... this.
4673
4674 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4675
4676         * amd64-tdep.c (amd64_target_description): Create target
4677         descriptions.
4678         (_initialize_amd64_tdep): Don't call functions
4679         initialize_tdesc_amd64_*.  Add self tests.
4680         * arch/amd64.c (amd64_create_target_description): Add parameter
4681         is_linux.  Call set_tdesc_osabi if is_linux is true.
4682         * arch/amd64.h (amd64_create_target_description): Update the
4683         declaration.
4684         * arch/i386.c (i386_create_target_description): Add parameter
4685         is_linux.  Call set_tdesc_osabi if is_linux is true.
4686         * arch/i386.h (i386_create_target_description): Update
4687         declaration.
4688         * configure.tgt: Add i386.o to gdb_target_obs.
4689         * features/Makefile (XMLTOC): Remove i386/*.xml.
4690         * features/i386/amd64-avx-avx512.c: Remove.
4691         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4692         * features/i386/amd64-avx-mpx.c: Remove.
4693         * features/i386/amd64-avx.c: Remove.
4694         * features/i386/amd64-mpx.c: Remove.
4695         * features/i386/amd64.c: Remove.
4696         * features/i386/i386-avx-avx512.c: Remove.
4697         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4698         * features/i386/i386-avx-mpx.c: Remove.
4699         * features/i386/i386-avx.c: Remove.
4700         * features/i386/i386-mmx.c: Remove.
4701         * features/i386/i386-mpx.c: Remove.
4702         * features/i386/i386.c: Remove.
4703         * i386-tdep.c: Don't include features/i386/i386*.c., include
4704         target-descriptions.h and arch/i386.h.
4705         (i386_target_description): Create target descriptions.
4706         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4707         functions.  Do self tests.
4708
4709 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4710
4711         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4712         * features/i386/amd64-avx-avx512-linux.c: Removed.
4713         * features/i386/amd64-avx-linux.c: Removed.
4714         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4715         * features/i386/amd64-avx-mpx-linux.c: Removed.
4716         * features/i386/amd64-linux.c: Removed.
4717         * features/i386/amd64-mpx-linux.c: Removed.
4718         * features/i386/x32-avx-avx512-linux.c: Removed.
4719         * features/i386/x32-avx-linux.c: Removed.
4720         * features/i386/x32-linux.c: Removed.
4721
4722 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4723
4724         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4725         features/i386/*.c.
4726         (amd64_linux_read_description): Call
4727         amd64_create_target_description.
4728         * arch/amd64.c: New file.
4729         * arch/amd64.h: New file.
4730         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4731         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4732
4733 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4734
4735         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4736         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4737         (amd64_linux_read_description): Create target descriptions.
4738         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4739         functions.  Add unit tests.
4740         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4741         x32-core.xml.
4742         * features/i386/64bit-avx.c: Generated.
4743         * features/i386/64bit-avx512.c: Generated.
4744         * features/i386/64bit-core.c: Generated.
4745         * features/i386/64bit-linux.c: Generated.
4746         * features/i386/64bit-mpx.c: Generated.
4747         * features/i386/64bit-pkeys.c: Generated.
4748         * features/i386/64bit-segments.c: Generated.
4749         * features/i386/64bit-sse.c: Generated.
4750         * features/i386/x32-core.c: Generated.
4751         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4752         c files for amd64-linux and x32-linux.
4753
4754 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4755
4756         * amd64-linux-tdep.c (amd64_linux_read_description): New
4757         function.
4758         (amd64_linux_core_read_description): Call
4759         amd64_linux_read_description.
4760         (amd64_linux_init_abi): Likewise.
4761         (amd64_x32_linux_init_abi): Likewise.
4762         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4763         * x86-linux-nat.c (x86_linux_read_description): Call
4764         amd64_linux_read_description.
4765
4766 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4767
4768         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4769         comments.
4770
4771 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4772
4773         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4774         * features/i386/i386-avx-avx512-linux.c: Remove.
4775         * features/i386/i386-avx-linux.c: Remove.
4776         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4777         * features/i386/i386-avx-mpx-linux.c: Remove.
4778         * features/i386/i386-linux.c: Remove.
4779         * features/i386/i386-mmx-linux.c: Remove.
4780         * features/i386/i386-mpx-linux.c: Remove.
4781
4782 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4783
4784         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4785         (SFILES): Add arch/i386.c.
4786         (HFILES_NO_SRCDIR): Add arch/i386.h.
4787         * arch/i386.c: New file.
4788         * arch/i386.h: New file.
4789         * arch/tdesc.h (allocate_target_description): Declare.
4790         (set_tdesc_architecture): Declare.
4791         (set_tdesc_osabi): Declare.
4792         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4793         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4794         include arch/i386.h.
4795         (i386_linux_read_description): Remove code and call
4796         i386_create_target_description.
4797         (set_tdesc_architecture): New function.
4798         (set_tdesc_osabi): New function.
4799         * target-descriptions.h (allocate_target_description): Remove.
4800
4801 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4802
4803         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4804         * target-descriptions.c (tdesc_create_feature): Likewise, and
4805         adjust code.
4806         * features/i386/32bit-avx.c: Re-generated.
4807         * features/i386/32bit-avx512.c: Re-generated.
4808         * features/i386/32bit-core.c: Re-generated.
4809         * features/i386/32bit-linux.c: Re-generated.
4810         * features/i386/32bit-mpx.c: Re-generated.
4811         * features/i386/32bit-pkeys.c: Re-generated.
4812         * features/i386/32bit-sse.c: Re-generated.
4813
4814 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4815
4816         * regformats/regdef.h (struct reg): Override operator == and !=.
4817
4818 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4819
4820         * arch/tdesc.h: New file.
4821         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4822         * target-descriptions.c: Update comments.
4823         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4824         declarations.
4825         * features/i386/32bit-avx.c: Re-generated.
4826         * features/i386/32bit-avx512.c: Re-generated.
4827         * features/i386/32bit-core.c: Re-generated.
4828         * features/i386/32bit-linux.c: Re-generated.
4829         * features/i386/32bit-mpx.c: Re-generated.
4830         * features/i386/32bit-pkeys.c: Re-generated.
4831         * features/i386/32bit-sse.c: Re-generated.
4832
4833 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4834
4835         * regformats/regdat.sh: Update generated code.
4836
4837 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4838
4839         * regformats/regdat.sh: Adjust code order.
4840
4841 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4842
4843         * expprint.c (dump_subexp_body_standard): Use constant format
4844         string in fprintf_filtered call.
4845
4846 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4847
4848         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4849         NetBSD/i386.
4850         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4851
4852 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4853
4854         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4855
4856 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4857
4858         * bsd-kvm.o: Define _KMEMUSER.
4859         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4860         * configure: Regenerate.
4861
4862 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4863
4864         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4865         * i386-fbsd-nat.c: Likewise.
4866
4867 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4868
4869         * unittests/array-view-selftests.c: Add include of <array>.
4870
4871 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4872
4873         * spu-tdep.c (flush_ea_cache): Add missing argument to
4874         call_function_by_hand.
4875
4876 2017-09-04  Pedro Alves  <palves@redhat.com>
4877
4878         * NEWS (Safer support for debugging with no debug info): New.
4879
4880 2017-09-04  Pedro Alves  <palves@redhat.com>
4881
4882         * c-exp.y (function_method, function_method_void): Add current
4883         instance flags to TYPE_INSTANCE.
4884         * dwarf2read.c (check_modifier): New.
4885         (compute_delayed_physnames): Assert that only C++ adds delayed
4886         physnames.  Mark fn_fields as const/volatile depending on
4887         physname.
4888         * eval.c (make_params): New type_instance_flags parameter.  Use
4889         it as the new type's instance flags.
4890         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4891         flags element and pass it to make_params.
4892         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4893         instance flags element.
4894         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4895         * gdbtypes.h: Include "enum-flags.h".
4896         (type_instance_flags): New enum-flags type.
4897         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4898         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4899         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4900         (follow_type_instance_flags): New function.
4901         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4902         * parser-defs.h (follow_type_instance_flags): Declare.
4903         * valops.c (value_struct_elt_for_reference): const/volatile must
4904         match too.
4905
4906 2017-09-04  Pedro Alves  <palves@redhat.com>
4907
4908         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4909         function/method scopes; lookup the nested name as a function local
4910         static variable.
4911
4912 2017-09-04  Pedro Alves  <palves@redhat.com>
4913
4914         (%type <voidval>): Add function_method.
4915         * c-exp.y (exp): New production for calls with no arguments.
4916         (function_method, function_method_void_or_typelist): New
4917         productions.
4918         (exp): New production for "method()::static_var".
4919         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4920         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4921         Handle OP_FUNC_STATIC_VAR.
4922         * parse.c (operator_length_standard):
4923         Handle OP_FUNC_STATIC_VAR.
4924
4925 2017-09-04  Pedro Alves  <palves@redhat.com>
4926
4927         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4928         handling.
4929         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4930         Ditto.
4931         * parse.c (operator_length_standard, operator_check_standard):
4932         Ditto.
4933         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4934
4935 2017-09-04  Pedro Alves  <palves@redhat.com>
4936
4937         * ax-gdb.c: Include "typeprint.h".
4938         (gen_expr_for_cast): New function.
4939         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4940         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4941         type is unknown.
4942         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4943         nodebug_data_symbol.
4944         * eval.c: Include "typeprint.h".
4945         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4946         Error out if symbol has unknown type.
4947         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4948         evaluate_subexp_for_cast.
4949         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4950         OP_VAR_MSYM_VALUE.
4951         (evaluate_subexp_for_cast): New function.
4952         * gdbtypes.c (init_nodebug_var_type): New function.
4953         (objfile_type): Use it to initialize types of variables with no
4954         debug info.
4955         * typeprint.c (error_unknown_type): New.
4956         * typeprint.h (error_unknown_type): New declaration.
4957         * compile/compile-c-types.c (convert_type_basic): Handle
4958         TYPE_CODE_ERROR; warn and fallback to int for variables with
4959         unknown type.
4960
4961 2017-09-04  Pedro Alves  <palves@redhat.com>
4962
4963         * eval.c (evaluate_var_value): New function, factored out from ...
4964         (evaluate_subexp_standard): ... here.
4965
4966 2017-09-04  Pedro Alves  <palves@redhat.com>
4967
4968         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4969         Remove useless assignments to 'op'.
4970
4971 2017-09-04  Pedro Alves  <palves@redhat.com>
4972
4973         * eval.c (eval_skip_value): New function.
4974         (evaluate_subexp_standard): Use it.
4975
4976 2017-09-04  Pedro Alves  <palves@redhat.com>
4977
4978         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4979         function name from symbol/minsym and pass it to
4980         error_call_unknown_return_type.
4981
4982 2017-09-04  Pedro Alves  <palves@redhat.com>
4983
4984         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4985         * ax-gdb.c (gen_msym_var_ref): New function.
4986         (gen_expr): Handle OP_VAR_MSYM_VALUE.
4987         * eval.c (evaluate_var_msym_value): New function.
4988         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4989         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4990         to call_function_by_hand.
4991         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4992         Handle OP_VAR_MSYM_VALUE.
4993         (union exp_element) <msymbol>: New field.
4994         * minsyms.h (struct type): Forward declare.
4995         (find_minsym_type_and_address): Declare.
4996         * parse.c (write_exp_elt_msym): New function.
4997         (write_exp_msymbol): Delete, refactored as ...
4998         (find_minsym_type_and_address): ... this new function.
4999         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5000         (operator_length_standard, operator_check_standard): Handle
5001         OP_VAR_MSYM_VALUE.
5002         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5003
5004 2017-09-04  Pedro Alves  <palves@redhat.com>
5005
5006         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5007         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5008         unknown.
5009         * ada-typeprint.c (print_func_type): Handle functions with unknown
5010         return type.
5011         * c-typeprint.c (c_type_print_base): Handle functions and methods
5012         with unknown return type.
5013         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5014         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5015         * compile/compile-c-types.c: Include "objfiles.h".
5016         (convert_func): For functions with unknown return type, warn and
5017         default to int.
5018         * compile/compile-object-run.c (compile_object_run): Adjust call
5019         to call_function_by_hand_dummy.
5020         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5021         call_function_by_hand.
5022         * eval.c (evaluate_subexp_standard): Adjust calls to
5023         call_function_by_hand.  Handle functions and methods with unknown
5024         return type.  Pass expect_type to call_function_by_hand.
5025         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5026         return type.
5027         * gcore.c (call_target_sbrk): Adjust call to
5028         call_function_by_hand.
5029         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5030         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5031         an integer address type instead of nodebug.
5032         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5033         call_function_by_hand.
5034         * infcall.c (error_call_unknown_return_type): New function.
5035         (call_function_by_hand): New "default_return_type" parameter.
5036         Pass it down.
5037         (call_function_by_hand_dummy): New "default_return_type"
5038         parameter.  Use it instead of defaulting to int.  If there's no
5039         default and the return type is unknown, throw an error.  If
5040         there's a default return type, and the called function has no
5041         debug info, then assume the function is prototyped.
5042         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5043         New "default_return_type" parameter.
5044         (error_call_unknown_return_type): New declaration.
5045         * linux-fork.c (call_lseek): Cast return type of lseek.
5046         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5047         call_function_by_hand.
5048         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5049         calls to call_function_by_hand.
5050         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5051         return type.
5052         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5053         (value_nsstring, print_object_command): Adjust calls to
5054         call_function_by_hand.
5055         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5056         functions with unknown return type.
5057         (pascal_type_print_func_varspec_suffix): New function.
5058         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5059         TYPE_CODE_METHOD>: Use it.
5060         * python/py-value.c (valpy_call): Adjust call to
5061         call_function_by_hand.
5062         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5063         call_function_by_hand.
5064         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5065         call_function_by_hand.
5066         * valops.c (value_allocate_space_in_inferior): Adjust call to
5067         call_function_by_hand.
5068         * typeprint.c (type_print_unknown_return_type): New function.
5069         * typeprint.h (type_print_unknown_return_type): New declaration.
5070
5071 2017-09-04  Pedro Alves  <palves@redhat.com>
5072
5073         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5074         types with more than one parameter as prototyped.
5075
5076 2017-09-04  Pedro Alves  <palves@redhat.com>
5077
5078         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5079         (disassemble_command): Use gdb_disassembly_flags instead of bare
5080         int.
5081         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5082         (dump_insns, do_mixed_source_and_assembly_deprecated)
5083         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5084         Use gdb_disassembly_flags instead of bare int.
5085         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5086         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5087         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5088         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5089         (enum gdb_disassembly_flag): ... values of this new enumeration.
5090         (gdb_disassembly_flags): Define.
5091         (gdb_disassembly)
5092         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5093         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5094         gdb_disassembly_flags instead of bare int.
5095         * record-btrace.c (btrace_insn_history)
5096         (record_btrace_insn_history, record_btrace_insn_history_range)
5097         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5098         instead of bare int.
5099         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5100         Use gdb_disassembly_flags instead of bare int.
5101         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5102         Define.
5103         * target-delegates.c: Regenerate.
5104         * target.c (target_insn_history, target_insn_history_from)
5105         (target_insn_history_range): Use gdb_disassembly_flags instead of
5106         bare int.
5107         * target.h: Include "disasm.h".
5108         (struct target_ops) <to_insn_history, to_insn_history_from,
5109         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5110         int.
5111         (target_insn_history, target_insn_history_from)
5112         (target_insn_history_range): Use gdb_disassembly_flags instead of
5113         bare int.
5114
5115 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5116
5117         * cli/cli-script.c (build_command_line): For if/while commands,
5118         check whether args is empty.
5119
5120 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5121
5122         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5123         (enum command_control_type): Likewise.
5124         (struct command_line): Likewise.
5125         (free_command_lines): Likewise.
5126         (struct command_lines_deleter): Likewise.
5127         (command_line_up): Likewise.
5128         (read_command_lines): Likewise.
5129         (read_command_lines_1): Likewise.
5130         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5131         (enum command_control_type): Likewise.
5132         (struct command_line): Likewise.
5133         (free_command_lines): Likewise.
5134         (struct command_lines_deleter): Likewise.
5135         (command_line_up): Likewise.
5136         (read_command_lines): Likewise.
5137         (read_command_lines_1): Likewise.
5138         * breakpoint.h: Include cli/cli-script.h.
5139         * extension-priv.h: Likewise.
5140         * gdbcmd.h: Likewise.
5141
5142 2017-09-04  Pedro Alves  <palves@redhat.com>
5143
5144         * ada-lang.c (is_known_support_routine): Move sal declaration to
5145         where it is initialized.
5146         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5147         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5148         (clear_command, update_static_tracepoint): Remove init_sal
5149         references.  Move declarations closer to initializations.
5150         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5151         initializations.
5152         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5153         references.  Move sal declarations closer to initializations.
5154         * frame.c (find_frame_sal): Return a symtab_and_line via function
5155         return instead of output parameter.  Remove init_sal references.
5156         * frame.h (find_frame_sal): Return a symtab_and_line via function
5157         return instead of output parameter.
5158         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5159         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5160         instead of memset.
5161         (gdbscm_find_pc_line): Remove init_sal reference.
5162         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5163         references.  Move declarations closer to initializations.
5164         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5165         initializations.
5166         (finish_backward): Remove init_sal references.  Move declarations
5167         closer to initializations.
5168         * infrun.c (process_event_stop_test, handle_step_into_function)
5169         (insert_hp_step_resume_breakpoint_at_frame)
5170         (insert_step_resume_breakpoint_at_caller): Likewise.
5171         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5172         (symbol_to_sal): Likewise.
5173         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5174         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5175         to its initialization.
5176         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5177         init_sal references.  Move declarations closer to initializations.
5178         * source.c (get_current_source_symtab_and_line): Remove brace
5179         initialization.
5180         (set_current_source_symtab_and_line): Now takes the sal by const
5181         reference.  Remove brace initialization.
5182         (line_info): Remove init_sal reference.
5183         * source.h (set_current_source_symtab_and_line): Now takes a
5184         symtab_and_line via const reference.
5185         * stack.c (set_current_sal_from_frame): Adjust.
5186         (print_frame_info): Adjust.
5187         (get_last_displayed_sal): Return the sal via function return
5188         instead of via output parameter.  Simplify.
5189         (frame_info): Adjust.
5190         * stack.h (get_last_displayed_sal): Return the sal via function
5191         return instead of via output parameter.
5192         * symtab.c (init_sal): Delete.
5193         (find_pc_sect_line): Remove init_sal references.  Move
5194         declarations closer to initializations.
5195         (find_function_start_sal): Remove init_sal references.  Move
5196         declarations closer to initializations.
5197         * symtab.h (struct symtab_and_line): In-class initialize all
5198         fields.
5199         * tracepoint.c (set_traceframe_context)
5200         (print_one_static_tracepoint_marker): Remove init_sal references.
5201         Move declarations closer to initializations.
5202         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5203         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5204         declarations closer to initializations.
5205         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5206         init_sal references.  Adjust.
5207
5208 2017-09-04  Pedro Alves  <palves@redhat.com>
5209
5210         * ax-gdb.c (agent_command_1): Use range-for.
5211         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5212         * breakpoint.c: Include "common/array-view.h".
5213         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5214         parameter from struct symtabs_and_lines to
5215         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5216         (breakpoint_sals_to_pc): Change sals parameter from struct
5217         symtabs_and_lines to std::vector reference.
5218         (check_fast_tracepoint_sals): Change sals parameter from struct
5219         symtabs_and_lines to std::array_view.  Use range-for.
5220         (decode_static_tracepoint_spec): Return a std::vector instead of
5221         symtabs_and_lines.  Update.
5222         (create_breakpoint): Update.
5223         (break_range_command, until_break_command, clear_command): Update.
5224         (base_breakpoint_decode_location, bkpt_decode_location)
5225         (bkpt_probe_create_sals_from_location)
5226         (bkpt_probe_decode_location, tracepoint_decode_location)
5227         (tracepoint_probe_decode_location)
5228         (strace_marker_create_sals_from_location): Return a std::vector
5229         instead of symtabs_and_lines.
5230         (strace_marker_create_breakpoints_sal): Update.
5231         (strace_marker_decode_location): Return a std::vector instead of
5232         symtabs_and_lines.  Update.
5233         (update_breakpoint_locations): Change struct symtabs_and_lines
5234         parameters to gdb::array_view.  Adjust.
5235         (location_to_sals): Return a std::vector instead of
5236         symtabs_and_lines.  Update.
5237         (breakpoint_re_set_default): Use std::vector instead of struct
5238         symtabs_and_lines.
5239         (decode_location_default): Return a std::vector instead of
5240         symtabs_and_lines.  Update.
5241         * breakpoint.h: Include "common/array-view.h".
5242         (struct breakpoint_ops) <decode_location>: Now returns a
5243         std::vector instead of returning a symtabs_and_lines via output
5244         parameter.
5245         (update_breakpoint_locations): Change sals parameters to use
5246         gdb::array_view.
5247         * cli/cli-cmds.c (edit_command, list_command): Update to use
5248         std::vector and gdb::array_view.
5249         (ambiguous_line_spec): Adjust to use gdb::array_view and
5250         range-for.
5251         (compare_symtabs): Rename to ...
5252         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5253         const reference and adjust.
5254         (filter_sals): Rewrite using std::vector and standard algorithms.
5255         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5256         (jump_command): Update to use std::vector.
5257         * linespec.c (struct linespec_state) <canonical_names>: Update
5258         comment.
5259         (add_sal_to_sals_basic): Delete.
5260         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5261         (decode_line_2, create_sals_line_offset)
5262         (convert_address_location_to_sals, convert_linespec_to_sals)
5263         (convert_explicit_location_to_sals, parse_linespec)
5264         (event_location_to_sals, decode_line_full, decode_line_1)
5265         (decode_line_with_current_source)
5266         (decode_line_with_last_displayed, decode_objc)
5267         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5268         (linespec_result::~linespec_result): Adjust to use std::vector
5269         instead of symtabs_and_lines.
5270         * linespec.h (linespec_sals::sals): Now a std::vector.
5271         (struct linespec_result): Use std::vector, bool, and in-class
5272         initialization.
5273         (decode_line_1, decode_line_with_current_source)
5274         (decode_line_with_last_displayed): Return std::vector.
5275         * macrocmd.c (info_macros_command): Use std::vector.
5276         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5277         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5278         std::vector.
5279         * probe.h (parse_probes): Return a std::vector.
5280         * python/python.c (gdbpy_decode_line): Use std::vector and
5281         gdb::array_view.
5282         * source.c (select_source_symtab, line_info): Use std::vector.
5283         * stack.c (func_command): Use std::vector.
5284         * symtab.h (struct symtabs_and_lines): Delete.
5285         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5286
5287 2017-09-04  Pedro Alves  <palves@redhat.com>
5288
5289         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5290         unittests/array-view-selftests.c.
5291         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5292         * common/array-view.h: New file.
5293         * unittests/array-view-selftests.c: New file.
5294
5295 2017-09-04  Pedro Alves  <palves@redhat.com>
5296
5297         * cli/cli-cmds.c (edit_command): Pass message to
5298         ambiguous_line_spec.
5299         (list_command): Pass message to ambiguous_line_spec.  Say
5300         "first"/"last" instead of "start" and "end" to be consistent with
5301         the manual.
5302         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5303         them to print formatted message.
5304
5305 2017-09-04  Pedro Alves  <palves@redhat.com>
5306
5307         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5308         ftrace_update_insns by reference instead of pointer.
5309
5310 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5311
5312         * i386-go32-tdep.c: Include x86-xstate.h.
5313         (i386_go32_init_abi): Call i386_target_description.
5314         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5315         if xcr0 is X86_XSTATE_X87_MASK.
5316         * i386-tdep.h (tdesc_i386): Remove the declaration.
5317         (tdesc_i386_mmx): Likewise.
5318
5319 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5320
5321         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5322         X86_XSTATE_SSE_MASK instead of 0.
5323
5324 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5325
5326         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5327         i386_target_description.
5328         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5329         i386_target_description.
5330         * i386-tdep.c (i386_gdbarch_init): Likewise.
5331
5332 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5333
5334         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5335         (x86_darwin_init_abi_64): Call amd64_target_description.
5336         * amd64-dicos-tdep.c: Likewise.
5337         * amd64-fbsd-nat.c: Likewise.
5338         * amd64-fbsd-tdep.c: Likewise.
5339         * amd64-nbsd-tdep.c: Likewise.
5340         * amd64-obsd-tdep.c: Likewise.
5341         * amd64-sol2-tdep.c: Likewise.
5342         * amd64-windows-tdep.c: Likewise.
5343         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5344
5345 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5346
5347         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5348         (btrace_function) <insn>: Change type to use std::vector.
5349         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5350         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5351         ftrace_update_insns, ftrace_compute_global_level_offset,
5352         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5353         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5354         change to std::vector.
5355         (ftrace_update_insns): Adjust to change to std::vector, change
5356         type of INSN parameter.
5357         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5358         * record-btrace.c (btrace_call_history_insn_range,
5359         btrace_compute_src_line_range,
5360         record_btrace_frame_prev_register): Adjust to change to
5361         std::vector.
5362         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5363         to change to std::vector.
5364
5365 2017-09-03  Tom Tromey  <tom@tromey.com>
5366
5367         * corefile.c (reopen_exec_file): Use std::string.
5368
5369 2017-09-03  Tom Tromey  <tom@tromey.com>
5370
5371         * compile/compile.c (compile_register_name_mangled): Return
5372         std::string.
5373         * compile/compile-loc2c.c (pushf_register_address): Update.
5374         (pushf_register): Update.
5375         * compile/compile-c-types.c (convert_array): Update.
5376         * compile/compile-c-symbols.c (generate_vla_size): Update.
5377         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5378         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5379         (convert_one_symbol): Update.
5380         (generate_c_for_for_one_variable): Update.
5381         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5382         std::string.
5383         (generate_register_struct): Update.
5384         * compile/compile-internal.h (c_get_range_decl_name): Return a
5385         std::string.
5386         (compile_register_name_mangled): Return std::string.
5387
5388 2017-09-03  Tom Tromey  <tom@tromey.com>
5389
5390         * utils.c (perror_string): Return a std::string.
5391         (throw_perror_with_name, perror_warning_with_name): Update.
5392
5393 2017-09-03  Tom Tromey  <tom@tromey.com>
5394
5395         * demangle.c (demangle_command): Use std::string,
5396         unique_xmalloc_ptr.
5397
5398 2017-09-03  Tom Tromey  <tom@tromey.com>
5399
5400         * cli/cli-setshow.c (do_set_command): Use std::string.
5401
5402 2017-09-03  Tom Tromey  <tom@tromey.com>
5403
5404         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5405
5406 2017-09-03  Tom Tromey  <tom@tromey.com>
5407
5408         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5409
5410 2017-09-03  Tom Tromey  <tom@tromey.com>
5411
5412         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5413         gdb::unique_xmalloc_ptr.
5414
5415 2017-09-03  Tom Tromey  <tom@tromey.com>
5416
5417         * thread.c (print_thread_info_1): Use string_printf.
5418         (thread_apply_command, thread_apply_all_command): Use
5419         std::string.
5420
5421 2017-09-03  Tom Tromey  <tom@tromey.com>
5422
5423         * valprint.c (val_print_string): Update.
5424         * gdbcore.h (memory_error_message): Return std::string.
5425         * corefile.c (memory_error_message): Return std::string.
5426         (memory_error): Update.
5427         * breakpoint.c (insert_bp_location): Update.
5428
5429 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5430
5431         * target/waitstatus.h (target_waitstatus_to_string): Change
5432         return type to std::string.
5433         * target/waitstatus.c (target_waitstatus_to_string): Return
5434         std::string.
5435         * target.h (target_waitstatus_to_string): Remove declaration.
5436         * infrun.c (resume, clear_proceed_status_thread,
5437         print_target_wait_results, do_target_wait, save_waitstatus,
5438         stop_all_threads): Adjust.
5439         * record-btrace.c (record_btrace_wait): Adjust.
5440         * target-debug.h
5441         (target_debug_print_struct_target_waitstatus_p): Adjust.
5442
5443 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5444
5445         PR gdb/22046
5446         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5447         detection.
5448
5449 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5450
5451         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5452         for setting/unsetting environment variables on the remote target.
5453         (New remote packets): Add entries for QEnvironmentHexEncoded,
5454         QEnvironmentUnset and QEnvironmentReset.
5455         * common/environ.c (gdb_environ::operator=): Extend method to
5456         handle m_user_set_env_list and m_user_unset_env_list.
5457         (gdb_environ::clear): Likewise.
5458         (match_var_in_string): Change type of first parameter from 'char
5459         *' to 'const char *'.
5460         (gdb_environ::set): Extend method to handle
5461         m_user_set_env_list and m_user_unset_env_list.
5462         (gdb_environ::unset): Likewise.
5463         (gdb_environ::clear_user_set_env): New method.
5464         (gdb_environ::user_set_envp): Likewise.
5465         (gdb_environ::user_unset_envp): Likewise.
5466         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5467         m_user_unset_env_list on move constructor/assignment.
5468         (unset): Add new default parameter 'update_unset_list = true'.
5469         (clear_user_set_env): New method.
5470         (user_set_envp): Likewise.
5471         (user_unset_envp): Likewise.
5472         (m_user_set_env_list): New std::set.
5473         (m_user_unset_env_list): Likewise.
5474         * common/rsp-low.c (hex2str): New function.
5475         (bin2hex): New overload for bin2hex function.
5476         * common/rsp-low.c (hex2str): New prototype.
5477         (str2hex): New overload prototype.
5478         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5479         QEnvironmentUnset and QEnvironmentReset.
5480         (remote_protocol_features): Add QEnvironmentHexEncoded,
5481         QEnvironmentUnset and QEnvironmentReset packets.
5482         (send_environment_packet): New function.
5483         (extended_remote_environment_support): Likewise.
5484         (extended_remote_create_inferior): Call
5485         extended_remote_environment_support.
5486         (_initialize_remote): Add QEnvironmentHexEncoded,
5487         QEnvironmentUnset and QEnvironmentReset packet configs.
5488         * unittests/environ-selftests.c (gdb_selftest_env_var):
5489         New variable.
5490         (test_vector_initialization): New function.
5491         (test_init_from_host_environ): Likewise.
5492         (test_reinit_from_host_environ): Likewise.
5493         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5494         Likewise.
5495         (test_unset_set_empty_vector): Likewise.
5496         (test_vector_clear): Likewise.
5497         (test_std_move): Likewise.
5498         (test_move_constructor):
5499         (test_self_move): Likewise.
5500         (test_set_unset_reset): Likewise.
5501         (run_tests): Rewrite in terms of the functions above.
5502
5503 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5504
5505         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5506         (adi_available): Use a temp variable of type CORE_ADDR as argument
5507         3 when calling target_auxv_search.
5508         (adi_normalize_address): Use masks and xor operators to calculate
5509         normalized address.
5510         (adi_read_versions, adi_write_versions, adi_print_versions)
5511         (do_examine, do_assign): Use paddress.
5512
5513 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5514
5515         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5516         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5517         out of loop and add supply of FIR.
5518         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5519         add collect of FIR.
5520
5521 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5522
5523         PR gdb/21827
5524         * cli/cli-script.c (define_command): Don't convert command name
5525         to lower case.
5526
5527 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5528
5529         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5530         Update all callers accordingly. Remove all code blocks handling
5531         the case where DISPP is not NULL.
5532
5533 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5534
5535         PR symtab/22003
5536         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5537         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5538         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5539
5540 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5541
5542         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5543         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5544         (read_comp_units_from_section): New parameter abbrev_section, use
5545         read_and_check_comp_unit_head, allocate signatured_type if needed.
5546         (create_all_comp_units): Update read_comp_units_from_section caller.
5547
5548 2017-08-23  Pedro Alves  <palves@redhat.com>
5549
5550         PR remote/21852
5551         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5552         to null_ptid and switch to thread without reading the registers
5553         after adding the inferior.
5554
5555 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5556
5557         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5558         compile-gcc.
5559         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5560         (compile_to_object): Implement compile_gcc.
5561         (_initialize_compile): Install "set compile-gcc".  Initialize
5562         compile_gcc.
5563
5564 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5565
5566         * compile/compile.c (compile_to_object): Conditionally call
5567         set_verbose.  Conditionally call compile or compile_v0.
5568
5569 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5570
5571         * sparc64-tdep.h: (adi_normalize_address): New export.
5572         * sparc-nat.h: (open_adi_tag_fd): New export.
5573         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5574         * sparc64-linux-tdep.c:
5575         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5576         (sparc64_linux_handle_segmentation_fault): New function.
5577         (sparc64_linux_init_abi): Register
5578         sparc64_linux_handle_segmentation_fault
5579         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5580         (sparc64_addr_bits_remove): New function.
5581         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5582         (MAX_PROC_NAME_SIZE): New macro.
5583         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5584         (sparc64adilist): New variable.
5585         (adi_proc_list): New variable.
5586         (find_adi_info): New function.
5587         (add_adi_info): New function.
5588         (get_adi_info_proc): New function.
5589         (get_adi_info): New function.
5590         (info_adi_command): New function.
5591         (read_maps_entry): New function.
5592         (adi_available): New function.
5593         (adi_normalize_address): New function.
5594         (adi_align_address): New function.
5595         (adi_convert_byte_count): New function.
5596         (adi_tag_fd): New function.
5597         (adi_is_addr_mapped): New function.
5598         (adi_read_versions): New function.
5599         (adi_write_versions): New function.
5600         (adi_print_versions): New function.
5601         (do_examine): New function.
5602         (do_assign): New function.
5603         (adi_examine_command): New function.
5604         (adi_assign_command): New function.
5605         (_initialize_sparc64_adi_tdep): New function.
5606
5607 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5608
5609         * breakpoint.c (breakpoints_info): Rename to ...
5610         (info_breakpoints_command): ... this.
5611         (watchpoints_info): Rename to ...
5612         (info_watchpoints_command): ... this.
5613         (tracepoints_info): Rename to ...
5614         (info_tracepoints_command): ... this.
5615         (_initialize_breakpoint): Adjust.
5616         * dcache.c (dcache_info): Rename to ...
5617         (info_display_command): ... this.
5618         (_initialize_dcache): Adjust.
5619         * frame.h (args_info): Rename to ...
5620         (info_args_command): ... this.
5621         (locals_info): Rename to ...
5622         (info_locals_command): ... this.
5623         * infcmd.c (nofp_registers_info): Rename to ...
5624         (info_registers_command): ... this.
5625         (float_info): Rename to ...
5626         (info_float_command): ... this.
5627         (program_info): Rename to ...
5628         (info_program_command): ... this.
5629         (all_registers_info): Rename to ...
5630         (info_all_registers_command): ... this.
5631         (vector_info): Rename to ...
5632         (info_vector_command): ... this.
5633         (float_info): Rename to ...
5634         (info_float_command): ... this.
5635         (_initialize_infcmd): Adjust.
5636         * inferior.h (term_info): Rename to ...
5637         (info_terminal_command): ... this.
5638         * inflow.c (term_info): Rename to ...
5639         (info_terminal_command): ... this.
5640         (_initialize_inflow): Adjust.
5641         * infrun.c (signals_info): Rename to ...
5642         (info_signals_command): ... this.
5643         (_initialize_infrun): Adjust.
5644         * objc-lang.c (classes_info): Rename to ...
5645         (info_classes_command): ... this.
5646         (selectors_info): Rename to ...
5647         (info_selectors_command): ... this.
5648         (_initialize_objc_language): Adjust.
5649         * printcmd.c (sym_info): Rename to ...
5650         (info_symbol_command): ... this.
5651         (address_info): Rename to ...
5652         (info_address_command): ... this.
5653         (display_info): Rename to ...
5654         (info_display_command): ... this.
5655         (_initialize_printcmd): Adjust.
5656         * reverse.c (bookmarks_info): Rename to ...
5657         (info_breakpoints_command): ... this.
5658         (_initialize_reverse): Adjust.
5659         * ser-go32.c (dos_info): Rename to ...
5660         (info_serial_command): ... this.
5661         (_initialize_ser_dos): Adjust.
5662         * skip.c (skip_info): Rename to ...
5663         (info_skip_command): ... this.
5664         (_initialize_step_skip): Adjust.
5665         * source.c (line_info): Rename to ...
5666         (info_line_command): ... this.
5667         (source_info): Rename to ...
5668         (info_source_command)
5669         * stack.c (frame_info): Rename to ...
5670         (info_frame_command): ... this.
5671         (locals_info): Rename to ...
5672         (info_locals_command): ... this.
5673         (args_info): Rename to ...
5674         (info_args_command): ... this.
5675         (_initialize_stack): Adjust.
5676         * symtab.c (sources_info): Rename to ...
5677         (info_sources_command): ... this.
5678         (variables_info): Rename to ...
5679         (info_variables_command): ... this.
5680         (functions_info): Rename to ...
5681         (info_functions_command): ... this.
5682         (types_info): Rename to ...
5683         (info_types_command): ... this.
5684         (_initialize_symtab): Adjust.
5685         * target.c (target_info): Rename to ...
5686         (info_target_command): ... this.
5687         (initialize_targets): Adjust.
5688         * tracepoint.c (tvariables_info): Rename to ...
5689         (info_tvariables_command): ... this.
5690         (scope_info): Rename to ...
5691         (info_scope_command): ... this.
5692         (trace_dump_actions): Adjust.
5693         (_initialize_tracepoint): Adjust.
5694
5695 2017-08-22  Tom Tromey  <tom@tromey.com>
5696
5697         * breakpoint.h (install_breakpoint): Update.
5698         * breakpoint.c (add_solib_catchpoint): Update.
5699         (install_breakpoint): Change argument to a std::unique_ptr.
5700         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5701         (create_breakpoint_sal, create_breakpoint): Update.
5702         (watch_command_1, catch_exec_command_1)
5703         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5704         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5705         Return the breakpoint.
5706         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5707         (new_single_step_breakpoint): Update.
5708         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5709         std::unique_ptr.
5710         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5711         std::unique_ptr.
5712         * break-catch-sig.c (create_signal_catchpoint): Use
5713         std::unique_ptr.
5714         * ada-lang.c (create_ada_exception_catchpoint): Use
5715         std::unique_ptr.
5716
5717 2017-08-22  Tom Tromey  <tom@tromey.com>
5718
5719         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5720
5721 2017-08-22  Tom Tromey  <tom@tromey.com>
5722
5723         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5724         (lookup_partial_symbol): Update.
5725
5726 2017-08-22  Tom Tromey  <tom@tromey.com>
5727
5728         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5729         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5730         (find_and_open_source, symtab_to_fullname): Update.
5731         * psymtab.c (psymtab_to_fullname): Update.
5732
5733 2017-08-22  Tom Tromey  <tom@tromey.com>
5734
5735         * exec.c (exec_file_attach): Update.
5736         * linux-thread-db.c (try_thread_db_load): Update.
5737         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5738         * utils.c (gdb_realpath): Change return type.
5739         (gdb_realpath_keepfile): Update.
5740         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5741         (_initialize_utils): Register the new self test.
5742         * source.c (openp): Update.
5743         (find_and_open_source): Update.
5744         * nto-tdep.c (nto_find_and_open_solib): Update.
5745         * main.c (set_gdb_data_directory): Update.
5746         (captured_main_1): Update.
5747         * dwarf2read.c (dwarf2_get_dwz_file): Update
5748         (dw2_map_symbol_filenames): Update.
5749         * auto-load.c (auto_load_safe_path_vec_update): Update.
5750         (filename_is_in_auto_load_safe_path_vec): Change type of
5751         "filename_realp".
5752         (auto_load_objfile_script): Update.
5753         (file_is_auto_load_safe): Update.  Use std::string.
5754         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5755
5756 2017-08-22  Tom Tromey  <tom@tromey.com>
5757
5758         * utils.c (gdb_realpath_keepfile): Return a
5759         gdb::unique_xmalloc_ptr.
5760         * exec.c (exec_file_attach): Update.
5761         * utils.h (gdb_realpath_keepfile): Return a
5762         gdb::unique_xmalloc_ptr.
5763
5764 2017-08-22  Tom Tromey  <tom@tromey.com>
5765
5766         * compile/compile.c (compile_file_command): Use
5767         gdb::unique_xmalloc_ptr, std::string.
5768         * utils.c (gdb_abspath): Change return type.
5769         * source.c (openp): Update.
5770         * objfiles.c (allocate_objfile): Update.
5771         * main.c (set_gdb_data_directory): Update.
5772         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5773
5774 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5775
5776         * cli-cmds.c (list_commands): List actual code around more than
5777         one location.
5778
5779 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5780
5781         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5782
5783 2017-08-21  Pedro Alves  <palves@redhat.com>
5784
5785         PR gdb/19487
5786         * c-exp.y (variable production): Handle function aliases.
5787         * minsyms.c (msymbol_is_text): New function.
5788         * minsyms.h (msymbol_is_text): Declare.
5789         * symtab.c (find_function_alias_target): New function.
5790         * symtab.h (find_function_alias_target): Declare.
5791
5792 2017-08-21  Pedro Alves  <palves@redhat.com>
5793
5794         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5795         typedefs.
5796         * typeprint.c (whatis_exp): If handling "whatis", and expression
5797         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5798         typedefs here.
5799         * valops.c (value_cast): Save "to" type before resolving
5800         stubs/typedefs.  Use that type as resulting value's type.
5801
5802 2017-08-18  Tom Tromey  <tom@tromey.com>
5803             Pedro Alves  <palves@redhat.com>
5804
5805         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5806         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5807         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5808         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5809         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5810         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5811         (linux_get_siginfo_data): Add "thread" argument.  Use
5812         scoped_restore.
5813         * linux-nat.c (linux_child_follow_fork)
5814         (check_stopped_by_watchpoint): Use scoped_restore.
5815         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5816         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5817         (restore_inferior_ptid, save_inferior_ptid): Remove.
5818         * btrace.c (btrace_fetch): Use scoped_restore.
5819         * bsd-uthread.c (bsd_uthread_fetch_registers)
5820         (bsd_uthread_store_registers): Use scoped_restore.
5821         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5822         scoped_restore.
5823         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5824         (aix_thread_xfer_partial): Use scoped_restore.
5825         * inferior.h (save_inferior_ptid): Remove.
5826
5827 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5828
5829         PR tdep/21818
5830         * arm-tdep.c (gdb_print_insn_arm): Mark
5831         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5832
5833 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5834
5835         * NEWS: Mention GDBserver's new option "--selftest".
5836         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5837         * selftest.c: Move it to common/selftest.c.
5838         * selftest.h: Move it to common/selftest.h.
5839         * selftest-arch.c (reset): New function.
5840         (tests_with_arch): Call reset.
5841
5842 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5843
5844         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5845         instead of exception_fprintf and printf_filtered.
5846
5847 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5848
5849         * selftest.c (register_self_test): Rename it to
5850         selftests::register_test.
5851         (run_self_tests): selftest::run_tests.
5852         * selftest.h: Update declarations.
5853         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5854         selftests::register_test_foreach_arch.
5855         * selftest-arch.h: Update declaration.
5856         * aarch64-tdep.c: Update.
5857         * arm-tdep.c: Likewise.
5858         * disasm-selftests.c: Likewise.
5859         * dwarf2loc.c: Likewise.
5860         * dwarf2-frame.c: Likewise.
5861         * findvar.c: Likewise.
5862         * gdbarch-selftests.c: Likewise.
5863         * maint.c (maintenance_selftest): Likewise.
5864         * regcache.c: Likewise.
5865         * rust-exp.y: Likewise.
5866         * selftest-arch.c: Likewise.
5867         * unittests/environ-selftests.c: Likewise.
5868         * unittests/function-view-selftests.c: Likewise.
5869         * unittests/offset-type-selftests.c: Likewise.
5870         * unittests/optional-selftests.c: Likewise.
5871         * unittests/scoped_restore-selftests.c: Likewise.
5872         * utils-selftests.c: Likewise.
5873
5874 2017-08-17  Pedro Alves  <palves@redhat.com>
5875
5876         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5877         local.
5878
5879 2017-08-17  Pedro Alves  <palves@redhat.com>
5880
5881         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5882         field.
5883         (reset_die_in_process): Delete, replaced by ...
5884         (process_die_scope): ... this new class.  Make it responsible for
5885         freeing cu->line_header too.
5886         (process_die): Use process_die_scope.
5887         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5888         cu->line_header_die_owner.  Don't release the line header if it's
5889         owned by the CU.
5890         (setup_type_unit_groups): Make the CU/DIE own the line header.
5891         Don't release the line header here.
5892
5893 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5894
5895         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5896
5897 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5898
5899         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5900         Single-Key mode
5901
5902 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5903
5904         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5905         mode command list.
5906
5907 2017-08-15  Stafford Horne  <shorne@gmail.com>
5908
5909         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5910
5911 2017-08-15  Stafford Horne  <shorne@gmail.com>
5912
5913         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5914
5915 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5916
5917         PR gdb/21954
5918         * infcmd.c (unset_environment_command): Use the 'clear' method on
5919         the environment instead of resetting it.
5920
5921 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5922
5923         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5924         platforms.
5925
5926 2017-08-14  Tom Tromey  <tom@tromey.com>
5927
5928         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5929         (print_binary_chars): Likewise.
5930         (BITS_IN_BYTES): Remove.
5931
5932 2017-08-14  Tom Tromey  <tom@tromey.com>
5933
5934         PR gdb/21675
5935         * valprint.c (LOW_ZERO): Change value to 034.
5936         (print_octal_chars): Add static_asserts for octal constants.
5937         * printcmd.c (print_scalar_formatted): Add 'd' case.
5938
5939 2017-08-11  Tom Tromey  <tom@tromey.com>
5940
5941         * symfile.c (add_symbol_file_command): Use std::vector.
5942
5943 2017-08-14  Tom Tromey  <tom@tromey.com>
5944
5945         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5946         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5947         std::move.
5948         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5949
5950 2017-08-11  Pedro Alves  <palves@redhat.com>
5951
5952         * infrun.c (process_event_stop_test): Adjust
5953         function_name_is_marked_for_skip call.
5954         * skip.c: Include <list>.
5955         (skiplist_entry): Make it a class with private fields, and
5956         getters/setters.
5957         (skiplist_entry_chain): Delete.
5958         (skiplist_entries): New.
5959         (skiplist_entry_count): Delete.
5960         (highest_skiplist_entry_num): New.
5961         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5962         (add_skiplist_entry): Delete.
5963         (skiplist_entry::skiplist_entry): New.
5964         (skiplist_entry::add_entry): New.
5965         (skip_file_command, skip_function): Adjust.
5966         (compile_skip_regexp): Delete.
5967         (skip_command): Don't compile regexp here.  Adjust to use
5968         skiplist_entry::add_entry.
5969         (skip_info): Adjust to use range-for and getters.
5970         (skip_enable_command, skip_disable_command): Adjust to use
5971         range-for and setters.
5972         (skip_delete_command): Adjust to use std::list.
5973         (add_skiplist_entry): Delete.
5974         (skip_file_p): Delete, refactored as ...
5975         (skiplist_entry::do_skip_file_p): ... this new method.
5976         (skip_gfile_p): Delete, refactored as ...
5977         (skiplist_entry::do_gskip_file_p): ... this new method.
5978         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5979         (skiplist_entry::skip_function_p): ... this new method.
5980         (function_name_is_marked_for_skip): Now returns bool, and takes
5981         the function sal by const reference.  Adjust to use range-for and
5982         skiplist_entry methods.
5983         (_initialize_step_skip): Remove references to
5984         skiplist_entry_chain, skiplist_entry_count.
5985         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5986         takes the function sal by const reference.
5987
5988 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5989
5990         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5991         (dwarf2_frame_cache): Remove reset_cache_cleanup.
5992         (dwarf2_frame_cache):
5993         * frame-unwind.c (frame_unwind_try_unwinder): Catch
5994         RETURN_MASK_ALL and set *this_case to NULL.
5995         * frame-unwind.h: Update comments.
5996
5997 2017-08-11  Yao Qi  <yao.qi@linaro.org>
5998
5999         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6000         (dwarf2_frame_state_copy_regs): Remove.
6001         (dwarf2_frame_state_free_regs): Remove.
6002         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6003         (dwarf2_restore_rule): Call method .alloc_regs instead of
6004         dwarf2_frame_state_alloc_regs.
6005         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6006         constructor.  Call std::move.
6007         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6008         (dwarf2_frame_cache): Likewise.
6009
6010         [GDB_SELF_TEST]: Include selftest.h and
6011         selftest-arch.h.
6012         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6013         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6014         execute_cfa_program_test.
6015
6016         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6017         copy ctor, assignment operator, move assignment.
6018         <alloc_regs>: New method.
6019         <swap>: New method.
6020         (struct dwarf2_frame_state): Delete dtor.
6021         (dwarf2_frame_state_alloc_regs): Remove declaration.
6022         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6023         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6024
6025 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6026
6027         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6028         (dwarf2_frame_state::dwarf2_frame_state): New.
6029         (dwarf2_frame_state::~dwarf2_frame_state): New.
6030         (dwarf2_fetch_cfa_info): Update.
6031         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6032         rather than a pointer.  Update code.
6033         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6034         dtor.
6035         <data_align, code_align, retaddr_column>: Change them to const.
6036         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6037         to bool.
6038
6039 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6040
6041         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6042         <loc.exp>: New field.
6043         * dwarf2-frame.c (execute_cfa_program): Update.
6044         (dwarf2_frame_prev_register): Update.
6045
6046 2017-08-10  Pedro Alves  <palves@redhat.com>
6047
6048         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6049
6050 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6051
6052         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6053         (fbsd_pending_children): Use std::list.
6054         (fbsd_remember_child): Likewise.
6055         (fbsd_is_child_pending): Likewise.
6056         (fbsd_pending_vfork_done): Use std::forward_list.
6057         (fbsd_add_vfork_done): Likewise.
6058         (fbsd_is_vfork_done_pending): Likewise.
6059         (fbsd_next_vfork_done): Likewise.
6060
6061 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6062
6063         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6064         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6065         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6066         for `mapfilename'.
6067         (fbsd_xfer_partial): Use gdb::byte_vector.
6068         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6069
6070 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6071
6072         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6073         "filestuff.h".
6074         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6075
6076 2017-08-09  Tom Tromey  <tom@tromey.com>
6077
6078         * skip.c (skiplist_entry): New constructor.
6079         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6080         (skiplist_entry::file_is_glob): Now bool.
6081         (skiplist_entry::file, skiplist_entry::function): Now
6082         std::string.
6083         (make_skip_entry): Return a unique_ptr.  Use new.
6084         (free_skiplist_entry, free_skiplist_entry_cleanup)
6085         (make_free_skiplist_entry_cleanup): Remove.
6086         (skip_command, skip_disable_command, add_skiplist_entry)
6087         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6088         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6089         (function_name_is_marked_for_skip): Update.
6090         (skip_delete_command): Update.  Use delete.
6091
6092 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6093
6094         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6095         (aarch64_linux_core_read_description): New function.
6096         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6097
6098 2017-08-09  Pedro Alves  <palves@redhat.com>
6099
6100         * cp-name-parser.y (cp_comp_to_string): Return a
6101         gdb::unique_xmalloc_ptr<char>.
6102         * cp-support.c (replace_typedefs_qualified_name)
6103         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6104         (cp_canonicalize_string_full): Use op= instead of explicit
6105         convertion.
6106         (cp_class_name_from_physname, method_name_from_physname)
6107         (cp_func_name, cp_remove_params): Adjust to use
6108         gdb::unique_xmalloc_ptr<char>.
6109         * cp-support.h (cp_comp_to_string): Return a
6110         gdb::unique_xmalloc_ptr<char>.
6111         * python/py-type.c (typy_lookup_type): Adjust to use
6112         gdb::unique_xmalloc_ptr<char>.
6113
6114 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6115
6116         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6117
6118 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6119             Yao Qi  <yao.qi@linaro.org>
6120
6121         * cp-support.c (cp_canonicalize_string_full): Use
6122         gdb::unique_xmalloc_ptr<char>.
6123         (cp_canonicalize_string): Likewise.
6124
6125 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6126
6127         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6128         * regformats/i386/amd64-avx-avx512.dat: Remove.
6129         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6130         * regformats/i386/amd64-avx-mpx.dat:Remove.
6131         * regformats/i386/amd64-avx.dat: Remove.
6132         * regformats/i386/amd64-mpx.dat: Remove.
6133         * regformats/i386/i386-avx-avx512.dat: Remove.
6134         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6135         * regformats/i386/i386-avx-mpx.dat: Remove.
6136         * regformats/i386/i386-mmx.dat: Remove.
6137         * regformats/i386/i386-mpx.dat: Remove.
6138
6139 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6140
6141         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6142         * amd64-tdep.c: Don't include features/i386/x32*.c.
6143         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6144         functions.
6145         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6146         and i386/x32-avx-avx512.
6147         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6148         and i386/x32.xml.
6149         * features/i386/x32-avx-avx512.c: Removed.
6150         * features/i386/x32-avx-avx512.xml: Removed.
6151         * features/i386/x32-avx.c: Removed.
6152         * features/i386/x32-avx.xml: Removed.
6153         * features/i386/x32.c: Removed.
6154         * features/i386/x32.xml: Removed.
6155         * regformats/i386/x32-avx-avx512.dat: Removed.
6156         * regformats/i386/x32-avx.dat: Removed.
6157         * regformats/i386/x32.dat: Removed.
6158
6159 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6160
6161         PR breakpoints/21886
6162         * mem-break.c (default_memory_insert_breakpoint): Use
6163         `->placed_address' rather than `->reqstd_address' for the
6164         breakpoint location.
6165
6166 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6167
6168         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6169         assertions.
6170
6171 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6172
6173         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6174         a union of `tdep_info', `tdesc_data' and `id'.
6175         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6176         rather than `info.tdep_info'.
6177         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6178         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6179         * i386-tdep.c (i386_gdbarch_init): Likewise.
6180         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6181         * mips-tdep.c (mips_gdbarch_init): Likewise.
6182         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6183         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6184         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6185         `info.tdep_info'.
6186         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6187         `info.tdep_info'.
6188         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6189         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6190         `info.tdep_info'.
6191         * spu-tdep.c (spu_gdbarch_init): Likewise.
6192         * gdbarch.h: Regenerate.
6193
6194 2017-08-07  Leszek Swirski  <leszeks@google.com>
6195
6196         PR symtab/20899
6197         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6198
6199 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6200
6201         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6202         (gdbsim_open): Rename gdb_argv args object to argv.
6203
6204 2017-08-05  Tom Tromey  <tom@tromey.com>
6205
6206         * compile/compile-object-load.c (compile_object_load): Use
6207         gdb::unique_xmalloc_ptr.
6208         * cli/cli-dump.c (scan_filename): Rename from
6209         scan_filename_with_cleanup.  Change return type.
6210         (scan_expression): Rename from scan_expression_with_cleanup.
6211         Change return type.
6212         (dump_memory_to_file, dump_value_to_file, restore_command):
6213         Use gdb::unique_xmalloc_ptr.  Update.
6214         * cli/cli-cmds.c (find_and_open_script): Use
6215         gdb::unique_xmalloc_ptr.
6216         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6217         * symmisc.c (maintenance_print_symbols)
6218         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6219         * symfile.c (symfile_bfd_open, generic_load)
6220         (add_symbol_file_command, remove_symbol_file_command): Use
6221         gdb::unique_xmalloc_ptr.
6222         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6223         * psymtab.c (maintenance_print_psymbols): Use
6224         gdb::unique_xmalloc_ptr.
6225         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6226         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6227         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6228         (reload_shared_libraries_1): Likewise.
6229
6230 2017-08-05  Tom Tromey  <tom@tromey.com>
6231
6232         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6233         (rust_op_vector, rust_set_vector): New typedefs.
6234         (current_parser): New global.
6235         (work_obstack): Change to pointer type.  Update all users.
6236         (rust_ast, pstate): Remove globals.
6237         (struct rust_parser): New.
6238         (%union) <params, field_inits>: Change type.
6239         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6240         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6241         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6242         (convert_params_to_types, convert_params_to_expression): Change
6243         type of "params".
6244         (ast_string): Change type of "fields".
6245         (rust_parse): Make a rust_parser.  Remove cleanups.
6246         (rust_lex_tests): Make and install an auto_obstack.
6247
6248 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6249
6250         * configure.srv (ipa_x32_linux_regobj): New.
6251         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6252         instead of X86_TDESC_AVX512.
6253         (initialize_low_tracepoint): Call
6254         init_registers_x32_avx_avx512_linux.
6255
6256 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6257
6258         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6259
6260 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6261
6262         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6263
6264 2017-08-03  Tom Tromey  <tom@tromey.com>
6265
6266         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6267         Remove.
6268         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6269
6270 2017-08-03  Tom Tromey  <tom@tromey.com>
6271
6272         * python/py-param.c (compute_enum_values): Use gdb_argv.
6273
6274 2017-08-03  Tom Tromey  <tom@tromey.com>
6275
6276         * utils.h (struct gdb_argv_deleter): New.
6277         (gdb_argv): New class.
6278         * utils.c (gdb_argv::reset): New method.
6279         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6280         * tracefile.c (tsave_command): Use gdb_argv.
6281         * top.c (new_ui_command): Use gdb_argv.
6282         * symmisc.c (maintenance_print_symbols)
6283         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6284         * symfile.c (symbol_file_command, generic_load)
6285         (remove_symbol_file_command): Use gdb_argv.
6286         * stack.c (backtrace_command): Use gdb_argv.
6287         * source.c (add_path, show_substitute_path_command)
6288         (unset_substitute_path_command, set_substitute_path_command):
6289         Use gdb_argv.
6290         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6291         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6292         * remote.c (extended_remote_run, remote_put_command)
6293         (remote_get_command, remote_delete_command): Use gdb_argv.
6294         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6295         (gdbsim_open): Use gdb_argv.
6296         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6297         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6298         * procfs.c (procfs_info_proc): Use gdb_argv.
6299         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6300         * infrun.c (handle_command): Use gdb_argv.
6301         * inferior.c (add_inferior_command, clone_inferior_command):
6302         Use gdb_argv.
6303         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6304         * exec.c (exec_file_command): Use gdb_argv.
6305         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6306         * compile/compile.c (build_argc_argv): Use gdb_argv.
6307
6308 2017-08-03  Tom Tromey  <tom@tromey.com>
6309
6310         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6311
6312 2017-08-03  Tom Tromey  <tom@tromey.com>
6313
6314         * python/python.c (compute_python_string): Return std::string.
6315         (gdbpy_eval_from_control_command): Update.
6316         (do_start_initialization): Use std::string.
6317         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6318         xstrprintf.
6319         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6320         xstrprintf.
6321
6322 2017-08-03  Tom Tromey  <tom@tromey.com>
6323
6324         * top.h (do_restore_instream_cleanup): Remove.
6325         * top.c (do_restore_instream_cleanup): Remove.
6326         (read_command_file): Use scoped_restore.
6327         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6328
6329 2017-08-03  Tom Tromey  <tom@tromey.com>
6330
6331         * cli/cli-script.c (execute_user_command)
6332         (execute_control_command): Use scoped_restore.
6333
6334 2017-08-03  Tom Tromey  <tom@tromey.com>
6335
6336         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6337         (execute_user_command): Remove user_call_depth; use
6338         user_args_stack's size instead.
6339
6340 2017-08-03  Tom Tromey  <tom@tromey.com>
6341
6342         * top.h (in_user_command): Remove.
6343         * top.c (in_user_command): Remove.
6344         * cli/cli-script.c (do_restore_user_call_depth)
6345         (execute_user_command): Update.
6346
6347 2017-08-03  Tom Tromey  <tom@tromey.com>
6348
6349         * valops.c (search_struct_method): Use gdb::byte_vector.
6350         * valarith.c (value_concat): Use std::vector.
6351         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6352         (simple_search_memory): Likewise.
6353         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6354         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6355         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6356         * elfread.c (elf_rel_plt_read): Use std::string.
6357         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6358         * cli/cli-dump.c (restore_section_callback): Use
6359         gdb::byte_vector.
6360
6361 2017-08-03  Tom Tromey  <tom@tromey.com>
6362
6363         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6364
6365 2017-08-03  Tom Tromey  <tom@tromey.com>
6366
6367         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6368         (tui_register_format): Use scoped_restore.
6369
6370 2017-08-03  Tom Tromey  <tom@tromey.com>
6371
6372         * reverse.c (exec_direction_default): Remove.
6373         (exec_reverse_once): Use scoped_restore.
6374         * remote.c (restore_remote_timeout): Remove.
6375         (remote_flash_erase, remote_flash_write, remote_flash_done)
6376         (readchar, remote_serial_write): Use scoped_restore.
6377         * cli/cli-script.c (struct source_cleanup_lines_args)
6378         (source_cleanup_lines): Remove.
6379         (script_from_file): Use scoped_restore.
6380         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6381         (source_command): Use scoped_restore.
6382
6383 2017-08-03  Tom Tromey  <tom@tromey.com>
6384
6385         * utils.h (make_cleanup_free_so): Remove.
6386         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6387         * solist.h (struct so_deleter): New.
6388         (so_list_up): New typedef.
6389         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6390
6391 2017-08-03  Tom Tromey  <tom@tromey.com>
6392
6393         * utils.h (make_cleanup_restore_current_language): Remove.
6394         * utils.c (do_restore_current_language)
6395         (make_cleanup_restore_current_language): Remove.
6396         * parse.c (parse_exp_in_context_1)
6397         (parse_expression_with_language): Use
6398         scoped_restore_current_language.
6399         * mi/mi-main.c (mi_cmd_execute): Use
6400         scoped_restore_current_language.
6401         * language.h (scoped_restore_current_language): New class.
6402
6403 2017-08-03  Tom Tromey  <tom@tromey.com>
6404
6405         * compile/compile.c (cleanup_unlink_file): Remove.
6406         (compile_to_object): Use gdb::unlinker.
6407         (eval_compile_command): Likewise.
6408
6409 2017-08-03  Tom Tromey  <tom@tromey.com>
6410
6411         * utils.h (make_cleanup_fclose): Remove.
6412         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6413
6414 2017-08-03  Tom Tromey  <tom@tromey.com>
6415
6416         * top.c (open_terminal_stream): Return gdb_file_up.
6417         (new_ui_command): Update.
6418
6419 2017-08-03  Tom Tromey  <tom@tromey.com>
6420
6421         * source.c (print_source_lines_base, forward_search_command)
6422         (reverse_search_command): Use gdb_file_up.
6423
6424 2017-08-03  Tom Tromey  <tom@tromey.com>
6425
6426         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6427
6428 2017-08-03  Tom Tromey  <tom@tromey.com>
6429
6430         * cli/cli-cmds.c (find_and_open_script): Change return type.
6431         Remove "streamp" and "full_path" parameters.
6432         (source_script_with_search): Update.
6433         * auto-load.c (source_script_file): Update.
6434         * cli/cli-cmds.h (find_and_open_script): Change type.
6435         (open_script): New struct.
6436
6437 2017-08-03  Tom Tromey  <tom@tromey.com>
6438
6439         * xml-support.c (xml_fetch_content_from_file): Update.
6440         * ui-file.c (stdio_file::open): Update.
6441         * tracefile-tfile.c (tfile_start): Update.
6442         * remote.c (remote_file_put, remote_file_get): Update.
6443         * nat/linux-procfs.c (linux_proc_get_int)
6444         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6445         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6446         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6447         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6448         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6449         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6450         * linux-nat.c (linux_proc_pending_signals): Update.
6451         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6452         (file_closer): Remove.
6453         * compile/compile.c (compile_to_object): Update.
6454         * common/filestuff.h (struct gdb_file_deleter): New.
6455         (gdb_file_up): New typedef.
6456         (gdb_fopen_cloexec): Change return type.
6457         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6458         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6459         (dump_binary_file, restore_binary_file): Update.
6460         * auto-load.c (auto_load_objfile_script_1): Update.
6461
6462 2017-08-03  Tom Tromey  <tom@tromey.com>
6463
6464         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6465         (info_static_tracepoint_markers_command): Likewise.
6466         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6467         * skip.c (skip_info): Use ui_out_emit_table.
6468         * progspace.c (print_program_space): Use ui_out_emit_table.
6469         * osdata.c (info_osdata): Use ui_out_emit_table.
6470         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6471         ui_out_emit_table.
6472         * linux-thread-db.c (info_auto_load_libthread_db): Use
6473         ui_out_emit_table.
6474         * inferior.c (print_inferior): Use ui_out_emit_table.
6475         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6476         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6477         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6478         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6479         * ui-out.h (class ui_out_emit_table): New.
6480
6481 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6482
6483         * mips-tdep.c (mips_fpu_type_str): New function.
6484         (mips_dump_tdep): Call it.
6485
6486 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6487
6488         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6489         `->mips_fpu_type'.
6490
6491 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6492
6493         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6494
6495 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6496
6497         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6498
6499 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6500
6501         * cli/cli-cmds.c (maintenancechecklist): New variable.
6502         * gdbcmd.h (maintenancechecklist): Declare it.
6503         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6504         Call i386_linux_read_description with different masks.
6505         * maint.c (maintenance_check_command): New function.
6506         (_initialize_maint_cmds): Call add_prefix_cmd.
6507         * target-descriptions.c (tdesc_reg): override operator != and ==.
6508         (tdesc_type): Likewise.
6509         (tdesc_feature): Likewise.
6510         (target_desc): Likewise.
6511         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6512         (maintenance_check_xml_descriptions): New function.
6513         (_initialize_target_descriptions) Add command "xml-descriptions".
6514         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6515
6516 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6517
6518         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6519         Include features/i386/32bit-*.c.
6520         (i386_linux_read_description): Generate target description if it
6521         doesn't exist.
6522         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6523         functions.
6524         * features/i386/32bit-linux.c: Re-generated.
6525         * features/i386/32bit-sse.c: Likewise.
6526         * target-descriptions.c (print_c_feature::visit): Print code to
6527         set register number if needed.
6528         (print_c_feature) <m_next_regnum>: New field.
6529
6530 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6531
6532         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6533         (FEATURE_XMLFILES): New.
6534         (FEATURE_CFILES): New.
6535         New rules.
6536         (clean-cfiles): Remove generated c files.
6537         * features/i386/32bit-avx.c: Generated.
6538         * features/i386/32bit-avx512.c: Generated.
6539         * features/i386/32bit-core.c: Generated.
6540         * features/i386/32bit-linux.c: Generated.
6541         * features/i386/32bit-mpx.c: Generated.
6542         * features/i386/32bit-pkeys.c: Generated.
6543         * features/i386/32bit-sse.c: Generated.
6544         * target-descriptions.c: Include algorithm.
6545         (tdesc_element_visitor): Add method visit_end.
6546         (print_c_tdesc): Implement visit_end.
6547         (print_c_tdesc:: m_filename_after_features): Move it to
6548         protected.
6549         (print_c_feature): New class.
6550         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6551         name starts with "i386/32bit-".
6552
6553 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6554
6555         * target-descriptions.c (tdesc_element_visitor): New class.
6556         (tdesc_element): New class.
6557         (tdesc_reg): Inherit from tdesc_element.
6558         (tdesc_reg::accept): New function.
6559         (tdesc_type): Inherit from tdesc_element.
6560         (tdesc_type::accept): New function.
6561         (tdesc_feature): Inherit from tdesc_element.
6562         (tdesc_feature::accept): New function.
6563         (target_desc): Inherit from tdesc_element.
6564         (target_desc::target_desc): New.
6565         (target_desc::~target_desc): New.
6566         (target_desc::accept): New.
6567         (allocate_target_description): Use new.
6568         (free_target_description): Use delete.
6569         (print_c_tdesc): New class.
6570         (maint_print_c_tdesc_cmd): Adjust.
6571
6572         * features/aarch64.c: Re-generated.
6573         * features/arc-arcompact.c: Re-generated.
6574         * features/arc-v2.c: Re-generated.
6575         * features/arm/arm-with-iwmmxt.c: Re-generated.
6576         * features/arm/arm-with-m.c: Re-generated.
6577         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6578         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6579         * features/arm/arm-with-neon.c: Re-generated.
6580         * features/arm/arm-with-vfpv2.c: Re-generated.
6581         * features/arm/arm-with-vfpv3.c: Re-generated.
6582         * features/i386/amd64-avx-avx512.c: Re-generated.
6583         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6584         * features/i386/amd64-avx.c: Re-generated.
6585         * features/i386/amd64-avx-linux.c: Re-generated.
6586         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6587         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6588         * features/i386/amd64-avx-mpx.c: Re-generated.
6589         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6590         * features/i386/amd64.c: Re-generated.
6591         * features/i386/amd64-linux.c: Re-generated.
6592         * features/i386/amd64-mpx.c: Re-generated.
6593         * features/i386/amd64-mpx-linux.c: Re-generated.
6594         * features/i386/i386-avx-avx512.c: Re-generated.
6595         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6596         * features/i386/i386-avx.c: Re-generated.
6597         * features/i386/i386-avx-linux.c: Re-generated.
6598         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6599         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6600         * features/i386/i386-avx-mpx.c: Re-generated.
6601         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6602         * features/i386/i386.c: Re-generated.
6603         * features/i386/i386-linux.c: Re-generated.
6604         * features/i386/i386-mmx.c: Re-generated.
6605         * features/i386/i386-mmx-linux.c: Re-generated.
6606         * features/i386/i386-mpx.c: Re-generated.
6607         * features/i386/i386-mpx-linux.c: Re-generated.
6608         * features/i386/x32-avx-avx512.c: Re-generated.
6609         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6610         * features/i386/x32-avx.c: Re-generated.
6611         * features/i386/x32-avx-linux.c: Re-generated.
6612         * features/i386/x32.c: Re-generated.
6613         * features/i386/x32-linux.c: Re-generated.
6614         * features/microblaze.c: Re-generated.
6615         * features/microblaze-with-stack-protect.c: Re-generated.
6616         * features/mips64-dsp-linux.c: Re-generated.
6617         * features/mips64-linux.c: Re-generated.
6618         * features/mips-dsp-linux.c: Re-generated.
6619         * features/mips-linux.c: Re-generated.
6620         * features/nds32.c: Re-generated.
6621         * features/nios2.c: Re-generated.
6622         * features/nios2-linux.c: Re-generated.
6623         * features/rs6000/powerpc-32.c: Re-generated.
6624         * features/rs6000/powerpc-32l.c: Re-generated.
6625         * features/rs6000/powerpc-403.c: Re-generated.
6626         * features/rs6000/powerpc-403gc.c : Re-generated.
6627         * features/rs6000/powerpc-405.c: Re-generated.
6628         * features/rs6000/powerpc-505.c: Re-generated.
6629         * features/rs6000/powerpc-601.c: Re-generated.
6630         * features/rs6000/powerpc-602.c: Re-generated.
6631         * features/rs6000/powerpc-603.c: Re-generated.
6632         * features/rs6000/powerpc-604.c: Re-generated.
6633         * features/rs6000/powerpc-64.c: Re-generated.
6634         * features/rs6000/powerpc-64l.c: Re-generated.
6635         * features/rs6000/powerpc-7400.c: Re-generated.
6636         * features/rs6000/powerpc-750.c: Re-generated.
6637         * features/rs6000/powerpc-860.c: Re-generated.
6638         * features/rs6000/powerpc-altivec32.c: Re-generated.
6639         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6640         * features/rs6000/powerpc-altivec64.c: Re-generated.
6641         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6642         * features/rs6000/powerpc-cell32l.c: Re-generated.
6643         * features/rs6000/powerpc-cell64l.c: Re-generated.
6644         * features/rs6000/powerpc-e500.c: Re-generated.
6645         * features/rs6000/powerpc-e500l.c: Re-generated.
6646         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6647         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6648         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6649         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6650         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6651         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6652         * features/rs6000/powerpc-vsx32.c: Re-generated.
6653         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6654         * features/rs6000/powerpc-vsx64.c: Re-generated.
6655         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6656         * features/rs6000/rs6000.c: Re-generated.
6657         * features/s390-linux32.c: Re-generated.
6658         * features/s390-linux32v1.c: Re-generated.
6659         * features/s390-linux32v2.c: Re-generated.
6660         * features/s390-linux64.c: Re-generated.
6661         * features/s390-linux64v1.c: Re-generated.
6662         * features/s390-linux64v2.c: Re-generated.
6663         * features/s390-te-linux64.c: Re-generated.
6664         * features/s390-tevx-linux64.c: Re-generated.
6665         * features/s390-vx-linux64.c: Re-generated.
6666         * features/s390x-linux64.c: Re-generated.
6667         * features/s390x-linux64v1.c: Re-generated.
6668         * features/s390x-linux64v2.c: Re-generated.
6669         * features/s390x-te-linux64.c: Re-generated.
6670         * features/s390x-tevx-linux64.c: Re-generated.
6671         * features/s390x-vx-linux64.c: Re-generated.
6672         * features/sparc/sparc32-solaris.c: Re-generated.
6673         * features/sparc/sparc64-solaris.c: Re-generated.
6674         * features/tic6x-c62x.c: Re-generated.
6675         * features/tic6x-c62x-linux.c: Re-generated.
6676         * features/tic6x-c64x.c: Re-generated.
6677         * features/tic6x-c64x-linux.c: Re-generated.
6678         * features/tic6x-c64xp.c: Re-generated.
6679         * features/tic6x-c64xp-linux.c: Re-generated.
6680
6681 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6682
6683         * i386-linux-tdep.c (i386_linux_read_description): New function.
6684         (i386_linux_core_read_description): Call
6685         i386_linux_read_description.
6686         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6687         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6688         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6689         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6690         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6691         * x86-linux-nat.c (x86_linux_read_description): Call
6692         i386_linux_read_description.
6693
6694 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6695
6696         * NEWS: Mention it.
6697         * features/Makefile (%.c: %.xml): Pass the xml file name to
6698         command "maint print c-tdesc".
6699         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6700         name from 'arg'.
6701
6702 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6703
6704         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6705         in-class initialization.
6706         (tdesc_create_feature): Call new instead of XCNEW.
6707         (free_target_description): Ue delete.
6708
6709 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6710
6711         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6712
6713 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6714
6715         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6716         constant.
6717         (amd64_x32_init_abi): Likewise.
6718         * amd64-tdep.h (amd64_init_abi): Update declaration.
6719         (amd64_x32_init_abi): Likewise.
6720
6721 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6722
6723         PR tdep/21717
6724         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6725         condition for FPSCR.
6726         (arm_linux_store_inferior_registers): Likewise.
6727
6728 2017-07-22  Tom Tromey  <tom@tromey.com>
6729
6730         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6731         <syscalls_counts>: Now a std::vector.
6732         (get_catch_syscall_inferior_data): Use "new".
6733         (catch_syscall_inferior_data_cleanup): Use "delete".
6734         (insert_catch_syscall, remove_catch_syscall)
6735         (clear_syscall_counts): Update.
6736
6737 2017-07-22  Tom Tromey  <tom@tromey.com>
6738
6739         * break-catch-syscall.c (syscall_catchpoint)
6740         <syscalls_to_be_caught>: Now a std::vector<int>
6741         (~syscall_catchpoint): Remove.
6742         (insert_catch_syscall, remove_catch_syscall)
6743         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6744         (print_mention_catch_syscall, print_recreate_catch_syscall):
6745         Update.
6746         (create_syscall_event_catchpoint): Change type of "filter"
6747         parameter.
6748         (catch_syscall_split_args): Return a std::vector.
6749         (catch_syscall_command_1, catching_syscall_number_1): Update.
6750
6751 2017-07-22  Tom Tromey  <tom@tromey.com>
6752
6753         * break-catch-throw.c (struct exception_catchpoint)
6754         <exception_rx>: Now a std::string.
6755         (~exception_catchpoint): Remove.
6756         (print_one_detail_exception_catchpoint): Update.
6757         (handle_gnu_v3_exceptions): Change type of except_rx.
6758         (extract_exception_regexp): Return a std::string.
6759         (catch_exception_command_1): Update.
6760
6761 2017-07-22  Tom Tromey  <tom@tromey.com>
6762
6763         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6764         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6765         std::vector.
6766         <catch_all>: Now a bool.
6767         (~signal_catchpoint): Remove.
6768         (signal_catchpoint_insert_location)
6769         (signal_catchpoint_remove_location)
6770         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6771         (signal_catchpoint_print_mention)
6772         (signal_catchpoint_print_recreate)
6773         (signal_catchpoint_explains_signal): Update.
6774         (create_signal_catchpoint): Change type of "filter" and
6775         "catch_all".
6776         (catch_signal_split_args): Return a std::vector.  Change type of
6777         "catch_all".
6778         (catch_signal_command): Update.
6779
6780 2017-07-20  Pedro Alves  <palves@redhat.com>
6781
6782         * ada-lang.c (ada_language_defn): Make extern.
6783         (_initialize_ada_language): Remove add_language call.
6784         * c-lang.c (c_language_defn, cplus_language_defn)
6785         (asm_language_defn, minimal_language_defn): Make extern.
6786         (_initialize_c_language): Delete.
6787         * completer.c (compare_cstrings): Delete, moved to utils.h.
6788         * d-lang.c (d_language_defn): Make extern.
6789         (_initialize_d_language): Remove add_language calls.
6790         * defs.h (enum language): Add comment.
6791         * f-lang.c (f_language_defn): Make extern.
6792         (_initialize_f_language): Remove add_language call.
6793         * go-lang.c (go_language_defn): Make extern.
6794         (_initialize_go_language): Remove add_language call.
6795         * language.c: Include <algorithm>.
6796         (languages): Redefine as const array.
6797         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6798         (set_language_command): Handle "local".  Use for-range loop.
6799         (set_language): Remove loop.
6800         (language_enum): Rewrite.
6801         (language_def, language_str): Remove loops.
6802         (add_language): Delete.
6803         (add_set_language_command): New, based on add_languages.
6804         (skip_language_trampoline): Adjust.
6805         (local_language_defn): Delete.
6806         (language_gdbarch_post_init): Adjust.
6807         (_initialize_language): Remove add_language calls.  Call
6808         add_set_language_command.
6809         * language.h (add_language): Delete.
6810         (auto_language_defn)
6811         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6812         (asm_language_defn, c_language_defn, cplus_language_defn)
6813         (d_language_defn, f_language_defn, go_language_defn)
6814         (m2_language_defn, objc_language_defn, opencl_language_defn)
6815         (pascal_language_defn, rust_language_defn): Declare.
6816         * m2-lang.c (m2_language_defn): Make extern.
6817         (_initialize_m2_language): Remove add_language call.
6818         * objc-lang.c (objc_language_defn): Make extern.
6819         (_initialize_objc_language): Remove add_language call.
6820         * opencl-lang.c (opencl_language_defn): Make extern.
6821         (_initialize_opencl_language): Remove add_language call.
6822         * p-lang.c (pascal_language_defn): Make extern.
6823         (_initialize_pascal_language): Delete.
6824         * rust-lang.c (rust_language_defn): Make extern.
6825         (_initialize_rust_language): Delete.
6826         * utils.h (compare_cstrings): New static inline function.
6827
6828 2017-07-20  Pedro Alves  <palves@redhat.com>
6829
6830         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6831         (get_var_value): Constify parameters.
6832         (get_int_var_value): Change prototype.
6833         (to_fixed_range_type): Adjust.
6834         * ada-lang.h (get_int_var_value): Change prototype.
6835
6836 2017-07-20  Pedro Alves  <palves@redhat.com>
6837
6838         * dwarf2read.c (dw2_lookup_symbol): Use
6839         SYMBOL_MATCHES_SEARCH_NAME.
6840         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6841
6842 2017-07-20  Pedro Alves  <palves@redhat.com>
6843
6844         * block.c (block_iter_name_step, block_iter_name_first)
6845         (block_iter_name_next): Delete.
6846         (block_lookup_symbol_primary): Adjust to use
6847         dict_iter_match_first/dict_iter_match_next.
6848         * block.h (block_iter_name_first, block_iter_name_next): Delete
6849         declarations.
6850         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6851         dict_iter_match_first/dict_iter_match_next.
6852
6853 2017-07-20  Pedro Alves  <palves@redhat.com>
6854
6855         * cp-support.c (cp_find_first_component_aux): Add missing case for
6856         end of string.
6857
6858 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6859
6860         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6861         of dwo_cu's dwo_file.
6862
6863 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6864
6865         * remote.c (store_registers_using_G): Remove one line comment.
6866
6867 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6868
6869         * regcache.c (regcache_cpy): Simplify it.
6870         (regcache::cpy_no_passthrough): Remove it.
6871         * regcache.h (cpy_no_passthrough): Remove it.
6872         (regcache_dup, regcache_cpy): Update comments.
6873
6874 2017-07-18  Pedro Alves  <palves@redhat.com>
6875
6876         * remote-sim.c (sim_command_completer): Adjust to work with a
6877         completion_tracker instead of a VEC.
6878
6879 2017-07-17  Pedro Alves  <palves@redhat.com>
6880
6881         * completer.c (complete_source_filenames): New function.
6882         (complete_address_and_linespec_locations): New function.
6883         (location_completer): Use complete_address_and_linespec_locations.
6884         (completion_tracker::build_completion_result): Honor the tracker's
6885         request to suppress append.
6886         * completer.h (completion_tracker::suppress_append_ws)
6887         (completion_tracker::set_suppress_append_ws): New methods.
6888         (completion_tracker::m_suppress_append_ws): New field.
6889         (complete_source_filenames): New declaration.
6890         * linespec.c (linespec_complete_what): New.
6891         (struct ls_parser) <complete_what, completion_word,
6892         completion_quote_char, completion_quote_end, completion_tracker>:
6893         New fields.
6894         (string_find_incomplete_keyword_at_end): New.
6895         (linespec_lexer_lex_string): Record quote char.  If in completion
6896         mode, don't throw.
6897         (linespec_lexer_consume_token): Advance the completion word point.
6898         (linespec_lexer_peek_token): Save/restore completion info.
6899         (save_stream_and_consume_token): New.
6900         (set_completion_after_number): New.
6901         (linespec_parse_basic): Set what to complete next depending on
6902         token.  Handle function and label completions specially.
6903         (parse_linespec): Disable objc shortcut in completion mode.  Set
6904         what to complete next depending on token type.  Skip keyword if in
6905         completion mode.
6906         (complete_linespec_component, linespec_complete): New.
6907         * linespec.h (linespec_complete): Declare.
6908
6909 2017-07-17  Pedro Alves  <palves@redhat.com>
6910
6911         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6912         Handle 'operator<' / 'operator<<'.
6913
6914 2017-07-17  Pedro Alves  <palves@redhat.com>
6915
6916         * completer.c (collect_explicit_location_matches): Handle
6917         MATCH_LABEL.
6918         (convert_explicit_location_to_linespec): New, factored out from
6919         ...
6920         (convert_explicit_location_to_sals): ... this.
6921         (complete_label): New.
6922         (linespec_complete_label, find_label_symbols_in_block): New.
6923         (find_label_symbols): Add completion_mode parameter and adjust to
6924         call find_label_symbols_in_block.
6925         * linespec.h (linespec_complete_label): Declare.
6926
6927 2017-07-17  Pedro Alves  <palves@redhat.com>
6928
6929         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6930         complete_symbol_mode parameter.
6931         * cli/cli-cmds.c (complete_command): Get the completion result out
6932         of the handle_brkchars tracker if used a custom word point.
6933         * completer.c: Include "linespec.h".
6934         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6935         (advance_to_expression_complete_word_point): New.
6936         (completion_tracker::completes_to_completion_word): New.
6937         (complete_files_symbols): Pass down
6938         complete_symbol_mode::EXPRESSION.
6939         (explicit_options, probe_options): New.
6940         (collect_explicit_location_matches): Complete on the
6941         explictit_loc->foo instead of word.  Use
6942         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6943         keyword and options completions.
6944         (backup_text_ptr): Delete.
6945         (skip_keyword): New.
6946         (complete_explicit_location): Remove 'word' parameter.  Add
6947         language, quoted_arg_start and quoted_arg_end parameters.
6948         Rewrite, parsing left to right.
6949         (location_completer): Rewrite.
6950         (location_completer_handle_brkchars): New function.
6951         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6952         (enum complete_line_internal_reason): Adjust comments.
6953         (completion_tracker::discard_completions): New.
6954         (completer_handle_brkchars_func_for_completer): Handle
6955         location_completer.
6956         (gdb_custom_word_point_brkchars)
6957         (gdb_org_rl_basic_quote_characters): New.
6958         (gdb_completion_word_break_characters_throw)
6959         (completion_find_completion_word): Handle trackers that use a
6960         custom word point.
6961         (completion_tracker::advance_custom_word_point_by): New.
6962         (completion_tracker::build_completion_result): Don't rely on
6963         readline appending the quote char.
6964         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6965         use a custom word point.
6966         (gdb_rl_attempted_completion_function): Restore
6967         rl_basic_quote_characters.
6968         * completer.h (class completion_tracker): Extend intro comment.
6969         (completion_tracker::set_quote_char)
6970         (completion_tracker::quote_char)
6971         (completion_tracker::set_use_custom_word_point)
6972         (completion_tracker::use_custom_word_point)
6973         (completion_tracker::custom_word_point)
6974         (completion_tracker::set_custom_word_point)
6975         (completion_tracker::advance_custom_word_point_by)
6976         (completion_tracker::completes_to_completion_word)
6977         (completion_tracker::discard_completions): New methods.
6978         (completion_tracker::m_quote_char)
6979         (completion_tracker::m_use_custom_word_point)
6980         (completion_tracker::m_custom_word_point): New fields.
6981         (advance_to_expression_complete_word_point): Declare.
6982         * f-lang.c (f_collect_symbol_completion_matches): Add
6983         complete_symbol_mode parameter.
6984         * language.h (struct language_defn)
6985         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6986         parameter.
6987         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
6988         (linespec_complete_function): New function.
6989         (linespec_lexer_lex_keyword): Adjust.
6990         * linespec.h (linespec_keywords, linespec_complete_function): New
6991         declarations.
6992         * location.c (find_end_quote): New function.
6993         (explicit_location_lex_one): Add explicit_completion_info
6994         parameter.  Save quoting info.  Don't throw if being called for
6995         completion.  Don't handle Ada operators here.
6996         (is_cp_operator, skip_op_false_positives, first_of)
6997         (explicit_location_lex_one_function): New function.
6998         (string_to_explicit_location): Replace 'dont_throw' parameter with
6999         an explicit_completion_info pointer parameter.  Handle it.  Don't
7000         use explicit_location_lex_one to lex function names.  Use
7001         explicit_location_lex_one_function instead.
7002         * location.h (struct explicit_completion_info): New.
7003         (string_to_explicit_location): Replace 'dont_throw' parameter with
7004         an explicit_completion_info pointer parameter.
7005         * symtab.c (default_collect_symbol_completion_matches_break_on):
7006         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7007         (default_collect_symbol_completion_matches)
7008         (collect_symbol_completion_matches): Add complete_symbol_mode
7009         parameter.
7010         (collect_symbol_completion_matches_type): Pass down
7011         complete_symbol_mode::EXPRESSION.
7012         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7013         parameter.  Handle LINESPEC mode.
7014         * symtab.h (complete_symbol_mode): New.
7015         (default_collect_symbol_completion_matches_break_on)
7016         (default_collect_symbol_completion_matches)
7017         (collect_symbol_completion_matches)
7018         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7019         parameter.
7020
7021 2017-07-17  Pedro Alves  <palves@redhat.com>
7022
7023         * utils.c (enum class strncmp_iw_mode): New.
7024         (strcmp_iw): Rename to ...
7025         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7026         parameters.  Handle them.
7027         (strncmp_iw): New.
7028         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7029         * utils.h (strncmp_iw): Declare.
7030         (strcmp_iw): Move describing comments here.
7031
7032 2017-07-17  Pedro Alves  <palves@redhat.com>
7033
7034         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7035         CP_OPERATOR_STR.
7036         * c-typeprint.c (is_type_conversion_operator): Use
7037         CP_OPERATOR_STR.
7038         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7039         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7040         CP_OPERATOR_LEN.
7041         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7042         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7043         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7044         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7045         CP_OPERATOR_STR.
7046         * location.c: Include "cp-support.h".
7047         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7048         CP_OPERATOR_STR.
7049         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7050         CP_OPERATOR_LEN.
7051
7052 2017-07-17  Pedro Alves  <palves@redhat.com>
7053
7054         * cli/cli-cmds.c (complete_command): Use a completion tracker
7055         along with completion_find_completion_word for handle_brkchars
7056         phase.
7057         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7058         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7059         (struct gdb_rl_completion_word_info): New.
7060         (gdb_rl_find_completion_word): New.
7061         (completion_find_completion_word): New.
7062         * completer.h (completion_find_completion_word): Declare.
7063
7064 2017-07-17  Pedro Alves  <palves@redhat.com>
7065
7066         * ada-lang.c (symbol_completion_match): Adjust comments.
7067         (symbol_completion_add): Replace vector parameter with
7068         completion_tracker parameter.  Use it.
7069         (ada_make_symbol_completion_list): Rename to...
7070         (ada_collect_symbol_completion_matches): ... this.  Add
7071         completion_tracker parameter and use it.
7072         (ada_language_defn): Adjust.
7073         * break-catch-syscall.c (catch_syscall_completer): Adjust
7074         prototype and work with completion_tracker instead of VEC.
7075         * breakpoint.c (condition_completer): Adjust prototype and work
7076         with completion_tracker instead of VEC.
7077         * c-lang.c (c_language_defn, cplus_language_defn)
7078         (asm_language_defn, minimal_language_defn): Adjust to renames.
7079         * cli/cli-cmds.c (complete_command): Rework using
7080         completion_tracker.  Catch exceptions when completing.
7081         * cli/cli-decode.c (integer_unlimited_completer)
7082         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7083         with completion_tracker instead of VEC.
7084         * command.h (struct completion_tracker): Forward declare.
7085         (completer_ftype, completer_handle_brkchars_ftype): Change
7086         types.
7087         (complete_on_cmdlist, complete_on_enum): Adjust.
7088         * completer.c: Include <algorithm>.
7089         (struct gdb_completer_state): New.
7090         (current_completion): New global.
7091         (readline_line_completion_function): Delete.
7092         (noop_completer, filename_completer)
7093         (filename_completer_handle_brkchars, complete_files_symbols)
7094         (linespec_location_completer): Adjust to work with a
7095         completion_tracker instead of a VEC.
7096         (string_or_empty): New.
7097         (collect_explicit_location_matches): Adjust to work with a
7098         completion_tracker instead of a VEC.
7099         (explicit_location_completer): Rename to ...
7100         (complete_explicit_location): ... this and adjust to work with a
7101         completion_tracker instead of a VEC.
7102         (location_completer): Adjust to work with a completion_tracker
7103         instead of a VEC.
7104         (add_struct_fields): Adjust to work with a completion_list instead
7105         of VEC.
7106         (expression_completer): Rename to ...
7107         (complete_expression): ... this and adjust to work with a
7108         completion_tracker instead of a VEC.  Use complete_files_symbols.
7109         (expression_completer): Reimplement on top of complete_expression.
7110         (symbol_completer): Adjust to work with a completion_tracker
7111         instead of a VEC.
7112         (enum complete_line_internal_reason): Add describing comments.
7113         (complete_line_internal_normal_command): Adjust to work with a
7114         completion_tracker instead of a VEC.
7115         (complete_line_internal): Rename to ...
7116         (complete_line_internal_1): ... this and adjust to work with a
7117         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7118         handle_brkchars phase.
7119         (new_completion_tracker): Delete.
7120         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7121         complete_line_internal_1.
7122         (free_completion_tracker): Delete.
7123         (INITIAL_COMPLETION_HTAB_SIZE): New.
7124         (completion_tracker::completion_tracker)
7125         (completion_tracker::~completion_tracker): New.
7126         (maybe_add_completion): Delete.
7127         (completion_tracker::maybe_add_completion)
7128         (completion_tracker::add_completion)
7129         (completion_tracker::add_completions): New.
7130         (throw_max_completions_reached_error): Delete.
7131         (complete_line): Adjust to work with a completion_tracker instead
7132         of a VEC.  Don't create a completion_tracker_t or check for max
7133         completions here.
7134         (command_completer, command_completer_handle_brkchars)
7135         (signal_completer, reg_or_group_completer_1)
7136         (reg_or_group_completer, default_completer_handle_brkchars):
7137         Adjust to work with a completion_tracker.
7138         (gdb_completion_word_break_characters_throw): New.
7139         (gdb_completion_word_break_characters): Reimplement.
7140         (line_completion_function): Delete.
7141         (completion_tracker::recompute_lowest_common_denominator)
7142         (expand_preserving_ws)
7143         (completion_tracker::build_completion_result)
7144         (completion_result::completion_result)
7145         (completion_result::completion_result)
7146         (completion_result::~completion_result)
7147         (completion_result::completion_result)
7148         (completion_result::release_match_list, compare_cstrings)
7149         (completion_result::sort_match_list)
7150         (completion_result::reset_match_list)
7151         (gdb_rl_attempted_completion_function_throw)
7152         (gdb_rl_attempted_completion_function): New.
7153         * completer.h (completion_list, struct completion_result)
7154         (class completion_tracker): New.
7155         (complete_line): Add completion_tracker parameter.
7156         (readline_line_completion_function): Delete.
7157         (gdb_rl_attempted_completion_function): New.
7158         (noop_completer, filename_completer, expression_completer)
7159         (location_completer, symbol_completer, command_completer)
7160         (signal_completer, reg_or_group_completer): Update prototypes.
7161         (completion_tracker_t, new_completion_tracker)
7162         (make_cleanup_free_completion_tracker): Delete.
7163         (enum maybe_add_completion_enum): Delete.
7164         (maybe_add_completion): Delete.
7165         (throw_max_completions_reached_error): Delete.
7166         * corefile.c (complete_set_gnutarget): Adjust to work with a
7167         completion_tracker instead of a VEC.
7168         * cp-abi.c (cp_abi_completer): Adjust to work with a
7169         completion_tracker instead of a VEC.
7170         * d-lang.c (d_language_defn): Adjust.
7171         * disasm.c (disassembler_options_completer): Adjust to work with a
7172         completion_tracker instead of a VEC.
7173         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7174         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7175         with a completion_tracker instead of a VEC.
7176         (f_language_defn): Adjust.
7177         * go-lang.c (go_language_defn): Adjust.
7178         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7179         Adjust to work with a completion_tracker instead of a VEC.
7180         * infrun.c (handle_completer): Likewise.
7181         * interps.c (interpreter_completer): Likewise.
7182         * interps.h (interpreter_completer): Likewise.
7183         * language.c (unknown_language_defn, auto_language_defn)
7184         (local_language_defn): Adjust.
7185         * language.h (language_defn::la_make_symbol_completion_list):
7186         Rename to ...
7187         (language_defn::la_collect_symbol_completion_matches): ... this
7188         and adjust to work with a completion_tracker instead of a VEC.
7189         * m2-lang.c (m2_language_defn): Adjust.
7190         * objc-lang.c (objc_language_defn): Adjust.
7191         * opencl-lang.c (opencl_language_defn): Adjust.
7192         * p-lang.c (pascal_language_defn): Adjust.
7193         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7194         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7195         with a completion_tracker.
7196         * rust-lang.c (rust_language_defn): Adjust.
7197         * symtab.c (free_completion_list, do_free_completion_list)
7198         (return_val, completion_tracker): Delete.
7199         (completion_list_add_name, completion_list_add_symbol)
7200         (completion_list_add_msymbol, completion_list_objc_symbol)
7201         (completion_list_add_fields, add_symtab_completions): Add
7202         completion_tracker parameter and use it.
7203         (default_make_symbol_completion_list_break_on_1): Rename to...
7204         (default_collect_symbol_completion_matches_break_on): ... this.
7205         Add completion_tracker parameter and use it instead of allocating
7206         a completion tracker here.
7207         (default_make_symbol_completion_list_break_on): Delete old
7208         implementation.
7209         (default_make_symbol_completion_list): Delete.
7210         (default_collect_symbol_completion_matches): New.
7211         (make_symbol_completion_list): Delete.
7212         (collect_symbol_completion_matches): New.
7213         (make_symbol_completion_type): Rename to ...
7214         (collect_symbol_completion_matches_type): ... this.  Add
7215         completion_tracker parameter and use it instead of VEC.
7216         (make_file_symbol_completion_list_1): Rename to...
7217         (collect_file_symbol_completion_matches): ... this.  Add
7218         completion_tracker parameter and use it instead of VEC.
7219         (make_file_symbol_completion_list): Delete.
7220         (add_filename_to_list): Use completion_list instead of a VEC.
7221         (add_partial_filename_data::list): Now a completion_list.
7222         (make_source_files_completion_list): Work with a completion_list
7223         instead of a VEC.
7224         * symtab.h: Include "completer.h".
7225         (default_make_symbol_completion_list_break_on)
7226         (default_make_symbol_completion_list, make_symbol_completion_list)
7227         (make_symbol_completion_type, make_file_symbol_completion_list)
7228         (make_source_files_completion_list): Delete.
7229         (default_collect_symbol_completion_matches_break_on)
7230         (default_collect_symbol_completion_matches)
7231         (collect_symbol_completion_matches)
7232         (collect_symbol_completion_matches_type)
7233         (collect_file_symbol_completion_matches)
7234         (make_source_files_completion_list): New.
7235         * top.c (init_main): Don't install a rl_completion_entry_function
7236         hook.  Install a rl_attempted_completion_function hook instead.
7237         * tui/tui-layout.c (layout_completer): Adjust to work with a
7238         completion_tracker.
7239         * tui/tui-regs.c (tui_reggroup_completer):
7240         * tui/tui-win.c (window_name_completer, focus_completer)
7241         (winheight_completer): Adjust to work with a completion_tracker.
7242         * value.c: Include "completer.h".
7243         (complete_internalvar): Adjust to work with a completion_tracker.
7244         * value.h (complete_internalvar): Likewise.
7245
7246 2017-07-17  Pedro Alves  <palves@redhat.com>
7247
7248         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7249         renames.
7250         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7251         comments to completer_ftype's declaration.
7252         <completer_handle_brkchars>: Change type to
7253         completer_handle_brkchars_ftype.
7254         * command.h (completer_ftype): Add describing comment and give
7255         names to parameters.
7256         (completer_ftype_void): Rename to ...
7257         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7258         (set_cmd_completer_handle_brkchars): Adjust.
7259         * completer.c (filename_completer_handle_brkchars): New function.
7260         (complete_line_internal_normal_command): New function, factored
7261         out from ...
7262         (complete_line_internal): ... here.
7263         (command_completer_handle_brkchars)
7264         (default_completer_handle_brkchars)
7265         (completer_handle_brkchars_func_for_completer): New functions.
7266         * completer.h (set_gdb_completion_word_break_characters): Delete
7267         declaration.
7268         (completer_handle_brkchars_func_for_completer): New declaration.
7269         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7270         completer_handle_brkchars_func_for_completer.
7271
7272 2017-07-17  Pedro Alves  <palves@redhat.com>
7273
7274         * completer.c (symbol_completer): New function, based on
7275         make_symbol_completion_list_fn.
7276         * completer.h (symbol_completer): New declaration.
7277         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7278         * python/py-cmd.c (completers): Adjust.
7279         * symtab.c (make_symbol_completion_list_fn): Delete.
7280         * symtab.h (make_symbol_completion_list_fn): Delete.
7281         * cli/cli-decode.c (add_cmd): Adjust.
7282
7283 2017-07-17  Pedro Alves  <palves@redhat.com>
7284
7285         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7286         * dwarf2read.c: Include "filename-seen-cache.h".
7287         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7288         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7289         * filename-seen-cache.c: New file.
7290         * filename-seen-cache.h: New file.
7291         * symtab.c: Include "filename-seen-cache.h".
7292         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7293         (create_filename_seen_cache, clear_filename_seen_cache)
7294         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7295         to filename-seen-cache.h/filename-seen-cache.c.
7296         (output_source_filename, sources_info)
7297         (maybe_add_partial_symtab_filename)
7298         (make_source_files_completion_list): Adjust to use
7299         filename_seen_cache.
7300
7301 2017-07-17  Pedro Alves  <palves@redhat.com>
7302
7303         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7304         fields.
7305         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7306         dwarf2_debug_sections*)): New.
7307         (dwarf2_per_objfile::dwarf2_per_objfile(const
7308         dwarf2_per_objfile&)): Declare as deleted.
7309         (dwarf2_per_objfile::operator=): Declare as deleted.
7310         (dwarf2_per_objfile::dwarf2_per_objfile)
7311         (dwarf2_per_objfile::~dwarf2_per_objfile)
7312         (dwarf2_per_objfile::free_cached_comp_units): New.
7313         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7314         ctor.  Call dwarf2_per_objfile's ctor manually.
7315         (dwarf2_locate_sections): Deleted/refactored as ...
7316         (dwarf2_per_objfile::locate_sections): ... this new method.
7317         (free_cached_comp_units): Defer to
7318         dwarf2_per_objfile::free_cached_comp_units.
7319         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7320
7321 2017-07-14  Tom Tromey  <tom@tromey.com>
7322
7323         PR rust/21764:
7324         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7325         parameter.
7326         <UNOP_SIZEOF>: Split into separate case.
7327         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7328
7329 2017-07-14  Tom Tromey  <tom@tromey.com>
7330
7331         PR rust/21763:
7332         * symtab.c (symbol_matches_domain): Add language_rust to special
7333         case.
7334         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7335         treat LOC_TYPEDEF symbols as variables.
7336
7337 2017-07-14  Pedro Alves  <palves@redhat.com>
7338
7339         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7340         symtabs matching all symtabs with SRCFILE as file name instead of
7341         only considering the first hit, with lookup_symtab.
7342
7343 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7344
7345         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7346         operator_name parameters.
7347         (gen_expr): Update function call.
7348
7349 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7350
7351         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7352         parameter.
7353         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7354         Likewise.
7355         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7356         parameter, use agent_expr::gdbarch instead, update function
7357         calls.
7358         (locexpr_tracepoint_var_ref): Likewise.
7359         (loclist_tracepoint_var_ref): Likewise.
7360         * ax-gdb.c (gen_trace_static_fields): Likewise.
7361         (gen_traced_pop): Likewise.
7362         (gen_frame_args_address): Likewise.
7363         (gen_frame_locals_address): Likewise.
7364         (gen_var_ref): Likewise.
7365         (gen_struct_ref_recursive): Likewise.
7366         (gen_static_field): Likewise.
7367         (gen_maybe_namespace_elt): Likewise.
7368         (gen_expr): Likewise.
7369         (gen_trace_for_var): Likewise.
7370         (gen_trace_for_expr): Likewise.
7371         (gen_trace_for_return_address): Likewise.
7372
7373 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7374
7375         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7376         parameter.
7377         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7378
7379 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7380
7381         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7382         from ax, update calls.
7383         (gen_usual_arithmetic): Likewise.
7384         (gen_integral_promotions): Likewise.
7385         (gen_bitfield_ref): Likewise.
7386         (gen_primitive_field): Likewise.
7387         (gen_struct_ref_recursive): Likewise.
7388         (gen_struct_ref): Likewise.
7389         (gen_maybe_namespace_elt): Likewise.
7390         (gen_struct_elt_for_reference): Likewise.
7391         (gen_namespace_elt): Likewise.
7392         (gen_aggregate_elt_ref): Likewise.
7393         (gen_expr): Get gdbarch from ax, update calls.
7394         (gen_expr_binop_rest): Likewise.
7395
7396 2017-07-13  Pedro Alves  <palves@redhat.com>
7397
7398         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7399         as default tdesc.
7400         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7401         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7402         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7403         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7404         tdep.
7405         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7406         Get final tdesc from the tdep.
7407         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7408         default tdesc.
7409         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7410         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7411         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7412         Use it as default tdesc.
7413         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7414         down to amd_init_abi.  No longer handle fallback tdesc here.
7415         * amd64-tdep.h (tdesc_x32): Declare.
7416         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7417         parameter.
7418         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7419         as default tdesc.
7420
7421 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7422
7423         * s390-linux-tdep.c (s390_process_record): Add support for
7424         instructions new in arch12.
7425
7426 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7427
7428         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7429         PT_GETFSBASE and PT_GETGSBASE.
7430         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7431         PT_SETGSBASE.
7432
7433 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7434
7435         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7436         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7437         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7438         those rules.
7439         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7440         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7441         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7442         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7443         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7444         * features/i386/amd64.xml: Add 64bit-segments.xml.
7445         * features/i386/amd64-avx-avx512.c: Regenerated.
7446         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7447         * features/i386/amd64-avx-mpx.c: Regenerated.
7448         * features/i386/amd64-avx.c: Regenerated.
7449         * features/i386/amd64-mpx.c: Regenerated.
7450         * features/i386/amd64.c: Regenerated.
7451         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7452         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7453         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7454         * regformats/i386/amd64-avx.dat: Regenerated.
7455         * regformats/i386/amd64-mpx.dat: Regenerated.
7456         * regformats/i386/amd64.dat: Regenerated.
7457
7458 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7459
7460         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7461         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7462
7463 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7464
7465         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7466         unsetenv.
7467         * gnulib/aclocal.m4: Regenerate.
7468         * gnulib/config.in: Regenerate.
7469         * gnulib/configure: Regenerate.
7470         * gnulib/import/Makefile.am: Regenerate.
7471         * gnulib/import/Makefile.in: Regenerate.
7472         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7473         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7474         * gnulib/import/m4/environ.m4: New file.
7475         * gnulib/import/m4/setenv.m4: New file.
7476         * gnulib/import/setenv.c: New file.
7477         * gnulib/import/unsetenv.c: New file.
7478
7479 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7480
7481         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7482         address when op is DW_OP_addr.
7483
7484 2017-07-09  Tom Tromey  <tom@tromey.com>
7485
7486         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7487         check and apply to outer type.
7488
7489 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7490
7491         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7492         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7493         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7494         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7495
7496 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7497
7498         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7499
7500 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7501
7502         * corelow.c (get_core_siginfo): Remove.
7503         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7504         instead of get_core_siginfo.
7505         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7506         * gdbarch.h: Re-generate.
7507         * gdbarch.c: Re-generate.
7508         * linux-tdep.c (linux_core_xfer_siginfo): New.
7509         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7510
7511 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7512
7513         * corelow.c (thread_section_name): Move to ...
7514         * gdbcore.h (thread_section_name): ... here.
7515
7516 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7517
7518         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7519         (struct siginfo32): New.
7520         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7521         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7522         via ptrace(PT_LWPINFO).
7523
7524 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7525
7526         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7527         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7528         (fbsd_get_siginfo_type): New.
7529         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7530         (_initialize_fbsd_tdep): New.
7531
7532 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7533
7534         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7535         a singular dwo_unit*) to support multiple CUs in the same way that
7536         multiple TUs are supported.
7537         (create_cus_hash_table): Replace create_dwo_cu with a function for
7538         parsing multiple CUs from a DWO file.
7539         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7540         create_dwo_cu.
7541         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7542         htab_find, rather than comparing the signature to a singleton CU in
7543         the dwo_file.
7544
7545 2017-07-06  Pedro Alves  <palves@redhat.com>
7546
7547         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7548
7549 2017-07-04  Pedro Alves  <palves@redhat.com>
7550
7551         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7552         * gdbtypes.h (TYPE_STATIC): Delete.
7553         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7554         is_synchronized, is_native>: Delete.
7555         <dummy>: Bump.
7556         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7557         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7558         (TYPE_FN_FIELD_ABSTRACT): Delete.
7559
7560 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7561
7562         * buffer.h (buffer_finish): Fix spelling mistakes.
7563
7564 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7565
7566         * .dir-locals.el: Automatically switch to C-style comments in
7567         versions of Emacs that support the feature.
7568
7569 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7570             Pedro Alves  <palves@redhat.com>
7571
7572         PR cli/21688
7573         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7574         (process_next_line): New variable 'inline_cmd'.
7575         Adjust 'if' clauses for "python", "compile" and "guile" to use
7576         'command_name_equals' and check for '!inline_cmd'.
7577
7578 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7579
7580         PR cli/21688
7581         * cli/cli-script.c (command_name_equals_not_inline): New function.
7582         (process_next_line): Adjust 'if' clauses for "python", "compile"
7583         and "guile" to use command_name_equals_not_inline.
7584
7585 2017-06-29  Pedro Alves  <palves@redhat.com>
7586
7587         * completer.c (expression_completer): Call
7588         linespec_location_completer instead of location_completer.
7589
7590 2017-06-29  Pedro Alves  <palves@redhat.com>
7591
7592         * completer.c (expression_completer): Remove code that recomputes
7593         'text' from 'word'.
7594
7595 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7596
7597         * regformats/regdat.sh: Generate code with
7598         "ifndef IN_PROCESS_AGENT".
7599
7600 2017-06-28  Pedro Alves  <palves@redhat.com>
7601
7602         * command.h: Include "common/scoped_restore.h".
7603
7604 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7605
7606         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7607         instead of obstack_grow.
7608
7609 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7610
7611         PR gdb/21337
7612         * symfile.c (reread_symbols): Call objfiles_changed just before
7613         read_symbols.
7614
7615 2017-06-27  Pedro Alves  <palves@redhat.com>
7616
7617         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7618         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7619         (completion_list_add_symbol, completion_list_add_msymbol):
7620         ... these new functions.
7621         (add_symtab_completions)
7622         (default_make_symbol_completion_list_break_on_1): Adjust.
7623
7624 2017-06-27  Pedro Alves  <palves@redhat.com>
7625
7626         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7627         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7628         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7629         dtor.
7630         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7631         'storage_obstack' field an auto_obstack.  In-class initialize all
7632         non-bitfield fields.  Make minsyms_read bool.
7633         * symfile.c (read_symbols): Adjust.
7634
7635 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7636
7637         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7638         (gdbsim_store_register): Likewise.
7639
7640 2017-06-27  Pedro Alves  <palves@redhat.com>
7641
7642         * c-exp.y (name_obstack): Now an auto_obstack.
7643         (yylex): Use auto_obstack::clear.
7644         (c_parse): Use auto_obstack::clear instead of reinitializing and
7645         freeing the obstack.
7646         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7647         * d-exp.y (name_obstack): Now an auto_obstack.
7648         (yylex): Use auto_obstack::clear.
7649         (d_parse): Use auto_obstack::clear instead of reinitializing and
7650         freeing the obstack.
7651         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7652         auto_obstack.
7653         * dwarf2read.c (create_addrmap_from_index)
7654         (dwarf2_build_psymtabs_hard)
7655         (update_enumeration_type_from_children): Likewise.
7656         * gdb_obstack.h (auto_obstack): New type.
7657         * go-exp.y (name_obstack): Now an auto_obstack.
7658         (build_packaged_name): Use auto_obstack::clear.
7659         (go_parse): Use auto_obstack::clear instead of reinitializing and
7660         freeing the obstack.
7661         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7662         auto_obstack.
7663         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7664         * rust-exp.y (work_obstack): Now an auto_obstack.
7665         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7666         reinitializing and freeing the obstack.
7667         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7668         (host_char_to_target): Use auto_obstack.
7669         * utils.h (make_cleanup_obstack_free): Delete declaration.
7670         * valprint.c (generic_emit_char, generic_printstr): Use
7671         auto_obstack.
7672
7673 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7674
7675         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7676         thread.
7677         (darwin_init_thread_list): Don't update dummy thread.
7678         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7679
7680 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7681
7682         * record-full.c (netorder16): Remove.
7683
7684 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7685
7686         * common/diagnostics.h: Define macros for GCC.
7687         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7688         * common/vec.h: Include diagnostics.h.
7689         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7690         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7691         warning.
7692
7693 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7694
7695         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7696         New macro.
7697         * ada-lex.l: Ignore deprecated register warnings.
7698
7699 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7700
7701         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7702         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7703
7704 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7705
7706         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7707         its own line.
7708
7709 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7710
7711         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7712
7713 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7714
7715         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7716         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7717         (xtensa_register_read_masked): Likewise.
7718
7719 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7720
7721         * common/environ.c (gdb_environ::unset): Update comment.
7722
7723 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7724
7725         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7726         registers.
7727
7728 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7729
7730         * record-full.c (record_full_exec_insn): Use byte_vector.
7731
7732 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7733
7734         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7735         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7736
7737 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7738
7739         * remote.c (cached_reg): Move from here...
7740         * regcache.h (cached_reg): ...to here.
7741         * python/py-unwind.c (struct reg_info): Remove.
7742         (cached_frame_info): Use cached_reg_t.
7743         (pyuw_prev_register): Likewise.
7744         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7745         (pyuw_dealloc_cache): Free all registers.
7746
7747 2017-06-22  Pedro Alves  <palves@redhat.com>
7748             Simon Marchi  <simon.marchi@ericsson.com>
7749
7750         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7751         warning.
7752         * common/diagnostics.h: New file.
7753
7754 2017-06-22  Pedro Alves  <palves@redhat.com>
7755
7756         * common/agent.h: Add include guards.
7757
7758 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7759
7760         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7761         talk about addressable units instead of bytes.
7762
7763 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7764
7765         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7766         of '::const_iterator'.
7767
7768 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7769
7770         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7771         'unittests/environ-selftests.c'.
7772         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7773         * charset.c (find_charset_names): Declare object 'iconv_env'.
7774         Update code to use 'iconv_env' object.  Remove call to
7775         'free_environ'.
7776         * common/environ.c: Include <utility>.
7777         (make_environ): Delete function.
7778         (free_environ): Delete function.
7779         (gdb_environ::clear): New function.
7780         (gdb_environ::operator=): New function.
7781         (gdb_environ::get): Likewise.
7782         (environ_vector): Delete function.
7783         (set_in_environ): Delete function.
7784         (gdb_environ::set): New function.
7785         (unset_in_environ): Delete function.
7786         (gdb_environ::unset): New function.
7787         (gdb_environ::envp): Likewise.
7788         * common/environ.h: Include <vector>.
7789         (struct gdb_environ): Delete; transform into...
7790         (class gdb_environ): ... this class.
7791         (free_environ): Delete prototype.
7792         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7793         environ_vector): Likewise.
7794         * infcmd.c (run_command_1): Update code to call
7795         'envp' from 'gdb_environ' class.
7796         (environment_info): Update code to call methods from 'gdb_environ'
7797         class.
7798         (unset_environment_command): Likewise.
7799         (path_info): Likewise.
7800         (path_command): Likewise.
7801         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7802         (inferior::inferior): Initialize 'environment' using the host's
7803         information.
7804         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7805         Include "environ.h".
7806         (class inferior) <environment>: Change type from 'struct
7807         gdb_environ' to 'gdb_environ'.
7808         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7809         methods from 'gdb_environ' class.
7810         * solib.c (solib_find_1): Likewise
7811         * unittests/environ-selftests.c: New file.
7812
7813 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7814
7815         * features/i386/i386-linux.xml: Exchange the order of including
7816         32bit-linux.xml and 32bit-sse.xml.
7817         * features/i386/i386-linux.c: Regenerated.
7818
7819 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7820
7821         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7822         Delete copy ctor and assignment operator.
7823         (tdesc_type): Likewise.
7824         (tdesc_feature): Likewise.
7825         (tdesc_free_reg): Remove.
7826         (tdesc_create_reg): Use new.
7827         (tdesc_free_type): Remove.
7828         (tdesc_create_vector): Use new.
7829         (tdesc_create_union): Likewise.
7830         (tdesc_create_flags): Likewise.
7831         (tdesc_create_enum): Likewise.
7832         (tdesc_free_feature): Delete.
7833         (free_target_description): Use delete.
7834
7835 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7836
7837         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7838         registers.
7839
7840 2017-06-19  Pedro Alves  <palves@redhat.com>
7841
7842         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7843         after gdb::unlinker.
7844
7845 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7846
7847         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7848         gdb_environ to access an environment variable.
7849
7850 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7851
7852         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7853         gdb_byte*.
7854
7855 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7856
7857         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7858
7859 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7860
7861         * configure: Re-generate.
7862         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7863
7864 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7865
7866         * configure: Re-generate.
7867         * warning.m4: Pass -Werror to compiler when checking for
7868         supported warning flags.
7869
7870 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7871
7872         * Makefile.in (COMPILE.pre): Add "-x c++".
7873
7874 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7875             Pedro Alves  <palves@redhat.com>
7876             Yao Qi  <yao.qi@linaro.org>
7877
7878         * defs.h (RequireLongest): New.
7879         (extract_integer): Declare function template.
7880         (extract_signed_integer): Remove the declaration, but define it
7881         static inline.
7882         (extract_unsigned_integer): Likewise.
7883         (store_integer): Declare function template.
7884         (store_signed_integer): Remove the declaration, but define it
7885         static inline.
7886         (store_unsigned_integer): Likewise.
7887         * findvar.c (extract_integer): New function template.
7888         (extract_signed_integer): Remove.
7889         (extract_unsigned_integer): Remove.
7890         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7891         instantiations.
7892         (store_integer): New function template.
7893         (store_signed_integer): Remove.
7894         (store_unsigned_integer): Remove.
7895         (store_integer): Explicit instantiations.
7896         * regcache.c (regcache_raw_read_signed): Update.
7897         (regcache::raw_read): New function.
7898         (regcache::raw_read_signed): Remove.
7899         (regcache::raw_read_unsigned): Remove.
7900         (regcache_raw_read_unsigned): Update.
7901         (regcache_raw_write_unsigned): Update.
7902         (regcache::raw_write_signed): Remove.
7903         (regcache::raw_write): New function.
7904         (regcache_cooked_read_signed): Update.
7905         (regcache::raw_write_unsigned): Remove.
7906         (regcache::cooked_read_signed): Remove.
7907         (regcache_cooked_read_unsigned): Update.
7908         (regcache::cooked_read_unsigned): Remove.
7909         (regcache_cooked_write_signed): Update.
7910         (regcache_cooked_write_unsigned): Update.
7911         * regcache.h (regcache) <raw_read_signed>: Remove.
7912         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7913         <raw_read, raw_write>: New.
7914         <cooked_read_signed, cooked_write_signed>: Remove.
7915         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7916         <cooked_read, cooked_write>: New.
7917         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7918         (sh64_pseudo_register_write): Update.
7919
7920 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7921
7922         * arc-tdep.c (arc_disassembler_options): New variable.
7923         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7924         of default_print_insn.
7925         (arc_delayed_print_insn): Set info->section when needed,
7926         use default_print_insn to retrieve a disassembler.
7927
7928 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7929
7930         PR gdb/21574
7931         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7932         to mention $SHELL and startup-with-shell.
7933
7934 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7935
7936         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7937
7938 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7939
7940         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7941         default_print_insn instead of print_insn_aarch64.
7942         * arm-tdep.c (gdb_print_insn_arm): Call
7943         default_print_insn instead of print_insn_big_arm
7944         and print_insn_little_arm.
7945         * i386-tdep.c (i386_print_insn): Call default_print_insn
7946         instead of print_insn_i386.
7947         * ia64-tdep.c (ia64_print_insn): Call
7948         default_print_insn instead of print_insn_ia64.
7949         * mips-tdep.c (gdb_print_insn_mips): Call
7950         default_print_insn instead of print_insn_big_mips
7951         and print_insn_little_mips.
7952         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7953         instead of print_insn_spu.
7954
7955 2017-06-14  Pedro Alves  <palves@redhat.com>
7956
7957         * ada-lang.c: Include "common/byte-vector.h".
7958         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7959         * charset.c (wchar_iterator::iterate): Resize the vector instead
7960         of reserving it.
7961         * common/byte-vector.h: Include "common/def-vector.h".
7962         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7963         * cli/cli-dump.c: Include "common/byte-vector.h".
7964         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7965         * common/byte-vector.h: New file.
7966         * common/def-vector.h: New file.
7967         * common/default-init-alloc.h: New file.
7968         * dwarf2loc.c: Include "common/byte-vector.h".
7969         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7970         instead of reserving it.
7971         * dwarf2read.c: Include "common/byte-vector.h".
7972         (data_buf::m_vec): Now a gdb::byte_vector.
7973         * gdb_regex.c: Include "common/def-vector.h".
7974         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7975         * mi/mi-main.c: Include "common/byte-vector.h".
7976         (mi_cmd_data_read_memory): Use gdb::byte_vector.
7977         * printcmd.c: Include "common/byte-vector.h".
7978         (print_scalar_formatted): Use gdb::byte_vector.
7979         * valprint.c: Include "common/byte-vector.h".
7980         (maybe_negate_by_bytes, print_decimal_chars): Use
7981         gdb::byte_vector.
7982
7983 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7984
7985         * darwin-nat.c: Include "nat/fork-inferior.h".
7986
7987 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7988
7989         * configure.nat: Factor out Darwin bits that are not
7990         architecture-specific.  Add fork-inferior.o.
7991
7992 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7993
7994         * configure.nat: Factor out AIX bits that are not
7995         architecture-specific.  Add fork-inferior.o.
7996
7997 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7998
7999         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8000         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8001         wrappers that just call rw_pieced_value.
8002
8003 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8004
8005         * dwarf2loc.c (write_pieced_value): When writing the data for a
8006         memory piece, use write_memory_with_notification instead of
8007         write_memory.
8008
8009 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8010
8011         * valops.c (read_value_memory): Change embedded_offset to
8012         represent a bit offset instead of a byte offset.
8013         * value.h (read_value_memory): Adjust comment.
8014
8015 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8016
8017         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8018         dest_offset_bits and source_offset_bits.
8019         (write_pieced_value): Likewise.
8020
8021 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8022
8023         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8024         given by DW_OP_bit_piece.
8025         (write_pieced_value): Likewise.
8026
8027 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8028
8029         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8030         some other preparations to the places where sufficient information
8031         is available.
8032         (write_pieced_value): Likewise.
8033
8034 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8035
8036         * dwarf2loc.c (bits_to_bytes): New function.
8037         (read_pieced_value): Fix offset calculations for register pieces
8038         on big-endian targets.
8039         (write_pieced_value): Likewise.
8040
8041 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8042
8043         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8044         (write_pieced_value): Likewise.
8045
8046 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8047
8048         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8049         transfer the source value's least significant bits, instead of its
8050         lowest-addressed ones.  Rename type_len to max_offset.
8051         (read_pieced_value): Mirror above changes to write_pieced_value as
8052         applicable.
8053
8054 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8055
8056         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8057         truncate full bytes from dest_offset_bits before using it as an
8058         offset into the buffer.
8059
8060 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8061
8062         * dwarf2loc.c (write_pieced_value): Include transfer size in
8063         byte-wise check.
8064
8065 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8066
8067         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8068         calculation of this_size.
8069
8070 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8071
8072         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8073         when targeting a bit-field.
8074         (write_pieced_value): Likewise.
8075
8076 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8077
8078         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8079         (allocate_piece_closure): Drop addr_size parameter.
8080         (dwarf2_evaluate_loc_desc_full): Adjust call to
8081         allocate_piece_closure.
8082
8083 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8084
8085         PR gdb/21226
8086         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8087         the LSB end, independent of endianness.
8088
8089 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8090
8091         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8092         size capping.
8093
8094 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8095
8096         * mips-linux-nat.c: Move include features/mips*-linux.c to
8097         mips-linux-tdep.c.
8098         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8099         to mips-linux-tdep.c.
8100         * mips-linux-tdep.c: Include features/mips*-linux.c
8101         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8102         functions.
8103         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8104         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8105         (tdesc_mips64_dsp_linux): Declare.
8106
8107 2017-06-12  Tom Tromey  <tom@tromey.com>
8108
8109         * valprint.h (val_print_type_code_int): Remove.
8110         * valprint.c (generic_val_print_int): Always call
8111         val_print_scalar_formatted.
8112         (val_print_type_code_int): Remove.
8113         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8114         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8115         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8116         * ada-valprint.c (ada_val_print_num): Use
8117         val_print_scalar_formatted.
8118
8119 2017-06-12  Tom Tromey  <tom@tromey.com>
8120
8121         * printcmd.c (print_scalar_formatted): Unify the two switches.
8122         Don't convert scalars to LONGEST.
8123
8124 2017-06-12  Tom Tromey  <tom@tromey.com>
8125
8126         PR exp/16225:
8127         * valprint.h (print_decimal_chars): Update.
8128         * valprint.c (maybe_negate_by_bytes): New function.
8129         (print_decimal_chars): Add "is_signed" argument.
8130         * printcmd.c (print_scalar_formatted): Update.
8131
8132 2017-06-12  Tom Tromey  <tom@tromey.com>
8133
8134         PR exp/16225:
8135         * valprint.h (print_binary_chars, print_hex_chars): Update.
8136         * valprint.c (val_print_type_code_int): Update.
8137         (print_binary_chars): Add "zero_pad" argument.
8138         (emit_octal_digit): New function.
8139         (print_octal_chars): Don't zero-pad.
8140         (print_decimal_chars): Likewise.
8141         (print_hex_chars): Add "zero_pad" argument.
8142         * sh64-tdep.c (sh64_do_fp_register): Update.
8143         * regcache.c (regcache::dump): Update.
8144         * printcmd.c (print_scalar_formatted): Update.
8145         * infcmd.c (default_print_one_register_info): Update.
8146
8147 2017-06-12  Pedro Alves  <palves@redhat.com>
8148             Alan Hayward  <alan.hayward@arm.com>
8149
8150         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8151         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8152         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8153         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8154         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8155
8156 2017-06-12  Pedro Alves  <palves@redhat.com>
8157
8158         * dwarf2read.c (mapped_symtab::data): Now a vector of
8159         symtab_index_entry instead of vector of
8160         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8161         whether an element's name is NULL instead of checking whether the
8162         element itself is NULL.
8163         (find_slot): Change return type.  Adjust.
8164         (hash_expand, , add_index_entry, uniquify_cu_indices)
8165         (write_hash_table): Adjust.
8166
8167 2017-06-12  Pedro Alves  <palves@redhat.com>
8168
8169         * dwarf2read.c (recursively_count_psymbols): New function.
8170         (write_psymtabs_to_index): Call it to compute number of psyms and
8171         pass estimate size of psyms_seen to unordered_set's ctor.
8172
8173 2017-06-12  Pedro Alves  <palves@redhat.com>
8174
8175         * dwarf2read.c (write_hash_table): Check if key already exists
8176         before emplacing.
8177
8178 2017-06-12  Pedro Alves  <palves@redhat.com>
8179
8180         * dwarf2read.c (data_buf::append_space): Rename to...
8181         (data_buf::grow): ... this, and make private.  Adjust all callers.
8182         (data_buf::append_uint): New method.
8183         (add_address_entry, write_one_signatured_type)
8184         (write_psymtabs_to_index): Use it.
8185
8186 2017-06-12  Pedro Alves  <palves@redhat.com>
8187
8188         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8189         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8190         (data_buf::file_write): Call ::fwrite directly.
8191
8192 2017-06-12  Pedro Alves  <palves@redhat.com>
8193
8194         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8195         std::vector::erase.
8196
8197 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8198
8199         Code cleanup: C++ify .gdb_index producer.
8200         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8201         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8202         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8203         (create_strtab, add_string): Remove.
8204         (file_write, data_buf): New.
8205         (struct symtab_index_entry): Use std::vector for cu_indices.
8206         (struct mapped_symtab): Use std::vector for data.
8207         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8208         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8209         Remove.
8210         (find_slot): Change return type.  Update it to the new data structures.
8211         (hash_expand, add_index_entry): Update it to the new data structures.
8212         (offset_type_compare): Remove.
8213         (uniquify_cu_indices): Update it to the new data structures.
8214         (c_str_view, c_str_view_hasher, vector_hasher): New.
8215         (add_indices_to_cpool): Remove.
8216         (write_hash_table): Update it to the new data structures.
8217         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8218         (eq_psymtab_cu_index): Remove.
8219         (psym_index_map): New typedef.
8220         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8221         reference and std::unordered_map for cu_index_htab.
8222         (add_address_entry, add_address_entry_worker, write_address_map)
8223         (write_psymbols): Update it to the new data structures.
8224         (write_obstack): Remove.
8225         (struct signatured_type_index_data): Change types_list to a data_buf
8226         reference and psyms_seen to a std::unordered_set reference.
8227         (write_one_signatured_type, recursively_write_psymbols)
8228         (write_psymtabs_to_index): Update it to the new data structures.
8229
8230 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8231
8232         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8233         separate-debug-file commands.
8234         * symfile.h (separate_debug_file_debug): New global.
8235         * symfile.c (separate_debug_file_debug): New global.
8236         (separate_debug_file_exists, find_separate_debug_file): Add
8237         debug output.
8238         (_initialize_symfile): Add "set debug separate-debug-file"
8239         command.
8240         * build-id.c (build_id_to_debug_bfd,
8241         find_separate_debug_file_by_buildid): Add debug output.
8242
8243 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8244
8245         * gdbarch.sh (displaced_step_free_closure): Remove.
8246         * gdbarch.h, gdbarch.c: Re-generate.
8247         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8248         displaced_step_free_closure.
8249         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8250         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8251         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8252         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8253         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8254         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8255         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8256         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8257         * infrun.c (displaced_step_clear): Call xfree instead of
8258         gdbarch_displaced_step_free_closure.
8259
8260 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8261
8262         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8263         NULL".
8264
8265 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8266
8267         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8268         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8269         (mn10300_push_dummy_call): Likewise.
8270
8271 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8272
8273         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8274
8275 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8276
8277         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8278
8279 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8280
8281         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8282         able to start inferiors using a shell.
8283         (New remote packets): Announce new packet "QStartupWithShell".
8284         * remote.c: Add PACKET_QStartupWithShell.
8285         (extended_remote_create_inferior): Handle new
8286         PACKET_QStartupWithShell.
8287         (remote_protocol_features) <QStartupWithShell>: New entry for
8288         PACKET_QStartupWithShell.
8289         (_initialize_remote): Call "add_packet_config_cmd" for
8290         QStartupShell.
8291
8292 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8293             Pedro Alves  <palves@redhat.com>
8294
8295         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8296         and "nat/fork-inferior.h".
8297         * common/common-inferior.h: New file, with contents from
8298         "gdb/inferior.h".
8299         * commom/common-utils.c: Include "common-utils.h".
8300         (stringify_argv): New function.
8301         * common/common-utils.h (stringify_argv): New prototype.
8302         * configure.nat: Add "fork-inferior.o" as a dependency for
8303         "*linux*", "fbsd*" and "nbsd*" hosts.
8304         * corefile.c (get_exec_file): Update comment.
8305         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8306         instead of "startup_inferior".
8307         (darwin_create_inferior): Call "add_thread_silent" after
8308         "fork_inferior".
8309         * fork-child.c: Cleanup unnecessary includes.
8310         (SHELL_FILE): Move to "common/common-fork-child.c".
8311         (environ): Likewise.
8312         (exec_wrapper): Initialize.
8313         (get_exec_wrapper): New function.
8314         (breakup_args): Move to "common/common-fork-child.c"; rename to
8315         "breakup_args_for_exec".
8316         (escape_bang_in_quoted_argument): Move to
8317         "common/common-fork-child.c".
8318         (saved_ui): New variable.
8319         (prefork_hook): New function.
8320         (postfork_hook): Likewise.
8321         (postfork_child_hook): Likewise.
8322         (gdb_startup_inferior): Likewise.
8323         (fork_inferior): Move to "common/common-fork-child.c".  Update
8324         function to support gdbserver.
8325         (startup_inferior): Likewise.
8326         * gdbcore.h (get_exec_file): Remove declaration.
8327         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8328         instead of "startup_inferior".  Call "add_thread_silent" after
8329         "fork_inferior".
8330         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8331         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8332         instead of "startup_inferior".  Call "add_thread_silent" after
8333         "fork_inferior".
8334         * inferior.h: Include "common-inferior.h".
8335         (trace_start_error): Move to "common/common-utils.h".
8336         (trace_start_error_with_name): Likewise.
8337         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8338         (startup_inferior): Likewise.
8339         (gdb_startup_inferior): New prototype.
8340         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8341         * nat/fork-inferior.h: New file.
8342         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8343         instead of "startup_inferior".  Call "add_thread_silent" after
8344         "fork_inferior".
8345         * target.h (target_terminal_init): Move prototype to
8346         "target/target.h".
8347         (target_terminal_inferior): Likewise.
8348         (target_terminal_ours): Likewise.
8349         * target/target.h (target_terminal_init): New prototype, moved
8350         from "target.h".
8351         (target_terminal_inferior): Likewise.
8352         (target_terminal_ours): Likewise.
8353         * utils.c (gdb_flush_out_err): New function.
8354
8355 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8356
8357         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8358         * common/common-gdbthread.h: New file, with parts from
8359         "gdb/gdbthread.h".
8360         * gdbthread.h: Include "common-gdbthread.h".
8361         (switch_to_thread): Moved to "common/common-gdbthread.h".
8362
8363 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8364
8365         * Makefile.in (SFILES): Add "common/job-control.c".
8366         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8367         (COMMON_OBS): Add "job-control.o".
8368         * common/job-control.c: New file, with contents from
8369         "gdb/inflow.c".
8370         * common/job-control.h: New file, with contents from "terminal.h".
8371         * fork-child.c: Include "job-control.h".
8372         * inflow.c: Include "job-control.h".
8373         (gdb_setpgid): Move to "common/common-inflow.c".
8374         (_initialize_inflow): Move setting of "job_control" to
8375         "handle_job_control".
8376         * terminal.h (job_control): Moved to "common/common-terminal.h".
8377         (gdb_setpgid): Likewise.
8378         * top.c: Include "job_control.h".
8379         * utils.c: Likewise.
8380         (job_control): Moved to "job-control.c".
8381
8382 2017-06-07  Pedro Alves  <palves@redhat.com>
8383
8384         * Makefile.in (SFILES): Add gdb_regex.c.
8385         (COMMON_OBS): Add gdb_regex.o.
8386         * ada-lang.c (ada_add_standard_exceptions)
8387         (ada_add_exceptions_from_frame, name_matches_regex)
8388         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8389         parameter type to compiled_regex.  Adjust.
8390         (ada_exceptions_list): Use compiled_regex.
8391         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8392         std::unique_ptr<compiled_regex>.
8393         (exception_catchpoint::~exception_catchpoint): Remove regfree
8394         call.
8395         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8396         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8397         * breakpoint.c (solib_catchpoint::compiled): Now a
8398         std::unique_ptr<compiled_regex>.
8399         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8400         (check_status_catch_solib): Adjust to use compiled_regex.
8401         (add_solib_catchpoint): Adjust to use compiled_regex.
8402         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8403         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8404         compiled_regex reference.  Adjust to use it.
8405         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8406         declaration.  Include "gdb_regex.h".
8407         (apropos_cmd): Change regex parameter to compiled_regex reference.
8408         * gdb_regex.c: New file.
8409         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8410         declarations.
8411         (class compiled_regex): New.
8412         * linux-tdep.c: Include "common/gdb_optional.h".
8413         (struct mapping_regexes): New, factored out from
8414         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8415         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8416         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8417         * probe.c: Include "common/gdb_optional.h".
8418         (collect_probes): Use compiled_regex and gdb::optional and remove
8419         cleanups.
8420         * skip.c: Include "common/gdb_optional.h".
8421         (skiplist_entry::compiled_function_regexp): Now a
8422         gdb::optional<compiled_regex>.
8423         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8424         (free_skiplist_entry): Remove regfree call.
8425         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8426         compiled_regex and gdb::optional.
8427         * symtab.c: Include "common/gdb_optional.h".
8428         (search_symbols): Use compiled_regex and gdb::optional.
8429         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8430         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8431         to gdb_regex.c.
8432
8433 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8434
8435         * regcache.c (regcache::save): Avoid buffer use.
8436         (regcache::dump): Likewise.
8437
8438 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8439
8440         * sh-tdep.c (sh_pseudo_register_read): Remove
8441         MAX_REGISTER_SIZE.
8442         (sh_pseudo_register_write): Likewise.
8443         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8444         (sh64_pseudo_register_write): Likewise
8445
8446 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8447
8448         * aarch64-tdep.c (aarch64_store_return_value): Use
8449         V_REGISTER_SIZE.
8450         (aarch64_pseudo_read_value): Likewise.
8451         (aarch64_pseudo_write): Likewise.
8452
8453 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8454
8455         * regformats/regdef.h (set_register_cache): Remove the
8456         declaration.
8457
8458 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8459
8460         * frame.c (frame_unwind_register_signed): Use
8461         frame_unwind_register_value.
8462
8463 2017-06-06  Pedro Alves  <palves@redhat.com>
8464
8465         PR breakpoints/21553
8466         * breakpoint.c (create_breakpoints_sal_default)
8467         (init_breakpoint_sal, create_breakpoint_sal): Use
8468         gdb::unique_xmalloc_ptr for string parameters.
8469         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8470         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8471         (base_breakpoint_create_breakpoints_sal)
8472         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8473         (strace_marker_create_breakpoints_sal)
8474         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8475         string parameters.
8476         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8477         gdb::unique_xmalloc_ptr for string parameters.
8478         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8479         parameters.
8480
8481 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8482
8483         * alpha-tdep.c (alpha_register_to_value): Use
8484         get_frame_register_value.
8485         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8486
8487 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8488
8489         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8490         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8491         (ia64_value_to_register): Likewise.
8492         (ia64_extract_return_value): Likewise.
8493         (ia64_store_return_value): Likewise.
8494         (ia64_push_dummy_call): Likewise.
8495
8496 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8497
8498         GDB 8.0 released.
8499
8500 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8501
8502         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8503
8504 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8505
8506         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8507         parameter.
8508         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8509
8510 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8511
8512         * event-loop.c (poll_timers): Unallocate timer using delete
8513         instead of xfree.
8514
8515 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8516
8517         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8518         (struct breakpoint) <~breakpoint>: New.
8519         (struct watchpoint): Inherit from breakpoint.
8520         <~watchpoint>: New.
8521         <base>: Remove.
8522         (struct tracepoint): Inherit from breakpoint.
8523         <base>: Remove.
8524         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8525         (struct longjmp_breakpoint): Inherit from breakpoint.
8526         <~longjmp_breakpoint>: New.
8527         <base>: Remove.
8528         (new_breakpoint_from_type): Remove casts.
8529         (watchpoint_in_thread_scope): Remove reference to base field.
8530         (watchpoint_del_at_next_stop): Likewise.
8531         (update_watchpoint): Likewise.
8532         (watchpoint_check): Likewise.
8533         (bpstat_check_watchpoint): Likewise.
8534         (set_longjmp_breakpoint): Likewise.
8535         (struct fork_catchpoint): Inherit from breakpoint.
8536         <base>: Remove.
8537         (struct solib_catchpoint): Inherit from breakpoint.
8538         <~solib_catchpoint>: New.
8539         <base>: Remove.
8540         (dtor_catch_solib): Change to ...
8541         (solib_catchpoint::~solib_catchpoint): ... this.
8542         (breakpoint_hit_catch_solib): Remove reference to base field.
8543         (add_solib_catchpoint): Likewise.
8544         (create_fork_vfork_event_catchpoint): Likewise.
8545         (struct exec_catchpoint): Inherit from breakpoint.
8546         <~exec_catchpoint>: New.
8547         <base>: Remove.
8548         (dtor_catch_exec): Change to ...
8549         (exec_catchpoint::~exec_catchpoint): ... this.
8550         (dtor_watchpoint): Change to ...
8551         (watchpoint::~watchpoint): ... this.
8552         (watch_command_1): Remove reference to base field.
8553         (catch_exec_command_1): Likewise.
8554         (base_breakpoint_dtor): Change to ...
8555         (breakpoint::~breakpoint): ... this.
8556         (base_breakpoint_ops): Remove dtor field value.
8557         (longjmp_bkpt_dtor): Change to ...
8558         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8559         (strace_marker_create_breakpoints_sal): Remove reference to base
8560         field.
8561         (delete_breakpoint): Don't manually call breakpoint destructor.
8562         (create_tracepoint_from_upload): Remove reference to base field.
8563         (trace_pass_set_count): Likewise.
8564         (initialize_breakpoint_ops): Don't initialize
8565         momentary_breakpoint_ops, don't set dtors.
8566         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8567         <~ada_catchpoint>: New.
8568         <base>: Remove.
8569         (create_excep_cond_exprs): Remove reference to base field.
8570         (dtor_exception): Change to ...
8571         (ada_catchpoint::~ada_catchpoint): ... this.
8572         (dtor_catch_exception): Remove.
8573         (dtor_catch_exception_unhandled): Remove.
8574         (dtor_catch_assert): Remove.
8575         (create_ada_exception_catchpoint): Remove reference to base
8576         field.
8577         (initialize_ada_catchpoint_ops): Don't set dtors.
8578         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8579         breakpoint.
8580         <~signal_catchpoint>: New.
8581         <base>: Remove.
8582         (signal_catchpoint_dtor): Change to ...
8583         (signal_catchpoint::~signal_catchpoint): ... this.
8584         (create_signal_catchpoint): Remove reference to base field.
8585         (initialize_signal_catchpoint_ops): Don't set dtor.
8586         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8587         from breakpoint.
8588         <~syscall_catchpoint>: New.
8589         <base>: Remove.
8590         (dtor_catch_syscall): Change to ...
8591         (syscall_catchpoint::~syscall_catchpoint): ... this.
8592         (create_syscall_event_catchpoint): Remove reference to base
8593         field.
8594         (initialize_syscall_catchpoint_ops): Don't set dtor.
8595         * break-catch-throw.c (struct exception_catchpoint): Inherit
8596         from breakpoint.
8597         <~exception_catchpoint>: New.
8598         <base>: Remove.
8599         (dtor_exception_catchpoint): Change to ...
8600         (exception_catchpoint::~exception_catchpoint): ... this.
8601         (handle_gnu_v3_exceptions): Remove reference to base field.
8602         (initialize_throw_catchpoint_ops): Don't set dtor.
8603         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8604         field.
8605         * remote.c (remote_get_tracepoint_status): Likewise.
8606         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8607         * tracefile.c (tracefile_fetch_registers): Likewise.
8608         * tracepoint.c (actions_command): Likewise.
8609         (validate_actionline): Likewise.
8610         (tfind_1): Likewise.
8611         (get_traceframe_location): Likewise.
8612         (find_matching_tracepoint_location): Likewise.
8613         (parse_tracepoint_status): Likewise.
8614         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8615
8616 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8617
8618         * breakpoint.c (struct longjmp_breakpoint): New struct.
8619         (is_tracepoint_type): Change return type to bool.
8620         (is_longjmp_type): New function.
8621         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8622         (set_raw_breakpoint_without_location): Use
8623         new_breakpoint_from_type.
8624         (set_raw_breakpoint): Likewise.
8625
8626 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8627
8628         * breakpoint.c (new_breakpoint_from_type): New function.
8629         (create_breakpoint_sal): Use new_breakpoint_from_type and
8630         unique_ptr.
8631         (create_breakpoint): Likewise.
8632
8633 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8634
8635         * memattr.c (mem_info_command): Rename to ...
8636         (info_mem_command): ... this.
8637         (mem_enable_command): Rename to ...
8638         (enable_mem_command): ... this.
8639         (mem_disable_command): Rename to ...
8640         (disable_mem_command): ... this.
8641         (mem_delete_command): Rename to ...
8642         (delete_mem_command): ... this.
8643         (_initialize_mem): Adjust function names.
8644
8645 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8646
8647         * btrace.c (handle_pt_insn_events): New.
8648         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8649         STATUS.  Split into this and ...
8650         (handle_pt_insn_event_flags): ... this.
8651
8652 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8653
8654         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8655         and struct pt_insn.resynced.
8656         * configure: Regenerated.
8657         * config.in: Regenerated.
8658
8659 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8660
8661         * btrace.c (ftrace_find_call_by_number): New function.
8662         (ftrace_new_function): Store objects, not pointers.
8663         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8664         ftrace_new_gap, ftrace_update_function,
8665         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8666         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8667         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8668         btrace_ends_with_single_insn, btrace_call_get): Account for
8669         btrace_thread_info::functions now storing objects.
8670         * btrace.h (struct btrace_thread_info): Add constructor.
8671         (struct btrace_thread_info) <functions>: Make std::vector.
8672         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8673         Initialize with default values.
8674         * record-btrace.c (record_btrace_frame_sniffer): Account for
8675         btrace_thread_info::functions now storing objects.
8676
8677 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8678
8679         * btrace.c: Remove typedef bfun_s.
8680         (ftrace_new_gap): Directly add gaps to the list of gaps.
8681         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8682         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8683         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8684         instead of gdb VEC.
8685
8686 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8687
8688         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8689         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8690         with btrace_thread_info::next_segment and
8691         btrace_thread_info::prev_segment.
8692         * btrace.h: Remove struct btrace_func_link.
8693         (struct btrace_function): Replace pair of function segment pointers
8694         with pair of indices.
8695         * python/py-record-btrace.c (btpy_call_prev_sibling,
8696         btpy_call_next_sibling): Replace references to
8697         btrace_thread_info::segment with btrace_thread_info::next_segment and
8698         btrace_thread_info::prev_segment.
8699         * record-btrace.c (record_btrace_frame_this_id): Use
8700         btrace_find_call_by_number.
8701
8702 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8703
8704         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8705         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8706         btrace_insn_next, btrace_insn_prev): Remove references to
8707         btrace_thread_info::flow.
8708         * btrace.h (struct btrace_function): Remove FLOW.
8709
8710 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8711
8712         * btrace.c (ftrace_find_call_by_number): New function.
8713         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8714         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8715         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8716         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8717         index.
8718         * btrace.h (struct btrace_function): Turn UP into an index.
8719         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8720         as an index.
8721         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8722         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8723         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8724
8725 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8726
8727         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8728         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8729         ftrace_update_function, ftrace_compute_global_level_offset,
8730         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8731         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8732         btrace_insn_end, btrace_is_empty): Remove references to
8733         btrace_thread_info::begin and btrace_thread_info::end.
8734         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8735         (struct btrace_thread_info) <functions>: Adjust comment.
8736         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8737         btrace_thread_info::begin.
8738
8739 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8740
8741         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8742         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8743         ftrace_update_function): Remove arguments that implicitly were always
8744         BTINFO->END.
8745         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8746         Don't pass BTINFO->END.
8747
8748 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8749
8750         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8751         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8752         btrace_find_insn_by_number): Replace function segment pointer with
8753         index.
8754         (btrace_insn_cmp): Simplify.
8755         * btrace.h: (struct btrace_insn_iterator) Rename index to
8756         insn_index.  Replace function segment pointer with index into function
8757         segment vector.
8758         * record-btrace.c (record_btrace_call_history): Replace function
8759         segment pointer use with index.
8760         (record_btrace_frame_sniffer): Retrieve function call segment through
8761         vector.
8762         (record_btrace_set_replay): Remove defunc't safety check.
8763
8764 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8765
8766         * btrace.c (btrace_ends_with_single_insn): New function.
8767         (btrace_call_get, btrace_call_number, btrace_call_begin,
8768         btrace_call_end, btrace_call_next, btrace_call_prev,
8769         btrace_find_call_by_number): Use index into call segment vector
8770         instead of pointer.
8771         (btrace_call_cmp): Simplify.
8772         * btrace.h (struct btrace_call_iterator): Replace function call segment
8773         pointer with index into vector.
8774         * record-btrace.c (record_btrace_call_history): Use index instead of
8775         pointer.
8776
8777 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8778
8779         * btrace.c (btrace_insn_begin, btrace_insn_end,
8780         btrace_find_insn_by_number): Add btinfo to iterator.
8781         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8782
8783 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8784
8785         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8786         and save pointers directly.
8787         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8788         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8789         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8790         changed signature of functions.
8791         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8792         (btrace_fetch): Remove code that adds btrace_function pointers to
8793         vector of btrace_functions.
8794         (btrace_clear): Simplify freeing vector of btrace_functions.
8795
8796 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8797
8798         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8799         Replace VEC_* with std::vector functions.
8800         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8801         (struct btrace_thread_info)<functions>: Change type to std::vector.
8802
8803 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8804
8805         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8806         "Removed targets and native configurations" up.  Merge duplicate
8807         "New commands" sub-sections.  Add "New options" sub-sections.
8808
8809 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8810
8811         * defs.h (copy_integer_to_size): New declaration.
8812         * findvar.c (copy_integer_to_size): New function.
8813         (do_cint_test): New selftest function.
8814         (copy_integer_to_size_test): Likewise.
8815         (_initialize_findvar): Likewise.
8816         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8817         (mips_fbsd_collect_reg): Use raw_collect_integer.
8818         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8819         (mips64_fill_gregset): Use raw_collect_integer
8820         (mips64_fill_fpregset): Use raw_supply_integer.
8821         * regcache.c (regcache::raw_supply_integer): New function.
8822         (regcache::raw_collect_integer): Likewise.
8823         * regcache.h: (regcache::raw_supply_integer): New declaration.
8824         (regcache::raw_collect_integer): Likewise.
8825
8826 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8827
8828         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8829         (COMMON_OBS): Add gdbarch-selftests.o.
8830         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8831         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8832         * gdbarch-selftests.c: New file.
8833         * regcache.h (regcache) <~regcache>: Mark it virtual if
8834         GDB_SELF_TEST.
8835         <raw_write>: Likewise.
8836
8837 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8838
8839         * regcache.c (current_regcache): Change it to
8840         regcache::current_regcache.
8841         (regcache_observer_target_changed): Update.
8842         (regcache_thread_ptid_changed): Make it a regcache static
8843         method.
8844         (regcache_thread_ptid_changed): Update.
8845         (class regcache_access): New.
8846         (current_regcache_test): Update.
8847         (_initialize_regcache): Update.
8848         * regcache.h: Include forward_list.
8849         (regcache): Declare regcache_thread_ptid_changed and declare
8850         registers_changed_ptid as friend.
8851
8852 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8853
8854         * i387-tdep.c (i387_register_to_value): Use register_size
8855         instead of TYPE_LENGTH.
8856         * m68k-tdep.c (m68k_register_to_value): Likewise.
8857
8858 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8859
8860         * i387-tdep.c (i387_convert_register_p): Return false if type
8861         code isn't TYPE_CODE_FLT.
8862
8863 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8864
8865         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8866         length is 4.
8867         (alpha_register_to_value): Remove type length check.
8868         (alpha_value_to_register): Likewise.
8869
8870 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8871
8872         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8873         TYPE_CODE_FLT.
8874
8875 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8876
8877         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8878         TYPE_CODE_FLT or not.
8879
8880 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8881
8882         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8883         * avr-tdep.c (avr_gdbarch_init): Likewise.
8884         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8885         * cris-tdep.c (cris_gdbarch_init): Likewise.
8886         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8887         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8888         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8889         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8890         * mep-tdep.c (mep_gdbarch_init): Likewise.
8891         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8892         * mips-tdep.c (mips_gdbarch_init): Likewise.
8893         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8894         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8895         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8896         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8897         * v850-tdep.c (v850_gdbarch_init): Likewise.
8898
8899 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8900
8901         * selftest-arch.c (tests_with_arch): Call registers_changed
8902         and reinit_frame_cache.
8903         * selftest.c (run_self_tests): Likewise.
8904
8905 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8906
8907         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8908         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8909
8910 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8911
8912         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8913         set_gdbarch_print_insn.
8914
8915 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8916
8917         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8918         set_gdbarch_print_insn.
8919
8920 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8921
8922         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8923         set_gdbarch_print_insn.
8924         * arc-tdep.c (arc_gdbarch_init): Likewise.
8925         * arch-utils.c: include dis-asm.h.
8926         (default_print_insn): New function.
8927         * arch-utils.h (default_print_insn): Declare.
8928         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8929         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8930         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8931         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8932         * frv-tdep.c (frv_gdbarch_init): Likewise.
8933         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8934         * gdbarch.sh (print_insn): Use default_print_insn.
8935         * gdbarch.c: Regenerated.
8936         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8937         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8938         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8939         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8940         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8941         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8942         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8943         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8944         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8945         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8946         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8947         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8948         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8949         * mt-tdep.c (mt_gdbarch_init): Likewise.
8950         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8951         * nios2-tdep.c (nios2_print_insn): Remove.
8952         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8953         * rx-tdep.c (rx_gdbarch_init): Likewise.
8954         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8955         * score-tdep.c (score_print_insn): Remove.
8956         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8957         * sh-tdep.c (sh_gdbarch_init): Likewise.
8958         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8959         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8960         * tic6x-tdep.c (tic6x_print_insn): Remove.
8961         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8962         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8963         * v850-tdep.c (v850_gdbarch_init): Likewise.
8964         * vax-tdep.c (vax_gdbarch_init): Likewise.
8965         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8966         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8967
8968 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8969
8970         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8971         (MIPS_FP0_REGNUM): Remove.
8972         (MIPS_FSR_REGNUM): Remove.
8973         (mips_fbsd_supply_fpregs): Use mips_regnum.
8974         (mips_fbsd_supply_gregs): Likewise.
8975         (mips_fbsd_collect_fpregs): Likewise.
8976         (mips_fbsd_collect_gregs): Likewise.
8977
8978 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8979
8980         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8981         (getpfpregs_supplies): New function.
8982         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8983         getfpregs_supplies.
8984         (mips_fbsd_store_inferior_registers): Likewise.
8985
8986 2017-05-22  Pedro Alves <palves@redhat.com>
8987
8988         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8989         maintainer.
8990
8991 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
8992
8993         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8994         (store_register): Likewise.
8995         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8996         (get_decimal_float_return_value): Likewise.
8997         (do_ppc_sysv_return_value): Likewise.
8998         (ppc64_sysv_abi_push_integer): Likewise.
8999         (ppc64_sysv_abi_push_freg): Likewise.
9000         (ppc64_sysv_abi_return_value_base): Likewise.
9001         (ppc64_sysv_abi_return_value): Likewise.
9002         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9003         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9004         * rs6000-nat.c: Likewise.
9005         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9006         (rs6000_value_to_register): Likewise.
9007         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9008
9009 2017-05-21  Tom Tromey  <tom@tromey.com>
9010
9011         PR rust/21466:
9012         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9013         arrays as "[T]", not "[T; ]".
9014
9015 2017-05-19  Tom Tromey  <tom@tromey.com>
9016
9017         PR rust/21484:
9018         * rust-lang.c (exp_descriptor_rust): New function.
9019         (rust_language_defn): Use it.
9020         * p-lang.c (pascal_language_defn): Update.
9021         * opencl-lang.c (opencl_language_defn): Update.
9022         * objc-lang.c (objc_language_defn): Update.
9023         * m2-lang.c (m2_language_defn): Update.
9024         * language.h (struct language_defn)
9025         <la_watch_location_expression>: New member.
9026         * language.c (unknown_language_defn, auto_language_defn)
9027         (local_language_defn): Update.
9028         * go-lang.c (go_language_defn): Update.
9029         * f-lang.c (f_language_defn): Update.
9030         * d-lang.c (d_language_defn): Update.
9031         * c-lang.h (c_watch_location_expression): Declare.
9032         * c-lang.c (c_watch_location_expression): New function.
9033         (c_language_defn, cplus_language_defn, asm_language_defn)
9034         (minimal_language_defn): Use it.
9035         * breakpoint.c (watch_command_1): Call
9036         la_watch_location_expression.
9037         * ada-lang.c (ada_language_defn): Update.
9038
9039 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9040
9041         PR tui/21482
9042         * gdb_curses.h (NOMACROS): Define.
9043         (NCURSES_NOMACROS): Define.
9044
9045 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9046
9047         PR tui/21482
9048         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9049         arg to char *.
9050         * tui/tui-wingeneral.c (box_win): Likewise.
9051         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9052         (tui_show_source_line): Likewise.
9053         (tui_show_exec_info_content): Likewise.
9054
9055 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9056
9057         * sparc-tdep.c (sparc_structure_return_p)
9058         (sparc_arg_on_registers_p): New functions.
9059         (sparc32_store_arguments): Use them.
9060         * sparc64-tdep.c (sparc64_16_byte_align_p)
9061         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9062         Handle TYPE_CODE_ARRAY.
9063
9064 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9065
9066         * cli/cli-decode.c (add_alias_cmd): New function.
9067         * command.h (add_alias_cmd): Declare.
9068         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9069         instead call add_alias_cmd.
9070
9071 2017-05-17  Pedro Alves  <palves@redhat.com>
9072
9073         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9074         (nat_makefile_frag): ... this.  All references updated.
9075         * configure.ac: Likewise.
9076         * configure.nat: Likewise.  Enhance comments.
9077         * configure: Regenerate.
9078
9079 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9080
9081         * procfs.c (procfs_create_inferior): Change prototype to match
9082         definition.
9083
9084 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9085
9086         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9087         C++ compiler warning.
9088
9089 2017-05-12  Tom Tromey  <tom@tromey.com>
9090
9091         PR rust/21483:
9092         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9093         recurse, just call value_struct_elt directly.
9094
9095 2017-05-12  Tom Tromey  <tom@tromey.com>
9096
9097         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9098         OP_RUST_ARRAY>: Fix.
9099
9100 2017-05-12  Tom Tromey  <tom@tromey.com>
9101
9102         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9103
9104 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9105
9106         * regcache.c: Include <forward_list>.
9107         (struct regcache_list): Remove.
9108         (current_regcache): Update.
9109         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9110         (regcache_thread_ptid_changed): Likewise.
9111         (registers_changed_ptid): Likewise.
9112         (current_regcache_size): Likewise.
9113
9114 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9115
9116         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9117         (current_regcache_size): New function.
9118         (current_regcache_test): New function.
9119         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9120
9121 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9122
9123         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9124         (print_gp_register_row): Use get_frame_register_value.
9125
9126 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9127
9128         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9129         (mips_supply_fpregset): Likewise.
9130         (mips64_supply_gregset): Likewise.
9131
9132 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9133
9134         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9135         regcache->raw_supply_zeroed.
9136
9137 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9138
9139         * configure.nat: Rearrange 'case' statements to match
9140         host before cpu.
9141
9142 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9143
9144         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9145         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9146         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9147         "@nat_extra_makefile_frag@".
9148         (Makefile): Remove dependency on "@frags@".
9149         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9150         (data-directory/Makefile): Likewise.
9151         * config/aarch64/linux.mh: Deleted; moved contents to
9152         "gdb/configure.nat".
9153         * config/alpha/alpha-linux.mh: Likewise.
9154         * config/alpha/nbsd.mh: Likewise.
9155         * config/arm/linux.mh: Likewise.
9156         * config/arm/nbsdelf.mh: Likewise.
9157         * config/i386/cygwin.mh: Likewise.
9158         * config/i386/cygwin64.mh: Likewise.
9159         * config/i386/darwin.mh: Likewise.
9160         * config/i386/fbsd.mh: Likewise.
9161         * config/i386/fbsd64.mh: Likewise.
9162         * config/i386/go32.mh: Likewise.
9163         * config/i386/i386gnu.mh: Likewise.
9164         * config/i386/i386sol2.mh: Likewise.
9165         * config/i386/linux.mh: Likewise.
9166         * config/i386/linux64.mh: Likewise.
9167         * config/i386/mingw.mh: Likewise.
9168         * config/i386/mingw64.mh: Likewise.
9169         * config/i386/nbsd64.mh: Likewise.
9170         * config/i386/nbsdelf.mh: Likewise.
9171         * config/i386/nto.mh: Likewise.
9172         * config/i386/obsd.mh: Likewise.
9173         * config/i386/obsd64.mh: Likewise.
9174         * config/i386/sol2-64.mh: Likewise.
9175         * config/ia64/linux.mh: Likewise.
9176         * config/m32r/linux.mh: Likewise.
9177         * config/m68k/linux.mh: Likewise.
9178         * config/m68k/nbsdelf.mh: Likewise.
9179         * config/m68k/obsd.mh: Likewise.
9180         * config/m88k/obsd.mh: Likewise.
9181         * config/mips/fbsd.mh: Likewise.
9182         * config/mips/linux.mh: Likewise.
9183         * config/mips/nbsd.mh: Likewise.
9184         * config/mips/obsd64.mh: Likewise.
9185         * config/pa/linux.mh: Likewise.
9186         * config/pa/nbsd.mh: Likewise.
9187         * config/pa/obsd.mh: Likewise.
9188         * config/powerpc/aix.mh: Likewise.
9189         * config/powerpc/fbsd.mh: Likewise.
9190         * config/powerpc/linux.mh: Likewise.
9191         * config/powerpc/nbsd.mh: Likewise.
9192         * config/powerpc/obsd.mh: Likewise.
9193         * config/powerpc/ppc64-linux.mh: Likewise.
9194         * config/powerpc/spu-linux.mh: Likewise.
9195         * config/s390/linux.mh: Likewise.
9196         * config/sh/nbsd.mh: Likewise.
9197         * config/sparc/fbsd.mh: Likewise.
9198         * config/sparc/linux.mh: Likewise.
9199         * config/sparc/linux64.mh: Likewise.
9200         * config/sparc/nbsd64.mh: Likewise.
9201         * config/sparc/nbsdelf.mh: Likewise.
9202         * config/sparc/obsd64.mh: Likewise.
9203         * config/sparc/sol2.mh: Likewise.
9204         * config/tilegx/linux.mh: Likewise.
9205         * config/vax/nbsdelf.mh: Likewise.
9206         * config/vax/obsd.mh: Likewise.
9207         * config/xtensa/linux.mh: Likewise.
9208         * config/i386/i386gnu.mn: New file, with excerpts from
9209         "config/i386/i386gnu.mh".
9210         * configure: Regenerate.
9211         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9212         *.mh files under "gdb/config".
9213         * configure.nat: New file, with contents from the
9214         "gdb/config/*/*.mh" files.
9215
9216 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9217
9218         * btrace.c (btrace_clear): Free insn vector.
9219
9220 2017-05-05  Pedro Alves  <palves@redhat.com>
9221
9222         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9223         * configure: Regenerate.
9224
9225 2017-05-04  Pedro Alves  <palves@redhat.com>
9226
9227         * Makefile.in (SFILES): Add progspace-and-thread.c.
9228         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9229         (COMMON_OBS): Add progspace-and-thread.o.
9230         * breakpoint.c: Include "progspace-and-thread.h".
9231         (update_inserted_breakpoint_locations)
9232         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9233         Use scoped_restore_current_pspace_and_thread.
9234         (create_std_terminate_master_breakpoint): Use
9235         scoped_restore_current_program_space.
9236         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9237         (print_breakpoint_location): Use
9238         scoped_restore_current_program_space.
9239         (bp_loc_is_permanent): Use
9240         scoped_restore_current_pspace_and_thread.
9241         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9242         (download_tracepoint_locations): Use
9243         scoped_restore_current_pspace_and_thread.
9244         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9245         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9246         (enum step_over_calls_kind): Moved from inferior.h.
9247         (class scoped_restore_current_thread): New class.
9248         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9249         declaration.
9250         (scoped_restore_current_thread): New class.
9251         * infcmd.c: Include "common/gdb_optional.h".
9252         (continue_1, proceed_after_attach): Use
9253         scoped_restore_current_thread.
9254         (notice_new_inferior): Use scoped_restore_current_thread.
9255         * inferior.c: Include "progspace-and-thread.h".
9256         (restore_inferior, save_current_inferior): Delete.
9257         (add_inferior_command, clone_inferior_command): Use
9258         scoped_restore_current_pspace_and_thread.
9259         * inferior.h (scoped_restore_current_inferior): New class.
9260         * infrun.c: Include "progspace-and-thread.h" and
9261         "common/gdb_optional.h".
9262         (follow_fork_inferior): Use
9263         scoped_restore_current_pspace_and_thread.
9264         (scoped_restore_exited_inferior): New class.
9265         (handle_vfork_child_exec_or_exit): Use
9266         scoped_restore_exited_inferior,
9267         scoped_restore_current_pspace_and_thread,
9268         scoped_restore_current_thread and scoped_restore.
9269         (fetch_inferior_event): Use scoped_restore_current_thread.
9270         * linespec.c (decode_line_full, decode_line_1): Use
9271         scoped_restore_current_program_space.
9272         * mi/mi-main.c: Include "progspace-and-thread.h".
9273         (exec_continue): Use scoped_restore_current_thread.
9274         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9275         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9276         * proc-service.c (ps_pglobal_lookup): Use
9277         scoped_restore_current_program_space.
9278         * progspace-and-thread.c: New file.
9279         * progspace-and-thread.h: New file.
9280         * progspace.c (release_program_space, clone_program_space): Use
9281         scoped_restore_current_program_space.
9282         (restore_program_space, save_current_program_space)
9283         (save_current_space_and_thread): Delete.
9284         (switch_to_program_space_and_thread): Moved to
9285         progspace-and-thread.c.
9286         * progspace.h (save_current_program_space)
9287         (save_current_space_and_thread): Delete declarations.
9288         (scoped_restore_current_program_space): New class.
9289         * remote.c (remote_btrace_maybe_reopen): Use
9290         scoped_restore_current_thread.
9291         * symtab.c: Include "progspace-and-thread.h".
9292         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9293         * thread.c (print_thread_info_1): Use
9294         scoped_restore_current_thread.
9295         (struct current_thread_cleanup): Delete.
9296         (do_restore_current_thread_cleanup)
9297         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9298         (scoped_restore_current_thread::~scoped_restore_current_thread):
9299         ... this new dtor.
9300         (make_cleanup_restore_current_thread): Rename/convert to ...
9301         (scoped_restore_current_thread::scoped_restore_current_thread):
9302         ... this new ctor.
9303         (thread_apply_all_command): Use scoped_restore_current_thread.
9304         (thread_apply_command): Use scoped_restore_current_thread.
9305         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9306         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9307
9308 2017-05-04  Pedro Alves  <palves@redhat.com>
9309
9310         * thread.c (make_cleanup_restore_current_thread): Move
9311         find_thread_ptid call before the is_stopped call.  Assert that the
9312         thread is found.  Replace is_stopped call by checking the thread's
9313         state directly.  Remove unnecessary NULL-thread check.
9314
9315 2017-05-04  Pedro Alves  <palves@redhat.com>
9316
9317         * corelow.c (thread_section_name): New class.
9318         (get_core_register_section, get_core_siginfo): Use it.
9319
9320 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9321
9322         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9323         (get_core_register_section): Remove xfree of NULL pointer.
9324
9325 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9326
9327         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9328         * regcache.c (regcache::raw_supply_zeroed): New function.
9329         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9330
9331 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9332
9333         * gdbarch.sh: Remove commented out definition of
9334         TARGET_CHAR_BIT.
9335         * gdbarch.h: Re-generate.
9336
9337 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9338
9339         * configure: Regenerate.
9340
9341 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9342
9343         * solib-target.c (solib_target_relocate_section_addresses):
9344         Remove num_section_bases, num_bases, segment_bases variables.
9345
9346 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9347
9348         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9349
9350 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9351
9352         * solib-target.c: Include <vector>
9353         (struct lm_info_target) <~lm_info_target>: Remove.
9354         <segment_bases, section_bases>: Change type to
9355         std::vector<CORE_ADDR>.
9356         (library_list_start_segment, library_list_start_section,
9357         library_list_end_library,
9358         solib_target_relocate_section_addresses): Adjust.
9359
9360 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9361
9362         * gdbarch.sh (software_single_step): Change return type to
9363         std::vector<CORE_ADDR>.
9364         * gdbarch.c, gdbarch.h: Re-generate.
9365         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9366         Adjust.
9367         (arm_deal_with_atomic_sequence_raw): Adjust.
9368         (thumb_get_next_pcs_raw): Adjust.
9369         (arm_get_next_pcs_raw): Adjust.
9370         (arm_get_next_pcs): Adjust.
9371         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9372         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9373         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9374         (alpha_software_single_step): Adjust.
9375         * alpha-tdep.h (alpha_software_single_step): Adjust.
9376         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9377         * arm-tdep.c (arm_software_single_step): Adjust.
9378         (arm_breakpoint_kind_from_current_state): Adjust.
9379         * arm-tdep.h (arm_software_single_step): Adjust.
9380         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9381         * cris-tdep.c (cris_software_single_step): Adjust.
9382         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9383         (micromips_deal_with_atomic_sequence): Adjust.
9384         (deal_with_atomic_sequence): Adjust.
9385         (mips_software_single_step): Adjust.
9386         * mips-tdep.h (mips_software_single_step): Adjust.
9387         * moxie-tdep.c (moxie_software_single_step): Adjust.
9388         * nios2-tdep.c (nios2_software_single_step): Adjust.
9389         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9390         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9391         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9392         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9393         * sparc-tdep.c (sparc_software_single_step): Adjust.
9394         * spu-tdep.c (spu_software_single_step): Adjust.
9395         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9396
9397 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9398
9399         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9400         * gdbarch.h: Re-generate.
9401
9402 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9403
9404         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9405         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9406         * python/py-instruction.c, python/py-instruction.h: New file.
9407         * python/py-record.c: Add py-instruction.h include.
9408         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9409         gdb.RecordInstruction.
9410         * python/python-internal.h: Add gdbpy_initialize_instruction
9411         declaration.
9412         * python/python.c (do_start_initialization): Add
9413         gdbpy_initialize_instruction.
9414
9415 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9416
9417         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9418         Remove.
9419         (btrace_func_from_recpy_func): New function.
9420         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9421         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9422         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9423         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9424         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9425         Also, use new helper functions.
9426         (btpy_list_item): Use new helper functions.
9427         (recpy_bt_function_call_history): Use new type name.
9428         (btpy_call_getset): Remove.
9429         (gdbpy_initialize_btrace): Remove code to initialize
9430         gdb.BtraceFunctionCall.
9431         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9432         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9433         recpy_bt_func_prev, recpy_bt_func_next): New export.
9434         * python/py-record.c (recpy_func_type): New static object.
9435         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9436         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9437         recpy_func_next): New function.
9438         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9439         (recpy_func_getset): New static object.
9440         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9441         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9442
9443 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9444
9445         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9446         (btpy_object, btpy_insn_type, btpy_new): Remove.
9447         (btpy_list_object): Use gdb.RecordInstruction type instead of
9448         gdb.BtraceInstruction type.
9449         (btrace_insn_from_recpy_insn): New function.
9450         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9451         btpy_new.
9452         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9453         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9454         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9455         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9456         instead of btpy_object.
9457         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9458         btpy_insn_data, btpy_insn_decode): Rename to ...
9459         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9460         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9461         recpy_bt_insn_decode): This.  Also, use new helper functions.
9462         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9463         recpy_insn_type.
9464         (btpy_insn_getset): Remove.
9465         (gdbpy_initialize_btrace): Remove code to initialize
9466         gdb.BtraceInstruction.  Use recpy_element_object.
9467         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9468         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9469         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9470         * python/py-record.c (recpy_insn_type): New static object.
9471         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9472         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9473         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9474         New function.
9475         (recpy_insn_getset): New static object.
9476         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9477         * python/py-record.h (recpy_element_object): New typedef.
9478         (recpy_insn_type, recpy_insn_new): New export.
9479
9480 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9481
9482         * py-record-btrace.c (btpy_insn_new): Removed.
9483         (btpy_insn_or_gap_new): New function.
9484         (btpy_insn_error): Removed.
9485         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9486         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9487         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9488         btpy_insn_or_gap_new instead of btpy_insn_new.
9489         (btpy_insn_getset): Remove btpy_insn_error.
9490         * py-record.c (recpy_gap_type): New static object.
9491         (recpy_gap_object): New typedef.
9492         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9493         recpy_gap_reason_string): New function.
9494         (recpy_gap_getset): New static object.
9495         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9496         * py-record.h (recpy_gap_new): New export.
9497
9498 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9499
9500         * python/py-record.c (recpy_ptid): Remove.
9501         (recpy_record_getset): Remove recpy_ptid.
9502
9503 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9504
9505         * btrace.c (btrace_fetch): Set inferior_ptid.
9506         * python/py-record-btrace.c: Add "py-record.h" include.
9507         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9508         recpy_bt_end, recpy_bt_instruction_history,
9509         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9510         in gdb.Record object instead of current ptid.
9511         * python/py-record.c: Include new "py-record.h" file.
9512         (recpy_record_object): Moved to py-record.h.
9513         * python/py-record.h: New file.
9514
9515 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9516
9517         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9518         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9519         indentation.
9520
9521 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9522
9523         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9524         the past maintainers section.
9525
9526 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9527
9528         * infcmd.c (get_return_value): Use regcache ctor, and remove
9529         cleanup.
9530
9531 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9532             Pedro Alves  <palves@redhat.com>
9533
9534         * regcache.c (regcache::regcache): New tag dispatch ctor.
9535         (do_cooked_read): Moved above.
9536         (regcache_dup): Use the tag dispatch ctor..
9537         * regcache.h (regcache): Declare ctor, delete copy ctor and
9538         assignment operator, remove friend regcache_dup.
9539
9540 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9541
9542         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9543         call method save instead of regcache_cpy.
9544         * regcache.h (struct regcache): Make regcache_dup a friend.
9545
9546 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9547
9548         * regcache.c (struct regcache): Move to regcache.h
9549         (regcache::arch): New method.
9550         (regcache_get_ptid): Update.
9551         (get_regcache_arch): Call arch method.
9552         (get_regcache_aspace): Call method aspace.
9553         (register_buffer): Change it to method.
9554         (regcache_save): Change it to regcache::save.
9555         (regcache_restore): Likewise.
9556         (regcache_cpy_no_passthrough): Remove the declaration.
9557         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9558         (regcache_cpy_no_passthrough): Change it to method
9559         cpy_no_passthrough.
9560         (regcache_register_status): Change it to method
9561         get_register_status.
9562         (regcache_invalidate): Change it to method invalidate.
9563         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9564         (regcache_raw_update): Change it to method raw_update.
9565         (regcache_raw_read): Likewise.
9566         (regcache_raw_read_signed): Likewise.
9567         (regcache_raw_read_unsigned): Likewise.
9568         (regcache_raw_write_signed): Likewise.
9569         (regcache_raw_write_unsigned): Likewise.
9570         (regcache_cooked_read): Likewise.
9571         (regcache_cooked_read_value): Likewise.
9572         (regcache_cooked_read_signed): Likewise.
9573         (regcache_cooked_read_unsigned): Likewise.
9574         (regcache_cooked_write_signed): Likewise.
9575         (regcache_cooked_write_unsigned): Likewise.
9576         (regcache_raw_set_cached_value): Likewise.
9577         (regcache_raw_write): Likewise.
9578         (regcache_cooked_write): Likewise.
9579         (regcache_xfer_part): Likewise.
9580         (regcache_raw_read_part): Likewise.
9581         (regcache_raw_write_part): Likewise.
9582         (regcache_cooked_read_part): Likewise.
9583         (regcache_cooked_write_part): Likewise.
9584         (regcache_raw_supply): Likewise.
9585         (regcache_raw_collect): Likewise.
9586         (regcache_transfer_regset): Likewise.
9587         (regcache_supply_regset): Likewise.
9588         (regcache_collect_regset): Likewise.
9589         (regcache_debug_print_register): Likewise.
9590         (enum regcache_dump_what): Move it to regcache.h.
9591         (regcache_dump): Change it to method dump.
9592         * regcache.h (enum regcache_dump_what): New.
9593         (class regcache): New.
9594         * target.c (target_fetch_registers): Call method
9595         debug_print_register.
9596         (target_store_registers): Likewise.
9597
9598 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9599
9600         * windows-nat.c (struct lm_info_windows): Initialize field.
9601         (windows_make_so): Allocate lm_info_windows with new.
9602         (windows_free_so): Free lm_info_windows with delete.
9603
9604 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9605
9606         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9607         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9608         cleanup.
9609         (darwin_free_so): Free lm_info_darwin with delete.
9610
9611 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9612
9613         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9614         <l_addr_p>: Change type to bool.
9615         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9616         (svr4_free_so): Free lm_info_svr4 with delete.
9617         (svr4_copy_library_list): Replace memcpy with call to copy
9618         constructor.
9619         (library_list_start_library, svr4_default_sos): Allocate
9620         lm_info_svr4 with new.
9621
9622 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9623
9624         * solib-target.c (struct lm_info_target): Add destructor,
9625         initialize fields.
9626         <name>: Change type to std::string.
9627         (library_list_start_library): Allocate lm_info_target with new.
9628         (solib_target_free_library_list): Free lm_info_target with
9629         delete.
9630         (solib_target_current_sos): Adapt to std::string.
9631         (solib_target_free_so): Free lm_info_target with delete.
9632
9633 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9634
9635         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9636         fields.
9637         (frv_current_sos): Allocate lm_info_frv with new.
9638         (frv_relocate_main_executable): Free lm_info_frv with delete,
9639         allocate with new.
9640         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9641
9642 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9643
9644         * solib-frv.c (struct lm_info_frv): Fix indentation.
9645
9646 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9647
9648         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9649         map field.
9650         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9651         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9652         and allocate with new.
9653         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9654
9655 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9656
9657         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9658         <filename, member_name>: Change type to std::string.
9659         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9660         (library_list_start_library): Allocate lm_info_aix with new.
9661         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9662         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9663         with copy constructor.
9664
9665 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9666
9667         * solist.h (struct lm_info): Remove.
9668         (struct lm_info_base): New class.
9669         (struct so_list) <lm_info>: Change type to lm_info_base *.
9670         * nto-tdep.c (struct lm_info): Remove.
9671         (lm_addr): Adjust.
9672         * solib-aix.c (struct lm_info): Rename to ...
9673         (struct lm_info_aix): ... this.  Extend lm_info_base.
9674         (lm_info_p): Rename to ...
9675         (lm_info_aix_p): ... this, and adjust.
9676         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9677         solib_aix_parse_libraries, library_list_start_library,
9678         solib_aix_free_library_list, solib_aix_parse_libraries,
9679         solib_aix_get_library_list,
9680         solib_aix_relocate_section_addresses, solib_aix_free_so,
9681         solib_aix_get_section_offsets,
9682         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9683         Adjust.
9684         (struct solib_aix_inferior_data) <library_list>: Adjust.
9685         * solib-darwin.c (struct lm_info): Rename to ...
9686         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9687         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9688         * solib-dsbt.c (struct lm_info): Rename to ...
9689         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9690         (struct dsbt_info) <main_executable_lm_info): Adjust.
9691         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9692         dsbt_relocate_section_addresses): Adjust.
9693         * solib-frv.c (struct lm_info): Rename to ...
9694         (struct lm_info_frv): ... this.  Extend lm_info_base.
9695         (main_executable_lm_info): Adjust.
9696         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9697         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9698         find_canonical_descriptor_in_load_object,
9699         frv_fdpic_find_canonical_descriptor): Adjust.
9700         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9701         to lm_info_svr4.
9702         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9703         svr4_clear_so, svr4_copy_library_list,
9704         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9705         svr4_current_sos, svr4_fetch_objfile_link_map,
9706         solist_update_incremental): Adjust.
9707         * solib-svr4.h (struct lm_info_svr4): Move here from
9708         solib-svr4.c.
9709         * solib-target.c (struct lm_info): Rename to ...
9710         (struct lm_info_target): ... this.  Extend lm_info_base.
9711         (lm_info_p): Rename to ...
9712         (lm_info_target_p): ... this.
9713         (solib_target_parse_libraries, library_list_start_segment,
9714         library_list_start_section, library_list_start_library,
9715         library_list_end_library, solib_target_free_library_list,
9716         solib_target_current_sos, solib_target_free_so,
9717         solib_target_relocate_section_addresses): Adjust.
9718         * windows-nat.c (struct lm_info): Rename to ...
9719         (struct lm_info_windows): ... this.  Extend lm_info_base.
9720         (windows_make_so, handle_load_dll, handle_unload_dll,
9721         windows_xfer_shared_libraries): Adjust.
9722
9723 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9724
9725         * solib-darwin.c (struct darwin_so_list): Remove.
9726         (darwin_current_sos): Allocate an so_list object instead of a
9727         darwin_so_list, separately allocate an lm_info object.
9728         (darwin_free_so): Free lm_info.
9729
9730 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9731
9732         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9733         with fprintf_filtered.
9734
9735 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9736
9737         * regcache.c (regcache::regcache): New function.
9738         (regcache::~regcache): New function.
9739         (regcache_xmalloc_1): Remove.
9740         (regcache_xmalloc): Call new regcache.
9741         (regcache_xfree): Call delete regcache.
9742         (get_thread_arch_aspace_regcache): Call new regcache.
9743
9744 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9745
9746         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9747         lwp instead of ptid_get_lwp.
9748
9749 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9750
9751         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9752         lwp_info instead of getting from inferior_ptid.
9753
9754 2017-04-27  Keith Seitz  <keiths@redhat.com>
9755
9756         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9757         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9758         (CV_CONVERSION_BADNESS): Define.
9759         (rank_one_type): Remove overly restrictive rvalue reference
9760         rank checks.
9761         Add cv-qualifier checks and subranks for type equality.
9762         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9763         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9764         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9765
9766 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9767
9768         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9769         count when creating the object.
9770
9771 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9772             Ulrich Weigand  <uweigand@de.ibm.com>
9773
9774         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9775         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9776         is used in AIX.
9777         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9778         (process_xcoff_symbol): Likewise.
9779         (scan_xcoff_symtab): Likewise.
9780
9781 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9782
9783         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9784         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9785         (ia64_access_reg): Use get_frame_register_unsigned.
9786         (ia64_access_rse_reg): Likewise.
9787         (ia64_libunwind_frame_prev_register): Likewise.
9788
9789 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9790
9791         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9792         * gdbarch.c: Regenerated.
9793         * gdbarch.h: Regenerated.
9794         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9795         visibility external.
9796         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9797         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9798         (enum cfa_how_kind): Move to ...
9799         (struct dwarf2_frame_state_reg_info): Likewise.
9800         (struct dwarf2_frame_state): Likewise.
9801         * dwarf2-frame.h: ... here.
9802         (dwarf2_frame_state_alloc_regs): New declaration.
9803         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9804         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9805
9806 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9807
9808         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9809         regcache_raw_read_unsigned.
9810         (xtensa_pseudo_register_write): Likewise.
9811
9812 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9813
9814         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9815         (nds32_pseudo_register_write): Likewise.
9816
9817 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9818
9819         * regcache.c (struct regcache) <readonly_p>: Change its type
9820         to bool.
9821         (regcache_xmalloc_1): Update parameter type and callers update.
9822
9823 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9824
9825         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9826         set_gdbarch_wchar_bit.
9827         * arm-tdep.c (arm_gdbarch_init): Likewise.
9828
9829 2017-04-25  Pedro Alves  <palves@redhat.com>
9830
9831         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9832         (BothAreRelocatable, memcopy, memmove): Don't define.
9833         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9834         macros.
9835
9836 2017-04-25  Pedro Alves  <palves@redhat.com>
9837
9838         * common/common-defs.h: Include "common/poison.h".
9839         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9840         and adjust.
9841         * common/poison.h: New file.
9842         * common/traits.h: Include <type_traits>.
9843         (Not, Or, Requires): New, moved from common/function-view.h.
9844
9845 2017-04-25  Pedro Alves  <palves@redhat.com>
9846
9847         * breakpoint.h (struct breakpoint): In-class initialize all
9848         fields.  Make boolean fields "bool".
9849         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9850         memset call and initializations no longer necessary.
9851
9852 2017-04-25  Pedro Alves  <palves@redhat.com>
9853
9854         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9855         reference.
9856         (pt_btrace_insn): New function.
9857         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9858
9859 2017-04-25  Pedro Alves  <palves@redhat.com>
9860
9861         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9862         "base" field and inherit from "bp_location" instead.  Add
9863         non-default ctor.
9864         (allocate_location_exception): Use new non-default ctor.
9865         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9866         (init_bp_location): Convert to ...
9867         (bp_location::bp_location): ... this new ctor, and remove memset
9868         call.
9869         (base_breakpoint_allocate_location): Use the new non-default ctor.
9870         * breakpoint.h (bp_location): Now a class.  Declare default and
9871         non-default ctors.  In-class initialize all members.
9872         (init_bp_location): Remove declaration.
9873
9874 2017-04-25  Pedro Alves  <palves@redhat.com>
9875
9876         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9877         assignment operator.
9878
9879 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9880
9881         * doublest.c (convert_doublest_to_floatformat): Call
9882         floatformat_totalsize_bytes.
9883
9884 2017-04-22  Tom Tromey  <tom@tromey.com>
9885
9886         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9887         ui_out_emit_list.
9888         * stack.c (print_frame): Use ui_out_emit_list.
9889         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9890         ui_out_emit_list.
9891         * mi/mi-main.c (print_one_inferior)
9892         (mi_cmd_data_list_register_names)
9893         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9894         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9895         ui_out_emit_list.
9896         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9897         (mi_output_solib_attribs): Use ui_out_emit_list,
9898         ui_out_emit_tuple.
9899         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9900         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9901         (mi_cmd_stack_list_args, list_args_or_locals): Use
9902         ui_out_emit_list.
9903         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9904         * breakpoint.c (print_solib_event, output_thread_groups): Use
9905         ui_out_emit_list.
9906
9907 2017-04-22  Tom Tromey  <tom@tromey.com>
9908
9909         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9910         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9911         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9912
9913 2017-04-22  Tom Tromey  <tom@tromey.com>
9914
9915         * tracepoint.c (tvariables_info_1)
9916         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9917
9918 2017-04-22  Tom Tromey  <tom@tromey.com>
9919
9920         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9921         annotate_arg_emitter.
9922         * breakpoint.c (print_mention_watchpoint)
9923         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9924         * annotate.h (struct annotate_arg_emitter): New.
9925
9926 2017-04-22  Tom Tromey  <tom@tromey.com>
9927
9928         * record-btrace.c (record_btrace_insn_history)
9929         (record_btrace_insn_history_range, record_btrace_call_history)
9930         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9931         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9932         ui_out_emit_tuple.
9933         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9934         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9935         * skip.c (skip_info): Use ui_out_emit_tuple.
9936         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9937         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9938         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9939         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9940         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9941         ui_out_emit_tuple.
9942         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9943         (output_register, mi_cmd_data_read_memory)
9944         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9945         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9946         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9947         Use ui_out_emit_tuple.
9948         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9949         ui_out_emit_tuple.
9950         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9951         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9952         * linux-thread-db.c (info_auto_load_libthread_db): Use
9953         ui_out_emit_tuple.
9954         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9955         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9956         * disasm.c (do_mixed_source_and_assembly_deprecated)
9957         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9958         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9959         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9960         * breakpoint.c (print_one_breakpoint_location)
9961         (print_one_breakpoint): Use ui_out_emit_tuple.
9962         * auto-load.c (print_script, info_auto_load_cmd): Use
9963         ui_out_emit_tuple.
9964         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9965
9966 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9967
9968         * thread.c (print_thread_info_1): Remove dead code.
9969
9970 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9971
9972         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9973         GDB_SELF_TEST.
9974         * arm-tdep.c (selftests::arm_record_test): Likewise.
9975
9976 2017-04-21  Yao Qi  <yao.qi@linaro.org>
9977
9978         * regcache.c (regcache_restore): Remove argument 2.  Replace
9979         argument 3 with regcache.  Get register status from
9980         src->register_status and get register contents from
9981         register_buffer (src, regnum).
9982         (regcache_cpy): Update.
9983
9984 2017-04-19  Pedro Alves  <palves@redhat.com>
9985
9986         * gdbthread.h (thread): Add missing closing parenthesis in
9987         comment.
9988
9989 2017-04-19  Pedro Alves  <palves@redhat.com>
9990
9991         * common/refcounted-object.h: New file.
9992         * gdbthread.h: Include "common/refcounted-object.h".
9993         (thread_info): Inherit from refcounted_object and add comments.
9994         (thread_info::incref, thread_info::decref)
9995         (thread_info::m_refcount): Delete.
9996         (thread_info::deletable): Use the refcounted_object::refcount()
9997         method.
9998         * inferior.c (current_inferior_): Add comment.
9999         (set_current_inferior): Increment/decrement refcounts.
10000         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10001         not-deletable instead of comparing with the current inferior.
10002         (initialize_inferiors): Increment the initial inferior's refcount.
10003         * inferior.h (struct inferior): Forward declare.
10004         Include "common/refcounted-object.h".
10005         (current_inferior, set_current_inferior): Move declaration to
10006         before struct inferior's definition, and fix comment.
10007         (inferior): Inherit from refcounted_object.  Add comments.
10008         * thread.c (switch_to_thread_no_regs): Reference the thread's
10009         inferior pointer directly instead of doing a ptid lookup.
10010         (switch_to_no_thread): New function.
10011         (switch_to_thread(thread_info *)): New function, factored out
10012         from ...
10013         (switch_to_thread(ptid_t)): ... this.
10014         (restore_current_thread): Delete.
10015         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10016         fields, and add 'inf' field.
10017         (do_restore_current_thread_cleanup): Check whether old->inf is
10018         alive instead of looking up an inferior by ptid.  Use
10019         switch_to_thread and switch_to_no_thread.
10020         (restore_current_thread_cleanup_dtor): Use old->inf directly
10021         instead of lookup up an inferior by id.  Decref the inferior.
10022         Don't restore 'removable'.
10023         (make_cleanup_restore_current_thread): Same the inferior pointer
10024         in old, instead of the inferior number.  Incref the inferior.
10025         Don't save/clear 'removable'.
10026
10027 2017-04-19  Pedro Alves  <palves@redhat.com>
10028
10029         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10030         unittests/scoped_restore-selftests.c.
10031         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10032         * common/scoped_restore.h (scoped_restore_base): Make "class".
10033         (scoped_restore_base::release): New public method.
10034         (scoped_restore_base::scoped_restore_base): New protected ctor.
10035         (scoped_restore_base::m_saved_var): New protected field.
10036         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10037         scoped_restore_base base class instead of m_saved_var directly.
10038         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10039         (scoped_restore_tmpl::scoped_restore_tmpl(const
10040         scoped_restore_tmpl<T>&)): Likewise.
10041         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10042         method.
10043         (scoped_restore_tmpl::saved_var): New method.
10044         (scoped_restore_tmpl::m_saved_var): Delete.
10045         * inferior.h (inferior::detaching): Now a bool.
10046         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10047         cleanup.
10048         * unittests/scoped_restore-selftests.c: New file.
10049
10050 2017-04-19  Pedro Alves  <palves@redhat.com>
10051
10052         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10053         Re-sort in alphabetic order.
10054
10055 2017-04-18  Pedro Alves  <palves@redhat.com>
10056
10057         * xml-support.c (obstack_xml_printf): Delete.
10058         * xml-support.h (obstack_xml_printf): Delete.
10059
10060 2017-04-18  Pedro Alves  <palves@redhat.com>
10061
10062         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10063         vdebug, verror, body_text, start_element, end_element, name,
10064         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10065         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10066         is_xinclude>: Make private and add m_ prefix.
10067         (gdb_xml_parser::body_text): New method, based on ...
10068         (gdb_xml_body_text): ... this.  Adjust.
10069         (gdb_xml_parser::vdebug): New method, based on ...
10070         (gdb_xml_debug): ... this.  Adjust.
10071         (gdb_xml_parser::verror): New method, based on ...
10072         (gdb_xml_error): ... this.  Adjust.
10073         (gdb_xml_parser::start_element): New method, based on ...
10074         (gdb_xml_start_element): ... this.  Adjust.
10075         (gdb_xml_start_element_wrapper): Defer to
10076         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10077         (gdb_xml_parser::end_element): New method, based on ...
10078         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10079         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10080         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10081         (gdb_xml_parser::use_dtd): New method, based on ...
10082         (gdb_xml_use_dtd): ... this.  Adjust.
10083         (gdb_xml_parser::parse): New method, based on ...
10084         (gdb_xml_parse): ... this.  Adjust.
10085         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10086         (xinclude_start_include): Adjust to call the parser's name method.
10087         (xml_xinclude_default, xml_xinclude_start_doctype)
10088         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10089         method.
10090         (xml_process_xincludes): Adjust to call parser methods.
10091         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10092         declarations.
10093
10094 2017-04-18  Pedro Alves  <palves@redhat.com>
10095
10096         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10097         gdb::optional<std::string>.
10098         * xml-support.c: Include <string>.
10099         (scope_level::scope_level(scope_level &&))
10100         (scope_level::~scope_level): Delete.
10101         (scope_level::body): Now a std::string.
10102         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10103         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10104         parameter.
10105         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10106         (xinclude_parsing_data::output): Now a std::string reference.
10107         (xinclude_start_include): Adjust.
10108         (xml_xinclude_default): Adjust.
10109         (xml_process_xincludes): Add 'output' parameter, and return bool.
10110         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10111         and return bool.
10112         * xml-tdesc.c: Include <unordered_map> and <string>.
10113         (tdesc_xml_cache): Delete.
10114         (tdesc_xml_cache_s): Delete.
10115         (xml_cache): Now an std::unordered_map.
10116         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10117         (target_fetch_description_xml): Change return type to
10118         gdb::optional<std::string>, and adjust.
10119         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10120         (target_fetch_description_xml): Change return type to
10121         gdb::optional<std::string>.
10122
10123 2017-04-18  Pedro Alves  <palves@redhat.com>
10124
10125         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10126         unittests/optional-selftests.c.
10127         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10128         * unittests/optional-selftests.c: New file.
10129         * unittests/optional/assignment/1.cc: New file.
10130         * unittests/optional/assignment/2.cc: New file.
10131         * unittests/optional/assignment/3.cc: New file.
10132         * unittests/optional/assignment/4.cc: New file.
10133         * unittests/optional/assignment/5.cc: New file.
10134         * unittests/optional/assignment/6.cc: New file.
10135         * unittests/optional/assignment/7.cc: New file.
10136         * unittests/optional/cons/copy.cc: New file.
10137         * unittests/optional/cons/default.cc: New file.
10138         * unittests/optional/cons/move.cc: New file.
10139         * unittests/optional/cons/value.cc: New file.
10140         * unittests/optional/in_place.cc: New file.
10141         * unittests/optional/observers/1.cc: New file.
10142         * unittests/optional/observers/2.cc: New file.
10143
10144 2017-04-18  Pedro Alves  <palves@redhat.com>
10145
10146         * common/gdb_optional.h: Include common/traits.h.
10147         (in_place_t): New type.
10148         (in_place): New constexpr variable.
10149         (optional::optional): Remove member initialization of
10150         m_instantiated.
10151         (optional::optional(in_place_t...)): New constructor.
10152         (optional::~optional): Use reset.
10153         (optional::optional(const optional&)): New.
10154         (optional::optional(const optional&&)): New.
10155         (optional::optional(T &)): New.
10156         (optional::optional(T &&)): New.
10157         (operator::operator=(const optional &)): New.
10158         (operator::operator=(optional &&)): New.
10159         (operator::operator= (const T &))
10160         (operator::operator= (T &&))
10161         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10162         (operator::reset): New.
10163         (operator::m_instantiated):: Add in-class initializer.
10164         * common/traits.h: Include <type_traits>.
10165         (struct And): New types.
10166
10167 2017-04-18  Pedro Alves  <palves@redhat.com>
10168
10169         * xml-support.c: Include <vector>.
10170         (scope_level::scope_level(const gdb_xml_element *))
10171         (scope_level::scope_level(scope_level&&)): New.
10172         (scope_level::~scope_level): New.
10173         (scope_level_s): Delete.
10174         (gdb_xml_parser::scopes): Now a std::vector.
10175         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10176         Use std::vector.
10177         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10178         scope cleanup code.
10179         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10180         of the scopes member.  Use std::vector::emplace_back.
10181
10182 2017-04-18  Pedro Alves  <palves@redhat.com>
10183
10184         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10185         a bool.
10186         (gdb_xml_end_element): Change type of first parameter.
10187         (gdb_xml_cleanup): Rename to ...
10188         (gdb_xml_parser::~gdb_xml_parser): ... this.
10189         (gdb_xml_create_parser_and_cleanup): Delete with ...
10190         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10191         to this new ctor.
10192         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10193         using gdb_xml_create_parser_and_cleanup.
10194         (xinclude_parsing_data): Add ctor/dtor.
10195         (xml_xinclude_cleanup): Delete.
10196         (xml_process_xincludes): Create a local xinclude_parsing_data
10197         instead of heap-allocating one.  Create a local gdb_xml_parser
10198         instead of heap-allocating one with
10199         gdb_xml_create_parser_and_cleanup.
10200
10201 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10202
10203         PR threads/20743
10204         * fbsd-nat.c (resume_one_thread_cb): Remove.
10205         (resume_all_threads_cb): Remove.
10206         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10207         iterate_over_threads.
10208
10209 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10210
10211         * NEWS: Create a new section for the next release branch.
10212         Rename the section of the current branch, now that it has
10213         been cut.
10214
10215 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10216
10217         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10218         * version.in: Bump version to 8.0.50.DATE-git.
10219
10220 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10221
10222         PR gdb/21385
10223         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10224         independently of the host, and fix build breakage on Cygwin.
10225
10226 2017-04-13  Pedro Alves  <palves@redhat.com>
10227
10228         * inferior.c (free_inferior): Convert to ...
10229         (inferior::~inferior): ... this dtor.
10230         (inferior::inferior): New ctor, factored out from ...
10231         (add_inferior_silent): ... here.  Allocate the inferior with a new
10232         expression.
10233         (delete_inferior): Call delete instead of free_inferior.
10234         * inferior.h (gdb_environ, continuation): Forward declare.
10235         (inferior): Now a class.  Add in-class initialization to all
10236         members.  Make boolean fields bool, except 'detaching'.
10237         (inferior::inferior): New explicit ctor.
10238         (inferior::~inferior): New.
10239
10240 2017-04-13  Pedro Alves  <palves@redhat.com>
10241
10242         * inferior.c (init_inferior_list): Delete.
10243         * inferior.h (init_inferior_list): Delete.
10244
10245 2017-04-13  Pedro Alves  <palves@redhat.com>
10246
10247         PR threads/13217
10248         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10249         (top level): Call it twice, with different thread sets.
10250
10251 2017-04-13  Pedro Alves  <palves@redhat.com>
10252
10253         * thread.c: Include <algorithm>.
10254         (thread_array_cleanup): Delete.
10255         (scoped_inc_dec_ref): New class.
10256         (live_threads_count): New function.
10257         (set_thread_refcount): Delete.
10258         (tp_array_compar_ascending): Now a bool.
10259         (tp_array_compar): Convert to a std::sort comparison function.
10260         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10261         and live_threads_count.
10262
10263 2017-04-13  Pedro Alves  <palves@redhat.com>
10264
10265         * infrun.c (follow_fork_inferior): Also switch the current
10266         inferior.
10267
10268 2017-04-13  Pedro Alves  <palves@redhat.com>
10269
10270         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10271         before calling create_internal_breakpoint.
10272
10273 2017-04-13  Pedro Alves  <palves@redhat.com>
10274
10275         * fork-child.c (execv_argv): New class.
10276         (breakup_args): Refactored as ...
10277         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10278         Copy arguments to storage and replace separators with NULL
10279         terminators in place.
10280         (escape_bang_in_quoted_argument): Adjust to return bool.
10281         (execv_argv::execv_argv): New ctor.
10282         (execv_argv::init_for_shell): New method, factored out from
10283         fork_inferior.  Don't strdup strings into the vector.
10284         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10285         Remove free_vector_argv call.
10286
10287 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10288
10289         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10290         tdep->rx_psw_type.
10291
10292 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10293
10294         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10295         * rx-tdep.c (rx_gdbarch_init): Likewise.
10296
10297 2017-04-13  Pedro Alves  <palves@redhat.com>
10298
10299         * breakpoint.h (struct breakpoint): Reindent.
10300
10301 2017-04-13  Pedro Alves  <palves@redhat.com>
10302
10303         * breakpoint.c (bp_location): Rename to ...
10304         (bp_locations): ... this.  All references updated.
10305         (bp_location_count): Rename to ...
10306         (bp_locations_count): ... this.  All references updated.
10307         (bp_location_placed_address_before_address_max): Rename to ...
10308         (bp_locations_placed_address_before_address_max): ... this.  All
10309         references updated.
10310         (bp_location_shadow_len_after_address_max): Rename to ...
10311         (bp_locations_shadow_len_after_address_max): ... this.  All
10312         references updated.
10313         (bp_location_compare_addrs): Rename to ...
10314         (bp_locations_compare_addrs): ... this.  All references updated.
10315         (bp_location_compare):Rename to ...
10316         (bp_locations_compare): ... this.  All references updated.
10317         (bp_location_target_extensions_update): Rename to ...
10318         (bp_locations_target_extensions_update): ... this.  All references
10319         updated.
10320
10321 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10322
10323         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10324         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10325         'sgtty.h'.
10326         * common/gdb_termios.h: New file, with parts of "terminal.h".
10327         * inflow.c: Include "gdb_termios.h".
10328         * ser-unix.c: Include "gdb_termios.h".
10329         * terminal.h: Move terminal-related defines to
10330         "common/gdb_termios.h".
10331
10332 2017-04-12  Tom Tromey  <tom@tromey.com>
10333
10334         * probe.c (parse_probes): Update.
10335         * location.h (delete_event_location): Don't declare.
10336         (event_location_deleter::operator()): Update.
10337         * location.c (event_location_deleter::operator()): Rename from
10338         delete_event_location.
10339         * linespec.h (linespec_result) <location>: Change type to
10340         event_location_up.
10341         * linespec.c (canonicalize_linespec, event_location_to_sals)
10342         (decode_objc): Update.
10343         (linespec_result): Don't call delete_event_location.
10344         * breakpoint.c (create_breakpoints_sal)
10345         (bkpt_probe_create_sals_from_location)
10346         (strace_marker_create_sals_from_location): Update.
10347
10348 2017-04-12  Tom Tromey  <tom@tromey.com>
10349
10350         * linespec.h (struct linespec_result): Add constructor and
10351         destructor.
10352         (init_linespec_result, destroy_linespec_result)
10353         (make_cleanup_destroy_linespec_result): Don't declare.
10354         * linespec.c (init_linespec_result): Remove.
10355         (linespec_result::~linespec_result): Rename from
10356         destroy_linespec_result.  Update.
10357         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10358         Remove.
10359         * breakpoint.c (create_breakpoint, break_range_command)
10360         (decode_location_default): Update.
10361         * ax-gdb.c (agent_command_1): Update.
10362
10363 2017-04-12  Tom Tromey  <tom@tromey.com>
10364
10365         * remote.c (remote_download_tracepoint): Update.
10366         * python/py-breakpoint.c (bppy_get_location): Update.
10367         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10368         (gdbscm_breakpoint_location): Update.
10369         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10370         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10371         Change type to event_location_up.
10372         * breakpoint.c (create_overlay_event_breakpoint)
10373         (create_longjmp_master_breakpoint)
10374         (create_std_terminate_master_breakpoint)
10375         (create_exception_master_breakpoint)
10376         (breakpoint_event_location_empty_p, print_breakpoint_location)
10377         (print_one_breakpoint_location, create_thread_event_breakpoint)
10378         (init_breakpoint_sal, create_breakpoint)
10379         (print_recreate_ranged_breakpoint, break_range_command)
10380         (init_ada_exception_breakpoint, say_where): Update.
10381         (base_breakpoint_dtor): Don't call delete_event_location.
10382         (bkpt_print_recreate, tracepoint_print_recreate)
10383         (dprintf_print_recreate, update_static_tracepoint)
10384         (breakpoint_re_set_default): Update.
10385
10386 2017-04-12  Tom Tromey  <tom@tromey.com>
10387
10388         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10389         type of "to_do".  Update.
10390         (compute_stack_depth): Use std::vector.
10391
10392 2017-04-12  Tom Tromey  <tom@tromey.com>
10393
10394         * printcmd.c (find_instruction_backward): Use std::vector.
10395
10396 2017-04-12  Tom Tromey  <tom@tromey.com>
10397
10398         * symfile.c (objfilep): Remove typedef.
10399         (reread_symbols): Use a std::vector.
10400
10401 2017-04-12  Tom Tromey  <tom@tromey.com>
10402
10403         * mi/mi-main.c (exec_direction_forward): Remove.
10404         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10405         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10406         scoped_restore.
10407         * guile/guile.c (guile_repl_command, guile_command)
10408         (gdbscm_execute_gdb_command): Use scoped_restore.
10409         * go-exp.y (go_parse): Use scoped_restore.
10410         * d-exp.y (d_parse): Use scoped_restore.
10411         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10412         * c-exp.y (c_parse): Use scoped_restore.
10413
10414 2017-04-12  Tom Tromey  <tom@tromey.com>
10415
10416         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10417         (mi_parse): Update return type.
10418         (mi_parse_free): Remove.
10419         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10420         (mi_parse::~mi_parse): Rename from mi_parse_free.
10421         (mi_parse_cleanup): Remove.
10422         (mi_parse): Return a unique_ptr.  Use new.
10423         * mi/mi-main.c (mi_execute_command): Update.
10424
10425 2017-04-12  Tom Tromey  <tom@tromey.com>
10426
10427         * location.c (explicit_location_lex_one): Return a
10428         unique_xmalloc_ptr.
10429         (string_to_explicit_location): Update.  Remove cleanups.
10430
10431 2017-04-12  Tom Tromey  <tom@tromey.com>
10432
10433         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10434         (compare_value_and_voffset): Change type.  Update.
10435         (compute_vtable_size): Change type of "offset_vec".
10436         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10437         (gnuv3_get_typeid): Remove extraneous declaration.
10438
10439 2017-04-12  Tom Tromey  <tom@tromey.com>
10440
10441         * charset.h (wchar_iterator): Fix comment.
10442
10443 2017-04-12  Tom Tromey  <tom@tromey.com>
10444
10445         * charset.c (iconv_wrapper): New class.
10446         (cleanup_iconv): Remove.
10447         (convert_between_encodings): Use it.
10448
10449 2017-04-12  Tom Tromey  <tom@tromey.com>
10450
10451         * symfile.h (increment_reading_symtab): Update type.
10452         * symfile.c (decrement_reading_symtab): Remove.
10453         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10454         * psymtab.c (psymtab_to_symtab): Update.
10455         * dwarf2read.c (dw2_instantiate_symtab): Update.
10456
10457 2017-04-12  Tom Tromey  <tom@tromey.com>
10458
10459         * jit.c (struct jit_reader): Declare separately.  Add constructor
10460         and destructor.  Change type of "handle".
10461         (loaded_jit_reader): Define separately.
10462         (jit_reader_load): Update.  New "new".
10463         (jit_reader_unload_command): Use "delete".
10464         * gdb-dlfcn.h (struct dlclose_deleter): New.
10465         (gdb_dlhandle_up): New typedef.
10466         (gdb_dlopen, gdb_dlsym): Update types.
10467         (gdb_dlclose): Remove.
10468         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10469         (gdb_dlsym): Change type of "handle".
10470         (make_cleanup_dlclose): Remove.
10471         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10472         * compile/compile-c-support.c (load_libcc): Update.
10473
10474 2017-04-12  Tom Tromey  <tom@tromey.com>
10475
10476         * symtab.h (find_pcs_for_symtab_line): Change return type.
10477         * symtab.c (find_pcs_for_symtab_line): Change return type.
10478         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10479         type of "vec".  Update.
10480         (ltpy_get_pcs_for_line): Update.
10481         * linespec.c (decode_digits_ordinary): Update.
10482
10483 2017-04-12  Tom Tromey  <tom@tromey.com>
10484
10485         * tracepoint.c (actions_command): Update.
10486         * python/python.c (python_command, python_interactive_command):
10487         Update.
10488         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10489         * guile/guile.c (guile_command): Update.
10490         * defs.h (read_command_lines, read_command_lines_1): Return
10491         command_line_up.
10492         (command_lines_deleter): New struct.
10493         (command_line_up): New typedef.
10494         * compile/compile.c (compile_code_command)
10495         (compile_print_command): Update.
10496         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10497         command_line_up.
10498         (make_cleanup_free_command_lines): Remove.
10499         * cli/cli-script.c (get_command_line, read_command_lines_1)
10500         (copy_command_lines): Return command_line_up.
10501         (while_command, if_command, read_command_lines, define_command)
10502         (document_command): Update.
10503         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10504         Remove.
10505         * breakpoint.h (breakpoint_set_commands): Change type of
10506         "commands".
10507         * breakpoint.c (breakpoint_set_commands): Change type of
10508         "commands".  Update.
10509         (do_map_commands_command, update_dprintf_command_list)
10510         (create_tracepoint_from_upload): Update.
10511
10512 2017-04-12  Tom Tromey  <tom@tromey.com>
10513
10514         * tracepoint.c (scope_info): Update.
10515         * spu-tdep.c (spu_catch_start): Update.
10516         * python/python.c (gdbpy_decode_line): Update.
10517         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10518         * python/py-breakpoint.c (bppy_init): Update.
10519         * probe.c (parse_probes): Update.
10520         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10521         * location.h (event_location_deleter): New struct.
10522         (event_location_up): New typedef.
10523         (new_linespec_location, new_address_location, new_probe_location)
10524         (new_explicit_location, copy_event_location)
10525         (string_to_event_location, string_to_event_location_basic)
10526         (string_to_explicit_location): Update return type.
10527         (make_cleanup_delete_event_location): Remove.
10528         * location.c (new_linespec_location, new_address_location)
10529         (new_probe_location, new_explicit_location, copy_event_location):
10530         Return event_location_up.
10531         (delete_event_location_cleanup)
10532         (make_cleanup_delete_event_location): Remove.
10533         (string_to_explicit_location, string_to_event_location_basic)
10534         (string_to_event_location): Return event_location_up.
10535         * linespec.c (canonicalize_linespec, event_location_to_sals)
10536         (decode_line_with_current_source)
10537         (decode_line_with_last_displayed, decode_objc): Update.
10538         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10539         * completer.c (location_completer): Update.
10540         * cli/cli-cmds.c (edit_command, list_command): Update.
10541         * breakpoint.c (create_overlay_event_breakpoint)
10542         (create_longjmp_master_breakpoint)
10543         (create_std_terminate_master_breakpoint)
10544         (create_exception_master_breakpoint)
10545         (create_thread_event_breakpoint): Update.
10546         (init_breakpoint_sal): Update.  Remove some dead code.
10547         (create_breakpoint_sal): Change type of "location".  Update.
10548         (create_breakpoints_sal, create_breakpoint, break_command_1)
10549         (dprintf_command, break_range_command, until_break_command)
10550         (init_ada_exception_breakpoint)
10551         (strace_marker_create_sals_from_location)
10552         (update_static_tracepoint, trace_command, ftrace_command)
10553         (strace_command, create_tracepoint_from_upload): Update.
10554         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10555         * ax-gdb.c (agent_command_1): Update.
10556
10557 2017-04-12  Pedro Alves  <palves@redhat.com>
10558
10559         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10560         * configure.tgt: Handle i[34567]86-*-go32* and
10561         i[34567]86-*-msdosdjgpp*.
10562         * i386-tdep.c (i386_svr4_reg_to_regnum):
10563         Make extern.
10564         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10565         i386-go32-tdep.c.
10566         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10567         * i386-go32-tdep.c: New file.
10568         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10569         declarations.
10570
10571 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10572
10573         * aix-thread.c (pd_status2str): Change return type to const char *.
10574
10575 2017-04-12  Pedro Alves  <palves@redhat.com>
10576
10577         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10578         calls to set_gdbarch_gnu_triplet_regexp.
10579
10580 2017-04-12  Pedro Alves  <palves@redhat.com>
10581
10582         PR gdb/21323
10583         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10584         New enum value.
10585         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10586         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10587         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10588         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10589         * gdbarch.h, gdbarch.c: Regenerate.
10590         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10591         gdbarch_wchar_bit and gdbarch_wchar_signed.
10592         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10593         * arm-tdep.c (arm_gdbarch_init): Likewise.
10594         * avr-tdep.c (avr_gdbarch_init): Likewise.
10595         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10596         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10597         * i386-tdep.c (i386_go32_init_abi): Likewise.
10598         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10599         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10600         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10601         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10602         * sh-tdep.c (sh_gdbarch_init): Likewise.
10603         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10604         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10605         * windows-tdep.c (windows_init_abi): Likewise.
10606         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10607
10608 2017-04-12  Pedro Alves  <palves@redhat.com>
10609
10610         PR c++/21323
10611         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10612         cplus_primitive_type_char32_t>: New enum values.
10613         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10614         and cplus_primitive_type_char32_t.
10615         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10616         32, use the archtecture's built-in type for char16_t and char32_t,
10617         respectively.  Otherwise, fallback to init_integer_type as before,
10618         but make the type unsigned, and issue a complaint.
10619         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10620
10621 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10622
10623         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10624         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10625
10626 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10627
10628         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10629         'const char *'.
10630
10631 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10632
10633         * common/common-utils.c (free_vector_argv): New function.
10634         * common/common-utils.h: Include <vector>.
10635         (free_vector_argv): New prototype.
10636         * darwin-nat.c (darwin_create_inferior): Rewrite function
10637         prototype in order to constify "exec_file" and accept a
10638         "std::string" for "allargs".
10639         * fork-child.c: Include <vector>.
10640         (breakup_args): Rewrite function, using C++.
10641         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10642         and accept "std::string" for "allargs".  Update the code to
10643         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10644         and "execvp".
10645         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10646         order to constify "exec_file" and accept a "std::string" for
10647         "allargs".
10648         * go32-nat.c (go32_create_inferior): Likewise.
10649         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10650         * infcmd.c (run_command_1): Constify "exec_file".  Use
10651         "std::string" for inferior arguments.
10652         * inferior.h (fork_inferior): Update prototype.
10653         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10654         prototype in order to constify "exec_file" and accept a
10655         "std::string" for "allargs".
10656         * nto-procfs.c (procfs_create_inferior): Likewise.
10657         * procfs.c (procfs_create_inferior): Likewise.
10658         * remote-sim.c (gdbsim_create_inferior): Likewise.
10659         * remote.c (extended_remote_run): Update code to accept
10660         "std::string" as argument.
10661         (extended_remote_create_inferior): Rewrite function prototype in
10662         order to constify "exec_file" and accept a "std::string" for
10663         "allargs".
10664         * rs6000-nat.c (super_create_inferior): Likewise.
10665         (rs6000_create_inferior): Likewise.
10666         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10667         * windows-nat.c (windows_create_inferior): Likewise.
10668
10669 2017-04-11  Pedro Alves  <palves@redhat.com>
10670
10671         * thread.c: Fix whitespace throughout.
10672
10673 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10674
10675         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10676
10677 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10678
10679         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10680
10681 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10682
10683         PR gdb/21364
10684         * osdata.c (info_osdata): Check if 'type' is an empty string
10685         instead of NULL.
10686
10687 2017-04-10  Pedro Alves  <palves@redhat.com>
10688
10689         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10690         (ptid_to_global_thread_id, in_thread_list)
10691         (do_captured_list_thread_ids, set_resumed, set_running)
10692         (set_executing, set_stop_requested, finish_thread_state)
10693         (validate_registers_access, can_access_registers_ptid)
10694         (print_thread_info_1, switch_to_thread)
10695         (do_restore_current_thread_cleanup)
10696         (make_cleanup_restore_current_thread, thread_command)
10697         (thread_name_command): Use operator== instead of ptid_equal.
10698
10699 2017-04-10  Pedro Alves  <palves@redhat.com>
10700
10701         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10702         (current_thread_cleanup_chain): Delete.
10703         (restore_current_thread_cleanup_dtor)
10704         (make_cleanup_restore_current_thread): Remove references to
10705         current_thread_cleanup_chain.
10706
10707 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10708
10709         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10710         REG_UNKNOWN.
10711
10712 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10713
10714         PR gdb/19942
10715         * gdbthread.h (thread_info::deletable): New method.
10716         (thread_info::incref): New method.
10717         (thread_info::decref): New method.
10718         (thread_info::refcount): Move it to private.
10719         * infrun.c (save_stop_context): Call inc_refcount.
10720         (release_stop_context_cleanup): Likewise.
10721         * thread.c (set_thread_exited): New function.
10722         (init_thread_list): Delete "tp" only it is deletable, otherwise
10723         call set_thread_exited.
10724         (delete_thread_1): Call set_thread_exited.
10725         (current_thread_cleanup) <inferior_pid>: Remove.
10726         <thread>: New field.
10727         (restore_current_thread_ptid_changed): Removed.
10728         (do_restore_current_thread_cleanup): Adjust.
10729         (restore_current_thread_cleanup_dtor): Don't call
10730         find_thread_ptid.
10731         (set_thread_refcount): Use dec_refcount.
10732         (make_cleanup_restore_current_thread): Adjust.
10733         (thread_apply_all_command): Call inc_refcount.
10734         (_initialize_thread): Don't call
10735         observer_attach_thread_ptid_changed.
10736
10737 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10738
10739         * thread.c (delete_thread_1): Hoist code on marking thread as
10740         exited.
10741
10742 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10743
10744         * windows-nat.c (windows_detach): Initialize ptid with
10745         minus_one_ptid.
10746
10747 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10748
10749         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10750
10751 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10752
10753         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10754         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10755         (bfin_pseudo_register_write): Likewise
10756
10757 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10758
10759         * common/ptid.h (struct ptid): Change to...
10760         (class ptid_t): ... this.
10761         <ptid_t>: New constructors.
10762         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10763         matches>: New methods.
10764         <make_null, make_minus_one>: New static methods.
10765         <pid>: Rename to...
10766         <m_pid>: ...this.
10767         <lwp>: Rename to...
10768         <m_lwp>: ...this.
10769         <tid>: Rename to...
10770         <m_tid>: ...this.
10771         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10772         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10773         as references, move comment to class ptid_t.
10774         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10775         ptid_t static methods.
10776         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10777         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10778         Take ptid arguments as references, implement using ptid_t methods.
10779         * unittests/ptid-selftests.c: New file.
10780         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10781         unittests/ptid-selftests.c.
10782         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10783
10784 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10785
10786         * python/python.c (python_run_simple_file): Cast mode literal to
10787         non-const char pointer as expected by PyFile_FromString.
10788
10789 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10790
10791         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10792         minus_one_ptid and null_ptid.
10793
10794 2017-04-05  Pedro Alves  <palves@redhat.com>
10795
10796         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10797         * configure: Regenerate.
10798
10799 2017-04-05  Pedro Alves  <palves@redhat.com>
10800
10801         * ada-exp.y (yyerror): Constify.
10802         * ada-lang.c (bound_name, get_selections)
10803         (ada_variant_discrim_type)
10804         (ada_variant_discrim_name, ada_value_struct_elt)
10805         (ada_lookup_struct_elt_type, is_unchecked_variant)
10806         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10807         (catch_ada_exception_command_split)
10808         (catch_ada_assert_command_split, catch_assert_command)
10809         (ada_op_name): Constify.
10810         * ada-lang.h (ada_yyerror, get_selections)
10811         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10812         * arc-tdep.c (arc_print_frame_cache): Constify.
10813         * arm-tdep.c (arm_skip_stub): Constify.
10814         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10815         (gen_aggregate_elt_ref): Constify.
10816         * bcache.c (print_bcache_statistics): Constify.
10817         * bcache.h (print_bcache_statistics): Constify.
10818         * break-catch-throw.c (catch_exception_command_1):
10819         * breakpoint.c (struct ep_type_description::description):
10820         Constify.
10821         (add_solib_catchpoint): Constify.
10822         (catch_fork_command_1): Add cast.
10823         (add_catch_command): Constify.
10824         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10825         Constify.
10826         * bsd-uthread.c (bsd_uthread_state): Constify.
10827         * buildsym.c (patch_subfile_names): Constify.
10828         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10829         Constify.
10830         * c-exp.y (yyerror): Constify.
10831         (token::oper): Constify.
10832         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10833         * c-varobj.c (cplus_describe_child): Constify.
10834         * charset.c (find_charset_names): Add cast.
10835         (find_charset_names): Constify array and add const_cast.
10836         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10837         (edit_command): Constify.
10838         * cli/cli-decode.c (lookup_cmd): Constify.
10839         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10840         Constify.
10841         (struct dump_context): Constify.
10842         (add_dump_command, restore_command): Constify.
10843         * cli/cli-script.c (get_command_line): Constify.
10844         * cli/cli-script.h (get_command_line): Constify.
10845         * cli/cli-utils.c (check_for_argument): Constify.
10846         * cli/cli-utils.h (check_for_argument): Constify.
10847         * coff-pe-read.c (struct read_pe_section_data): Constify.
10848         * command.h (lookup_cmd): Constify.
10849         * common/print-utils.c (decimal2str): Constify.
10850         * completer.c (gdb_print_filename): Constify.
10851         * corefile.c (set_gnutarget): Constify.
10852         * cp-name-parser.y (yyerror): Constify.
10853         * cp-valprint.c (cp_print_class_member): Constify.
10854         * cris-tdep.c (cris_register_name, crisv32_register_name):
10855         Constify.
10856         * d-exp.y (yyerror): Constify.
10857         (struct token::oper): Constify.
10858         * d-lang.h (d_yyerror): Constify.
10859         * dbxread.c (struct header_file_location::name): Constify.
10860         (add_old_header_file, add_new_header_file, last_function_name)
10861         (dbx_next_symbol_text, add_bincl_to_list)
10862         (find_corresponding_bincl_psymtab, set_namestring)
10863         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10864         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10865         * defs.h (command_line_input, print_address_symbolic)
10866         (deprecated_readline_begin_hook): Constify.
10867         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10868         Constify.
10869         * event-top.c (handle_line_of_input): Constify and add cast.
10870         * exceptions.c (catch_errors): Constify.
10871         * exceptions.h (catch_errors): Constify.
10872         * expprint.c (print_subexp_standard, op_string, op_name)
10873         (op_name_standard, dump_raw_expression, dump_raw_expression):
10874         * expression.h (op_name, op_string, dump_raw_expression):
10875         Constify.
10876         * f-exp.y (yyerror): Constify.
10877         (struct token::oper): Constify.
10878         (struct f77_boolean_val::name): Constify.
10879         * f-lang.c (f_word_break_characters): Constify.
10880         * f-lang.h (f_yyerror): Constify.
10881         * fork-child.c (fork_inferior): Add cast.
10882         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10883         (new_variant): Constify.
10884         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10885         * gdbarch.c: Regenerate.
10886         * gdbcore.h (set_gnutarget): Constify.
10887         * go-exp.y (yyerror): Constify.
10888         (token::oper): Constify.
10889         * go-lang.h (go_yyerror): Constify.
10890         * go32-nat.c (go32_sysinfo): Constify.
10891         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10892         * guile/scm-cmd.c (cmdscm_function): Constify.
10893         * guile/scm-param.c (pascm_param_value): Constify.
10894         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10895         (h8300sx_register_name): Constify.
10896         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10897         Constify.
10898         * ia64-tdep.c (ia64_register_names): Constify.
10899         * infcmd.c (construct_inferior_arguments): Constify.
10900         (path_command, attach_post_wait): Constify.
10901         * language.c (show_range_command, show_case_command)
10902         (unk_lang_error): Constify.
10903         * language.h (language_defn::la_error)
10904         (language_defn::la_name_of_this): Constify.
10905         * linespec.c (decode_line_2): Constify.
10906         * linux-thread-db.c (thread_db_err_str): Constify.
10907         * lm32-tdep.c (lm32_register_name): Constify.
10908         * m2-exp.y (yyerror): Constify.
10909         * m2-lang.h (m2_yyerror): Constify.
10910         * m32r-tdep.c (m32r_register_names): Constify and make static.
10911         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10912         * m88k-tdep.c (m88k_register_name): Constify.
10913         * macroexp.c (appendmem): Constify.
10914         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10915         (upgrade_type, parse_external, parse_partial_symbols)
10916         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10917         (new_symbol): Constify.
10918         * memattr.c (mem_info_command): Constify.
10919         * mep-tdep.c (register_name_from_keyword): Constify.
10920         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10921         Constify.
10922         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10923         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10924         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10925         cast.
10926         (mi_execute_async_cli_command): Constify.
10927         * mips-tdep.c (mips_register_name): Constify.
10928         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10929         (am33_register_name, am33_2_register_name)
10930         * moxie-tdep.c (moxie_register_names): Constify.
10931         * nat/linux-osdata.c (osdata_type): Constify fields.
10932         * nto-tdep.c (nto_parse_redirection): Constify.
10933         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10934         (lookup_child_selector): Constify.
10935         (objc_methcall::name): Constify.
10936         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10937         (lookup_struct_typedef): Constify.
10938         * objfiles.c (pc_in_section): Constify.
10939         * objfiles.h (pc_in_section): Constify.
10940         * p-exp.y (struct token::oper): Constify.
10941         (yyerror): Constify.
10942         * p-lang.h (pascal_yyerror): Constify.
10943         * parser-defs.h (op_name_standard): Constify.
10944         (op_print::string): Constify.
10945         (exp_descriptor::op_name): Constify.
10946         * printcmd.c (print_address_symbolic): Constify.
10947         * psymtab.c (print_partial_symbols): Constify.
10948         * python/py-breakpoint.c (stop_func): Constify.
10949         (bppy_get_expression): Constify.
10950         * python/py-cmd.c (cmdpy_completer::name): Constify.
10951         (cmdpy_function): Constify.
10952         * python/py-event.c (evpy_add_attribute)
10953         (gdbpy_initialize_event_generic): Constify.
10954         * python/py-event.h (evpy_add_attribute)
10955         (gdbpy_initialize_event_generic): Constify.
10956         * python/py-evts.c (add_new_registry): Constify.
10957         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10958         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10959         * python/py-inferior.c (get_buffer): Add cast.
10960         * python/py-param.c (parm_constant::name): Constify.
10961         * python/py-unwind.c (fprint_frame_id): Constify.
10962         * python/python.c (gdbpy_parameter_value): Constify.
10963         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10964         * remote.c (memory_packet_config::name): Constify.
10965         (show_packet_config_cmd, remote_write_bytes)
10966         (remote_buffer_add_string):
10967         * reverse.c (exec_reverse_once): Constify.
10968         * rs6000-tdep.c (variant::name, variant::description): Constify.
10969         * rust-exp.y (rustyyerror): Constify.
10970         * rust-lang.c (rust_op_name): Constify.
10971         * rust-lang.h (rustyyerror): Constify.
10972         * serial.h (serial_ops::name): Constify.
10973         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10974         (sh_sh3e_register_name, sh_sh2e_register_name)
10975         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10976         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10977         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10978         (sh_sh4al_dsp_register_name): Constify.
10979         * sh64-tdep.c (sh64_register_name): Constify.
10980         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10981         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10982         * stabsread.c (patch_block_stabs, read_type_number)
10983         (ref_map::stabs, ref_add, process_reference)
10984         (symbol_reference_defined, define_symbol, define_symbol)
10985         (error_type, read_type, read_member_functions, read_cpp_abbrev)
10986         (read_one_struct_field, read_struct_fields, read_baseclasses)
10987         (read_tilde_fields, read_struct_type, read_array_type)
10988         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10989         (read_huge_number, read_range_type, read_args, common_block_start)
10990         (find_name_end): Constify.
10991         * stabsread.h (common_block_start, define_symbol)
10992         (process_one_symbol, symbol_reference_defined, ref_add):
10993         * symfile.c (get_section_index, add_symbol_file_command):
10994         * symfile.h (get_section_index): Constify.
10995         * target-descriptions.c (tdesc_type::name): Constify.
10996         (tdesc_free_type): Add cast.
10997         * target.c (find_default_run_target):
10998         (add_deprecated_target_alias, find_default_run_target)
10999         (target_announce_detach): Constify.
11000         (do_option): Constify.
11001         * target.h (add_deprecated_target_alias): Constify.
11002         * thread.c (print_thread_info_1): Constify.
11003         * top.c (deprecated_readline_begin_hook, command_line_input):
11004         Constify.
11005         (init_main): Add casts.
11006         * top.h (handle_line_of_input): Constify.
11007         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11008         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11009         (tfind_command): Rename to ...
11010         (tfind_command_1): ... this and constify.
11011         (tfind_command): New function.
11012         (tfind_end_command, tfind_start_command): Adjust.
11013         (encode_source_string): Constify.
11014         * tracepoint.h (encode_source_string): Constify.
11015         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11016         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11017         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11018         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11019         * tui/tui-win.c (parse_scrolling_args): Constify.
11020         * tui/tui-windata.c (tui_erase_data_content): Constify.
11021         * tui/tui-windata.h (tui_erase_data_content): Constify.
11022         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11023         * tui/tui.c (tui_enable): Add cast.
11024         * utils.c (defaulted_query): Constify.
11025         (init_page_info): Add cast.
11026         (puts_debug, subset_compare): Constify.
11027         * utils.h (subset_compare): Constify.
11028         * varobj.c (varobj_format_string): Constify.
11029         * varobj.h (varobj_format_string): Constify.
11030         * vax-tdep.c (vax_register_name): Constify.
11031         * windows-nat.c (windows_detach): Constify.
11032         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11033         * xml-support.c (gdb_xml_end_element): Constify.
11034         * xml-tdesc.c (tdesc_start_reg): Constify.
11035         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11036         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11037         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11038
11039 2017-04-05  Pedro Alves  <palves@redhat.com>
11040
11041         * proc-api.c (struct trans): Constify.
11042         (procfs_note): Constify.
11043         * proc-events.c (struct trans, syscall_table):
11044         * proc-flags.c (struct trans): Constify.
11045         * proc-utils.h (procfs_note): Constify.
11046         * proc-why.c (struct trans): Constify.
11047         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11048         (procfs_detach): Constify.
11049         * sol-thread.c (struct string_map): Constify.
11050         (td_err_string, td_state_string): Constify.
11051
11052 2017-04-05  Pedro Alves  <palves@redhat.com>
11053
11054         * proc-api.c (procfs_filename): Don't initialize
11055         procfs_filename.
11056         (prepare_to_trace): Assume procfs_filename is non-NULL.
11057         (_initialize_proc_api): Give procfs_filename a default value here.
11058
11059 2017-04-05  Pedro Alves  <palves@redhat.com>
11060
11061         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11062         'cond_string' parameter.
11063         (extract_exception_regexp): Constify 'string' parameter.
11064         (catch_exception_command_1): Constify.
11065         * breakpoint.c (init_catchpoint)
11066         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11067         parameter.
11068         (ep_parse_optional_if_clause, catch_fork_command_1)
11069         (catch_exec_command_1): Constify.
11070         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11071         parameter.
11072         (ep_parse_optional_if_clause): Constify.
11073         * cli/cli-utils.c (remove_trailing_whitespace)
11074         (check_for_argument): Constify.
11075         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11076         non-const overload.
11077         (check_for_argument): Likewise.
11078
11079 2017-04-05  Pedro Alves  <palves@redhat.com>
11080
11081         * event-top.c (command_line_handler): Add cast to execute_command
11082         call.
11083         * record-btrace.c (cmd_record_btrace_bts_start)
11084         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11085         (cmd_record_btrace_start): Add cast to execute_command call.
11086         * record-full.c (record_full_goto_insn):
11087         * record.c (record_start, record_stop): Add cast to
11088         execute_command_to_string calls.
11089         (cmd_record_start): Add cast to execute_command calls.
11090
11091 2017-04-05  Pedro Alves  <palves@redhat.com>
11092
11093         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11094         static inline function.
11095         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11096         array and use gdb_PyArg_ParseTupleAndKeywords.
11097         * python/py-cmd.c (cmdpy_init): Likewise.
11098         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11099         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11100         (infpy_search_memory): Likewise.
11101         * python/py-objfile.c (objfpy_add_separate_debug_file)
11102         (gdbpy_lookup_objfile): Likewise.
11103         * python/py-symbol.c (gdbpy_lookup_symbol)
11104         (gdbpy_lookup_global_symbol): Likewise.
11105         * python/py-type.c (gdbpy_lookup_type): Likewise.
11106         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11107         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11108         Likewise.
11109
11110 2017-04-05  Pedro Alves  <palves@redhat.com>
11111
11112         * python/python-internal.h (gdb_PyGetSetDef): New type.
11113         * python/py-block.c (block_object_getset)
11114         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11115         * python/py-event.c (event_object_getset)
11116         (finish_breakpoint_object_getset): Likewise.
11117         * python/py-inferior.c (inferior_object_getset): Likewise.
11118         * python/py-infthread.c (thread_object_getset): Likewise.
11119         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11120         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11121         * python/py-objfile.c (objfile_getset): Likewise.
11122         * python/py-progspace.c (pspace_getset): Likewise.
11123         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11124         Likewise.
11125         * python/py-record.c (recpy_record_getset): Likewise.
11126         * python/py-symbol.c (symbol_object_getset): Likewise.
11127         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11128         Likewise.
11129         * python/py-type.c (type_object_getset, field_object_getset):
11130         Likewise.
11131         * python/py-value.c (value_object_getset): Likewise.
11132
11133 2017-04-05  Pedro Alves  <palves@redhat.com>
11134
11135         * python/python-internal.h (gdb_PyObject_CallMethod)
11136         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11137         New functions.
11138         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11139         (PySys_GetObject, PySys_SetPath): New macros.
11140
11141 2017-04-05  Pedro Alves  <palves@redhat.com>
11142
11143         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11144         info_osdata_command.
11145         * osdata.c (info_osdata_command): Rename to ...
11146         (info_osdata): ... this.  Constify 'type' parameter, and remove
11147         the 'from_tty' parameter.  Accept NULL TYPE.
11148         (info_osdata_command): New function.
11149         * osdata.h (info_osdata_command): Remove declaration.
11150         (info_osdata): New declaration.
11151
11152 2017-04-05  Pedro Alves  <palves@redhat.com>
11153
11154         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11155         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11156         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11157         parameter.
11158         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11159         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11160         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11161         parameter.
11162         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11163         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11164         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11165         (mi_cmd_file_list_exec_source_files)
11166         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11167         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11168         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11169         parameter.
11170         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11171         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11172         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11173         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11174         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11175         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11176         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11177         'command' parameter.
11178         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11179         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11180         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11181         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11182         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11183         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11184         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11185         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11186         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11187         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11188         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11189         parameter.
11190         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11191         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11192         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11193         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11194         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11195         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11196         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11197         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11198         (mi_cmd_data_list_changed_registers)
11199         (mi_cmd_data_write_register_values)
11200         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11201         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11202         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11203         (mi_cmd_list_features, mi_cmd_list_target_features)
11204         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11205         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11206         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11207         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11208         (mi_cmd_trace_frame_collected): Constify 'command'
11209         parameter.
11210         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11211         'command' parameter.
11212
11213 2017-04-05  Pedro Alves  <palves@redhat.com>
11214
11215         * ada-lang.c (ada_completer_word_break_characters): Now a const
11216         array.
11217         (ada_get_gdb_completer_word_break_characters): Constify.
11218         * completer.c (gdb_completer_command_word_break_characters)
11219         (gdb_completer_file_name_break_characters)
11220         (gdb_completer_quote_characters): Now const arrays.
11221         (get_gdb_completer_quote_characters): Constify.
11222         (set_rl_completer_word_break_characters): New function.
11223         (set_gdb_completion_word_break_characters)
11224         (complete_line_internal): Use it.
11225         * completer.h (get_gdb_completer_quote_characters): Constify.
11226         (set_rl_completer_word_break_characters): Declare.
11227         * f-lang.c (f_word_break_characters): Constify.
11228         * language.c (default_word_break_characters): Constify.
11229         * language.h (language_defn::la_word_break_characters): Constify.
11230         (default_word_break_characters): Constify.
11231         * top.c (init_main): Use set_rl_completer_word_break_characters.
11232
11233 2017-04-05  Pedro Alves  <palves@redhat.com>
11234
11235         * aix-thread.c (aix_thread_pid_to_str)
11236         (aix_thread_extra_thread_info): Constify.
11237         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11238         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11239         (bsd_uthread_pid_to_str): Constify.
11240         * corelow.c (core_pid_to_str): Constify.
11241         * darwin-nat.c (darwin_pid_to_str): Constify.
11242         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11243         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11244         Constify.
11245         * gnu-nat.c (gnu_pid_to_str): Constify.
11246         * go32-nat.c (go32_pid_to_str): Constify.
11247         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11248         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11249         * inferior.c (inferior_pid_to_str): Constify.
11250         * linux-nat.c (linux_nat_pid_to_str): Constify.
11251         * linux-tdep.c (linux_core_pid_to_str): Constify.
11252         * linux-thread-db.c (thread_db_pid_to_str)
11253         (thread_db_extra_thread_info): Constify.
11254         * nto-tdep.c (nto_extra_thread_info): Constify.
11255         * nto-tdep.h (nto_extra_thread_info): Constify.
11256         * obsd-nat.c (obsd_pid_to_str): Constify.
11257         * procfs.c (procfs_pid_to_str): Constify.
11258         * ravenscar-thread.c (ravenscar_extra_thread_info)
11259         (ravenscar_pid_to_str): Constify.
11260         * remote-sim.c (gdbsim_pid_to_str): Constify.
11261         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11262         Constify.
11263         * sol-thread.c (solaris_pid_to_str): Constify.
11264         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11265         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11266         * target.c (default_pid_to_str, target_pid_to_str)
11267         (normal_pid_to_str, default_pid_to_str): Constify.
11268         * target.h (target_ops::to_pid_to_str)
11269         (target_ops::to_extra_thread_info): Constify.
11270         (target_pid_to_str, normal_pid_to_str): Constify.
11271         * windows-nat.c (windows_pid_to_str): Constify.
11272         * gdbarch.sh (core_pid_to_str): Constify.
11273         * target-delegates.c: Regenerate.
11274         * gdbarch.h, gdbarch.c: Regenerate.
11275
11276 2017-04-05  Pedro Alves  <palves@redhat.com>
11277
11278         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11279         the memory of the temporary warning_pre_print override.
11280         * utils.c (warning_pre_print): Constify.
11281         * utils.h (warning_pre_print): Constify.
11282
11283 2017-04-05  Pedro Alves  <palves@redhat.com>
11284
11285         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11286         (shell_command): New function.
11287         (make_command): Use std::string.
11288         (init_cli_cmds): Register shell_command instead of shell_escape.
11289
11290 2017-04-05  Pedro Alves  <palves@redhat.com>
11291
11292         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11293         * tracepoint.c (default_collect): Don't initialize.
11294
11295 2017-04-05  Pedro Alves  <palves@redhat.com>
11296
11297         * macroexp.c (macro_buffer::shared): Now a bool.
11298         (init_buffer): Update.
11299         (init_shared_buffer): Constify 'addr' parameter.
11300         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11301         casts.
11302
11303 2017-04-05  Pedro Alves  <palves@redhat.com>
11304
11305         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11306         * disasm.c (set_disassembler_options): Constify local.
11307         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11308
11309 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11310
11311         PR gdb/21352
11312         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11313         option.
11314
11315 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11316
11317         * frame.c (frame_unwind_register_unsigned): Call
11318         frame_unwind_register_value.
11319
11320 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11321
11322         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11323         Use gdb_test_multiple, and don't match anchor.
11324
11325 2017-04-05  Pedro Alves  <palves@redhat.com>
11326
11327         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11328         (Write After Approval): Remove Simon Marchi.
11329
11330 2017-04-05  Pedro Alves  <palves@redhat.com>
11331
11332         * common/gdb_optional.h (optional::optional): Make constexpr and
11333         initialize m_dummy.
11334
11335 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11336
11337         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11338         (amd64fbsd_jmp_buf_reg_offset): Remove.
11339         (amd64fbsd_supply_uthread): Remove function.
11340         (amd64fbsd_collect_uthread): Remove function.
11341         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11342         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11343         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11344         (fbsd-nat.c): Update comment.
11345         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11346         (i386fbsd_jmp_buf_reg_offset): Remove.
11347         (i386fbsd_supply_uthread): Remove function.
11348         (i386fbsd_collect_uthread): Remove function.
11349         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11350
11351 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11352
11353         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11354         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11355         * NEWS: Mention that support for FreeBSD/alpha was removed.
11356         * alpha-fbsd-tdep.c: Delete file.
11357         * config/alpha/fbsd.mh: Delete file.
11358         * configure.host: Delete alpha*-*-freebsd* and
11359         alpha*-*-kfreebsd*-gnu.
11360         * configure.tgt: Delete alpha*-*-freebsd* and
11361         alpha*-*-kfreebsd*-gnu.
11362
11363 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11364
11365         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11366         amd64bsd_store_inferior_registers): Use ptid from regcache.
11367
11368 2017-04-04  Pedro Alves  <palves@redhat.com>
11369
11370         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11371         data fields, make them private and add "m_" prefixes.
11372         (lnp_state_machine::lnp_state_machine): New ctor.
11373         (record_line, check_line_address, handle_set_discriminator)
11374         (handle_set_address, handle_advance_pc, handle_special_opcode)
11375         (handle_advance_line, handle_set_file, handle_negate_stmt)
11376         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11377         (end_sequence, advance_line): New methods.
11378         (m_gdbarch, m_record_lines_p): New fields.
11379         (lnp_reader_state): Delete.
11380         (dwarf_record_line): Rename to ...
11381         (lnp_state_machine::record_line): ... adjust.
11382         (init_lnp_state_machine): Delete.
11383         (lnp_state_machine::lnp_state_machine): New.
11384         (check_line_address): Rename to ...
11385         (lnp_state_machine::check_line_address): This.
11386         (dwarf_decode_lines_1): Remove reference to "reader_state".
11387         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11388         State machine internal state manipulation moved to
11389         lnp_state_machine methods.
11390
11391 2017-04-04  Pedro Alves  <palves@redhat.com>
11392
11393         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11394         unittests/offset-type-selftests.c.
11395         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11396         * common/offset-type.h: New file.
11397         * common/preprocessor.h: New file.
11398         * common/traits.h: New file.
11399         * common/valid-expr.h: New file.
11400         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11401         sect_offset and cu_offset strong typedefs throughout.
11402         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11403         typedefs throughout.
11404         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11405         sect_offset and cu_offset strong typedefs throughout.
11406         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11407         typedefs throughout.
11408         * gdbtypes.h: Include "common/offset-type.h".
11409         (cu_offset): Now an offset type (strong typedef) instead of a
11410         struct.
11411         (sect_offset): Likewise.
11412         (union call_site_parameter_u): Rename "param_offset" field to
11413         "param_cu_off".
11414         * unittests/offset-type-selftests.c: New file.
11415
11416 2017-04-04  Pedro Alves  <palves@redhat.com>
11417
11418         * common/underlying.h: New file.
11419         * dwarf2read.c: Include "common/gdb_optional.h" and
11420         "common/underlying.h".
11421         (dir_index, file_name_index): New types.
11422         (file_entry): Use them.
11423         (file_entry::include): Use to_underlying.
11424         (line_header::add_file_name): Use dir_index.
11425         (read_formatted_entries): Use gdb::optional.  Read form before
11426         writting to file_entry.
11427         (dwarf_decode_line_header): Use dir_index.
11428         (lnp_state_machine::current_file): Use to_underlying.
11429         (lnp_state_machine::file): Change type to file_name_index.
11430         (dwarf_record_line): Use to_underlying.
11431         (init_lnp_state_machine): Use file_name_index.
11432         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11433
11434 2017-04-04  Pedro Alves  <palves@redhat.com>
11435
11436         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11437         operator bool, has_value and get methods.
11438
11439 2017-04-04  Pedro Alves  <palves@redhat.com>
11440
11441         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11442         fields.
11443         (line_header): Initialize all data fields.  Change type of
11444         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11445         Change type of include_dirs to std::vector<const char *>.  Remove
11446         num_include_dirs, include_dirs_size.  Change type of file_names to
11447         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11448         (line_header::line_header): New.
11449         (line_header::add_include_dir, line_header::add_file_name): New
11450         methods.
11451         (line_header::include_dir_at): Remove NULL check.
11452         (line_header::file_name_at): Add const overload.
11453         (line_header_up): New unique_ptr typedef.
11454         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11455         std::vector.  Remove free_line_header call.
11456         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11457         free_line_header call.
11458         (free_cu_line_header): Delete.
11459         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11460         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11461         Adjust to use std::vector.
11462         (free_line_header): Delete.
11463         (free_line_header_voidp): Use delete.
11464         (add_include_dir): Replace with ...
11465         (line_header::add_include_dir): ... this method.  Use std::vector.
11466         (add_file_name): Replace with ...
11467         (line_header::add_file_name): ... this method.  Use std::vector.
11468         (add_include_dir_stub): Delete.
11469         (read_formatted_entries): Remove memset.
11470         (dwarf_decode_line_header): Return a line_header_up instead of a
11471         raw pointer.  Remove cleanup handling.  Pass lambdas to
11472         read_formatted_entries.  Adjust to use line_header methods.
11473         (dwarf_decode_lines_1): Adjust to use line_header methods.
11474         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11475         use std::vector.
11476
11477 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11478
11479         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11480         instead of struct ptid.
11481
11482 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11483
11484         * frame.c (get_frame_register_bytes): Unwind using value.
11485         (put_frame_register_bytes): Likewise.
11486
11487 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11488
11489         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11490         aggregate-like.
11491
11492 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11493
11494         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11495
11496 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11497
11498         * gdbthread.h (struct thread_info): Declare constructor and
11499         destructor.  Add some in-class member initializers.
11500         * thread.c (free_thread): Remove.
11501         (init_thread_list): Call delete instead of free_thread.
11502         (new_thread): Call thread_info constructor.
11503         (thread_info::thread_info): New function.
11504         (thread_info::~thread_info): New function.
11505         (delete_thread_1): Call delete instead of free_thread.
11506         (make_cleanup_restore_current_thread): Move tp and frame to
11507         inner block.
11508
11509 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11510
11511         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11512         (arc_skip_prologue): Likewise.
11513         (arc_make_frame_cache): Likewise.
11514         (arc_pv_get_operand): New function.
11515         (arc_is_in_prologue): Likewise.
11516         (arc_analyze_prologue): Likewise.
11517         (arc_print_frame_cache): Likewise.
11518         (MAX_PROLOGUE_LENGTH): New constant.
11519
11520 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11521
11522         * configure.tgt: Add arc-insn.o.
11523         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11524         (dump_arc_instruction_command): New function.
11525         (arc_fprintf_disasm): Likewise.
11526         (arc_disassemble_info): Likewise.
11527         (arc_insn_get_operand_value): Likewise.
11528         (arc_insn_get_operand_value_signed): Likewise.
11529         (arc_insn_get_memory_base_reg): Likewise.
11530         (arc_insn_get_memory_offset): Likewise.
11531         (arc_insn_get_branch_target): Likewise.
11532         (arc_insn_dump): Likewise.
11533         (arc_insn_get_linear_next_pc): Likewise.
11534         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11535         (arc_disassemble_info): Likewise.
11536         (arc_insn_get_branch_target): Likewise.
11537         (arc_insn_get_linear_next_pc): Likewise.
11538         * NEWS: Mention new "maint print arc arc-instruction".
11539
11540 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11541
11542         * arc-tdep (maintenance_print_arc_list): New variable.
11543         (maintenance_print_arc_command): New function.
11544
11545 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11546
11547         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11548         Add "limm" and "reserved".
11549         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11550         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11551         * arc-tdep.h (arc_regnum): Likewise.
11552
11553 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11554
11555         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11556         for THREADPTR register.
11557         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11558         register.
11559         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11560         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11561         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11562
11563 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11564
11565         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11566         registers above gdbarch_num_regs (gdbarch) as privileged in
11567         call0 ABI.
11568
11569 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11570
11571         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11572         for a single specified register or for all registers in
11573         a0_base..a0_base + C0_NREGS range.
11574         (supply_gregset_reg): Call regcache_raw_supply for a single
11575         specified register or for all registers in a0_base..a0_base +
11576         C0_NREGS range.
11577
11578 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11579
11580         * arch/xtensa.h (C0_NREGS): Add definition.
11581         * xtensa-tdep.c (C0_NREGS): Remove definition.
11582
11583 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11584
11585         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11586         Drop xtensa_default_isa initialization.
11587         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11588
11589 2017-03-27  Pedro Alves  <palves@redhat.com>
11590
11591         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11592         (file_entry::include_dir): New method.
11593         (line_header::include_dir_at, line_header::file_name_at): New
11594         methods.
11595         (setup_type_unit_groups, setup_type_unit_groups)
11596         (psymtab_include_file_name): Simplify using the new methods.
11597         (lnp_state_machine) <the_line_header>: New field.
11598         <file>: Add comment.
11599         (lnp_state_machine::current_file): New method.
11600         (dwarf_record_line): Simplify using the new methods.
11601         (init_lnp_state_machine): Initialize the "the_line_header" field.
11602         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11603         Simplify using the new methods.
11604
11605 2017-03-27  Pedro Alves  <palves@redhat.com>
11606
11607         * cp-name-parser.y (make_empty): Delete.
11608         (demangler_special, nested_name, ptr_operator, array_indicator)
11609         (direct_declarator, declarator_1): Use fill_comp instead of
11610         make_empty.
11611
11612 2017-03-27  Pedro Alves  <palves@redhat.com>
11613
11614         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11615         to ATTRIBUTE_PRINTF.
11616         * solib-target.c (library_list_start_list): Print "string" not
11617         "version".
11618         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11619         gdb_xml_error call.
11620
11621 2017-03-27  Pedro Alves  <palves@redhat.com>
11622
11623         * dwarf2read.c (struct file_and_directory): New.
11624         (dwarf2_get_dwz_file): Adjust to use std::string.
11625         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11626         (find_file_and_directory): Adjust to return a file_and_directory
11627         object.
11628         (read_file_scope): Adjust to use file_and_directory.  Remove
11629         make_cleanup/do_cleanups calls.
11630         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11631         make_cleanup/do_cleanups calls.
11632         * python/python.c (do_start_initialization): Adjust to ldirname
11633         returning a std::string.
11634         * utils.c (ldirname): Now returns a std::string.
11635         * utils.h (ldirname): Change return type to std::string.
11636         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11637         returning a std::string.
11638         * xml-tdesc.c (file_read_description_xml): Likewise.
11639
11640 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11641
11642         * regcache.c (regcache_debug_print_register): New function.
11643         * regcache.h (regcache_debug_print_register): New declaration.
11644         * target.c (debug_print_register): Remove.
11645         (target_fetch_registers): Call regcache_debug_print_register.
11646         (target_store_registers): Likewise.
11647
11648 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11649
11650         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11651         reference beyond the 'lh->include_dirs' array before accessing to
11652         it.
11653         (psymtab_include_file_name): Likewise.
11654         (dwarf_decode_lines_1): Likewise.
11655         (dwarf_decode_lines): Likewise.
11656         (file_file_name): Likewise.
11657
11658 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11659
11660         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11661         inferior_ptid.
11662         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11663         ps_lsetfpregs): Likewise.
11664         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11665         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11666         ps_lsetfpregs): Likewise.
11667         * target.c (target_fetch_registers, target_store_registers):
11668         Remove asserts.
11669
11670 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11671
11672         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11673
11674 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11675
11676         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11677         (_initialize_aarch64_tdep): Register it.
11678         (aarch64_record_load_store): Handle PRFM instruction.
11679         (aarch64_process_record_test): New function.
11680
11681 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11682
11683         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11684         indentation.
11685
11686 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11687
11688         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11689
11690 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11691
11692         python/python.c (do_start_initialization): Fix memory leak.
11693
11694 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11695
11696         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11697         using get_ptrace_pid.
11698         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11699         inferior_ptid.
11700         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11701         inferior_ptid instead of pid.
11702
11703 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11704
11705         * aarch64-tdep.c: Wrap locally used classes in anonymous
11706         namespace.
11707         * arm-tdep.c: Likewise.
11708         * linespec.c: Likewise.
11709         * ui-out.c: Likewise.
11710
11711 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11712
11713         PR gdb/19637
11714         * python/lib/gdb/printer/bound_registers.py: Import sys.
11715
11716 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11717
11718         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11719         windows_thread_info parameter and use it instead of
11720         current_thread.
11721         (windows_fetch_inferior_registers): Don't set current_thread,
11722         pass the thread to do_windows_fetch_inferior_registers.  Use
11723         ptid from regcache instead of inferior_ptid.
11724         (do_windows_store_inferior_registers): Add windows_thread_info
11725         parameter and use it instead of current_thread.
11726         (windows_store_inferior_registers): Don't set current_thread,
11727         pass the thread to do_windows_store_inferior_registers.  Use
11728         ptid from regcache instead of inferior_ptid.
11729
11730 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11731
11732         * ser-mingw.c (ser_windows_raw): Remove reference to
11733         struct serial::current_timeout.
11734
11735 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11736
11737         PR tdep/20928
11738         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11739         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11740         (sparc64_fsr_type): Fix %fsr decoding.
11741
11742 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11743
11744         * python/py-record-btrace.c (btpy_insn_data): Change return type
11745         for Python 2.
11746
11747 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11748
11749         * spu-linux-nat.c (spu_fetch_inferior_registers,
11750         spu_store_inferior_registers): Use ptid from regcache, set and
11751         restore inferior_ptid.
11752         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11753         Likewise.
11754
11755 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11756
11757         * i386-linux-nat.c (fetch_register, store_register,
11758         i386_linux_fetch_inferior_registers,
11759         i386_linux_store_inferior_registers): Use ptid from regcache.
11760         * ia64-linux-nat.c (ia64_linux_fetch_register,
11761         ia64_linux_store_register): Likewise.
11762         * inf-ptrace.c (inf_ptrace_fetch_register,
11763         inf_ptrace_store_register): Likewise.
11764         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11765         m32r_linux_store_inferior_registers): Likewise.
11766         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11767         m68kbsd_store_inferior_registers): Likewise.
11768         * m68k-linux-nat.c (fetch_register, store_register,
11769         m68k_linux_fetch_inferior_registers,
11770         m68k_linux_store_inferior_registers): Likewise.
11771         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11772         m88kbsd_store_inferior_registers): Likewise.
11773         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11774         mips_fbsd_store_inferior_registers): Likewise.
11775         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11776         mips64_linux_regsets_store_registers): Likewise.
11777         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11778         mipsnbsd_store_inferior_registers): Likewise.
11779         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11780         mips64obsd_store_inferior_registers): Likewise.
11781         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11782         Likewise.
11783         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11784         ppcfbsd_store_inferior_registers): Likewise.
11785         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11786         ppc_linux_store_inferior_registers): Likewise.
11787         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11788         ppcnbsd_store_inferior_registers): Likewise.
11789         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11790         ppcobsd_store_registers): Likewise.
11791         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11792         Likewise.
11793         * ravenscar-thread.c (ravenscar_fetch_registers,
11794         ravenscar_store_registers, ravenscar_prepare_to_store):
11795         Likewise.
11796         * record-btrace.c (record_btrace_fetch_registers,
11797         record_btrace_store_registers, record_btrace_prepare_to_store):
11798         Likewise.
11799         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11800         Lookup inferior using ptid from regcache, instead of
11801         current_inferior.
11802         * remote.c (remote_fetch_registers, remote_store_registers): Use
11803         ptid from regcache.
11804         * rs6000-nat.c (fetch_register, store_register): Likewise.
11805         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11806         s390_linux_store_inferior_registers): Likewise.
11807         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11808         shnbsd_store_inferior_registers): Likewise.
11809         * sol-thread.c (sol_thread_fetch_registers,
11810         sol_thread_store_registers): Likewise.
11811         * sparc-nat.c (sparc_fetch_inferior_registers,
11812         sparc_store_inferior_registers): Likewise.
11813         * tilegx-linux-nat.c (fetch_inferior_registers,
11814         store_inferior_registers): Likewise.
11815         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11816         vaxbsd_store_inferior_registers): Likewise.
11817         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11818         store_xtregs): Likewise.
11819
11820 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11821
11822         PR gdb/14441
11823         * NEWS: Mention support for rvalue references in GDB and python.
11824         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11825         supports both lvalue and rvalue references.
11826
11827 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11828
11829         PR gdb/14441
11830         * gdbtypes.c (rank_one_type): Implement overloading
11831         resolution rules regarding rvalue references.
11832
11833 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11834
11835         PR gdb/14441
11836         * aarch64-tdep.c (aarch64_type_align)
11837         (aarch64_extract_return_value, aarch64_store_return_value): Change
11838         lvalue reference type checks to general reference type checks.
11839         * amd64-tdep.c (amd64_classify): Likewise.
11840         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11841         Likewise.
11842         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11843         (arm_store_return_value): Likewise.
11844         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11845         * c-typeprint.c (c_print_type): Likewise.
11846         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11847         (cplus_number_of_children, cplus_describe_child): Likewise.
11848         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11849         * completer.c (expression_completer): Likewise.
11850         * cp-support.c (make_symbol_overload_list_adl_namespace):
11851         Likewise.
11852         * darwin-nat-info.c (info_mach_region_command): Likewise.
11853         * dwarf2loc.c (entry_data_value_coerce_ref)
11854         (value_of_dwarf_reg_entry): Likewise.
11855         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11856         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11857         Likewise.
11858         * findvar.c (extract_typed_address, store_typed_address):
11859         Likewise.
11860         * gdbtypes.c (rank_one_type): Likewise.
11861         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11862         * infcall.c (value_arg_coerce): Likewise.
11863         * language.c (pointer_type): Likewise.
11864         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11865         Likewise.
11866         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11867         * mn10300-tdep.c (mn10300_type_align): Likewise.
11868         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11869         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11870         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11871         Likewise.
11872         * printcmd.c (print_formatted, x_command): Likewise.
11873         * python/py-type.c (typy_get_composite, typy_template_argument):
11874         Likewise.
11875         * python/py-value.c (valpy_referenced_value)
11876         (valpy_get_dynamic_type, value_has_field): Likewise.
11877         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11878         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11879         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11880         * spu-tdep.c (spu_scalar_value_p): Likewise.
11881         * symtab.c (lookup_symbol_aux): Likewise.
11882         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11883         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11884         Likewise.
11885         * valops.c (value_cast_pointers, value_cast)
11886         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11887         (value_struct_elt, value_struct_elt_bitpos)
11888         (value_find_oload_method_list, find_overload_match)
11889         (value_rtti_indirect_type): Likewise.
11890         * valprint.c (val_print_scalar_type_p, generic_val_print):
11891         Likewise.
11892         * value.c (value_actual_type, value_as_address, unpack_long)
11893         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11894         (coerce_ref): Likewise.
11895         * varobj.c (varobj_get_value_type): Likewise.
11896
11897 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11898
11899         PR gdb/14441
11900         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11901         table of constants.
11902         * python/lib/gdb/command/explore.py: Support exploring values
11903         of rvalue reference types.
11904         * python/lib/gdb/types.py: Implement get_basic_type() for
11905         rvalue reference types.
11906         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11907         constant.
11908         * python/py-value.c (valpy_getitem): Add an rvalue reference
11909         check.
11910         (valpy_reference_value): Add new parameter "refcode".
11911         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11912         New wrappers for valpy_reference_value().
11913         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11914         (gdbpy_invoke_xmethod): Likewise.
11915
11916 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11917
11918         PR gdb/14441
11919         * dwarf2read.c (process_die, read_type_die_1): Handle the
11920         DW_TAG_rvalue_reference_type DIE.
11921         (read_tag_reference_type): Add new parameter "refcode".
11922
11923 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11924
11925         PR gdb/14441
11926         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11927         (c_type_print_modifier, c_type_print_varspec_suffix)
11928         (c_type_print_base): Support printing rvalue reference types.
11929         * c-valprint.c (c_val_print, c_value_print): Support printing
11930         rvalue reference values.
11931
11932 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11933
11934         PR gdb/14441
11935         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11936         typename.
11937         * cp-support.c (replace_typedefs): Handle
11938         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11939         * python/py-type.c (typy_lookup_type): Likewise.
11940
11941 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11942
11943         PR gdb/14441
11944         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11945         * parse.c (insert_type): Change assert statement.
11946         (follow_types): Handle rvalue reference types.
11947         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11948         constant.
11949
11950 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11951
11952         PR gdb/14441
11953         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11954         value_ref() interface.
11955         * c-valprint.c (c_value_print): Likewise.
11956         * infcall.c (value_arg_coerce): Likewise.
11957         * python/py-value.c (valpy_reference_value): Likewise.
11958         * valops.c (value_cast, value_reinterpret_cast)
11959         (value_dynamic_cast, typecmp): Likewise.
11960         (value_ref): Parameterize by kind of return value reference type.
11961         * value.h (value_ref): Add new parameter "refcode".
11962
11963 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11964
11965         PR gdb/14441
11966         * dwarf2read.c (read_tag_reference_type): Use
11967         lookup_lvalue_reference_type() instead of lookup_reference_type().
11968         * eval.c (evaluate_subexp_standard): Likewise.
11969         * f-exp.y: Likewise.
11970         * gdbtypes.c (make_reference_type, lookup_reference_type):
11971         Generalize with rvalue reference types.
11972         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11973         convenience wrappers for lookup_reference_type().
11974         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11975         reference kind parameter.
11976         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11977         wrappers for lookup_reference_type().
11978         * guile/scm-type.c (gdbscm_type_reference): Use
11979         lookup_lvalue_reference_type() instead of lookup_reference_type().
11980         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11981         * parse.c (follow_types): Likewise.
11982         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11983         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11984         Likewise.
11985         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11986         (gdbpy_invoke_xmethod): Likewise.
11987         * stabsread.c: Provide extra argument to make_reference_type()
11988         call.
11989         * valops.c (value_ref, value_rtti_indirect_type): Use
11990         lookup_lvalue_reference_type() instead of lookup_reference_type().
11991
11992 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11993
11994         PR gdb/14441
11995         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11996         (TYPE_IS_REFERENCE): New macro.
11997         (struct type): Add rvalue_reference_type field.
11998         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11999
12000 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12001
12002         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12003         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12004         New function definition.
12005         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12006         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12007         New function declaration.
12008         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12009         * mi/mi-interp.h: New file.
12010         * solib.c (info_sharedlibrary_command): Replace for loop with
12011         ALL_SO_LIBS macro
12012         * solib.h (update_solib_list): New function declaration.
12013         (so_list_head): Move macro.
12014         * solist.h (ALL_SO_LIBS): New macro.
12015
12016 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12017
12018         * infcmd.c (post_create_inferior): Remove unused argument in
12019         call to solib_add.
12020         * remote.c (remote_start_remote): Likewise.
12021         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12022         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12023         (enable_break): Likewise.
12024         * solib.c (update_solib_list): Remove unused target argument
12025         and its documentation.
12026         (solib_add): Remove unused target argument.  Remove unused
12027         argument in call to update_solib_list.
12028         (info_sharedlibrary_command): Remove unused argument in call
12029         to update_solib_list.
12030         (sharedlibrary_command): Remove unused argument in call to
12031         solib_add.
12032         (handle_solib_event): Likewise.
12033         (reload_shared_libraries): Likewise.
12034         * solib.h (solib_add): Remove unused target argument.
12035
12036 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12037
12038         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12039         (s390_displaced_step_fixup): Cover relative branches with the
12040         default fixup handling.  This fixes lack of support for some
12041         relative branch instructions.
12042
12043 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12044
12045         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12046         ptid from regcache.
12047
12048 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12049
12050         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12051         i386_darwin_store_inferior_registers): Use ptid from regcache.
12052
12053 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12054
12055         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12056         i386bsd_store_inferior_registers): Use ptid from regcache.
12057
12058 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12059
12060         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12061         hppaobsd_store_registers): Use ptid from regcache.
12062
12063 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12064
12065         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12066         hppanbsd_store_registers): Use ptid from regcache.
12067
12068 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12069
12070         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12071         from regcache.  Use get_ptrace_pid.
12072
12073 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12074
12075         * corelow.c (get_core_register_section): Use ptid from regcache,
12076         update doc.
12077
12078 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12079
12080         * bsd-uthread.c (bsd_uthread_fetch_registers,
12081         bsd_uthread_store_registers): Use ptid from regcache, set and
12082         restore inferior_ptid.
12083
12084 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12085
12086         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12087         fetch_fp_regs, store_register, store_regs, store_fp_register,
12088         store_fp_regs): Use ptid from regcache.
12089
12090 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12091
12092         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12093         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12094         store_vfp_regs): Use ptid from regcache.
12095
12096 2017-03-17  Pedro Alves  <palves@redhat.com>
12097
12098         PR remote/21188
12099         * ser-base.c (ser_base_wait_for): Add comment.
12100         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12101         version.
12102         * ser-unix.c (hardwire_raw): Remove reference to
12103         scb->current_timeout.
12104         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12105         (hardwire_ops): Install ser_base_readchar instead of
12106         hardwire_readchar.
12107         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12108         Remove fields.
12109
12110 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12111
12112         PR gdb/19637
12113         * python/lib/gdb/printer/bound_registers.py: Add support for
12114         Python 3.
12115
12116 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12117
12118         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12119         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12120         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12121         byte_offset to subobj_byte_offset.  Fix the handling of
12122         DWARF_VALUE_STACK on big-endian targets when coming via an
12123         implicit pointer.
12124         (dwarf2_evaluate_loc_desc): Adjust call to
12125         dwarf2_evaluate_loc_desc_full.
12126         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12127         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12128
12129 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12130
12131         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12132         and REVSH instructions.
12133
12134 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12135
12136         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12137         (arm_record_test): Declare.
12138         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12139         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12140         align with the manual.
12141         (thumb_record_misc): Adjust the code order to align with the
12142         manual.
12143         (thumb2_record_decode_insn_handler): Fix instruction matching.
12144         (instruction_reader_thumb): New class.
12145         (arm_record_test): New function.
12146
12147 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12148
12149         * arm-tdep.c (abstract_memory_reader): New class.
12150         (instruction_reader): New class.
12151         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12152         (decode_insn): Likewise.
12153
12154 2017-03-16  Doug Evans  <dje@google.com>
12155
12156         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12157         member.  Change type of TYPE member to SCM.  All uses updated.
12158         (lsscm_make_lazy_string_smob): Add assert.
12159         (lsscm_make_lazy_string): Flag bad length values.
12160         (lsscm_elt_type): New function.
12161         (gdbscm_lazy_string_to_value): Rewrite to use
12162         lsscm_safe_lazy_string_to_value.
12163         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12164         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12165         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12166         in incoming type.
12167         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12168         * guile/scm-type.c (tyscm_scm_to_type): New function.
12169
12170 2017-03-15  Doug Evans  <dje@google.com>
12171
12172         PR python/17728, python/18439, python/18779
12173         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12174         member.  Change type of TYPE member to PyObject *.  All uses updated.
12175         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12176         (gdbpy_create_lazy_string_object): Flag bad length values.
12177         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12178         Handle typedefs in incoming type.
12179         (stpy_lazy_string_elt_type): New function.
12180         (gdbpy_extract_lazy_string): Call it.
12181         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12182         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12183         typedefs in incoming type.
12184
12185 2017-03-16  Doug Evans  <dje@google.com>
12186
12187         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12188         * guile/scm-type.c (tyscm_scm_to_type): New function.
12189
12190 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12191
12192         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12193         "ULONGEST" for "skip".
12194
12195 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12196
12197         PR gdb/21220
12198         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12199         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12200         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12201         over ptrace peek/poke until end of buffer or error.
12202
12203 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12204
12205         * parse.c (length_of_subexp): Make static.
12206         * parser-defs.h (length_of_subexp): Remove.
12207
12208 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12209
12210         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12211         as well.
12212
12213 2017-03-14  Pedro Alves  <palves@redhat.com>
12214
12215         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12216         (main): Use std::unique_ptr.  Remove calls to
12217         cp_demangled_name_parse_free.
12218
12219 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12220
12221         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12222         alphabsd_store_inferior_registers): Use regcache->ptid instead
12223         of inferior_ptid.
12224
12225 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12226
12227         * aix-thread.c (aix_thread_fetch_registers,
12228         aix_thread_store_registers): Use regcache->ptid instead of
12229         inferior_ptid.
12230
12231 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12232
12233         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12234         store_gregs_to_thread, fetch_fpregs_from_thread,
12235         store_fpregs_to_thread): Use regcache->ptid instead of
12236         inferior_ptid.
12237
12238 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12239
12240         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12241         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12242         instead of inferior_ptid.
12243
12244 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12245
12246         * target.c (target_fetch_registers, target_store_registers): Add
12247         assert.
12248
12249 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12250
12251         * regcache.h (regcache_get_ptid): New function.
12252         * regcache.c (regcache_get_ptid): New function.
12253
12254 2017-03-13  Mark Wielaard  <mark@klomp.org>
12255
12256         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12257
12258 2017-03-10  Keith Seitz  <keiths@redhat.com>
12259
12260         PR c++/8218
12261         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12262
12263 2017-03-08  Pedro Alves  <palves@redhat.com>
12264
12265         PR gdb/18360
12266         * infrun.c (start_step_over, do_target_resume, resume)
12267         (restart_threads): Assert we're not resuming a thread that is
12268         meant to be stopped.
12269         (infrun_thread_stop_requested_callback): Delete.
12270         (infrun_thread_stop_requested): If the thread is internally
12271         stopped, queue a pending stop event and clear the thread's
12272         inline-frame state.
12273         (handle_stop_requested): New function.
12274         (handle_syscall_event, handle_inferior_event_1): Use
12275         handle_stop_requested.
12276         (handle_stop_requested): New function.
12277         (handle_signal_stop): Set the thread's stop_signal here instead of
12278         at caller.
12279         (finish_step_over): Clear step over info unconditionally.
12280         (handle_signal_stop): If the user had interrupted the event
12281         thread, consider the stop a random signal.
12282         (handle_signal_stop) <signal arrived while stepping over
12283         breakpoint>: Don't restart threads here.
12284         (stop_waiting): Don't clear step-over info here.
12285
12286 2017-03-08  Pedro Alves  <palves@redhat.com>
12287
12288         PR 21206
12289         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12290         goes to argument 2, not 1.
12291
12292 2017-03-08  Pedro Alves  <palves@redhat.com>
12293
12294         PR cli/21218
12295         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12296         display_gdb_prompt.
12297         (command_line_input): Add comment.
12298
12299 2017-03-08  Pedro Alves  <palves@redhat.com>
12300
12301         PR tui/21216
12302         * tui/tui-file.c (tui_file::write): New.
12303         * tui/tui-file.h (tui_file): Override "write".
12304         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12305         factored out from ...
12306         (tui_puts): ... here.
12307         (tui_putc): Use them.
12308         (tui_write): New function.
12309         * tui/tui-io.h (tui_write): Declare.
12310
12311 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12312
12313         * Makefile.in (SFILES): Replace "environ.c" with
12314         "common/environ.c".
12315         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12316         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12317         to...
12318         * common/environ.c: ... here.
12319         * environ.h: Moved to...
12320         * common/environ.h: ... here.
12321
12322 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12323
12324         * gdbarch.sh (pstring_ptr): New static function.
12325         (gdbarch_disassembler_options): Use it.
12326         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12327         not valid_disassembler_option->name.
12328         * gdbarch.c: Regenerate.
12329
12330 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12331
12332         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12333
12334 2017-03-07  Pedro Alves  <palves@redhat.com>
12335
12336         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12337
12338 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12339
12340         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12341         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12342         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12343         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12344
12345 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12346
12347         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12348
12349 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12350
12351         * remote.c (remote_add_target_side_commands): Use range-based
12352         for loop.
12353
12354 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12355
12356         PR gdb/21165
12357         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12358         value is lazy.
12359         * valprint.c (common_val_print): Likewise.
12360
12361 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12362
12363         * NEWS: Mention new set/show disassembler-options commands.
12364         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12365         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12366         (prospective_options): New static variable.
12367         (gdb_disassembler::gdb_disassembler): Initialize
12368         m_di.disassembler_options.
12369         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12370         (get_disassembler_options): New function.
12371         (set_disassembler_options): Likewise.
12372         (set_disassembler_options_sfunc): Likewise.
12373         (show_disassembler_options_sfunc): Likewise.
12374         (disassembler_options_completer): Likewise.
12375         (_initialize_disasm): Likewise.
12376         * disasm.h (get_disassembler_options): New prototype.
12377         (set_disassembler_options): Likewise.
12378         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12379         (gdbarch_verify_disassembler_options): Likewise.
12380         * gdbarch.c: Regenerate.
12381         * gdbarch.h: Likewise.
12382         * arm-tdep.c (num_disassembly_options): Delete.
12383         (set_disassembly_style): Likewise.
12384         (arm_disassembler_options): New static variable.
12385         (set_disassembly_style_sfunc): Convert short style name into long
12386         option name.  Call set_disassembler_options.
12387         (show_disassembly_style_sfunc): New function.
12388         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12389         set_gdbarch_verify_disassembler_options.
12390         (_initialize_arm_tdep): Delete regnames variable and update callers.
12391         (arm_disassembler_options): Initialize.
12392         (disasm_options): New variable.
12393         (num_disassembly_options): Rename from this...
12394         (num_disassembly_styles): ...to this.  Compute by scanning through
12395         disasm_options.
12396         (valid_disassembly_styles): Initialize using disasm_options.
12397         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12398         set_arm_regname_option.
12399         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12400         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12401         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12402         set_gdbarch_verify_disassembler_options.
12403         * s390-tdep.c (s390_disassembler_options): New static variable.
12404         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12405         set_gdbarch_verify_disassembler_options.
12406
12407 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12408
12409         * remote.c (remote_add_target_side_condition): Remove "struct"
12410         keyword from range-based for loop.
12411
12412 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12413
12414         * remote.c (remote_add_target_side_condition): Use range-based
12415         for loop.  Update comment.
12416
12417 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12418
12419         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12420
12421 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12422
12423         * regcache.c (regcache_raw_update): New function.
12424         (regcache_raw_read): Move code to regcache_raw_update.
12425         * regcache.h (regcache_raw_update): New declaration.
12426         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12427
12428 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12429
12430         * dwarf2read.c (create_debug_type_hash_table): Initialize
12431         header.signature and header.type_offset_in_tu.
12432
12433 2017-02-24  Pedro Alves  <palves@redhat.com>
12434
12435         * symtab.c (make_file_symbol_completion_list_1): Use
12436         add_symtab_completions.
12437
12438 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12439
12440         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12441
12442 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12443
12444         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12445         I386_MAX_REGISTER_SIZE.
12446         (i386_pseudo_register_write): Likewise.
12447         (i386_process_record): Likewise.
12448         * i387-tdep.c (i387_supply_xsave): Likewise.
12449         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12450         (store_register): Likewise.
12451
12452 2017-02-23  Pedro Alves  <palves@redhat.com>
12453
12454         * ada-lang.c: Include "common/function-view.h".
12455         (ada_iterate_over_symbols): Adjust to use function_view as
12456         callback type.
12457         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12458         (ada_make_symbol_completion_list): Use a lambda.
12459         (ada_exc_search_name_matches): Delete.
12460         (name_matches_regex): New.
12461         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12462         * compile/compile-c-support.c: Include "common/function-view.h".
12463         (print_one_macro): Change prototype to accept a ui_file pointer.
12464         (write_macro_definitions): Use a lambda.
12465         * dwarf2read.c: Include "common/function-view.h".
12466         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12467         (dw2_expand_symtabs_matching): Adjust to use function_view as
12468         callback type.
12469         * language.h: Include "common/function-view.h".
12470         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12471         function_view as callback type.
12472         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12473         * linespec.c: Include "common/function-view.h".
12474         (collect_info::add_symbol): New method.
12475         (struct symbol_and_data_callback, iterate_inline_only, struct
12476         symbol_matcher_data, iterate_name_matcher): Delete.
12477         (iterate_over_all_matching_symtabs): Adjust to use function_view
12478         as callback type and lambdas.
12479         (iterate_over_file_blocks): Adjust to use function_view as
12480         callback type.
12481         (decode_compound_collector): Now a class with private fields.
12482         (decode_compound_collector::release_symbols): New method.
12483         (collect_one_symbol): Rename to...
12484         (decode_compound_collector::operator()): ... this and adjust.
12485         (lookup_prefix_sym): decode_compound_collector construction bits
12486         move to decode_compound_collector ctor.  Pass the
12487         decode_compound_collector object directly as callback.  Remove
12488         cleanups and use decode_compound_collector::release_symbols
12489         instead.
12490         (symtab_collector): Now a class with private fields.
12491         (symtab_collector::release_symtabs): New method.
12492         (add_symtabs_to_list): Rename to...
12493         (symtab_collector::operator()): ... this and adjust.
12494         (collect_symtabs_from_filename): symtab_collector construction
12495         bits move to symtab_collector ctor.  Pass the symtab_collector
12496         object directly as callback.  Remove cleanups and use
12497         symtab_collector::release_symtabs instead.
12498         (collect_symbols): Delete.
12499         (add_matching_symbols_to_info): Use lambdas.
12500         * macrocmd.c (print_macro_callback): Delete.
12501         (info_macro_command): Use a lambda.
12502         (info_macros_command): Pass print_macro_definition as callable
12503         directly.
12504         (print_one_macro): Remove 'ignore' parameter.
12505         (macro_list_command): Adjust.
12506         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12507         (macro_for_each_data::user_data): Delete field.
12508         (foreach_macro): Adjust to call the function_view.
12509         (macro_for_each): Adjust to use function_view as callback type.
12510         (foreach_macro_in_scope): Adjust to call the function_view.
12511         (macro_for_each_in_scope): Adjust to use function_view as callback
12512         type.
12513         * macrotab.h: Include "common/function-view.h".
12514         (macro_callback_fn): Declare a prototype instead of a pointer.
12515         Remove "user_data" parameter.
12516         (macro_for_each, macro_for_each_in_scope): Adjust to use
12517         function_view as callback type.
12518         * psymtab.c (partial_map_expand_apply)
12519         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12520         Adjust to use function_view as callback type and to return bool.
12521         (psym_expand_symtabs_matching): Adjust to use function_view as
12522         callback types.
12523         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12524         to use function_view as callback type and to return bool.
12525         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12526         callback types.
12527         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12528         as callback types.
12529         * symfile.h: Include "common/function-view.h".
12530         (expand_symtabs_file_matcher_ftype)
12531         (expand_symtabs_symbol_matcher_ftype)
12532         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12533         return bool.
12534         (quick_symbol_functions::map_symtabs_matching_filename)
12535         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12536         function_view as callback type and return bool.
12537         (expand_symtabs_matching): Adjust to use function_view as callback
12538         type.
12539         (maintenance_expand_name_matcher)
12540         (maintenance_expand_file_matcher): Delete.
12541         (maintenance_expand_symtabs): Use lambdas.
12542         * symtab.c (iterate_over_some_symtabs): Adjust to use
12543         function_view as callback types and return bool.
12544         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12545         of a cleanup.
12546         (lookup_symtab_callback): Delete.
12547         (lookup_symtab): Use a lambda.
12548         (iterate_over_symbols): Adjust to use function_view as callback
12549         type.
12550         (struct search_symbols_data, search_symbols_file_matches)
12551         (search_symbols_name_matches): Delete.
12552         (search_symbols): Use a pair of lambdas.
12553         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12554         (symtab_expansion_callback): Delete.
12555         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12556         * symtab.h: Include "common/function-view.h".
12557         (iterate_over_some_symtabs): Adjust to use function_view as
12558         callback type and return bool.
12559         (iterate_over_symtabs): Adjust to use function_view as callback
12560         type.
12561         (symbol_found_callback_ftype): Remove 'data' parameter and return
12562         bool.
12563         (iterate_over_symbols): Adjust to use function_view as callback
12564         type.
12565
12566 2017-02-23  Pedro Alves  <palves@redhat.com>
12567
12568         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12569         (%.o) <unittests/%.c>: New pattern.
12570         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12571         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12572         * common/function-view.h: New file.
12573         * unittests/function-view-selftests.c: New file.
12574         * configure: Regenerate.
12575
12576 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12577
12578         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12579         inferior_ptid.
12580         * go32-nat.c (go32_thread_alive): Likewise.
12581
12582 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12583
12584         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12585         delete.
12586
12587 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12588
12589         * varobj.c (varobj_clear_saved_item): Use delete instead of
12590         xfree.
12591         (update_dynamic_varobj_children): Likewise.
12592
12593 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12594
12595         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12596
12597 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12598
12599         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12600         m_enum_value to 0 in default constructor.
12601
12602 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12603
12604         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12605         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12606         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12607         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12608         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12609         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12610         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12611         IS_STORE_CONDITIONAL_INSN.
12612
12613 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12614
12615         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12616
12617 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12618
12619         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12620
12621 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12622
12623         * dwarf2read.c (skip_one_die, read_attribute_value)
12624         (dwarf2_const_value_attr, dump_die_shallow)
12625         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12626         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12627
12628 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12629
12630         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12631         (dwarf_parse_macro_header): Accept DWARF version 5.
12632         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12633
12634 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12635
12636         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12637         DW_AT_GNU_*.
12638         * common/common-exceptions.h (enum errors): Likewise.
12639         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12640         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12641         (dwarf_expr_context::execute_stack_op): Likewise.
12642         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12643         Likewise.
12644         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12645         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12646         (show_entry_values_debug, call_site_to_target_addr)
12647         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12648         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12649         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12650         (value_of_dwarf_block_entry, indirect_pieced_value)
12651         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12652         (disassemble_dwarf_expression): Likewise.
12653         * dwarf2read.c (process_die, inherit_abstract_dies)
12654         (read_call_site_scope): Likewise.
12655         * gdbtypes.h (struct func_type, struct call_site_parameter)
12656         (struct call_site): Likewise.
12657         * stack.c (read_frame_arg): Likewise.
12658         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12659
12660 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12661
12662         * defs.h (read_unsigned_leb128): New declaration.
12663         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12664         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12665         (dwarf2_find_location_expression): Call also
12666         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12667         * dwarf2loc.h (dwarf2_version): New declaration.
12668         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12669         rnglists.
12670         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12671         .debug_rnglists.
12672         (struct dwop_section_names): Add loclists_dwo.
12673         (dwop_section_names): Add .debug_loclists.dwo.
12674         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12675         (struct dwarf2_per_cu_data): Add dwarf_version.
12676         (struct dwo_sections): Add loclists.
12677         (struct attr_abbrev): Add implicit_const.
12678         (read_indirect_line_string): New declaration.
12679         (read_unsigned_leb128): Delete declaration.
12680         (rcuh_kind): New definition.
12681         (read_and_check_comp_unit_head): Change parameter
12682         is_debug_types_section to section_kind.
12683         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12684         (read_comp_unit_head): Change parameter abfd to section, add parameter
12685         section_kind.  Handle DWARF-5.
12686         (error_check_comp_unit_head): Accept also DWARF version 5.
12687         (read_and_check_comp_unit_head): Change parameter
12688         is_debug_types_section to section_kind.
12689         (read_and_check_type_unit_head): Delete function.
12690         (read_abbrev_offset): Handle DWARF-5.
12691         (create_debug_type_hash_table): Add parameter section_kind.  Process
12692         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12693         comp_unit_head.
12694         (create_debug_types_hash_table): Update create_debug_type_hash_table
12695         caller.
12696         (create_all_type_units): Call create_debug_type_hash_table.
12697         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12698         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12699         caller.
12700         (skip_one_die): Handle DW_FORM_implicit_const.
12701         (dwarf2_rnglists_process): New function.
12702         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12703         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12704         (read_attribute_value): Handle DW_FORM_implicit_const,
12705         DW_FORM_line_strp.
12706         (read_attribute): Handle DW_FORM_implicit_const.
12707         (read_indirect_string_at_offset_from): New function from
12708         read_indirect_string_at_offset.
12709         (read_indirect_string_at_offset): Call
12710         read_indirect_string_at_offset_from.
12711         (read_indirect_line_string_at_offset): New function.
12712         (read_indirect_string): New function comment.
12713         (read_indirect_line_string): New function.
12714         (read_unsigned_leb128): Make it global.
12715         (dwarf2_string_attr): Handle DWARF-5.
12716         (add_include_dir_stub, read_formatted_entries): New functions.
12717         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12718         Handle DWARF-5.
12719         (per_cu_header_read_in): Update read_comp_unit_head caller.
12720         (dwarf2_version): New function.
12721         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12722         rnglists.
12723         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12724         fields.
12725
12726 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12727
12728         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12729
12730 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12731
12732         * dwarf2read.c (dwarf2_ranges_process): New function from
12733         dwarf2_ranges_read.
12734         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12735         dwarf2_ranges_process.
12736
12737 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12738
12739         * dwarf2read.c (create_debug_type_hash_table): New function from
12740         create_debug_types_hash_table.
12741         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12742         (create_all_type_units, open_and_init_dwo_file): Update
12743         create_debug_types_hash_table callers.
12744
12745 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12746
12747         PR gdb/16188
12748         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12749         refer to 'ap', not 'args'.
12750
12751 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12752             Pedro Alves  <palves@redhat.com>
12753
12754         PR gdb/16188
12755         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12756         calls succeeded.
12757         * fork-child.c (trace_start_error): New function.
12758         (trace_start_error_with_name): Likewise.
12759         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12760         * inf-ptrace.c (inf_ptrace_me): Likewise.
12761         * inferior.h (trace_start_error): New prototype.
12762         (trace_start_error_with_name): Likewise.
12763
12764 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12765
12766         PR gdb/21164
12767         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12768         NULL before using it.
12769         * symmisc.c (maintenance_print_symbols): Likewise.
12770         (maintenance_print_msymbols): Likewise.
12771
12772 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12773
12774         * NEWS: Add record Python bindings entry.
12775
12776 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12777
12778         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12779         py-record-full.o.
12780         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12781         * python/py-record-btrace.c, python/py-record-btrace.h,
12782         python/py-record-full.c, python/py-record-full.h: New file.
12783         * python/py-record.c: Add include for py-record-btrace.h and
12784         py-record-full.h.
12785         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12786         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12787         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12788         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12789         New definition.
12790         (gdbpy_initialize_btrace): New export.
12791         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12792
12793 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12794
12795         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12796         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12797         * python/py-record.c: New file.
12798         * python/python-internal.h (gdbpy_start_recording,
12799         gdbpy_current_recording, gdpy_stop_recording,
12800         gdbpy_initialize_record): New export.
12801         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12802         (python_GdbMethods): Add gdbpy_start_recording,
12803         gdbpy_current_recording and gdbpy_stop_recording.
12804
12805 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12806
12807         * record-btrace.c (record_btrace_record_method): New function.
12808         (init_record_btrace_ops): Initialize to_record_method.
12809         * record-full.c (record_full_record_method): New function.
12810         (init_record_full_ops, init_record_full_core_ops): Add
12811         record_full_record_method.
12812         * record.h (enum record_method): New enum.
12813         * target-debug.h (target_debug_print_enum_record_method: New define.
12814         * target-delegates.c: Regenerate.
12815         * target.c (target_record_method): New function.
12816         * target.h: Include record.h.
12817         (struct target_ops) <to_record_method>: New field.
12818         (target_record_method): New export.
12819
12820 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12821
12822         * record.h (record_start, record_stop): New export.
12823         * record.c (record_start, record_stop): New function.
12824
12825 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12826
12827         * btrace.c (btrace_fetch): Copy function call segments pointer
12828         into a vector.
12829         (btrace_clear): Clear the vector.
12830         (btrace_find_insn_by_number): Use binary search to find the correct
12831         function call segment.
12832         * btrace.h (brace_fun_p): New typedef.
12833         (struct btrace_thread_info) <functions>: New field.
12834
12835 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12836
12837         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12838         * btrace.c (btrace_decode_error): ... here.  New function.
12839         * btrace.h (btrace_decode_error): New export.
12840
12841 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12842
12843         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12844         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12845         btrace_find_insn_by_number): Remove special case for gaps.
12846         * btrace.h (btrace_insn_get_error): New export.
12847         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12848         * record-btrace.c (btrace_insn_history): Print number for gaps.
12849         (record_btrace_info, record_btrace_goto): Handle gaps.
12850
12851 2017-02-14  Tom Tromey  <tom@tromey.com>
12852
12853         PR python/13598:
12854         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12855         event.
12856         * python/py-evts.c (gdbpy_initialize_py_events): Add
12857         before_prompt registry.
12858         * python/py-events.h (events_object) <before_prompt>: New field.
12859
12860 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12861
12862         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12863
12864 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12865
12866         * symfile (_initialize_symfile): Add usage text to the load command's
12867         help text.
12868
12869 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12870
12871         * utils.c (defaulted_query): Don't query on secondary UIs.
12872
12873 2017-02-10  Tom Tromey  <tom@tromey.com>
12874
12875         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12876
12877 2017-02-10  Tom Tromey  <tom@tromey.com>
12878
12879         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12880         "cleanup" local.
12881         * python/py-type.c (typy_legacy_template_argument): Remove
12882         unnecessary "cleanup" local.
12883
12884 2017-02-10  Tom Tromey  <tom@tromey.com>
12885
12886         * python/python.c (do_start_initialization): New function, from
12887         _initialize_python.
12888         (_initialize_python): Call do_start_initialization.
12889         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12890         goto.
12891
12892 2017-02-10  Tom Tromey  <tom@tromey.com>
12893
12894         * python/py-prettyprint.c (pretty_print_one_value): Use
12895         gdbpy_ref.
12896
12897 2017-02-10  Tom Tromey  <tom@tromey.com>
12898
12899         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12900         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12901         gdbpy_ref.
12902         * python/py-type.c (field_new): Use gdbpy_ref.
12903         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12904         gdbpy_ref.
12905         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12906         (py_free_pspace): Likewise.
12907         (pspace_to_pspace_object): Likewise.
12908         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12909         (py_free_objfile): Likewise.
12910         (objfile_to_objfile_object): Likewise.
12911         * python/py-inferior.c (delete_thread_object): Use
12912         gdbpy_ref.
12913         (infpy_read_memory): Likewise.
12914         (py_free_inferior): Likewise.
12915         * python/py-evtregistry.c (create_eventregistry_object): Use
12916         gdbpy_ref.
12917         * python/py-event.c (create_event_object): Use gdbpy_ref.
12918
12919 2017-02-10  Tom Tromey  <tom@tromey.com>
12920
12921         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12922         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12923         used.
12924         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12925         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12926         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12927         python/py-framefilter.c, python/py-function.c,
12928         python/py-inferior.c, python/py-infevents.c,
12929         python/py-linetable.c, python/py-newobjfileevent.c,
12930         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12931         python/py-signalevent.c, python/py-stopevent.c,
12932         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12933         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12934         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12935         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12936
12937 2017-02-10  Tom Tromey  <tom@tromey.com>
12938
12939         * ui-out.h (ui_out_emit_type): New class.
12940         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12941         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12942         and ui_out_emit_tuple.
12943         (enumerate_locals): Likewise.
12944         (py_mi_print_variables, py_print_locals, py_print_args): Use
12945         ui_out_emit_list.
12946         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12947         ui_out_emit_list.
12948         * common/gdb_optional.h: New file.
12949
12950 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12951
12952         * MAINTAINERS (Write After Approval): Update my e-mail address.
12953
12954 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12955
12956         PR gdb/21122
12957         * breakpoint.c (_initialize_breakpoint): Update the help description
12958         of the 'commands' command to indicate that it takes a list argument.
12959
12960 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12961
12962         * interps.c (current_interp_set_logging): Remove "return".
12963
12964 2017-02-09  Gary Benson  <gbenson@redhat.com>
12965
12966         * symtab.c (add_symtab_completions): Prevent NULL pointer
12967         dereference.
12968
12969 2017-02-08  Pedro Alves  <palves@redhat.com>
12970
12971         * interps.c (interp::interp): Remove reference to quiet_p.
12972         (interp_set): Make static.  Remove dead "Switching to" output
12973         code.
12974         (interp_quiet_p, interp_set_quiet): Delete.
12975         (interpreter_exec_cmd): Don't set the interpreter quiet.
12976         * interps.h (interp_quiet_p): Make static.
12977         (class interp) <quiet_p>: Remove field
12978
12979 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12980
12981         * cli/cli-decode.c (find_command_name_length): Make it extern.
12982         * cli/cli-decode.h (find_command_name_length): Declare.
12983         * cli/cli-script.c (command_name_equals, line_first_arg):
12984         New functions.
12985         (process_next_line): Use cli-decode to parse command names.
12986         (build_command_line): Make args a constant pointer.
12987
12988 2017-02-08  Jerome Guitton  <guitton@adacore.com>
12989
12990         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12991         Remove case-insensitive search.
12992
12993 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
12994
12995         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12996         at the end of the line.  Avoids an ARI warning.
12997
12998 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
12999
13000         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13001         rdseed instructions.
13002         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13003
13004 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13005
13006         PR tdep/20936
13007         Provide and use sparc32 and sparc64 target description XML files.
13008         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13009         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13010         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13011         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13012         * features/sparc/sparc32-solaris.xml: New file.
13013         * features/sparc/sparc64-solaris.xml: New file.
13014         * features/sparc/sparc32-solaris.c: Generated.
13015         * features/sparc/sparc64-solaris.c: Generated.
13016         * sparc-tdep.h: Account for differences in target descriptions.
13017         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13018         (sparc32_register_type): Use target provided registers.
13019         (validate_tdesc_registers): New function.
13020         (sparc32_gdbarch_init): Use tdesc_has_registers.
13021         Set pseudoregister functions.
13022         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13023         (sparc64_register_type): Use target provided registers.
13024         (sparc64_init_abi): Set pseudoregister functions.
13025
13026 2017-02-03  Tom Tromey  <tom@tromey.com>
13027
13028         PR rust/21097:
13029         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13030         with a single member.
13031
13032 2017-02-03  Pedro Alves  <palves@redhat.com>
13033
13034         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13035         (cli_interp_base::~cli_interp_base): New.
13036         (cli_interp): New struct.
13037         (as_cli_interp): Cast the interp itself to cli_interp.
13038         (cli_interpreter_pre_command_loop): Rename to ...
13039         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13040         parameter.
13041         (cli_interpreter_init): Rename to ...
13042         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13043         boolean.  Make extern.
13044         (cli_interpreter_resume): Rename to ...
13045         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13046         extern.
13047         (cli_interpreter_suspend): Rename to ...
13048         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13049         extern.
13050         (cli_interpreter_exec): Rename to ...
13051         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13052         extern.
13053         (cli_interpreter_supports_command_editing): Rename to ...
13054         (cli_interp_base::supports_command_editing): ... this.  Remove
13055         'interp' parameter.  Make extern.
13056         (cli_ui_out): Rename to ...
13057         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13058         Make extern.
13059         (cli_set_logging): Rename to ...
13060         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13061         parameter.  Make extern.
13062         (cli_interp_procs): Delete.
13063         (cli_interp_factory): Adjust to use "new".
13064         * cli/cli-interp.h: Include "interps.h".
13065         (struct cli_interp_base): New struct.
13066         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13067         (interp_new): Delete.
13068         (interp::interp, interp::~interp): New.
13069         (interp_set): Use bool, and return void.  Assume the interpreter
13070         has suspend, init and resume methods, and that the all return
13071         void.
13072         (set_top_level_interpreter): interp_set returns void.
13073         (interp_ui_out): Adapt.
13074         (current_interp_set_logging): Adapt.
13075         (interp_data): Delete.
13076         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13077         (interp_exec): Adapt.
13078         (top_level_interpreter_data): Delete.
13079         * interps.h (interp_init_ftype, interp_resume_ftype)
13080         (interp_suspend_ftype, interp_exec_ftype)
13081         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13082         (class interp): New.
13083         (interp_new): Delete.
13084         (interp_set): Now returns void.  Use bool.
13085         (interp_data, top_level_interpreter_data): Delete.
13086         * mi/mi-common.h: Include interps.h.
13087         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13088         init, resume, suspect, exec, interp_ui_out, set_logging and
13089         pre_command_loop methods.
13090         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13091         (mi_interpreter_init): Rename to ...
13092         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13093         bool, return void and make extern.  Adjust.
13094         (mi_interpreter_resume): ... Rename to ...
13095         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13096         return void and make extern.  Adjust.
13097         (mi_interpreter_suspend): ... Rename to ...
13098         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13099         return void and make extern.  Adjust.
13100         (mi_interpreter_exec): ... Rename to ...
13101         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13102         extern.  Adjust.
13103         (mi_interpreter_pre_command_loop): ... Rename to ...
13104         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13105         parameter and make extern.
13106         (mi_on_normal_stop_1): Adjust.
13107         (mi_ui_out): Rename to ...
13108         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13109         parameter and make extern.  Adjust.
13110         (mi_set_logging): Rename to ...
13111         (mi_interp::set_logging): ... this.  Remove the 'interp'
13112         parameter and make extern.  Adjust.
13113         (mi_interp_procs): Delete.
13114         (mi_interp_factory): Adjust to use 'new'.
13115         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13116         (mi_print_exception, mi_execute_command, mi_load_progress):
13117         Adjust.
13118         * tui/tui-interp.c (tui_interp): New class.
13119         (as_tui_interp): Return a tui_interp pointer.
13120         (tui_on_normal_stop, tui_on_signal_received)
13121         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13122         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13123         to use interp::interp_ui_out.
13124         (tui_init): Rename to ...
13125         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13126         bool, return void and make extern.  Adjust.
13127         (tui_resume): Rename to ...
13128         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13129         return void and make extern.  Adjust.
13130         (tui_suspend): Rename to ...
13131         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13132         return void and make extern.  Adjust.
13133         (tui_ui_out): Rename to ...
13134         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13135         parameter, and make extern.  Adjust.
13136         (tui_exec): Rename to ...
13137         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13138         make extern.
13139         (tui_interp_procs): Delete.
13140         (tui_interp_factory): Use "new".
13141
13142 2017-02-02  Tom Tromey  <tom@tromey.com>
13143
13144         * rust-exp.y (ends_raw_string, space_then_number)
13145         (rust_identifier_start_p): Return bool.
13146         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13147         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13148         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13149         (rust_chartype_p): Return bool.
13150         (val_print_struct, rust_print_struct_def, rust_print_type):
13151         Update.
13152         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13153         Return bool.
13154
13155 2017-02-02  Tom Tromey  <tom@tromey.com>
13156
13157         * rust-lang.c: Reindent.
13158
13159 2017-02-02  Tom Tromey  <tom@tromey.com>
13160
13161         * rust-lang.h (rust_crate_for_block): Update.
13162         * rust-lang.c (rust_crate_for_block): Return std::string.
13163         (rust_get_disr_info): Use std:;string, not
13164         gdb::unique_xmalloc_ptr.
13165         * rust-exp.y (crate_name): Update.
13166
13167 2017-02-02  Pedro Alves  <palves@redhat.com>
13168
13169         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13170         field out of gdb_disassembler_test and make it static.
13171
13172 2017-02-02  Pedro Alves  <palves@redhat.com>
13173
13174         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13175         mi1_interp and mi_interp fields.
13176
13177 2017-02-02  Pedro Alves  <palves@redhat.com>
13178
13179         * cli/cli-interp.c (struct saved_output_files, saved_output):
13180         Moved from cli/cli-logging.c.
13181         (cli_set_logging): New function.
13182         (cli_interp_procs): Install cli_set_logging.
13183         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13184         Declare.
13185         * cli/cli-logging.c (struct saved_output_files, saved_output):
13186         Moved to cli/cli-interp.c.
13187         (pop_output_files): Don't save outputs here.
13188         (make_logging_output): New function.
13189         (handle_redirections): Don't build tee nor save previous outputs
13190         here.
13191         * interps.c (current_interp_set_logging): Change prototype.
13192         Assume there's always a set_logging_proc method installed.
13193         * interps.h (interp_set_logging_ftype): Change prototype.
13194         (current_interp_set_logging): Change prototype and adjust comment.
13195         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13196         use make_logging_output.
13197         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13198 2017-02-02  Pedro Alves  <palves@redhat.com>
13199
13200         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13201         from ...
13202         (set_logging_overwrite): ... here.
13203         (logging_no_redirect_file): Delete.
13204         (set_logging_redirect): Don't handle redirection on the fly.
13205         Instead warn that "logging off" / "logging on" is necessary.
13206         (pop_output_files): Delete references to logging_no_redirect_file.
13207         (show_logging_command): Always speak in terms of what will happen
13208         once logging is reenabled.
13209
13210 2017-02-02  Pedro Alves  <palves@redhat.com>
13211
13212         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13213
13214 2017-02-02  Pedro Alves  <palves@redhat.com>
13215
13216         * disasm.c (gdb_pretty_print_insn): Rename to ...
13217         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13218         Remove gdbarch parameter.  Adapt to clear the object's buffers
13219         instead of allocating new buffers, and to print using the object's
13220         gdb_disassembler instead of calling gdb_print_insn.
13221         (dump_insns): Use gdb_pretty_print_disassembler.
13222         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13223         (gdb_pretty_print_disassembler): New class.
13224         * record-btrace.c (btrace_insn_history): Use
13225         gdb_pretty_print_disassembler.
13226
13227 2017-02-02  Pedro Alves  <palves@redhat.com>
13228
13229         * ada-lang.c (type_as_string): Use string_file.
13230         * ada-valprint.c (ada_print_floating): Use string_file.
13231         * ada-varobj.c (ada_varobj_scalar_image)
13232         (ada_varobj_get_value_image): Use string_file.
13233         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13234         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13235         * breakpoint.c (update_inserted_breakpoint_locations)
13236         (insert_breakpoint_locations, reattach_breakpoints)
13237         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13238         (print_it_watchpoint): Use string_file.
13239         (save_breakpoints): Use stdio_file.
13240         * c-exp.y (oper): Use string_file.
13241         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13242         tee_file.
13243         (pop_output_files): Use delete.
13244         (handle_redirections): Use stdio_file and tee_file.
13245         * cli/cli-setshow.c (do_show_command): Use string_file.
13246         * compile/compile-c-support.c (c_compute_program): Use
13247         string_file.
13248         * compile/compile-c-symbols.c (generate_vla_size): Take a
13249         'string_file &' instead of a 'ui_file *'.
13250         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13251         of a 'ui_file *'.  Use string_file.
13252         (generate_c_for_variable_locations): Take a 'string_file &'
13253         instead of a 'ui_file *'.
13254         * compile/compile-internal.h (generate_c_for_for_one_variable):
13255         Take a 'string_file &' instead of a 'ui_file *'.
13256         * compile/compile-loc2c.c (push, pushf, unary, binary)
13257         (print_label, pushf_register_address, pushf_register)
13258         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13259         'ui_file *'.  Adjust.
13260         * compile/compile.c (compile_to_object): Use string_file.
13261         * compile/compile.h (compile_dwarf_expr_to_c)
13262         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13263         'ui_file *'.
13264         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13265         (replace_typedefs_qualified_name): Use string_file and
13266         obstack_copy0.
13267         * disasm.c (gdb_pretty_print_insn): Use string_file.
13268         (gdb_disassembly): Adjust reference the null_stream global.
13269         (do_ui_file_delete): Delete.
13270         (gdb_insn_length): Use null_stream.
13271         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13272         * dwarf2loc.c (dwarf2_compile_property_to_c)
13273         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13274         'string_file &' instead of a 'ui_file *'.
13275         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13276         * dwarf2read.c (do_ui_file_peek_last): Delete.
13277         (dwarf2_compute_name): Use string_file.
13278         * event-top.c (gdb_setup_readline): Use stdio_file.
13279         * gdbarch.sh (verify_gdbarch): Use string_file.
13280         * gdbtypes.c (safe_parse_type): Use null_stream.
13281         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13282         string_file.
13283         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13284         'string_file *' instead of a 'ui_file *'.
13285         (gdbscm_arch_disassemble): Use string_file.
13286         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13287         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13288         inherits from ui_file.
13289         (ioscm_file_port_delete, ioscm_file_port_rewind)
13290         (ioscm_file_port_put): Delete.
13291         (ioscm_file_port_write): Rename to ...
13292         (ioscm_file_port::write): ... this.  Remove file_port_magic
13293         checks.
13294         (ioscm_file_port_new): Delete.
13295         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13296         ui_file_up.
13297         * guile/scm-type.c (tyscm_type_name): Use string_file.
13298         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13299         Use string_file.
13300         * infcmd.c (print_return_value_1): Use string_file.
13301         * infrun.c (print_target_wait_results): Use string_file.
13302         * language.c (add_language): Use string_file.
13303         * location.c (explicit_to_string_internal): Use string_file.
13304         * main.c (captured_main_1): Use null_file.
13305         * maint.c (maintenance_print_architecture): Use stdio_file.
13306         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13307         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13308         event_channel>: Change type to mi_console_file pointer.
13309         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13310         (mi_console_file_delete): Delete.
13311         (struct mi_console_file): Delete.
13312         (mi_console_file_magic): Delete.
13313         (mi_console_file_new): Delete.
13314         (mi_console_file::mi_console_file): New.
13315         (mi_console_file_delete): Delete.
13316         (mi_console_file_fputs): Delete.
13317         (mi_console_file::write): New.
13318         (mi_console_raw_packet): Delete.
13319         (mi_console_file::flush): New.
13320         (mi_console_file_flush): Delete.
13321         (mi_console_set_raw): Rename to ...
13322         (mi_console_file::set_raw): ... this.
13323         * mi/mi-console.h (class mi_console_file): New class.
13324         (mi_console_file_new, mi_console_set_raw): Delete.
13325         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13326         (mi_set_logging): Use delete and tee_file.  Adjust.
13327         * mi/mi-main.c (output_register): Use string_file.
13328         (mi_cmd_data_evaluate_expression): Use string_file.
13329         (mi_cmd_data_read_memory): Use string_file.
13330         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13331         * mi/mi-out.c (mi_ui_out::main_stream): New.
13332         (mi_ui_out::rewind): Use main_stream and
13333         string_file.
13334         (mi_ui_out::put): Use main_stream and string_file.
13335         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13336         Allocate a 'string_file' instead.
13337         (mi_out_new): Don't allocate a mem_fileopen stream here.
13338         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13339         (mi_ui_out::main_stream): Declare method.
13340         * printcmd.c (eval_command): Use string_file.
13341         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13342         * python/py-arch.c (archpy_disassemble): Use string_file.
13343         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13344         * python/py-frame.c (frapy_str): Use string_file.
13345         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13346         Use string_file.
13347         * python/py-type.c (typy_str): Use string_file.
13348         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13349         * python/py-value.c (valpy_str): Use string_file.
13350         * record-btrace.c (btrace_insn_history): Use string_file.
13351         * regcache.c (regcache_print): Use stdio_file.
13352         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13353         * remote.c (escape_buffer): Use string_file.
13354         * rust-lang.c (rust_get_disr_info): Use string_file.
13355         * serial.c (serial_open_ops_1): Use stdio_file.
13356         (do_serial_close): Use delete.
13357         * stack.c (print_frame_arg): Use string_file.
13358         (print_frame_args): Remove local mem_fileopen stream, not used.
13359         (print_frame): Use string_file.
13360         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13361         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13362         Take a 'string_file *' instead of a 'ui_file *'.
13363         * top.c (new_ui): Use stdio_file and stderr_file.
13364         (free_ui): Use delete.
13365         (execute_command_to_string): Use string_file.
13366         (quit_confirm): Use string_file.
13367         * tracepoint.c (collection_list::append_exp): Use string_file.
13368         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13369         * tui/tui-file.c: Don't include "ui-file.h".
13370         (enum streamtype, struct tui_stream): Delete.
13371         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13372         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13373         (tui_file::tui_file): New method.
13374         (tui_file_fputs): Delete.
13375         (tui_file_get_strbuf): Delete.
13376         (tui_file::puts): New method.
13377         (tui_file_adjust_strbuf): Delete.
13378         (tui_file_flush): Delete.
13379         (tui_file::flush): New method.
13380         * tui/tui-file.h: Tweak intro comment.
13381         Include ui-file.h.
13382         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13383         (tui_file_adjust_strbuf): Delete declarations.
13384         (class tui_file): New class.
13385         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13386         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13387         (tui_register_format): Use string_stream.
13388         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13389         (tui_get_function_from_frame): Use string_file.
13390         * typeprint.c (type_to_string): Use string_file.
13391         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13392         (null_stream): New global.
13393         (ui_file_delete): Delete.
13394         (ui_file::ui_file): New.
13395         (null_file_isatty): Delete.
13396         (ui_file::~ui_file): New.
13397         (null_file_rewind): Delete.
13398         (ui_file::printf): New.
13399         (null_file_put): Delete.
13400         (null_file_flush): Delete.
13401         (ui_file::putstr): New.
13402         (null_file_write): Delete.
13403         (ui_file::putstrn): New.
13404         (null_file_read): Delete.
13405         (ui_file::putc): New.
13406         (null_file_fputs): Delete.
13407         (null_file_write_async_safe): Delete.
13408         (ui_file::vprintf): New.
13409         (null_file_delete): Delete.
13410         (null_file::write): New.
13411         (null_file_fseek): Delete.
13412         (null_file::puts): New.
13413         (ui_file_data): Delete.
13414         (null_file::write_async_safe): New.
13415         (gdb_flush, ui_file_isatty): Adjust.
13416         (ui_file_put, ui_file_rewind): Delete.
13417         (ui_file_write): Adjust.
13418         (ui_file_write_for_put): Delete.
13419         (ui_file_write_async_safe, ui_file_read): Adjust.
13420         (ui_file_fseek): Delete.
13421         (fputs_unfiltered): Adjust.
13422         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13423         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13424         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13425         (set_ui_file_data): Delete.
13426         (string_file::~string_file, string_file::write)
13427         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13428         (do_ui_file_as_string, ui_file_as_string): Delete.
13429         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13430         (struct mem_file): Delete.
13431         (mem_file_new): Delete.
13432         (stdio_file::stdio_file): New.
13433         (mem_file_delete): Delete.
13434         (stdio_file::stdio_file): New.
13435         (mem_fileopen): Delete.
13436         (stdio_file::~stdio_file): New.
13437         (mem_file_rewind): Delete.
13438         (stdio_file::set_stream): New.
13439         (mem_file_put): Delete.
13440         (stdio_file::open): New.
13441         (mem_file_write): Delete.
13442         (stdio_file_magic, struct stdio_file): Delete.
13443         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13444         (stdio_file::flush): New.
13445         (stdio_file_read): Rename to ...
13446         (stdio_file::read): ... this.  Adjust.
13447         (stdio_file_write): Rename to ...
13448         (stdio_file::write): ... this.  Adjust.
13449         (stdio_file_write_async_safe): Rename to ...
13450         (stdio_file::write_async_safe) ... this.  Adjust.
13451         (stdio_file_fputs): Rename to ...
13452         (stdio_file::puts) ... this.  Adjust.
13453         (stdio_file_isatty): Delete.
13454         (stdio_file_fseek): Delete.
13455         (stdio_file::isatty): New.
13456         (stderr_file_write): Rename to ...
13457         (stderr_file::write) ... this.  Adjust.
13458         (stderr_file_fputs): Rename to ...
13459         (stderr_file::puts) ... this.  Adjust.
13460         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13461         (stderr_file::stderr_file): New.
13462         (tee_file_magic): Delete.
13463         (struct tee_file): Delete.
13464         (tee_file::tee_file): New.
13465         (tee_file_new): Delete.
13466         (tee_file::~tee_file): New.
13467         (tee_file_delete): Delete.
13468         (tee_file_flush): Rename to ...
13469         (tee_file::flush): ... this.  Adjust.
13470         (tee_file_write): Rename to ...
13471         (tee_file::write): ... this.  Adjust.
13472         (tee_file::write_async_safe): New.
13473         (tee_file_fputs): Rename to ...
13474         (tee_file::puts): ... this.  Adjust.
13475         (tee_file_isatty): Rename to ...
13476         (tee_file::isatty): ... this.  Adjust.
13477         * ui-file.h (struct obstack, struct ui_file): Don't
13478         forward-declare.
13479         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13480         (ui_file_write_ftype)
13481         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13482         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13483         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13484         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13485         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13486         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13487         (set_ui_file_fseek): Delete.
13488         (ui_file_data, ui_file_delete, ui_file_rewind)
13489         (struct ui_file): New.
13490         (ui_file_up): New.
13491         (class null_file): New.
13492         (null_stream): Declare.
13493         (ui_file_write_for_put, ui_file_put): Delete.
13494         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13495         Delete.
13496         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13497         (gdb_fopen, tee_file_new): Delete.
13498         (struct string_file): New.
13499         (struct stdio_file): New.
13500         (stdio_file_up): New.
13501         (struct stderr_file): New.
13502         (class tee_file): New.
13503         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13504         of a 'ui_file *'.  Adjust.
13505         * ui-out.h (class ui_out) <field_stream>: Likewise.
13506         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13507         (null_stream): Delete.
13508         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13509         Adjust.
13510         * utils.h (struct ui_file): Delete forward declaration..
13511         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13512         (error_stream): Take a 'string_file &' instead of a
13513         'ui_file *'.
13514         * varobj.c (varobj_value_get_print_value): Use string_file.
13515         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13516         * gdbarch.c: Regenerate.
13517
13518 2017-02-02  Pedro Alves  <palves@redhat.com>
13519
13520         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13521         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13522         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13523         Adjust to call gdb_print_insn instead of
13524         gdb_disassembler::print_insn.
13525         (dump_insns, do_mixed_source_and_assembly_deprecated)
13526         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13527         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13528         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13529         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13530         declaration.
13531         (gdb_pretty_print_insn): Re-add declaration.
13532         * record-btrace.c (btrace_insn_history): Don't allocate a
13533         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13534
13535 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13536
13537         * disasm.h (gdb_disassembly): Remove file_string parameter.
13538         * disasm.c (gdb_disassembly): Likewise.
13539         * cli/cli-cmds.c (print_disassembly): Adapt.
13540         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13541         * stack.c (do_gdb_disassembly): Likewise.
13542
13543 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13544
13545         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13546         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13547         targets.  And if the implicit value is longer than needed, extract
13548         the first bytes instead of the "least significant" ones.
13549
13550 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13551
13552         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13553         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13554         (btrace_fetch): Assert can_access_registers_ptid.
13555         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13556         validate_registers_access.
13557
13558 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13559
13560         * gdbthread.h (can_access_registers_ptid): New.
13561         * thread.c (can_access_registers_ptid): New.
13562
13563 2017-02-01  Pedro Alves  <palves@redhat.com>
13564
13565         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13566
13567 2017-01-31  Pedro Alves  <palves@redhat.com>
13568
13569         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13570         Fix typos.
13571
13572 2017-01-31  Pedro Alves  <palves@redhat.com>
13573
13574         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13575         not used.
13576
13577 2017-01-31  Pedro Alves  <palves@redhat.com>
13578
13579         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13580
13581 2017-01-31  Pedro Alves  <palves@redhat.com>
13582
13583         * common/scoped_restore.h
13584         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13585         change the value's parameter type to T2.
13586         (make_scoped_restore): Likewise.
13587
13588 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13589             Richard Henderson  <rth@redhat.com>
13590
13591         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13592         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13593         GS_BASE for older kernels.
13594         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13595         GS_BASE for older kernels.
13596         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13597         and GS_BASE to the offset table.
13598         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13599         system register group.
13600         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13601         for older kernels.
13602         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13603         amd64 ABI.
13604         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13605         AMD64_GSBASE_REGNUM.
13606         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13607         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13608         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13609         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13610         i386/64bit-segments.xml in those rules.
13611         * features/i386/64bit-segments.xml: New file.
13612         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13613         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13614         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13615         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13616         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13617         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13618         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13619         * features/i386/amd64-avx-linux.c: Regenerated.
13620         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13621         * features/i386/amd64-avx-mpx.c: Regenerated.
13622         * features/i386/amd64-avx512-linux.c: Regenerated.
13623         * features/i386/amd64-linux.c: Regenerated.
13624         * features/i386/amd64-mpx-linux.c: Regenerated.
13625         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13626         * features/i386/i386-avx-mpx.c: Regenerated.
13627         * features/i386/x32-avx-linux.c: Regenerated.
13628         * features/i386/x32-avx512-linux.c: Regenerated.
13629         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13630         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13631         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13632         * regformats/i386/amd64-linux.dat: Regenerated.
13633         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13634         * regformats/i386/x32-avx-linux.dat: Regenerated.
13635         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13636         * regformats/i386/x32-linux.dat: Regenerated.
13637
13638 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13639
13640         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13641         Set to AMD64_NUM_REGS.
13642
13643 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13644
13645         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13646         that checks validity of a register number.
13647
13648 2017-01-27  Kees Cook  <keescook@google.com>
13649
13650         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13651         fetch_fpregs if target has fpa registers.
13652         (arm_linux_store_inferior_registers): Call store_fpregs if target
13653         has fpa registers.
13654
13655 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13656
13657         * cris-tdep.c (cris_gdbarch_init): Remove check for
13658         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13659
13660 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13661
13662         * corelow.c (get_core_register_section): Check for regset
13663         existence before checking for REGSET_VARIABLE_SIZE.
13664
13665 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13666             Pedro Alves  <palves@redhat.com>
13667
13668         PR gdb/20939
13669         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13670         call memory_error, save memaddr instead.
13671         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13672         negative, cal memory_error.
13673         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13674
13675 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13676
13677         * disasm-selftests.c (memory_error_test): New function.
13678         (_initialize_disasm_selftests): Register memory_error_test.
13679
13680 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13681
13682         * Makefile.in (SFILES): Add disasm-selftests.c and
13683         selftest-arch.c.
13684         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13685         * disasm-selftests.c: New file.
13686         * selftest-arch.c: New file.
13687         * selftest-arch.h: New file.
13688
13689 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13690
13691         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13692         to bfd_arch_mep.  Don't return 0 if section is not
13693         found.  Call print_insn_mep.
13694
13695 2017-01-26  Pedro Alves  <palves@redhat.com>
13696             Yao Qi  <yao.qi@linaro.org>
13697
13698         * arm-tdep.c: Include "disasm.h".
13699         (gdb_print_insn_arm): Update code to get gdbarch.
13700         * disasm.c (dis_asm_read_memory): Change it to
13701         gdb_disassembler::dis_asm_read_memory.
13702         (dis_asm_memory_error): Likewise.
13703         (dis_asm_print_address): Likewise.
13704         (gdb_pretty_print_insn): Change it to
13705         gdb_disassembler::pretty_print_insn.
13706         (dump_insns): Add one argument gdb_disassemlber.  All
13707         callers updated.
13708         (do_mixed_source_and_assembly_deprecated): Likewise.
13709         (do_mixed_source_and_assembly): Likewise.
13710         (do_assembly_only): Likewise.
13711         (gdb_disassembler::gdb_disassembler): New.
13712         (gdb_disassembler::print_insn): New.
13713         * disasm.h (class gdb_disassembler): New.
13714         (gdb_pretty_print_insn): Remove declaration.
13715         (gdb_disassemble_info): Likewise.
13716         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13717         (gdbscm_disasm_read_memory_worker): Update.
13718         (gdbscm_disasm_read_memory): Update.
13719         (gdbscm_disasm_memory_error): Remove.
13720         (gdbscm_disasm_print_address): Remove.
13721         (gdbscm_disassembler::gdbscm_disassembler): New.
13722         (gdbscm_print_insn_from_port): Update.
13723         * mips-tdep.c: Include disasm.h.
13724         (gdb_print_insn_mips): Update code to get gdbarch.
13725         * record-btrace.c (btrace_insn_history): Update.
13726         * spu-tdep.c: Include disasm.h.
13727         (struct spu_dis_asm_data): Remove.
13728         (struct spu_dis_asm_info): New.
13729         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13730         SPU id.
13731         (gdb_print_insn_spu): Cast disassemble_info to
13732         spu_dis_asm_info.
13733
13734 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13735
13736         * disasm.c (do_ui_file_delete): Delete.
13737         (gdb_insn_length): Move code creating stream to ...
13738         * utils.c (null_stream): ... here.  New function.
13739         * utils.h (null_stream): Declare.
13740
13741 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13742
13743         * python/py-inferior.c (find_thread_object): Return directly
13744         from the loop.  Remove "found" variable.
13745
13746 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13747
13748         GDB 7.12.1 released.
13749
13750 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13751
13752         * python/py-function.c (fnpy_call): Reorder declarations to have
13753         the gdbpy_enter object declared first.
13754         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13755
13756 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13757
13758         PR python/21068
13759         * python/python-internal.h (PyMem_RawMalloc): Define for
13760         Python < 3.4.
13761         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13762         PyMem_RawMalloc instead of PyMem_Malloc.
13763
13764 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13765             Luis Machado  <lgustavo@codesourcery.com>
13766
13767         * NEWS (New commands): Mention flash-erase.
13768         (New MI commands): Mention target-flash-erase.
13769         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13770         command.
13771         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13772         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13773         * target.c (flash_erase_command): New function.
13774         (initialize_targets): Add new flash-erase command.
13775         * target.h (flash_erase_command): New declaration.
13776
13777 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13778
13779         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13780         HAVE_SYS_PROCFS_H is defined.
13781
13782 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13783
13784         * remote.c (struct cached_reg): Change data into a pointer.
13785         * (stop_reply_dtr): Free data pointers before deleting vector.
13786         (process_stop_reply): Likewise.
13787         (remote_parse_stop_reply): Allocate space for data
13788
13789 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13790
13791         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13792         MAX_REGISTER_SIZE.
13793         (amd64_pseudo_register_read_value): Likewise.
13794         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13795         (store_register_using_P): Likewise.
13796         * regcache.c (regcache_xfer_part): Likewise.
13797
13798 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13799
13800         Split real and pseudo registers.
13801         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13802         (sparc32_pseudo_regnum): New enum.
13803         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13804         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13805         (SPARC32_CP0_REGISTERS): New macro.
13806         (sparc32_pseudo_register_name): New function.
13807         (sparc32_register_name): Use sparc32_pseudo_register_name.
13808         (sparc32_pseudo_register_type): New function.
13809         (sparc32_register_type): Use sparc32_pseudo_register_type.
13810         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13811         pseudo register numbers.
13812         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13813         (SPARC64_CP0_REGISTERS): New macro.
13814         (sparc64_pseudo_register_name): New function.
13815         (sparc64_register_name): Use sparc64_pseudo_register_name.
13816         (sparc64_pseudo_register_type): New function.
13817         (sparc64_register_type): Use sparc64_pseudo_register_type.
13818         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13819         pseudo register numbers.
13820         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13821         sparc64_store_arguments): Handle pseudo register numbers.
13822
13823 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13824
13825         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13826         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13827         output.
13828         (getpkt_or_notif_sane_1): Likewise.
13829
13830 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13831
13832         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13833         of CC.  Pass "-x c++-header" instead of "-x c".
13834
13835 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13836
13837         * remote.c (remote_can_async_p): Update comment.
13838
13839 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13840
13841         * linux-nat.c (linux_nat_can_async_p): Update comment.
13842
13843 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13844
13845         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13846
13847 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13848
13849         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13850
13851 2017-01-10  Tom Tromey  <tom@tromey.com>
13852
13853         * python/py-type.c (typy_legacy_template_argument): Update.
13854         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13855         ~demangle_parse_info): Declare new members.
13856         (cp_demangled_name_to_comp): Return unique_ptr.
13857         (cp_demangled_name_parse_free)
13858         (make_cleanup_cp_demangled_name_parse_free)
13859         (cp_new_demangle_parse_info): Remove.
13860         * cp-support.c (do_demangled_name_parse_free_cleanup)
13861         (make_cleanup_cp_demangled_name_parse_free): Remove.
13862         (inspect_type, cp_canonicalize_string_full)
13863         (cp_canonicalize_string): Update.
13864         (mangled_name_to_comp): Change return type.
13865         (cp_class_name_from_physname, method_name_from_physname)
13866         (cp_func_name, cp_remove_params): Update.
13867         * cp-name-parser.y (demangle_parse_info): New constructor, from
13868         cp_new_demangle_parse_info.
13869         (~demangle_parse_info): New destructor, from
13870         cp_demangled_name_parse_free.
13871         (cp_merge_demangle_parse_infos): Update.
13872         (cp_demangled_name_to_comp): Change return type.
13873
13874 2017-01-10  Tom Tromey  <tom@tromey.com>
13875
13876         * top.c (prevent_dont_repeat): Change return type.
13877         * python/python.c (execute_gdb_command): Use std::string.
13878         Update.
13879         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13880         * command.h (prevent_dont_repeat): Change return type.
13881         * breakpoint.c (bpstat_do_actions_1): Update.
13882
13883 2017-01-10  Tom Tromey  <tom@tromey.com>
13884
13885         * value.h (scoped_value_mark::~scoped_value_mark): Call
13886         free_to_mark.
13887         (scoped_value_mark::free_to_mark): New method.
13888         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13889         scoped_value_mark.
13890
13891 2017-01-10  Tom Tromey  <tom@tromey.com>
13892
13893         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13894         (valpy_reference_value, valpy_const_value, valpy_get_address)
13895         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13896         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13897         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13898         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13899         scoped_value_mark.
13900         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13901         * value.h (scoped_value_mark): New class.
13902
13903 2017-01-10  Tom Tromey  <tom@tromey.com>
13904
13905         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13906         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13907         * psymtab.c (discard_psymtabs_upto): Remove.
13908         (make_cleanup_discard_psymtabs): Remove.
13909         (struct psymtab_state): Remove.
13910
13911 2017-01-10  Tom Tromey  <tom@tromey.com>
13912
13913         * record-full.c (record_full_save_cleanups): Remove.
13914         (record_full_save): Use gdb::unlinker.
13915         * gcore.c (do_bfd_delete_cleanup): Remove.
13916         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13917         cleanups.
13918         * dwarf2read.c (unlink_if_set): Remove.
13919         (write_psymtabs_to_index): Use gdb::unlinker.
13920         * common/gdb_unlinker.h: New file.
13921
13922 2017-01-10  Tom Tromey  <tom@tromey.com>
13923
13924         * windows-tdep.c (windows_xfer_shared_library): Update.
13925         * windows-nat.c (windows_make_so): Update.
13926         * utils.h (make_cleanup_bfd_unref): Remove.
13927         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13928         * symfile.h (symfile_bfd_open)
13929         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13930         * symfile.c (read_symbols, symbol_file_add)
13931         (separate_debug_file_exists): Update.
13932         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13933         (generic_load, reread_symbols): Update.
13934         * symfile-mem.c (symbol_file_add_from_memory): Update.
13935         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13936         (spu_symbol_file_add_from_memory): Update.
13937         * solist.h (struct target_so_ops) <bfd_open>: Return
13938         gdb_bfd_ref_ptr.
13939         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13940         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13941         gdb_bfd_ref_ptr.
13942         (solib_map_sections, reload_shared_libraries_1): Update.
13943         * solib-svr4.c (enable_break): Update.
13944         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13945         * solib-frv.c (enable_break2): Update.
13946         * solib-dsbt.c (enable_break): Update.
13947         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13948         gdb_bfd_ref_ptr.
13949         (darwin_solib_get_all_image_info_addr_at_init): Update.
13950         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13951         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13952         * record-full.c (record_full_save): Update.
13953         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13954         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13955         * minidebug.c (find_separate_debug_file_in_section): Return
13956         gdb_bfd_ref_ptr.
13957         * machoread.c (macho_add_oso_symfile): Change abfd to
13958         gdb_bfd_ref_ptr.
13959         (macho_symfile_read_all_oso): Update.
13960         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13961         (macho_symfile_read): Update.
13962         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13963         (jit_bfd_try_read_symtab): Update.
13964         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13965         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13966         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13967         gdb_bfd_ref_ptr.
13968         (gdb_bfd_ref_policy): New struct.
13969         (gdb_bfd_ref_ptr): New typedef.
13970         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13971         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13972         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13973         gdb_bfd_ref_ptr.
13974         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13975         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13976         (gcore_command): Update.
13977         * exec.c (exec_file_attach): Update.
13978         * elfread.c (elf_symfile_read): Update.
13979         * dwarf2read.c (dwarf2_get_dwz_file): Update.
13980         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13981         (open_and_init_dwo_file): Update.
13982         (open_dwp_file): Return gdb_bfd_ref_ptr.
13983         (open_and_init_dwp_file): Update.
13984         * corelow.c (core_open): Update.
13985         * compile/compile-object-load.c (compile_object_load): Update.
13986         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13987         * coffread.c (coff_symfile_read): Update.
13988         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13989         gdb_bfd_ref_ptr.  Rename.
13990         (dump_bfd_file, restore_command): Update.
13991         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13992         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13993         (find_separate_debug_file_by_buildid): Update.
13994
13995 2017-01-10  Tom Tromey  <tom@tromey.com>
13996
13997         * common/gdb_ref_ptr.h: New file.
13998         * python/py-ref.h (struct gdbpy_ref_policy): New.
13999         (gdbpy_ref): Now a typedef.
14000
14001 2017-01-10  Tom Tromey  <tom@tromey.com>
14002
14003         * utils.h (make_cleanup_htab_delete): Don't declare.
14004         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14005         Remove.
14006         * linespec.c (decode_compound_collector): Add constructor,
14007         destructor.
14008         (lookup_prefix_sym): Remove cleanup.
14009         (symtab_collector): Add constructor, destructor.
14010         (collect_symtabs_from_filename): Remove cleanup.
14011         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14012         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14013         Use htab_up.
14014         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14015         * dwarf2read.c (dw2_expand_symtabs_matching)
14016         (dw2_map_symbol_filenames, dwarf_decode_macros)
14017         (write_psymtabs_to_index): Use htab_up.
14018         * dwarf2loc.c (func_verify_no_selftailcall)
14019         (call_site_find_chain_1, func_verify_no_selftailcall)
14020         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14021         std::vector, gdb::unique_xmalloc_ptr.
14022         (call_sitep): Remove typedef.
14023         (dwarf2_locexpr_baton_eval): Remove unused variable.
14024
14025 2017-01-10  Tom Tromey  <tom@tromey.com>
14026
14027         * python/python-internal.h (make_cleanup_py_decref)
14028         (make_cleanup_py_xdecref): Don't declare.
14029         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14030         (py_xdecref, make_cleanup_py_xdecref): Remove.
14031
14032 2017-01-10  Tom Tromey  <tom@tromey.com>
14033
14034         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14035         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14036
14037 2017-01-10  Tom Tromey  <tom@tromey.com>
14038
14039         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14040
14041 2017-01-10  Tom Tromey  <tom@tromey.com>
14042
14043         * python/py-utils.c (unicode_to_encoded_string)
14044         (python_string_to_target_string)
14045         (python_string_to_target_python_string)
14046         (python_string_to_host_string, gdbpy_obj_to_string)
14047         (get_addr_from_python): Use gdbpy_ref.
14048
14049 2017-01-10  Tom Tromey  <tom@tromey.com>
14050
14051         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14052         gdbpy_ref.
14053
14054 2017-01-10  Tom Tromey  <tom@tromey.com>
14055
14056         * python/python.c (eval_python_command, gdbpy_decode_line)
14057         (gdbpy_run_events, gdbpy_start_type_printers)
14058         (gdbpy_apply_type_printers): Use gdbpy_ref.
14059
14060 2017-01-10  Tom Tromey  <tom@tromey.com>
14061
14062         * python/py-param.c (get_doc_string, compute_enum_values): Use
14063         gdbpy_ref.
14064
14065 2017-01-10  Tom Tromey  <tom@tromey.com>
14066
14067         * python/py-inferior.c (find_thread_object, build_inferior_list):
14068         Use gdbpy_ref.
14069
14070 2017-01-10  Tom Tromey  <tom@tromey.com>
14071
14072         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14073
14074 2017-01-10  Tom Tromey  <tom@tromey.com>
14075
14076         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14077         gdbpy_ref.
14078
14079 2017-01-10  Tom Tromey  <tom@tromey.com>
14080
14081         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14082         extra incref.
14083         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14084         Use gdbpy_ref.
14085
14086 2017-01-10  Tom Tromey  <tom@tromey.com>
14087
14088         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14089         gdbpy_ref.
14090
14091 2017-01-10  Tom Tromey  <tom@tromey.com>
14092
14093         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14094         decref results of PyArg_ParseTupleAndKeywords.
14095
14096 2017-01-10  Tom Tromey  <tom@tromey.com>
14097
14098         * python/python.c (python_run_simple_file): Use
14099         unique_xmalloc_ptr, gdbpy_ref.
14100
14101 2017-01-10  Tom Tromey  <tom@tromey.com>
14102
14103         * python/py-prettyprint.c (print_stack_unless_memory_error)
14104         (print_string_repr, print_children): Use gdbpy_ref.
14105         (dummy_python_frame): New class.
14106         (dummy_python_frame::dummy_python_frame): Rename from
14107         push_dummy_python_frame.
14108         (py_restore_tstate): Remove.
14109
14110 2017-01-10  Tom Tromey  <tom@tromey.com>
14111
14112         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14113
14114 2017-01-10  Tom Tromey  <tom@tromey.com>
14115
14116         * python/python.c (ensure_python_env, restore_python_env):
14117         Remove.
14118         * python/python-internal.h (ensure_python_env): Don't declare.
14119         * varobj.h (varobj_ensure_python_env): Don't declare.
14120         * varobj.c (varobj_ensure_python_env): Remove.
14121
14122 2017-01-10  Tom Tromey  <tom@tromey.com>
14123
14124         * varobj.c (varobj_value_get_print_value): Use
14125         gdbpy_enter_varobj.
14126
14127 2017-01-10  Tom Tromey  <tom@tromey.com>
14128
14129         * python/py-prettyprint.c (print_string_repr, print_children):
14130         Update.
14131         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14132         of "encoding".
14133         * varobj.c (varobj_value_get_print_value): Update.
14134         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14135
14136 2017-01-10  Tom Tromey  <tom@tromey.com>
14137
14138         * varobj.c (varobj_get_display_hint)
14139         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14140         (varobj_set_visualizer, free_variable): Use
14141         gdbpy_enter_varobj.
14142
14143 2017-01-10  Tom Tromey  <tom@tromey.com>
14144
14145         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14146         (do_finish_initialization): New function.  Use gdbpy_ref.
14147         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14148         do_finish_initialization.
14149
14150 2017-01-10  Tom Tromey  <tom@tromey.com>
14151
14152         * python/py-param.c (get_set_value, get_show_value): Use
14153         gdbpy_enter, gdbpy_ref.
14154
14155 2017-01-10  Tom Tromey  <tom@tromey.com>
14156
14157         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14158
14159 2017-01-10  Tom Tromey  <tom@tromey.com>
14160
14161         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14162
14163 2017-01-10  Tom Tromey  <tom@tromey.com>
14164
14165         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14166         Use gdbpy_enter_varobj.
14167
14168 2017-01-10  Tom Tromey  <tom@tromey.com>
14169
14170         * varobj.c (gdbpy_enter_varobj): New constructor.
14171         * python/python-internal.h (gdbpy_enter_varobj): New class.
14172         * python/py-varobj.c (py_varobj_get_iterator): Use
14173         gdbpy_enter_varobj.
14174
14175 2017-01-10  Tom Tromey  <tom@tromey.com>
14176
14177         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14178         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14179         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14180         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14181         unique_xmalloc_ptr.
14182         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14183
14184 2017-01-10  Tom Tromey  <tom@tromey.com>
14185
14186         * python/py-xmethods.c (invoke_match_method): Use
14187         gdbpy_ref.
14188
14189 2017-01-10  Tom Tromey  <tom@tromey.com>
14190
14191         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14192         gdbpy_enter, gdbpy_ref.
14193
14194 2017-01-10  Tom Tromey  <tom@tromey.com>
14195
14196         * python/python.c (python_interactive_command): Use gdbpy_enter.
14197
14198 2017-01-10  Tom Tromey  <tom@tromey.com>
14199
14200         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14201         gdbpy_ref.
14202
14203 2017-01-10  Tom Tromey  <tom@tromey.com>
14204
14205         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14206         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14207
14208 2017-01-10  Tom Tromey  <tom@tromey.com>
14209
14210         * utils.h (htab_deleter): New struct.
14211         (htab_up): New typedef.
14212         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14213         gdbpy_enter, gdbpy_ref, htab_up.
14214
14215 2017-01-10  Tom Tromey  <tom@tromey.com>
14216
14217         * python/py-unwind.c (pending_frame_invalidate): Remove.
14218         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14219
14220 2017-01-10  Tom Tromey  <tom@tromey.com>
14221
14222         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14223         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14224
14225 2017-01-10  Tom Tromey  <tom@tromey.com>
14226
14227         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14228
14229 2017-01-10  Tom Tromey  <tom@tromey.com>
14230
14231         * python/python.c (gdbpy_eval_from_control_command)
14232         (gdbpy_source_script, gdbpy_run_events)
14233         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14234         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14235         gdbpy_enter.
14236
14237 2017-01-10  Tom Tromey  <tom@tromey.com>
14238
14239         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14240
14241 2017-01-10  Tom Tromey  <tom@tromey.com>
14242
14243         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14244
14245 2017-01-10  Tom Tromey  <tom@tromey.com>
14246
14247         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14248         (python_on_inferior_call_pre, python_on_inferior_call_post)
14249         (python_on_memory_change, python_on_register_change)
14250         (python_inferior_exit, python_new_objfile, add_thread_object)
14251         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14252
14253 2017-01-10  Tom Tromey  <tom@tromey.com>
14254
14255         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14256         (bpfinishpy_handle_exit): Use gdbpy_enter.
14257
14258 2017-01-10  Tom Tromey  <tom@tromey.com>
14259
14260         * python/py-cmd.c (cmdpy_destroyer)
14261         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14262         gdbpy_enter.
14263
14264 2017-01-10  Tom Tromey  <tom@tromey.com>
14265
14266         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14267         gdbpy_enter.
14268         (gdbpy_breakpoint_has_cond): Likewise.
14269
14270 2017-01-10  Tom Tromey  <tom@tromey.com>
14271
14272         * python/python.c (gdbpy_enter): New constructor.
14273         (~gdbpy_enter): New destructor.
14274         (restore_python_env, ensure_python_env): Rewrite.
14275         * python/python-internal.h (gdbpy_enter): New class.
14276
14277 2017-01-10  Tom Tromey  <tom@tromey.com>
14278
14279         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14280
14281 2017-01-10  Tom Tromey  <tom@tromey.com>
14282
14283         * python/py-value.c (value_has_field, get_field_flag)
14284         (get_field_type, valpy_getitem, convert_value_from_python): Use
14285         gdbpy_ref.
14286
14287 2017-01-10  Tom Tromey  <tom@tromey.com>
14288
14289         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14290         gdbpy_ref.
14291
14292 2017-01-10  Tom Tromey  <tom@tromey.com>
14293
14294         * python/py-prettyprint.c (search_pp_list)
14295         (find_pretty_printer_from_objfiles)
14296         (find_pretty_printer_from_progspace)
14297         (find_pretty_printer_from_gdb, find_pretty_printer)
14298         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14299         gdbpy_ref.
14300
14301 2017-01-10  Tom Tromey  <tom@tromey.com>
14302
14303         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14304
14305 2017-01-10  Tom Tromey  <tom@tromey.com>
14306
14307         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14308         (ltpy_get_all_source_lines): Use gdbpy_ref.
14309
14310 2017-01-10  Tom Tromey  <tom@tromey.com>
14311
14312         * python/py-framefilter.c (extract_sym, extract_value)
14313         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14314         gdbpy_ref.
14315
14316 2017-01-10  Tom Tromey  <tom@tromey.com>
14317
14318         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14319
14320 2017-01-10  Tom Tromey  <tom@tromey.com>
14321
14322         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14323
14324 2017-01-10  Tom Tromey  <tom@tromey.com>
14325
14326         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14327         gdbpy_ref.
14328
14329 2017-01-10  Tom Tromey  <tom@tromey.com>
14330
14331         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14332
14333 2017-01-10  Tom Tromey  <tom@tromey.com>
14334
14335         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14336         (typy_range): Use gdbpy_ref.
14337
14338 2017-01-10  Tom Tromey  <tom@tromey.com>
14339
14340         * python/py-threadevent.c (create_thread_event_object): Use
14341         gdbpy_ref.
14342         * python/py-stopevent.c (create_stop_event_object): Simplify.
14343         (emit_stop_event): Use gdbpy_ref.
14344         * python/py-signalevent.c (create_signal_event_object): Use
14345         gdbpy_ref.
14346         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14347         (emit_new_objfile_event, create_clear_objfiles_event_object)
14348         (emit_clear_objfiles_event): Use gdbpy_ref.
14349         * python/py-infevents.c (create_inferior_call_event_object)
14350         (create_register_changed_event_object)
14351         (create_memory_changed_event_object, emit_inferior_call_event)
14352         (emit_memory_changed_event, emit_register_changed_event): Use
14353         gdbpy_ref.
14354         * python/py-exitedevent.c (create_exited_event_object)
14355         (emit_exited_event): Use gdbpy_ref.
14356         * python/py-event.h (evpy_emit_event): Remove
14357         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14358         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14359         * python/py-continueevent.c (emit_continue_event): Use
14360         gdbpy_ref.
14361         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14362         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14363         gdbpy_ref.
14364         * python/py-bpevent.c (create_breakpoint_event_object): Use
14365         gdbpy_ref.
14366
14367 2017-01-10  Tom Tromey  <tom@tromey.com>
14368
14369         * python/py-ref.h: New file.
14370
14371 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14372
14373         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14374         void.
14375         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14376         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14377         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14378         * ui-out.c (ui_out::redirect): Likewise.
14379         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14380         * cli/cli-logging.c (set_logging_redirect): Update call site of
14381         ui_out::redirect.
14382         (handle_redirections): Likewise.
14383         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14384         * top.c (execute_command_to_string): Likewise.
14385         * utils.c (do_ui_out_redirect_pop): Likewise.
14386
14387 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14388
14389         * stack.c (_initialize_stack): Update "frame" command help message.
14390
14391 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14392
14393         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14394
14395 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14396
14397         * x86-linux-nat.h: Include gdb_proc_service.h.
14398
14399 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14400
14401         * ser-base.h: Include serial.h.
14402
14403 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14404
14405         * ppc-linux-tdep.h: Include ppc-tdep.h.
14406
14407 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14408
14409         * nat/amd64-linux-siginfo.h: Include signal.h.
14410
14411 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14412
14413         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14414
14415 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14416
14417         * mi/mi-parse.h: Include mi-cmds.h.
14418
14419 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14420
14421         * inf-loop.c: Don't include "target.h".
14422         * inf-loop.h: Include it here.
14423
14424 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14425
14426         * dfp.h: Include "dboulest.h" and "expression.h".
14427
14428 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14429
14430         * ax-gdb.h: Include "ax.h".
14431
14432 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14433
14434         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14435         with nat/gdb_ptrace.h.
14436
14437 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14438
14439         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14440         new line.
14441         (mips64_fbsd_sigframe_init): Likewise.
14442
14443 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14444
14445         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14446         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14447
14448 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14449
14450         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14451         * NEWS: Mention new FreeBSD/mips native configuration.
14452         * config/mips/fbsd.mh: New file.
14453         * configure.host: Add mips*-*-freebsd*.
14454         * mips-fbsd-nat.c: New file.
14455
14456 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14457
14458         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14459         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14460         * NEWS: Mention new FreeBSD/mips target.
14461         * configure.tgt: Add mips*-*-freebsd*.
14462         * mips-fbsd-tdep.c: New file.
14463         * mips-fbsd-tdep.h: New file.
14464
14465 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14466
14467         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14468         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14469
14470 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14471
14472         Update copyright year range in all GDB files.
14473
14474 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14475
14476         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14477
14478 For older changes see ChangeLog-2016.
14479 \f
14480 Local Variables:
14481 mode: change-log
14482 left-margin: 8
14483 fill-column: 74
14484 version-control: never
14485 coding: utf-8
14486 End: