Target FP: Add string routines to target-float.{c,h}
[external/binutils.git] / gdb / ChangeLog
1 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * target-float.c (target_float_to_string): New function.
4         (target_float_from_string): New function.
5         * target-float.h (target_float_to_string): Add prototype.
6         (target_float_from_string): Add prototype.
7
8         * valprint.c: Include "target-float.h".  Do not include
9         "doublest.h" and "dfp.h".
10         (print_floating): Use target_float_to_string.
11         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
12         (printf_floating): Use target_float_to_string.
13         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
14         (print_i387_value): Use target_float_to_string.
15         * mips-tdep.c: Include "target-float.h".
16         (mips_print_fp_register): Use target_float_to_string.
17         * sh64-tdep.c: Include "target-float.h".
18         (sh64_do_fp_register): Use target_float_to_string.
19
20         * parse.c: Include "target-float.h".  Do not include
21         "doublest.h" and "dfp.h".
22         (parse_float): Use target_float_from_string.
23         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
24         (define_symbol): Use target_float_from_string.
25         * gdbarch-selftests.c: Include "target-float.h".
26         (register_to_value_test): Use target_float_from_string.
27
28 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
29
30         * Makefile.c (SFILES): Add target-float.c.
31         (HFILES_NO_SRCDIR): Add target-float.h.
32         (COMMON_OBS): Add target-float.o.
33         * target-float.h: New file.
34         * target-float.c: New file.
35
36         * doublest.c (floatformat_classify): Fix detection of float_zero.
37
38         * gdbtypes.c (is_floating_type): New function.
39         * gdbtypes.h (is_floating_type): Add prototype.
40
41         * value.c: Do not include "floatformat.h".
42         (unpack_double): Use target_float_is_valid.
43         (is_floating_value): New function.
44         * value.h (is_floating_value): Add prototype-
45
46         * valarith.c: Include "target-float.h".
47         (value_logical_not): Use target_float_is_zero.
48
49         * python/py-value.c: Include "target-float.h".
50         (valpy_nonzero): Use target_float_is_zero.
51
52 2017-11-04  Tom Tromey  <tom@tromey.com>
53
54         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
55
56 2017-11-04  Tom Tromey  <tom@tromey.com>
57
58         * breakpoint.c (set_momentary_breakpoint): Return
59         breakpoint_up.
60         (until_break_command): Update.
61         (new_until_break_fsm): Change argument types to
62         breakpoint_up.
63         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
64         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
65         Remove.
66         * infcmd.c (finish_forward): Update.
67         * breakpoint.h (set_momentary_breakpoint)
68         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
69         (make_cleanup_delete_breakpoint): Remove.
70         (struct breakpoint_deleter): New.
71         (breakpoint_up): New typedef.
72         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
73         (insert_exception_resume_breakpoint): Update.
74         (insert_exception_resume_from_probe): Update.
75         (insert_longjmp_resume_breakpoint): Update.
76         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
77         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
78         * infcall.c (call_function_by_hand_dummy): Update
79
80 2017-11-04  Tom Tromey  <tom@tromey.com>
81
82         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
83
84 2017-11-04  Tom Tromey  <tom@tromey.com>
85
86         * linux-tdep.c (linux_core_info_proc_mappings): Use
87         gdb::def_vector.
88         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
89         "size" argument.
90         (linux_corefile_thread): Update.
91         (linux_make_corefile_notes): Remove unused variable.
92
93 2017-11-04  Tom Tromey  <tom@tromey.com>
94
95         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
96         gdb::byte_vector.
97
98 2017-11-04  Tom Tromey  <tom@tromey.com>
99
100         * objfiles.c (do_free_objfile_cleanup): Remove.
101         * compile/compile-object-load.c (compile_object_load): Update.
102         * objfiles.h (make_cleanup_free_objfile): Remove.
103
104 2017-11-04  Tom Tromey  <tom@tromey.com>
105
106         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
107         (adi_read_versions): Change "tags" to "gdb_byte *".
108         (adi_print_versions): Likewise.
109
110 2017-11-04  Tom Tromey  <tom@tromey.com>
111
112         * breakpoint.c
113         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
114         from start_rbreak_breakpoints.
115         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
116         * breakpoint.h (class scoped_rbreak_breakpoints): New.
117         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
118         * symtab.c (do_end_rbreak_breakpoints): Remove.
119         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
120
121 2017-11-04  Tom Tromey  <tom@tromey.com>
122
123         * cp-namespace.c (reset_directive_searched): Remove.
124         (cp_lookup_symbol_via_imports): Use scoped_restore.
125         * cp-support.c (reset_directive_searched): Remove.
126         (make_symbol_overload_list_using): Use scoped_restore.
127         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
128         (reset_directive_searched): Remove.
129
130 2017-11-04  Tom Tromey  <tom@tromey.com>
131
132         * symfile.c (find_separate_debug_file_by_debuglink): Use
133         unique_xmalloc_ptr.
134
135 2017-11-04  Tom Tromey  <tom@tromey.com>
136
137         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
138         type of "info".
139         (compute_stack_depth): Likewise.
140         (do_compile_dwarf_expr_to_c): Use std::vector.
141
142 2017-11-04  Tom Tromey  <tom@tromey.com>
143
144         * compile/compile-object-load.c (link_callbacks_einfo): Use
145         std::string.
146
147 2017-11-04  Tom Tromey  <tom@tromey.com>
148
149         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
150         Use scoped_free_pendings.
151         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
152         scoped_free_pendings.
153         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
154         (xcoff_initial_scan): Likewise.
155         * buildsym.c (reset_symtab_globals): Update comment.
156         (scoped_free_pendings): Rename from really_free_pendings.
157         (prepare_for_building): Update comment.
158         (buildsym_init): Likewise.
159         * buildsym.h (class scoped_free_pendings): New class.
160         (really_free_pendings): Don't declare.
161
162 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
163
164         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
165         output when converting a zero value to a special byteorder format.
166
167 2017-11-02  Yao Qi  <yao.qi@linaro.org>
168
169         * frame.c (do_frame_register_read): Remove aspace.
170         * jit.c (jit_frame_sniffer): Likwise.
171         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
172         * regcache.c (regcache::regcache): Pass nullptr.
173         (regcache_print): Caller updated.
174         * regcache.h (regcache::regcache): Remove one constructor
175         parameter aspace.
176
177 2017-11-02  Yao Qi  <yao.qi@linaro.org>
178
179         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
180
181 2017-11-02  Yao Qi  <yao.qi@linaro.org>
182
183         * breakpoint.c (insert_single_step_breakpoints): Update.
184         * frame.c (struct frame_info) <aspace>: Add const.
185         (frame_save_as_regcache): Add const.
186         (get_frame_address_space): Return const address_space *.
187         * frame.h (get_frame_address_space): Update declaration.
188         * infrun.c (struct step_over_info) <aspace>: Add const.
189         (set_step_over_info): Make aspace const.
190         (displaced_step_prepare_throw): Change variable const.
191         (resume): Likewise.
192         (proceed): Likewise.
193         (adjust_pc_after_break): Likewise.
194         (save_waitstatus): Likewise.
195         (handle_signal_stop): Likewise.
196         (keep_going_pass_signal): Likewise.
197         * jit.c (jit_frame_sniffer): Add const.
198         * mips-tdep.c (mips_single_step_through_delay): Likewise.
199         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
200         * record-full.c (record_full_wait_1): Likewise.
201         * regcache.c (regcache::regcache): Change parameter to const.
202         * regcache.h (regcache::regcache): Likewise.
203         (regcache::aspace): Return const address_space *.
204         (regcache) <m_aspace>: Add const.
205
206 2017-11-02  Yao Qi  <yao.qi@linaro.org>
207
208         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
209         * frame.c (create_sentinel_frame): Likewise.
210         * infrun.c (displaced_step_prepare_throw): Likewise.
211         (resume): Likewise.
212         (thread_still_needs_step_over_bp): Likewise.
213         (proceed): Likewise.
214         (do_target_wait): Likewise.
215         (adjust_pc_after_break): Likewise.
216         (handle_syscall_event): Likewise.
217         (save_waitstatus): Likewise.
218         (handle_inferior_event_1): Likewise.
219         (handle_signal_stop): Likewise.
220         (keep_going_pass_signal): Likewise.
221         * linux-nat.c (status_callback): Likewise.
222         (save_stop_reason): Likewise.
223         (resume_stopped_resumed_lwps): Likewise.
224         * record-full.c (record_full_exec_insn): Likewise.
225         (record_full_wait_1): Likewise.
226         * regcache.c (get_regcache_aspace): Remove.
227         * regcache.h (get_regcache_aspace): Remove.
228
229 2017-11-02  Yao Qi  <yao.qi@linaro.org>
230
231         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
232         (init_regcache_descr): Use gdbarch_num_regs.
233         (regcache::regcache): Likewise.
234         (regcache::get_register_status): Likewise.
235         (regcache::assert_raw_regnum): Likewise.
236         (regcache::cooked_read): Likewise.
237         (regcache::cooked_read_value): Likewise.
238         (regcache::cooked_write): Likewise.
239         (regcache::dump): Likewise.
240         (regcache::num_raw_registers): New method.
241         * regcache.h (class regcache) <num_raw_registers>: New.
242
243 2017-11-02  Yao Qi  <yao.qi@linaro.org>
244
245         * regcache.c (regcache::assert_regnum): New method.
246         (regcache::invalidate): Call assert_regnum.
247         (regcache::raw_update): Likewise.
248         (regcache::raw_write): Likewise.
249         (regcache::raw_read_part): Likewise.
250         (regcache::raw_write_part): Likewise.
251         (regcache::raw_supply): Likewise.
252         (regcache::raw_supply_integer): Likewise.
253         (regcache::raw_supply_zeroed): Likewise.
254         (regcache::raw_collect): Likewise.
255         (regcache::raw_collect_integer): Likewise.
256         * regcache.h (regcache::assert_regnum): Declare.
257
258 2017-11-02  Yao Qi  <yao.qi@linaro.org>
259
260         * regcache.c (regcache::dump): Remove code.
261
262 2017-11-02  Yao Qi  <yao.qi@linaro.org>
263
264         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
265         Remove.
266         <sizeof_cooked_register_status>: Remove.
267         (init_regcache_descr): Update.
268         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
269         (regcache::save): Likewise.
270         (regcache::dump): Likewise.
271
272 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
273
274         * ft32-tdep.c (ft32_fetch_instruction): New function.
275         (ft32_analyze_prologue): Use ft32_fetch_instruction().
276
277 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
278
279         * cli/cli-script.c (execute_control_command): Rename to ...
280         (execute_control_command_1): ... this.
281         (execute_control_command): New function.
282
283 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
284
285         * tracepoint.c (tfind_command): Remove const_cast.
286
287 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
288
289         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
290
291 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
292
293         * common/common-utils.h (in_inclusive_range): New function.
294         * arm-tdep.c (arm_record_extension_space): Use
295         in_inclusive_range.
296         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
297         * cris-tdep.c (cris_spec_reg_applicable): Use
298         in_inclusive_range.
299
300 2017-10-30  Pedro Alves  <palves@redhat.com>
301             Simon Marchi <simon.marchi@ericsson.com>
302
303         * remote.c (remote_set_syscall_catchpoint): Build a std::string
304         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
305
306 2017-10-30  Pedro Alves  <palves@redhat.com>
307
308         * common/common-utils.c (string_appendf, string_vappendf): New
309         functions.
310         * common/common-utils.h (string_appendf, string_vappendf): New
311         declarations.
312         * unittests/common-utils-selftests.c (string_appendf_func)
313         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
314         (string_vappendf_tests): New functions.
315         (_initialize_common_utils_selftests): Register "string_appendf" and
316         "string_vappendf tests".
317
318 2017-10-30  Pedro Alves  <palves@redhat.com>
319
320         * unittests/common-utils-selftests.c (format_func): New typedef.
321         (string_printf_tests, string_vprintf_tests): Tests factored out
322         and merged to ...
323         (test_format_func): ... this new function.
324         (string_printf_tests, string_vprintf_tests): Reimplement on top of
325         test_format_func.
326
327 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
328
329         * darwin-nat.c: Remove include of gdb.h.
330
331 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
332
333         * xtensa-xtregs.c: Fix formatting issues.
334
335 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
336
337         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
338
339 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
340
341         PR python/21213
342         * python/py-infthread.c (thpy_get_inferior): Increment reference
343         of inferior before returning it.
344
345 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
346
347         * unittests/common-utils-selftests.c (format): Add
348         ATTRIBUTE_PRINTF.
349
350 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
351
352         * xml-syscall.c (struct syscall_desc): Add constructor.
353         <name>: Change type to std::string.
354         (syscall_desc_up): New typedef.
355         (syscall_desc_p): Remove typeder.
356         (DEF_VEC_P(syscall_desc_p)): Remove.
357         (struct syscall_group_desc): Add constructor.
358         <name>: Change type to std::string.
359         <syscalls>: Change type to std::vector.
360         (syscall_group_desc_up): New typedef.
361         (syscall_group_desc_p): Remove typedef.
362         (DEF_VEC_P(syscall_group_desc_p)): Remove.
363         (struct syscalls_info) <syscalls>: Change type to std::vector of
364         unique_ptr.
365         <groups>: Likewise.
366         <my_gdb_datadir>: Change type to std::string.
367         (syscalls_info_up): New typedef.
368         (allocate_syscalls_info): Remove.
369         (syscalls_info_free_syscalls_desc): Remove.
370         (syscalls_info_free_syscall_group_desc): Remove.
371         (free_syscalls_info): Remove.
372         (make_cleanup_free_syscalls_info): Remove.
373         (syscall_group_create_syscall_group_desc): Adjust.
374         (syscall_group_add_syscall): Adjust.
375         (syscall_create_syscall_desc): Adjust.
376         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
377         (init_syscalls_info): Adjust.
378         (syscall_group_get_group_by_name): Adjust.
379         (xml_get_syscall_number): Adjust.
380         (xml_get_syscall_name): Adjust.
381         (xml_list_of_syscalls): Adjust.
382         (xml_list_syscalls_by_group): Adjust.
383         (xml_list_of_groups): Adjust.
384
385 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
386
387         * probe.h: Don't include gdb_vecs.h.
388         (DEF_VEC_P (probe_p)): Remove.
389         (find_probes_in_objfile): Return an std::vector.
390         * probe.c (find_probes_in_objfile): Likewise.
391         * breakpoint.c (breakpoint_objfile_data)
392         <longjmp_probes>: Change type to std::vector.
393         <exception_probes>: Likewise.
394         (free_breakpoint_probes): Don't manually free vectors.
395         (create_longjmp_master_breakpoint): Adjust.
396         (create_exception_master_breakpoint): Adjust.
397         * solib-svr4.c (svr4_create_probe_breakpoints): Change
398         parameter type, adjust.
399         (svr4_create_solib_event_breakpoints): Adjust.
400
401 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
402
403         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
404         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
405         with new.
406         (free_breakpoint_probes): Rename to ...
407         (free_breakpoint_objfile_data): ... this, and call delete on
408         bp_objfile_data..
409
410 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
411
412         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
413         (loaded_script_ptr): Remove typedef.
414         (DEF_VEC_P (loaded_script_ptr)): Remove.
415         (struct collect_matching_scripts_data): Add constructor.
416         <scripts_p>: Change type to (pointer to) std::vector.
417         (collect_matching_scripts_data): Adjust.
418         (sort_scripts_by_name): Make suitable for std::sort.
419         (print_scripts): Don't sort vector, adjust to std::vector.
420         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
421
422 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
423
424         * symfile.c (filename_language): Make struct, not typedef.  Add
425         constructor.
426         <ext>: Change type to std::string.
427         (DEF_VEC_O (filename_language)): Remove.
428         (filename_language_table): Change type to std::vector.
429         (add_filename_language): Adjust.
430         (set_ext_lang_command): Adjust.
431         (info_ext_lang_command): Adjust.
432         (deduce_language_from_filename): Adjust.
433         (class scoped_restore_filename_language_table): Remove.
434         (test_filename_language): Use scoped_restore.
435         (test_set_ext_lang_command): Use scoped_restore, adjust to
436         std::vector change.
437
438 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
439
440         * symfile.c: Include selftest.h.
441         (class scoped_restore_filename_language_table): New.
442         (test_filename_language): New test.
443         (test_set_ext_lang_command): New test.
444         (_initialize_symfile): Register tests.
445
446 2017-10-27  Keith Seitz  <keiths@redhat.com>
447
448         * breakpoint.c (print_breakpoint_location): Use the symbol saved
449         in the bp_location, falling back to find_pc_sect_function when
450         needed.
451         (add_location_to_breakpoint): Save sal->symbol.
452         * breakpoint.h (struct bp_location) <symbol>: New field.
453         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
454         * symtab.h (struct symtab_and_line) <symbol>: New field.
455
456 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
457
458         PR gdb/13669
459         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
460         to rewind obstack.
461
462 2017-10-26  Pedro Alves  <palves@redhat.com>
463
464         * remote.c (remote_async_terminal_ours_p): Delete.
465         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
466         Remove references to 'remote_async_terminal_ours_p'.
467
468 2017-10-26  Yao Qi  <yao.qi@linaro.org>
469
470         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
471
472 2017-10-26  Yao Qi  <yao.qi@linaro.org>
473
474         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
475         aspace const.
476         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
477         Likewise.
478         * breakpoint.c (bpstat_check_location): Remove cast.
479         (breakpoint_hit_catch_fork): Make aspce const.
480         (breakpoint_hit_catch_solib): Likewise.
481         (breakpoint_hit_catch_exec): Likewise.
482         (breakpoint_hit_ranged_breakpoint): Likewise.
483         (breakpoint_hit_watchpoint): Likewise.
484         (base_breakpoint_breakpoint_hit): Likewise.
485         (bkpt_breakpoint_hit): Likewise.
486         (dprintf_breakpoint_hit): Likewise.
487         (tracepoint_breakpoint_hit): Likewise.
488         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
489
490 2017-10-26  Yao Qi  <yao.qi@linaro.org>
491
492         * breakpoint.c (breakpoint_location_address_match): Change
493         "struct address_space *" to "const address_space".
494         (breakpoint_location_address_range_overlap): Likewise.
495         (breakpoint_here_p): Likewise.
496         (breakpoint_in_range_p): Likewise.
497         (moribund_breakpoint_here_p): Likewise.
498         (bp_location_inserted_here_p): Likewise.
499         (software_breakpoint_inserted_here_p): Likewise.
500         (hardware_breakpoint_inserted_here_p): Likewise.
501         (hardware_watchpoint_inserted_in_range): Likewise.
502         (bpstat_check_location): Likewise.
503         (bpstat_stop_status): Likewise.
504         (breakpoint_address_match): Likewise.
505         (breakpoint_address_match_range): Likewise.
506         (breakpoint_location_address_match): Likewise.
507         (breakpoint_location_address_range_overlap): Likewise.
508         (insert_single_step_breakpoint): Likewise.
509         (breakpoint_has_location_inserted_here): Likewise.
510         (single_step_breakpoint_inserted_here_p): Likewise.
511         (pc_at_non_inline_function): Likewise.
512         * breakpoint.h (bpstat_stop_status): Update declaration.
513         (breakpoint_here_p): Likewise.
514         (breakpoint_in_range_p): Likewise.
515         (moribund_breakpoint_here_p): Likewise.
516         (breakpoint_inserted_here_p): Likewise.
517         (software_breakpoint_inserted_here_p): Likewise.
518         (hardware_breakpoint_inserted_here_p): Likewise.
519         (breakpoint_has_location_inserted_here): Likewise.
520         (single_step_breakpoint_inserted_here_p): Likewise.
521         (hardware_watchpoint_inserted_in_range): Likewise.
522         (breakpoint_address_match): Likewise.
523         (insert_single_step_breakpoint): Likewise.
524         (pc_at_non_inline_function): Likewise.
525         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
526         * record.c (record_check_stopped_by_breakpoint): Likewise.
527         * record.h (record_check_stopped_by_breakpoint): Likewise.
528         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
529
530 2017-10-25  Yao Qi  <yao.qi@linaro.org>
531
532         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
533         regcache->arch () instead get_regcache_arch.
534         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
535         Likewise.
536         (aarch64_fbsd_store_inferior_registers): Likewise.
537         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
538         (store_gregs_to_thread): Likewise.
539         (fetch_fpregs_from_thread): Likewise.
540         (store_fpregs_to_thread): Likewise.
541         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
542         (aarch64_store_return_value): Likewise.
543         (aarch64_software_single_step): Likewise.
544         * aix-thread.c (aix_thread_wait): Likewise.
545         (supply_reg32): Likewise.
546         (supply_sprs64): Likewise.
547         (supply_sprs32): Likewise.
548         (fill_gprs64): Likewise.
549         (fill_gprs32): Likewise.
550         (fill_sprs64): Likewise.
551         (fill_sprs32): Likewise.
552         (store_regs_user_thread): Likewise.
553         (store_regs_kernel_thread): Likewise.
554         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
555         (alphabsd_store_inferior_registers): Likewise.
556         * alpha-tdep.c (alpha_extract_return_value): Likewise.
557         (alpha_store_return_value): Likewise.
558         (alpha_deal_with_atomic_sequence): Likewise.
559         (alpha_next_pc): Likewise.
560         (alpha_software_single_step): Likewise.
561         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
562         (amd64bsd_store_inferior_registers): Likewise.
563         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
564         Likewise.
565         (amd64_linux_store_inferior_registers): Likewise.
566         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
567         (amd64_collect_native_gregset): Likewise.
568         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
569         (amd64obsd_collect_uthread): Likewise.
570         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
571         (amd64_collect_fpregset): Likewise.
572         (amd64_supply_fxsave): Likewise.
573         (amd64_supply_xsave): Likewise.
574         (amd64_collect_fxsave): Likewise.
575         (amd64_collect_xsave): Likewise.
576         * arc-tdep.c (arc_write_pc): Likewise.
577         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
578         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
579         (arm_fbsd_store_inferior_registers): Likewise.
580         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
581         (store_vfp_regs): Likewise.
582         (arm_linux_fetch_inferior_registers): Likewise.
583         (arm_linux_store_inferior_registers): Likewise.
584         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
585         (arm_linux_sigreturn_next_pc): Likewise.
586         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
587         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
588         (fetch_register): Likewise.
589         (store_register): Likewise.
590         * arm-tdep.c (arm_is_thumb): Likewise.
591         (displaced_in_arm_mode): Likewise.
592         (bx_write_pc): Likewise.
593         (arm_get_next_pcs_addr_bits_remove): Likewise.
594         (arm_software_single_step): Likewise.
595         (arm_extract_return_value): Likewise.
596         (arm_store_return_value): Likewise.
597         (arm_write_pc): Likewise.
598         * bfin-tdep.c (bfin_extract_return_value): Likewise.
599         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
600         (bsd_uthread_store_registers): Likewise.
601         * core-regset.c (fetch_core_registers): Likewise.
602         * corelow.c (get_core_registers): Likewise.
603         * cris-tdep.c (cris_store_return_value): Likewise.
604         (cris_extract_return_value): Likewise.
605         (find_step_target): Likewise.
606         (find_step_target): Likewise.
607         (cris_software_single_step): Likewise.
608         * ctf.c (ctf_fetch_registers): Likewise.
609         * darwin-nat.c (cancel_breakpoint): Likewise.
610         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
611         * frv-tdep.c (frv_extract_return_value): Likewise.
612         * ft32-tdep.c (ft32_store_return_value): Likewise.
613         (ft32_extract_return_value): Likewise.
614         * go32-nat.c (fetch_register): Likewise.
615         (go32_fetch_registers): Likewise.
616         (go32_store_registers): Likewise.
617         (store_register): Likewise.
618         * h8300-tdep.c (h8300_extract_return_value): Likewise.
619         (h8300_store_return_value): Likewise.
620         * hppa-linux-nat.c (fetch_register): Likewise.
621         (store_register): Likewise.
622         (hppa_linux_fetch_inferior_registers): Likewise.
623         (hppa_linux_store_inferior_registers): Likewise.
624         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
625         (i386_darwin_store_inferior_registers): Likewise.
626         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
627         (gnu_store_registers): Likewise.
628         * i386-linux-nat.c (fetch_register): Likewise.
629         (store_register): Likewise.
630         (supply_gregset): Likewise.
631         (fill_gregset): Likewise.
632         (i386_linux_fetch_inferior_registers): Likewise.
633         (i386_linux_store_inferior_registers): Likewise.
634         (i386_linux_resume): Likewise.
635         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
636         Likewise.
637         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
638         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
639         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
640         (i386obsd_collect_uthread): Likewise.
641         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
642         (i386_supply_gregset): Likewise.
643         (i386_collect_gregset): Likewise.
644         (i386_supply_fpregset): Likewise.
645         (i386_collect_fpregset): Likewise.
646         (i386_mpx_bd_base): Likewise.
647         * i386-v4-nat.c (supply_fpregset): Likewise.
648         (fill_fpregset): Likewise.
649         * i387-tdep.c (i387_supply_fsave): Likewise.
650         (i387_collect_fsave): Likewise.
651         (i387_supply_fxsave): Likewise.
652         (i387_collect_fxsave): Likewise.
653         (i387_supply_xsave): Likewise.
654         (i387_collect_xsave): Likewise.
655         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
656         (ia64_linux_store_registers): Likewise.
657         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
658         (ia64_extract_return_value): Likewise.
659         (ia64_store_return_value): Likewise.
660         (find_func_descr): Likewise.
661         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
662         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
663         (inf_ptrace_store_registers): Likewise.
664         * infrun.c (use_displaced_stepping): Likewise.
665         (displaced_step_prepare_throw): Likewise.
666         (resume): Likewise.
667         (proceed): Likewise.
668         (do_target_wait): Likewise.
669         (adjust_pc_after_break): Likewise.
670         (handle_inferior_event_1): Likewise.
671         (handle_signal_stop): Likewise.
672         (save_infcall_suspend_state): Likewise.
673         (restore_infcall_suspend_state): Likewise.
674         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
675         * jit.c (jit_frame_prev_register): Likewise.
676         * linux-nat.c (save_stop_reason): Likewise.
677         (linux_nat_wait_1): Likewise.
678         (resume_stopped_resumed_lwps): Likewise.
679         * linux-record.c (record_linux_sockaddr): Likewise.
680         (record_linux_msghdr): Likewise.
681         (record_linux_system_call): Likewise.
682         * linux-tdep.c (linux_collect_thread_registers): Likewise.
683         * lm32-tdep.c (lm32_extract_return_value): Likewise.
684         (lm32_store_return_value): Likewise.
685         * m32c-tdep.c (m32c_read_flg): Likewise.
686         (m32c_pseudo_register_read): Likewise.
687         (m32c_pseudo_register_write): Likewise.
688         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
689         (m32r_linux_collect_gregset): Likewise.
690         * m32r-tdep.c (m32r_store_return_value): Likewise.
691         (m32r_extract_return_value): Likewise.
692         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
693         (m68kbsd_collect_fpregset): Likewise.
694         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
695         * m68k-linux-nat.c (fetch_register): Likewise.
696         (old_fetch_inferior_registers): Likewise.
697         (old_store_inferior_registers): Likewise.
698         (store_regs): Likewise.
699         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
700         (m68k_svr4_store_return_value): Likewise.
701         * m88k-tdep.c (m88k_store_arguments): Likewise.
702         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
703         (mi_cmd_data_write_register_values): Likewise.
704         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
705         (mips_fbsd_store_inferior_registers): Likewise.
706         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
707         (mips_fbsd_supply_gregs): Likewise.
708         (mips_fbsd_collect_fpregs): Likewise.
709         (mips_fbsd_collect_gregs): Likewise.
710         (mips_fbsd_supply_fpregset): Likewise.
711         (mips_fbsd_collect_fpregset): Likewise.
712         (mips_fbsd_supply_gregset): Likewise.
713         (mips_fbsd_collect_gregset): Likewise.
714         * mips-linux-nat.c (supply_gregset): Likewise.
715         (fill_gregset): Likewise.
716         (supply_fpregset): Likewise.
717         (fill_fpregset): Likewise.
718         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
719         (mips_fill_gregset): Likewise.
720         (mips_supply_fpregset): Likewise.
721         (mips_fill_fpregset): Likewise.
722         (mips64_supply_gregset): Likewise.
723         (micromips_linux_sigframe_validate): Likewise.
724         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
725         (mipsnbsd_fetch_inferior_registers): Likewise.
726         (mipsnbsd_store_inferior_registers): Likewise.
727         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
728         (mipsnbsd_supply_gregset): Likewise.
729         (mipsnbsd_iterate_over_regset_sections): Likewise.
730         (mipsnbsd_supply_reg): Likewise.
731         (mipsnbsd_supply_fpreg): Likewise.
732         * mips-tdep.c (mips_in_frame_stub): Likewise.
733         (mips_dummy_id): Likewise.
734         (is_octeon_bbit_op): Likewise.
735         (micromips_bc1_pc): Likewise.
736         (extended_mips16_next_pc): Likewise.
737         (mips16_next_pc): Likewise.
738         (deal_with_atomic_sequence): Likewise.
739         * moxie-tdep.c (moxie_process_readu): Likewise.
740         * nios2-tdep.c (nios2_get_next_pc): Likewise.
741         * nto-procfs.c (procfs_store_registers): Likewise.
742         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
743         (ppcfbsd_store_inferior_registers): Likewise.
744         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
745         (fetch_altivec_register): Likewise.
746         (get_spe_registers): Likewise.
747         (fetch_spe_register): Likewise.
748         (fetch_altivec_registers): Likewise.
749         (fetch_all_gp_regs): Likewise.
750         (fetch_all_fp_regs): Likewise.
751         (store_vsx_register): Likewise.
752         (store_altivec_register): Likewise.
753         (set_spe_registers): Likewise.
754         (store_spe_register): Likewise.
755         (store_altivec_registers): Likewise.
756         (store_all_gp_regs): Likewise.
757         (store_all_fp_regs): Likewise.
758         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
759         (ppc_linux_collect_gregset): Likewise.
760         (ppc_canonicalize_syscall): Likewise.
761         (ppc_linux_record_signal): Likewise.
762         (ppu2spu_prev_register): Likewise.
763         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
764         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
765         (ppcobsd_store_registers): Likewise.
766         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
767         Likewise.
768         (ppc_ravenscar_generic_store_registers): Likewise.
769         * procfs.c (procfs_fetch_registers): Likewise.
770         (procfs_store_registers): Likewise.
771         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
772         (ravenscar_store_registers): Likewise.
773         (ravenscar_prepare_to_store): Likewise.
774         * record-btrace.c (record_btrace_fetch_registers): Likewise.
775         * record-full.c (record_full_wait_1): Likewise.
776         (record_full_registers_change): Likewise.
777         (record_full_store_registers): Likewise.
778         (record_full_core_fetch_registers): Likewise.
779         (record_full_save): Likewise.
780         (record_full_goto_insn): Likewise.
781         * regcache.c (regcache_register_size): Likewise.
782         (get_regcache_arch): Remove.
783         (regcache_read_pc): Likewise.
784         * regcache.h (get_regcache_arch): Remove.
785         * remote-sim.c (gdbsim_fetch_register): Likewise.
786         (gdbsim_store_register): Likewise.
787         * remote.c (fetch_register_using_p): Likewise.
788         (send_g_packet): Likewise.
789         (remote_prepare_to_store): Likewise.
790         (store_registers_using_G): Likewise.
791         * reverse.c (save_bookmark_command): Likewise.
792         (goto_bookmark_command): Likewise.
793         * rs6000-aix-tdep.c (branch_dest): Likewise.
794         * rs6000-nat.c (rs6000_ptrace64): Likewise.
795         (fetch_register): Likewise.
796         * rs6000-tdep.c (ppc_supply_reg): Likewise.
797         (ppc_collect_reg): Likewise.
798         (ppc_collect_gregset): Likewise.
799         (ppc_collect_fpregset): Likewise.
800         (ppc_collect_vsxregset): Likewise.
801         (ppc_collect_vrregset): Likewise.
802         (ppc_displaced_step_hw_singlestep): Likewise.
803         (rs6000_pseudo_register_read): Likewise.
804         (rs6000_pseudo_register_write): Likewise.
805         * s390-linux-nat.c (supply_gregset): Likewise.
806         (fill_gregset): Likewise.
807         (s390_linux_fetch_inferior_registers): Likewise.
808         * s390-linux-tdep.c (s390_write_pc): Likewise.
809         (s390_software_single_step): Likewise.
810         (s390_all_but_pc_registers_record): Likewise.
811         (s390_linux_syscall_record): Likewise.
812         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
813         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
814         (shnbsd_store_inferior_registers): Likewise.
815         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
816         (sh_extract_return_value_fpu): Likewise.
817         (sh_store_return_value_nofpu): Likewise.
818         (sh_corefile_supply_regset): Likewise.
819         (sh_corefile_collect_regset): Likewise.
820         * sh64-tdep.c (sh64_extract_return_value): Likewise.
821         (sh64_store_return_value): Likewise.
822         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
823         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
824         (sparc_store_inferior_registers): Likewise.
825         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
826         (sparc_ravenscar_prepare_to_store): Likewise.
827         * sparc-tdep.c (sparc32_store_arguments): Likewise.
828         (sparc_analyze_control_transfer): Likewise.
829         (sparc_step_trap): Likewise.
830         (sparc_software_single_step): Likewise.
831         (sparc32_gdbarch_init): Likewise.
832         (sparc_supply_rwindow): Likewise.
833         (sparc_collect_rwindow): Likewise.
834         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
835         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
836         (sparc64nbsd_collect_gregset): Likewise.
837         (sparc64nbsd_supply_fpregset): Likewise.
838         (sparc64nbsd_collect_fpregset): Likewise.
839         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
840         (sparc64_supply_gregset): Likewise.
841         (sparc64_collect_gregset): Likewise.
842         (sparc64_supply_fpregset): Likewise.
843         (sparc64_collect_fpregset): Likewise.
844         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
845         * spu-tdep.c (spu_unwind_sp): Likewise.
846         (spu2ppu_prev_register): Likewise.
847         (spu_memory_remove_breakpoint): Likewise.
848         * stack.c (return_command): Likewise.
849         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
850         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
851         * tracefile.c (trace_save_ctf): Likewise.
852         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
853         (do_windows_store_inferior_registers): Likewise.
854         (windows_resume): Likewise.
855         * xtensa-linux-nat.c (fill_gregset): Likewise.
856         (supply_gregset_reg): Likewise.
857         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
858         (xtensa_register_read_masked): Likewise.
859         (xtensa_supply_gregset): Likewise.
860         (xtensa_extract_return_value): Likewise.
861         (xtensa_store_return_value): Likewise.
862
863 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
864
865         * doublest.c (floatformat_from_string): New function.
866         * doublest.h (floatformat_from_string): Add prototype.
867
868         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
869         (OP_FLOAT): ... this.
870         * expression.h: Do not include "doublest.h".
871         (union exp_element): Replace doubleconst and decfloatconst by
872         new element floatconst.
873         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
874         (ada_evaluate_subexp): Likewise.
875         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
876         OP_DOUBLE and OP_DECFLOAT.
877         * expprint.c (print_subexp_standard): Likewise.
878         (dump_subexp_body_standard): Likewise.
879         * breakpoint.c (watchpoint_exp_is_const): Likewise.
880
881         * parse.c: Include "dfp.h".
882         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
883         (write_exp_elt_floatcst): New function.
884         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
885         and OP_DECFLOAT.
886         (operator_check_standard): Likewise.
887         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
888         Return target format buffer instead of host DOUBLEST.
889         Use floatformat_from_string and decimal_from_string to parse
890         either binary or decimal floating-point types.
891         (parse_c_float): Remove.
892         * parser-defs.h: Do not include "doublest.h".
893         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
894         (write_exp_elt_floatcst): Add prototype.
895         (parse_float): Update prototype.
896         (parse_c_float): Remove.
897
898         * c-exp.y: Do not include "dfp.h".
899         (typed_val_float): Use byte buffer instead of DOUBLEST.
900         (typed_val_decfloat): Remove.
901         (DECFLOAT): Remove.
902         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
903         (parse_number): Update to new parse_float interface.
904         Parse suffixes and determine type before calling parse_float.
905         Handle decimal and binary FP types the same way.
906
907         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
908         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
909         (parse_number): Update to new parse_float interface.
910         Parse suffixes and determine type before calling parse_float.
911
912         * f-exp.y: Replace dval by typed_val_float.
913         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
914         (parse_number): Use parse_float instead of atof.
915
916         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
917         (parse_go_float): Remove.
918         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
919         (parse_number): Call parse_float instead of parse_go_float.
920         Parse suffixes and determine type before calling parse_float.
921
922         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
923         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
924         (parse_number): Update to new parse_float interface.
925         Parse suffixes and determine type before calling parse_float.
926
927         * m2-exp.y: Replace dval by byte buffer val.
928         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
929         (parse_number): Call parse_float instead of atof.
930
931         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
932         (lex_number): Call parse_float instead of strtod.
933         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
934         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
935         Use write_exp_elt_floatcst.
936         (unit_testing): Remove static variable.
937         (rust_type): Do not check unit_testing.
938         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
939
940         * ada-exp.y (type_float, type_double): Remove.
941         (typed_val_float): Use byte buffer instead of DOUBLEST.
942         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
943         * ada-lex.l (processReal): Use parse_float instead of sscanf.
944
945 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
946
947         * aarch64-tdep.h (enum aarch64_regnum): Remove.
948         * arch/aarch64.h: New file.
949
950 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
951
952         * dfp.h (decimal_from_string): Use const reference for argument.
953         * dfp.c (decimal_from_string): Likewise.
954
955 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
956
957         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
958         * sh64-tdep.c (sh64_do_fp_register): Likewise.
959         * mips-tdep.c (mips_print_fp_register): Likewise.
960
961 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
962
963         * common/format.h (enum argclass): Replace decfloat_arg by
964         dec32float_arg, dec64float_arg, and dec128float_arg.
965         * common/format.c (parse_format_string): Update to return
966         new decimal float argument classes.
967
968         * printcmd.c (printf_decfloat): Rename to ...
969         (printf_floating): ... this.  Add argclass argument, and use it
970         instead of parsing the format string again.  Add support for
971         binary floating-point values, using floatformat_to_string.
972         Convert value to the target format if it doesn't already match.
973         (ui_printf): Call printf_floating instead of printf_decfloat,
974         also for double_arg / long_double_arg.  Pass argclass.
975
976         * dfp.c (decimal_to_string): Add format string argument.
977         * dfp.h (decimal_to_string): Likewise.
978
979         * doublest.c (floatformat_to_string): Add format string argument.
980         * doublest.h (floatformat_to_string): Likewise.
981
982 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
983
984         * doublest.c (floatformat_precision): New routine.
985         (floatformat_to_string): Likewise.
986         * doublest.c (floatformat_to_string): Add prototype.
987
988         * printcmd.c (print_scalar_formatted): Only call print_floating
989         on floating-point types.
990         * valprint.c: Do not include "floatformat.h".
991         (generic_val_print_decfloat): Remove.
992         (generic_val_print): Call generic_val_print_float for both
993         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
994         (print_floating): Use floatformat_to_string.  Handle decimal float.
995         (print_decimal_floating): Remove, merge into floatformat_to_string.
996         * value.h (print_decimal_floating): Remove.
997
998         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
999
1000 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1001
1002         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1003
1004 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1005
1006         * memattr.h: Don't include vec.h.
1007         (struct mem_attrib): Initialize fields.
1008         <unknown>: New static method.
1009         (struct mem_region): Add constructors, operator<, initialize
1010         fields.
1011         * memattr.c: Include algorithm.
1012         (default_mem_attrib, unknown_mem_attrib): Remove.
1013         (user_mem_region_list): New global.
1014         (target_mem_region_list, mem_region_list): Change type to
1015         std::vector<mem_region>.
1016         (mem_use_target): Now a function.
1017         (target_mem_regions_valid): Change type to bool.
1018         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1019         (require_user_regions): Adjust.
1020         (require_target_regions): Adjust.
1021         (create_mem_region): Adjust.
1022         (lookup_mem_region): Adjust.
1023         (invalidate_target_mem_regions): Adjust.
1024         (mem_clear): Rename to...
1025         (user_mem_clear): ... this, and adjust.
1026         (mem_command): Adjust.
1027         (info_mem_command): Adjust.
1028         (mem_enable, enable_mem_command, mem_disable,
1029         disable_mem_command): Adjust.
1030         (mem_delete): Adjust.
1031         (delete_mem_command): Adjust.
1032         * memory-map.h (parse_memory_map): Return an std::vector.
1033         * memory-map.c (parse_memory_map): Likewise.
1034         (struct memory_map_parsing_data): Add constructor.
1035         <memory_map>: Point to std::vector.
1036         (memory_map_start_memory): Adjust.
1037         (memory_map_end_memory): Adjust.
1038         (memory_map_end_property): Adjust.
1039         (clear_result): Remove.
1040         * remote.c (remote_memory_map): Return an std::vector.
1041         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1042         Remove.
1043         (target_debug_print_mem_region_vector): New.
1044         * target-delegates.c: Regenerate.
1045         * target.h (mem_region_vector): New typedef.
1046         (to_memory_map): Return mem_region_vector.
1047         (target_memory_map): Return an std::vector.
1048         * target.c (target_memory_map): Return an std::vector.
1049         (flash_erase_command): Adjust.
1050
1051 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1052
1053         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1054         Change type to std::string.
1055         (memory_map_start_property): Adjust.
1056         (memory_map_end_property): Adjust.
1057
1058 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1059
1060         * infrun.h: Include common/byte-vector.h.
1061         (struct displaced_step_closure): New struct.
1062         (struct buf_displaced_step_closure): New struct.
1063         * infrun.c (displaced_step_closure::~displaced_step_closure):
1064         Provide default implementation.
1065         (displaced_step_clear): Deallocate step closure with delete.
1066         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1067         (aarch64_displaced_step_closure): ... this, extend
1068         displaced_step_closure.
1069         (aarch64_displaced_step_data) <dsc>: Change type to
1070         aarch64_displaced_step_closure.
1071         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1072         unique_ptr.
1073         (aarch64_displaced_step_fixup): Add cast for displaced step
1074         closure.
1075         * amd64-tdep.c (displaced_step_closure): Rename to ...
1076         (amd64_displaced_step_closure): ... this, extend
1077         displaced_step_closure.
1078         <insn_buf>: Change type to std::vector<gdb_byte>.
1079         <max_len>: Remove.
1080         (fixup_riprel): Change type of DSC parameter, adjust to type
1081         change of insn_buf.
1082         (fixup_displaced_copy): Change type of DSC parameter.
1083         (amd64_displaced_step_copy_insn): Instantiate
1084         amd64_displaced_step_closure.
1085         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1086         to type change of insn_buf.
1087         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1088         parameter DSC.
1089         (arm_linux_copy_svc): Likewise.
1090         (cleanup_kernel_helper_return): Likewise.
1091         (arm_catch_kernel_helper_return): Likewise.
1092         (arm_linux_displaced_step_copy_insn): Instantiate
1093         arm_displaced_step_closure.
1094         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1095         (displaced_read_reg): Change type of parameter DSC.
1096         (branch_write_pc): Likewise.
1097         (load_write_pc): Likewise.
1098         (alu_write_pc): Likewise.
1099         (displaced_write_reg): Likewise.
1100         (arm_copy_unmodified): Likewise.
1101         (thumb_copy_unmodified_32bit): Likewise.
1102         (thumb_copy_unmodified_16bit): Likewise.
1103         (cleanup_preload): Likewise.
1104         (install_preload): Likewise.
1105         (arm_copy_preload): Likewise.
1106         (thumb2_copy_preload): Likewise.
1107         (install_preload_reg): Likewise.
1108         (arm_copy_preload_reg): Likewise.
1109         (cleanup_copro_load_store): Likewise.
1110         (install_copro_load_store): Likewise.
1111         (arm_copy_copro_load_store) Likewise.
1112         (thumb2_copy_copro_load_store): Likewise.
1113         (cleanup_branch): Likewise.
1114         (install_b_bl_blx): Likewise.
1115         (arm_copy_b_bl_blx): Likewise.
1116         (thumb2_copy_b_bl_blx): Likewise.
1117         (thumb_copy_b): Likewise.
1118         (install_bx_blx_reg): Likewise.
1119         (arm_copy_bx_blx_reg): Likewise.
1120         (thumb_copy_bx_blx_reg): Likewise.
1121         (cleanup_alu_imm): Likewise.
1122         (arm_copy_alu_imm): Likewise.
1123         (thumb2_copy_alu_imm): Likewise.
1124         (cleanup_alu_reg): Likewise.
1125         (install_alu_reg): Likewise.
1126         (arm_copy_alu_reg): Likewise.
1127         (thumb_copy_alu_reg): Likewise.
1128         (cleanup_alu_shifted_reg): Likewise.
1129         (install_alu_shifted_reg): Likewise.
1130         (arm_copy_alu_shifted_reg): Likewise.
1131         (cleanup_load): Likewise.
1132         (cleanup_store): Likewise.
1133         (arm_copy_extra_ld_st): Likewise.
1134         (install_load_store): Likewise.
1135         (thumb2_copy_load_literal): Likewise.
1136         (thumb2_copy_load_reg_imm): Likewise.
1137         (arm_copy_ldr_str_ldrb_strb): Likewise.
1138         (cleanup_block_load_all): Likewise.
1139         (cleanup_block_store_pc): Likewise.
1140         (cleanup_block_load_pc): Likewise.
1141         (arm_copy_block_xfer): Likewise.
1142         (thumb2_copy_block_xfer): Likewise.
1143         (cleanup_svc): Likewise.
1144         (install_svc): Likewise.
1145         (arm_copy_svc): Likewise.
1146         (thumb_copy_svc): Likewise.
1147         (arm_copy_undef): Likewise.
1148         (thumb_32bit_copy_undef): Likewise.
1149         (arm_copy_unpred): Likewise.
1150         (arm_decode_misc_memhint_neon): Likewise.
1151         (arm_decode_unconditional): Likewise.
1152         (arm_decode_miscellaneous): Likewise.
1153         (arm_decode_dp_misc): Likewise.
1154         (arm_decode_ld_st_word_ubyte): Likewise.
1155         (arm_decode_media): Likewise.
1156         (arm_decode_b_bl_ldmstm): Likewise.
1157         (arm_decode_ext_reg_ld_st): Likewise.
1158         (thumb2_decode_dp_shift_reg): Likewise.
1159         (thumb2_decode_ext_reg_ld_st): Likewise.
1160         (arm_decode_svc_copro): Likewise.
1161         (thumb2_decode_svc_copro): Likewise.
1162         (install_pc_relative): Likewise.
1163         (thumb_copy_pc_relative_16bit): Likewise.
1164         (thumb_decode_pc_relative_16bit): Likewise.
1165         (thumb_copy_pc_relative_32bit): Likewise.
1166         (thumb_copy_16bit_ldr_literal): Likewise.
1167         (thumb_copy_cbnz_cbz): Likewise.
1168         (thumb2_copy_table_branch): Likewise.
1169         (cleanup_pop_pc_16bit_all): Likewise.
1170         (thumb_copy_pop_pc_16bit): Likewise.
1171         (thumb_process_displaced_16bit_insn): Likewise.
1172         (decode_thumb_32bit_ld_mem_hints): Likewise.
1173         (thumb_process_displaced_32bit_insn): Likewise.
1174         (thumb_process_displaced_insn): Likewise.
1175         (arm_process_displaced_insn): Likewise.
1176         (arm_displaced_init_closure): Likewise.
1177         (arm_displaced_step_fixup): Add cast for closure.
1178         * arm-tdep.h: Include infrun.h.
1179         (displaced_step_closure): Rename to ...
1180         (arm_displaced_step_closure): ... this, extend
1181         displaced_step_closure.
1182         <u::svc::copy_svc_os>: Change type of parameter DSC.
1183         <cleanup>: Likewise.
1184         (arm_process_displaced_insn): Likewise.
1185         (arm_displaced_init_closure): Likewise.
1186         (displaced_read_reg): Likewise.
1187         (displaced_write_reg): Likewise.
1188         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1189         Adjust.
1190         * i386-tdep.h: Include infrun.h.
1191         (i386_displaced_step_closure): New typedef.
1192         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1193         i386_displaced_step_closure.
1194         (i386_displaced_step_fixup): Adjust.
1195         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1196         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1197         and unique_ptr.
1198         (ppc_displaced_step_fixup): Adjust.
1199         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1200         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1201         and unique_ptr.
1202         (s390_displaced_step_fixup): Adjust.
1203
1204 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1205
1206         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1207         Remove declarations.
1208
1209 2017-10-20  Tom Tromey  <tom@tromey.com>
1210
1211         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1212         std::vector.
1213         (gdb_bfd_record_inclusion): Update.
1214         (bfdp): Remove typedef.
1215
1216 2017-10-20  Tom Tromey  <tom@tromey.com>
1217
1218         * gdb_bfd.c (gdb_bfd_ref): Use new.
1219         (struct gdb_bfd_data): Add constructor, destructor, and member
1220         initializers.
1221         (gdb_bfd_unref): Use delete.
1222
1223 2017-10-20  Tom Tromey  <tom@tromey.com>
1224
1225         * exec.c (exec_file_attach): Use new_bfd_ref.
1226         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1227         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1228         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1229         new_bfd_ref.
1230         * gdb_bfd.h (new_bfd_ref): New function.
1231
1232 2017-10-20  Pedro Alves  <palves@redhat.com>
1233
1234         * main.c (captured_command_loop): Add attribute noinline.
1235
1236 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1237
1238         * interps.c (struct interp_factory): Add constructor.
1239         (interp_factory_p): Remove typedef.
1240         (DEF_VEC_P(interp_factory_p)): Remove.
1241         (interpreter_factories): Change type to std::vector.
1242         (interp_factory_register): Adjust.
1243         (interp_lookup): Adjust.
1244         (interpreter_completer): Adjust.
1245
1246 2017-10-19  Tom Tromey  <tom@tromey.com>
1247
1248         * break-catch-syscall.c (catch_syscall_completer): Use
1249         std::string, gdb::unique_xmalloc_ptr.
1250
1251 2017-10-19  Tom Tromey  <tom@tromey.com>
1252
1253         * infcall.c (call_function_by_hand_dummy): Use std::string.
1254
1255 2017-10-19  Tom Tromey  <tom@tromey.com>
1256
1257         * mi/mi-main.c (mi_cmd_execute): Update.
1258         * top.h (prepare_execute_command): Return scoped_value_mark.
1259         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1260         Add move constructor.
1261         * top.c (prepare_execute_command): Return scoped_value_mark.
1262         (execute_command): Update.
1263
1264 2017-10-19  Pedro Alves  <palves@redhat.com>
1265
1266         * xml-support.c (xml_fetch_content_from_file): Check fread's
1267         return.
1268
1269 2017-10-19  Pedro Alves  <palves@redhat.com>
1270
1271         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1272         async.
1273         (handle_error_fd): New function.
1274         (ser_base_async): Add/delete an event loop file handler for
1275         error_fd.
1276
1277 2017-10-19  Pedro Alves  <palves@redhat.com>
1278
1279         * xml-support.c (xml_fetch_content_from_file): Don't read in
1280         chunks.  Instead use fseek to determine the file's size, and read
1281         it in one go.
1282
1283 2017-11-18  Keith Seitz  <keiths@redhat.com>
1284
1285         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1286         types.
1287         Add whitespace to front of type name.
1288
1289 2017-10-18  Keith Seitz  <keiths@redhat.com>
1290
1291         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1292         DW_AT_accessibility.
1293
1294 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1295
1296         * features/tic6x-c62x-linux.c: Remove.
1297
1298 2017-10-17  Tom Tromey  <tom@tromey.com>
1299
1300         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1301         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1302         (do_mixed_source_and_assembly): Likewise.
1303
1304 2017-10-17  Tom Tromey  <tom@tromey.com>
1305
1306         * regcache.c (regcache::xfer_part): Remove assertion.
1307
1308 2017-10-17  Pedro Alves  <palves@redhat.com>
1309
1310         * xml-support.c (xml_fetch_content_from_file): Call
1311         unique_ptr::release() instead unique_ptr::get() when passing
1312         through xrealloc.
1313
1314 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1315
1316         * regcache.c (regcache::xfer_part): Remove parameters read and
1317         write, add parameter is_raw.  All callers are updated.
1318
1319 2017-10-16  Keith Seitz  <keiths@redhat.com>
1320
1321         * c-typeprint.c (enum access_specifier): Moved here from
1322         c_type_print_base.
1323         (output_access_specifier): New function.
1324         (c_type_print_base): Consider typedefs when assessing
1325         whether access labels are needed.
1326         Use output_access_specifier as needed.
1327         Output access specifier for typedefs, if needed.
1328         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1329         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1330         fields.
1331         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1332         accessor macros.
1333
1334 2017-10-16  Tom Tromey  <tom@tromey.com>
1335
1336         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1337         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1338         * target.c (target_fileio_read_stralloc): Update.
1339         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1340         * target.h (target_fileio_read_stralloc): Return
1341         unique_xmalloc_ptr.
1342
1343 2017-10-16  Tom Tromey  <tom@tromey.com>
1344
1345         * xml-syscall.c (xml_init_syscalls_info): Update.
1346         * xml-support.c (xinclude_start_include): Update.
1347         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1348         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1349         (xml_fetch_content_from_file): Likewise.
1350         * osdata.c (get_osdata): Update.
1351         * target.h (target_read_stralloc, target_get_osdata): Return
1352         unique_xmalloc_ptr.
1353         * solib-aix.c (solib_aix_get_library_list): Update.
1354         * solib-target.c (solib_target_current_sos): Update.
1355         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1356         * xml-tdesc.c (fetch_available_features_from_target): Update.
1357         (target_fetch_description_xml): Update.
1358         (file_read_description_xml): Update.
1359         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1360         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1361         (remote_pid_to_exec_file): Update.
1362         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1363         (target_get_osdata): Likewise.
1364
1365 2017-10-16  Tom Tromey  <tom@tromey.com>
1366
1367         * remote.c (remote_register_number_and_offset): Use std::vector.
1368         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1369         (putpkt_binary): Use gdb::def_vector.
1370         (compare_sections_command): Use gdb::byte_vector.
1371
1372 2017-10-16  Tom Tromey  <tom@tromey.com>
1373
1374         * ppc-linux-nat.c (hwdebug_insert_point): Use
1375         gdb::unique_xmalloc_ptr, XDUP.
1376
1377 2017-10-16  Tom Tromey  <tom@tromey.com>
1378
1379         * probe.c (parse_probes): Use std::string.
1380         (info_probes_for_ops, enable_probes_command)
1381         (disable_probes_command): Remove cleanups.
1382
1383 2017-10-16  Tom Tromey  <tom@tromey.com>
1384
1385         * buildsym.c (block_compar): Remove.
1386         (end_symtab_get_static_block): Use std::vector.
1387
1388 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1389
1390         * memrange.h (struct mem_range): Define operator< and operator==.
1391         (mem_range_s): Remove.
1392         (DEF_VEC_O (mem_range_s)): Remove.
1393         (normalize_mem_ranges): Change parameter type to std::vector.
1394         * memrange.c (compare_mem_ranges): Remove.
1395         (normalize_mem_ranges): Change parameter type to std::vector,
1396         adjust to vector change.
1397         * exec.c (section_table_available_memory): Return vector, remove
1398         parameter.
1399         (section_table_read_available_memory): Adjust to std::vector
1400         change.
1401         * remote.c (remote_read_bytes): Adjust to std::vector
1402         change.
1403         * tracepoint.h (traceframe_available_memory): Change parameter
1404         type to std::vector.
1405         * tracepoint.c (traceframe_available_memory): Change parameter
1406         type to std::vector, adjust.
1407         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1408         std::vector change.
1409         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1410         unittests/memrange-selftests.c.
1411         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1412         * gdb/unittests/memrange-selftests.c: New file.
1413
1414 2017-10-16  Pedro Alves  <palves@redhat.com>
1415
1416         * elfread.c (probe_key_free): Rename range-for variable.
1417         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1418         (find_probe_by_pc, collect_probes): Rename range-for variable.
1419
1420 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1421
1422         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1423         * features/tic6x-c62x.c: Remove.
1424         * features/tic6x-c64x-linux.c: Remove.
1425         * features/tic6x-c64x.c: Remove.
1426         * features/tic6x-c64xp-linux.c: Remove.
1427         * features/tic6x-c64xp.c: Remove.
1428         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1429         initialize_tdesc_tic6x_*_linux functions.
1430         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1431         initialize_tdesc_tic6x_* functions.
1432
1433 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1434
1435         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1436         tic6x-c62x.
1437         * regformats/tic6x-c62x.dat: Remove.
1438         * regformats/tic6x-c64x.dat: Remove.
1439         * regformats/tic6x-c64xp.dat: Remove.
1440
1441 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1442
1443         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1444         (the !HAVE_LIBEXPAT version).
1445
1446 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1447
1448         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1449         const.
1450
1451 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1452
1453         * target.h: Include tracepoint.h.
1454         (enum trace_find_type): Move to tracepoint.h.
1455         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1456         * tracepoint.h: Don't include target.h
1457         (enum trace_find_type): Move from target.h.
1458         (parse_traceframe_info): Return a unique ptr.
1459         * tracepoint.c (current_traceframe_info): Change type to unique
1460         ptr.
1461         (free_traceframe_info): Remove.
1462         (clear_traceframe_info): Don't manually free
1463         current_traceframe_info.
1464         (free_result): Remove.
1465         (parse_traceframe_info): Return a unique ptr.
1466         (get_traceframe_info): Adjust to unique ptr.
1467         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1468         * remote.c (remote_traceframe_info): Return a unique ptr.
1469         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1470         ptr.
1471         * target-debug.h (target_debug_print_traceframe_info_up): New
1472         macro.
1473         * target-delegates.c: Regenerate.
1474
1475 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1476
1477         * memrange.h (struct mem_range): Add constructors.
1478         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1479         std::vector<mem_range>.
1480         * tracepoint.c (free_traceframe_info): Don't manually free
1481         vector.
1482         (traceframe_info_start_memory): Adjust to vector change.
1483         (traceframe_available_memory): Likewise.
1484         * tracefile-tfile.c (build_traceframe_info): Likewise.
1485         * ctf.c (ctf_traceframe_info): Likewise.
1486
1487 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1488
1489         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1490         std::vector<int>.
1491         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1492         (traceframe_info_start_tvar): Adjust to vector change.
1493         (parse_traceframe_info): Allocate with new.
1494         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1495         vector change.
1496         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1497         change.
1498         tfile_traceframe_info): Allocate with new.
1499         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1500         change.
1501
1502 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1503
1504         * tracepoint.c (traceframe_info): Rename to...
1505         (current_traceframe_info): ...this.
1506         (clear_traceframe_info): Adjust.
1507         (get_traceframe_info): Adjust.
1508
1509 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1510
1511         * nat/linux-osdata.c: Include algorithm.
1512         (compare_processes): Remove.
1513         (struct pid_pgid_entry): New struct.
1514         (linux_xfer_osdata_processgroups): Use std::vector instead of
1515         XNEWVEC.
1516
1517 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1518
1519         * objfiles.h: Don't include symfile.h.
1520         (struct partial_symbol): Remove forward-declaration.
1521         (struct objfile) <global_psymbols, static_psymbols>: Change type
1522         to std::vector<partial_symbol *>.
1523         * objfiles.c (objfile::objfile): Don't memset those fields.
1524         (objfile::~objfile): Don't free those fields.
1525         * psympriv.h (struct psymbol_allocation_list): Remove
1526         forward-declaration.
1527         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1528         to std::vector.
1529         (start_psymtab_common): Change parameters to std::vector.
1530         * psymtab.c: Include algorithm.
1531         (require_partial_symbols): Call shrink_to_fit.
1532         (find_pc_sect_psymbol): Adjust to vector change.
1533         (match_partial_symbol): Likewise.
1534         (lookup_partial_symbol): Likewise.
1535         (psym_relocate): Likewise.
1536         (dump_psymtab): Likewise.
1537         (recursively_search_psymtabs): Likewise.
1538         (compare_psymbols): Remove.
1539         (sort_pst_symbols): Adjust to vector change.
1540         (start_psymtab_common): Likewise.
1541         (end_psymtab_common): Likewise.
1542         (psymbol_bcache_full): De-constify return value.
1543         (add_psymbol_to_bcache): Likewise.
1544         (extend_psymbol_list): Remove.
1545         (append_psymbol_to_list): Adjust to vector change.
1546         (add_psymbol_to_list): Likewise.
1547         (init_psymbol_list): Likewise.
1548         (maintenance_info_psymtabs): Likewise.
1549         (maintenance_check_psymtabs): Likewise.
1550         * symfile.h (struct psymbol_allocation_list): Remove.
1551         * symfile.c (reread_symbols): Adjust to vector change.
1552         * dbxread.c (start_psymtab): Change type of parameters.
1553         (dbx_symfile_read): Adjust to vector change.
1554         (read_dbx_symtab): Likewise.
1555         (start_psymtab): Change type of parameters.
1556         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1557         (create_partial_symtab): Likewise.
1558         (add_partial_symbol): Likewise.
1559         (write_one_signatured_type): Likewise.
1560         (recursively_write_psymbols): Likewise.
1561         * mdebugread.c (parse_partial_symbols): Likewise.
1562         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1563         (scan_xcoff_symtab): Adjust to vector change.
1564         (xcoff_initial_scan): Likewise.
1565
1566 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1567
1568         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1569
1570 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1571
1572         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1573         Remove s390x-*-expedite, add s390x-expedite.
1574
1575 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1576
1577         * features/s390-gs-linux64.c: Regenerated.
1578         * features/s390x-gs-linux64.c: Regenerated.
1579
1580 2017-10-13  Tom Tromey  <tom@tromey.com>
1581
1582         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1583         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1584         delete.
1585         * symfile.c (symbol_file_add_with_addrs): Use new.
1586         (symbol_file_add_separate): Update comment.
1587         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1588         * jit.c (jit_object_close_impl): Use new.
1589         (jit_unregister_code): Use delete.
1590         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1591         (~objfile): Rename from free_objfile.
1592         (free_objfile_separate_debug, do_free_objfile_cleanup)
1593         (free_all_objfiles, objfile_purge_solibs): Use delete.
1594         * objfiles.h (struct objfile): Add constructor and destructor.
1595         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1596         (allocate_objfile, free_objfile): Don't declare.
1597         (struct objstats): Add initializers.
1598
1599 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1600
1601         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1602         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1603         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1604         * gdbarch.h: Regenerate.
1605         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1606         Adjust comment.
1607         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1608         (i386_displaced_step_fixup): Adjust comment.
1609         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1610
1611 2017-10-12  Tom Tromey  <tom@tromey.com>
1612
1613         * prologue-value.h (pv_area::store_would_trash): Return bool.
1614         (pv_area::find_reg): Likewise.
1615         * prologue-value.c (pv_area::store_would_trash): Return bool.
1616         (pv_area::find_reg): Likewise.
1617
1618 2017-10-12  Tom Tromey  <tom@tromey.com>
1619
1620         * s390-linux-tdep.c (s390_store, s390_load)
1621         (s390_check_for_saved, s390_analyze_prologue): Update.
1622         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1623         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1624         * prologue-value.h (class pv_area): Move from prologue-value.c.
1625         Change names of members.  Add constructor, destructor, member
1626         functions.
1627         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1628         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1629         (pv_area_fetch, pv_area_scan): Don't declare.
1630         * prologue-value.c (struct pv_area::area_entry): Now member of
1631         pv_area.
1632         (struct pv_area): Move to prologue-value.h.
1633         (pv_area::pv_area): Rename from make_pv_area.
1634         (pv_area::~pv_area): Rename from free_pv_area.
1635         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1636         (clear_entries, find_entry, overlaps, store_would_trash, store)
1637         (fetch, find_reg, scan): Now member of pv_area.
1638         Remove "area" argument.  Update.
1639         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1640         Update.
1641         * mn10300-tdep.c (push_reg, check_for_saved)
1642         (mn10300_analyze_prologue): Update.
1643         * mep-tdep.c (is_arg_spill, check_for_saved)
1644         (mep_analyze_prologue): Update.
1645         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1646         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1647         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1648         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1649         Update.
1650         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1651         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1652
1653 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1654
1655         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1656         * linux-nat.c (linux_nat_delete_thread): New variable.
1657         (lwp_free): Invoke linux_nat_delete_thread if set.
1658         (linux_nat_set_delete_thread): New function.
1659         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1660         thread delete callback.
1661         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1662         (_initialize_arm_linux_nat): Assign thread delete callback.
1663         * s390-linux-nat.c (s390_delete_thread): New function.
1664         (_initialize_s390_nat): Assign thread delete callback.
1665         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1666         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1667         function.
1668         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1669         declaration.
1670         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1671         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1672
1673 2017-10-09  Tom Tromey  <tom@tromey.com>
1674
1675         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1676         std::string.
1677         * tui/tui-layout.c (enum tui_status): Use std::string.
1678
1679 2017-10-11  Tom Tromey  <tom@tromey.com>
1680
1681         * gdbthread.h (thread_command): Constify.
1682         * inferior.h (detach_command): Constify.
1683         * top.h (set_history, show_history): Constify.
1684         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1685         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1686         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1687         * printcmd.c (set_command): Constify.
1688         (non_const_set_command): New function.
1689         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1690         * breakpoint.c (enable_command, disable_command, delete_command)
1691         (catch_command, tcatch_command, set_breakpoint_cmd)
1692         (show_breakpoint_cmd): Constify.
1693         * macrocmd.c (macro_command): Constify.
1694         * infcmd.c (unset_command, kill_command, detach_command)
1695         (info_proc_cmd): Constify.
1696         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1697         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1698         (info_auto_load_cmd): Constify.
1699         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1700         (unset_tdesc_cmd): Constify.
1701         * ada-lang.c (set_ada_command, show_ada_command)
1702         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1703         * guile/guile.c (set_guile_command, show_guile_command)
1704         (info_guile_command): Constify.
1705         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1706         Constify.
1707         * skip.c (skip_command): Constify.
1708         * compile/compile.c (_initialize_compile): Constify.
1709         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1710         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1711         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1712         (maint_btrace_pt_show_cmd): Constify.
1713         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1714         Constify.
1715         * python/python.c (user_show_python, user_set_python): Constify.
1716         * mips-tdep.c (set_mips_command, show_mips_command)
1717         (set_mipsfpu_command): Constify.
1718         * record-btrace.c (cmd_record_btrace_start)
1719         (cmd_set_record_btrace, cmd_show_record_btrace)
1720         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1721         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1722         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1723         Constify.
1724         * symfile.c (overlay_command): Constify.
1725         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1726         * cli/cli-logging.c (set_logging_command, show_logging_command):
1727         Constify.
1728         * cli/cli-dump.c (dump_command, append_command)
1729         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1730         (tekhex_dump_command, binary_dump_command)
1731         (binary_append_command): Constify.
1732         * cli/cli-decode.c (struct cmd_list_element): Change type of
1733         "fun".
1734         * cli/cli-cmds.c (info_command, show_command, set_debug)
1735         (show_debug): Constify.
1736         (show_command): Add non-const overload.
1737         * top.c (set_history, show_history): Constify.
1738         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1739         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1740         * target.c (target_command): Constify.
1741         * sparc64-tdep.c (info_adi_command): Constify.
1742         * record-full.c (cmd_record_full_start): Constify.
1743         (set_record_full_command): Constify.  Fix typo.
1744         (show_record_full_command): Constify.
1745         * thread.c (thread_command, thread_apply_command): Constify.
1746         * memattr.c (dummy_cmd): Constify.
1747         * value.c (function_command): Constify.
1748         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1749         * probe.c (info_probes_command): Constify.
1750         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1751         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1752         (show_thread_cmd, set_thread_default_cmd)
1753         (show_thread_default_cmd): Constify.
1754         (check_empty): Constify.
1755         * tracepoint.c (tfind_command): Constify.
1756         * cp-support.c (maint_cplus_command): Constify.
1757         * windows-tdep.c (info_w32_command): Constify.
1758         * record.c (cmd_record_start, set_record_command)
1759         (show_record_command, info_record_command, cmd_record_goto):
1760         Constify.
1761         * ravenscar-thread.c (set_ravenscar_command)
1762         (show_ravenscar_command): Constify.
1763         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1764         Constify.
1765         (add_internal_problem_command): Remove casts.
1766         * arc-tdep.c (maintenance_print_arc_command): Constify.
1767         * valprint.c (set_print, show_print, set_print_raw)
1768         (show_print_raw): Constify.
1769         * maint.c (maintenance_command, maintenance_info_command)
1770         (maintenance_print_command, maintenance_set_cmd)
1771         (maintenance_show_cmd, set_per_command_cmd)
1772         (show_per_command_cmd, maintenance_check_command): Constify.
1773         * language.c (set_check, show_check): Constify.
1774         * typeprint.c (show_print_type, set_print_type): Constify.
1775         * go32-nat.c (go32_info_dos_command): Constify.
1776
1777 2017-10-11  Tom Tromey  <tom@tromey.com>
1778
1779         * breakpoint.c (prepare_re_set_context): Remove.
1780         (breakpoint_re_set_one): Update.  Don't use cleanups.
1781         (breakpoint_re_set): Use scoped_restore, std::string, and
1782         scoped_restore_current_language.
1783
1784 2017-10-11  Tom Tromey  <tom@tromey.com>
1785
1786         * breakpoint.c (commands_command_1): Use std::string.
1787         (cleanup_executing_breakpoints): Remove.
1788         (bpstat_do_actions_1): Use scoped_restore.
1789         (bpstat_check_watchpoint): Use std::string.
1790         (decode_static_tracepoint_spec): Likewise.
1791         (break_range_command): Likewise.
1792         (watch_command_1): Likewise.
1793         (compare_breakpoints): Change argument types.
1794         (clear_command): Use std::vector.
1795         (cleanup_executing_breakpoints): Remove.
1796         (update_global_location_list): Use unique_xmalloc_ptr.
1797         (strace_command): Remove unused declaration.
1798
1799 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1800
1801         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1802         * NEWS: Mention new FreeBSD/arm native configuration.
1803         * configure.host: Add arm*-*-freebsd*.
1804         * configure.nat: Likewise.
1805         * arm-fbsd-nat.c: New file.
1806
1807 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1808
1809         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1810         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1811         * NEWS: Mention new FreeBSD/arm target.
1812         * configure.tgt: Add arm*-*-freebsd*.
1813         * arm-fbsd-tdep.c: New file.
1814         * arm-fbsd-tdep.h: New file.
1815
1816 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1817
1818         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1819         `gdbarch_elfcore_write_linux_prpsinfo'.
1820         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1821         method.
1822         (elf_internal_linux_prpsinfo): Remove declaration.
1823         * gdbarch.h: Regenerate.
1824         * gdbarch.c: Regenerate.
1825
1826 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1827
1828         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1829         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1830
1831 2017-10-11  Pedro Alves  <palves@redhat.com>
1832
1833         * breakpoint.c (reattach_breakpoints): Delete.
1834         * breakpoint.h (reattach_breakpoints): Delete.
1835
1836 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1837
1838         * symfile.c (registered_sym_fns): Make struct, not typedef.
1839         (DEF_VEC_O (registered_sym_fns)): Remove.
1840         (symtab_fns): Change type to std::vector.
1841         (add_symtab_fns): Adjust.
1842         (find_sym_fns): Adjust.
1843
1844 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1845
1846         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1847         * arc-tdep.h (arc_arch_is_em): New function.
1848         (arc_arch_is_hs): Likewise.
1849
1850 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1851
1852         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1853         parentheses in the declaration.
1854         (macro_lookup_inclusion): Likewise.
1855         (macro_lookup_definition): Likewise.
1856         * p-lang.h (pascal_builtin_types): Likewise.
1857         * tui/tui-data.c (tui_win_list): Likewise.
1858         * tui/tui-data.h (tui_win_list): Likewise.
1859         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1860
1861 2017-10-11  Mark Rages  <markrages@gmail.com>
1862
1863         * target-memory.c (block_boundaries): Fix for block address not
1864         aligned on block size.
1865
1866 2017-10-10  Pedro Alves <palves@redhat.com>
1867             Tom Tromey  <tom@tromey.com>
1868
1869         * breakpoint.c (struct captured_breakpoint_query_args)
1870         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1871         (print_breakpoint): New.
1872         * breakpoint.h (print_breakpoint): Declare.
1873         * common/common-exceptions.h (enum return_reason): Remove
1874         references to catch_exceptions.
1875         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1876         Delete.
1877         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1878         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1879         * gdb.h: Delete.
1880         * gdbthread.h (thread_select): Declare.
1881         * mi/mi-cmd-break.c: Don't include gdb.h.
1882         (breakpoint_notify): Use print_breakpoint.
1883         * mi/mi-cmd-catch.c: Don't include gdb.h.
1884         * mi/mi-interp.c: Don't include gdb.h.
1885         (mi_print_breakpoint_for_event): New.
1886         (mi_breakpoint_created, mi_breakpoint_modified): Use
1887         mi_print_breakpoint_for_event.
1888         * mi/mi-main.c: Don't include gdb.h.
1889         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1890         thread_select instead of gdb_thread_select.
1891         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1892         of using gdb_list_thread_ids.
1893         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1894         FILEIO_ENOSYS here.
1895         (remote_fileio_request): Use TRY/CATCH instead of
1896         catch_exceptions.
1897         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1898         (symbol_file_add_from_memory_wrapper): Delete.
1899         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1900         * thread.c: Don't include gdb.h.
1901         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1902         (thread_alive): Use thread_select.
1903         (do_captured_thread_select): Delete, parts salvaged as ...
1904         (thread_select): ... this new function.
1905         (gdb_thread_select): Delete.
1906
1907 2017-10-10  Pedro Alves  <palves@redhat.com>
1908             Tom Tromey  <tom@tromey.com>
1909
1910         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1911         and reverse logic.
1912         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1913         No longer macros.  Instead ...
1914         (enum wp_check_result): They're now values of this new
1915         enumeration.
1916         (watchpoint_check): Change return type to wp_check_result and
1917         parameter type to bpstat.
1918         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1919         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1920         catch_errors.  Reverse logic of watchpoint_check call.
1921         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1922         pointer as parameter.
1923         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1924         * common/common-exceptions.c (throw_exception_sjlj): Update
1925         comments to avoid mentioning catch_errors.
1926         * exceptions.c (catch_errors): Delete.
1927         * exceptions.h: Update comments to avoid mentioning catch_errors.
1928         (catch_errors_ftype, catch_errors): Delete.
1929         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1930         (hook_stop_stub): Delete.
1931         (restore_selected_frame): Change return type to void, and
1932         parameter type to const frame_id &.
1933         (restore_infcall_control_state): Use TRY/CATCH instead of
1934         catch_errors.
1935         * main.c (captured_command_loop): Return void and remove
1936         parameter.  Remove references to catch_errors.
1937         (captured_main): Use TRY/CATCH instead of catch_errors.
1938         * objc-lang.c (objc_submethod_helper_data)
1939         (find_objc_msgcall_submethod_helper): Delete.
1940         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1941         catch_errors.
1942         * record-full.c (record_full_message): Return void.
1943         (record_full_message_args, record_full_message_wrapper): Delete.
1944         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1945         instead of catch_errors.
1946         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1947         parameter type to int.
1948         * solib-darwin.c (open_symbol_file_object): Ditto.
1949         * solib-dsbt.c (open_symbol_file_object): Ditto.
1950         * solib-frv.c (open_symbol_file_object): Ditto.
1951         * solib-svr4.c (open_symbol_file_object): Ditto.
1952         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1953         * solib.c (update_solib_list): Use TRY/CATCH instead of
1954         catch_errors.
1955         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1956         Change type.
1957         * symmisc.c (struct print_symbol_args): Remove.
1958         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1959         (print_symbol): Change type.
1960         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1961         and remove parameters.
1962         (catch_errors): New.
1963         (get_windows_debug_event): Adjust.
1964
1965 2017-10-09  Tom Tromey  <tom@tromey.com>
1966
1967         * mi/mi-main.c (free_splay_tree): Remove.
1968         (list_available_thread_groups): Use splay_tree_up.
1969         * common/gdb_splay_tree.h: New file.
1970
1971 2017-10-09  Tom Tromey  <tom@tromey.com>
1972
1973         * mi/mi-main.c (do_nothing): Remove.
1974         (list_available_thread_groups): Update.
1975
1976 2017-10-09  Pedro Alves  <palves@redhat.com>
1977
1978         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1979         reading registers when switching context.
1980
1981 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
1982
1983         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1984         (fbsd_convert_siginfo): Likewise.
1985         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1986
1987 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
1988
1989         * configure.ac (try_guile_versions): Remove guile-2.2.
1990         * configure: Regenerate.
1991
1992 2017-10-09  Tom Tromey  <tom@tromey.com>
1993
1994         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1995         (COMPILE.pre): Use $(CXX).
1996
1997 2017-10-09  Pedro Alves  <palves@redhat.com>
1998
1999         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2000         Use bool.
2001         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2002         * cp-support.h (cp_remove_params): Now returns a
2003         gdb::unique_xmalloc_ptr.
2004         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2005         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2006         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2007         returning a gdb::unique_xmalloc_ptr.
2008         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2009         * stack.c (find_frame_funname): Adjust to cp_remove_params
2010         returning a gdb::unique_xmalloc_ptr.
2011
2012 2017-10-08  Tom Tromey  <tom@tromey.com>
2013
2014         * dwarf2read.c (dwarf2_get_dwz_file): Use
2015         gdb::unique_xmalloc_ptr.
2016         (find_slot_in_mapped_hash): Likewise.
2017         (dwarf2_physname): Likewise.
2018         (create_dwo_unit_in_dwp_v1): Use std::string.
2019         (create_dwo_unit_in_dwp_v2): Likewise.
2020         (lookup_dwo_cutu): Likewise.
2021         (inherit_abstract_dies): Use std::vector.
2022         (read_array_type): Likewise.
2023         (dwarf_decode_macros): Remove unused declaration.
2024         (unsigned_int_compar): Remove.
2025         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2026         (psymtabs_addrmap_cleanup): Remove.
2027
2028 2017-10-08  Tom Tromey  <tom@tromey.com>
2029
2030         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2031         * frame.h (frame_cleanup_after_sniffer): Declare.
2032         (frame_prepare_for_sniffer): Return void.
2033         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2034         type of argument.
2035         (frame_prepare_for_sniffer): Return void.
2036
2037 2017-10-08  Tom Tromey  <tom@tromey.com>
2038
2039         * utils.h (make_cleanup_value_free): Remove.
2040         * utils.c (do_value_free, struct cleanup): Remove.
2041         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2042         Use gdb_value_up.
2043         * value.h (struct value_deleter): New.
2044         (gdb_value_up): New typedef.
2045
2046 2017-10-08  Tom Tromey  <tom@tromey.com>
2047
2048         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2049         (make_cleanup_free_search_symbols): Remove.
2050         (search_symbols): Return std::vector.
2051         (symbol_search::compare_search_syms): Now member of
2052         symbol_search.  Change arguments.
2053         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2054         (symtab_symbol_info, rbreak_command): Update.
2055         * symtab.h (struct symbol_search) <next>: Remove.
2056         Add constructors.
2057         (symbol_search::operator<): New function.
2058         (symbol_search::operator==): New function.
2059         (search_symbols): Remove std::vector.
2060         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2061         (symbol_search::compare_search_syms): Declare.
2062
2063 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2064
2065         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2066         arch/aarch64-insn.o.
2067         Remove one rule.
2068         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2069
2070 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2071
2072         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2073         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2074         arch/arm-linux.o respectively.
2075         * configure.tgt: Likewise.
2076
2077 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2078
2079         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2080         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2081
2082 2017-10-06  Pedro Alves  <palves@redhat.com>
2083
2084         * windows-nat.c: Include <algorithm>.
2085
2086 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2087
2088         * configure.tgt (i386_tobjs): New variable.
2089         (amd64_tobjs): New variable.
2090         Set $cpu_obs and $os_obs.
2091
2092 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2093
2094         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2095         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2096         (clean): Remove object files and dependency files.
2097         (distclean): Remove the directory.
2098         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2099         * configure: Re-generated.
2100         * configure.tgt: Replace amd64.o with arch/amd64.o.
2101
2102 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2103
2104         PR build/22188
2105         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2106         and SETEND.
2107
2108 2017-10-05  Pedro Alves  <palves@redhat.com>
2109
2110         * linux-nat.c (linux_child_follow_fork): When following the parent
2111         and detaching the child, consult the parent thread's architecture
2112         instead of the child's.
2113
2114 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2115
2116         * ax.h: Do not include "doublest.h".
2117         (union agent_val): Remove.
2118
2119 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2120
2121         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2122         (decimal_to_string): Return std::string object.
2123         (decimal_from_string): Accept std::string object.  Return bool.
2124         (decimal_from_integral, decimal_from_doublest): Remove.
2125         (decimal_from_longest): Add prototype.
2126         (decimal_from_ulongest): Likewise.
2127         (decimal_to_longest): Likewise.
2128         (decimal_from_doublest): Likewise.
2129         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2130         (MAX_DECIMAL_STRING): Move here.
2131         (decimal_to_string): Return std::string object.
2132         (decimal_from_string): Accept std::string object.  Return bool.
2133         (decimal_from_integral): Remove, replace by ...
2134         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2135         (decimal_to_longest): New function.
2136         (decimal_from_floating): Remove, replace by ...
2137         (decimal_from_doublest): ... this new function.
2138         (decimal_to_doublest): Update to new decimal_to_string interface.
2139
2140         * value.c (unpack_long): Use decimal_to_longest.
2141         * valops.c (value_cast): Use decimal_from_doublest instead of
2142         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2143         decimal_from_integral.
2144         * valarith.c (value_args_as_decimal): Likewise.
2145         * valprint.c (print_decimal_floating): Update to new
2146         decimal_to_string interface.
2147         * printcmd.c (printf_decfloat): Likewise.
2148         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2149
2150 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2151
2152         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2153         * gdbtypes.c: Include "floatformat.h".
2154         * value.c: Likewise.
2155         * m68k-tdep.c: Likewise.
2156
2157         * findvar.c: Do not include "floatformat.h".
2158         * amd64-darwin-tdep.c: Likewise.
2159         * arm-linux-tdep.c: Likewise.
2160         * i386-darwin-tdep.c: Likewise.
2161         * i387-tdep.c: Likewise.
2162         * m68k-linux-tdep.c: Likewise.
2163         * mep-tdep.c: Likewise.
2164         * mips-tdep.c: Likewise.
2165         * nios2-tdep.c: Likewise.
2166         * s390-linux-tdep.c: Likewise.
2167         * sparc-obsd-tdep.c: Likewise.
2168         * sparc-tdep.c: Likewise.
2169         * sparc64-tdep.c: Likewise.
2170         * spu-tdep.c: Likewise.
2171         * tic6x-tdep.c: Likewise.
2172         * tilegx-tdep.c: Likewise.
2173         * vax-tdep.c: Likewise.
2174         * xstormy16-tdep.c: Likewise.
2175         * xtensa-tdep.c: Likewise.
2176
2177         * top.c: Do not include "doublest.h".
2178         * aarch64-tdep.c: Likewise.
2179         * alpha-tdep.c: Likewise.
2180         * arm-linux-tdep.c: Likewise.
2181         * m68k-linux-tdep.c: Likewise.
2182         * tilegx-tdep.c: Likewise.
2183         * xstormy16-tdep.c: Likewise.
2184
2185 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2186
2187         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2188         (mipsn32_fbsd_sigframe): Define.
2189         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2190         for FreeBSD/mipsn32.
2191
2192 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2193
2194         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2195         AT_HWCAP.
2196
2197 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2198
2199         * MAINTAINERS (Misc): Update my email address.
2200
2201 2017-10-04  Pedro Alves  <palves@redhat.com>
2202
2203         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2204         it instead of target_gdbarch.
2205         (get_remote_state, get_remote_packet_size): Adjust
2206         get_remote_arch_state calls, passing down target_gdbarch
2207         explicitly.
2208         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2209         'gdbarch' and use it instead of target_gdbarch.
2210         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2211         passing down target_gdbarch explicitly.
2212         (struct stop_reply) <arch>: New field.
2213         (remote_parse_stop_reply): Use the stopped thread's architecture,
2214         not the current inferior's.  Save the architecture in the
2215         stop_reply.
2216         (process_stop_reply): Use the stop reply's architecture.
2217         (process_g_packet, remote_fetch_registers)
2218         (remote_prepare_to_store, store_registers_using_G)
2219         (remote_store_registers): Adjust get_remote_arch_state calls,
2220         using the regcache's architecture.
2221         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2222         passing down target_gdbarch explicitly.
2223         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2224         beneath instead of calling target_gdbarch.
2225         * target.c (default_thread_architecture): Use the specified
2226         inferior's architecture, instead of the current inferior's
2227         architecture (via target_gdbarch).
2228
2229 2017-10-04  Pedro Alves  <palves@redhat.com>
2230
2231         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2232         case.
2233         (regcache_print): Handle !target_has_registers here instead.
2234
2235 2017-10-04  Pedro Alves  <palves@redhat.com>
2236
2237         * frame.c (create_test_frame): Delete.
2238         * frame.h (create_test_frame): Delete.
2239         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2240         (class regcache_test): Delete.
2241         (test_target_has_registers, test_target_has_stack)
2242         (test_target_has_memory, test_target_prepare_to_store)
2243         (test_target_store_registers): New functions.
2244         (test_target_ops): New class.
2245         (register_to_value_test): Error out if there's already a
2246         process_stratum (or higher) target pushed.  Create a fuller mock
2247         environment, with mock target_ops, inferior, address space, thread
2248         and inferior_ptid.
2249         * progspace.c (struct address_space): Move to ...
2250         * progspace.h (struct address_space): ... here.
2251         * regcache.h (regcache::~regcache, regcache::raw_write)
2252         [GDB_SELF_TEST]: No longer virtual.
2253
2254 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2255
2256         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2257
2258 2017-10-04  Pedro Alves  <palves@redhat.com>
2259
2260         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2261         out of 'between TRY and CATCH'.
2262
2263 2017-10-04  Pedro Alves  <palves@redhat.com>
2264
2265         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2266         * common/common-exceptions.h (TRY): Open an outermost scope.
2267         Expand intro comment.
2268         (CATCH): Reindent.
2269         (END_CATCH): Close the outermost scope.
2270         * completer.c (complete_line_internal): Add missing END_CATCH.
2271
2272 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2273
2274         * NEWS (Changes since GDB 8.0): Add entry about new
2275         'set-cwd-on-gdbserver' feature.
2276         (New remote packets): Add entry for QSetWorkingDir.
2277         * common/common-inferior.h (set_inferior_cwd): New prototype.
2278         * infcmd.c (set_inferior_cwd): Remove "static".
2279         (show_cwd_command): Expand text to include remote debugging.
2280         * remote.c: Add PACKET_QSetWorkingDir.
2281         (remote_protocol_features) <QSetWorkingDir>: New entry for
2282         PACKET_QSetWorkingDir.
2283         (extended_remote_set_inferior_cwd): New function.
2284         (extended_remote_create_inferior): Call
2285         "extended_remote_set_inferior_cwd".
2286         (_initialize_remote): Call "add_packet_config_cmd" for
2287         QSetWorkingDir.
2288
2289 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2290
2291         * NEWS (New commands): Mention "set/show cwd".
2292         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2293         "cd" command's help text.
2294         * common/common-inferior.h (get_inferior_cwd): New prototype.
2295         * infcmd.c (inferior_cwd_scratch): New global variable.
2296         (set_inferior_cwd): New function.
2297         (get_inferior_cwd): Likewise.
2298         (set_cwd_command): Likewise.
2299         (show_cwd_command): Likewise.
2300         (_initialize_infcmd): Add "set/show cwd" commands.
2301         * inferior.h (class inferior) <cwd>: New field.
2302         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2303         (fork_inferior): Change inferior's cwd before its execution.
2304         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2305         to CreateProcess.
2306
2307 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2308
2309         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2310         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2311         (COMMON_OBS): Add gdb_tilde_expand.o.
2312         * common/gdb_tilde_expand.c: New file.
2313         * common/gdb_tilde_expand.h: Likewise.
2314
2315 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2316
2317         * gdbarch.sh (objfile): Remove duplicate declaration.
2318         * gdbarch.h: Regenerate.
2319
2320 2017-10-03  Tom Tromey  <tom@tromey.com>
2321
2322         * utils.c (internal_vproblem): Use string_vprintf.
2323
2324 2017-10-03  Tom Tromey  <tom@tromey.com>
2325
2326         * printcmd.c (info_symbol_command): Use std::string.
2327
2328 2017-10-03  Tom Tromey  <tom@tromey.com>
2329
2330         * top.c (gdb_safe_append_history): Use std::string.
2331
2332 2017-10-03  Tom Tromey  <tom@tromey.com>
2333
2334         * event-top.c (stdin_event_handler): Update.
2335         * main.c (captured_main_1): Update.
2336         * top.h (make_delete_ui_cleanup): Remove.
2337         (struct ui): Add constructor and destructor.
2338         (new_ui, delete_ui): Remove.
2339         * top.c (make_delete_ui_cleanup): Remove.
2340         (new_ui_command): Use std::unique_ptr.
2341         (delete_ui_cleanup): Remove.
2342         (ui::ui): Rename from new_ui.  Update.
2343         (free_ui): Remove.
2344         (ui::~ui): Rename from delete_ui.  Update.
2345
2346 2017-10-03  Tom Tromey  <tom@tromey.com>
2347
2348         * symfile.c (load_progress): Use gdb::byte_vector.
2349
2350 2017-10-03  Tom Tromey  <tom@tromey.com>
2351
2352         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2353         declaration.
2354         * printcmd.c (x_command): Remove unused declaration.
2355         * symfile.c (symbol_file_command): Remove unused declaration.
2356
2357 2017-10-03  Tom Tromey  <tom@tromey.com>
2358
2359         * utils.c (internal_vproblem): Use std::string.
2360         (defaulted_query): Likewise.
2361
2362 2017-10-03  Tom Tromey  <tom@tromey.com>
2363
2364         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2365         * top.c (execute_command_to_string): Update.
2366         * utils.c (make_cleanup_restore_page_info): Remove.
2367         (do_restore_page_info_cleanup): Remove.
2368         (set_batch_flag_and_restore_page_info):
2369         New.
2370         (make_cleanup_restore_page_info): Remove.
2371         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2372         (~set_batch_flag_and_restore_page_info): New
2373         (make_cleanup_restore_uinteger): Remove.
2374         (make_cleanup_restore_integer): Remove.
2375         (struct restore_integer_closure): Remove.
2376         (restore_integer): Remove.
2377         * utils.h (struct set_batch_flag_and_restore_page_info): New
2378         class.
2379         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2380         (make_cleanup_restore_page_info): Remove.
2381         (make_cleanup_restore_uinteger) Remove.
2382         (make_cleanup_restore_integer) Remove.
2383
2384 2017-10-03  Tom Tromey  <tom@tromey.com>
2385
2386         * record-full.h (record_full_gdb_operation_disable_set): Return
2387         scoped_restore_tmpl<int>.
2388         * infrun.c (adjust_pc_after_break): Update.
2389         (handle_signal_stop): Update.
2390         * record-full.c (record_full_gdb_operation_disable_set): Return
2391         scoped_restore_tmpl<int>.
2392         (record_full_wait_1, record_full_insert_breakpoint)
2393         (record_full_remove_breakpoint, record_full_save)
2394         (record_full_goto_insn): Update.
2395
2396 2017-10-02  Tom Tromey  <tom@tromey.com>
2397
2398         PR rust/22236:
2399         * rust-lang.c (rust_val_print_str): New function.
2400         (val_print_struct): Call it.
2401         (rust_subscript): Preserve name of slice type.
2402
2403 2017-10-02  Tom Tromey  <tom@tromey.com>
2404
2405         * rust-lang.c (rust_subscript): Handle slices in
2406         EVAL_AVOID_SIDE_EFFECTS case.
2407
2408 2017-10-02  Tom Tromey  <tom@tromey.com>
2409
2410         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2411
2412 2017-10-02  Tom Tromey  <tom@tromey.com>
2413
2414         * rust-lang.h (rust_slice_type): Add "extern".
2415
2416 2017-10-02  Tom Tromey  <tom@tromey.com>
2417             Pedro Alves  <palves@redhat.com>
2418
2419         * ada-lang.h (ada_exc_info::operator<): Make const.
2420         (ada_exc_info::operator==): Make const.
2421         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2422         Make const.
2423
2424 2017-09-29  Tom Tromey  <tom@tromey.com>
2425
2426         * target.c (read_whatever_is_readable): Change type of "result".
2427         Update.
2428         (free_memory_read_result_vector): Remove.
2429         (read_memory_robust): Change return type.  Update.
2430         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2431         bin2hex, std::string.
2432         * target.h (memory_read_result_s): Remove typedef.
2433         (free_memory_read_result_vector): Remove.
2434         (read_memory_robust): Return std::vector.
2435
2436 2017-09-29  Tom Tromey  <tom@tromey.com>
2437
2438         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2439
2440 2017-09-29  Tom Tromey  <tom@tromey.com>
2441
2442         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2443         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2444         operator< and operator==.
2445         (ada_exceptions_list): Return a std::vector.
2446         * ada-lang.c (ada_exc_info::operator<): Rename from
2447         compare_ada_exception_info.
2448         (ada_exc_info::operator==): New.
2449         (sort_remove_dups_ada_exceptions_list): Change type of
2450         "exceptions".
2451         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2452         (ada_add_global_exceptions): Likewise.
2453         (ada_exceptions_list_1): Return a std::vector.
2454         (ada_exceptions_list): Likewise.
2455
2456 2017-09-29  Tom Tromey  <tom@tromey.com>
2457
2458         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2459         'std::set *'.
2460         (print_one_inferior): Update.
2461         (free_vector_of_ints): Remove.
2462         (list_available_thread_groups): Change "ids" to std::set.
2463         (mi_cmd_list_thread_groups): Update.
2464         (struct collect_cores_data) <core>: Now a std::set.
2465         (collect_cores): Update.
2466         (unique): Remove.
2467         (print_one_inferior): Update.
2468
2469 2017-09-29  Tom Tromey  <tom@tromey.com>
2470
2471         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2472         (mi_execute_async_cli_command): Likewise.
2473         (mi_cmd_trace_frame_collected): Use field_fmt.
2474
2475 2017-09-29  Tom Tromey  <tom@tromey.com>
2476
2477         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2478         gdb::byte_vector.
2479
2480 2017-09-29  Tom Tromey  <tom@tromey.com>
2481
2482         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2483
2484 2017-09-29  Tom Tromey  <tom@tromey.com>
2485
2486         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2487
2488 2017-09-29  Tom Tromey  <tom@tromey.com>
2489
2490         * varobj.h (varobj_gen_name): Return std::string.
2491         * varobj.c (varobj_gen_name): Return std::string.
2492         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2493         (mi_cmd_var_delete): Don't copy "name".
2494
2495 2017-09-29  Tom Tromey  <tom@tromey.com>
2496
2497         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2498         (mi_cmd_break_insert_1): Update.
2499
2500 2017-09-29  Tom Tromey  <tom@tromey.com>
2501
2502         * target.h (make_scoped_defer_target_commit_resume): Update.
2503         * target.c (make_scoped_defer_target_commit_resume): Rename from
2504         make_cleanup_defer_target_commit_resume.  Return a
2505         scoped_restore.
2506         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2507
2508 2017-09-29  Tom Tromey  <tom@tromey.com>
2509
2510         * main.c (captured_main_1): Remove unused declaration.
2511         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2512
2513 2017-09-29  Tom Tromey  <tom@tromey.com>
2514
2515         * symtab.c (search_symbols): Remove unused outer cleanup.
2516         (make_source_files_completion_list): Remove unused declaration.
2517
2518 2017-09-29  Tom Tromey  <tom@tromey.com>
2519
2520         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2521
2522 2017-09-29  Tom Tromey  <tom@tromey.com>
2523
2524         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2525         gdb::byte_vector.
2526
2527 2017-09-29  Tom Tromey  <tom@tromey.com>
2528
2529         * complaints.c (vcomplaint): Use std::string.
2530
2531 2017-09-29  Tom Tromey  <tom@tromey.com>
2532
2533         * tracepoint.c (trace_variable_command): Use std::string.
2534         (encode_actions_1): Remove unused declarations.
2535         (create_tsv_from_upload): Use std::string.
2536
2537 2017-09-29  Tom Tromey  <tom@tromey.com>
2538
2539         * cp-support.c (gdb_demangle): Use std::string.
2540
2541 2017-09-29  Tom Tromey  <tom@tromey.com>
2542
2543         * stack.c (parse_frame_specification): Use std::string
2544         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2545
2546 2017-09-29  Tom Tromey  <tom@tromey.com>
2547
2548         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2549
2550 2017-09-29  Tom Tromey  <tom@tromey.com>
2551
2552         * utils.c (vfprintf_maybe_filtered): Use std::string.
2553         (vfprintf_unfiltered): Likewise.
2554
2555 2017-09-29  Tom Tromey  <tom@tromey.com>
2556
2557         * event-top.c (top_level_prompt): Return std::string.
2558         (display_gdb_prompt): Update.
2559
2560 2017-09-29  Tom Tromey  <tom@tromey.com>
2561
2562         * unittests/common-utils-selftests.c (format): New function.
2563         (string_vprintf_tests): New function.
2564         (_initialize_common_utils_selftests): Register new tests.
2565         * common/common-utils.c (string_vprintf): New function.
2566         * common/common-utils.h (string_vprintf): Declare.
2567
2568 2017-09-29  Pedro Alves  <palves@redhat.com>
2569
2570         * common/rsp-low.c (unpack_varlen_hex): Constify.
2571         * common/rsp-low.h (unpack_varlen_hex): Constify.
2572         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2573         Constify.
2574         * remote.c (remote_set_permissions, read_ptid)
2575         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2576         (remote_static_tracepoint_marker_at)
2577         (remote_static_tracepoint_markers_by_strid)
2578         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2579         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2580         (parse_tracepoint_definition, parse_tsv_definition)
2581         (parse_static_tracepoint_marker_definition): Constify.
2582         * tracepoint.h (parse_static_tracepoint_marker_definition)
2583         (parse_trace_status, parse_tracepoint_status)
2584         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2585
2586 2017-09-29  Pedro Alves  <palves@redhat.com>
2587
2588         * remote.c (target_buf, target_buf_size): Delete.
2589         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2590         Use the connection's packet buffer instead.
2591         All callers adjusted.
2592         (_initialize_remote): Remove references to target_buf and
2593         target_buf_size.
2594
2595 2017-09-28  Pedro Alves  <palves@redhat.com>
2596
2597         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2598         unittests/common-utils-selftests.c.
2599         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2600         (COMMON_OBS): Remove utils-selftests.o.
2601         * utils-selftests.c: Move to ...
2602         * unittests/common-utils-selftests.c: ... here and rename self
2603         test to "string_printf".
2604
2605 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2606
2607         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2608         having NULL cus or tus.
2609
2610 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2611
2612         * arm-tdep.c: (convert_from_extended): Remove.
2613         (convert_to_extended): Likewise.
2614         (arm_extract_return_value): Use convert_typed_floating.
2615         (arm_store_return_value): Likewise.
2616
2617         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2618         * sh-tdep.c: Do not include "floatformat.h".
2619         (sh_littlebyte_bigword_type): New function.
2620         (sh_register_convert_to_virtual): Use convert_typed_floating.
2621         (sh_register_convert_to_raw): Likewise.
2622         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2623         (sh64_littlebyte_bigword_type): New function.
2624         (sh64_extract_return_value): Use convert_typed_floating.
2625         (sh64_register_convert_to_virtual): Likewise.
2626         (sh64_register_convert_to_raw): Likewise.
2627
2628 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2629
2630         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2631         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2632
2633         * gdbtypes.h (union type_specific): Make field floatformat hold
2634         just a single struct floatformat, not an array.
2635         (floatformat_from_type): Move here.
2636         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2637         changed TYPE_FLOATFORMAT definition.
2638         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2639         (recursive_dump_type): Likewise.
2640         (init_float_type): Install correct floatformat for byte order.
2641         (arch_float_type): Likewise.
2642
2643 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2644
2645         * gdbtypes.c (init_type): Change incoming argument from
2646         length-in-bytes to length-in-bits.  Assert length is a
2647         multiple of TARGET_CHAR_BITS.
2648         (arch_type, arch_flags_type): Likewise.
2649         (init_integer_type): Update call to init_type.
2650         (init_character_type): Likewise.
2651         (init_boolean_type): Likewise.
2652         (init_float_type): Likewise.
2653         (init_decfloat_type): Likewise.
2654         (init_complex_type): Likewise.
2655         (init_pointer_type): Likewise.
2656         (objfile_type): Likewise.
2657         (arch_integer_type): Update call to arch_type.
2658         (arch_character_type): Likewise.
2659         (arch_boolean_type): Likewise.
2660         (arch_float_type): Likewise.
2661         (arch_decfloat_type): Likewise.
2662         (arch_complex_type): Likewise.
2663         (arch_pointer_type): Likewise.
2664         (gdbtypes_post_init): Likewise.
2665
2666         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2667         (read_base_type): Likewise.
2668         * mdebugread.c (basic_type): Likewise.
2669         * stabsread.c (dbx_init_float_type): Likewise.
2670         (rs6000_builtin_type): Likewise.
2671         (read_range_type): Likewise.  Also, fix call to init_integer_type
2672         with erroneous length argument.
2673
2674         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2675         * d-lang.c (build_d_types): Likewise.
2676         * f-lang.c (build_fortran_types): Likewise.
2677         * go-lang.c (build_go_types): Likewise.
2678         * opencl-lang.c (build_opencl_types): Likewise.
2679         * jit.c (finalize_symtab): Likewise.
2680         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2681         (build_std_type_info_type): Likewise.
2682         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2683         update call to arch_flags_type.
2684
2685         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2686         arch_type.
2687         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2688         * windows-tdep.c (windows_get_tlb_type): Likewise.
2689
2690         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2691         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2692         * m32c-tdep.c (make_types): Likewise.
2693         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2694         (rl78_psw_type): Update call to arch_flags_type.
2695         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2696         * rx-tdep.c (rx_psw_type): Likewise.
2697         (rx_fpsw_type): Likewise.
2698         * sparc-tdep.c (sparc_psr_type): Likewise.
2699         (sparc_fsr_type): Likewise.
2700         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2701         (sparc64_ccr_type): Likewise.
2702         (sparc64_fsr_type): Likewise.
2703         (sparc64_fprs_type): Likewise.
2704
2705 2017-09-27  Tom Tromey  <tom@tromey.com>
2706
2707         * findcmd.c (find_command): Constify.
2708
2709 2017-09-27  Tom Tromey  <tom@tromey.com>
2710
2711         * ada-tasks.c (task_command_1, task_command): Constify.
2712
2713 2017-09-27  Tom Tromey  <tom@tromey.com>
2714
2715         * symtab.c (maintenance_print_symbol_cache)
2716         (maintenance_flush_symbol_cache)
2717         (maintenance_print_symbol_cache_statistics): Constify.
2718
2719 2017-09-27  Tom Tromey  <tom@tromey.com>
2720
2721         * inferior.c (detach_inferior_command, kill_inferior_command)
2722         (inferior_command): Constify.
2723
2724 2017-09-27  Tom Tromey  <tom@tromey.com>
2725
2726         * regcache.c (regcache_print, maintenance_print_registers)
2727         (maintenance_print_raw_registers)
2728         (maintenance_print_cooked_registers)
2729         (maintenance_print_register_groups)
2730         (maintenance_print_remote_registers): Constify.
2731
2732 2017-09-27  Tom Tromey  <tom@tromey.com>
2733
2734         * printcmd.c (map_display_numbers, undisplay_command)
2735         (enable_disable_display_command, enable_display_command)
2736         (disable_display_command): Constify.
2737
2738 2017-09-27  Tom Tromey  <tom@tromey.com>
2739
2740         * breakpoint.h (delete_command): Don't declare.
2741         * breakpoint.c (delete_command, enable_once_command)
2742         (enable_count_command, enable_delete_command, breakpoint_1)
2743         (maintenance_info_breakpoints, stopin_command, stopat_command)
2744         (delete_command, delete_trace_command, save_breakpoints)
2745         (save_breakpoints_command, save_tracepoints_command): Constify.
2746
2747 2017-09-27  Tom Tromey  <tom@tromey.com>
2748
2749         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2750         (skip_ws, extract_identifier, macro_define_command)
2751         (macro_undef_command, macro_list_command): Constify.
2752
2753 2017-09-27  Tom Tromey  <tom@tromey.com>
2754
2755         * infcmd.c (environment_info, set_environment_command)
2756         (unset_environment_command, path_info, info_proc_cmd_1)
2757         (info_proc_cmd_mappings, info_proc_cmd_stat)
2758         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2759         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2760
2761 2017-09-27  Tom Tromey  <tom@tromey.com>
2762
2763         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2764         Constify.
2765
2766 2017-09-27  Tom Tromey  <tom@tromey.com>
2767
2768         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2769
2770 2017-09-27  Tom Tromey  <tom@tromey.com>
2771
2772         * demangle.c (demangle_command): Constify.
2773
2774 2017-09-27  Tom Tromey  <tom@tromey.com>
2775
2776         * progspace.c (maintenance_info_program_spaces_command):
2777         Constify.
2778
2779 2017-09-27  Tom Tromey  <tom@tromey.com>
2780
2781         * compile/compile.c (check_raw_argument, compile_file_command)
2782         (compile_code_command, compile_print_command): Constify.
2783
2784 2017-09-27  Tom Tromey  <tom@tromey.com>
2785
2786         * reggroups.c (maintenance_print_reggroups): Constify.
2787
2788 2017-09-27  Tom Tromey  <tom@tromey.com>
2789
2790         * dwarf2read.c (save_gdb_index_command): Constify.
2791
2792 2017-09-27  Tom Tromey  <tom@tromey.com>
2793
2794         * stap-probe.c (info_probes_stap_command): Constify.
2795
2796 2017-09-27  Tom Tromey  <tom@tromey.com>
2797
2798         * fork-child.c (unset_exec_wrapper_command): Constify.
2799
2800 2017-09-27  Tom Tromey  <tom@tromey.com>
2801
2802         * btrace.c (get_uint, get_context_size, no_chunk)
2803         (maint_btrace_packet_history_cmd)
2804         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2805         (maint_info_btrace_cmd): Constify.
2806
2807 2017-09-27  Tom Tromey  <tom@tromey.com>
2808
2809         * reverse.c (delete_bookmark_command): Constify.
2810
2811 2017-09-27  Tom Tromey  <tom@tromey.com>
2812
2813         * remote.c (set_memory_packet_size)
2814         (set_memory_write_packet_size, show_memory_write_packet_size)
2815         (set_memory_read_packet_size, show_memory_read_packet_size)
2816         (compare_sections_command, packet_command, remote_put_command)
2817         (remote_get_command, remote_delete_command): Constify.
2818
2819 2017-09-27  Tom Tromey  <tom@tromey.com>
2820
2821         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2822         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2823         (set_mipsfpu_auto_command): Constify.
2824
2825 2017-09-27  Tom Tromey  <tom@tromey.com>
2826
2827         * cli/cli-cmds.h (cd_command): Constify.
2828         * cli/cli-cmds.c (cd_command): Constify.
2829
2830 2017-09-27  Tom Tromey  <tom@tromey.com>
2831
2832         * thread.c (thread_name_command, thread_find_command): Constify.
2833
2834 2017-09-27  Tom Tromey  <tom@tromey.com>
2835
2836         * probe.c (enable_probes_command, disable_probes_command):
2837         Constify.
2838
2839 2017-09-27  Tom Tromey  <tom@tromey.com>
2840
2841         * symfile.c (symbol_file_command): Constify.
2842         * gdbcore.h (deprecated_file_changed_hook): Constify.
2843         * exec.c (deprecated_file_changed_hook, exec_file_command)
2844         (file_command): Constify.
2845         * defs.h (symbol_file_command): Constify.
2846
2847 2017-09-27  Tom Tromey  <tom@tromey.com>
2848
2849         * remote-fileio.c (set_system_call_allowed)
2850         (show_system_call_allowed): Constify.
2851
2852 2017-09-27  Tom Tromey  <tom@tromey.com>
2853
2854         * tracepoint.c (delete_trace_variable_command)
2855         (tfind_end_command, tfind_start_command, tfind_pc_command)
2856         (tfind_tracepoint_command, tfind_line_command)
2857         (tfind_range_command, tfind_outside_command): Constify.
2858
2859 2017-09-27  Tom Tromey  <tom@tromey.com>
2860
2861         * ax-gdb.c (maint_agent_printf_command, agent_command)
2862         (agent_eval_command): Constify.
2863
2864 2017-09-27  Tom Tromey  <tom@tromey.com>
2865
2866         * tracepoint.c (info_scope_command): Constify.
2867         * python/python.c (gdbpy_decode_line): Constify.
2868         * python/py-breakpoint.c (bppy_init): Constify.
2869         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2870         * location.h: (new_linespec_location)
2871         (string_to_event_location_basic, string_to_event_location):
2872         Constify.
2873         * location.c (new_linespec_location)
2874         (string_to_event_location_basic, string_to_event_location):
2875         Constify.
2876         * linespec.h (decode_line_with_current_source)
2877         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2878         * linespec.c (linespec_lex_to_end)
2879         (decode_line_with_current_source)
2880         (decode_line_with_last_displayed): Constify.
2881         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2882         Constify.
2883         * cli/cli-cmds.c (edit_command, list_command): Constify.
2884         * breakpoint.h (until_break_command, watch_command_wrapper)
2885         (awatch_command_wrapper, rwatch_command_wrapper)
2886         (init_ada_exception_breakpoint): Constify.
2887         * breakpoint.c (break_command_1, dprintf_command)
2888         (break_range_command, watch_command_wrapper)
2889         (rwatch_command_wrapper, awatch_command_wrapper)
2890         (until_break_command, init_ada_exception_breakpoint)
2891         (strace_marker_create_sals_from_location, trace_command)
2892         (ftrace_command, strace_command, struct tracepoint): Constify.
2893         * ax-gdb.c (agent_command_1): Constify.
2894         * ada-lang.c (ada_exception_sal): Constify.
2895
2896 2017-09-27  Tom Tromey  <tom@tromey.com>
2897
2898         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2899         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2900         (get_context_size, no_chunk, get_insn_history_modifiers)
2901         (cmd_record_insn_history, get_call_history_modifiers)
2902         (cmd_record_call_history): Constify.
2903
2904 2017-09-27  Tom Tromey  <tom@tromey.com>
2905
2906         * source.c (show_substitute_path_command)
2907         (unset_substitute_path_command, set_substitute_path_command):
2908         Constify.
2909
2910 2017-09-27  Tom Tromey  <tom@tromey.com>
2911
2912         * typeprint.c (maintenance_print_type): Constify.
2913         * maint.c (maintenance_dump_me, maintenance_demangle)
2914         (maintenance_time_display, maintenance_info_sections)
2915         (maintenance_print_statistics, maintenance_deprecate)
2916         (maintenance_undeprecate): Constify.
2917         (maintenance_do_deprecate): Constify.  Use std::string.
2918         (maintenance_selftest): Constify.
2919         * gdbtypes.h (maintenance_print_type): Constify.
2920
2921 2017-09-27  Tom Tromey  <tom@tromey.com>
2922
2923         * hppa-tdep.c (unwind_command): Constify.
2924
2925 2017-09-27  Tom Tromey  <tom@tromey.com>
2926
2927         * target-descriptions.c (unset_tdesc_filename_cmd)
2928         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2929         Constify.
2930
2931 2017-09-27  Tom Tromey  <tom@tromey.com>
2932
2933         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2934
2935 2017-09-27  Tom Tromey  <tom@tromey.com>
2936
2937         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2938
2939 2017-09-27  Tom Tromey  <tom@tromey.com>
2940
2941         * tui/tui-regs.c (tui_reg_command): Constify.
2942
2943 2017-09-27  Tom Tromey  <tom@tromey.com>
2944
2945         * skip.c (skip_file_command, skip_function_command)
2946         (skip_enable_command, skip_disable_command, skip_delete_command):
2947         Constify.
2948
2949 2017-09-27  Tom Tromey  <tom@tromey.com>
2950
2951         * record-btrace.c (cmd_record_btrace_bts_start)
2952         (cmd_record_btrace_pt_start): Constify.
2953
2954 2017-09-27  Tom Tromey  <tom@tromey.com>
2955
2956         * symmisc.c (maintenance_print_symbols)
2957         (maintenance_print_msymbols, maintenance_print_objfiles)
2958         (maintenance_info_symtabs, maintenance_check_symtabs)
2959         (maintenance_expand_symtabs, maintenance_info_line_tables):
2960         Constify.
2961
2962 2017-09-27  Tom Tromey  <tom@tromey.com>
2963
2964         * top.c (new_ui_command): Constify.
2965
2966 2017-09-27  Tom Tromey  <tom@tromey.com>
2967
2968         * symfile.c (add_symbol_file_command)
2969         (remove_symbol_file_command, list_overlays_command)
2970         (map_overlay_command, unmap_overlay_command)
2971         (overlay_auto_command, overlay_manual_command)
2972         (overlay_off_command, overlay_load_command): Constify.
2973
2974 2017-09-27  Tom Tromey  <tom@tromey.com>
2975
2976         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2977         (info_spu_mailbox_command, info_spu_dma_command)
2978         (info_spu_proxydma_command): Constify.
2979
2980 2017-09-27  Tom Tromey  <tom@tromey.com>
2981
2982         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2983
2984 2017-09-27  Tom Tromey  <tom@tromey.com>
2985
2986         * cli/cli-script.c (user_defined_command): Constify.
2987
2988 2017-09-27  Tom Tromey  <tom@tromey.com>
2989
2990         * cli/cli-dump.c (dump_memory_command, dump_value_command)
2991         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2992         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2993         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2994         (dump_binary_value, append_binary_memory, append_binary_value):
2995         Constify.
2996         (struct dump_context) <func>: Constify.
2997         (add_dump_command): Update.
2998
2999 2017-09-27  Tom Tromey  <tom@tromey.com>
3000
3001         * cli/cli-cmds.c (show_version, show_configuration)
3002         (source_command, show_user): Constify.
3003
3004 2017-09-27  Tom Tromey  <tom@tromey.com>
3005
3006         * target.c (maintenance_print_target_stack): Constify.
3007
3008 2017-09-27  Tom Tromey  <tom@tromey.com>
3009
3010         * interps.c (interpreter_exec_cmd): Constify.
3011
3012 2017-09-27  Tom Tromey  <tom@tromey.com>
3013
3014         * record-full.c (cmd_record_full_restore): Constify.
3015
3016 2017-09-27  Tom Tromey  <tom@tromey.com>
3017
3018         * memattr.c (enable_mem_command, disable_mem_command)
3019         (delete_mem_command): Constify.
3020
3021 2017-09-27  Tom Tromey  <tom@tromey.com>
3022
3023         * value.c (show_convenience): Constify.
3024
3025 2017-09-27  Tom Tromey  <tom@tromey.com>
3026
3027         * gdbcore.h (core_file_command): Update.
3028         * corefile.c (core_file_command): Constify.
3029
3030 2017-09-27  Tom Tromey  <tom@tromey.com>
3031
3032         * user-regs.c (maintenance_print_user_registers): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3037
3038 2017-09-27  Tom Tromey  <tom@tromey.com>
3039
3040         * cp-support.c (first_component_command): Constify.
3041
3042 2017-09-27  Tom Tromey  <tom@tromey.com>
3043
3044         * psymtab.c (maintenance_print_psymbols)
3045         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3046         Constify.
3047
3048 2017-09-27  Tom Tromey  <tom@tromey.com>
3049
3050         * windows-tdep.c (display_tib): Constify.
3051
3052 2017-09-27  Tom Tromey  <tom@tromey.com>
3053
3054         * linux-fork.c (delete_checkpoint_command)
3055         (detach_checkpoint_command): Constify.
3056
3057 2017-09-27  Tom Tromey  <tom@tromey.com>
3058
3059         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3060
3061 2017-09-27  Tom Tromey  <tom@tromey.com>
3062
3063         * arc-tdep.c (dump_arc_instruction_command): Constify.
3064
3065 2017-09-27  Tom Tromey  <tom@tromey.com>
3066
3067         * valprint.c (set_radix, show_radix): Constify.
3068
3069 2017-09-27  Tom Tromey  <tom@tromey.com>
3070
3071         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3072
3073 2017-09-27  Tom Tromey  <tom@tromey.com>
3074
3075         * command.h (not_just_help_class_command): Update.
3076         * cli/cli-decode.h (not_just_help_class_command): Update.
3077         * cli/cli-decode.c (not_just_help_class_command): Constify.
3078
3079 2017-09-27  Tom Tromey  <tom@tromey.com>
3080
3081         * gdb_bfd.c (maintenance_info_bfds): Constify.
3082
3083 2017-09-27  Tom Tromey  <tom@tromey.com>
3084
3085         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3086         overloads.
3087         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3088         (do_const_cfunc): New function.
3089         (cmd_cfunc_eq): New overload.
3090         (cli_user_command_p): Check do_const_cfunc.
3091         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3092         const_cfunc.
3093         * command.h (add_cmd): Add const overload and no-function
3094         overload.
3095         (set_cmd_cfunc): Add const overload.
3096         (cmd_const_cfunc_ftype): Declare.
3097         (cmd_cfunc_eq): Add const overload.
3098         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3099         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3100         overload.
3101
3102 2017-09-27  Tom Tromey  <tom@tromey.com>
3103
3104         * macroexp.c (get_next_token_for_substitution): New function.
3105         (substitute_args): Call it.  Check for __VA_OPT__.
3106
3107 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3108             Pedro Alves <palves@redhat.com>
3109
3110         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3111         producer_is_icc_lt_14.
3112         (producer_is_icc_lt_14): New function.
3113         (check_producer): Add code for checking version of ICC.
3114         (producer_is_icc): Move to producer.c.
3115         (read_structure_type): Restrict ICC workaround to ICC<14.
3116         * producer.c: Include selftest.h.
3117         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3118         New functions.
3119         * producer.h (producer_is_icc): New declaration.
3120
3121 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3122
3123         * Makefile.in (SFILES): Add producer.c.
3124         (COMMON_OBS): Add producer.o
3125         * amd64-tdep.c (producer.h): Add new include.
3126         * dwarf2read.c (producer.h): Add new include.
3127         * producer.c: New file.
3128         * producer.h: New file.
3129         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3130         producer.c.
3131         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3132         producer.h.
3133
3134 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3135
3136         * configure.ac: Search ncursesw before ncurses.
3137         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3138         * gdb_curses.h: Include <ncursesw/ncurses.h>
3139         * config.in, configure: Regenerate.
3140
3141 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3142
3143         PR gdb/22185
3144         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3145         obsolete.
3146         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3147         Remove i386sol2 support.
3148         * configure.nat <i386sol2>: Remove.
3149         <sol2-64>: Fold into ...
3150         <sol2>: ... this.
3151         Move common settings to default section.
3152         Add sol-thread.o.
3153         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3154         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3155         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3156         <i[34567]86-*-solaris*>: Remove.
3157         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3158
3159         * configure.ac: Remove wctype in libw check.
3160         (_MSE_INT_H): Don't define on Solaris 7-9.
3161         <solaris*>: Remove libthread_db.so.1 check.
3162         * configure: Regenerate.
3163         * config.in: Regenerate.
3164
3165         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3166         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3167         (gdb_ps_size_t): Remove.
3168         Use base types in users.
3169         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3170
3171         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3172
3173 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3174
3175         PR build/22206
3176         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3177         (adi_is_addr_mapped): Likewise.
3178         (PSR_ICC): Don't redefine.
3179         (PSR_IMPL): Likewise.
3180
3181 2017-09-25  Tom Tromey  <tom@tromey.com>
3182
3183         * regcache.c (regcache::dump): Use string_printf.
3184
3185 2017-09-25  Tom Tromey  <tom@tromey.com>
3186
3187         * regcache.c (class regcache_invalidator): New.
3188         (struct register_to_invalidate): Remove.
3189         (make_cleanup_regcache_invalidate): Remove.
3190         (regcache::raw_write): Use regcache_invalidator.
3191
3192 2017-09-25  Tom Tromey  <tom@tromey.com>
3193
3194         * spu-tdep.c (spu2ppu_sniffer): Update.
3195         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3196         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3197         Remove.
3198         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3199         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3200         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3201         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3202         (frame_pop): Update.
3203
3204 2017-09-25  Tom Tromey  <tom@tromey.com>
3205
3206         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3207         * regcache.h (regcache_xfree): Don't declare.
3208         * regcache.c (regcache_xfree): Remove.
3209         (do_regcache_xfree): Use delete.
3210         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3211         * linux-fork.c (free_fork): Use delete.
3212         (fork_save_infrun_state): Likewise.
3213         * jit.c (jit_dealloc_cache): Use delete.
3214         * infrun.c (discard_infcall_suspend_state): Use delete.
3215
3216 2017-09-25  Tom Tromey  <tom@tromey.com>
3217
3218         * regcache.h (regcache_xmalloc): Don't declare.
3219         (regcache_raw_set_cached_value): Update comment.
3220         * regcache.c (regcache_xmalloc): Remove.
3221         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3222         * jit.c (jit_frame_sniffer): Use new.
3223         * frame.c (frame_save_as_regcache): Use new.
3224
3225 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3226
3227         * NEWS: Advertise support for guarded-storage registers on IBM z.
3228
3229 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3230
3231         * s390-linux-nat.c (have_regset_gs): New static variable.
3232         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3233         control block and guarded-storage broadcast control regsets.
3234         (s390_read_description): Detect whether the target has
3235         guarded-storage support, return appropriate tdesc.
3236         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3237         (features/s390x-gs-linux64.c): Likewise.
3238         (struct gdbarch_tdep) <have_gs>: New field.
3239         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3240         (s390_gsbc_regset): New variables.
3241         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3242         and s390_gsbc_regset, if applicable.
3243         (s390_core_read_description): Check whether core file was from a
3244         target with guarded-storage support; include appropriate regsets.
3245         (s390_gdbarch_init): Add registers for guarded-storage support.
3246         (_initialize_s390_tdep): Initialize new target descriptions that
3247         include registers for guarded-storage support.
3248         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3249         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3250         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3251         (S390_NUM_REGS): Adjust macro definition.
3252         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3253         (tdesc_s390x_gs_linux64): New declarations.
3254
3255 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3256
3257         * features/s390-gs-linux64.xml: New file.
3258         * features/s390-gs.xml: New file.
3259         * features/s390-gsbc.xml: New file.
3260         * features/s390x-gs-linux64.xml: New file.
3261         * features/Makefile (WHICH): Add s390-gs-linux64 and
3262         s390x-gs-linux64.
3263         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3264         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3265         * features/s390-gs-linux64.c: New generated file.
3266         * features/s390x-gs-linux64.c: New file.
3267         * regformats/s390-gs-linux64.dat: New file.
3268         * regformats/s390x-gs-linux64.dat: New file.
3269
3270 2017-09-23  Tom Tromey  <tom@tromey.com>
3271
3272         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3273
3274 2017-09-22  Tom Tromey  <tom@tromey.com>
3275
3276         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3277         type to scoped_restore_tmpl.
3278         <scoped_input_handler>: Initialize m_quit_handler directly.
3279
3280 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3281
3282         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3283         (cd_command): Likewise.  Free "current_directory" before
3284         assigning to it.
3285         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3286         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3287         * top.c (gdb_dirbuf): Remove global declaration.
3288         * top.h (gdb_dirbuf): Likewise.
3289
3290 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3291
3292         * gnulib/aclocal.m4: Regenerate.
3293         * gnulib/config.in: Regenerate.
3294         * gnulib/configure: Regenerate.
3295         * gnulib/import/Makefile.am: Regenerate.
3296         * gnulib/import/Makefile.in: Regenerate.
3297         * gnulib/import/assure.h: New file.
3298         * gnulib/import/at-func.c: Likewise
3299         * gnulib/import/chdir-long.c: New file.
3300         * gnulib/import/chdir-long.h: New file.
3301         * gnulib/import/cloexec.c: New file.
3302         * gnulib/import/cloexec.h: New file.
3303         * gnulib/import/close.c: New file.
3304         * gnulib/import/closedir.c: New file.
3305         * gnulib/import/dirent-private.h: New file.
3306         * gnulib/import/dup-safer.c: New file.
3307         * gnulib/import/dup.c: New file.
3308         * gnulib/import/dup2.c: New file.
3309         * gnulib/import/error.c: New file.
3310         * gnulib/import/error.h: New file.
3311         * gnulib/import/exitfail.c: New file.
3312         * gnulib/import/exitfail.h: New file.
3313         * gnulib/import/fchdir.c: New file.
3314         * gnulib/import/fcntl.c: New file.
3315         * gnulib/import/fcntl.in.h: New file.
3316         * gnulib/import/fd-hook.c: New file.
3317         * gnulib/import/fd-hook.h: New file.
3318         * gnulib/import/fd-safer.c: New file.
3319         * gnulib/import/fdopendir.c: New file.
3320         * gnulib/import/filename.h: New file.
3321         * gnulib/import/filenamecat-lgpl.c: New file.
3322         * gnulib/import/filenamecat.h: New file.
3323         * gnulib/import/fstat.c: New file.
3324         * gnulib/import/fstatat.c: New file.
3325         * gnulib/import/getcwd-lgpl.c: New file.
3326         * gnulib/import/getcwd.c: New file.
3327         * gnulib/import/getdtablesize.c: New file.
3328         * gnulib/import/getlogin_r.c: New file.
3329         * gnulib/import/getprogname.c: New file.
3330         * gnulib/import/getprogname.h: New file.
3331         * gnulib/import/gettext.h: New file.
3332         * gnulib/import/glob-libc.h: New file.
3333         * gnulib/import/glob.c: New file.
3334         * gnulib/import/glob.in.h: New file.
3335         * gnulib/import/intprops.h: New file.
3336         * gnulib/import/m4/chdir-long.m4: New file.
3337         * gnulib/import/m4/close.m4: New file.
3338         * gnulib/import/m4/closedir.m4: New file.
3339         * gnulib/import/m4/d-ino.m4: New file.
3340         * gnulib/import/m4/d-type.m4: New file.
3341         * gnulib/import/m4/dup.m4: New file.
3342         * gnulib/import/m4/dup2.m4: New file.
3343         * gnulib/import/m4/error.m4: New file.
3344         * gnulib/import/m4/fchdir.m4: New file.
3345         * gnulib/import/m4/fcntl.m4: New file.
3346         * gnulib/import/m4/fcntl_h.m4: New file.
3347         * gnulib/import/m4/fdopendir.m4: New file.
3348         * gnulib/import/m4/filenamecat.m4: New file.
3349         * gnulib/import/m4/fstat.m4: New file.
3350         * gnulib/import/m4/fstatat.m4: New file.
3351         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3352         * gnulib/import/m4/getcwd-path-max.m4: New file.
3353         * gnulib/import/m4/getcwd.m4: New file.
3354         * gnulib/import/m4/getdtablesize.m4: New file.
3355         * gnulib/import/m4/getlogin_r.m4: New file.
3356         * gnulib/import/m4/getprogname.m4: New file.
3357         * gnulib/import/m4/glob.m4: New file.
3358         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3359         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3360         * gnulib/import/m4/mempcpy.m4: New file.
3361         * gnulib/import/m4/memrchr.m4: New file.
3362         * gnulib/import/m4/mode_t.m4: New file.
3363         * gnulib/import/m4/msvc-inval.m4: New file.
3364         * gnulib/import/m4/msvc-nothrow.m4: New file.
3365         * gnulib/import/m4/open.m4: New file.
3366         * gnulib/import/m4/openat.m4: New file.
3367         * gnulib/import/m4/opendir.m4: New file.
3368         * gnulib/import/m4/readdir.m4: New file.
3369         * gnulib/import/m4/realloc.m4: New file.
3370         * gnulib/import/m4/rewinddir.m4: New file.
3371         * gnulib/import/m4/save-cwd.m4: New file.
3372         * gnulib/import/m4/strdup.m4: New file.
3373         * gnulib/import/m4/strerror.m4: New file.
3374         * gnulib/import/m4/unistd-safer.m4: New file.
3375         * gnulib/import/mempcpy.c: New file.
3376         * gnulib/import/memrchr.c: New file.
3377         * gnulib/import/msvc-inval.c: New file.
3378         * gnulib/import/msvc-inval.h: New file.
3379         * gnulib/import/msvc-nothrow.c: New file.
3380         * gnulib/import/msvc-nothrow.h: New file.
3381         * gnulib/import/open.c: New file.
3382         * gnulib/import/openat-die.c: New file.
3383         * gnulib/import/openat-priv.h: New file.
3384         * gnulib/import/openat-proc.c: New file.
3385         * gnulib/import/openat.c: New file.
3386         * gnulib/import/openat.h: New file.
3387         * gnulib/import/opendir.c: New file.
3388         * gnulib/import/pipe-safer.c: New file.
3389         * gnulib/import/readdir.c: New file.
3390         * gnulib/import/realloc.c: New file.
3391         * gnulib/import/rewinddir.c: New file.
3392         * gnulib/import/save-cwd.c: New file.
3393         * gnulib/import/save-cwd.h: New file.
3394         * gnulib/import/strdup.c: New file.
3395         * gnulib/import/strerror-override.c: New file.
3396         * gnulib/import/strerror-override.h: New file.
3397         * gnulib/import/strerror.c: New file.
3398         * gnulib/import/unistd--.h: New file.
3399         * gnulib/import/unistd-safer.h: New file.
3400         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3401         "getcwd" and "glob".
3402         * ser-tcp.c: Undefine "close" before redefining it.
3403
3404 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3405
3406         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3407         get rid of res_val.
3408
3409 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3410
3411         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3412         <sol2,sparc>: Likewise.
3413         <sol2-64,i386>: Likewise.
3414
3415         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3416         -Wdeprecated-declarations on *-*-solaris*.
3417         * configure: Regenerate.
3418
3419         * procfs.c: Include "nat/inferior.h".
3420         (procfs_info_proc): Fix typo.
3421
3422 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3423
3424         * remote.c (vector): Include.
3425         (struct private_thread_info): Add field, thread_handle.
3426         (free_private_thread_info): Deallocate storage associated with
3427         thread handle.
3428         (get_private_info_thread): Initialize `thread_handle' field.
3429         (struct thread_item): Add field, thread_handle.
3430         (clear_threads_listing_context): Deallocate storage associated
3431         with thread handle.
3432         (start_thread): Add support for "handle" attribute.
3433         (thread_attributes): Add "handle".
3434         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3435         field.
3436         (remote_update_thread_list): Update thread_handle.
3437         (remote_thread_handle_to_thread_info): New function.
3438         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3439
3440 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3441
3442         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3443         function.
3444         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3445         * python/python-internal.h (thread_object_type): Declare.
3446
3447 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3448
3449         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3450         (target_thread_handle_to_thread_info): Declare.
3451         * target.c (target_thread_handle_to_thread_info): New function.
3452         * target-delegates.c: Regenerate.
3453         * gdbthread.h (find_thread_by_handle): Declare.
3454         * thread.c (find_thread_by_handle): New function.
3455         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3456         function.
3457         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3458
3459 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3460
3461         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3462
3463 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3464
3465         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3466
3467 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3468
3469         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3470         to gdb_target_obs.
3471
3472 2017-09-20  Tom Tromey  <tom@tromey.com>
3473
3474         * breakpoint.c (struct counted_command_line): Remove.
3475         (breakpoint_commands): Update.
3476         (alloc_counted_command_line, incref_counted_command_line)
3477         (decref_counted_command_line, do_cleanup_counted_command_line)
3478         (make_cleanup_decref_counted_command_line): Remove.
3479         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3480         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3481         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3482         (save_breakpoints): Update.
3483         * breakpoint.h (counted_command_line): Now a typedef to
3484         shared_ptr.
3485         (struct breakpoint) <commands>: Now a counted_command_line.
3486         (struct bpstats) <command>: Likewise.
3487
3488 2017-09-20  Tom Tromey  <tom@tromey.com>
3489
3490         * breakpoint.c (struct commands_info, do_map_commands_command):
3491         Remove.
3492         (commands_command_1): Update.
3493         (iterate_over_related_breakpoints): Take a function_view.
3494         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3495         (delete_command): Update.
3496         (map_breakpoint_numbers): Take a function_view.
3497         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3498         (disable_command): Update.
3499         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3500         (enable_command): Update.
3501         (struct disp_data, do_enable_breakpoint_disp)
3502         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3503         (do_map_enable_delete_breakpoint): Remove.
3504         (enable_once_command, enable_count_command, enable_delete_command)
3505         (delete_trace_variable_command): Update.
3506
3507 2017-09-20  Tom Tromey  <tom@tromey.com>
3508
3509         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3510         (bpstat_clear): Use delete.
3511         (bpstats): New constructors.
3512         (bpstat_copy, bpstat_stop_status): Use new.
3513         (dprintf_after_condition_true): Update.
3514         * breakpoint.h (bpstats::bpstats): Add constructors.
3515         (bpstats::~bpstats): Add destructor.
3516
3517 2017-09-20  Pedro Alves  <palves@redhat.com>
3518
3519         * eval.c (make_params): Delete, refactored as ...
3520         (class fake_method): ... this new type's ctor.
3521         (fake_method::~fake_method): New.
3522         (evaluate_subexp_standard): Use 'fake_method'.
3523
3524 2017-09-20  Tom Tromey  <tom@tromey.com>
3525
3526         * windows-nat.c (get_windows_debug_event, windows_wait)
3527         (do_initial_windows_stuff, windows_attach): Update.
3528         * utils.c (vwarning, internal_vproblem): Update.
3529         (ui_unregister_input_event_handler_cleanup)
3530         (prepare_to_handle_input): Remove.
3531         (class scoped_input_handler): New.
3532         (defaulted_query, prompt_for_continue): Update.
3533         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3534         Update.
3535         * top.c (undo_terminal_modifications_before_exit): Update.
3536         * target/target.h (target_terminal_init, target_terminal_inferior)
3537         (target_terminal_ours): Don't declare.
3538         (class target_terminal): New.
3539         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3540         (target_terminal_ours_for_output)
3541         (make_cleanup_restore_target_terminal): Don't declare.
3542         (target_terminal_info): Remove.
3543         * target.c (enum terminal_state, terminal_state): Remove.
3544         (target_terminal::terminal_state): Define.
3545         (target_terminal::init): Rename from target_terminal_init.
3546         (target_terminal::inferior): Rename from
3547         target_terminal_inferior.
3548         (target_terminal::ours): Rename from target_terminal_ours.
3549         (target_terminal::ours_for_output): Rename from
3550         target_terminal_ours_for_output.
3551         (target_terminal::info): New method.
3552         (cleanup_restore_target_terminal)
3553         (make_cleanup_restore_target_terminal): Remove.
3554         * solib.c (handle_solib_event): Update.
3555         * remote.c (remote_serial_quit_handler): Update.
3556         (remote_terminal_inferior, remote_wait_as): Update.
3557         * record-full.c (record_full_wait_1): Update.
3558         * nto-procfs.c (procfs_create_inferior): Update.
3559         * nat/fork-inferior.c (startup_inferior): Update.
3560         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3561         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3562         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3563         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3564         (mi_breakpoint_created, mi_breakpoint_deleted)
3565         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3566         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3567         (mi_user_selected_context_changed, report_initial_inferior):
3568         Update.
3569         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3570         (linux_nat_terminal_inferior): Update.
3571         * infrun.c (follow_fork_inferior)
3572         (handle_vfork_child_exec_or_exit, do_target_resume)
3573         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3574         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3575         Update.
3576         * inflow.c (child_terminal_init, info_terminal_command): Update.
3577         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3578         (attach_command): Update.
3579         * infcall.c (call_thread_fsm_should_stop): Update.
3580         * gnu-nat.c (gnu_attach): Update.
3581         * extension.c (struct active_ext_lang_state)
3582         (restore_active_ext_lang): Update.
3583         * exceptions.c (print_flush): Update.
3584         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3585         (struct quit_handler_cleanup_data, restore_quit_handler)
3586         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3587         Remove.
3588         * cp-support.c (gdb_demangle): Update.
3589         * breakpoint.c (update_inserted_breakpoint_locations)
3590         (insert_breakpoint_locations, handle_jit_event)
3591         (disable_breakpoints_in_unloaded_shlib): Update.
3592         * annotate.c (annotate_breakpoints_invalid)
3593         (annotate_frames_invalid): Update.
3594
3595 2017-09-20  Tom Tromey  <tom@tromey.com>
3596
3597         * main.c (catch_command_errors): Rename from
3598         catch_command_errors_const.
3599         (captured_main_1): Update.
3600
3601 2017-09-20  Pedro Alves  <palves@redhat.com>
3602
3603         * cli/cli-cmds.c (list_command): Use print_sal_location.
3604         (print_sal_location): New function.
3605         (ambiguous_line_spec): Use print_sal_location.
3606         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3607         * symtab.c (find_function_start_sal): Likewise.
3608         * symtab.h (symtab_and_line::symbol): New field.
3609
3610 2017-09-20  Pedro Alves  <palves@redhat.com>
3611
3612         * linespec.c (minsym_found): Handle non-text minsyms.
3613         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3614
3615 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3616
3617         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3618         backslash.
3619
3620 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3621
3622         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3623         vmovups instead vmovaps.
3624         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3625
3626 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3627
3628         * NEWS (Changes since GDB 8.0): Add starti.
3629         * infcmd.c (enum run_break): New.
3630         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3631         case.
3632         (run_command): Use enum run_how.
3633         (start_command): Likewise.
3634         (starti_command): New function.
3635         (RUN_ARGS_HELP): New macro.
3636         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3637         commands.  Add starti command.
3638
3639 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3640
3641         * Makefile.in (monitor.o): Remove the rule.
3642
3643 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3644
3645         * annotate.h (struct annotate_arg_emitter): Use
3646         DISABLE_COPY_AND_ASSIGN.
3647         * common/refcounted-object.h (refcounted_object): Likewise.
3648         * completer.h (struct completion_result): Likewise.
3649         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3650         * filename-seen-cache.h (filename_seen_cache): Likewise.
3651         * gdbcore.h (thread_section_name): Likewise.
3652         * gdb_regex.h (compiled_regex): Likewise.
3653         * gdbthread.h (scoped_restore_current_thread): Likewise.
3654         * inferior.h (scoped_restore_current_inferior): Likewise.
3655         * jit.c (jit_reader): Likewise.
3656         * linespec.h (struct linespec_result): Likewise.
3657         * mi/mi-parse.h (struct mi_parse): Likewise.
3658         * nat/fork-inferior.c (execv_argv): Likewise.
3659         * progspace.h (scoped_restore_current_program_space): Likewise.
3660         * python/python-internal.h (class gdbpy_enter): Likewise.
3661         * regcache.h (regcache): Likewise.
3662         * target-descriptions.c (struct tdesc_reg): Likewise.
3663         (struct tdesc_type): Likewise.
3664         (struct tdesc_feature): Likewise.
3665         * ui-out.h (ui_out_emit_type): Likewise.
3666
3667 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3668
3669         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3670         label abort_expression.
3671
3672 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3673
3674         * common/buffer.c (buffer_xml_printf): Adjust.
3675         * common/xml-utils.c (xml_escape_text): Change return type to
3676         std::string, update code accordingly.
3677         * common/xml-utils.h (xml_escape_text): Change return type to
3678         std::string.
3679         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3680         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3681         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3682         Adjust.
3683
3684 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3685
3686         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3687         (SUBDIR_UNITTESTS_OBS): Add new object file.
3688         * unittests/xml-utils-selftests.c: New file.
3689
3690 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3691
3692         * common/selftest.h (selftest): New struct/interface.
3693         (register_test): Add name parameter, add new overload.
3694         (run_tests): Add filter parameter.
3695         (for_each_selftest_ftype): New typedef.
3696         (for_each_selftest): New declaration.
3697         * common/selftest.c (tests): Change type to
3698         map<string, unique_ptr<selftest>>.
3699         (simple_selftest): New struct.
3700         (register_test): New function.
3701         (register_test): Add name parameter and use it.
3702         (run_tests): Add filter parameter and use it.  Add prints.
3703         Adjust to vector -> map change.
3704         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3705         registering selftests.
3706         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3707         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3708         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3709         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3710         * findvar.c (_initialize_findvar): Likewise.
3711         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3712         * maint.c (maintenance_selftest): Update call to run_tests.
3713         (maintenance_info_selftests): New function.
3714         (_initialize_maint_cmds): Register "maintenance info selftests"
3715         command.  Update "maintenance selftest" doc.
3716         * regcache.c (_initialize_regcache): Add names when registering
3717         selftests.
3718         * rust-exp.y (_initialize_rust_exp): Likewise.
3719         * selftest-arch.c (gdbarch_selftest): New struct.
3720         (gdbarch_tests): Remove.
3721         (register_test_foreach_arch): Add name parameter.  Call
3722         register_test.
3723         (tests_with_arch): Remove, move most content to
3724         gdbarch_selftest::operator().
3725         (_initialize_selftests_foreach_arch): Remove.
3726         * selftest-arch.h (register_test_foreach_arch): Add name
3727         parameter.
3728         (run_tests_with_arch): New declaration.
3729         * utils-selftests.c (_initialize_utils_selftests): Add names
3730         when registering selftests.
3731         * utils.c (_initialize_utils): Likewise.
3732         * unittests/array-view-selftests.c
3733         (_initialize_array_view_selftests): Likewise.
3734         * unittests/environ-selftests.c (_initialize_environ_selftests):
3735         Likewise.
3736         * unittests/function-view-selftests.c
3737         (_initialize_function_view_selftests): Likewise.
3738         * unittests/offset-type-selftests.c
3739         (_initialize_offset_type_selftests): Likewise.
3740         * unittests/optional-selftests.c
3741         (_initialize_optional_selftests): Likewise.
3742         * unittests/scoped_restore-selftests.c
3743         (_initialize_scoped_restore_selftests): Likewise.
3744         * NEWS: Document "maintenance selftest" and "maint info
3745         selftests".
3746
3747 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3748
3749         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3750         scoped_restore.
3751
3752 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3753
3754         * mi/mi-main.c (mi_load_progress): Make uiout variable
3755         a unique_ptr.
3756
3757 2017-09-15  Pedro Alves  <palves@redhat.com>
3758
3759         * compile/compile-c-types.c (convert_enum, convert_int)
3760         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3761
3762 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3763
3764         * dwarf2read.c (copy_string): Remove.
3765         (parse_macro_definition): Replace copy_string with savestring.
3766
3767 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3768
3769         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3770         gdb_target_obs.
3771         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3772         Likewise.
3773         (i[34567]86-*-linux*): Likewise.
3774
3775 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3776
3777         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3778         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3779         <stack>: Change type to std::vector.
3780         <stack_len, stack_allocated>: Remove.
3781         <grow_stack>: Remove.
3782         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3783         (dwarf_expr_context::~dwarf_expr_context): Remove.
3784         (dwarf_expr_context::grow_stack): Remove.
3785         (dwarf_expr_context::push): Adjust.
3786         (dwarf_expr_context::pop): Adjust.
3787         (dwarf_expr_context::fetch): Adjust.
3788         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3789         (dwarf_expr_context::stack_empty_p): Adjust.
3790         (dwarf_expr_context::execute_stack_op): Adjust.
3791
3792 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3793
3794         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3795         return type to bool.
3796         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3797
3798 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3799
3800         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3801         Change type to bool.
3802         (dwarf_stack_value) <in_stack_memory>: Likewise.
3803         (dwarf_expr_context) <push_address>: Change parameter type to
3804         bool.
3805         <fetch_in_stack_memory>: Change return type to bool.
3806         <push>: Change parameter type to bool.
3807         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3808         to bool.
3809         (dwarf_expr_context::push_address): Likewise.
3810         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3811         to bool.
3812         (dwarf_expr_context::execute_stack_op): Adjust.
3813         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3814
3815 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3816
3817         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3818         (struct dwarf_expr_context) <n_pieces>: Remove.
3819         <pieces>: Change type to std::vector.
3820         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3821         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3822         pieces.
3823         (dwarf_expr_context::add_piece): Adjust.
3824         * dwarf2loc.c (struct piece_closure): Initialize fields.
3825         <n_pieces>: Remove.
3826         <pieces>: Change type to std::vector.
3827         (allocate_piece_closure): Adjust, change parameter to
3828         std::vector rvalue and std::move it to piece_closure.
3829         (rw_pieced_value): Adjust.
3830         (check_pieced_synthetic_pointer): Adjust.
3831         (indirect_synthetic_pointer): Adjust.
3832         (coerce_pieced_ref): Adjust.
3833         (free_pieced_value_closure):  Adjust.  Use delete to free
3834         piece_closure.
3835         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3836         to allocate_piece_closure.
3837         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3838
3839 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3840
3841         * probe.h (probe_ops_cp): Remove typedef.
3842         (DEF_VEC_P (probe_ops_cp)): Remove.
3843         (all_probe_ops): Change type to std::vector.
3844         * probe.c (info_probes_for_ops): Adjust to vector change.
3845         (probe_linespec_to_ops): Likewise.
3846         (all_probe_ops): Change type to std::vector.
3847         (_initialize_probe): Adjust to vector change.
3848         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3849         * elfread.c (elf_get_probes): Likewise.
3850         * stap-probe.c (_initialize_stap_probe): Likewise.
3851
3852 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3853
3854         * probe.h (struct bound_probe): Define constructors.
3855         * probe.c (bound_probe_s): Remove typedef.
3856         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3857         (collect_probes): Change return type to std::vector, remove
3858         cleanup.
3859         (compare_probes): Return bool, change parameter type.  Change
3860         semantic to "less than".
3861         (gen_ui_out_table_header_info): Change parameter to std::vector
3862         and update.
3863         (exists_probe_with_pops): Likewise.
3864         (info_probes_for_ops): Update to std::vector change.
3865         (enable_probes_command): Likewise.
3866         (disable_probes_command): Likewise.
3867
3868 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3869
3870         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3871         vec to std::vector.
3872         * probe.c (parse_probes_in_pspace): Update.
3873         (find_probes_in_objfile): Update.
3874         (find_probe_by_pc): Update.
3875         (collect_probes): Update.
3876         (probe_any_get_probes): Update.
3877         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3878         return type to reference to std::vector.
3879         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3880         std::vector and update.
3881         (dtrace_process_dof): Likewise.
3882         (dtrace_get_probes): Likewise.
3883         * elfread.c (elf_get_probes): Change return type to std::vector,
3884         store an std::vector in bfd_data.
3885         (probe_key_free): Update to std::vector.
3886         * stap-probe.c (handle_stap_probe): Change parameter to
3887         std::vector and update.
3888         (stap_get_probes): Likewise.
3889         * symfile-debug.c (debug_sym_get_probes): Change return type to
3890         std::vector and update.
3891
3892 2017-09-11  Tom Tromey  <tom@tromey.com>
3893
3894         * breakpoint.c (program_breakpoint_here_p): Update.
3895         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3896         from make_show_memory_breakpoints_cleanup.  Return a
3897         scoped_restore_tmpl<int>.
3898         (restore_show_memory_breakpoints): Remove.
3899         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3900         * mem-break.c (memory_validate_breakpoint): Update.
3901         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3902         (ia64_memory_remove_breakpoint): Update.
3903         (ia64_breakpoint_from_pc): Update.
3904         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3905         from make_show_memory_breakpoints_cleanup.
3906
3907 2017-09-11  Tom Tromey  <tom@tromey.com>
3908
3909         * d-namespace.c (d_lookup_symbol): Use std::string.
3910         (find_symbol_in_baseclass): Likewise.
3911
3912 2017-09-11  Tom Tromey  <tom@tromey.com>
3913
3914         * ctf.c (ctf_start): Use std::string.
3915
3916 2017-09-11  Tom Tromey  <tom@tromey.com>
3917
3918         * ada-lang.c (is_known_support_routine): Update.
3919         (ada_unhandled_exception_name_addr_from_raise): Update.
3920         * guile/scm-frame.c (gdbscm_frame_name): Update.
3921         * python/py-frame.c (frapy_name): Update.
3922         (frapy_function): Update.
3923         * stack.h (find_frame_funname): Update.
3924         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3925         (print_frame): Update.
3926
3927 2017-09-11  Tom Tromey  <tom@tromey.com>
3928
3929         * findcmd.c (put_bits): Take a gdb::byte_vector.
3930         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3931         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3932         cleanups.
3933         (find_command): Update.
3934
3935 2017-09-11  Tom Tromey  <tom@tromey.com>
3936
3937         * cli/cli-script.c (class scoped_restore_hook_in): New.
3938         (clear_hook_in_cleanup): Remove.
3939         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3940         scoped_restore_hook_in.
3941
3942 2017-09-11  Tom Tromey  <tom@tromey.com>
3943
3944         * cli/cli-script.c (restore_interp): Remove.
3945         (read_command_lines): Use scoped_restore_interp.
3946         * interps.c (scoped_restore_interp::set_temp): Rename from
3947         interp_set_temp.
3948         * interps.h (class scoped_restore_interp): New.
3949         (interp_set_temp): Remove.
3950
3951 2017-09-11  Tom Tromey  <tom@tromey.com>
3952
3953         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3954         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3955         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3956         scoped_restore.
3957         (mi_cmd_break_insert_1): Update.
3958         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3959         scoped_restore.
3960
3961 2017-09-11  Tom Tromey  <tom@tromey.com>
3962
3963         * demangle.c (demangle_command): Update.
3964         * breakpoint.c (disable_command): Update.
3965         (enable_command): Update.
3966         (find_location_by_number): Make "number" const.  Use
3967         get_number_trailer.
3968         * cli/cli-utils.c (extract_arg): Return std::string.
3969         * probe.c (parse_probe_linespec): Update.  Change types.
3970         (collect_probes): Take string arguments.
3971         (parse_probe_linespec): Likewise.
3972         (info_probes_for_ops): Update.
3973         (enable_probes_command): Update.
3974         (disable_probes_command): Update.
3975         * break-catch-sig.c (catch_signal_split_args): Update.
3976         * mi/mi-parse.c (mi_parse): Update.
3977
3978 2017-09-11  Tom Tromey  <tom@tromey.com>
3979
3980         * language.h (language_enum): Make argument const.
3981         * language.c (language_enum): Make argument const.
3982
3983 2017-09-11  Tom Tromey  <tom@tromey.com>
3984
3985         * common/common-utils.h (skip_to_space): Remove macro, redeclare
3986         as function.
3987         (skip_to_space): Rename from skip_to_space_const.
3988         * common/common-utils.c (skip_to_space): New function.
3989         (skip_to_space): Rename from skip_to_space_const.
3990         * cli/cli-utils.h (get_number): Rename from get_number_const.
3991         (extract_arg): Rename from extract_arg_const.
3992         * cli/cli-utils.c (get_number): Rename from get_number_const.
3993         (extract_arg): Rename from extract_arg_const.
3994         (number_or_range_parser::get_number): Use ::get_number.
3995         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3996         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3997         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3998         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3999         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4000         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4001         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4002         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4003
4004 2017-09-11  Tom Tromey  <tom@tromey.com>
4005
4006         * python/python.c (do_start_initialization): Use
4007         py-event-types.def to initialize types.
4008         Define all object type structures.
4009         * python/python-internal.h: Don't declare event initialization
4010         functions.
4011         * python/py-threadevent.c (thread_event_object_type): Don't
4012         define.
4013         * python/py-stopevent.c (stop_event_object_type): Don't define.
4014         * python/py-signalevent.c (signal_event_object_type): Don't
4015         declare or define.
4016         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4017         (clear_objfiles_event_object_type): Don't declare or define.
4018         * python/py-infevents.c (inferior_call_pre_event_object_type)
4019         (inferior_call_post_event_object_type)
4020         (register_changed_event_object_type)
4021         (memory_changed_event_object_type): Don't declare or define.
4022         * python/py-inferior.c (new_thread_event_object_type)
4023         (new_inferior_event_object_type)
4024         (inferior_deleted_event_object_type): Don't declare or define.
4025         * python/py-exitedevent.c (exited_event_object_type): Don't
4026         declare or define.
4027         * python/py-evts.c (gdbpy_initialize_py_events): Use
4028         py-all-events.def.
4029         * python/py-events.h (thread_event_object_type): Don't declare.
4030         (events_object): Use py-all-events.def.
4031         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4032         py-event-types.def.
4033         * python/py-event-types.def: New file.
4034         * python/py-continueevent.c (create_continue_event_object): Don't
4035         declare or define.
4036         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4037         declare or define.
4038         * python/py-all-events.def: New file.
4039
4040 2017-09-11  Tom Tromey  <tom@tromey.com>
4041
4042         * python/py-threadevent.c (create_thread_event_object): Return
4043         gdbpy_ref.
4044         * python/py-stopevent.h (create_stop_event_object)
4045         (create_breakpoint_event_object, create_signal_event_object):
4046         Update.
4047         * python/py-stopevent.c (create_stop_event_object): Return
4048         gdbpy_ref.
4049         (emit_stop_event): Update.
4050         * python/py-signalevent.c (create_signal_event_object): Return
4051         gdbpy_ref.
4052         * python/py-infevents.c (create_inferior_call_event_object):
4053         Update.
4054         * python/py-event.h (create_event_object)
4055         (create_thread_event_object): Update.
4056         * python/py-event.c (create_event_object): Return gdbpy_ref.
4057         * python/py-continueevent.c: Return gdbpy_ref.
4058         * python/py-bpevent.c (create_breakpoint_event_object): Return
4059         gdbpy_ref.
4060
4061 2017-09-11  Tom Tromey  <tom@tromey.com>
4062
4063         PR python/15622:
4064         * NEWS: Add entry.
4065         * python/python.c (do_start_initialization): Initialize new event
4066         types.
4067         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4068         (gdbpy_initialize_inferior_deleted_event)
4069         (gdbpy_initialize_new_thread_event): Declare.
4070         * python/py-threadevent.c (create_thread_event_object): Add option
4071         "thread" parameter.
4072         * python/py-inferior.c (new_thread_event_object_type)
4073         (new_inferior_event_object_type)
4074         (inferior_deleted_event_object_type): Declare.
4075         (python_new_inferior, python_inferior_deleted): New functions.
4076         (add_thread_object): Emit new_thread event.
4077         (gdbpy_initialize_inferior): Attach new functions to corresponding
4078         observers.
4079         (new_thread, new_inferior, inferior_deleted): Define new event
4080         types.
4081         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4082         registries.
4083         * python/py-events.h (events_object) <new_inferior,
4084         inferior_deleted, new_thread>: New fields.
4085         * python/py-event.h (create_thread_event_breakpoint): Add optional
4086         "thread" parameter.
4087
4088 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4089
4090         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4091         check current_ui instead.
4092         (internal_vproblem): Likewise.
4093
4094 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4095
4096         * thread.c (print_thread_info_1): Remove unnecessary calls to
4097         uiout->is_mi_like_p.
4098
4099 2017-09-09  Tom Tromey  <tom@tromey.com>
4100
4101         * namespace.h (add_using_directive): Update.
4102         * namespace.c (add_using_directive): Change type of excludes to
4103         std::vector.
4104         * dwarf2read.c (read_import_statement): Use std::vector.
4105         (read_namespace): Update.
4106         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4107
4108 2017-09-09  Tom Tromey  <tom@tromey.com>
4109
4110         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4111
4112 2017-09-09  Tom Tromey  <tom@tromey.com>
4113
4114         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4115
4116 2017-09-09  Tom Tromey  <tom@tromey.com>
4117
4118         * stack.c (func_command): Use gdb::def_vector.
4119
4120 2017-09-09  Tom Tromey  <tom@tromey.com>
4121
4122         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4123         ui_out_emit_list, ui_out_emit_tuple.
4124         (mi_cmd_var_update): Likewise.
4125
4126 2017-09-09  Tom Tromey  <tom@tromey.com>
4127
4128         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4129         ui_out_redirect_pop.
4130         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4131         ui_out_redirect_pop.
4132         * utils.c (do_ui_out_redirect_pop)
4133         (make_cleanup_ui_out_redirect_pop): Remove.
4134         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4135         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4136         * ui-out.h (ui_out_redirect_pop): New class.
4137
4138 2017-09-09  Tom Tromey  <tom@tromey.com>
4139
4140         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4141         (list_available_thread_groups, mi_cmd_list_thread_groups)
4142         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4143         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4144         Likewise.
4145
4146 2017-09-09  Tom Tromey  <tom@tromey.com>
4147
4148         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4149         ui_out_emit_tuple.
4150
4151 2017-09-09  Tom Tromey  <tom@tromey.com>
4152
4153         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4154         * stack.c (print_frame): Use ui_out_emit_tuple.
4155         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4156         (info_spu_mailbox_command, info_spu_dma_command)
4157         (info_spu_proxydma_command): Likewise.
4158         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4159         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4160         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4161         ui_out_emit_tuple.
4162         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4163
4164 2017-09-09  Tom Tromey  <tom@tromey.com>
4165
4166         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4167         (class ui_out_emit_table): Update comment.
4168         * ui-out.c (do_cleanup_table_end)
4169         (make_cleanup_ui_out_table_begin_end): Remove.
4170         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4171         (info_spu_dma_cmdlist): Likewise.
4172         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4173         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4174         ui_out_emit_table.
4175
4176 2017-09-09  Tom Tromey  <tom@tromey.com>
4177
4178         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4179         ui_out_emit_list, gdb::optional.
4180
4181 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4182
4183         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4184         prototype.
4185         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4186         prototype.
4187         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4188         prototype.
4189         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4190         * ada-exp.y: Remove _initialize_ada_exp prototype.
4191         * ada-lang.c: Remove _initialize_ada_language prototype.
4192         * ada-tasks.c: Remove _initialize_tasks prototype.
4193         * addrmap.c: Remove _initialize_addrmap prototype.
4194         * agent.c: Remove _initialize_agent prototype.
4195         * aix-thread.c: Remove _initialize_aix_thread prototype.
4196         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4197         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4198         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4199         prototype.
4200         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4201         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4202         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4203         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4204         prototype.
4205         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4206         prototype.
4207         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4208         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4209         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4210         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4211         prototype.
4212         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4213         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4214         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4215         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4216         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4217         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4218         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4219         prototype.
4220         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4221         prototype.
4222         * annotate.c: Remove _initialize_annotate prototype.
4223         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4224         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4225         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4226         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4227         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4228         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4229         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4230         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4231         prototype.
4232         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4233         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4234         * auto-load.c: Remove _initialize_auto_load prototype.
4235         * auxv.c: Remove _initialize_auxv prototype.
4236         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4237         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4238         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4239         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4240         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4241         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4242         prototype.
4243         * break-catch-throw.c: Remove _initialize_break_catch_throw
4244         prototype.
4245         * breakpoint.c: Remove _initialize_breakpoint prototype.
4246         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4247         * btrace.c: Remove _initialize_btrace prototype.
4248         * charset.c: Remove _initialize_charset prototype.
4249         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4250         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4251         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4252         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4253         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4254         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4255         * coffread.c: Remove _initialize_coffread prototype.
4256         * compile/compile.c: Remove _initialize_compile prototype.
4257         * complaints.c: Remove _initialize_complaints prototype.
4258         * completer.c: Remove _initialize_completer prototype.
4259         * copying.awk: Remove _initialize_copying prototype.
4260         * copying.c: Regenerate.
4261         * core-regset.c: Remove _initialize_core_regset prototype.
4262         * corefile.c: Remove _initialize_core prototype.
4263         * corelow.c: Remove _initialize_corelow prototype.
4264         * cp-abi.c: Remove _initialize_cp_abi prototype.
4265         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4266         * cp-support.c: Remove _initialize_cp_support prototype.
4267         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4268         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4269         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4270         * ctf.c: Remove _initialize_ctf prototype.
4271         * d-lang.c: Remove _initialize_d_language prototype.
4272         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4273         prototype.
4274         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4275         * dbxread.c: Remove _initialize_dbxread prototype.
4276         * dcache.c: Remove _initialize_dcache prototype.
4277         * demangle.c: Remove _initialize_demangler prototype.
4278         * disasm-selftests.c: Remove _initialize_disasm_selftests
4279         prototype.
4280         * disasm.c: Remove _initialize_disasm prototype.
4281         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4282         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4283         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4284         prototype.
4285         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4286         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4287         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4288         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4289         * elfread.c: Remove _initialize_elfread prototype.
4290         * exec.c: Remove _initialize_exec prototype.
4291         * extension.c: Remove _initialize_extension prototype.
4292         * f-lang.c: Remove _initialize_f_language prototype.
4293         * f-valprint.c: Remove _initialize_f_valprint prototype.
4294         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4295         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4296         * filesystem.c: Remove _initialize_filesystem prototype.
4297         * findcmd.c: Remove _initialize_mem_search prototype.
4298         * fork-child.c: Remove _initialize_fork_child prototype.
4299         * frame-base.c: Remove _initialize_frame_base prototype.
4300         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4301         * frame.c: Remove _initialize_frame prototype.
4302         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4303         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4304         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4305         * gcore.c: Remove _initialize_gcore prototype.
4306         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4307         * gdbarch.c: Regenerate.
4308         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4309         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4310         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4311         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4312         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4313         * go-lang.c: Remove _initialize_go_language prototype.
4314         * go32-nat.c: Remove _initialize_go32_nat prototype.
4315         * guile/guile.c: Remove _initialize_guile prototype.
4316         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4317         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4318         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4319         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4320         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4321         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4322         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4323         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4324         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4325         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4326         prototype.
4327         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4328         prototype.
4329         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4330         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4331         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4332         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4333         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4334         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4335         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4336         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4337         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4338         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4339         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4340         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4341         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4342         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4343         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4344         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4345         prototype.
4346         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4347         prototype.
4348         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4349         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4350         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4351         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4352         * infcall.c: Remove _initialize_infcall prototype.
4353         * infcmd.c: Remove _initialize_infcmd prototype.
4354         * inferior.c: Remove _initialize_inferiors prototype.
4355         * inflow.c: Remove _initialize_inflow prototype.
4356         * infrun.c: Remove _initialize_infrun prototype.
4357         * interps.c: Remove _initialize_interpreter prototype.
4358         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4359         * jit.c: Remove _initialize_jit prototype.
4360         * language.c: Remove _initialize_language prototype.
4361         * linux-fork.c: Remove _initialize_linux_fork prototype.
4362         * linux-nat.c: Remove _initialize_linux_nat prototype.
4363         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4364         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4365         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4366         * m2-lang.c: Remove _initialize_m2_language prototype.
4367         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4368         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4369         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4370         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4371         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4372         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4373         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4374         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4375         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4376         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4377         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4378         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4379         * machoread.c: Remove _initialize_machoread prototype.
4380         * macrocmd.c: Remove _initialize_macrocmd prototype.
4381         * macroscope.c: Remove _initialize_macroscope prototype.
4382         * maint.c: Remove _initialize_maint_cmds prototype.
4383         * mdebugread.c: Remove _initialize_mdebugread prototype.
4384         * memattr.c: Remove _initialize_mem prototype.
4385         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4386         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4387         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4388         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4389         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4390         * microblaze-linux-tdep.c: Remove
4391         _initialize_microblaze_linux_tdep prototype.
4392         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4393         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4394         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4395         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4396         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4397         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4398         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4399         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4400         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4401         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4402         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4403         prototype.
4404         * mipsread.c: Remove _initialize_mipsread prototype.
4405         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4406         prototype.
4407         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4408         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4409         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4410         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4411         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4412         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4413         prototype.
4414         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4415         * nto-procfs.c: Remove _initialize_procfs prototype.
4416         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4417         * objc-lang.c: Remove _initialize_objc_language prototype.
4418         * objfiles.c: Remove _initialize_objfiles prototype.
4419         * observer.c: Remove observer_test_first_notification_function,
4420         observer_test_second_notification_function,
4421         observer_test_third_notification_function, and
4422         _initialize_observer prototypes.
4423         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4424         * osabi.c: Remove _initialize_gdb_osabi prototype.
4425         * osdata.c: Remove _initialize_osdata prototype.
4426         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4427         * parse.c: Remove _initialize_parse prototype.
4428         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4429         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4430         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4431         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4432         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4433         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4434         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4435         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4436         * printcmd.c: Remove _initialize_printcmd prototype.
4437         * probe.c: Remove _initialize_probe prototype.
4438         * proc-api.c: Remove _initialize_proc_api prototype.
4439         * proc-events.c: Remove _initialize_proc_events prototype.
4440         * proc-service.c: Remove _initialize_proc_service prototype.
4441         * procfs.c: Remove _initialize_procfs prototype.
4442         * psymtab.c: Remove _initialize_psymtab prototype.
4443         * python/python.c: Remove _initialize_python prototype.
4444         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4445         * record-btrace.c: Remove _initialize_record_btrace prototype.
4446         * record-full.c: Remove _initialize_record_full prototype.
4447         * record.c: Remove _initialize_record prototype.
4448         * regcache.c: Remove _initialize_regcache prototype.
4449         * reggroups.c: Remove _initialize_reggroup prototype.
4450         * remote-notif.c: Remove _initialize_notif prototype.
4451         * remote-sim.c: Remove _initialize_remote_sim prototype.
4452         * remote.c: Remove _initialize_remote prototype.
4453         * reverse.c: Remove _initialize_reverse prototype.
4454         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4455         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4456         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4457         prototype.
4458         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4459         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4460         * rust-exp.y: Remove _initialize_rust_exp prototype.
4461         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4462         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4463         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4464         * score-tdep.c: Remove _initialize_score_tdep prototype.
4465         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4466         prototype.
4467         * ser-go32.c: Remove _initialize_ser_dos prototype.
4468         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4469         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4470         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4471         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4472         * serial.c: Remove _initialize_serial prototype.
4473         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4474         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4475         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4476         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4477         * skip.c: Remove _initialize_step_skip prototype.
4478         * sol-thread.c: Remove _initialize_sol_thread prototype.
4479         * solib-aix.c: Remove _initialize_solib_aix prototype.
4480         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4481         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4482         * solib-frv.c: Remove _initialize_frv_solib prototype.
4483         * solib-spu.c: Remove _initialize_spu_solib prototype.
4484         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4485         * solib-target.c: Remove _initialize_solib_target prototype.
4486         * solib.c: Remove _initialize_solib prototype.
4487         * source.c: Remove _initialize_source prototype.
4488         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4489         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4490         prototype.
4491         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4492         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4493         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4494         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4495         prototype.
4496         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4497         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4498         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4499         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4500         prototype.
4501         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4502         prototype.
4503         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4504         prototype.
4505         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4506         prototype.
4507         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4508         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4509         prototype.
4510         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4511         prototype.
4512         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4513         prototype.
4514         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4515         prototype.
4516         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4517         prototype.
4518         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4519         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4520         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4521         * stabsread.c: Remove _initialize_stabsread prototype.
4522         * stack.c: Remove _initialize_stack prototype.
4523         * stap-probe.c: Remove _initialize_stap_probe prototype.
4524         * std-regs.c: Remove _initialize_frame_reg prototype.
4525         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4526         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4527         * symfile.c: Remove _initialize_symfile prototype.
4528         * symmisc.c: Remove _initialize_symmisc prototype.
4529         * symtab.c: Remove _initialize_symtab prototype.
4530         * target-dcache.c: Remove _initialize_target_dcache prototype.
4531         * target-descriptions.c: Remove _initialize_target_descriptions
4532         prototype.
4533         * thread.c: Remove _initialize_thread prototype.
4534         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4535         prototype.
4536         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4537         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4538         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4539         prototype.
4540         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4541         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4542         * tracefile.c: Remove _initialize_tracefile prototype.
4543         * tracepoint.c: Remove _initialize_tracepoint prototype.
4544         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4545         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4546         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4547         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4548         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4549         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4550         * tui/tui.c: Remove _initialize_tui prototype.
4551         * typeprint.c: Remove _initialize_typeprint prototype.
4552         * user-regs.c: Remove _initialize_user_regs prototype.
4553         * utils.c: Remove _initialize_utils prototype.
4554         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4555         * valarith.c: Remove _initialize_valarith prototype.
4556         * valops.c: Remove _initialize_valops prototype.
4557         * valprint.c: Remove _initialize_valprint prototype.
4558         * value.c: Remove _initialize_values prototype.
4559         * varobj.c: Remove _initialize_varobj prototype.
4560         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4561         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4562         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4563         * windows-nat.c: Remove _initialize_windows_nat,
4564         _initialize_check_for_gdb_ini, and _initialize_loadable
4565         prototypes.
4566         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4567         * xcoffread.c: Remove _initialize_xcoffread prototype.
4568         * xml-support.c: Remove _initialize_xml_support prototype.
4569         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4570         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4571         prototype.
4572         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4573         prototype.
4574         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4575
4576 2017-09-08  Keith Seitz  <keiths@redhat.com>
4577
4578         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4579         field.
4580
4581 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4582
4583         * f-valprint.c (f_val_print): Remove check for one byte
4584         sized integers. Remove printing of character type.
4585
4586 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4587             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4588             Bernhard Heckel  <bernhard.heckel@intel.com>
4589
4590         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4591         to maintain proper indentation when printing pointers/refs.
4592
4593 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4594
4595         GDB 8.0.1 released.
4596
4597 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4598
4599         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4600
4601 2017-09-05  Tom Tromey  <tom@tromey.com>
4602
4603         * parse.c (funcall_chain): Now a std::vector.
4604         (start_arglist, end_arglist): Simplify.
4605         (free_funcalls): Remove.
4606         (parse_exp_in_context_1): Remove cleanup.
4607
4608 2017-09-05  Tom Tromey  <tom@tromey.com>
4609
4610         * go-exp.y (go_parse): Don't create a cleanup.
4611
4612 2017-09-05  Tom Tromey  <tom@tromey.com>
4613
4614         * d-exp.y (PrimaryExpression): Use std::string.
4615         (d_parse): Don't create a cleanup.
4616
4617 2017-09-05  Tom Tromey  <tom@tromey.com>
4618
4619         * utils.c (do_clear_parser_state): Remove.
4620         (make_cleanup_clear_parser_state): Remove.
4621         * p-exp.y (pascal_parse): Use scoped_restore.
4622         * m2-exp.y (m2_parse): Use scoped_restore.
4623         * f-exp.y (f_parse): Use scoped_restore.
4624         * d-exp.y (d_parse): Use scoped_restore.
4625         * c-exp.y (c_parse): Use scoped_restore.
4626         * ada-exp.y (ada_parse): Use scoped_restore.
4627         * utils.h (make_cleanup_clear_parser_state): Remove.
4628
4629 2017-09-06  Keith Seitz  <keiths@redhat.com>
4630
4631         * dwarf2read.c (dw2_linkage_name_attr): New function.
4632         (dw2_linkage_name): New function.
4633         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4634         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4635         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4636
4637 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4638
4639         * config/djgpp/djconfig.sh: Correct shell portability issue.
4640
4641 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4642
4643         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4644
4645 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4646
4647         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4648         * NEWS: Mention new FreeBSD/mips native configuration.
4649         * configure.host: Add aarch64*-*-freebsd*.
4650         * configure.nat: Likewise.
4651         * aarch64-fbsd-nat.c: New file.
4652
4653 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4654
4655         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4656         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4657         * NEWS: Mention new FreeBSD/aarch64 target.
4658         * configure.tgt: Add aarch64*-*-freebsd*.
4659         * aarch64-fbsd-tdep.c: New file.
4660         * aarch64-fbsd-tdep.h: New file.
4661
4662 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4663
4664         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4665
4666 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4667
4668         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4669         of TLS symbols.
4670
4671 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4672
4673         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4674         call.
4675
4676 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4677
4678         * infrun.c (follow_exec): Call add_thread after
4679         target_find_description.
4680
4681 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4682
4683         * infrun.c (handle_inferior_event_1): When exec'ing, read
4684         stop_pc after follow_exec.
4685
4686 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4687
4688         * remote.c (process_g_packet): Update error message.
4689
4690 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4691
4692         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4693         targets.
4694
4695 2017-09-05  Pedro Alves  <palves@redhat.com>
4696
4697         * eval.c (eval_call, evaluate_funcall): New functions, factored
4698         out from ...
4699         (evaluate_subexp_standard): ... this.
4700
4701 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4702
4703         * amd64-tdep.c (amd64_target_description): Create target
4704         descriptions.
4705         (_initialize_amd64_tdep): Don't call functions
4706         initialize_tdesc_amd64_*.  Add self tests.
4707         * arch/amd64.c (amd64_create_target_description): Add parameter
4708         is_linux.  Call set_tdesc_osabi if is_linux is true.
4709         * arch/amd64.h (amd64_create_target_description): Update the
4710         declaration.
4711         * arch/i386.c (i386_create_target_description): Add parameter
4712         is_linux.  Call set_tdesc_osabi if is_linux is true.
4713         * arch/i386.h (i386_create_target_description): Update
4714         declaration.
4715         * configure.tgt: Add i386.o to gdb_target_obs.
4716         * features/Makefile (XMLTOC): Remove i386/*.xml.
4717         * features/i386/amd64-avx-avx512.c: Remove.
4718         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4719         * features/i386/amd64-avx-mpx.c: Remove.
4720         * features/i386/amd64-avx.c: Remove.
4721         * features/i386/amd64-mpx.c: Remove.
4722         * features/i386/amd64.c: Remove.
4723         * features/i386/i386-avx-avx512.c: Remove.
4724         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4725         * features/i386/i386-avx-mpx.c: Remove.
4726         * features/i386/i386-avx.c: Remove.
4727         * features/i386/i386-mmx.c: Remove.
4728         * features/i386/i386-mpx.c: Remove.
4729         * features/i386/i386.c: Remove.
4730         * i386-tdep.c: Don't include features/i386/i386*.c., include
4731         target-descriptions.h and arch/i386.h.
4732         (i386_target_description): Create target descriptions.
4733         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4734         functions.  Do self tests.
4735
4736 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4737
4738         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4739         * features/i386/amd64-avx-avx512-linux.c: Removed.
4740         * features/i386/amd64-avx-linux.c: Removed.
4741         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4742         * features/i386/amd64-avx-mpx-linux.c: Removed.
4743         * features/i386/amd64-linux.c: Removed.
4744         * features/i386/amd64-mpx-linux.c: Removed.
4745         * features/i386/x32-avx-avx512-linux.c: Removed.
4746         * features/i386/x32-avx-linux.c: Removed.
4747         * features/i386/x32-linux.c: Removed.
4748
4749 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4750
4751         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4752         features/i386/*.c.
4753         (amd64_linux_read_description): Call
4754         amd64_create_target_description.
4755         * arch/amd64.c: New file.
4756         * arch/amd64.h: New file.
4757         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4758         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4759
4760 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4761
4762         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4763         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4764         (amd64_linux_read_description): Create target descriptions.
4765         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4766         functions.  Add unit tests.
4767         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4768         x32-core.xml.
4769         * features/i386/64bit-avx.c: Generated.
4770         * features/i386/64bit-avx512.c: Generated.
4771         * features/i386/64bit-core.c: Generated.
4772         * features/i386/64bit-linux.c: Generated.
4773         * features/i386/64bit-mpx.c: Generated.
4774         * features/i386/64bit-pkeys.c: Generated.
4775         * features/i386/64bit-segments.c: Generated.
4776         * features/i386/64bit-sse.c: Generated.
4777         * features/i386/x32-core.c: Generated.
4778         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4779         c files for amd64-linux and x32-linux.
4780
4781 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4782
4783         * amd64-linux-tdep.c (amd64_linux_read_description): New
4784         function.
4785         (amd64_linux_core_read_description): Call
4786         amd64_linux_read_description.
4787         (amd64_linux_init_abi): Likewise.
4788         (amd64_x32_linux_init_abi): Likewise.
4789         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4790         * x86-linux-nat.c (x86_linux_read_description): Call
4791         amd64_linux_read_description.
4792
4793 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4794
4795         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4796         comments.
4797
4798 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4799
4800         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4801         * features/i386/i386-avx-avx512-linux.c: Remove.
4802         * features/i386/i386-avx-linux.c: Remove.
4803         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4804         * features/i386/i386-avx-mpx-linux.c: Remove.
4805         * features/i386/i386-linux.c: Remove.
4806         * features/i386/i386-mmx-linux.c: Remove.
4807         * features/i386/i386-mpx-linux.c: Remove.
4808
4809 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4810
4811         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4812         (SFILES): Add arch/i386.c.
4813         (HFILES_NO_SRCDIR): Add arch/i386.h.
4814         * arch/i386.c: New file.
4815         * arch/i386.h: New file.
4816         * arch/tdesc.h (allocate_target_description): Declare.
4817         (set_tdesc_architecture): Declare.
4818         (set_tdesc_osabi): Declare.
4819         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4820         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4821         include arch/i386.h.
4822         (i386_linux_read_description): Remove code and call
4823         i386_create_target_description.
4824         (set_tdesc_architecture): New function.
4825         (set_tdesc_osabi): New function.
4826         * target-descriptions.h (allocate_target_description): Remove.
4827
4828 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4829
4830         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4831         * target-descriptions.c (tdesc_create_feature): Likewise, and
4832         adjust code.
4833         * features/i386/32bit-avx.c: Re-generated.
4834         * features/i386/32bit-avx512.c: Re-generated.
4835         * features/i386/32bit-core.c: Re-generated.
4836         * features/i386/32bit-linux.c: Re-generated.
4837         * features/i386/32bit-mpx.c: Re-generated.
4838         * features/i386/32bit-pkeys.c: Re-generated.
4839         * features/i386/32bit-sse.c: Re-generated.
4840
4841 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4842
4843         * regformats/regdef.h (struct reg): Override operator == and !=.
4844
4845 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4846
4847         * arch/tdesc.h: New file.
4848         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4849         * target-descriptions.c: Update comments.
4850         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4851         declarations.
4852         * features/i386/32bit-avx.c: Re-generated.
4853         * features/i386/32bit-avx512.c: Re-generated.
4854         * features/i386/32bit-core.c: Re-generated.
4855         * features/i386/32bit-linux.c: Re-generated.
4856         * features/i386/32bit-mpx.c: Re-generated.
4857         * features/i386/32bit-pkeys.c: Re-generated.
4858         * features/i386/32bit-sse.c: Re-generated.
4859
4860 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4861
4862         * regformats/regdat.sh: Update generated code.
4863
4864 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4865
4866         * regformats/regdat.sh: Adjust code order.
4867
4868 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4869
4870         * expprint.c (dump_subexp_body_standard): Use constant format
4871         string in fprintf_filtered call.
4872
4873 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4874
4875         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4876         NetBSD/i386.
4877         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4878
4879 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4880
4881         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4882
4883 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4884
4885         * bsd-kvm.o: Define _KMEMUSER.
4886         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4887         * configure: Regenerate.
4888
4889 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4890
4891         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4892         * i386-fbsd-nat.c: Likewise.
4893
4894 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4895
4896         * unittests/array-view-selftests.c: Add include of <array>.
4897
4898 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4899
4900         * spu-tdep.c (flush_ea_cache): Add missing argument to
4901         call_function_by_hand.
4902
4903 2017-09-04  Pedro Alves  <palves@redhat.com>
4904
4905         * NEWS (Safer support for debugging with no debug info): New.
4906
4907 2017-09-04  Pedro Alves  <palves@redhat.com>
4908
4909         * c-exp.y (function_method, function_method_void): Add current
4910         instance flags to TYPE_INSTANCE.
4911         * dwarf2read.c (check_modifier): New.
4912         (compute_delayed_physnames): Assert that only C++ adds delayed
4913         physnames.  Mark fn_fields as const/volatile depending on
4914         physname.
4915         * eval.c (make_params): New type_instance_flags parameter.  Use
4916         it as the new type's instance flags.
4917         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4918         flags element and pass it to make_params.
4919         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4920         instance flags element.
4921         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4922         * gdbtypes.h: Include "enum-flags.h".
4923         (type_instance_flags): New enum-flags type.
4924         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4925         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4926         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4927         (follow_type_instance_flags): New function.
4928         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4929         * parser-defs.h (follow_type_instance_flags): Declare.
4930         * valops.c (value_struct_elt_for_reference): const/volatile must
4931         match too.
4932
4933 2017-09-04  Pedro Alves  <palves@redhat.com>
4934
4935         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4936         function/method scopes; lookup the nested name as a function local
4937         static variable.
4938
4939 2017-09-04  Pedro Alves  <palves@redhat.com>
4940
4941         (%type <voidval>): Add function_method.
4942         * c-exp.y (exp): New production for calls with no arguments.
4943         (function_method, function_method_void_or_typelist): New
4944         productions.
4945         (exp): New production for "method()::static_var".
4946         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4947         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4948         Handle OP_FUNC_STATIC_VAR.
4949         * parse.c (operator_length_standard):
4950         Handle OP_FUNC_STATIC_VAR.
4951
4952 2017-09-04  Pedro Alves  <palves@redhat.com>
4953
4954         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4955         handling.
4956         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4957         Ditto.
4958         * parse.c (operator_length_standard, operator_check_standard):
4959         Ditto.
4960         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4961
4962 2017-09-04  Pedro Alves  <palves@redhat.com>
4963
4964         * ax-gdb.c: Include "typeprint.h".
4965         (gen_expr_for_cast): New function.
4966         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4967         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4968         type is unknown.
4969         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4970         nodebug_data_symbol.
4971         * eval.c: Include "typeprint.h".
4972         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4973         Error out if symbol has unknown type.
4974         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4975         evaluate_subexp_for_cast.
4976         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4977         OP_VAR_MSYM_VALUE.
4978         (evaluate_subexp_for_cast): New function.
4979         * gdbtypes.c (init_nodebug_var_type): New function.
4980         (objfile_type): Use it to initialize types of variables with no
4981         debug info.
4982         * typeprint.c (error_unknown_type): New.
4983         * typeprint.h (error_unknown_type): New declaration.
4984         * compile/compile-c-types.c (convert_type_basic): Handle
4985         TYPE_CODE_ERROR; warn and fallback to int for variables with
4986         unknown type.
4987
4988 2017-09-04  Pedro Alves  <palves@redhat.com>
4989
4990         * eval.c (evaluate_var_value): New function, factored out from ...
4991         (evaluate_subexp_standard): ... here.
4992
4993 2017-09-04  Pedro Alves  <palves@redhat.com>
4994
4995         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4996         Remove useless assignments to 'op'.
4997
4998 2017-09-04  Pedro Alves  <palves@redhat.com>
4999
5000         * eval.c (eval_skip_value): New function.
5001         (evaluate_subexp_standard): Use it.
5002
5003 2017-09-04  Pedro Alves  <palves@redhat.com>
5004
5005         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5006         function name from symbol/minsym and pass it to
5007         error_call_unknown_return_type.
5008
5009 2017-09-04  Pedro Alves  <palves@redhat.com>
5010
5011         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5012         * ax-gdb.c (gen_msym_var_ref): New function.
5013         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5014         * eval.c (evaluate_var_msym_value): New function.
5015         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5016         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5017         to call_function_by_hand.
5018         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5019         Handle OP_VAR_MSYM_VALUE.
5020         (union exp_element) <msymbol>: New field.
5021         * minsyms.h (struct type): Forward declare.
5022         (find_minsym_type_and_address): Declare.
5023         * parse.c (write_exp_elt_msym): New function.
5024         (write_exp_msymbol): Delete, refactored as ...
5025         (find_minsym_type_and_address): ... this new function.
5026         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5027         (operator_length_standard, operator_check_standard): Handle
5028         OP_VAR_MSYM_VALUE.
5029         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5030
5031 2017-09-04  Pedro Alves  <palves@redhat.com>
5032
5033         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5034         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5035         unknown.
5036         * ada-typeprint.c (print_func_type): Handle functions with unknown
5037         return type.
5038         * c-typeprint.c (c_type_print_base): Handle functions and methods
5039         with unknown return type.
5040         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5041         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5042         * compile/compile-c-types.c: Include "objfiles.h".
5043         (convert_func): For functions with unknown return type, warn and
5044         default to int.
5045         * compile/compile-object-run.c (compile_object_run): Adjust call
5046         to call_function_by_hand_dummy.
5047         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5048         call_function_by_hand.
5049         * eval.c (evaluate_subexp_standard): Adjust calls to
5050         call_function_by_hand.  Handle functions and methods with unknown
5051         return type.  Pass expect_type to call_function_by_hand.
5052         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5053         return type.
5054         * gcore.c (call_target_sbrk): Adjust call to
5055         call_function_by_hand.
5056         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5057         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5058         an integer address type instead of nodebug.
5059         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5060         call_function_by_hand.
5061         * infcall.c (error_call_unknown_return_type): New function.
5062         (call_function_by_hand): New "default_return_type" parameter.
5063         Pass it down.
5064         (call_function_by_hand_dummy): New "default_return_type"
5065         parameter.  Use it instead of defaulting to int.  If there's no
5066         default and the return type is unknown, throw an error.  If
5067         there's a default return type, and the called function has no
5068         debug info, then assume the function is prototyped.
5069         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5070         New "default_return_type" parameter.
5071         (error_call_unknown_return_type): New declaration.
5072         * linux-fork.c (call_lseek): Cast return type of lseek.
5073         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5074         call_function_by_hand.
5075         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5076         calls to call_function_by_hand.
5077         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5078         return type.
5079         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5080         (value_nsstring, print_object_command): Adjust calls to
5081         call_function_by_hand.
5082         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5083         functions with unknown return type.
5084         (pascal_type_print_func_varspec_suffix): New function.
5085         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5086         TYPE_CODE_METHOD>: Use it.
5087         * python/py-value.c (valpy_call): Adjust call to
5088         call_function_by_hand.
5089         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5090         call_function_by_hand.
5091         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5092         call_function_by_hand.
5093         * valops.c (value_allocate_space_in_inferior): Adjust call to
5094         call_function_by_hand.
5095         * typeprint.c (type_print_unknown_return_type): New function.
5096         * typeprint.h (type_print_unknown_return_type): New declaration.
5097
5098 2017-09-04  Pedro Alves  <palves@redhat.com>
5099
5100         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5101         types with more than one parameter as prototyped.
5102
5103 2017-09-04  Pedro Alves  <palves@redhat.com>
5104
5105         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5106         (disassemble_command): Use gdb_disassembly_flags instead of bare
5107         int.
5108         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5109         (dump_insns, do_mixed_source_and_assembly_deprecated)
5110         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5111         Use gdb_disassembly_flags instead of bare int.
5112         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5113         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5114         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5115         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5116         (enum gdb_disassembly_flag): ... values of this new enumeration.
5117         (gdb_disassembly_flags): Define.
5118         (gdb_disassembly)
5119         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5120         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5121         gdb_disassembly_flags instead of bare int.
5122         * record-btrace.c (btrace_insn_history)
5123         (record_btrace_insn_history, record_btrace_insn_history_range)
5124         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5125         instead of bare int.
5126         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5127         Use gdb_disassembly_flags instead of bare int.
5128         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5129         Define.
5130         * target-delegates.c: Regenerate.
5131         * target.c (target_insn_history, target_insn_history_from)
5132         (target_insn_history_range): Use gdb_disassembly_flags instead of
5133         bare int.
5134         * target.h: Include "disasm.h".
5135         (struct target_ops) <to_insn_history, to_insn_history_from,
5136         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5137         int.
5138         (target_insn_history, target_insn_history_from)
5139         (target_insn_history_range): Use gdb_disassembly_flags instead of
5140         bare int.
5141
5142 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5143
5144         * cli/cli-script.c (build_command_line): For if/while commands,
5145         check whether args is empty.
5146
5147 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5148
5149         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5150         (enum command_control_type): Likewise.
5151         (struct command_line): Likewise.
5152         (free_command_lines): Likewise.
5153         (struct command_lines_deleter): Likewise.
5154         (command_line_up): Likewise.
5155         (read_command_lines): Likewise.
5156         (read_command_lines_1): Likewise.
5157         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5158         (enum command_control_type): Likewise.
5159         (struct command_line): Likewise.
5160         (free_command_lines): Likewise.
5161         (struct command_lines_deleter): Likewise.
5162         (command_line_up): Likewise.
5163         (read_command_lines): Likewise.
5164         (read_command_lines_1): Likewise.
5165         * breakpoint.h: Include cli/cli-script.h.
5166         * extension-priv.h: Likewise.
5167         * gdbcmd.h: Likewise.
5168
5169 2017-09-04  Pedro Alves  <palves@redhat.com>
5170
5171         * ada-lang.c (is_known_support_routine): Move sal declaration to
5172         where it is initialized.
5173         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5174         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5175         (clear_command, update_static_tracepoint): Remove init_sal
5176         references.  Move declarations closer to initializations.
5177         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5178         initializations.
5179         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5180         references.  Move sal declarations closer to initializations.
5181         * frame.c (find_frame_sal): Return a symtab_and_line via function
5182         return instead of output parameter.  Remove init_sal references.
5183         * frame.h (find_frame_sal): Return a symtab_and_line via function
5184         return instead of output parameter.
5185         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5186         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5187         instead of memset.
5188         (gdbscm_find_pc_line): Remove init_sal reference.
5189         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5190         references.  Move declarations closer to initializations.
5191         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5192         initializations.
5193         (finish_backward): Remove init_sal references.  Move declarations
5194         closer to initializations.
5195         * infrun.c (process_event_stop_test, handle_step_into_function)
5196         (insert_hp_step_resume_breakpoint_at_frame)
5197         (insert_step_resume_breakpoint_at_caller): Likewise.
5198         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5199         (symbol_to_sal): Likewise.
5200         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5201         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5202         to its initialization.
5203         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5204         init_sal references.  Move declarations closer to initializations.
5205         * source.c (get_current_source_symtab_and_line): Remove brace
5206         initialization.
5207         (set_current_source_symtab_and_line): Now takes the sal by const
5208         reference.  Remove brace initialization.
5209         (line_info): Remove init_sal reference.
5210         * source.h (set_current_source_symtab_and_line): Now takes a
5211         symtab_and_line via const reference.
5212         * stack.c (set_current_sal_from_frame): Adjust.
5213         (print_frame_info): Adjust.
5214         (get_last_displayed_sal): Return the sal via function return
5215         instead of via output parameter.  Simplify.
5216         (frame_info): Adjust.
5217         * stack.h (get_last_displayed_sal): Return the sal via function
5218         return instead of via output parameter.
5219         * symtab.c (init_sal): Delete.
5220         (find_pc_sect_line): Remove init_sal references.  Move
5221         declarations closer to initializations.
5222         (find_function_start_sal): Remove init_sal references.  Move
5223         declarations closer to initializations.
5224         * symtab.h (struct symtab_and_line): In-class initialize all
5225         fields.
5226         * tracepoint.c (set_traceframe_context)
5227         (print_one_static_tracepoint_marker): Remove init_sal references.
5228         Move declarations closer to initializations.
5229         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5230         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5231         declarations closer to initializations.
5232         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5233         init_sal references.  Adjust.
5234
5235 2017-09-04  Pedro Alves  <palves@redhat.com>
5236
5237         * ax-gdb.c (agent_command_1): Use range-for.
5238         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5239         * breakpoint.c: Include "common/array-view.h".
5240         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5241         parameter from struct symtabs_and_lines to
5242         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5243         (breakpoint_sals_to_pc): Change sals parameter from struct
5244         symtabs_and_lines to std::vector reference.
5245         (check_fast_tracepoint_sals): Change sals parameter from struct
5246         symtabs_and_lines to std::array_view.  Use range-for.
5247         (decode_static_tracepoint_spec): Return a std::vector instead of
5248         symtabs_and_lines.  Update.
5249         (create_breakpoint): Update.
5250         (break_range_command, until_break_command, clear_command): Update.
5251         (base_breakpoint_decode_location, bkpt_decode_location)
5252         (bkpt_probe_create_sals_from_location)
5253         (bkpt_probe_decode_location, tracepoint_decode_location)
5254         (tracepoint_probe_decode_location)
5255         (strace_marker_create_sals_from_location): Return a std::vector
5256         instead of symtabs_and_lines.
5257         (strace_marker_create_breakpoints_sal): Update.
5258         (strace_marker_decode_location): Return a std::vector instead of
5259         symtabs_and_lines.  Update.
5260         (update_breakpoint_locations): Change struct symtabs_and_lines
5261         parameters to gdb::array_view.  Adjust.
5262         (location_to_sals): Return a std::vector instead of
5263         symtabs_and_lines.  Update.
5264         (breakpoint_re_set_default): Use std::vector instead of struct
5265         symtabs_and_lines.
5266         (decode_location_default): Return a std::vector instead of
5267         symtabs_and_lines.  Update.
5268         * breakpoint.h: Include "common/array-view.h".
5269         (struct breakpoint_ops) <decode_location>: Now returns a
5270         std::vector instead of returning a symtabs_and_lines via output
5271         parameter.
5272         (update_breakpoint_locations): Change sals parameters to use
5273         gdb::array_view.
5274         * cli/cli-cmds.c (edit_command, list_command): Update to use
5275         std::vector and gdb::array_view.
5276         (ambiguous_line_spec): Adjust to use gdb::array_view and
5277         range-for.
5278         (compare_symtabs): Rename to ...
5279         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5280         const reference and adjust.
5281         (filter_sals): Rewrite using std::vector and standard algorithms.
5282         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5283         (jump_command): Update to use std::vector.
5284         * linespec.c (struct linespec_state) <canonical_names>: Update
5285         comment.
5286         (add_sal_to_sals_basic): Delete.
5287         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5288         (decode_line_2, create_sals_line_offset)
5289         (convert_address_location_to_sals, convert_linespec_to_sals)
5290         (convert_explicit_location_to_sals, parse_linespec)
5291         (event_location_to_sals, decode_line_full, decode_line_1)
5292         (decode_line_with_current_source)
5293         (decode_line_with_last_displayed, decode_objc)
5294         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5295         (linespec_result::~linespec_result): Adjust to use std::vector
5296         instead of symtabs_and_lines.
5297         * linespec.h (linespec_sals::sals): Now a std::vector.
5298         (struct linespec_result): Use std::vector, bool, and in-class
5299         initialization.
5300         (decode_line_1, decode_line_with_current_source)
5301         (decode_line_with_last_displayed): Return std::vector.
5302         * macrocmd.c (info_macros_command): Use std::vector.
5303         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5304         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5305         std::vector.
5306         * probe.h (parse_probes): Return a std::vector.
5307         * python/python.c (gdbpy_decode_line): Use std::vector and
5308         gdb::array_view.
5309         * source.c (select_source_symtab, line_info): Use std::vector.
5310         * stack.c (func_command): Use std::vector.
5311         * symtab.h (struct symtabs_and_lines): Delete.
5312         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5313
5314 2017-09-04  Pedro Alves  <palves@redhat.com>
5315
5316         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5317         unittests/array-view-selftests.c.
5318         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5319         * common/array-view.h: New file.
5320         * unittests/array-view-selftests.c: New file.
5321
5322 2017-09-04  Pedro Alves  <palves@redhat.com>
5323
5324         * cli/cli-cmds.c (edit_command): Pass message to
5325         ambiguous_line_spec.
5326         (list_command): Pass message to ambiguous_line_spec.  Say
5327         "first"/"last" instead of "start" and "end" to be consistent with
5328         the manual.
5329         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5330         them to print formatted message.
5331
5332 2017-09-04  Pedro Alves  <palves@redhat.com>
5333
5334         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5335         ftrace_update_insns by reference instead of pointer.
5336
5337 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5338
5339         * i386-go32-tdep.c: Include x86-xstate.h.
5340         (i386_go32_init_abi): Call i386_target_description.
5341         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5342         if xcr0 is X86_XSTATE_X87_MASK.
5343         * i386-tdep.h (tdesc_i386): Remove the declaration.
5344         (tdesc_i386_mmx): Likewise.
5345
5346 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5347
5348         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5349         X86_XSTATE_SSE_MASK instead of 0.
5350
5351 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5352
5353         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5354         i386_target_description.
5355         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5356         i386_target_description.
5357         * i386-tdep.c (i386_gdbarch_init): Likewise.
5358
5359 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5360
5361         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5362         (x86_darwin_init_abi_64): Call amd64_target_description.
5363         * amd64-dicos-tdep.c: Likewise.
5364         * amd64-fbsd-nat.c: Likewise.
5365         * amd64-fbsd-tdep.c: Likewise.
5366         * amd64-nbsd-tdep.c: Likewise.
5367         * amd64-obsd-tdep.c: Likewise.
5368         * amd64-sol2-tdep.c: Likewise.
5369         * amd64-windows-tdep.c: Likewise.
5370         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5371
5372 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5373
5374         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5375         (btrace_function) <insn>: Change type to use std::vector.
5376         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5377         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5378         ftrace_update_insns, ftrace_compute_global_level_offset,
5379         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5380         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5381         change to std::vector.
5382         (ftrace_update_insns): Adjust to change to std::vector, change
5383         type of INSN parameter.
5384         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5385         * record-btrace.c (btrace_call_history_insn_range,
5386         btrace_compute_src_line_range,
5387         record_btrace_frame_prev_register): Adjust to change to
5388         std::vector.
5389         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5390         to change to std::vector.
5391
5392 2017-09-03  Tom Tromey  <tom@tromey.com>
5393
5394         * corefile.c (reopen_exec_file): Use std::string.
5395
5396 2017-09-03  Tom Tromey  <tom@tromey.com>
5397
5398         * compile/compile.c (compile_register_name_mangled): Return
5399         std::string.
5400         * compile/compile-loc2c.c (pushf_register_address): Update.
5401         (pushf_register): Update.
5402         * compile/compile-c-types.c (convert_array): Update.
5403         * compile/compile-c-symbols.c (generate_vla_size): Update.
5404         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5405         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5406         (convert_one_symbol): Update.
5407         (generate_c_for_for_one_variable): Update.
5408         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5409         std::string.
5410         (generate_register_struct): Update.
5411         * compile/compile-internal.h (c_get_range_decl_name): Return a
5412         std::string.
5413         (compile_register_name_mangled): Return std::string.
5414
5415 2017-09-03  Tom Tromey  <tom@tromey.com>
5416
5417         * utils.c (perror_string): Return a std::string.
5418         (throw_perror_with_name, perror_warning_with_name): Update.
5419
5420 2017-09-03  Tom Tromey  <tom@tromey.com>
5421
5422         * demangle.c (demangle_command): Use std::string,
5423         unique_xmalloc_ptr.
5424
5425 2017-09-03  Tom Tromey  <tom@tromey.com>
5426
5427         * cli/cli-setshow.c (do_set_command): Use std::string.
5428
5429 2017-09-03  Tom Tromey  <tom@tromey.com>
5430
5431         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5432
5433 2017-09-03  Tom Tromey  <tom@tromey.com>
5434
5435         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5436
5437 2017-09-03  Tom Tromey  <tom@tromey.com>
5438
5439         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5440         gdb::unique_xmalloc_ptr.
5441
5442 2017-09-03  Tom Tromey  <tom@tromey.com>
5443
5444         * thread.c (print_thread_info_1): Use string_printf.
5445         (thread_apply_command, thread_apply_all_command): Use
5446         std::string.
5447
5448 2017-09-03  Tom Tromey  <tom@tromey.com>
5449
5450         * valprint.c (val_print_string): Update.
5451         * gdbcore.h (memory_error_message): Return std::string.
5452         * corefile.c (memory_error_message): Return std::string.
5453         (memory_error): Update.
5454         * breakpoint.c (insert_bp_location): Update.
5455
5456 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5457
5458         * target/waitstatus.h (target_waitstatus_to_string): Change
5459         return type to std::string.
5460         * target/waitstatus.c (target_waitstatus_to_string): Return
5461         std::string.
5462         * target.h (target_waitstatus_to_string): Remove declaration.
5463         * infrun.c (resume, clear_proceed_status_thread,
5464         print_target_wait_results, do_target_wait, save_waitstatus,
5465         stop_all_threads): Adjust.
5466         * record-btrace.c (record_btrace_wait): Adjust.
5467         * target-debug.h
5468         (target_debug_print_struct_target_waitstatus_p): Adjust.
5469
5470 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5471
5472         PR gdb/22046
5473         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5474         detection.
5475
5476 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5477
5478         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5479         for setting/unsetting environment variables on the remote target.
5480         (New remote packets): Add entries for QEnvironmentHexEncoded,
5481         QEnvironmentUnset and QEnvironmentReset.
5482         * common/environ.c (gdb_environ::operator=): Extend method to
5483         handle m_user_set_env_list and m_user_unset_env_list.
5484         (gdb_environ::clear): Likewise.
5485         (match_var_in_string): Change type of first parameter from 'char
5486         *' to 'const char *'.
5487         (gdb_environ::set): Extend method to handle
5488         m_user_set_env_list and m_user_unset_env_list.
5489         (gdb_environ::unset): Likewise.
5490         (gdb_environ::clear_user_set_env): New method.
5491         (gdb_environ::user_set_envp): Likewise.
5492         (gdb_environ::user_unset_envp): Likewise.
5493         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5494         m_user_unset_env_list on move constructor/assignment.
5495         (unset): Add new default parameter 'update_unset_list = true'.
5496         (clear_user_set_env): New method.
5497         (user_set_envp): Likewise.
5498         (user_unset_envp): Likewise.
5499         (m_user_set_env_list): New std::set.
5500         (m_user_unset_env_list): Likewise.
5501         * common/rsp-low.c (hex2str): New function.
5502         (bin2hex): New overload for bin2hex function.
5503         * common/rsp-low.c (hex2str): New prototype.
5504         (str2hex): New overload prototype.
5505         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5506         QEnvironmentUnset and QEnvironmentReset.
5507         (remote_protocol_features): Add QEnvironmentHexEncoded,
5508         QEnvironmentUnset and QEnvironmentReset packets.
5509         (send_environment_packet): New function.
5510         (extended_remote_environment_support): Likewise.
5511         (extended_remote_create_inferior): Call
5512         extended_remote_environment_support.
5513         (_initialize_remote): Add QEnvironmentHexEncoded,
5514         QEnvironmentUnset and QEnvironmentReset packet configs.
5515         * unittests/environ-selftests.c (gdb_selftest_env_var):
5516         New variable.
5517         (test_vector_initialization): New function.
5518         (test_init_from_host_environ): Likewise.
5519         (test_reinit_from_host_environ): Likewise.
5520         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5521         Likewise.
5522         (test_unset_set_empty_vector): Likewise.
5523         (test_vector_clear): Likewise.
5524         (test_std_move): Likewise.
5525         (test_move_constructor):
5526         (test_self_move): Likewise.
5527         (test_set_unset_reset): Likewise.
5528         (run_tests): Rewrite in terms of the functions above.
5529
5530 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5531
5532         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5533         (adi_available): Use a temp variable of type CORE_ADDR as argument
5534         3 when calling target_auxv_search.
5535         (adi_normalize_address): Use masks and xor operators to calculate
5536         normalized address.
5537         (adi_read_versions, adi_write_versions, adi_print_versions)
5538         (do_examine, do_assign): Use paddress.
5539
5540 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5541
5542         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5543         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5544         out of loop and add supply of FIR.
5545         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5546         add collect of FIR.
5547
5548 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5549
5550         PR gdb/21827
5551         * cli/cli-script.c (define_command): Don't convert command name
5552         to lower case.
5553
5554 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5555
5556         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5557         Update all callers accordingly. Remove all code blocks handling
5558         the case where DISPP is not NULL.
5559
5560 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5561
5562         PR symtab/22003
5563         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5564         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5565         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5566
5567 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5568
5569         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5570         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5571         (read_comp_units_from_section): New parameter abbrev_section, use
5572         read_and_check_comp_unit_head, allocate signatured_type if needed.
5573         (create_all_comp_units): Update read_comp_units_from_section caller.
5574
5575 2017-08-23  Pedro Alves  <palves@redhat.com>
5576
5577         PR remote/21852
5578         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5579         to null_ptid and switch to thread without reading the registers
5580         after adding the inferior.
5581
5582 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5583
5584         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5585         compile-gcc.
5586         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5587         (compile_to_object): Implement compile_gcc.
5588         (_initialize_compile): Install "set compile-gcc".  Initialize
5589         compile_gcc.
5590
5591 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5592
5593         * compile/compile.c (compile_to_object): Conditionally call
5594         set_verbose.  Conditionally call compile or compile_v0.
5595
5596 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5597
5598         * sparc64-tdep.h: (adi_normalize_address): New export.
5599         * sparc-nat.h: (open_adi_tag_fd): New export.
5600         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5601         * sparc64-linux-tdep.c:
5602         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5603         (sparc64_linux_handle_segmentation_fault): New function.
5604         (sparc64_linux_init_abi): Register
5605         sparc64_linux_handle_segmentation_fault
5606         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5607         (sparc64_addr_bits_remove): New function.
5608         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5609         (MAX_PROC_NAME_SIZE): New macro.
5610         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5611         (sparc64adilist): New variable.
5612         (adi_proc_list): New variable.
5613         (find_adi_info): New function.
5614         (add_adi_info): New function.
5615         (get_adi_info_proc): New function.
5616         (get_adi_info): New function.
5617         (info_adi_command): New function.
5618         (read_maps_entry): New function.
5619         (adi_available): New function.
5620         (adi_normalize_address): New function.
5621         (adi_align_address): New function.
5622         (adi_convert_byte_count): New function.
5623         (adi_tag_fd): New function.
5624         (adi_is_addr_mapped): New function.
5625         (adi_read_versions): New function.
5626         (adi_write_versions): New function.
5627         (adi_print_versions): New function.
5628         (do_examine): New function.
5629         (do_assign): New function.
5630         (adi_examine_command): New function.
5631         (adi_assign_command): New function.
5632         (_initialize_sparc64_adi_tdep): New function.
5633
5634 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5635
5636         * breakpoint.c (breakpoints_info): Rename to ...
5637         (info_breakpoints_command): ... this.
5638         (watchpoints_info): Rename to ...
5639         (info_watchpoints_command): ... this.
5640         (tracepoints_info): Rename to ...
5641         (info_tracepoints_command): ... this.
5642         (_initialize_breakpoint): Adjust.
5643         * dcache.c (dcache_info): Rename to ...
5644         (info_display_command): ... this.
5645         (_initialize_dcache): Adjust.
5646         * frame.h (args_info): Rename to ...
5647         (info_args_command): ... this.
5648         (locals_info): Rename to ...
5649         (info_locals_command): ... this.
5650         * infcmd.c (nofp_registers_info): Rename to ...
5651         (info_registers_command): ... this.
5652         (float_info): Rename to ...
5653         (info_float_command): ... this.
5654         (program_info): Rename to ...
5655         (info_program_command): ... this.
5656         (all_registers_info): Rename to ...
5657         (info_all_registers_command): ... this.
5658         (vector_info): Rename to ...
5659         (info_vector_command): ... this.
5660         (float_info): Rename to ...
5661         (info_float_command): ... this.
5662         (_initialize_infcmd): Adjust.
5663         * inferior.h (term_info): Rename to ...
5664         (info_terminal_command): ... this.
5665         * inflow.c (term_info): Rename to ...
5666         (info_terminal_command): ... this.
5667         (_initialize_inflow): Adjust.
5668         * infrun.c (signals_info): Rename to ...
5669         (info_signals_command): ... this.
5670         (_initialize_infrun): Adjust.
5671         * objc-lang.c (classes_info): Rename to ...
5672         (info_classes_command): ... this.
5673         (selectors_info): Rename to ...
5674         (info_selectors_command): ... this.
5675         (_initialize_objc_language): Adjust.
5676         * printcmd.c (sym_info): Rename to ...
5677         (info_symbol_command): ... this.
5678         (address_info): Rename to ...
5679         (info_address_command): ... this.
5680         (display_info): Rename to ...
5681         (info_display_command): ... this.
5682         (_initialize_printcmd): Adjust.
5683         * reverse.c (bookmarks_info): Rename to ...
5684         (info_breakpoints_command): ... this.
5685         (_initialize_reverse): Adjust.
5686         * ser-go32.c (dos_info): Rename to ...
5687         (info_serial_command): ... this.
5688         (_initialize_ser_dos): Adjust.
5689         * skip.c (skip_info): Rename to ...
5690         (info_skip_command): ... this.
5691         (_initialize_step_skip): Adjust.
5692         * source.c (line_info): Rename to ...
5693         (info_line_command): ... this.
5694         (source_info): Rename to ...
5695         (info_source_command)
5696         * stack.c (frame_info): Rename to ...
5697         (info_frame_command): ... this.
5698         (locals_info): Rename to ...
5699         (info_locals_command): ... this.
5700         (args_info): Rename to ...
5701         (info_args_command): ... this.
5702         (_initialize_stack): Adjust.
5703         * symtab.c (sources_info): Rename to ...
5704         (info_sources_command): ... this.
5705         (variables_info): Rename to ...
5706         (info_variables_command): ... this.
5707         (functions_info): Rename to ...
5708         (info_functions_command): ... this.
5709         (types_info): Rename to ...
5710         (info_types_command): ... this.
5711         (_initialize_symtab): Adjust.
5712         * target.c (target_info): Rename to ...
5713         (info_target_command): ... this.
5714         (initialize_targets): Adjust.
5715         * tracepoint.c (tvariables_info): Rename to ...
5716         (info_tvariables_command): ... this.
5717         (scope_info): Rename to ...
5718         (info_scope_command): ... this.
5719         (trace_dump_actions): Adjust.
5720         (_initialize_tracepoint): Adjust.
5721
5722 2017-08-22  Tom Tromey  <tom@tromey.com>
5723
5724         * breakpoint.h (install_breakpoint): Update.
5725         * breakpoint.c (add_solib_catchpoint): Update.
5726         (install_breakpoint): Change argument to a std::unique_ptr.
5727         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5728         (create_breakpoint_sal, create_breakpoint): Update.
5729         (watch_command_1, catch_exec_command_1)
5730         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5731         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5732         Return the breakpoint.
5733         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5734         (new_single_step_breakpoint): Update.
5735         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5736         std::unique_ptr.
5737         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5738         std::unique_ptr.
5739         * break-catch-sig.c (create_signal_catchpoint): Use
5740         std::unique_ptr.
5741         * ada-lang.c (create_ada_exception_catchpoint): Use
5742         std::unique_ptr.
5743
5744 2017-08-22  Tom Tromey  <tom@tromey.com>
5745
5746         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5747
5748 2017-08-22  Tom Tromey  <tom@tromey.com>
5749
5750         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5751         (lookup_partial_symbol): Update.
5752
5753 2017-08-22  Tom Tromey  <tom@tromey.com>
5754
5755         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5756         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5757         (find_and_open_source, symtab_to_fullname): Update.
5758         * psymtab.c (psymtab_to_fullname): Update.
5759
5760 2017-08-22  Tom Tromey  <tom@tromey.com>
5761
5762         * exec.c (exec_file_attach): Update.
5763         * linux-thread-db.c (try_thread_db_load): Update.
5764         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5765         * utils.c (gdb_realpath): Change return type.
5766         (gdb_realpath_keepfile): Update.
5767         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5768         (_initialize_utils): Register the new self test.
5769         * source.c (openp): Update.
5770         (find_and_open_source): Update.
5771         * nto-tdep.c (nto_find_and_open_solib): Update.
5772         * main.c (set_gdb_data_directory): Update.
5773         (captured_main_1): Update.
5774         * dwarf2read.c (dwarf2_get_dwz_file): Update
5775         (dw2_map_symbol_filenames): Update.
5776         * auto-load.c (auto_load_safe_path_vec_update): Update.
5777         (filename_is_in_auto_load_safe_path_vec): Change type of
5778         "filename_realp".
5779         (auto_load_objfile_script): Update.
5780         (file_is_auto_load_safe): Update.  Use std::string.
5781         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5782
5783 2017-08-22  Tom Tromey  <tom@tromey.com>
5784
5785         * utils.c (gdb_realpath_keepfile): Return a
5786         gdb::unique_xmalloc_ptr.
5787         * exec.c (exec_file_attach): Update.
5788         * utils.h (gdb_realpath_keepfile): Return a
5789         gdb::unique_xmalloc_ptr.
5790
5791 2017-08-22  Tom Tromey  <tom@tromey.com>
5792
5793         * compile/compile.c (compile_file_command): Use
5794         gdb::unique_xmalloc_ptr, std::string.
5795         * utils.c (gdb_abspath): Change return type.
5796         * source.c (openp): Update.
5797         * objfiles.c (allocate_objfile): Update.
5798         * main.c (set_gdb_data_directory): Update.
5799         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5800
5801 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5802
5803         * cli-cmds.c (list_commands): List actual code around more than
5804         one location.
5805
5806 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5807
5808         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5809
5810 2017-08-21  Pedro Alves  <palves@redhat.com>
5811
5812         PR gdb/19487
5813         * c-exp.y (variable production): Handle function aliases.
5814         * minsyms.c (msymbol_is_text): New function.
5815         * minsyms.h (msymbol_is_text): Declare.
5816         * symtab.c (find_function_alias_target): New function.
5817         * symtab.h (find_function_alias_target): Declare.
5818
5819 2017-08-21  Pedro Alves  <palves@redhat.com>
5820
5821         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5822         typedefs.
5823         * typeprint.c (whatis_exp): If handling "whatis", and expression
5824         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5825         typedefs here.
5826         * valops.c (value_cast): Save "to" type before resolving
5827         stubs/typedefs.  Use that type as resulting value's type.
5828
5829 2017-08-18  Tom Tromey  <tom@tromey.com>
5830             Pedro Alves  <palves@redhat.com>
5831
5832         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5833         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5834         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5835         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5836         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5837         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5838         (linux_get_siginfo_data): Add "thread" argument.  Use
5839         scoped_restore.
5840         * linux-nat.c (linux_child_follow_fork)
5841         (check_stopped_by_watchpoint): Use scoped_restore.
5842         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5843         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5844         (restore_inferior_ptid, save_inferior_ptid): Remove.
5845         * btrace.c (btrace_fetch): Use scoped_restore.
5846         * bsd-uthread.c (bsd_uthread_fetch_registers)
5847         (bsd_uthread_store_registers): Use scoped_restore.
5848         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5849         scoped_restore.
5850         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5851         (aix_thread_xfer_partial): Use scoped_restore.
5852         * inferior.h (save_inferior_ptid): Remove.
5853
5854 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5855
5856         PR tdep/21818
5857         * arm-tdep.c (gdb_print_insn_arm): Mark
5858         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5859
5860 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5861
5862         * NEWS: Mention GDBserver's new option "--selftest".
5863         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5864         * selftest.c: Move it to common/selftest.c.
5865         * selftest.h: Move it to common/selftest.h.
5866         * selftest-arch.c (reset): New function.
5867         (tests_with_arch): Call reset.
5868
5869 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5870
5871         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5872         instead of exception_fprintf and printf_filtered.
5873
5874 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5875
5876         * selftest.c (register_self_test): Rename it to
5877         selftests::register_test.
5878         (run_self_tests): selftest::run_tests.
5879         * selftest.h: Update declarations.
5880         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5881         selftests::register_test_foreach_arch.
5882         * selftest-arch.h: Update declaration.
5883         * aarch64-tdep.c: Update.
5884         * arm-tdep.c: Likewise.
5885         * disasm-selftests.c: Likewise.
5886         * dwarf2loc.c: Likewise.
5887         * dwarf2-frame.c: Likewise.
5888         * findvar.c: Likewise.
5889         * gdbarch-selftests.c: Likewise.
5890         * maint.c (maintenance_selftest): Likewise.
5891         * regcache.c: Likewise.
5892         * rust-exp.y: Likewise.
5893         * selftest-arch.c: Likewise.
5894         * unittests/environ-selftests.c: Likewise.
5895         * unittests/function-view-selftests.c: Likewise.
5896         * unittests/offset-type-selftests.c: Likewise.
5897         * unittests/optional-selftests.c: Likewise.
5898         * unittests/scoped_restore-selftests.c: Likewise.
5899         * utils-selftests.c: Likewise.
5900
5901 2017-08-17  Pedro Alves  <palves@redhat.com>
5902
5903         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5904         local.
5905
5906 2017-08-17  Pedro Alves  <palves@redhat.com>
5907
5908         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5909         field.
5910         (reset_die_in_process): Delete, replaced by ...
5911         (process_die_scope): ... this new class.  Make it responsible for
5912         freeing cu->line_header too.
5913         (process_die): Use process_die_scope.
5914         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5915         cu->line_header_die_owner.  Don't release the line header if it's
5916         owned by the CU.
5917         (setup_type_unit_groups): Make the CU/DIE own the line header.
5918         Don't release the line header here.
5919
5920 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5921
5922         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5923
5924 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5925
5926         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5927         Single-Key mode
5928
5929 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5930
5931         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5932         mode command list.
5933
5934 2017-08-15  Stafford Horne  <shorne@gmail.com>
5935
5936         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5937
5938 2017-08-15  Stafford Horne  <shorne@gmail.com>
5939
5940         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5941
5942 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5943
5944         PR gdb/21954
5945         * infcmd.c (unset_environment_command): Use the 'clear' method on
5946         the environment instead of resetting it.
5947
5948 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5949
5950         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5951         platforms.
5952
5953 2017-08-14  Tom Tromey  <tom@tromey.com>
5954
5955         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5956         (print_binary_chars): Likewise.
5957         (BITS_IN_BYTES): Remove.
5958
5959 2017-08-14  Tom Tromey  <tom@tromey.com>
5960
5961         PR gdb/21675
5962         * valprint.c (LOW_ZERO): Change value to 034.
5963         (print_octal_chars): Add static_asserts for octal constants.
5964         * printcmd.c (print_scalar_formatted): Add 'd' case.
5965
5966 2017-08-11  Tom Tromey  <tom@tromey.com>
5967
5968         * symfile.c (add_symbol_file_command): Use std::vector.
5969
5970 2017-08-14  Tom Tromey  <tom@tromey.com>
5971
5972         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5973         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5974         std::move.
5975         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5976
5977 2017-08-11  Pedro Alves  <palves@redhat.com>
5978
5979         * infrun.c (process_event_stop_test): Adjust
5980         function_name_is_marked_for_skip call.
5981         * skip.c: Include <list>.
5982         (skiplist_entry): Make it a class with private fields, and
5983         getters/setters.
5984         (skiplist_entry_chain): Delete.
5985         (skiplist_entries): New.
5986         (skiplist_entry_count): Delete.
5987         (highest_skiplist_entry_num): New.
5988         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5989         (add_skiplist_entry): Delete.
5990         (skiplist_entry::skiplist_entry): New.
5991         (skiplist_entry::add_entry): New.
5992         (skip_file_command, skip_function): Adjust.
5993         (compile_skip_regexp): Delete.
5994         (skip_command): Don't compile regexp here.  Adjust to use
5995         skiplist_entry::add_entry.
5996         (skip_info): Adjust to use range-for and getters.
5997         (skip_enable_command, skip_disable_command): Adjust to use
5998         range-for and setters.
5999         (skip_delete_command): Adjust to use std::list.
6000         (add_skiplist_entry): Delete.
6001         (skip_file_p): Delete, refactored as ...
6002         (skiplist_entry::do_skip_file_p): ... this new method.
6003         (skip_gfile_p): Delete, refactored as ...
6004         (skiplist_entry::do_gskip_file_p): ... this new method.
6005         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6006         (skiplist_entry::skip_function_p): ... this new method.
6007         (function_name_is_marked_for_skip): Now returns bool, and takes
6008         the function sal by const reference.  Adjust to use range-for and
6009         skiplist_entry methods.
6010         (_initialize_step_skip): Remove references to
6011         skiplist_entry_chain, skiplist_entry_count.
6012         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6013         takes the function sal by const reference.
6014
6015 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6016
6017         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6018         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6019         (dwarf2_frame_cache):
6020         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6021         RETURN_MASK_ALL and set *this_case to NULL.
6022         * frame-unwind.h: Update comments.
6023
6024 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6025
6026         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6027         (dwarf2_frame_state_copy_regs): Remove.
6028         (dwarf2_frame_state_free_regs): Remove.
6029         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6030         (dwarf2_restore_rule): Call method .alloc_regs instead of
6031         dwarf2_frame_state_alloc_regs.
6032         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6033         constructor.  Call std::move.
6034         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6035         (dwarf2_frame_cache): Likewise.
6036
6037         [GDB_SELF_TEST]: Include selftest.h and
6038         selftest-arch.h.
6039         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6040         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6041         execute_cfa_program_test.
6042
6043         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6044         copy ctor, assignment operator, move assignment.
6045         <alloc_regs>: New method.
6046         <swap>: New method.
6047         (struct dwarf2_frame_state): Delete dtor.
6048         (dwarf2_frame_state_alloc_regs): Remove declaration.
6049         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6050         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6051
6052 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6053
6054         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6055         (dwarf2_frame_state::dwarf2_frame_state): New.
6056         (dwarf2_frame_state::~dwarf2_frame_state): New.
6057         (dwarf2_fetch_cfa_info): Update.
6058         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6059         rather than a pointer.  Update code.
6060         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6061         dtor.
6062         <data_align, code_align, retaddr_column>: Change them to const.
6063         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6064         to bool.
6065
6066 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6067
6068         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6069         <loc.exp>: New field.
6070         * dwarf2-frame.c (execute_cfa_program): Update.
6071         (dwarf2_frame_prev_register): Update.
6072
6073 2017-08-10  Pedro Alves  <palves@redhat.com>
6074
6075         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6076
6077 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6078
6079         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6080         (fbsd_pending_children): Use std::list.
6081         (fbsd_remember_child): Likewise.
6082         (fbsd_is_child_pending): Likewise.
6083         (fbsd_pending_vfork_done): Use std::forward_list.
6084         (fbsd_add_vfork_done): Likewise.
6085         (fbsd_is_vfork_done_pending): Likewise.
6086         (fbsd_next_vfork_done): Likewise.
6087
6088 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6089
6090         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6091         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6092         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6093         for `mapfilename'.
6094         (fbsd_xfer_partial): Use gdb::byte_vector.
6095         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6096
6097 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6098
6099         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6100         "filestuff.h".
6101         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6102
6103 2017-08-09  Tom Tromey  <tom@tromey.com>
6104
6105         * skip.c (skiplist_entry): New constructor.
6106         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6107         (skiplist_entry::file_is_glob): Now bool.
6108         (skiplist_entry::file, skiplist_entry::function): Now
6109         std::string.
6110         (make_skip_entry): Return a unique_ptr.  Use new.
6111         (free_skiplist_entry, free_skiplist_entry_cleanup)
6112         (make_free_skiplist_entry_cleanup): Remove.
6113         (skip_command, skip_disable_command, add_skiplist_entry)
6114         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6115         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6116         (function_name_is_marked_for_skip): Update.
6117         (skip_delete_command): Update.  Use delete.
6118
6119 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6120
6121         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6122         (aarch64_linux_core_read_description): New function.
6123         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6124
6125 2017-08-09  Pedro Alves  <palves@redhat.com>
6126
6127         * cp-name-parser.y (cp_comp_to_string): Return a
6128         gdb::unique_xmalloc_ptr<char>.
6129         * cp-support.c (replace_typedefs_qualified_name)
6130         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6131         (cp_canonicalize_string_full): Use op= instead of explicit
6132         convertion.
6133         (cp_class_name_from_physname, method_name_from_physname)
6134         (cp_func_name, cp_remove_params): Adjust to use
6135         gdb::unique_xmalloc_ptr<char>.
6136         * cp-support.h (cp_comp_to_string): Return a
6137         gdb::unique_xmalloc_ptr<char>.
6138         * python/py-type.c (typy_lookup_type): Adjust to use
6139         gdb::unique_xmalloc_ptr<char>.
6140
6141 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6142
6143         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6144
6145 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6146             Yao Qi  <yao.qi@linaro.org>
6147
6148         * cp-support.c (cp_canonicalize_string_full): Use
6149         gdb::unique_xmalloc_ptr<char>.
6150         (cp_canonicalize_string): Likewise.
6151
6152 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6153
6154         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6155         * regformats/i386/amd64-avx-avx512.dat: Remove.
6156         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6157         * regformats/i386/amd64-avx-mpx.dat:Remove.
6158         * regformats/i386/amd64-avx.dat: Remove.
6159         * regformats/i386/amd64-mpx.dat: Remove.
6160         * regformats/i386/i386-avx-avx512.dat: Remove.
6161         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6162         * regformats/i386/i386-avx-mpx.dat: Remove.
6163         * regformats/i386/i386-mmx.dat: Remove.
6164         * regformats/i386/i386-mpx.dat: Remove.
6165
6166 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6167
6168         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6169         * amd64-tdep.c: Don't include features/i386/x32*.c.
6170         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6171         functions.
6172         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6173         and i386/x32-avx-avx512.
6174         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6175         and i386/x32.xml.
6176         * features/i386/x32-avx-avx512.c: Removed.
6177         * features/i386/x32-avx-avx512.xml: Removed.
6178         * features/i386/x32-avx.c: Removed.
6179         * features/i386/x32-avx.xml: Removed.
6180         * features/i386/x32.c: Removed.
6181         * features/i386/x32.xml: Removed.
6182         * regformats/i386/x32-avx-avx512.dat: Removed.
6183         * regformats/i386/x32-avx.dat: Removed.
6184         * regformats/i386/x32.dat: Removed.
6185
6186 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6187
6188         PR breakpoints/21886
6189         * mem-break.c (default_memory_insert_breakpoint): Use
6190         `->placed_address' rather than `->reqstd_address' for the
6191         breakpoint location.
6192
6193 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6194
6195         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6196         assertions.
6197
6198 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6199
6200         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6201         a union of `tdep_info', `tdesc_data' and `id'.
6202         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6203         rather than `info.tdep_info'.
6204         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6205         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6206         * i386-tdep.c (i386_gdbarch_init): Likewise.
6207         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6208         * mips-tdep.c (mips_gdbarch_init): Likewise.
6209         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6210         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6211         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6212         `info.tdep_info'.
6213         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6214         `info.tdep_info'.
6215         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6216         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6217         `info.tdep_info'.
6218         * spu-tdep.c (spu_gdbarch_init): Likewise.
6219         * gdbarch.h: Regenerate.
6220
6221 2017-08-07  Leszek Swirski  <leszeks@google.com>
6222
6223         PR symtab/20899
6224         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6225
6226 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6227
6228         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6229         (gdbsim_open): Rename gdb_argv args object to argv.
6230
6231 2017-08-05  Tom Tromey  <tom@tromey.com>
6232
6233         * compile/compile-object-load.c (compile_object_load): Use
6234         gdb::unique_xmalloc_ptr.
6235         * cli/cli-dump.c (scan_filename): Rename from
6236         scan_filename_with_cleanup.  Change return type.
6237         (scan_expression): Rename from scan_expression_with_cleanup.
6238         Change return type.
6239         (dump_memory_to_file, dump_value_to_file, restore_command):
6240         Use gdb::unique_xmalloc_ptr.  Update.
6241         * cli/cli-cmds.c (find_and_open_script): Use
6242         gdb::unique_xmalloc_ptr.
6243         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6244         * symmisc.c (maintenance_print_symbols)
6245         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6246         * symfile.c (symfile_bfd_open, generic_load)
6247         (add_symbol_file_command, remove_symbol_file_command): Use
6248         gdb::unique_xmalloc_ptr.
6249         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6250         * psymtab.c (maintenance_print_psymbols): Use
6251         gdb::unique_xmalloc_ptr.
6252         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6253         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6254         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6255         (reload_shared_libraries_1): Likewise.
6256
6257 2017-08-05  Tom Tromey  <tom@tromey.com>
6258
6259         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6260         (rust_op_vector, rust_set_vector): New typedefs.
6261         (current_parser): New global.
6262         (work_obstack): Change to pointer type.  Update all users.
6263         (rust_ast, pstate): Remove globals.
6264         (struct rust_parser): New.
6265         (%union) <params, field_inits>: Change type.
6266         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6267         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6268         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6269         (convert_params_to_types, convert_params_to_expression): Change
6270         type of "params".
6271         (ast_string): Change type of "fields".
6272         (rust_parse): Make a rust_parser.  Remove cleanups.
6273         (rust_lex_tests): Make and install an auto_obstack.
6274
6275 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6276
6277         * configure.srv (ipa_x32_linux_regobj): New.
6278         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6279         instead of X86_TDESC_AVX512.
6280         (initialize_low_tracepoint): Call
6281         init_registers_x32_avx_avx512_linux.
6282
6283 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6284
6285         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6286
6287 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6288
6289         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6290
6291 2017-08-03  Tom Tromey  <tom@tromey.com>
6292
6293         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6294         Remove.
6295         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6296
6297 2017-08-03  Tom Tromey  <tom@tromey.com>
6298
6299         * python/py-param.c (compute_enum_values): Use gdb_argv.
6300
6301 2017-08-03  Tom Tromey  <tom@tromey.com>
6302
6303         * utils.h (struct gdb_argv_deleter): New.
6304         (gdb_argv): New class.
6305         * utils.c (gdb_argv::reset): New method.
6306         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6307         * tracefile.c (tsave_command): Use gdb_argv.
6308         * top.c (new_ui_command): Use gdb_argv.
6309         * symmisc.c (maintenance_print_symbols)
6310         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6311         * symfile.c (symbol_file_command, generic_load)
6312         (remove_symbol_file_command): Use gdb_argv.
6313         * stack.c (backtrace_command): Use gdb_argv.
6314         * source.c (add_path, show_substitute_path_command)
6315         (unset_substitute_path_command, set_substitute_path_command):
6316         Use gdb_argv.
6317         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6318         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6319         * remote.c (extended_remote_run, remote_put_command)
6320         (remote_get_command, remote_delete_command): Use gdb_argv.
6321         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6322         (gdbsim_open): Use gdb_argv.
6323         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6324         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6325         * procfs.c (procfs_info_proc): Use gdb_argv.
6326         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6327         * infrun.c (handle_command): Use gdb_argv.
6328         * inferior.c (add_inferior_command, clone_inferior_command):
6329         Use gdb_argv.
6330         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6331         * exec.c (exec_file_command): Use gdb_argv.
6332         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6333         * compile/compile.c (build_argc_argv): Use gdb_argv.
6334
6335 2017-08-03  Tom Tromey  <tom@tromey.com>
6336
6337         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6338
6339 2017-08-03  Tom Tromey  <tom@tromey.com>
6340
6341         * python/python.c (compute_python_string): Return std::string.
6342         (gdbpy_eval_from_control_command): Update.
6343         (do_start_initialization): Use std::string.
6344         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6345         xstrprintf.
6346         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6347         xstrprintf.
6348
6349 2017-08-03  Tom Tromey  <tom@tromey.com>
6350
6351         * top.h (do_restore_instream_cleanup): Remove.
6352         * top.c (do_restore_instream_cleanup): Remove.
6353         (read_command_file): Use scoped_restore.
6354         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6355
6356 2017-08-03  Tom Tromey  <tom@tromey.com>
6357
6358         * cli/cli-script.c (execute_user_command)
6359         (execute_control_command): Use scoped_restore.
6360
6361 2017-08-03  Tom Tromey  <tom@tromey.com>
6362
6363         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6364         (execute_user_command): Remove user_call_depth; use
6365         user_args_stack's size instead.
6366
6367 2017-08-03  Tom Tromey  <tom@tromey.com>
6368
6369         * top.h (in_user_command): Remove.
6370         * top.c (in_user_command): Remove.
6371         * cli/cli-script.c (do_restore_user_call_depth)
6372         (execute_user_command): Update.
6373
6374 2017-08-03  Tom Tromey  <tom@tromey.com>
6375
6376         * valops.c (search_struct_method): Use gdb::byte_vector.
6377         * valarith.c (value_concat): Use std::vector.
6378         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6379         (simple_search_memory): Likewise.
6380         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6381         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6382         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6383         * elfread.c (elf_rel_plt_read): Use std::string.
6384         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6385         * cli/cli-dump.c (restore_section_callback): Use
6386         gdb::byte_vector.
6387
6388 2017-08-03  Tom Tromey  <tom@tromey.com>
6389
6390         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6391
6392 2017-08-03  Tom Tromey  <tom@tromey.com>
6393
6394         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6395         (tui_register_format): Use scoped_restore.
6396
6397 2017-08-03  Tom Tromey  <tom@tromey.com>
6398
6399         * reverse.c (exec_direction_default): Remove.
6400         (exec_reverse_once): Use scoped_restore.
6401         * remote.c (restore_remote_timeout): Remove.
6402         (remote_flash_erase, remote_flash_write, remote_flash_done)
6403         (readchar, remote_serial_write): Use scoped_restore.
6404         * cli/cli-script.c (struct source_cleanup_lines_args)
6405         (source_cleanup_lines): Remove.
6406         (script_from_file): Use scoped_restore.
6407         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6408         (source_command): Use scoped_restore.
6409
6410 2017-08-03  Tom Tromey  <tom@tromey.com>
6411
6412         * utils.h (make_cleanup_free_so): Remove.
6413         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6414         * solist.h (struct so_deleter): New.
6415         (so_list_up): New typedef.
6416         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6417
6418 2017-08-03  Tom Tromey  <tom@tromey.com>
6419
6420         * utils.h (make_cleanup_restore_current_language): Remove.
6421         * utils.c (do_restore_current_language)
6422         (make_cleanup_restore_current_language): Remove.
6423         * parse.c (parse_exp_in_context_1)
6424         (parse_expression_with_language): Use
6425         scoped_restore_current_language.
6426         * mi/mi-main.c (mi_cmd_execute): Use
6427         scoped_restore_current_language.
6428         * language.h (scoped_restore_current_language): New class.
6429
6430 2017-08-03  Tom Tromey  <tom@tromey.com>
6431
6432         * compile/compile.c (cleanup_unlink_file): Remove.
6433         (compile_to_object): Use gdb::unlinker.
6434         (eval_compile_command): Likewise.
6435
6436 2017-08-03  Tom Tromey  <tom@tromey.com>
6437
6438         * utils.h (make_cleanup_fclose): Remove.
6439         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6440
6441 2017-08-03  Tom Tromey  <tom@tromey.com>
6442
6443         * top.c (open_terminal_stream): Return gdb_file_up.
6444         (new_ui_command): Update.
6445
6446 2017-08-03  Tom Tromey  <tom@tromey.com>
6447
6448         * source.c (print_source_lines_base, forward_search_command)
6449         (reverse_search_command): Use gdb_file_up.
6450
6451 2017-08-03  Tom Tromey  <tom@tromey.com>
6452
6453         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6454
6455 2017-08-03  Tom Tromey  <tom@tromey.com>
6456
6457         * cli/cli-cmds.c (find_and_open_script): Change return type.
6458         Remove "streamp" and "full_path" parameters.
6459         (source_script_with_search): Update.
6460         * auto-load.c (source_script_file): Update.
6461         * cli/cli-cmds.h (find_and_open_script): Change type.
6462         (open_script): New struct.
6463
6464 2017-08-03  Tom Tromey  <tom@tromey.com>
6465
6466         * xml-support.c (xml_fetch_content_from_file): Update.
6467         * ui-file.c (stdio_file::open): Update.
6468         * tracefile-tfile.c (tfile_start): Update.
6469         * remote.c (remote_file_put, remote_file_get): Update.
6470         * nat/linux-procfs.c (linux_proc_get_int)
6471         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6472         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6473         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6474         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6475         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6476         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6477         * linux-nat.c (linux_proc_pending_signals): Update.
6478         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6479         (file_closer): Remove.
6480         * compile/compile.c (compile_to_object): Update.
6481         * common/filestuff.h (struct gdb_file_deleter): New.
6482         (gdb_file_up): New typedef.
6483         (gdb_fopen_cloexec): Change return type.
6484         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6485         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6486         (dump_binary_file, restore_binary_file): Update.
6487         * auto-load.c (auto_load_objfile_script_1): Update.
6488
6489 2017-08-03  Tom Tromey  <tom@tromey.com>
6490
6491         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6492         (info_static_tracepoint_markers_command): Likewise.
6493         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6494         * skip.c (skip_info): Use ui_out_emit_table.
6495         * progspace.c (print_program_space): Use ui_out_emit_table.
6496         * osdata.c (info_osdata): Use ui_out_emit_table.
6497         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6498         ui_out_emit_table.
6499         * linux-thread-db.c (info_auto_load_libthread_db): Use
6500         ui_out_emit_table.
6501         * inferior.c (print_inferior): Use ui_out_emit_table.
6502         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6503         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6504         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6505         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6506         * ui-out.h (class ui_out_emit_table): New.
6507
6508 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6509
6510         * mips-tdep.c (mips_fpu_type_str): New function.
6511         (mips_dump_tdep): Call it.
6512
6513 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6514
6515         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6516         `->mips_fpu_type'.
6517
6518 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6519
6520         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6521
6522 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6523
6524         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6525
6526 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6527
6528         * cli/cli-cmds.c (maintenancechecklist): New variable.
6529         * gdbcmd.h (maintenancechecklist): Declare it.
6530         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6531         Call i386_linux_read_description with different masks.
6532         * maint.c (maintenance_check_command): New function.
6533         (_initialize_maint_cmds): Call add_prefix_cmd.
6534         * target-descriptions.c (tdesc_reg): override operator != and ==.
6535         (tdesc_type): Likewise.
6536         (tdesc_feature): Likewise.
6537         (target_desc): Likewise.
6538         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6539         (maintenance_check_xml_descriptions): New function.
6540         (_initialize_target_descriptions) Add command "xml-descriptions".
6541         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6542
6543 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6544
6545         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6546         Include features/i386/32bit-*.c.
6547         (i386_linux_read_description): Generate target description if it
6548         doesn't exist.
6549         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6550         functions.
6551         * features/i386/32bit-linux.c: Re-generated.
6552         * features/i386/32bit-sse.c: Likewise.
6553         * target-descriptions.c (print_c_feature::visit): Print code to
6554         set register number if needed.
6555         (print_c_feature) <m_next_regnum>: New field.
6556
6557 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6558
6559         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6560         (FEATURE_XMLFILES): New.
6561         (FEATURE_CFILES): New.
6562         New rules.
6563         (clean-cfiles): Remove generated c files.
6564         * features/i386/32bit-avx.c: Generated.
6565         * features/i386/32bit-avx512.c: Generated.
6566         * features/i386/32bit-core.c: Generated.
6567         * features/i386/32bit-linux.c: Generated.
6568         * features/i386/32bit-mpx.c: Generated.
6569         * features/i386/32bit-pkeys.c: Generated.
6570         * features/i386/32bit-sse.c: Generated.
6571         * target-descriptions.c: Include algorithm.
6572         (tdesc_element_visitor): Add method visit_end.
6573         (print_c_tdesc): Implement visit_end.
6574         (print_c_tdesc:: m_filename_after_features): Move it to
6575         protected.
6576         (print_c_feature): New class.
6577         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6578         name starts with "i386/32bit-".
6579
6580 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6581
6582         * target-descriptions.c (tdesc_element_visitor): New class.
6583         (tdesc_element): New class.
6584         (tdesc_reg): Inherit from tdesc_element.
6585         (tdesc_reg::accept): New function.
6586         (tdesc_type): Inherit from tdesc_element.
6587         (tdesc_type::accept): New function.
6588         (tdesc_feature): Inherit from tdesc_element.
6589         (tdesc_feature::accept): New function.
6590         (target_desc): Inherit from tdesc_element.
6591         (target_desc::target_desc): New.
6592         (target_desc::~target_desc): New.
6593         (target_desc::accept): New.
6594         (allocate_target_description): Use new.
6595         (free_target_description): Use delete.
6596         (print_c_tdesc): New class.
6597         (maint_print_c_tdesc_cmd): Adjust.
6598
6599         * features/aarch64.c: Re-generated.
6600         * features/arc-arcompact.c: Re-generated.
6601         * features/arc-v2.c: Re-generated.
6602         * features/arm/arm-with-iwmmxt.c: Re-generated.
6603         * features/arm/arm-with-m.c: Re-generated.
6604         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6605         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6606         * features/arm/arm-with-neon.c: Re-generated.
6607         * features/arm/arm-with-vfpv2.c: Re-generated.
6608         * features/arm/arm-with-vfpv3.c: Re-generated.
6609         * features/i386/amd64-avx-avx512.c: Re-generated.
6610         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6611         * features/i386/amd64-avx.c: Re-generated.
6612         * features/i386/amd64-avx-linux.c: Re-generated.
6613         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6614         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6615         * features/i386/amd64-avx-mpx.c: Re-generated.
6616         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6617         * features/i386/amd64.c: Re-generated.
6618         * features/i386/amd64-linux.c: Re-generated.
6619         * features/i386/amd64-mpx.c: Re-generated.
6620         * features/i386/amd64-mpx-linux.c: Re-generated.
6621         * features/i386/i386-avx-avx512.c: Re-generated.
6622         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6623         * features/i386/i386-avx.c: Re-generated.
6624         * features/i386/i386-avx-linux.c: Re-generated.
6625         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6626         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6627         * features/i386/i386-avx-mpx.c: Re-generated.
6628         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6629         * features/i386/i386.c: Re-generated.
6630         * features/i386/i386-linux.c: Re-generated.
6631         * features/i386/i386-mmx.c: Re-generated.
6632         * features/i386/i386-mmx-linux.c: Re-generated.
6633         * features/i386/i386-mpx.c: Re-generated.
6634         * features/i386/i386-mpx-linux.c: Re-generated.
6635         * features/i386/x32-avx-avx512.c: Re-generated.
6636         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6637         * features/i386/x32-avx.c: Re-generated.
6638         * features/i386/x32-avx-linux.c: Re-generated.
6639         * features/i386/x32.c: Re-generated.
6640         * features/i386/x32-linux.c: Re-generated.
6641         * features/microblaze.c: Re-generated.
6642         * features/microblaze-with-stack-protect.c: Re-generated.
6643         * features/mips64-dsp-linux.c: Re-generated.
6644         * features/mips64-linux.c: Re-generated.
6645         * features/mips-dsp-linux.c: Re-generated.
6646         * features/mips-linux.c: Re-generated.
6647         * features/nds32.c: Re-generated.
6648         * features/nios2.c: Re-generated.
6649         * features/nios2-linux.c: Re-generated.
6650         * features/rs6000/powerpc-32.c: Re-generated.
6651         * features/rs6000/powerpc-32l.c: Re-generated.
6652         * features/rs6000/powerpc-403.c: Re-generated.
6653         * features/rs6000/powerpc-403gc.c : Re-generated.
6654         * features/rs6000/powerpc-405.c: Re-generated.
6655         * features/rs6000/powerpc-505.c: Re-generated.
6656         * features/rs6000/powerpc-601.c: Re-generated.
6657         * features/rs6000/powerpc-602.c: Re-generated.
6658         * features/rs6000/powerpc-603.c: Re-generated.
6659         * features/rs6000/powerpc-604.c: Re-generated.
6660         * features/rs6000/powerpc-64.c: Re-generated.
6661         * features/rs6000/powerpc-64l.c: Re-generated.
6662         * features/rs6000/powerpc-7400.c: Re-generated.
6663         * features/rs6000/powerpc-750.c: Re-generated.
6664         * features/rs6000/powerpc-860.c: Re-generated.
6665         * features/rs6000/powerpc-altivec32.c: Re-generated.
6666         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6667         * features/rs6000/powerpc-altivec64.c: Re-generated.
6668         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6669         * features/rs6000/powerpc-cell32l.c: Re-generated.
6670         * features/rs6000/powerpc-cell64l.c: Re-generated.
6671         * features/rs6000/powerpc-e500.c: Re-generated.
6672         * features/rs6000/powerpc-e500l.c: Re-generated.
6673         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6674         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6675         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6676         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6677         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6678         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6679         * features/rs6000/powerpc-vsx32.c: Re-generated.
6680         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6681         * features/rs6000/powerpc-vsx64.c: Re-generated.
6682         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6683         * features/rs6000/rs6000.c: Re-generated.
6684         * features/s390-linux32.c: Re-generated.
6685         * features/s390-linux32v1.c: Re-generated.
6686         * features/s390-linux32v2.c: Re-generated.
6687         * features/s390-linux64.c: Re-generated.
6688         * features/s390-linux64v1.c: Re-generated.
6689         * features/s390-linux64v2.c: Re-generated.
6690         * features/s390-te-linux64.c: Re-generated.
6691         * features/s390-tevx-linux64.c: Re-generated.
6692         * features/s390-vx-linux64.c: Re-generated.
6693         * features/s390x-linux64.c: Re-generated.
6694         * features/s390x-linux64v1.c: Re-generated.
6695         * features/s390x-linux64v2.c: Re-generated.
6696         * features/s390x-te-linux64.c: Re-generated.
6697         * features/s390x-tevx-linux64.c: Re-generated.
6698         * features/s390x-vx-linux64.c: Re-generated.
6699         * features/sparc/sparc32-solaris.c: Re-generated.
6700         * features/sparc/sparc64-solaris.c: Re-generated.
6701         * features/tic6x-c62x.c: Re-generated.
6702         * features/tic6x-c62x-linux.c: Re-generated.
6703         * features/tic6x-c64x.c: Re-generated.
6704         * features/tic6x-c64x-linux.c: Re-generated.
6705         * features/tic6x-c64xp.c: Re-generated.
6706         * features/tic6x-c64xp-linux.c: Re-generated.
6707
6708 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6709
6710         * i386-linux-tdep.c (i386_linux_read_description): New function.
6711         (i386_linux_core_read_description): Call
6712         i386_linux_read_description.
6713         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6714         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6715         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6716         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6717         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6718         * x86-linux-nat.c (x86_linux_read_description): Call
6719         i386_linux_read_description.
6720
6721 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6722
6723         * NEWS: Mention it.
6724         * features/Makefile (%.c: %.xml): Pass the xml file name to
6725         command "maint print c-tdesc".
6726         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6727         name from 'arg'.
6728
6729 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6730
6731         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6732         in-class initialization.
6733         (tdesc_create_feature): Call new instead of XCNEW.
6734         (free_target_description): Ue delete.
6735
6736 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6737
6738         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6739
6740 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6741
6742         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6743         constant.
6744         (amd64_x32_init_abi): Likewise.
6745         * amd64-tdep.h (amd64_init_abi): Update declaration.
6746         (amd64_x32_init_abi): Likewise.
6747
6748 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6749
6750         PR tdep/21717
6751         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6752         condition for FPSCR.
6753         (arm_linux_store_inferior_registers): Likewise.
6754
6755 2017-07-22  Tom Tromey  <tom@tromey.com>
6756
6757         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6758         <syscalls_counts>: Now a std::vector.
6759         (get_catch_syscall_inferior_data): Use "new".
6760         (catch_syscall_inferior_data_cleanup): Use "delete".
6761         (insert_catch_syscall, remove_catch_syscall)
6762         (clear_syscall_counts): Update.
6763
6764 2017-07-22  Tom Tromey  <tom@tromey.com>
6765
6766         * break-catch-syscall.c (syscall_catchpoint)
6767         <syscalls_to_be_caught>: Now a std::vector<int>
6768         (~syscall_catchpoint): Remove.
6769         (insert_catch_syscall, remove_catch_syscall)
6770         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6771         (print_mention_catch_syscall, print_recreate_catch_syscall):
6772         Update.
6773         (create_syscall_event_catchpoint): Change type of "filter"
6774         parameter.
6775         (catch_syscall_split_args): Return a std::vector.
6776         (catch_syscall_command_1, catching_syscall_number_1): Update.
6777
6778 2017-07-22  Tom Tromey  <tom@tromey.com>
6779
6780         * break-catch-throw.c (struct exception_catchpoint)
6781         <exception_rx>: Now a std::string.
6782         (~exception_catchpoint): Remove.
6783         (print_one_detail_exception_catchpoint): Update.
6784         (handle_gnu_v3_exceptions): Change type of except_rx.
6785         (extract_exception_regexp): Return a std::string.
6786         (catch_exception_command_1): Update.
6787
6788 2017-07-22  Tom Tromey  <tom@tromey.com>
6789
6790         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6791         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6792         std::vector.
6793         <catch_all>: Now a bool.
6794         (~signal_catchpoint): Remove.
6795         (signal_catchpoint_insert_location)
6796         (signal_catchpoint_remove_location)
6797         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6798         (signal_catchpoint_print_mention)
6799         (signal_catchpoint_print_recreate)
6800         (signal_catchpoint_explains_signal): Update.
6801         (create_signal_catchpoint): Change type of "filter" and
6802         "catch_all".
6803         (catch_signal_split_args): Return a std::vector.  Change type of
6804         "catch_all".
6805         (catch_signal_command): Update.
6806
6807 2017-07-20  Pedro Alves  <palves@redhat.com>
6808
6809         * ada-lang.c (ada_language_defn): Make extern.
6810         (_initialize_ada_language): Remove add_language call.
6811         * c-lang.c (c_language_defn, cplus_language_defn)
6812         (asm_language_defn, minimal_language_defn): Make extern.
6813         (_initialize_c_language): Delete.
6814         * completer.c (compare_cstrings): Delete, moved to utils.h.
6815         * d-lang.c (d_language_defn): Make extern.
6816         (_initialize_d_language): Remove add_language calls.
6817         * defs.h (enum language): Add comment.
6818         * f-lang.c (f_language_defn): Make extern.
6819         (_initialize_f_language): Remove add_language call.
6820         * go-lang.c (go_language_defn): Make extern.
6821         (_initialize_go_language): Remove add_language call.
6822         * language.c: Include <algorithm>.
6823         (languages): Redefine as const array.
6824         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6825         (set_language_command): Handle "local".  Use for-range loop.
6826         (set_language): Remove loop.
6827         (language_enum): Rewrite.
6828         (language_def, language_str): Remove loops.
6829         (add_language): Delete.
6830         (add_set_language_command): New, based on add_languages.
6831         (skip_language_trampoline): Adjust.
6832         (local_language_defn): Delete.
6833         (language_gdbarch_post_init): Adjust.
6834         (_initialize_language): Remove add_language calls.  Call
6835         add_set_language_command.
6836         * language.h (add_language): Delete.
6837         (auto_language_defn)
6838         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6839         (asm_language_defn, c_language_defn, cplus_language_defn)
6840         (d_language_defn, f_language_defn, go_language_defn)
6841         (m2_language_defn, objc_language_defn, opencl_language_defn)
6842         (pascal_language_defn, rust_language_defn): Declare.
6843         * m2-lang.c (m2_language_defn): Make extern.
6844         (_initialize_m2_language): Remove add_language call.
6845         * objc-lang.c (objc_language_defn): Make extern.
6846         (_initialize_objc_language): Remove add_language call.
6847         * opencl-lang.c (opencl_language_defn): Make extern.
6848         (_initialize_opencl_language): Remove add_language call.
6849         * p-lang.c (pascal_language_defn): Make extern.
6850         (_initialize_pascal_language): Delete.
6851         * rust-lang.c (rust_language_defn): Make extern.
6852         (_initialize_rust_language): Delete.
6853         * utils.h (compare_cstrings): New static inline function.
6854
6855 2017-07-20  Pedro Alves  <palves@redhat.com>
6856
6857         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6858         (get_var_value): Constify parameters.
6859         (get_int_var_value): Change prototype.
6860         (to_fixed_range_type): Adjust.
6861         * ada-lang.h (get_int_var_value): Change prototype.
6862
6863 2017-07-20  Pedro Alves  <palves@redhat.com>
6864
6865         * dwarf2read.c (dw2_lookup_symbol): Use
6866         SYMBOL_MATCHES_SEARCH_NAME.
6867         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6868
6869 2017-07-20  Pedro Alves  <palves@redhat.com>
6870
6871         * block.c (block_iter_name_step, block_iter_name_first)
6872         (block_iter_name_next): Delete.
6873         (block_lookup_symbol_primary): Adjust to use
6874         dict_iter_match_first/dict_iter_match_next.
6875         * block.h (block_iter_name_first, block_iter_name_next): Delete
6876         declarations.
6877         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6878         dict_iter_match_first/dict_iter_match_next.
6879
6880 2017-07-20  Pedro Alves  <palves@redhat.com>
6881
6882         * cp-support.c (cp_find_first_component_aux): Add missing case for
6883         end of string.
6884
6885 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6886
6887         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6888         of dwo_cu's dwo_file.
6889
6890 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6891
6892         * remote.c (store_registers_using_G): Remove one line comment.
6893
6894 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6895
6896         * regcache.c (regcache_cpy): Simplify it.
6897         (regcache::cpy_no_passthrough): Remove it.
6898         * regcache.h (cpy_no_passthrough): Remove it.
6899         (regcache_dup, regcache_cpy): Update comments.
6900
6901 2017-07-18  Pedro Alves  <palves@redhat.com>
6902
6903         * remote-sim.c (sim_command_completer): Adjust to work with a
6904         completion_tracker instead of a VEC.
6905
6906 2017-07-17  Pedro Alves  <palves@redhat.com>
6907
6908         * completer.c (complete_source_filenames): New function.
6909         (complete_address_and_linespec_locations): New function.
6910         (location_completer): Use complete_address_and_linespec_locations.
6911         (completion_tracker::build_completion_result): Honor the tracker's
6912         request to suppress append.
6913         * completer.h (completion_tracker::suppress_append_ws)
6914         (completion_tracker::set_suppress_append_ws): New methods.
6915         (completion_tracker::m_suppress_append_ws): New field.
6916         (complete_source_filenames): New declaration.
6917         * linespec.c (linespec_complete_what): New.
6918         (struct ls_parser) <complete_what, completion_word,
6919         completion_quote_char, completion_quote_end, completion_tracker>:
6920         New fields.
6921         (string_find_incomplete_keyword_at_end): New.
6922         (linespec_lexer_lex_string): Record quote char.  If in completion
6923         mode, don't throw.
6924         (linespec_lexer_consume_token): Advance the completion word point.
6925         (linespec_lexer_peek_token): Save/restore completion info.
6926         (save_stream_and_consume_token): New.
6927         (set_completion_after_number): New.
6928         (linespec_parse_basic): Set what to complete next depending on
6929         token.  Handle function and label completions specially.
6930         (parse_linespec): Disable objc shortcut in completion mode.  Set
6931         what to complete next depending on token type.  Skip keyword if in
6932         completion mode.
6933         (complete_linespec_component, linespec_complete): New.
6934         * linespec.h (linespec_complete): Declare.
6935
6936 2017-07-17  Pedro Alves  <palves@redhat.com>
6937
6938         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6939         Handle 'operator<' / 'operator<<'.
6940
6941 2017-07-17  Pedro Alves  <palves@redhat.com>
6942
6943         * completer.c (collect_explicit_location_matches): Handle
6944         MATCH_LABEL.
6945         (convert_explicit_location_to_linespec): New, factored out from
6946         ...
6947         (convert_explicit_location_to_sals): ... this.
6948         (complete_label): New.
6949         (linespec_complete_label, find_label_symbols_in_block): New.
6950         (find_label_symbols): Add completion_mode parameter and adjust to
6951         call find_label_symbols_in_block.
6952         * linespec.h (linespec_complete_label): Declare.
6953
6954 2017-07-17  Pedro Alves  <palves@redhat.com>
6955
6956         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6957         complete_symbol_mode parameter.
6958         * cli/cli-cmds.c (complete_command): Get the completion result out
6959         of the handle_brkchars tracker if used a custom word point.
6960         * completer.c: Include "linespec.h".
6961         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6962         (advance_to_expression_complete_word_point): New.
6963         (completion_tracker::completes_to_completion_word): New.
6964         (complete_files_symbols): Pass down
6965         complete_symbol_mode::EXPRESSION.
6966         (explicit_options, probe_options): New.
6967         (collect_explicit_location_matches): Complete on the
6968         explictit_loc->foo instead of word.  Use
6969         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6970         keyword and options completions.
6971         (backup_text_ptr): Delete.
6972         (skip_keyword): New.
6973         (complete_explicit_location): Remove 'word' parameter.  Add
6974         language, quoted_arg_start and quoted_arg_end parameters.
6975         Rewrite, parsing left to right.
6976         (location_completer): Rewrite.
6977         (location_completer_handle_brkchars): New function.
6978         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6979         (enum complete_line_internal_reason): Adjust comments.
6980         (completion_tracker::discard_completions): New.
6981         (completer_handle_brkchars_func_for_completer): Handle
6982         location_completer.
6983         (gdb_custom_word_point_brkchars)
6984         (gdb_org_rl_basic_quote_characters): New.
6985         (gdb_completion_word_break_characters_throw)
6986         (completion_find_completion_word): Handle trackers that use a
6987         custom word point.
6988         (completion_tracker::advance_custom_word_point_by): New.
6989         (completion_tracker::build_completion_result): Don't rely on
6990         readline appending the quote char.
6991         (gdb_rl_attempted_completion_function_throw): Handle trackers that
6992         use a custom word point.
6993         (gdb_rl_attempted_completion_function): Restore
6994         rl_basic_quote_characters.
6995         * completer.h (class completion_tracker): Extend intro comment.
6996         (completion_tracker::set_quote_char)
6997         (completion_tracker::quote_char)
6998         (completion_tracker::set_use_custom_word_point)
6999         (completion_tracker::use_custom_word_point)
7000         (completion_tracker::custom_word_point)
7001         (completion_tracker::set_custom_word_point)
7002         (completion_tracker::advance_custom_word_point_by)
7003         (completion_tracker::completes_to_completion_word)
7004         (completion_tracker::discard_completions): New methods.
7005         (completion_tracker::m_quote_char)
7006         (completion_tracker::m_use_custom_word_point)
7007         (completion_tracker::m_custom_word_point): New fields.
7008         (advance_to_expression_complete_word_point): Declare.
7009         * f-lang.c (f_collect_symbol_completion_matches): Add
7010         complete_symbol_mode parameter.
7011         * language.h (struct language_defn)
7012         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7013         parameter.
7014         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7015         (linespec_complete_function): New function.
7016         (linespec_lexer_lex_keyword): Adjust.
7017         * linespec.h (linespec_keywords, linespec_complete_function): New
7018         declarations.
7019         * location.c (find_end_quote): New function.
7020         (explicit_location_lex_one): Add explicit_completion_info
7021         parameter.  Save quoting info.  Don't throw if being called for
7022         completion.  Don't handle Ada operators here.
7023         (is_cp_operator, skip_op_false_positives, first_of)
7024         (explicit_location_lex_one_function): New function.
7025         (string_to_explicit_location): Replace 'dont_throw' parameter with
7026         an explicit_completion_info pointer parameter.  Handle it.  Don't
7027         use explicit_location_lex_one to lex function names.  Use
7028         explicit_location_lex_one_function instead.
7029         * location.h (struct explicit_completion_info): New.
7030         (string_to_explicit_location): Replace 'dont_throw' parameter with
7031         an explicit_completion_info pointer parameter.
7032         * symtab.c (default_collect_symbol_completion_matches_break_on):
7033         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7034         (default_collect_symbol_completion_matches)
7035         (collect_symbol_completion_matches): Add complete_symbol_mode
7036         parameter.
7037         (collect_symbol_completion_matches_type): Pass down
7038         complete_symbol_mode::EXPRESSION.
7039         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7040         parameter.  Handle LINESPEC mode.
7041         * symtab.h (complete_symbol_mode): New.
7042         (default_collect_symbol_completion_matches_break_on)
7043         (default_collect_symbol_completion_matches)
7044         (collect_symbol_completion_matches)
7045         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7046         parameter.
7047
7048 2017-07-17  Pedro Alves  <palves@redhat.com>
7049
7050         * utils.c (enum class strncmp_iw_mode): New.
7051         (strcmp_iw): Rename to ...
7052         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7053         parameters.  Handle them.
7054         (strncmp_iw): New.
7055         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7056         * utils.h (strncmp_iw): Declare.
7057         (strcmp_iw): Move describing comments here.
7058
7059 2017-07-17  Pedro Alves  <palves@redhat.com>
7060
7061         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7062         CP_OPERATOR_STR.
7063         * c-typeprint.c (is_type_conversion_operator): Use
7064         CP_OPERATOR_STR.
7065         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7066         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7067         CP_OPERATOR_LEN.
7068         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7069         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7070         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7071         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7072         CP_OPERATOR_STR.
7073         * location.c: Include "cp-support.h".
7074         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7075         CP_OPERATOR_STR.
7076         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7077         CP_OPERATOR_LEN.
7078
7079 2017-07-17  Pedro Alves  <palves@redhat.com>
7080
7081         * cli/cli-cmds.c (complete_command): Use a completion tracker
7082         along with completion_find_completion_word for handle_brkchars
7083         phase.
7084         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7085         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7086         (struct gdb_rl_completion_word_info): New.
7087         (gdb_rl_find_completion_word): New.
7088         (completion_find_completion_word): New.
7089         * completer.h (completion_find_completion_word): Declare.
7090
7091 2017-07-17  Pedro Alves  <palves@redhat.com>
7092
7093         * ada-lang.c (symbol_completion_match): Adjust comments.
7094         (symbol_completion_add): Replace vector parameter with
7095         completion_tracker parameter.  Use it.
7096         (ada_make_symbol_completion_list): Rename to...
7097         (ada_collect_symbol_completion_matches): ... this.  Add
7098         completion_tracker parameter and use it.
7099         (ada_language_defn): Adjust.
7100         * break-catch-syscall.c (catch_syscall_completer): Adjust
7101         prototype and work with completion_tracker instead of VEC.
7102         * breakpoint.c (condition_completer): Adjust prototype and work
7103         with completion_tracker instead of VEC.
7104         * c-lang.c (c_language_defn, cplus_language_defn)
7105         (asm_language_defn, minimal_language_defn): Adjust to renames.
7106         * cli/cli-cmds.c (complete_command): Rework using
7107         completion_tracker.  Catch exceptions when completing.
7108         * cli/cli-decode.c (integer_unlimited_completer)
7109         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7110         with completion_tracker instead of VEC.
7111         * command.h (struct completion_tracker): Forward declare.
7112         (completer_ftype, completer_handle_brkchars_ftype): Change
7113         types.
7114         (complete_on_cmdlist, complete_on_enum): Adjust.
7115         * completer.c: Include <algorithm>.
7116         (struct gdb_completer_state): New.
7117         (current_completion): New global.
7118         (readline_line_completion_function): Delete.
7119         (noop_completer, filename_completer)
7120         (filename_completer_handle_brkchars, complete_files_symbols)
7121         (linespec_location_completer): Adjust to work with a
7122         completion_tracker instead of a VEC.
7123         (string_or_empty): New.
7124         (collect_explicit_location_matches): Adjust to work with a
7125         completion_tracker instead of a VEC.
7126         (explicit_location_completer): Rename to ...
7127         (complete_explicit_location): ... this and adjust to work with a
7128         completion_tracker instead of a VEC.
7129         (location_completer): Adjust to work with a completion_tracker
7130         instead of a VEC.
7131         (add_struct_fields): Adjust to work with a completion_list instead
7132         of VEC.
7133         (expression_completer): Rename to ...
7134         (complete_expression): ... this and adjust to work with a
7135         completion_tracker instead of a VEC.  Use complete_files_symbols.
7136         (expression_completer): Reimplement on top of complete_expression.
7137         (symbol_completer): Adjust to work with a completion_tracker
7138         instead of a VEC.
7139         (enum complete_line_internal_reason): Add describing comments.
7140         (complete_line_internal_normal_command): Adjust to work with a
7141         completion_tracker instead of a VEC.
7142         (complete_line_internal): Rename to ...
7143         (complete_line_internal_1): ... this and adjust to work with a
7144         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7145         handle_brkchars phase.
7146         (new_completion_tracker): Delete.
7147         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7148         complete_line_internal_1.
7149         (free_completion_tracker): Delete.
7150         (INITIAL_COMPLETION_HTAB_SIZE): New.
7151         (completion_tracker::completion_tracker)
7152         (completion_tracker::~completion_tracker): New.
7153         (maybe_add_completion): Delete.
7154         (completion_tracker::maybe_add_completion)
7155         (completion_tracker::add_completion)
7156         (completion_tracker::add_completions): New.
7157         (throw_max_completions_reached_error): Delete.
7158         (complete_line): Adjust to work with a completion_tracker instead
7159         of a VEC.  Don't create a completion_tracker_t or check for max
7160         completions here.
7161         (command_completer, command_completer_handle_brkchars)
7162         (signal_completer, reg_or_group_completer_1)
7163         (reg_or_group_completer, default_completer_handle_brkchars):
7164         Adjust to work with a completion_tracker.
7165         (gdb_completion_word_break_characters_throw): New.
7166         (gdb_completion_word_break_characters): Reimplement.
7167         (line_completion_function): Delete.
7168         (completion_tracker::recompute_lowest_common_denominator)
7169         (expand_preserving_ws)
7170         (completion_tracker::build_completion_result)
7171         (completion_result::completion_result)
7172         (completion_result::completion_result)
7173         (completion_result::~completion_result)
7174         (completion_result::completion_result)
7175         (completion_result::release_match_list, compare_cstrings)
7176         (completion_result::sort_match_list)
7177         (completion_result::reset_match_list)
7178         (gdb_rl_attempted_completion_function_throw)
7179         (gdb_rl_attempted_completion_function): New.
7180         * completer.h (completion_list, struct completion_result)
7181         (class completion_tracker): New.
7182         (complete_line): Add completion_tracker parameter.
7183         (readline_line_completion_function): Delete.
7184         (gdb_rl_attempted_completion_function): New.
7185         (noop_completer, filename_completer, expression_completer)
7186         (location_completer, symbol_completer, command_completer)
7187         (signal_completer, reg_or_group_completer): Update prototypes.
7188         (completion_tracker_t, new_completion_tracker)
7189         (make_cleanup_free_completion_tracker): Delete.
7190         (enum maybe_add_completion_enum): Delete.
7191         (maybe_add_completion): Delete.
7192         (throw_max_completions_reached_error): Delete.
7193         * corefile.c (complete_set_gnutarget): Adjust to work with a
7194         completion_tracker instead of a VEC.
7195         * cp-abi.c (cp_abi_completer): Adjust to work with a
7196         completion_tracker instead of a VEC.
7197         * d-lang.c (d_language_defn): Adjust.
7198         * disasm.c (disassembler_options_completer): Adjust to work with a
7199         completion_tracker instead of a VEC.
7200         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7201         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7202         with a completion_tracker instead of a VEC.
7203         (f_language_defn): Adjust.
7204         * go-lang.c (go_language_defn): Adjust.
7205         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7206         Adjust to work with a completion_tracker instead of a VEC.
7207         * infrun.c (handle_completer): Likewise.
7208         * interps.c (interpreter_completer): Likewise.
7209         * interps.h (interpreter_completer): Likewise.
7210         * language.c (unknown_language_defn, auto_language_defn)
7211         (local_language_defn): Adjust.
7212         * language.h (language_defn::la_make_symbol_completion_list):
7213         Rename to ...
7214         (language_defn::la_collect_symbol_completion_matches): ... this
7215         and adjust to work with a completion_tracker instead of a VEC.
7216         * m2-lang.c (m2_language_defn): Adjust.
7217         * objc-lang.c (objc_language_defn): Adjust.
7218         * opencl-lang.c (opencl_language_defn): Adjust.
7219         * p-lang.c (pascal_language_defn): Adjust.
7220         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7221         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7222         with a completion_tracker.
7223         * rust-lang.c (rust_language_defn): Adjust.
7224         * symtab.c (free_completion_list, do_free_completion_list)
7225         (return_val, completion_tracker): Delete.
7226         (completion_list_add_name, completion_list_add_symbol)
7227         (completion_list_add_msymbol, completion_list_objc_symbol)
7228         (completion_list_add_fields, add_symtab_completions): Add
7229         completion_tracker parameter and use it.
7230         (default_make_symbol_completion_list_break_on_1): Rename to...
7231         (default_collect_symbol_completion_matches_break_on): ... this.
7232         Add completion_tracker parameter and use it instead of allocating
7233         a completion tracker here.
7234         (default_make_symbol_completion_list_break_on): Delete old
7235         implementation.
7236         (default_make_symbol_completion_list): Delete.
7237         (default_collect_symbol_completion_matches): New.
7238         (make_symbol_completion_list): Delete.
7239         (collect_symbol_completion_matches): New.
7240         (make_symbol_completion_type): Rename to ...
7241         (collect_symbol_completion_matches_type): ... this.  Add
7242         completion_tracker parameter and use it instead of VEC.
7243         (make_file_symbol_completion_list_1): Rename to...
7244         (collect_file_symbol_completion_matches): ... this.  Add
7245         completion_tracker parameter and use it instead of VEC.
7246         (make_file_symbol_completion_list): Delete.
7247         (add_filename_to_list): Use completion_list instead of a VEC.
7248         (add_partial_filename_data::list): Now a completion_list.
7249         (make_source_files_completion_list): Work with a completion_list
7250         instead of a VEC.
7251         * symtab.h: Include "completer.h".
7252         (default_make_symbol_completion_list_break_on)
7253         (default_make_symbol_completion_list, make_symbol_completion_list)
7254         (make_symbol_completion_type, make_file_symbol_completion_list)
7255         (make_source_files_completion_list): Delete.
7256         (default_collect_symbol_completion_matches_break_on)
7257         (default_collect_symbol_completion_matches)
7258         (collect_symbol_completion_matches)
7259         (collect_symbol_completion_matches_type)
7260         (collect_file_symbol_completion_matches)
7261         (make_source_files_completion_list): New.
7262         * top.c (init_main): Don't install a rl_completion_entry_function
7263         hook.  Install a rl_attempted_completion_function hook instead.
7264         * tui/tui-layout.c (layout_completer): Adjust to work with a
7265         completion_tracker.
7266         * tui/tui-regs.c (tui_reggroup_completer):
7267         * tui/tui-win.c (window_name_completer, focus_completer)
7268         (winheight_completer): Adjust to work with a completion_tracker.
7269         * value.c: Include "completer.h".
7270         (complete_internalvar): Adjust to work with a completion_tracker.
7271         * value.h (complete_internalvar): Likewise.
7272
7273 2017-07-17  Pedro Alves  <palves@redhat.com>
7274
7275         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7276         renames.
7277         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7278         comments to completer_ftype's declaration.
7279         <completer_handle_brkchars>: Change type to
7280         completer_handle_brkchars_ftype.
7281         * command.h (completer_ftype): Add describing comment and give
7282         names to parameters.
7283         (completer_ftype_void): Rename to ...
7284         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7285         (set_cmd_completer_handle_brkchars): Adjust.
7286         * completer.c (filename_completer_handle_brkchars): New function.
7287         (complete_line_internal_normal_command): New function, factored
7288         out from ...
7289         (complete_line_internal): ... here.
7290         (command_completer_handle_brkchars)
7291         (default_completer_handle_brkchars)
7292         (completer_handle_brkchars_func_for_completer): New functions.
7293         * completer.h (set_gdb_completion_word_break_characters): Delete
7294         declaration.
7295         (completer_handle_brkchars_func_for_completer): New declaration.
7296         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7297         completer_handle_brkchars_func_for_completer.
7298
7299 2017-07-17  Pedro Alves  <palves@redhat.com>
7300
7301         * completer.c (symbol_completer): New function, based on
7302         make_symbol_completion_list_fn.
7303         * completer.h (symbol_completer): New declaration.
7304         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7305         * python/py-cmd.c (completers): Adjust.
7306         * symtab.c (make_symbol_completion_list_fn): Delete.
7307         * symtab.h (make_symbol_completion_list_fn): Delete.
7308         * cli/cli-decode.c (add_cmd): Adjust.
7309
7310 2017-07-17  Pedro Alves  <palves@redhat.com>
7311
7312         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7313         * dwarf2read.c: Include "filename-seen-cache.h".
7314         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7315         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7316         * filename-seen-cache.c: New file.
7317         * filename-seen-cache.h: New file.
7318         * symtab.c: Include "filename-seen-cache.h".
7319         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7320         (create_filename_seen_cache, clear_filename_seen_cache)
7321         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7322         to filename-seen-cache.h/filename-seen-cache.c.
7323         (output_source_filename, sources_info)
7324         (maybe_add_partial_symtab_filename)
7325         (make_source_files_completion_list): Adjust to use
7326         filename_seen_cache.
7327
7328 2017-07-17  Pedro Alves  <palves@redhat.com>
7329
7330         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7331         fields.
7332         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7333         dwarf2_debug_sections*)): New.
7334         (dwarf2_per_objfile::dwarf2_per_objfile(const
7335         dwarf2_per_objfile&)): Declare as deleted.
7336         (dwarf2_per_objfile::operator=): Declare as deleted.
7337         (dwarf2_per_objfile::dwarf2_per_objfile)
7338         (dwarf2_per_objfile::~dwarf2_per_objfile)
7339         (dwarf2_per_objfile::free_cached_comp_units): New.
7340         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7341         ctor.  Call dwarf2_per_objfile's ctor manually.
7342         (dwarf2_locate_sections): Deleted/refactored as ...
7343         (dwarf2_per_objfile::locate_sections): ... this new method.
7344         (free_cached_comp_units): Defer to
7345         dwarf2_per_objfile::free_cached_comp_units.
7346         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7347
7348 2017-07-14  Tom Tromey  <tom@tromey.com>
7349
7350         PR rust/21764:
7351         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7352         parameter.
7353         <UNOP_SIZEOF>: Split into separate case.
7354         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7355
7356 2017-07-14  Tom Tromey  <tom@tromey.com>
7357
7358         PR rust/21763:
7359         * symtab.c (symbol_matches_domain): Add language_rust to special
7360         case.
7361         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7362         treat LOC_TYPEDEF symbols as variables.
7363
7364 2017-07-14  Pedro Alves  <palves@redhat.com>
7365
7366         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7367         symtabs matching all symtabs with SRCFILE as file name instead of
7368         only considering the first hit, with lookup_symtab.
7369
7370 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7371
7372         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7373         operator_name parameters.
7374         (gen_expr): Update function call.
7375
7376 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7377
7378         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7379         parameter.
7380         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7381         Likewise.
7382         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7383         parameter, use agent_expr::gdbarch instead, update function
7384         calls.
7385         (locexpr_tracepoint_var_ref): Likewise.
7386         (loclist_tracepoint_var_ref): Likewise.
7387         * ax-gdb.c (gen_trace_static_fields): Likewise.
7388         (gen_traced_pop): Likewise.
7389         (gen_frame_args_address): Likewise.
7390         (gen_frame_locals_address): Likewise.
7391         (gen_var_ref): Likewise.
7392         (gen_struct_ref_recursive): Likewise.
7393         (gen_static_field): Likewise.
7394         (gen_maybe_namespace_elt): Likewise.
7395         (gen_expr): Likewise.
7396         (gen_trace_for_var): Likewise.
7397         (gen_trace_for_expr): Likewise.
7398         (gen_trace_for_return_address): Likewise.
7399
7400 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7401
7402         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7403         parameter.
7404         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7405
7406 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7407
7408         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7409         from ax, update calls.
7410         (gen_usual_arithmetic): Likewise.
7411         (gen_integral_promotions): Likewise.
7412         (gen_bitfield_ref): Likewise.
7413         (gen_primitive_field): Likewise.
7414         (gen_struct_ref_recursive): Likewise.
7415         (gen_struct_ref): Likewise.
7416         (gen_maybe_namespace_elt): Likewise.
7417         (gen_struct_elt_for_reference): Likewise.
7418         (gen_namespace_elt): Likewise.
7419         (gen_aggregate_elt_ref): Likewise.
7420         (gen_expr): Get gdbarch from ax, update calls.
7421         (gen_expr_binop_rest): Likewise.
7422
7423 2017-07-13  Pedro Alves  <palves@redhat.com>
7424
7425         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7426         as default tdesc.
7427         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7428         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7429         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7430         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7431         tdep.
7432         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7433         Get final tdesc from the tdep.
7434         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7435         default tdesc.
7436         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7437         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7438         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7439         Use it as default tdesc.
7440         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7441         down to amd_init_abi.  No longer handle fallback tdesc here.
7442         * amd64-tdep.h (tdesc_x32): Declare.
7443         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7444         parameter.
7445         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7446         as default tdesc.
7447
7448 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7449
7450         * s390-linux-tdep.c (s390_process_record): Add support for
7451         instructions new in arch12.
7452
7453 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7454
7455         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7456         PT_GETFSBASE and PT_GETGSBASE.
7457         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7458         PT_SETGSBASE.
7459
7460 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7461
7462         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7463         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7464         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7465         those rules.
7466         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7467         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7468         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7469         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7470         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7471         * features/i386/amd64.xml: Add 64bit-segments.xml.
7472         * features/i386/amd64-avx-avx512.c: Regenerated.
7473         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7474         * features/i386/amd64-avx-mpx.c: Regenerated.
7475         * features/i386/amd64-avx.c: Regenerated.
7476         * features/i386/amd64-mpx.c: Regenerated.
7477         * features/i386/amd64.c: Regenerated.
7478         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7479         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7480         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7481         * regformats/i386/amd64-avx.dat: Regenerated.
7482         * regformats/i386/amd64-mpx.dat: Regenerated.
7483         * regformats/i386/amd64.dat: Regenerated.
7484
7485 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7486
7487         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7488         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7489
7490 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7491
7492         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7493         unsetenv.
7494         * gnulib/aclocal.m4: Regenerate.
7495         * gnulib/config.in: Regenerate.
7496         * gnulib/configure: Regenerate.
7497         * gnulib/import/Makefile.am: Regenerate.
7498         * gnulib/import/Makefile.in: Regenerate.
7499         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7500         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7501         * gnulib/import/m4/environ.m4: New file.
7502         * gnulib/import/m4/setenv.m4: New file.
7503         * gnulib/import/setenv.c: New file.
7504         * gnulib/import/unsetenv.c: New file.
7505
7506 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7507
7508         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7509         address when op is DW_OP_addr.
7510
7511 2017-07-09  Tom Tromey  <tom@tromey.com>
7512
7513         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7514         check and apply to outer type.
7515
7516 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7517
7518         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7519         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7520         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7521         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7522
7523 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7524
7525         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7526
7527 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7528
7529         * corelow.c (get_core_siginfo): Remove.
7530         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7531         instead of get_core_siginfo.
7532         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7533         * gdbarch.h: Re-generate.
7534         * gdbarch.c: Re-generate.
7535         * linux-tdep.c (linux_core_xfer_siginfo): New.
7536         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7537
7538 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7539
7540         * corelow.c (thread_section_name): Move to ...
7541         * gdbcore.h (thread_section_name): ... here.
7542
7543 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7544
7545         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7546         (struct siginfo32): New.
7547         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7548         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7549         via ptrace(PT_LWPINFO).
7550
7551 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7552
7553         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7554         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7555         (fbsd_get_siginfo_type): New.
7556         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7557         (_initialize_fbsd_tdep): New.
7558
7559 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7560
7561         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7562         a singular dwo_unit*) to support multiple CUs in the same way that
7563         multiple TUs are supported.
7564         (create_cus_hash_table): Replace create_dwo_cu with a function for
7565         parsing multiple CUs from a DWO file.
7566         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7567         create_dwo_cu.
7568         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7569         htab_find, rather than comparing the signature to a singleton CU in
7570         the dwo_file.
7571
7572 2017-07-06  Pedro Alves  <palves@redhat.com>
7573
7574         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7575
7576 2017-07-04  Pedro Alves  <palves@redhat.com>
7577
7578         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7579         * gdbtypes.h (TYPE_STATIC): Delete.
7580         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7581         is_synchronized, is_native>: Delete.
7582         <dummy>: Bump.
7583         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7584         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7585         (TYPE_FN_FIELD_ABSTRACT): Delete.
7586
7587 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7588
7589         * buffer.h (buffer_finish): Fix spelling mistakes.
7590
7591 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7592
7593         * .dir-locals.el: Automatically switch to C-style comments in
7594         versions of Emacs that support the feature.
7595
7596 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7597             Pedro Alves  <palves@redhat.com>
7598
7599         PR cli/21688
7600         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7601         (process_next_line): New variable 'inline_cmd'.
7602         Adjust 'if' clauses for "python", "compile" and "guile" to use
7603         'command_name_equals' and check for '!inline_cmd'.
7604
7605 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7606
7607         PR cli/21688
7608         * cli/cli-script.c (command_name_equals_not_inline): New function.
7609         (process_next_line): Adjust 'if' clauses for "python", "compile"
7610         and "guile" to use command_name_equals_not_inline.
7611
7612 2017-06-29  Pedro Alves  <palves@redhat.com>
7613
7614         * completer.c (expression_completer): Call
7615         linespec_location_completer instead of location_completer.
7616
7617 2017-06-29  Pedro Alves  <palves@redhat.com>
7618
7619         * completer.c (expression_completer): Remove code that recomputes
7620         'text' from 'word'.
7621
7622 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7623
7624         * regformats/regdat.sh: Generate code with
7625         "ifndef IN_PROCESS_AGENT".
7626
7627 2017-06-28  Pedro Alves  <palves@redhat.com>
7628
7629         * command.h: Include "common/scoped_restore.h".
7630
7631 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7632
7633         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7634         instead of obstack_grow.
7635
7636 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7637
7638         PR gdb/21337
7639         * symfile.c (reread_symbols): Call objfiles_changed just before
7640         read_symbols.
7641
7642 2017-06-27  Pedro Alves  <palves@redhat.com>
7643
7644         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7645         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7646         (completion_list_add_symbol, completion_list_add_msymbol):
7647         ... these new functions.
7648         (add_symtab_completions)
7649         (default_make_symbol_completion_list_break_on_1): Adjust.
7650
7651 2017-06-27  Pedro Alves  <palves@redhat.com>
7652
7653         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7654         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7655         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7656         dtor.
7657         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7658         'storage_obstack' field an auto_obstack.  In-class initialize all
7659         non-bitfield fields.  Make minsyms_read bool.
7660         * symfile.c (read_symbols): Adjust.
7661
7662 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7663
7664         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7665         (gdbsim_store_register): Likewise.
7666
7667 2017-06-27  Pedro Alves  <palves@redhat.com>
7668
7669         * c-exp.y (name_obstack): Now an auto_obstack.
7670         (yylex): Use auto_obstack::clear.
7671         (c_parse): Use auto_obstack::clear instead of reinitializing and
7672         freeing the obstack.
7673         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7674         * d-exp.y (name_obstack): Now an auto_obstack.
7675         (yylex): Use auto_obstack::clear.
7676         (d_parse): Use auto_obstack::clear instead of reinitializing and
7677         freeing the obstack.
7678         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7679         auto_obstack.
7680         * dwarf2read.c (create_addrmap_from_index)
7681         (dwarf2_build_psymtabs_hard)
7682         (update_enumeration_type_from_children): Likewise.
7683         * gdb_obstack.h (auto_obstack): New type.
7684         * go-exp.y (name_obstack): Now an auto_obstack.
7685         (build_packaged_name): Use auto_obstack::clear.
7686         (go_parse): Use auto_obstack::clear instead of reinitializing and
7687         freeing the obstack.
7688         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7689         auto_obstack.
7690         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7691         * rust-exp.y (work_obstack): Now an auto_obstack.
7692         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7693         reinitializing and freeing the obstack.
7694         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7695         (host_char_to_target): Use auto_obstack.
7696         * utils.h (make_cleanup_obstack_free): Delete declaration.
7697         * valprint.c (generic_emit_char, generic_printstr): Use
7698         auto_obstack.
7699
7700 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7701
7702         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7703         thread.
7704         (darwin_init_thread_list): Don't update dummy thread.
7705         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7706
7707 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7708
7709         * record-full.c (netorder16): Remove.
7710
7711 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7712
7713         * common/diagnostics.h: Define macros for GCC.
7714         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7715         * common/vec.h: Include diagnostics.h.
7716         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7717         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7718         warning.
7719
7720 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7721
7722         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7723         New macro.
7724         * ada-lex.l: Ignore deprecated register warnings.
7725
7726 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7727
7728         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7729         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7730
7731 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7732
7733         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7734         its own line.
7735
7736 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7737
7738         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7739
7740 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7741
7742         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7743         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7744         (xtensa_register_read_masked): Likewise.
7745
7746 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7747
7748         * common/environ.c (gdb_environ::unset): Update comment.
7749
7750 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7751
7752         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7753         registers.
7754
7755 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7756
7757         * record-full.c (record_full_exec_insn): Use byte_vector.
7758
7759 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7760
7761         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7762         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7763
7764 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7765
7766         * remote.c (cached_reg): Move from here...
7767         * regcache.h (cached_reg): ...to here.
7768         * python/py-unwind.c (struct reg_info): Remove.
7769         (cached_frame_info): Use cached_reg_t.
7770         (pyuw_prev_register): Likewise.
7771         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7772         (pyuw_dealloc_cache): Free all registers.
7773
7774 2017-06-22  Pedro Alves  <palves@redhat.com>
7775             Simon Marchi  <simon.marchi@ericsson.com>
7776
7777         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7778         warning.
7779         * common/diagnostics.h: New file.
7780
7781 2017-06-22  Pedro Alves  <palves@redhat.com>
7782
7783         * common/agent.h: Add include guards.
7784
7785 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7786
7787         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7788         talk about addressable units instead of bytes.
7789
7790 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7791
7792         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7793         of '::const_iterator'.
7794
7795 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7796
7797         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7798         'unittests/environ-selftests.c'.
7799         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7800         * charset.c (find_charset_names): Declare object 'iconv_env'.
7801         Update code to use 'iconv_env' object.  Remove call to
7802         'free_environ'.
7803         * common/environ.c: Include <utility>.
7804         (make_environ): Delete function.
7805         (free_environ): Delete function.
7806         (gdb_environ::clear): New function.
7807         (gdb_environ::operator=): New function.
7808         (gdb_environ::get): Likewise.
7809         (environ_vector): Delete function.
7810         (set_in_environ): Delete function.
7811         (gdb_environ::set): New function.
7812         (unset_in_environ): Delete function.
7813         (gdb_environ::unset): New function.
7814         (gdb_environ::envp): Likewise.
7815         * common/environ.h: Include <vector>.
7816         (struct gdb_environ): Delete; transform into...
7817         (class gdb_environ): ... this class.
7818         (free_environ): Delete prototype.
7819         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7820         environ_vector): Likewise.
7821         * infcmd.c (run_command_1): Update code to call
7822         'envp' from 'gdb_environ' class.
7823         (environment_info): Update code to call methods from 'gdb_environ'
7824         class.
7825         (unset_environment_command): Likewise.
7826         (path_info): Likewise.
7827         (path_command): Likewise.
7828         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7829         (inferior::inferior): Initialize 'environment' using the host's
7830         information.
7831         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7832         Include "environ.h".
7833         (class inferior) <environment>: Change type from 'struct
7834         gdb_environ' to 'gdb_environ'.
7835         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7836         methods from 'gdb_environ' class.
7837         * solib.c (solib_find_1): Likewise
7838         * unittests/environ-selftests.c: New file.
7839
7840 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7841
7842         * features/i386/i386-linux.xml: Exchange the order of including
7843         32bit-linux.xml and 32bit-sse.xml.
7844         * features/i386/i386-linux.c: Regenerated.
7845
7846 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7847
7848         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7849         Delete copy ctor and assignment operator.
7850         (tdesc_type): Likewise.
7851         (tdesc_feature): Likewise.
7852         (tdesc_free_reg): Remove.
7853         (tdesc_create_reg): Use new.
7854         (tdesc_free_type): Remove.
7855         (tdesc_create_vector): Use new.
7856         (tdesc_create_union): Likewise.
7857         (tdesc_create_flags): Likewise.
7858         (tdesc_create_enum): Likewise.
7859         (tdesc_free_feature): Delete.
7860         (free_target_description): Use delete.
7861
7862 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7863
7864         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7865         registers.
7866
7867 2017-06-19  Pedro Alves  <palves@redhat.com>
7868
7869         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7870         after gdb::unlinker.
7871
7872 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7873
7874         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7875         gdb_environ to access an environment variable.
7876
7877 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7878
7879         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7880         gdb_byte*.
7881
7882 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7883
7884         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7885
7886 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7887
7888         * configure: Re-generate.
7889         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7890
7891 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7892
7893         * configure: Re-generate.
7894         * warning.m4: Pass -Werror to compiler when checking for
7895         supported warning flags.
7896
7897 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7898
7899         * Makefile.in (COMPILE.pre): Add "-x c++".
7900
7901 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7902             Pedro Alves  <palves@redhat.com>
7903             Yao Qi  <yao.qi@linaro.org>
7904
7905         * defs.h (RequireLongest): New.
7906         (extract_integer): Declare function template.
7907         (extract_signed_integer): Remove the declaration, but define it
7908         static inline.
7909         (extract_unsigned_integer): Likewise.
7910         (store_integer): Declare function template.
7911         (store_signed_integer): Remove the declaration, but define it
7912         static inline.
7913         (store_unsigned_integer): Likewise.
7914         * findvar.c (extract_integer): New function template.
7915         (extract_signed_integer): Remove.
7916         (extract_unsigned_integer): Remove.
7917         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7918         instantiations.
7919         (store_integer): New function template.
7920         (store_signed_integer): Remove.
7921         (store_unsigned_integer): Remove.
7922         (store_integer): Explicit instantiations.
7923         * regcache.c (regcache_raw_read_signed): Update.
7924         (regcache::raw_read): New function.
7925         (regcache::raw_read_signed): Remove.
7926         (regcache::raw_read_unsigned): Remove.
7927         (regcache_raw_read_unsigned): Update.
7928         (regcache_raw_write_unsigned): Update.
7929         (regcache::raw_write_signed): Remove.
7930         (regcache::raw_write): New function.
7931         (regcache_cooked_read_signed): Update.
7932         (regcache::raw_write_unsigned): Remove.
7933         (regcache::cooked_read_signed): Remove.
7934         (regcache_cooked_read_unsigned): Update.
7935         (regcache::cooked_read_unsigned): Remove.
7936         (regcache_cooked_write_signed): Update.
7937         (regcache_cooked_write_unsigned): Update.
7938         * regcache.h (regcache) <raw_read_signed>: Remove.
7939         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7940         <raw_read, raw_write>: New.
7941         <cooked_read_signed, cooked_write_signed>: Remove.
7942         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7943         <cooked_read, cooked_write>: New.
7944         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7945         (sh64_pseudo_register_write): Update.
7946
7947 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7948
7949         * arc-tdep.c (arc_disassembler_options): New variable.
7950         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7951         of default_print_insn.
7952         (arc_delayed_print_insn): Set info->section when needed,
7953         use default_print_insn to retrieve a disassembler.
7954
7955 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7956
7957         PR gdb/21574
7958         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7959         to mention $SHELL and startup-with-shell.
7960
7961 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7962
7963         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7964
7965 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7966
7967         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7968         default_print_insn instead of print_insn_aarch64.
7969         * arm-tdep.c (gdb_print_insn_arm): Call
7970         default_print_insn instead of print_insn_big_arm
7971         and print_insn_little_arm.
7972         * i386-tdep.c (i386_print_insn): Call default_print_insn
7973         instead of print_insn_i386.
7974         * ia64-tdep.c (ia64_print_insn): Call
7975         default_print_insn instead of print_insn_ia64.
7976         * mips-tdep.c (gdb_print_insn_mips): Call
7977         default_print_insn instead of print_insn_big_mips
7978         and print_insn_little_mips.
7979         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7980         instead of print_insn_spu.
7981
7982 2017-06-14  Pedro Alves  <palves@redhat.com>
7983
7984         * ada-lang.c: Include "common/byte-vector.h".
7985         (ada_value_primitive_packed_val): Use gdb::byte_vector.
7986         * charset.c (wchar_iterator::iterate): Resize the vector instead
7987         of reserving it.
7988         * common/byte-vector.h: Include "common/def-vector.h".
7989         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7990         * cli/cli-dump.c: Include "common/byte-vector.h".
7991         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7992         * common/byte-vector.h: New file.
7993         * common/def-vector.h: New file.
7994         * common/default-init-alloc.h: New file.
7995         * dwarf2loc.c: Include "common/byte-vector.h".
7996         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7997         instead of reserving it.
7998         * dwarf2read.c: Include "common/byte-vector.h".
7999         (data_buf::m_vec): Now a gdb::byte_vector.
8000         * gdb_regex.c: Include "common/def-vector.h".
8001         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8002         * mi/mi-main.c: Include "common/byte-vector.h".
8003         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8004         * printcmd.c: Include "common/byte-vector.h".
8005         (print_scalar_formatted): Use gdb::byte_vector.
8006         * valprint.c: Include "common/byte-vector.h".
8007         (maybe_negate_by_bytes, print_decimal_chars): Use
8008         gdb::byte_vector.
8009
8010 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8011
8012         * darwin-nat.c: Include "nat/fork-inferior.h".
8013
8014 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8015
8016         * configure.nat: Factor out Darwin bits that are not
8017         architecture-specific.  Add fork-inferior.o.
8018
8019 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8020
8021         * configure.nat: Factor out AIX bits that are not
8022         architecture-specific.  Add fork-inferior.o.
8023
8024 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8025
8026         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8027         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8028         wrappers that just call rw_pieced_value.
8029
8030 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8031
8032         * dwarf2loc.c (write_pieced_value): When writing the data for a
8033         memory piece, use write_memory_with_notification instead of
8034         write_memory.
8035
8036 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8037
8038         * valops.c (read_value_memory): Change embedded_offset to
8039         represent a bit offset instead of a byte offset.
8040         * value.h (read_value_memory): Adjust comment.
8041
8042 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8043
8044         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8045         dest_offset_bits and source_offset_bits.
8046         (write_pieced_value): Likewise.
8047
8048 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8049
8050         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8051         given by DW_OP_bit_piece.
8052         (write_pieced_value): Likewise.
8053
8054 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8055
8056         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8057         some other preparations to the places where sufficient information
8058         is available.
8059         (write_pieced_value): Likewise.
8060
8061 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8062
8063         * dwarf2loc.c (bits_to_bytes): New function.
8064         (read_pieced_value): Fix offset calculations for register pieces
8065         on big-endian targets.
8066         (write_pieced_value): Likewise.
8067
8068 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8069
8070         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8071         (write_pieced_value): Likewise.
8072
8073 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8074
8075         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8076         transfer the source value's least significant bits, instead of its
8077         lowest-addressed ones.  Rename type_len to max_offset.
8078         (read_pieced_value): Mirror above changes to write_pieced_value as
8079         applicable.
8080
8081 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8082
8083         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8084         truncate full bytes from dest_offset_bits before using it as an
8085         offset into the buffer.
8086
8087 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8088
8089         * dwarf2loc.c (write_pieced_value): Include transfer size in
8090         byte-wise check.
8091
8092 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8093
8094         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8095         calculation of this_size.
8096
8097 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8098
8099         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8100         when targeting a bit-field.
8101         (write_pieced_value): Likewise.
8102
8103 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8104
8105         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8106         (allocate_piece_closure): Drop addr_size parameter.
8107         (dwarf2_evaluate_loc_desc_full): Adjust call to
8108         allocate_piece_closure.
8109
8110 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8111
8112         PR gdb/21226
8113         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8114         the LSB end, independent of endianness.
8115
8116 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8117
8118         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8119         size capping.
8120
8121 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8122
8123         * mips-linux-nat.c: Move include features/mips*-linux.c to
8124         mips-linux-tdep.c.
8125         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8126         to mips-linux-tdep.c.
8127         * mips-linux-tdep.c: Include features/mips*-linux.c
8128         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8129         functions.
8130         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8131         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8132         (tdesc_mips64_dsp_linux): Declare.
8133
8134 2017-06-12  Tom Tromey  <tom@tromey.com>
8135
8136         * valprint.h (val_print_type_code_int): Remove.
8137         * valprint.c (generic_val_print_int): Always call
8138         val_print_scalar_formatted.
8139         (val_print_type_code_int): Remove.
8140         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8141         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8142         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8143         * ada-valprint.c (ada_val_print_num): Use
8144         val_print_scalar_formatted.
8145
8146 2017-06-12  Tom Tromey  <tom@tromey.com>
8147
8148         * printcmd.c (print_scalar_formatted): Unify the two switches.
8149         Don't convert scalars to LONGEST.
8150
8151 2017-06-12  Tom Tromey  <tom@tromey.com>
8152
8153         PR exp/16225:
8154         * valprint.h (print_decimal_chars): Update.
8155         * valprint.c (maybe_negate_by_bytes): New function.
8156         (print_decimal_chars): Add "is_signed" argument.
8157         * printcmd.c (print_scalar_formatted): Update.
8158
8159 2017-06-12  Tom Tromey  <tom@tromey.com>
8160
8161         PR exp/16225:
8162         * valprint.h (print_binary_chars, print_hex_chars): Update.
8163         * valprint.c (val_print_type_code_int): Update.
8164         (print_binary_chars): Add "zero_pad" argument.
8165         (emit_octal_digit): New function.
8166         (print_octal_chars): Don't zero-pad.
8167         (print_decimal_chars): Likewise.
8168         (print_hex_chars): Add "zero_pad" argument.
8169         * sh64-tdep.c (sh64_do_fp_register): Update.
8170         * regcache.c (regcache::dump): Update.
8171         * printcmd.c (print_scalar_formatted): Update.
8172         * infcmd.c (default_print_one_register_info): Update.
8173
8174 2017-06-12  Pedro Alves  <palves@redhat.com>
8175             Alan Hayward  <alan.hayward@arm.com>
8176
8177         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8178         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8179         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8180         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8181         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8182
8183 2017-06-12  Pedro Alves  <palves@redhat.com>
8184
8185         * dwarf2read.c (mapped_symtab::data): Now a vector of
8186         symtab_index_entry instead of vector of
8187         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8188         whether an element's name is NULL instead of checking whether the
8189         element itself is NULL.
8190         (find_slot): Change return type.  Adjust.
8191         (hash_expand, , add_index_entry, uniquify_cu_indices)
8192         (write_hash_table): Adjust.
8193
8194 2017-06-12  Pedro Alves  <palves@redhat.com>
8195
8196         * dwarf2read.c (recursively_count_psymbols): New function.
8197         (write_psymtabs_to_index): Call it to compute number of psyms and
8198         pass estimate size of psyms_seen to unordered_set's ctor.
8199
8200 2017-06-12  Pedro Alves  <palves@redhat.com>
8201
8202         * dwarf2read.c (write_hash_table): Check if key already exists
8203         before emplacing.
8204
8205 2017-06-12  Pedro Alves  <palves@redhat.com>
8206
8207         * dwarf2read.c (data_buf::append_space): Rename to...
8208         (data_buf::grow): ... this, and make private.  Adjust all callers.
8209         (data_buf::append_uint): New method.
8210         (add_address_entry, write_one_signatured_type)
8211         (write_psymtabs_to_index): Use it.
8212
8213 2017-06-12  Pedro Alves  <palves@redhat.com>
8214
8215         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8216         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8217         (data_buf::file_write): Call ::fwrite directly.
8218
8219 2017-06-12  Pedro Alves  <palves@redhat.com>
8220
8221         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8222         std::vector::erase.
8223
8224 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8225
8226         Code cleanup: C++ify .gdb_index producer.
8227         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8228         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8229         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8230         (create_strtab, add_string): Remove.
8231         (file_write, data_buf): New.
8232         (struct symtab_index_entry): Use std::vector for cu_indices.
8233         (struct mapped_symtab): Use std::vector for data.
8234         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8235         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8236         Remove.
8237         (find_slot): Change return type.  Update it to the new data structures.
8238         (hash_expand, add_index_entry): Update it to the new data structures.
8239         (offset_type_compare): Remove.
8240         (uniquify_cu_indices): Update it to the new data structures.
8241         (c_str_view, c_str_view_hasher, vector_hasher): New.
8242         (add_indices_to_cpool): Remove.
8243         (write_hash_table): Update it to the new data structures.
8244         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8245         (eq_psymtab_cu_index): Remove.
8246         (psym_index_map): New typedef.
8247         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8248         reference and std::unordered_map for cu_index_htab.
8249         (add_address_entry, add_address_entry_worker, write_address_map)
8250         (write_psymbols): Update it to the new data structures.
8251         (write_obstack): Remove.
8252         (struct signatured_type_index_data): Change types_list to a data_buf
8253         reference and psyms_seen to a std::unordered_set reference.
8254         (write_one_signatured_type, recursively_write_psymbols)
8255         (write_psymtabs_to_index): Update it to the new data structures.
8256
8257 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8258
8259         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8260         separate-debug-file commands.
8261         * symfile.h (separate_debug_file_debug): New global.
8262         * symfile.c (separate_debug_file_debug): New global.
8263         (separate_debug_file_exists, find_separate_debug_file): Add
8264         debug output.
8265         (_initialize_symfile): Add "set debug separate-debug-file"
8266         command.
8267         * build-id.c (build_id_to_debug_bfd,
8268         find_separate_debug_file_by_buildid): Add debug output.
8269
8270 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8271
8272         * gdbarch.sh (displaced_step_free_closure): Remove.
8273         * gdbarch.h, gdbarch.c: Re-generate.
8274         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8275         displaced_step_free_closure.
8276         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8277         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8278         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8279         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8280         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8281         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8282         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8283         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8284         * infrun.c (displaced_step_clear): Call xfree instead of
8285         gdbarch_displaced_step_free_closure.
8286
8287 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8288
8289         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8290         NULL".
8291
8292 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8293
8294         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8295         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8296         (mn10300_push_dummy_call): Likewise.
8297
8298 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8299
8300         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8301
8302 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8303
8304         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8305
8306 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8307
8308         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8309         able to start inferiors using a shell.
8310         (New remote packets): Announce new packet "QStartupWithShell".
8311         * remote.c: Add PACKET_QStartupWithShell.
8312         (extended_remote_create_inferior): Handle new
8313         PACKET_QStartupWithShell.
8314         (remote_protocol_features) <QStartupWithShell>: New entry for
8315         PACKET_QStartupWithShell.
8316         (_initialize_remote): Call "add_packet_config_cmd" for
8317         QStartupShell.
8318
8319 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8320             Pedro Alves  <palves@redhat.com>
8321
8322         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8323         and "nat/fork-inferior.h".
8324         * common/common-inferior.h: New file, with contents from
8325         "gdb/inferior.h".
8326         * commom/common-utils.c: Include "common-utils.h".
8327         (stringify_argv): New function.
8328         * common/common-utils.h (stringify_argv): New prototype.
8329         * configure.nat: Add "fork-inferior.o" as a dependency for
8330         "*linux*", "fbsd*" and "nbsd*" hosts.
8331         * corefile.c (get_exec_file): Update comment.
8332         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8333         instead of "startup_inferior".
8334         (darwin_create_inferior): Call "add_thread_silent" after
8335         "fork_inferior".
8336         * fork-child.c: Cleanup unnecessary includes.
8337         (SHELL_FILE): Move to "common/common-fork-child.c".
8338         (environ): Likewise.
8339         (exec_wrapper): Initialize.
8340         (get_exec_wrapper): New function.
8341         (breakup_args): Move to "common/common-fork-child.c"; rename to
8342         "breakup_args_for_exec".
8343         (escape_bang_in_quoted_argument): Move to
8344         "common/common-fork-child.c".
8345         (saved_ui): New variable.
8346         (prefork_hook): New function.
8347         (postfork_hook): Likewise.
8348         (postfork_child_hook): Likewise.
8349         (gdb_startup_inferior): Likewise.
8350         (fork_inferior): Move to "common/common-fork-child.c".  Update
8351         function to support gdbserver.
8352         (startup_inferior): Likewise.
8353         * gdbcore.h (get_exec_file): Remove declaration.
8354         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8355         instead of "startup_inferior".  Call "add_thread_silent" after
8356         "fork_inferior".
8357         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8358         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8359         instead of "startup_inferior".  Call "add_thread_silent" after
8360         "fork_inferior".
8361         * inferior.h: Include "common-inferior.h".
8362         (trace_start_error): Move to "common/common-utils.h".
8363         (trace_start_error_with_name): Likewise.
8364         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8365         (startup_inferior): Likewise.
8366         (gdb_startup_inferior): New prototype.
8367         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8368         * nat/fork-inferior.h: New file.
8369         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8370         instead of "startup_inferior".  Call "add_thread_silent" after
8371         "fork_inferior".
8372         * target.h (target_terminal_init): Move prototype to
8373         "target/target.h".
8374         (target_terminal_inferior): Likewise.
8375         (target_terminal_ours): Likewise.
8376         * target/target.h (target_terminal_init): New prototype, moved
8377         from "target.h".
8378         (target_terminal_inferior): Likewise.
8379         (target_terminal_ours): Likewise.
8380         * utils.c (gdb_flush_out_err): New function.
8381
8382 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8383
8384         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8385         * common/common-gdbthread.h: New file, with parts from
8386         "gdb/gdbthread.h".
8387         * gdbthread.h: Include "common-gdbthread.h".
8388         (switch_to_thread): Moved to "common/common-gdbthread.h".
8389
8390 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8391
8392         * Makefile.in (SFILES): Add "common/job-control.c".
8393         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8394         (COMMON_OBS): Add "job-control.o".
8395         * common/job-control.c: New file, with contents from
8396         "gdb/inflow.c".
8397         * common/job-control.h: New file, with contents from "terminal.h".
8398         * fork-child.c: Include "job-control.h".
8399         * inflow.c: Include "job-control.h".
8400         (gdb_setpgid): Move to "common/common-inflow.c".
8401         (_initialize_inflow): Move setting of "job_control" to
8402         "handle_job_control".
8403         * terminal.h (job_control): Moved to "common/common-terminal.h".
8404         (gdb_setpgid): Likewise.
8405         * top.c: Include "job_control.h".
8406         * utils.c: Likewise.
8407         (job_control): Moved to "job-control.c".
8408
8409 2017-06-07  Pedro Alves  <palves@redhat.com>
8410
8411         * Makefile.in (SFILES): Add gdb_regex.c.
8412         (COMMON_OBS): Add gdb_regex.o.
8413         * ada-lang.c (ada_add_standard_exceptions)
8414         (ada_add_exceptions_from_frame, name_matches_regex)
8415         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8416         parameter type to compiled_regex.  Adjust.
8417         (ada_exceptions_list): Use compiled_regex.
8418         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8419         std::unique_ptr<compiled_regex>.
8420         (exception_catchpoint::~exception_catchpoint): Remove regfree
8421         call.
8422         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8423         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8424         * breakpoint.c (solib_catchpoint::compiled): Now a
8425         std::unique_ptr<compiled_regex>.
8426         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8427         (check_status_catch_solib): Adjust to use compiled_regex.
8428         (add_solib_catchpoint): Adjust to use compiled_regex.
8429         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8430         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8431         compiled_regex reference.  Adjust to use it.
8432         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8433         declaration.  Include "gdb_regex.h".
8434         (apropos_cmd): Change regex parameter to compiled_regex reference.
8435         * gdb_regex.c: New file.
8436         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8437         declarations.
8438         (class compiled_regex): New.
8439         * linux-tdep.c: Include "common/gdb_optional.h".
8440         (struct mapping_regexes): New, factored out from
8441         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8442         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8443         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8444         * probe.c: Include "common/gdb_optional.h".
8445         (collect_probes): Use compiled_regex and gdb::optional and remove
8446         cleanups.
8447         * skip.c: Include "common/gdb_optional.h".
8448         (skiplist_entry::compiled_function_regexp): Now a
8449         gdb::optional<compiled_regex>.
8450         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8451         (free_skiplist_entry): Remove regfree call.
8452         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8453         compiled_regex and gdb::optional.
8454         * symtab.c: Include "common/gdb_optional.h".
8455         (search_symbols): Use compiled_regex and gdb::optional.
8456         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8457         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8458         to gdb_regex.c.
8459
8460 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8461
8462         * regcache.c (regcache::save): Avoid buffer use.
8463         (regcache::dump): Likewise.
8464
8465 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8466
8467         * sh-tdep.c (sh_pseudo_register_read): Remove
8468         MAX_REGISTER_SIZE.
8469         (sh_pseudo_register_write): Likewise.
8470         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8471         (sh64_pseudo_register_write): Likewise
8472
8473 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8474
8475         * aarch64-tdep.c (aarch64_store_return_value): Use
8476         V_REGISTER_SIZE.
8477         (aarch64_pseudo_read_value): Likewise.
8478         (aarch64_pseudo_write): Likewise.
8479
8480 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8481
8482         * regformats/regdef.h (set_register_cache): Remove the
8483         declaration.
8484
8485 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8486
8487         * frame.c (frame_unwind_register_signed): Use
8488         frame_unwind_register_value.
8489
8490 2017-06-06  Pedro Alves  <palves@redhat.com>
8491
8492         PR breakpoints/21553
8493         * breakpoint.c (create_breakpoints_sal_default)
8494         (init_breakpoint_sal, create_breakpoint_sal): Use
8495         gdb::unique_xmalloc_ptr for string parameters.
8496         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8497         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8498         (base_breakpoint_create_breakpoints_sal)
8499         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8500         (strace_marker_create_breakpoints_sal)
8501         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8502         string parameters.
8503         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8504         gdb::unique_xmalloc_ptr for string parameters.
8505         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8506         parameters.
8507
8508 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8509
8510         * alpha-tdep.c (alpha_register_to_value): Use
8511         get_frame_register_value.
8512         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8513
8514 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8515
8516         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8517         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8518         (ia64_value_to_register): Likewise.
8519         (ia64_extract_return_value): Likewise.
8520         (ia64_store_return_value): Likewise.
8521         (ia64_push_dummy_call): Likewise.
8522
8523 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8524
8525         GDB 8.0 released.
8526
8527 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8528
8529         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8530
8531 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8532
8533         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8534         parameter.
8535         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8536
8537 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8538
8539         * event-loop.c (poll_timers): Unallocate timer using delete
8540         instead of xfree.
8541
8542 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8543
8544         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8545         (struct breakpoint) <~breakpoint>: New.
8546         (struct watchpoint): Inherit from breakpoint.
8547         <~watchpoint>: New.
8548         <base>: Remove.
8549         (struct tracepoint): Inherit from breakpoint.
8550         <base>: Remove.
8551         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8552         (struct longjmp_breakpoint): Inherit from breakpoint.
8553         <~longjmp_breakpoint>: New.
8554         <base>: Remove.
8555         (new_breakpoint_from_type): Remove casts.
8556         (watchpoint_in_thread_scope): Remove reference to base field.
8557         (watchpoint_del_at_next_stop): Likewise.
8558         (update_watchpoint): Likewise.
8559         (watchpoint_check): Likewise.
8560         (bpstat_check_watchpoint): Likewise.
8561         (set_longjmp_breakpoint): Likewise.
8562         (struct fork_catchpoint): Inherit from breakpoint.
8563         <base>: Remove.
8564         (struct solib_catchpoint): Inherit from breakpoint.
8565         <~solib_catchpoint>: New.
8566         <base>: Remove.
8567         (dtor_catch_solib): Change to ...
8568         (solib_catchpoint::~solib_catchpoint): ... this.
8569         (breakpoint_hit_catch_solib): Remove reference to base field.
8570         (add_solib_catchpoint): Likewise.
8571         (create_fork_vfork_event_catchpoint): Likewise.
8572         (struct exec_catchpoint): Inherit from breakpoint.
8573         <~exec_catchpoint>: New.
8574         <base>: Remove.
8575         (dtor_catch_exec): Change to ...
8576         (exec_catchpoint::~exec_catchpoint): ... this.
8577         (dtor_watchpoint): Change to ...
8578         (watchpoint::~watchpoint): ... this.
8579         (watch_command_1): Remove reference to base field.
8580         (catch_exec_command_1): Likewise.
8581         (base_breakpoint_dtor): Change to ...
8582         (breakpoint::~breakpoint): ... this.
8583         (base_breakpoint_ops): Remove dtor field value.
8584         (longjmp_bkpt_dtor): Change to ...
8585         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8586         (strace_marker_create_breakpoints_sal): Remove reference to base
8587         field.
8588         (delete_breakpoint): Don't manually call breakpoint destructor.
8589         (create_tracepoint_from_upload): Remove reference to base field.
8590         (trace_pass_set_count): Likewise.
8591         (initialize_breakpoint_ops): Don't initialize
8592         momentary_breakpoint_ops, don't set dtors.
8593         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8594         <~ada_catchpoint>: New.
8595         <base>: Remove.
8596         (create_excep_cond_exprs): Remove reference to base field.
8597         (dtor_exception): Change to ...
8598         (ada_catchpoint::~ada_catchpoint): ... this.
8599         (dtor_catch_exception): Remove.
8600         (dtor_catch_exception_unhandled): Remove.
8601         (dtor_catch_assert): Remove.
8602         (create_ada_exception_catchpoint): Remove reference to base
8603         field.
8604         (initialize_ada_catchpoint_ops): Don't set dtors.
8605         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8606         breakpoint.
8607         <~signal_catchpoint>: New.
8608         <base>: Remove.
8609         (signal_catchpoint_dtor): Change to ...
8610         (signal_catchpoint::~signal_catchpoint): ... this.
8611         (create_signal_catchpoint): Remove reference to base field.
8612         (initialize_signal_catchpoint_ops): Don't set dtor.
8613         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8614         from breakpoint.
8615         <~syscall_catchpoint>: New.
8616         <base>: Remove.
8617         (dtor_catch_syscall): Change to ...
8618         (syscall_catchpoint::~syscall_catchpoint): ... this.
8619         (create_syscall_event_catchpoint): Remove reference to base
8620         field.
8621         (initialize_syscall_catchpoint_ops): Don't set dtor.
8622         * break-catch-throw.c (struct exception_catchpoint): Inherit
8623         from breakpoint.
8624         <~exception_catchpoint>: New.
8625         <base>: Remove.
8626         (dtor_exception_catchpoint): Change to ...
8627         (exception_catchpoint::~exception_catchpoint): ... this.
8628         (handle_gnu_v3_exceptions): Remove reference to base field.
8629         (initialize_throw_catchpoint_ops): Don't set dtor.
8630         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8631         field.
8632         * remote.c (remote_get_tracepoint_status): Likewise.
8633         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8634         * tracefile.c (tracefile_fetch_registers): Likewise.
8635         * tracepoint.c (actions_command): Likewise.
8636         (validate_actionline): Likewise.
8637         (tfind_1): Likewise.
8638         (get_traceframe_location): Likewise.
8639         (find_matching_tracepoint_location): Likewise.
8640         (parse_tracepoint_status): Likewise.
8641         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8642
8643 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8644
8645         * breakpoint.c (struct longjmp_breakpoint): New struct.
8646         (is_tracepoint_type): Change return type to bool.
8647         (is_longjmp_type): New function.
8648         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8649         (set_raw_breakpoint_without_location): Use
8650         new_breakpoint_from_type.
8651         (set_raw_breakpoint): Likewise.
8652
8653 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8654
8655         * breakpoint.c (new_breakpoint_from_type): New function.
8656         (create_breakpoint_sal): Use new_breakpoint_from_type and
8657         unique_ptr.
8658         (create_breakpoint): Likewise.
8659
8660 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8661
8662         * memattr.c (mem_info_command): Rename to ...
8663         (info_mem_command): ... this.
8664         (mem_enable_command): Rename to ...
8665         (enable_mem_command): ... this.
8666         (mem_disable_command): Rename to ...
8667         (disable_mem_command): ... this.
8668         (mem_delete_command): Rename to ...
8669         (delete_mem_command): ... this.
8670         (_initialize_mem): Adjust function names.
8671
8672 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8673
8674         * btrace.c (handle_pt_insn_events): New.
8675         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8676         STATUS.  Split into this and ...
8677         (handle_pt_insn_event_flags): ... this.
8678
8679 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8680
8681         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8682         and struct pt_insn.resynced.
8683         * configure: Regenerated.
8684         * config.in: Regenerated.
8685
8686 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8687
8688         * btrace.c (ftrace_find_call_by_number): New function.
8689         (ftrace_new_function): Store objects, not pointers.
8690         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8691         ftrace_new_gap, ftrace_update_function,
8692         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8693         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8694         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8695         btrace_ends_with_single_insn, btrace_call_get): Account for
8696         btrace_thread_info::functions now storing objects.
8697         * btrace.h (struct btrace_thread_info): Add constructor.
8698         (struct btrace_thread_info) <functions>: Make std::vector.
8699         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8700         Initialize with default values.
8701         * record-btrace.c (record_btrace_frame_sniffer): Account for
8702         btrace_thread_info::functions now storing objects.
8703
8704 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8705
8706         * btrace.c: Remove typedef bfun_s.
8707         (ftrace_new_gap): Directly add gaps to the list of gaps.
8708         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8709         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8710         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8711         instead of gdb VEC.
8712
8713 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8714
8715         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8716         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8717         with btrace_thread_info::next_segment and
8718         btrace_thread_info::prev_segment.
8719         * btrace.h: Remove struct btrace_func_link.
8720         (struct btrace_function): Replace pair of function segment pointers
8721         with pair of indices.
8722         * python/py-record-btrace.c (btpy_call_prev_sibling,
8723         btpy_call_next_sibling): Replace references to
8724         btrace_thread_info::segment with btrace_thread_info::next_segment and
8725         btrace_thread_info::prev_segment.
8726         * record-btrace.c (record_btrace_frame_this_id): Use
8727         btrace_find_call_by_number.
8728
8729 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8730
8731         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8732         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8733         btrace_insn_next, btrace_insn_prev): Remove references to
8734         btrace_thread_info::flow.
8735         * btrace.h (struct btrace_function): Remove FLOW.
8736
8737 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8738
8739         * btrace.c (ftrace_find_call_by_number): New function.
8740         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8741         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8742         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8743         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8744         index.
8745         * btrace.h (struct btrace_function): Turn UP into an index.
8746         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8747         as an index.
8748         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8749         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8750         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8751
8752 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8753
8754         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8755         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8756         ftrace_update_function, ftrace_compute_global_level_offset,
8757         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8758         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8759         btrace_insn_end, btrace_is_empty): Remove references to
8760         btrace_thread_info::begin and btrace_thread_info::end.
8761         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8762         (struct btrace_thread_info) <functions>: Adjust comment.
8763         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8764         btrace_thread_info::begin.
8765
8766 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8767
8768         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8769         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8770         ftrace_update_function): Remove arguments that implicitly were always
8771         BTINFO->END.
8772         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8773         Don't pass BTINFO->END.
8774
8775 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8776
8777         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8778         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8779         btrace_find_insn_by_number): Replace function segment pointer with
8780         index.
8781         (btrace_insn_cmp): Simplify.
8782         * btrace.h: (struct btrace_insn_iterator) Rename index to
8783         insn_index.  Replace function segment pointer with index into function
8784         segment vector.
8785         * record-btrace.c (record_btrace_call_history): Replace function
8786         segment pointer use with index.
8787         (record_btrace_frame_sniffer): Retrieve function call segment through
8788         vector.
8789         (record_btrace_set_replay): Remove defunc't safety check.
8790
8791 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8792
8793         * btrace.c (btrace_ends_with_single_insn): New function.
8794         (btrace_call_get, btrace_call_number, btrace_call_begin,
8795         btrace_call_end, btrace_call_next, btrace_call_prev,
8796         btrace_find_call_by_number): Use index into call segment vector
8797         instead of pointer.
8798         (btrace_call_cmp): Simplify.
8799         * btrace.h (struct btrace_call_iterator): Replace function call segment
8800         pointer with index into vector.
8801         * record-btrace.c (record_btrace_call_history): Use index instead of
8802         pointer.
8803
8804 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8805
8806         * btrace.c (btrace_insn_begin, btrace_insn_end,
8807         btrace_find_insn_by_number): Add btinfo to iterator.
8808         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8809
8810 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8811
8812         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8813         and save pointers directly.
8814         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8815         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8816         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8817         changed signature of functions.
8818         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8819         (btrace_fetch): Remove code that adds btrace_function pointers to
8820         vector of btrace_functions.
8821         (btrace_clear): Simplify freeing vector of btrace_functions.
8822
8823 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8824
8825         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8826         Replace VEC_* with std::vector functions.
8827         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8828         (struct btrace_thread_info)<functions>: Change type to std::vector.
8829
8830 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8831
8832         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8833         "Removed targets and native configurations" up.  Merge duplicate
8834         "New commands" sub-sections.  Add "New options" sub-sections.
8835
8836 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8837
8838         * defs.h (copy_integer_to_size): New declaration.
8839         * findvar.c (copy_integer_to_size): New function.
8840         (do_cint_test): New selftest function.
8841         (copy_integer_to_size_test): Likewise.
8842         (_initialize_findvar): Likewise.
8843         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8844         (mips_fbsd_collect_reg): Use raw_collect_integer.
8845         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8846         (mips64_fill_gregset): Use raw_collect_integer
8847         (mips64_fill_fpregset): Use raw_supply_integer.
8848         * regcache.c (regcache::raw_supply_integer): New function.
8849         (regcache::raw_collect_integer): Likewise.
8850         * regcache.h: (regcache::raw_supply_integer): New declaration.
8851         (regcache::raw_collect_integer): Likewise.
8852
8853 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8854
8855         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8856         (COMMON_OBS): Add gdbarch-selftests.o.
8857         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8858         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8859         * gdbarch-selftests.c: New file.
8860         * regcache.h (regcache) <~regcache>: Mark it virtual if
8861         GDB_SELF_TEST.
8862         <raw_write>: Likewise.
8863
8864 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8865
8866         * regcache.c (current_regcache): Change it to
8867         regcache::current_regcache.
8868         (regcache_observer_target_changed): Update.
8869         (regcache_thread_ptid_changed): Make it a regcache static
8870         method.
8871         (regcache_thread_ptid_changed): Update.
8872         (class regcache_access): New.
8873         (current_regcache_test): Update.
8874         (_initialize_regcache): Update.
8875         * regcache.h: Include forward_list.
8876         (regcache): Declare regcache_thread_ptid_changed and declare
8877         registers_changed_ptid as friend.
8878
8879 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8880
8881         * i387-tdep.c (i387_register_to_value): Use register_size
8882         instead of TYPE_LENGTH.
8883         * m68k-tdep.c (m68k_register_to_value): Likewise.
8884
8885 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8886
8887         * i387-tdep.c (i387_convert_register_p): Return false if type
8888         code isn't TYPE_CODE_FLT.
8889
8890 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8891
8892         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8893         length is 4.
8894         (alpha_register_to_value): Remove type length check.
8895         (alpha_value_to_register): Likewise.
8896
8897 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8898
8899         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8900         TYPE_CODE_FLT.
8901
8902 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8903
8904         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8905         TYPE_CODE_FLT or not.
8906
8907 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8908
8909         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8910         * avr-tdep.c (avr_gdbarch_init): Likewise.
8911         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8912         * cris-tdep.c (cris_gdbarch_init): Likewise.
8913         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8914         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8915         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8916         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8917         * mep-tdep.c (mep_gdbarch_init): Likewise.
8918         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8919         * mips-tdep.c (mips_gdbarch_init): Likewise.
8920         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8921         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8922         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8923         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8924         * v850-tdep.c (v850_gdbarch_init): Likewise.
8925
8926 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8927
8928         * selftest-arch.c (tests_with_arch): Call registers_changed
8929         and reinit_frame_cache.
8930         * selftest.c (run_self_tests): Likewise.
8931
8932 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8933
8934         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8935         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8936
8937 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8938
8939         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8940         set_gdbarch_print_insn.
8941
8942 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8943
8944         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8945         set_gdbarch_print_insn.
8946
8947 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8948
8949         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8950         set_gdbarch_print_insn.
8951         * arc-tdep.c (arc_gdbarch_init): Likewise.
8952         * arch-utils.c: include dis-asm.h.
8953         (default_print_insn): New function.
8954         * arch-utils.h (default_print_insn): Declare.
8955         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8956         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8957         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8958         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8959         * frv-tdep.c (frv_gdbarch_init): Likewise.
8960         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8961         * gdbarch.sh (print_insn): Use default_print_insn.
8962         * gdbarch.c: Regenerated.
8963         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8964         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8965         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8966         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8967         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8968         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8969         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8970         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8971         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8972         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8973         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8974         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8975         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8976         * mt-tdep.c (mt_gdbarch_init): Likewise.
8977         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8978         * nios2-tdep.c (nios2_print_insn): Remove.
8979         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8980         * rx-tdep.c (rx_gdbarch_init): Likewise.
8981         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8982         * score-tdep.c (score_print_insn): Remove.
8983         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8984         * sh-tdep.c (sh_gdbarch_init): Likewise.
8985         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8986         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8987         * tic6x-tdep.c (tic6x_print_insn): Remove.
8988         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8989         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8990         * v850-tdep.c (v850_gdbarch_init): Likewise.
8991         * vax-tdep.c (vax_gdbarch_init): Likewise.
8992         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8993         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8994
8995 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
8996
8997         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8998         (MIPS_FP0_REGNUM): Remove.
8999         (MIPS_FSR_REGNUM): Remove.
9000         (mips_fbsd_supply_fpregs): Use mips_regnum.
9001         (mips_fbsd_supply_gregs): Likewise.
9002         (mips_fbsd_collect_fpregs): Likewise.
9003         (mips_fbsd_collect_gregs): Likewise.
9004
9005 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9006
9007         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9008         (getpfpregs_supplies): New function.
9009         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9010         getfpregs_supplies.
9011         (mips_fbsd_store_inferior_registers): Likewise.
9012
9013 2017-05-22  Pedro Alves <palves@redhat.com>
9014
9015         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9016         maintainer.
9017
9018 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9019
9020         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9021         (store_register): Likewise.
9022         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9023         (get_decimal_float_return_value): Likewise.
9024         (do_ppc_sysv_return_value): Likewise.
9025         (ppc64_sysv_abi_push_integer): Likewise.
9026         (ppc64_sysv_abi_push_freg): Likewise.
9027         (ppc64_sysv_abi_return_value_base): Likewise.
9028         (ppc64_sysv_abi_return_value): Likewise.
9029         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9030         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9031         * rs6000-nat.c: Likewise.
9032         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9033         (rs6000_value_to_register): Likewise.
9034         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9035
9036 2017-05-21  Tom Tromey  <tom@tromey.com>
9037
9038         PR rust/21466:
9039         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9040         arrays as "[T]", not "[T; ]".
9041
9042 2017-05-19  Tom Tromey  <tom@tromey.com>
9043
9044         PR rust/21484:
9045         * rust-lang.c (exp_descriptor_rust): New function.
9046         (rust_language_defn): Use it.
9047         * p-lang.c (pascal_language_defn): Update.
9048         * opencl-lang.c (opencl_language_defn): Update.
9049         * objc-lang.c (objc_language_defn): Update.
9050         * m2-lang.c (m2_language_defn): Update.
9051         * language.h (struct language_defn)
9052         <la_watch_location_expression>: New member.
9053         * language.c (unknown_language_defn, auto_language_defn)
9054         (local_language_defn): Update.
9055         * go-lang.c (go_language_defn): Update.
9056         * f-lang.c (f_language_defn): Update.
9057         * d-lang.c (d_language_defn): Update.
9058         * c-lang.h (c_watch_location_expression): Declare.
9059         * c-lang.c (c_watch_location_expression): New function.
9060         (c_language_defn, cplus_language_defn, asm_language_defn)
9061         (minimal_language_defn): Use it.
9062         * breakpoint.c (watch_command_1): Call
9063         la_watch_location_expression.
9064         * ada-lang.c (ada_language_defn): Update.
9065
9066 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9067
9068         PR tui/21482
9069         * gdb_curses.h (NOMACROS): Define.
9070         (NCURSES_NOMACROS): Define.
9071
9072 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9073
9074         PR tui/21482
9075         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9076         arg to char *.
9077         * tui/tui-wingeneral.c (box_win): Likewise.
9078         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9079         (tui_show_source_line): Likewise.
9080         (tui_show_exec_info_content): Likewise.
9081
9082 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9083
9084         * sparc-tdep.c (sparc_structure_return_p)
9085         (sparc_arg_on_registers_p): New functions.
9086         (sparc32_store_arguments): Use them.
9087         * sparc64-tdep.c (sparc64_16_byte_align_p)
9088         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9089         Handle TYPE_CODE_ARRAY.
9090
9091 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9092
9093         * cli/cli-decode.c (add_alias_cmd): New function.
9094         * command.h (add_alias_cmd): Declare.
9095         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9096         instead call add_alias_cmd.
9097
9098 2017-05-17  Pedro Alves  <palves@redhat.com>
9099
9100         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9101         (nat_makefile_frag): ... this.  All references updated.
9102         * configure.ac: Likewise.
9103         * configure.nat: Likewise.  Enhance comments.
9104         * configure: Regenerate.
9105
9106 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9107
9108         * procfs.c (procfs_create_inferior): Change prototype to match
9109         definition.
9110
9111 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9112
9113         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9114         C++ compiler warning.
9115
9116 2017-05-12  Tom Tromey  <tom@tromey.com>
9117
9118         PR rust/21483:
9119         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9120         recurse, just call value_struct_elt directly.
9121
9122 2017-05-12  Tom Tromey  <tom@tromey.com>
9123
9124         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9125         OP_RUST_ARRAY>: Fix.
9126
9127 2017-05-12  Tom Tromey  <tom@tromey.com>
9128
9129         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9130
9131 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9132
9133         * regcache.c: Include <forward_list>.
9134         (struct regcache_list): Remove.
9135         (current_regcache): Update.
9136         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9137         (regcache_thread_ptid_changed): Likewise.
9138         (registers_changed_ptid): Likewise.
9139         (current_regcache_size): Likewise.
9140
9141 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9142
9143         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9144         (current_regcache_size): New function.
9145         (current_regcache_test): New function.
9146         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9147
9148 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9149
9150         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9151         (print_gp_register_row): Use get_frame_register_value.
9152
9153 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9154
9155         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9156         (mips_supply_fpregset): Likewise.
9157         (mips64_supply_gregset): Likewise.
9158
9159 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9160
9161         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9162         regcache->raw_supply_zeroed.
9163
9164 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9165
9166         * configure.nat: Rearrange 'case' statements to match
9167         host before cpu.
9168
9169 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9170
9171         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9172         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9173         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9174         "@nat_extra_makefile_frag@".
9175         (Makefile): Remove dependency on "@frags@".
9176         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9177         (data-directory/Makefile): Likewise.
9178         * config/aarch64/linux.mh: Deleted; moved contents to
9179         "gdb/configure.nat".
9180         * config/alpha/alpha-linux.mh: Likewise.
9181         * config/alpha/nbsd.mh: Likewise.
9182         * config/arm/linux.mh: Likewise.
9183         * config/arm/nbsdelf.mh: Likewise.
9184         * config/i386/cygwin.mh: Likewise.
9185         * config/i386/cygwin64.mh: Likewise.
9186         * config/i386/darwin.mh: Likewise.
9187         * config/i386/fbsd.mh: Likewise.
9188         * config/i386/fbsd64.mh: Likewise.
9189         * config/i386/go32.mh: Likewise.
9190         * config/i386/i386gnu.mh: Likewise.
9191         * config/i386/i386sol2.mh: Likewise.
9192         * config/i386/linux.mh: Likewise.
9193         * config/i386/linux64.mh: Likewise.
9194         * config/i386/mingw.mh: Likewise.
9195         * config/i386/mingw64.mh: Likewise.
9196         * config/i386/nbsd64.mh: Likewise.
9197         * config/i386/nbsdelf.mh: Likewise.
9198         * config/i386/nto.mh: Likewise.
9199         * config/i386/obsd.mh: Likewise.
9200         * config/i386/obsd64.mh: Likewise.
9201         * config/i386/sol2-64.mh: Likewise.
9202         * config/ia64/linux.mh: Likewise.
9203         * config/m32r/linux.mh: Likewise.
9204         * config/m68k/linux.mh: Likewise.
9205         * config/m68k/nbsdelf.mh: Likewise.
9206         * config/m68k/obsd.mh: Likewise.
9207         * config/m88k/obsd.mh: Likewise.
9208         * config/mips/fbsd.mh: Likewise.
9209         * config/mips/linux.mh: Likewise.
9210         * config/mips/nbsd.mh: Likewise.
9211         * config/mips/obsd64.mh: Likewise.
9212         * config/pa/linux.mh: Likewise.
9213         * config/pa/nbsd.mh: Likewise.
9214         * config/pa/obsd.mh: Likewise.
9215         * config/powerpc/aix.mh: Likewise.
9216         * config/powerpc/fbsd.mh: Likewise.
9217         * config/powerpc/linux.mh: Likewise.
9218         * config/powerpc/nbsd.mh: Likewise.
9219         * config/powerpc/obsd.mh: Likewise.
9220         * config/powerpc/ppc64-linux.mh: Likewise.
9221         * config/powerpc/spu-linux.mh: Likewise.
9222         * config/s390/linux.mh: Likewise.
9223         * config/sh/nbsd.mh: Likewise.
9224         * config/sparc/fbsd.mh: Likewise.
9225         * config/sparc/linux.mh: Likewise.
9226         * config/sparc/linux64.mh: Likewise.
9227         * config/sparc/nbsd64.mh: Likewise.
9228         * config/sparc/nbsdelf.mh: Likewise.
9229         * config/sparc/obsd64.mh: Likewise.
9230         * config/sparc/sol2.mh: Likewise.
9231         * config/tilegx/linux.mh: Likewise.
9232         * config/vax/nbsdelf.mh: Likewise.
9233         * config/vax/obsd.mh: Likewise.
9234         * config/xtensa/linux.mh: Likewise.
9235         * config/i386/i386gnu.mn: New file, with excerpts from
9236         "config/i386/i386gnu.mh".
9237         * configure: Regenerate.
9238         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9239         *.mh files under "gdb/config".
9240         * configure.nat: New file, with contents from the
9241         "gdb/config/*/*.mh" files.
9242
9243 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9244
9245         * btrace.c (btrace_clear): Free insn vector.
9246
9247 2017-05-05  Pedro Alves  <palves@redhat.com>
9248
9249         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9250         * configure: Regenerate.
9251
9252 2017-05-04  Pedro Alves  <palves@redhat.com>
9253
9254         * Makefile.in (SFILES): Add progspace-and-thread.c.
9255         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9256         (COMMON_OBS): Add progspace-and-thread.o.
9257         * breakpoint.c: Include "progspace-and-thread.h".
9258         (update_inserted_breakpoint_locations)
9259         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9260         Use scoped_restore_current_pspace_and_thread.
9261         (create_std_terminate_master_breakpoint): Use
9262         scoped_restore_current_program_space.
9263         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9264         (print_breakpoint_location): Use
9265         scoped_restore_current_program_space.
9266         (bp_loc_is_permanent): Use
9267         scoped_restore_current_pspace_and_thread.
9268         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9269         (download_tracepoint_locations): Use
9270         scoped_restore_current_pspace_and_thread.
9271         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9272         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9273         (enum step_over_calls_kind): Moved from inferior.h.
9274         (class scoped_restore_current_thread): New class.
9275         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9276         declaration.
9277         (scoped_restore_current_thread): New class.
9278         * infcmd.c: Include "common/gdb_optional.h".
9279         (continue_1, proceed_after_attach): Use
9280         scoped_restore_current_thread.
9281         (notice_new_inferior): Use scoped_restore_current_thread.
9282         * inferior.c: Include "progspace-and-thread.h".
9283         (restore_inferior, save_current_inferior): Delete.
9284         (add_inferior_command, clone_inferior_command): Use
9285         scoped_restore_current_pspace_and_thread.
9286         * inferior.h (scoped_restore_current_inferior): New class.
9287         * infrun.c: Include "progspace-and-thread.h" and
9288         "common/gdb_optional.h".
9289         (follow_fork_inferior): Use
9290         scoped_restore_current_pspace_and_thread.
9291         (scoped_restore_exited_inferior): New class.
9292         (handle_vfork_child_exec_or_exit): Use
9293         scoped_restore_exited_inferior,
9294         scoped_restore_current_pspace_and_thread,
9295         scoped_restore_current_thread and scoped_restore.
9296         (fetch_inferior_event): Use scoped_restore_current_thread.
9297         * linespec.c (decode_line_full, decode_line_1): Use
9298         scoped_restore_current_program_space.
9299         * mi/mi-main.c: Include "progspace-and-thread.h".
9300         (exec_continue): Use scoped_restore_current_thread.
9301         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9302         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9303         * proc-service.c (ps_pglobal_lookup): Use
9304         scoped_restore_current_program_space.
9305         * progspace-and-thread.c: New file.
9306         * progspace-and-thread.h: New file.
9307         * progspace.c (release_program_space, clone_program_space): Use
9308         scoped_restore_current_program_space.
9309         (restore_program_space, save_current_program_space)
9310         (save_current_space_and_thread): Delete.
9311         (switch_to_program_space_and_thread): Moved to
9312         progspace-and-thread.c.
9313         * progspace.h (save_current_program_space)
9314         (save_current_space_and_thread): Delete declarations.
9315         (scoped_restore_current_program_space): New class.
9316         * remote.c (remote_btrace_maybe_reopen): Use
9317         scoped_restore_current_thread.
9318         * symtab.c: Include "progspace-and-thread.h".
9319         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9320         * thread.c (print_thread_info_1): Use
9321         scoped_restore_current_thread.
9322         (struct current_thread_cleanup): Delete.
9323         (do_restore_current_thread_cleanup)
9324         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9325         (scoped_restore_current_thread::~scoped_restore_current_thread):
9326         ... this new dtor.
9327         (make_cleanup_restore_current_thread): Rename/convert to ...
9328         (scoped_restore_current_thread::scoped_restore_current_thread):
9329         ... this new ctor.
9330         (thread_apply_all_command): Use scoped_restore_current_thread.
9331         (thread_apply_command): Use scoped_restore_current_thread.
9332         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9333         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9334
9335 2017-05-04  Pedro Alves  <palves@redhat.com>
9336
9337         * thread.c (make_cleanup_restore_current_thread): Move
9338         find_thread_ptid call before the is_stopped call.  Assert that the
9339         thread is found.  Replace is_stopped call by checking the thread's
9340         state directly.  Remove unnecessary NULL-thread check.
9341
9342 2017-05-04  Pedro Alves  <palves@redhat.com>
9343
9344         * corelow.c (thread_section_name): New class.
9345         (get_core_register_section, get_core_siginfo): Use it.
9346
9347 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9348
9349         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9350         (get_core_register_section): Remove xfree of NULL pointer.
9351
9352 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9353
9354         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9355         * regcache.c (regcache::raw_supply_zeroed): New function.
9356         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9357
9358 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9359
9360         * gdbarch.sh: Remove commented out definition of
9361         TARGET_CHAR_BIT.
9362         * gdbarch.h: Re-generate.
9363
9364 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9365
9366         * configure: Regenerate.
9367
9368 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9369
9370         * solib-target.c (solib_target_relocate_section_addresses):
9371         Remove num_section_bases, num_bases, segment_bases variables.
9372
9373 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9374
9375         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9376
9377 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9378
9379         * solib-target.c: Include <vector>
9380         (struct lm_info_target) <~lm_info_target>: Remove.
9381         <segment_bases, section_bases>: Change type to
9382         std::vector<CORE_ADDR>.
9383         (library_list_start_segment, library_list_start_section,
9384         library_list_end_library,
9385         solib_target_relocate_section_addresses): Adjust.
9386
9387 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9388
9389         * gdbarch.sh (software_single_step): Change return type to
9390         std::vector<CORE_ADDR>.
9391         * gdbarch.c, gdbarch.h: Re-generate.
9392         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9393         Adjust.
9394         (arm_deal_with_atomic_sequence_raw): Adjust.
9395         (thumb_get_next_pcs_raw): Adjust.
9396         (arm_get_next_pcs_raw): Adjust.
9397         (arm_get_next_pcs): Adjust.
9398         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9399         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9400         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9401         (alpha_software_single_step): Adjust.
9402         * alpha-tdep.h (alpha_software_single_step): Adjust.
9403         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9404         * arm-tdep.c (arm_software_single_step): Adjust.
9405         (arm_breakpoint_kind_from_current_state): Adjust.
9406         * arm-tdep.h (arm_software_single_step): Adjust.
9407         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9408         * cris-tdep.c (cris_software_single_step): Adjust.
9409         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9410         (micromips_deal_with_atomic_sequence): Adjust.
9411         (deal_with_atomic_sequence): Adjust.
9412         (mips_software_single_step): Adjust.
9413         * mips-tdep.h (mips_software_single_step): Adjust.
9414         * moxie-tdep.c (moxie_software_single_step): Adjust.
9415         * nios2-tdep.c (nios2_software_single_step): Adjust.
9416         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9417         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9418         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9419         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9420         * sparc-tdep.c (sparc_software_single_step): Adjust.
9421         * spu-tdep.c (spu_software_single_step): Adjust.
9422         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9423
9424 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9425
9426         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9427         * gdbarch.h: Re-generate.
9428
9429 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9430
9431         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9432         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9433         * python/py-instruction.c, python/py-instruction.h: New file.
9434         * python/py-record.c: Add py-instruction.h include.
9435         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9436         gdb.RecordInstruction.
9437         * python/python-internal.h: Add gdbpy_initialize_instruction
9438         declaration.
9439         * python/python.c (do_start_initialization): Add
9440         gdbpy_initialize_instruction.
9441
9442 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9443
9444         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9445         Remove.
9446         (btrace_func_from_recpy_func): New function.
9447         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9448         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9449         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9450         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9451         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9452         Also, use new helper functions.
9453         (btpy_list_item): Use new helper functions.
9454         (recpy_bt_function_call_history): Use new type name.
9455         (btpy_call_getset): Remove.
9456         (gdbpy_initialize_btrace): Remove code to initialize
9457         gdb.BtraceFunctionCall.
9458         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9459         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9460         recpy_bt_func_prev, recpy_bt_func_next): New export.
9461         * python/py-record.c (recpy_func_type): New static object.
9462         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9463         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9464         recpy_func_next): New function.
9465         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9466         (recpy_func_getset): New static object.
9467         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9468         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9469
9470 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9471
9472         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9473         (btpy_object, btpy_insn_type, btpy_new): Remove.
9474         (btpy_list_object): Use gdb.RecordInstruction type instead of
9475         gdb.BtraceInstruction type.
9476         (btrace_insn_from_recpy_insn): New function.
9477         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9478         btpy_new.
9479         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9480         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9481         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9482         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9483         instead of btpy_object.
9484         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9485         btpy_insn_data, btpy_insn_decode): Rename to ...
9486         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9487         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9488         recpy_bt_insn_decode): This.  Also, use new helper functions.
9489         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9490         recpy_insn_type.
9491         (btpy_insn_getset): Remove.
9492         (gdbpy_initialize_btrace): Remove code to initialize
9493         gdb.BtraceInstruction.  Use recpy_element_object.
9494         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9495         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9496         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9497         * python/py-record.c (recpy_insn_type): New static object.
9498         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9499         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9500         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9501         New function.
9502         (recpy_insn_getset): New static object.
9503         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9504         * python/py-record.h (recpy_element_object): New typedef.
9505         (recpy_insn_type, recpy_insn_new): New export.
9506
9507 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9508
9509         * py-record-btrace.c (btpy_insn_new): Removed.
9510         (btpy_insn_or_gap_new): New function.
9511         (btpy_insn_error): Removed.
9512         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9513         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9514         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9515         btpy_insn_or_gap_new instead of btpy_insn_new.
9516         (btpy_insn_getset): Remove btpy_insn_error.
9517         * py-record.c (recpy_gap_type): New static object.
9518         (recpy_gap_object): New typedef.
9519         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9520         recpy_gap_reason_string): New function.
9521         (recpy_gap_getset): New static object.
9522         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9523         * py-record.h (recpy_gap_new): New export.
9524
9525 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9526
9527         * python/py-record.c (recpy_ptid): Remove.
9528         (recpy_record_getset): Remove recpy_ptid.
9529
9530 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9531
9532         * btrace.c (btrace_fetch): Set inferior_ptid.
9533         * python/py-record-btrace.c: Add "py-record.h" include.
9534         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9535         recpy_bt_end, recpy_bt_instruction_history,
9536         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9537         in gdb.Record object instead of current ptid.
9538         * python/py-record.c: Include new "py-record.h" file.
9539         (recpy_record_object): Moved to py-record.h.
9540         * python/py-record.h: New file.
9541
9542 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9543
9544         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9545         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9546         indentation.
9547
9548 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9549
9550         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9551         the past maintainers section.
9552
9553 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9554
9555         * infcmd.c (get_return_value): Use regcache ctor, and remove
9556         cleanup.
9557
9558 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9559             Pedro Alves  <palves@redhat.com>
9560
9561         * regcache.c (regcache::regcache): New tag dispatch ctor.
9562         (do_cooked_read): Moved above.
9563         (regcache_dup): Use the tag dispatch ctor..
9564         * regcache.h (regcache): Declare ctor, delete copy ctor and
9565         assignment operator, remove friend regcache_dup.
9566
9567 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9568
9569         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9570         call method save instead of regcache_cpy.
9571         * regcache.h (struct regcache): Make regcache_dup a friend.
9572
9573 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9574
9575         * regcache.c (struct regcache): Move to regcache.h
9576         (regcache::arch): New method.
9577         (regcache_get_ptid): Update.
9578         (get_regcache_arch): Call arch method.
9579         (get_regcache_aspace): Call method aspace.
9580         (register_buffer): Change it to method.
9581         (regcache_save): Change it to regcache::save.
9582         (regcache_restore): Likewise.
9583         (regcache_cpy_no_passthrough): Remove the declaration.
9584         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9585         (regcache_cpy_no_passthrough): Change it to method
9586         cpy_no_passthrough.
9587         (regcache_register_status): Change it to method
9588         get_register_status.
9589         (regcache_invalidate): Change it to method invalidate.
9590         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9591         (regcache_raw_update): Change it to method raw_update.
9592         (regcache_raw_read): Likewise.
9593         (regcache_raw_read_signed): Likewise.
9594         (regcache_raw_read_unsigned): Likewise.
9595         (regcache_raw_write_signed): Likewise.
9596         (regcache_raw_write_unsigned): Likewise.
9597         (regcache_cooked_read): Likewise.
9598         (regcache_cooked_read_value): Likewise.
9599         (regcache_cooked_read_signed): Likewise.
9600         (regcache_cooked_read_unsigned): Likewise.
9601         (regcache_cooked_write_signed): Likewise.
9602         (regcache_cooked_write_unsigned): Likewise.
9603         (regcache_raw_set_cached_value): Likewise.
9604         (regcache_raw_write): Likewise.
9605         (regcache_cooked_write): Likewise.
9606         (regcache_xfer_part): Likewise.
9607         (regcache_raw_read_part): Likewise.
9608         (regcache_raw_write_part): Likewise.
9609         (regcache_cooked_read_part): Likewise.
9610         (regcache_cooked_write_part): Likewise.
9611         (regcache_raw_supply): Likewise.
9612         (regcache_raw_collect): Likewise.
9613         (regcache_transfer_regset): Likewise.
9614         (regcache_supply_regset): Likewise.
9615         (regcache_collect_regset): Likewise.
9616         (regcache_debug_print_register): Likewise.
9617         (enum regcache_dump_what): Move it to regcache.h.
9618         (regcache_dump): Change it to method dump.
9619         * regcache.h (enum regcache_dump_what): New.
9620         (class regcache): New.
9621         * target.c (target_fetch_registers): Call method
9622         debug_print_register.
9623         (target_store_registers): Likewise.
9624
9625 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9626
9627         * windows-nat.c (struct lm_info_windows): Initialize field.
9628         (windows_make_so): Allocate lm_info_windows with new.
9629         (windows_free_so): Free lm_info_windows with delete.
9630
9631 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9632
9633         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9634         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9635         cleanup.
9636         (darwin_free_so): Free lm_info_darwin with delete.
9637
9638 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9639
9640         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9641         <l_addr_p>: Change type to bool.
9642         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9643         (svr4_free_so): Free lm_info_svr4 with delete.
9644         (svr4_copy_library_list): Replace memcpy with call to copy
9645         constructor.
9646         (library_list_start_library, svr4_default_sos): Allocate
9647         lm_info_svr4 with new.
9648
9649 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9650
9651         * solib-target.c (struct lm_info_target): Add destructor,
9652         initialize fields.
9653         <name>: Change type to std::string.
9654         (library_list_start_library): Allocate lm_info_target with new.
9655         (solib_target_free_library_list): Free lm_info_target with
9656         delete.
9657         (solib_target_current_sos): Adapt to std::string.
9658         (solib_target_free_so): Free lm_info_target with delete.
9659
9660 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9661
9662         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9663         fields.
9664         (frv_current_sos): Allocate lm_info_frv with new.
9665         (frv_relocate_main_executable): Free lm_info_frv with delete,
9666         allocate with new.
9667         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9668
9669 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9670
9671         * solib-frv.c (struct lm_info_frv): Fix indentation.
9672
9673 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9674
9675         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9676         map field.
9677         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9678         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9679         and allocate with new.
9680         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9681
9682 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9683
9684         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9685         <filename, member_name>: Change type to std::string.
9686         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9687         (library_list_start_library): Allocate lm_info_aix with new.
9688         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9689         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9690         with copy constructor.
9691
9692 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9693
9694         * solist.h (struct lm_info): Remove.
9695         (struct lm_info_base): New class.
9696         (struct so_list) <lm_info>: Change type to lm_info_base *.
9697         * nto-tdep.c (struct lm_info): Remove.
9698         (lm_addr): Adjust.
9699         * solib-aix.c (struct lm_info): Rename to ...
9700         (struct lm_info_aix): ... this.  Extend lm_info_base.
9701         (lm_info_p): Rename to ...
9702         (lm_info_aix_p): ... this, and adjust.
9703         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9704         solib_aix_parse_libraries, library_list_start_library,
9705         solib_aix_free_library_list, solib_aix_parse_libraries,
9706         solib_aix_get_library_list,
9707         solib_aix_relocate_section_addresses, solib_aix_free_so,
9708         solib_aix_get_section_offsets,
9709         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9710         Adjust.
9711         (struct solib_aix_inferior_data) <library_list>: Adjust.
9712         * solib-darwin.c (struct lm_info): Rename to ...
9713         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9714         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9715         * solib-dsbt.c (struct lm_info): Rename to ...
9716         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9717         (struct dsbt_info) <main_executable_lm_info): Adjust.
9718         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9719         dsbt_relocate_section_addresses): Adjust.
9720         * solib-frv.c (struct lm_info): Rename to ...
9721         (struct lm_info_frv): ... this.  Extend lm_info_base.
9722         (main_executable_lm_info): Adjust.
9723         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9724         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9725         find_canonical_descriptor_in_load_object,
9726         frv_fdpic_find_canonical_descriptor): Adjust.
9727         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9728         to lm_info_svr4.
9729         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9730         svr4_clear_so, svr4_copy_library_list,
9731         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9732         svr4_current_sos, svr4_fetch_objfile_link_map,
9733         solist_update_incremental): Adjust.
9734         * solib-svr4.h (struct lm_info_svr4): Move here from
9735         solib-svr4.c.
9736         * solib-target.c (struct lm_info): Rename to ...
9737         (struct lm_info_target): ... this.  Extend lm_info_base.
9738         (lm_info_p): Rename to ...
9739         (lm_info_target_p): ... this.
9740         (solib_target_parse_libraries, library_list_start_segment,
9741         library_list_start_section, library_list_start_library,
9742         library_list_end_library, solib_target_free_library_list,
9743         solib_target_current_sos, solib_target_free_so,
9744         solib_target_relocate_section_addresses): Adjust.
9745         * windows-nat.c (struct lm_info): Rename to ...
9746         (struct lm_info_windows): ... this.  Extend lm_info_base.
9747         (windows_make_so, handle_load_dll, handle_unload_dll,
9748         windows_xfer_shared_libraries): Adjust.
9749
9750 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9751
9752         * solib-darwin.c (struct darwin_so_list): Remove.
9753         (darwin_current_sos): Allocate an so_list object instead of a
9754         darwin_so_list, separately allocate an lm_info object.
9755         (darwin_free_so): Free lm_info.
9756
9757 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9758
9759         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9760         with fprintf_filtered.
9761
9762 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9763
9764         * regcache.c (regcache::regcache): New function.
9765         (regcache::~regcache): New function.
9766         (regcache_xmalloc_1): Remove.
9767         (regcache_xmalloc): Call new regcache.
9768         (regcache_xfree): Call delete regcache.
9769         (get_thread_arch_aspace_regcache): Call new regcache.
9770
9771 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9772
9773         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9774         lwp instead of ptid_get_lwp.
9775
9776 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9777
9778         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9779         lwp_info instead of getting from inferior_ptid.
9780
9781 2017-04-27  Keith Seitz  <keiths@redhat.com>
9782
9783         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9784         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9785         (CV_CONVERSION_BADNESS): Define.
9786         (rank_one_type): Remove overly restrictive rvalue reference
9787         rank checks.
9788         Add cv-qualifier checks and subranks for type equality.
9789         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9790         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9791         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9792
9793 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9794
9795         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9796         count when creating the object.
9797
9798 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9799             Ulrich Weigand  <uweigand@de.ibm.com>
9800
9801         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9802         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9803         is used in AIX.
9804         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9805         (process_xcoff_symbol): Likewise.
9806         (scan_xcoff_symtab): Likewise.
9807
9808 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9809
9810         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9811         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9812         (ia64_access_reg): Use get_frame_register_unsigned.
9813         (ia64_access_rse_reg): Likewise.
9814         (ia64_libunwind_frame_prev_register): Likewise.
9815
9816 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9817
9818         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9819         * gdbarch.c: Regenerated.
9820         * gdbarch.h: Regenerated.
9821         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9822         visibility external.
9823         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9824         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9825         (enum cfa_how_kind): Move to ...
9826         (struct dwarf2_frame_state_reg_info): Likewise.
9827         (struct dwarf2_frame_state): Likewise.
9828         * dwarf2-frame.h: ... here.
9829         (dwarf2_frame_state_alloc_regs): New declaration.
9830         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9831         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9832
9833 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9834
9835         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9836         regcache_raw_read_unsigned.
9837         (xtensa_pseudo_register_write): Likewise.
9838
9839 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9840
9841         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9842         (nds32_pseudo_register_write): Likewise.
9843
9844 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9845
9846         * regcache.c (struct regcache) <readonly_p>: Change its type
9847         to bool.
9848         (regcache_xmalloc_1): Update parameter type and callers update.
9849
9850 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9851
9852         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9853         set_gdbarch_wchar_bit.
9854         * arm-tdep.c (arm_gdbarch_init): Likewise.
9855
9856 2017-04-25  Pedro Alves  <palves@redhat.com>
9857
9858         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9859         (BothAreRelocatable, memcopy, memmove): Don't define.
9860         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9861         macros.
9862
9863 2017-04-25  Pedro Alves  <palves@redhat.com>
9864
9865         * common/common-defs.h: Include "common/poison.h".
9866         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9867         and adjust.
9868         * common/poison.h: New file.
9869         * common/traits.h: Include <type_traits>.
9870         (Not, Or, Requires): New, moved from common/function-view.h.
9871
9872 2017-04-25  Pedro Alves  <palves@redhat.com>
9873
9874         * breakpoint.h (struct breakpoint): In-class initialize all
9875         fields.  Make boolean fields "bool".
9876         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9877         memset call and initializations no longer necessary.
9878
9879 2017-04-25  Pedro Alves  <palves@redhat.com>
9880
9881         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9882         reference.
9883         (pt_btrace_insn): New function.
9884         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9885
9886 2017-04-25  Pedro Alves  <palves@redhat.com>
9887
9888         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9889         "base" field and inherit from "bp_location" instead.  Add
9890         non-default ctor.
9891         (allocate_location_exception): Use new non-default ctor.
9892         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9893         (init_bp_location): Convert to ...
9894         (bp_location::bp_location): ... this new ctor, and remove memset
9895         call.
9896         (base_breakpoint_allocate_location): Use the new non-default ctor.
9897         * breakpoint.h (bp_location): Now a class.  Declare default and
9898         non-default ctors.  In-class initialize all members.
9899         (init_bp_location): Remove declaration.
9900
9901 2017-04-25  Pedro Alves  <palves@redhat.com>
9902
9903         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9904         assignment operator.
9905
9906 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9907
9908         * doublest.c (convert_doublest_to_floatformat): Call
9909         floatformat_totalsize_bytes.
9910
9911 2017-04-22  Tom Tromey  <tom@tromey.com>
9912
9913         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9914         ui_out_emit_list.
9915         * stack.c (print_frame): Use ui_out_emit_list.
9916         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9917         ui_out_emit_list.
9918         * mi/mi-main.c (print_one_inferior)
9919         (mi_cmd_data_list_register_names)
9920         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9921         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9922         ui_out_emit_list.
9923         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9924         (mi_output_solib_attribs): Use ui_out_emit_list,
9925         ui_out_emit_tuple.
9926         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9927         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9928         (mi_cmd_stack_list_args, list_args_or_locals): Use
9929         ui_out_emit_list.
9930         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9931         * breakpoint.c (print_solib_event, output_thread_groups): Use
9932         ui_out_emit_list.
9933
9934 2017-04-22  Tom Tromey  <tom@tromey.com>
9935
9936         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9937         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9938         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9939
9940 2017-04-22  Tom Tromey  <tom@tromey.com>
9941
9942         * tracepoint.c (tvariables_info_1)
9943         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9944
9945 2017-04-22  Tom Tromey  <tom@tromey.com>
9946
9947         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9948         annotate_arg_emitter.
9949         * breakpoint.c (print_mention_watchpoint)
9950         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9951         * annotate.h (struct annotate_arg_emitter): New.
9952
9953 2017-04-22  Tom Tromey  <tom@tromey.com>
9954
9955         * record-btrace.c (record_btrace_insn_history)
9956         (record_btrace_insn_history_range, record_btrace_call_history)
9957         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9958         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9959         ui_out_emit_tuple.
9960         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9961         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9962         * skip.c (skip_info): Use ui_out_emit_tuple.
9963         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9964         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9965         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9966         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9967         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9968         ui_out_emit_tuple.
9969         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9970         (output_register, mi_cmd_data_read_memory)
9971         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9972         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9973         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9974         Use ui_out_emit_tuple.
9975         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9976         ui_out_emit_tuple.
9977         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9978         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9979         * linux-thread-db.c (info_auto_load_libthread_db): Use
9980         ui_out_emit_tuple.
9981         * inferior.c (print_inferior): Use ui_out_emit_tuple.
9982         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9983         * disasm.c (do_mixed_source_and_assembly_deprecated)
9984         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9985         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9986         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9987         * breakpoint.c (print_one_breakpoint_location)
9988         (print_one_breakpoint): Use ui_out_emit_tuple.
9989         * auto-load.c (print_script, info_auto_load_cmd): Use
9990         ui_out_emit_tuple.
9991         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9992
9993 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
9994
9995         * thread.c (print_thread_info_1): Remove dead code.
9996
9997 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9998
9999         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10000         GDB_SELF_TEST.
10001         * arm-tdep.c (selftests::arm_record_test): Likewise.
10002
10003 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10004
10005         * regcache.c (regcache_restore): Remove argument 2.  Replace
10006         argument 3 with regcache.  Get register status from
10007         src->register_status and get register contents from
10008         register_buffer (src, regnum).
10009         (regcache_cpy): Update.
10010
10011 2017-04-19  Pedro Alves  <palves@redhat.com>
10012
10013         * gdbthread.h (thread): Add missing closing parenthesis in
10014         comment.
10015
10016 2017-04-19  Pedro Alves  <palves@redhat.com>
10017
10018         * common/refcounted-object.h: New file.
10019         * gdbthread.h: Include "common/refcounted-object.h".
10020         (thread_info): Inherit from refcounted_object and add comments.
10021         (thread_info::incref, thread_info::decref)
10022         (thread_info::m_refcount): Delete.
10023         (thread_info::deletable): Use the refcounted_object::refcount()
10024         method.
10025         * inferior.c (current_inferior_): Add comment.
10026         (set_current_inferior): Increment/decrement refcounts.
10027         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10028         not-deletable instead of comparing with the current inferior.
10029         (initialize_inferiors): Increment the initial inferior's refcount.
10030         * inferior.h (struct inferior): Forward declare.
10031         Include "common/refcounted-object.h".
10032         (current_inferior, set_current_inferior): Move declaration to
10033         before struct inferior's definition, and fix comment.
10034         (inferior): Inherit from refcounted_object.  Add comments.
10035         * thread.c (switch_to_thread_no_regs): Reference the thread's
10036         inferior pointer directly instead of doing a ptid lookup.
10037         (switch_to_no_thread): New function.
10038         (switch_to_thread(thread_info *)): New function, factored out
10039         from ...
10040         (switch_to_thread(ptid_t)): ... this.
10041         (restore_current_thread): Delete.
10042         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10043         fields, and add 'inf' field.
10044         (do_restore_current_thread_cleanup): Check whether old->inf is
10045         alive instead of looking up an inferior by ptid.  Use
10046         switch_to_thread and switch_to_no_thread.
10047         (restore_current_thread_cleanup_dtor): Use old->inf directly
10048         instead of lookup up an inferior by id.  Decref the inferior.
10049         Don't restore 'removable'.
10050         (make_cleanup_restore_current_thread): Same the inferior pointer
10051         in old, instead of the inferior number.  Incref the inferior.
10052         Don't save/clear 'removable'.
10053
10054 2017-04-19  Pedro Alves  <palves@redhat.com>
10055
10056         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10057         unittests/scoped_restore-selftests.c.
10058         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10059         * common/scoped_restore.h (scoped_restore_base): Make "class".
10060         (scoped_restore_base::release): New public method.
10061         (scoped_restore_base::scoped_restore_base): New protected ctor.
10062         (scoped_restore_base::m_saved_var): New protected field.
10063         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10064         scoped_restore_base base class instead of m_saved_var directly.
10065         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10066         (scoped_restore_tmpl::scoped_restore_tmpl(const
10067         scoped_restore_tmpl<T>&)): Likewise.
10068         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10069         method.
10070         (scoped_restore_tmpl::saved_var): New method.
10071         (scoped_restore_tmpl::m_saved_var): Delete.
10072         * inferior.h (inferior::detaching): Now a bool.
10073         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10074         cleanup.
10075         * unittests/scoped_restore-selftests.c: New file.
10076
10077 2017-04-19  Pedro Alves  <palves@redhat.com>
10078
10079         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10080         Re-sort in alphabetic order.
10081
10082 2017-04-18  Pedro Alves  <palves@redhat.com>
10083
10084         * xml-support.c (obstack_xml_printf): Delete.
10085         * xml-support.h (obstack_xml_printf): Delete.
10086
10087 2017-04-18  Pedro Alves  <palves@redhat.com>
10088
10089         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10090         vdebug, verror, body_text, start_element, end_element, name,
10091         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10092         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10093         is_xinclude>: Make private and add m_ prefix.
10094         (gdb_xml_parser::body_text): New method, based on ...
10095         (gdb_xml_body_text): ... this.  Adjust.
10096         (gdb_xml_parser::vdebug): New method, based on ...
10097         (gdb_xml_debug): ... this.  Adjust.
10098         (gdb_xml_parser::verror): New method, based on ...
10099         (gdb_xml_error): ... this.  Adjust.
10100         (gdb_xml_parser::start_element): New method, based on ...
10101         (gdb_xml_start_element): ... this.  Adjust.
10102         (gdb_xml_start_element_wrapper): Defer to
10103         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10104         (gdb_xml_parser::end_element): New method, based on ...
10105         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10106         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10107         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10108         (gdb_xml_parser::use_dtd): New method, based on ...
10109         (gdb_xml_use_dtd): ... this.  Adjust.
10110         (gdb_xml_parser::parse): New method, based on ...
10111         (gdb_xml_parse): ... this.  Adjust.
10112         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10113         (xinclude_start_include): Adjust to call the parser's name method.
10114         (xml_xinclude_default, xml_xinclude_start_doctype)
10115         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10116         method.
10117         (xml_process_xincludes): Adjust to call parser methods.
10118         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10119         declarations.
10120
10121 2017-04-18  Pedro Alves  <palves@redhat.com>
10122
10123         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10124         gdb::optional<std::string>.
10125         * xml-support.c: Include <string>.
10126         (scope_level::scope_level(scope_level &&))
10127         (scope_level::~scope_level): Delete.
10128         (scope_level::body): Now a std::string.
10129         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10130         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10131         parameter.
10132         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10133         (xinclude_parsing_data::output): Now a std::string reference.
10134         (xinclude_start_include): Adjust.
10135         (xml_xinclude_default): Adjust.
10136         (xml_process_xincludes): Add 'output' parameter, and return bool.
10137         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10138         and return bool.
10139         * xml-tdesc.c: Include <unordered_map> and <string>.
10140         (tdesc_xml_cache): Delete.
10141         (tdesc_xml_cache_s): Delete.
10142         (xml_cache): Now an std::unordered_map.
10143         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10144         (target_fetch_description_xml): Change return type to
10145         gdb::optional<std::string>, and adjust.
10146         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10147         (target_fetch_description_xml): Change return type to
10148         gdb::optional<std::string>.
10149
10150 2017-04-18  Pedro Alves  <palves@redhat.com>
10151
10152         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10153         unittests/optional-selftests.c.
10154         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10155         * unittests/optional-selftests.c: New file.
10156         * unittests/optional/assignment/1.cc: New file.
10157         * unittests/optional/assignment/2.cc: New file.
10158         * unittests/optional/assignment/3.cc: New file.
10159         * unittests/optional/assignment/4.cc: New file.
10160         * unittests/optional/assignment/5.cc: New file.
10161         * unittests/optional/assignment/6.cc: New file.
10162         * unittests/optional/assignment/7.cc: New file.
10163         * unittests/optional/cons/copy.cc: New file.
10164         * unittests/optional/cons/default.cc: New file.
10165         * unittests/optional/cons/move.cc: New file.
10166         * unittests/optional/cons/value.cc: New file.
10167         * unittests/optional/in_place.cc: New file.
10168         * unittests/optional/observers/1.cc: New file.
10169         * unittests/optional/observers/2.cc: New file.
10170
10171 2017-04-18  Pedro Alves  <palves@redhat.com>
10172
10173         * common/gdb_optional.h: Include common/traits.h.
10174         (in_place_t): New type.
10175         (in_place): New constexpr variable.
10176         (optional::optional): Remove member initialization of
10177         m_instantiated.
10178         (optional::optional(in_place_t...)): New constructor.
10179         (optional::~optional): Use reset.
10180         (optional::optional(const optional&)): New.
10181         (optional::optional(const optional&&)): New.
10182         (optional::optional(T &)): New.
10183         (optional::optional(T &&)): New.
10184         (operator::operator=(const optional &)): New.
10185         (operator::operator=(optional &&)): New.
10186         (operator::operator= (const T &))
10187         (operator::operator= (T &&))
10188         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10189         (operator::reset): New.
10190         (operator::m_instantiated):: Add in-class initializer.
10191         * common/traits.h: Include <type_traits>.
10192         (struct And): New types.
10193
10194 2017-04-18  Pedro Alves  <palves@redhat.com>
10195
10196         * xml-support.c: Include <vector>.
10197         (scope_level::scope_level(const gdb_xml_element *))
10198         (scope_level::scope_level(scope_level&&)): New.
10199         (scope_level::~scope_level): New.
10200         (scope_level_s): Delete.
10201         (gdb_xml_parser::scopes): Now a std::vector.
10202         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10203         Use std::vector.
10204         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10205         scope cleanup code.
10206         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10207         of the scopes member.  Use std::vector::emplace_back.
10208
10209 2017-04-18  Pedro Alves  <palves@redhat.com>
10210
10211         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10212         a bool.
10213         (gdb_xml_end_element): Change type of first parameter.
10214         (gdb_xml_cleanup): Rename to ...
10215         (gdb_xml_parser::~gdb_xml_parser): ... this.
10216         (gdb_xml_create_parser_and_cleanup): Delete with ...
10217         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10218         to this new ctor.
10219         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10220         using gdb_xml_create_parser_and_cleanup.
10221         (xinclude_parsing_data): Add ctor/dtor.
10222         (xml_xinclude_cleanup): Delete.
10223         (xml_process_xincludes): Create a local xinclude_parsing_data
10224         instead of heap-allocating one.  Create a local gdb_xml_parser
10225         instead of heap-allocating one with
10226         gdb_xml_create_parser_and_cleanup.
10227
10228 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10229
10230         PR threads/20743
10231         * fbsd-nat.c (resume_one_thread_cb): Remove.
10232         (resume_all_threads_cb): Remove.
10233         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10234         iterate_over_threads.
10235
10236 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10237
10238         * NEWS: Create a new section for the next release branch.
10239         Rename the section of the current branch, now that it has
10240         been cut.
10241
10242 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10243
10244         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10245         * version.in: Bump version to 8.0.50.DATE-git.
10246
10247 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10248
10249         PR gdb/21385
10250         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10251         independently of the host, and fix build breakage on Cygwin.
10252
10253 2017-04-13  Pedro Alves  <palves@redhat.com>
10254
10255         * inferior.c (free_inferior): Convert to ...
10256         (inferior::~inferior): ... this dtor.
10257         (inferior::inferior): New ctor, factored out from ...
10258         (add_inferior_silent): ... here.  Allocate the inferior with a new
10259         expression.
10260         (delete_inferior): Call delete instead of free_inferior.
10261         * inferior.h (gdb_environ, continuation): Forward declare.
10262         (inferior): Now a class.  Add in-class initialization to all
10263         members.  Make boolean fields bool, except 'detaching'.
10264         (inferior::inferior): New explicit ctor.
10265         (inferior::~inferior): New.
10266
10267 2017-04-13  Pedro Alves  <palves@redhat.com>
10268
10269         * inferior.c (init_inferior_list): Delete.
10270         * inferior.h (init_inferior_list): Delete.
10271
10272 2017-04-13  Pedro Alves  <palves@redhat.com>
10273
10274         PR threads/13217
10275         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10276         (top level): Call it twice, with different thread sets.
10277
10278 2017-04-13  Pedro Alves  <palves@redhat.com>
10279
10280         * thread.c: Include <algorithm>.
10281         (thread_array_cleanup): Delete.
10282         (scoped_inc_dec_ref): New class.
10283         (live_threads_count): New function.
10284         (set_thread_refcount): Delete.
10285         (tp_array_compar_ascending): Now a bool.
10286         (tp_array_compar): Convert to a std::sort comparison function.
10287         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10288         and live_threads_count.
10289
10290 2017-04-13  Pedro Alves  <palves@redhat.com>
10291
10292         * infrun.c (follow_fork_inferior): Also switch the current
10293         inferior.
10294
10295 2017-04-13  Pedro Alves  <palves@redhat.com>
10296
10297         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10298         before calling create_internal_breakpoint.
10299
10300 2017-04-13  Pedro Alves  <palves@redhat.com>
10301
10302         * fork-child.c (execv_argv): New class.
10303         (breakup_args): Refactored as ...
10304         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10305         Copy arguments to storage and replace separators with NULL
10306         terminators in place.
10307         (escape_bang_in_quoted_argument): Adjust to return bool.
10308         (execv_argv::execv_argv): New ctor.
10309         (execv_argv::init_for_shell): New method, factored out from
10310         fork_inferior.  Don't strdup strings into the vector.
10311         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10312         Remove free_vector_argv call.
10313
10314 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10315
10316         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10317         tdep->rx_psw_type.
10318
10319 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10320
10321         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10322         * rx-tdep.c (rx_gdbarch_init): Likewise.
10323
10324 2017-04-13  Pedro Alves  <palves@redhat.com>
10325
10326         * breakpoint.h (struct breakpoint): Reindent.
10327
10328 2017-04-13  Pedro Alves  <palves@redhat.com>
10329
10330         * breakpoint.c (bp_location): Rename to ...
10331         (bp_locations): ... this.  All references updated.
10332         (bp_location_count): Rename to ...
10333         (bp_locations_count): ... this.  All references updated.
10334         (bp_location_placed_address_before_address_max): Rename to ...
10335         (bp_locations_placed_address_before_address_max): ... this.  All
10336         references updated.
10337         (bp_location_shadow_len_after_address_max): Rename to ...
10338         (bp_locations_shadow_len_after_address_max): ... this.  All
10339         references updated.
10340         (bp_location_compare_addrs): Rename to ...
10341         (bp_locations_compare_addrs): ... this.  All references updated.
10342         (bp_location_compare):Rename to ...
10343         (bp_locations_compare): ... this.  All references updated.
10344         (bp_location_target_extensions_update): Rename to ...
10345         (bp_locations_target_extensions_update): ... this.  All references
10346         updated.
10347
10348 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10349
10350         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10351         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10352         'sgtty.h'.
10353         * common/gdb_termios.h: New file, with parts of "terminal.h".
10354         * inflow.c: Include "gdb_termios.h".
10355         * ser-unix.c: Include "gdb_termios.h".
10356         * terminal.h: Move terminal-related defines to
10357         "common/gdb_termios.h".
10358
10359 2017-04-12  Tom Tromey  <tom@tromey.com>
10360
10361         * probe.c (parse_probes): Update.
10362         * location.h (delete_event_location): Don't declare.
10363         (event_location_deleter::operator()): Update.
10364         * location.c (event_location_deleter::operator()): Rename from
10365         delete_event_location.
10366         * linespec.h (linespec_result) <location>: Change type to
10367         event_location_up.
10368         * linespec.c (canonicalize_linespec, event_location_to_sals)
10369         (decode_objc): Update.
10370         (linespec_result): Don't call delete_event_location.
10371         * breakpoint.c (create_breakpoints_sal)
10372         (bkpt_probe_create_sals_from_location)
10373         (strace_marker_create_sals_from_location): Update.
10374
10375 2017-04-12  Tom Tromey  <tom@tromey.com>
10376
10377         * linespec.h (struct linespec_result): Add constructor and
10378         destructor.
10379         (init_linespec_result, destroy_linespec_result)
10380         (make_cleanup_destroy_linespec_result): Don't declare.
10381         * linespec.c (init_linespec_result): Remove.
10382         (linespec_result::~linespec_result): Rename from
10383         destroy_linespec_result.  Update.
10384         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10385         Remove.
10386         * breakpoint.c (create_breakpoint, break_range_command)
10387         (decode_location_default): Update.
10388         * ax-gdb.c (agent_command_1): Update.
10389
10390 2017-04-12  Tom Tromey  <tom@tromey.com>
10391
10392         * remote.c (remote_download_tracepoint): Update.
10393         * python/py-breakpoint.c (bppy_get_location): Update.
10394         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10395         (gdbscm_breakpoint_location): Update.
10396         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10397         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10398         Change type to event_location_up.
10399         * breakpoint.c (create_overlay_event_breakpoint)
10400         (create_longjmp_master_breakpoint)
10401         (create_std_terminate_master_breakpoint)
10402         (create_exception_master_breakpoint)
10403         (breakpoint_event_location_empty_p, print_breakpoint_location)
10404         (print_one_breakpoint_location, create_thread_event_breakpoint)
10405         (init_breakpoint_sal, create_breakpoint)
10406         (print_recreate_ranged_breakpoint, break_range_command)
10407         (init_ada_exception_breakpoint, say_where): Update.
10408         (base_breakpoint_dtor): Don't call delete_event_location.
10409         (bkpt_print_recreate, tracepoint_print_recreate)
10410         (dprintf_print_recreate, update_static_tracepoint)
10411         (breakpoint_re_set_default): Update.
10412
10413 2017-04-12  Tom Tromey  <tom@tromey.com>
10414
10415         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10416         type of "to_do".  Update.
10417         (compute_stack_depth): Use std::vector.
10418
10419 2017-04-12  Tom Tromey  <tom@tromey.com>
10420
10421         * printcmd.c (find_instruction_backward): Use std::vector.
10422
10423 2017-04-12  Tom Tromey  <tom@tromey.com>
10424
10425         * symfile.c (objfilep): Remove typedef.
10426         (reread_symbols): Use a std::vector.
10427
10428 2017-04-12  Tom Tromey  <tom@tromey.com>
10429
10430         * mi/mi-main.c (exec_direction_forward): Remove.
10431         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10432         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10433         scoped_restore.
10434         * guile/guile.c (guile_repl_command, guile_command)
10435         (gdbscm_execute_gdb_command): Use scoped_restore.
10436         * go-exp.y (go_parse): Use scoped_restore.
10437         * d-exp.y (d_parse): Use scoped_restore.
10438         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10439         * c-exp.y (c_parse): Use scoped_restore.
10440
10441 2017-04-12  Tom Tromey  <tom@tromey.com>
10442
10443         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10444         (mi_parse): Update return type.
10445         (mi_parse_free): Remove.
10446         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10447         (mi_parse::~mi_parse): Rename from mi_parse_free.
10448         (mi_parse_cleanup): Remove.
10449         (mi_parse): Return a unique_ptr.  Use new.
10450         * mi/mi-main.c (mi_execute_command): Update.
10451
10452 2017-04-12  Tom Tromey  <tom@tromey.com>
10453
10454         * location.c (explicit_location_lex_one): Return a
10455         unique_xmalloc_ptr.
10456         (string_to_explicit_location): Update.  Remove cleanups.
10457
10458 2017-04-12  Tom Tromey  <tom@tromey.com>
10459
10460         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10461         (compare_value_and_voffset): Change type.  Update.
10462         (compute_vtable_size): Change type of "offset_vec".
10463         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10464         (gnuv3_get_typeid): Remove extraneous declaration.
10465
10466 2017-04-12  Tom Tromey  <tom@tromey.com>
10467
10468         * charset.h (wchar_iterator): Fix comment.
10469
10470 2017-04-12  Tom Tromey  <tom@tromey.com>
10471
10472         * charset.c (iconv_wrapper): New class.
10473         (cleanup_iconv): Remove.
10474         (convert_between_encodings): Use it.
10475
10476 2017-04-12  Tom Tromey  <tom@tromey.com>
10477
10478         * symfile.h (increment_reading_symtab): Update type.
10479         * symfile.c (decrement_reading_symtab): Remove.
10480         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10481         * psymtab.c (psymtab_to_symtab): Update.
10482         * dwarf2read.c (dw2_instantiate_symtab): Update.
10483
10484 2017-04-12  Tom Tromey  <tom@tromey.com>
10485
10486         * jit.c (struct jit_reader): Declare separately.  Add constructor
10487         and destructor.  Change type of "handle".
10488         (loaded_jit_reader): Define separately.
10489         (jit_reader_load): Update.  New "new".
10490         (jit_reader_unload_command): Use "delete".
10491         * gdb-dlfcn.h (struct dlclose_deleter): New.
10492         (gdb_dlhandle_up): New typedef.
10493         (gdb_dlopen, gdb_dlsym): Update types.
10494         (gdb_dlclose): Remove.
10495         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10496         (gdb_dlsym): Change type of "handle".
10497         (make_cleanup_dlclose): Remove.
10498         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10499         * compile/compile-c-support.c (load_libcc): Update.
10500
10501 2017-04-12  Tom Tromey  <tom@tromey.com>
10502
10503         * symtab.h (find_pcs_for_symtab_line): Change return type.
10504         * symtab.c (find_pcs_for_symtab_line): Change return type.
10505         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10506         type of "vec".  Update.
10507         (ltpy_get_pcs_for_line): Update.
10508         * linespec.c (decode_digits_ordinary): Update.
10509
10510 2017-04-12  Tom Tromey  <tom@tromey.com>
10511
10512         * tracepoint.c (actions_command): Update.
10513         * python/python.c (python_command, python_interactive_command):
10514         Update.
10515         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10516         * guile/guile.c (guile_command): Update.
10517         * defs.h (read_command_lines, read_command_lines_1): Return
10518         command_line_up.
10519         (command_lines_deleter): New struct.
10520         (command_line_up): New typedef.
10521         * compile/compile.c (compile_code_command)
10522         (compile_print_command): Update.
10523         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10524         command_line_up.
10525         (make_cleanup_free_command_lines): Remove.
10526         * cli/cli-script.c (get_command_line, read_command_lines_1)
10527         (copy_command_lines): Return command_line_up.
10528         (while_command, if_command, read_command_lines, define_command)
10529         (document_command): Update.
10530         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10531         Remove.
10532         * breakpoint.h (breakpoint_set_commands): Change type of
10533         "commands".
10534         * breakpoint.c (breakpoint_set_commands): Change type of
10535         "commands".  Update.
10536         (do_map_commands_command, update_dprintf_command_list)
10537         (create_tracepoint_from_upload): Update.
10538
10539 2017-04-12  Tom Tromey  <tom@tromey.com>
10540
10541         * tracepoint.c (scope_info): Update.
10542         * spu-tdep.c (spu_catch_start): Update.
10543         * python/python.c (gdbpy_decode_line): Update.
10544         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10545         * python/py-breakpoint.c (bppy_init): Update.
10546         * probe.c (parse_probes): Update.
10547         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10548         * location.h (event_location_deleter): New struct.
10549         (event_location_up): New typedef.
10550         (new_linespec_location, new_address_location, new_probe_location)
10551         (new_explicit_location, copy_event_location)
10552         (string_to_event_location, string_to_event_location_basic)
10553         (string_to_explicit_location): Update return type.
10554         (make_cleanup_delete_event_location): Remove.
10555         * location.c (new_linespec_location, new_address_location)
10556         (new_probe_location, new_explicit_location, copy_event_location):
10557         Return event_location_up.
10558         (delete_event_location_cleanup)
10559         (make_cleanup_delete_event_location): Remove.
10560         (string_to_explicit_location, string_to_event_location_basic)
10561         (string_to_event_location): Return event_location_up.
10562         * linespec.c (canonicalize_linespec, event_location_to_sals)
10563         (decode_line_with_current_source)
10564         (decode_line_with_last_displayed, decode_objc): Update.
10565         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10566         * completer.c (location_completer): Update.
10567         * cli/cli-cmds.c (edit_command, list_command): Update.
10568         * breakpoint.c (create_overlay_event_breakpoint)
10569         (create_longjmp_master_breakpoint)
10570         (create_std_terminate_master_breakpoint)
10571         (create_exception_master_breakpoint)
10572         (create_thread_event_breakpoint): Update.
10573         (init_breakpoint_sal): Update.  Remove some dead code.
10574         (create_breakpoint_sal): Change type of "location".  Update.
10575         (create_breakpoints_sal, create_breakpoint, break_command_1)
10576         (dprintf_command, break_range_command, until_break_command)
10577         (init_ada_exception_breakpoint)
10578         (strace_marker_create_sals_from_location)
10579         (update_static_tracepoint, trace_command, ftrace_command)
10580         (strace_command, create_tracepoint_from_upload): Update.
10581         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10582         * ax-gdb.c (agent_command_1): Update.
10583
10584 2017-04-12  Pedro Alves  <palves@redhat.com>
10585
10586         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10587         * configure.tgt: Handle i[34567]86-*-go32* and
10588         i[34567]86-*-msdosdjgpp*.
10589         * i386-tdep.c (i386_svr4_reg_to_regnum):
10590         Make extern.
10591         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10592         i386-go32-tdep.c.
10593         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10594         * i386-go32-tdep.c: New file.
10595         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10596         declarations.
10597
10598 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10599
10600         * aix-thread.c (pd_status2str): Change return type to const char *.
10601
10602 2017-04-12  Pedro Alves  <palves@redhat.com>
10603
10604         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10605         calls to set_gdbarch_gnu_triplet_regexp.
10606
10607 2017-04-12  Pedro Alves  <palves@redhat.com>
10608
10609         PR gdb/21323
10610         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10611         New enum value.
10612         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10613         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10614         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10615         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10616         * gdbarch.h, gdbarch.c: Regenerate.
10617         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10618         gdbarch_wchar_bit and gdbarch_wchar_signed.
10619         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10620         * arm-tdep.c (arm_gdbarch_init): Likewise.
10621         * avr-tdep.c (avr_gdbarch_init): Likewise.
10622         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10623         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10624         * i386-tdep.c (i386_go32_init_abi): Likewise.
10625         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10626         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10627         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10628         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10629         * sh-tdep.c (sh_gdbarch_init): Likewise.
10630         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10631         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10632         * windows-tdep.c (windows_init_abi): Likewise.
10633         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10634
10635 2017-04-12  Pedro Alves  <palves@redhat.com>
10636
10637         PR c++/21323
10638         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10639         cplus_primitive_type_char32_t>: New enum values.
10640         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10641         and cplus_primitive_type_char32_t.
10642         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10643         32, use the archtecture's built-in type for char16_t and char32_t,
10644         respectively.  Otherwise, fallback to init_integer_type as before,
10645         but make the type unsigned, and issue a complaint.
10646         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10647
10648 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10649
10650         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10651         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10652
10653 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10654
10655         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10656         'const char *'.
10657
10658 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10659
10660         * common/common-utils.c (free_vector_argv): New function.
10661         * common/common-utils.h: Include <vector>.
10662         (free_vector_argv): New prototype.
10663         * darwin-nat.c (darwin_create_inferior): Rewrite function
10664         prototype in order to constify "exec_file" and accept a
10665         "std::string" for "allargs".
10666         * fork-child.c: Include <vector>.
10667         (breakup_args): Rewrite function, using C++.
10668         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10669         and accept "std::string" for "allargs".  Update the code to
10670         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10671         and "execvp".
10672         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10673         order to constify "exec_file" and accept a "std::string" for
10674         "allargs".
10675         * go32-nat.c (go32_create_inferior): Likewise.
10676         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10677         * infcmd.c (run_command_1): Constify "exec_file".  Use
10678         "std::string" for inferior arguments.
10679         * inferior.h (fork_inferior): Update prototype.
10680         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10681         prototype in order to constify "exec_file" and accept a
10682         "std::string" for "allargs".
10683         * nto-procfs.c (procfs_create_inferior): Likewise.
10684         * procfs.c (procfs_create_inferior): Likewise.
10685         * remote-sim.c (gdbsim_create_inferior): Likewise.
10686         * remote.c (extended_remote_run): Update code to accept
10687         "std::string" as argument.
10688         (extended_remote_create_inferior): Rewrite function prototype in
10689         order to constify "exec_file" and accept a "std::string" for
10690         "allargs".
10691         * rs6000-nat.c (super_create_inferior): Likewise.
10692         (rs6000_create_inferior): Likewise.
10693         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10694         * windows-nat.c (windows_create_inferior): Likewise.
10695
10696 2017-04-11  Pedro Alves  <palves@redhat.com>
10697
10698         * thread.c: Fix whitespace throughout.
10699
10700 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10701
10702         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10703
10704 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10705
10706         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10707
10708 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10709
10710         PR gdb/21364
10711         * osdata.c (info_osdata): Check if 'type' is an empty string
10712         instead of NULL.
10713
10714 2017-04-10  Pedro Alves  <palves@redhat.com>
10715
10716         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10717         (ptid_to_global_thread_id, in_thread_list)
10718         (do_captured_list_thread_ids, set_resumed, set_running)
10719         (set_executing, set_stop_requested, finish_thread_state)
10720         (validate_registers_access, can_access_registers_ptid)
10721         (print_thread_info_1, switch_to_thread)
10722         (do_restore_current_thread_cleanup)
10723         (make_cleanup_restore_current_thread, thread_command)
10724         (thread_name_command): Use operator== instead of ptid_equal.
10725
10726 2017-04-10  Pedro Alves  <palves@redhat.com>
10727
10728         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10729         (current_thread_cleanup_chain): Delete.
10730         (restore_current_thread_cleanup_dtor)
10731         (make_cleanup_restore_current_thread): Remove references to
10732         current_thread_cleanup_chain.
10733
10734 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10735
10736         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10737         REG_UNKNOWN.
10738
10739 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10740
10741         PR gdb/19942
10742         * gdbthread.h (thread_info::deletable): New method.
10743         (thread_info::incref): New method.
10744         (thread_info::decref): New method.
10745         (thread_info::refcount): Move it to private.
10746         * infrun.c (save_stop_context): Call inc_refcount.
10747         (release_stop_context_cleanup): Likewise.
10748         * thread.c (set_thread_exited): New function.
10749         (init_thread_list): Delete "tp" only it is deletable, otherwise
10750         call set_thread_exited.
10751         (delete_thread_1): Call set_thread_exited.
10752         (current_thread_cleanup) <inferior_pid>: Remove.
10753         <thread>: New field.
10754         (restore_current_thread_ptid_changed): Removed.
10755         (do_restore_current_thread_cleanup): Adjust.
10756         (restore_current_thread_cleanup_dtor): Don't call
10757         find_thread_ptid.
10758         (set_thread_refcount): Use dec_refcount.
10759         (make_cleanup_restore_current_thread): Adjust.
10760         (thread_apply_all_command): Call inc_refcount.
10761         (_initialize_thread): Don't call
10762         observer_attach_thread_ptid_changed.
10763
10764 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10765
10766         * thread.c (delete_thread_1): Hoist code on marking thread as
10767         exited.
10768
10769 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10770
10771         * windows-nat.c (windows_detach): Initialize ptid with
10772         minus_one_ptid.
10773
10774 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10775
10776         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10777
10778 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10779
10780         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10781         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10782         (bfin_pseudo_register_write): Likewise
10783
10784 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10785
10786         * common/ptid.h (struct ptid): Change to...
10787         (class ptid_t): ... this.
10788         <ptid_t>: New constructors.
10789         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10790         matches>: New methods.
10791         <make_null, make_minus_one>: New static methods.
10792         <pid>: Rename to...
10793         <m_pid>: ...this.
10794         <lwp>: Rename to...
10795         <m_lwp>: ...this.
10796         <tid>: Rename to...
10797         <m_tid>: ...this.
10798         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10799         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10800         as references, move comment to class ptid_t.
10801         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10802         ptid_t static methods.
10803         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10804         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10805         Take ptid arguments as references, implement using ptid_t methods.
10806         * unittests/ptid-selftests.c: New file.
10807         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10808         unittests/ptid-selftests.c.
10809         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10810
10811 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10812
10813         * python/python.c (python_run_simple_file): Cast mode literal to
10814         non-const char pointer as expected by PyFile_FromString.
10815
10816 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10817
10818         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10819         minus_one_ptid and null_ptid.
10820
10821 2017-04-05  Pedro Alves  <palves@redhat.com>
10822
10823         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10824         * configure: Regenerate.
10825
10826 2017-04-05  Pedro Alves  <palves@redhat.com>
10827
10828         * ada-exp.y (yyerror): Constify.
10829         * ada-lang.c (bound_name, get_selections)
10830         (ada_variant_discrim_type)
10831         (ada_variant_discrim_name, ada_value_struct_elt)
10832         (ada_lookup_struct_elt_type, is_unchecked_variant)
10833         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10834         (catch_ada_exception_command_split)
10835         (catch_ada_assert_command_split, catch_assert_command)
10836         (ada_op_name): Constify.
10837         * ada-lang.h (ada_yyerror, get_selections)
10838         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10839         * arc-tdep.c (arc_print_frame_cache): Constify.
10840         * arm-tdep.c (arm_skip_stub): Constify.
10841         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10842         (gen_aggregate_elt_ref): Constify.
10843         * bcache.c (print_bcache_statistics): Constify.
10844         * bcache.h (print_bcache_statistics): Constify.
10845         * break-catch-throw.c (catch_exception_command_1):
10846         * breakpoint.c (struct ep_type_description::description):
10847         Constify.
10848         (add_solib_catchpoint): Constify.
10849         (catch_fork_command_1): Add cast.
10850         (add_catch_command): Constify.
10851         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10852         Constify.
10853         * bsd-uthread.c (bsd_uthread_state): Constify.
10854         * buildsym.c (patch_subfile_names): Constify.
10855         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10856         Constify.
10857         * c-exp.y (yyerror): Constify.
10858         (token::oper): Constify.
10859         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10860         * c-varobj.c (cplus_describe_child): Constify.
10861         * charset.c (find_charset_names): Add cast.
10862         (find_charset_names): Constify array and add const_cast.
10863         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10864         (edit_command): Constify.
10865         * cli/cli-decode.c (lookup_cmd): Constify.
10866         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10867         Constify.
10868         (struct dump_context): Constify.
10869         (add_dump_command, restore_command): Constify.
10870         * cli/cli-script.c (get_command_line): Constify.
10871         * cli/cli-script.h (get_command_line): Constify.
10872         * cli/cli-utils.c (check_for_argument): Constify.
10873         * cli/cli-utils.h (check_for_argument): Constify.
10874         * coff-pe-read.c (struct read_pe_section_data): Constify.
10875         * command.h (lookup_cmd): Constify.
10876         * common/print-utils.c (decimal2str): Constify.
10877         * completer.c (gdb_print_filename): Constify.
10878         * corefile.c (set_gnutarget): Constify.
10879         * cp-name-parser.y (yyerror): Constify.
10880         * cp-valprint.c (cp_print_class_member): Constify.
10881         * cris-tdep.c (cris_register_name, crisv32_register_name):
10882         Constify.
10883         * d-exp.y (yyerror): Constify.
10884         (struct token::oper): Constify.
10885         * d-lang.h (d_yyerror): Constify.
10886         * dbxread.c (struct header_file_location::name): Constify.
10887         (add_old_header_file, add_new_header_file, last_function_name)
10888         (dbx_next_symbol_text, add_bincl_to_list)
10889         (find_corresponding_bincl_psymtab, set_namestring)
10890         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10891         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10892         * defs.h (command_line_input, print_address_symbolic)
10893         (deprecated_readline_begin_hook): Constify.
10894         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10895         Constify.
10896         * event-top.c (handle_line_of_input): Constify and add cast.
10897         * exceptions.c (catch_errors): Constify.
10898         * exceptions.h (catch_errors): Constify.
10899         * expprint.c (print_subexp_standard, op_string, op_name)
10900         (op_name_standard, dump_raw_expression, dump_raw_expression):
10901         * expression.h (op_name, op_string, dump_raw_expression):
10902         Constify.
10903         * f-exp.y (yyerror): Constify.
10904         (struct token::oper): Constify.
10905         (struct f77_boolean_val::name): Constify.
10906         * f-lang.c (f_word_break_characters): Constify.
10907         * f-lang.h (f_yyerror): Constify.
10908         * fork-child.c (fork_inferior): Add cast.
10909         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10910         (new_variant): Constify.
10911         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10912         * gdbarch.c: Regenerate.
10913         * gdbcore.h (set_gnutarget): Constify.
10914         * go-exp.y (yyerror): Constify.
10915         (token::oper): Constify.
10916         * go-lang.h (go_yyerror): Constify.
10917         * go32-nat.c (go32_sysinfo): Constify.
10918         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10919         * guile/scm-cmd.c (cmdscm_function): Constify.
10920         * guile/scm-param.c (pascm_param_value): Constify.
10921         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10922         (h8300sx_register_name): Constify.
10923         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10924         Constify.
10925         * ia64-tdep.c (ia64_register_names): Constify.
10926         * infcmd.c (construct_inferior_arguments): Constify.
10927         (path_command, attach_post_wait): Constify.
10928         * language.c (show_range_command, show_case_command)
10929         (unk_lang_error): Constify.
10930         * language.h (language_defn::la_error)
10931         (language_defn::la_name_of_this): Constify.
10932         * linespec.c (decode_line_2): Constify.
10933         * linux-thread-db.c (thread_db_err_str): Constify.
10934         * lm32-tdep.c (lm32_register_name): Constify.
10935         * m2-exp.y (yyerror): Constify.
10936         * m2-lang.h (m2_yyerror): Constify.
10937         * m32r-tdep.c (m32r_register_names): Constify and make static.
10938         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10939         * m88k-tdep.c (m88k_register_name): Constify.
10940         * macroexp.c (appendmem): Constify.
10941         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10942         (upgrade_type, parse_external, parse_partial_symbols)
10943         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10944         (new_symbol): Constify.
10945         * memattr.c (mem_info_command): Constify.
10946         * mep-tdep.c (register_name_from_keyword): Constify.
10947         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10948         Constify.
10949         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10950         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10951         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10952         cast.
10953         (mi_execute_async_cli_command): Constify.
10954         * mips-tdep.c (mips_register_name): Constify.
10955         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10956         (am33_register_name, am33_2_register_name)
10957         * moxie-tdep.c (moxie_register_names): Constify.
10958         * nat/linux-osdata.c (osdata_type): Constify fields.
10959         * nto-tdep.c (nto_parse_redirection): Constify.
10960         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10961         (lookup_child_selector): Constify.
10962         (objc_methcall::name): Constify.
10963         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10964         (lookup_struct_typedef): Constify.
10965         * objfiles.c (pc_in_section): Constify.
10966         * objfiles.h (pc_in_section): Constify.
10967         * p-exp.y (struct token::oper): Constify.
10968         (yyerror): Constify.
10969         * p-lang.h (pascal_yyerror): Constify.
10970         * parser-defs.h (op_name_standard): Constify.
10971         (op_print::string): Constify.
10972         (exp_descriptor::op_name): Constify.
10973         * printcmd.c (print_address_symbolic): Constify.
10974         * psymtab.c (print_partial_symbols): Constify.
10975         * python/py-breakpoint.c (stop_func): Constify.
10976         (bppy_get_expression): Constify.
10977         * python/py-cmd.c (cmdpy_completer::name): Constify.
10978         (cmdpy_function): Constify.
10979         * python/py-event.c (evpy_add_attribute)
10980         (gdbpy_initialize_event_generic): Constify.
10981         * python/py-event.h (evpy_add_attribute)
10982         (gdbpy_initialize_event_generic): Constify.
10983         * python/py-evts.c (add_new_registry): Constify.
10984         * python/py-finishbreakpoint.c (outofscope_func): Constify.
10985         * python/py-framefilter.c (get_py_iter_from_func): Constify.
10986         * python/py-inferior.c (get_buffer): Add cast.
10987         * python/py-param.c (parm_constant::name): Constify.
10988         * python/py-unwind.c (fprint_frame_id): Constify.
10989         * python/python.c (gdbpy_parameter_value): Constify.
10990         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10991         * remote.c (memory_packet_config::name): Constify.
10992         (show_packet_config_cmd, remote_write_bytes)
10993         (remote_buffer_add_string):
10994         * reverse.c (exec_reverse_once): Constify.
10995         * rs6000-tdep.c (variant::name, variant::description): Constify.
10996         * rust-exp.y (rustyyerror): Constify.
10997         * rust-lang.c (rust_op_name): Constify.
10998         * rust-lang.h (rustyyerror): Constify.
10999         * serial.h (serial_ops::name): Constify.
11000         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11001         (sh_sh3e_register_name, sh_sh2e_register_name)
11002         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11003         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11004         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11005         (sh_sh4al_dsp_register_name): Constify.
11006         * sh64-tdep.c (sh64_register_name): Constify.
11007         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11008         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11009         * stabsread.c (patch_block_stabs, read_type_number)
11010         (ref_map::stabs, ref_add, process_reference)
11011         (symbol_reference_defined, define_symbol, define_symbol)
11012         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11013         (read_one_struct_field, read_struct_fields, read_baseclasses)
11014         (read_tilde_fields, read_struct_type, read_array_type)
11015         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11016         (read_huge_number, read_range_type, read_args, common_block_start)
11017         (find_name_end): Constify.
11018         * stabsread.h (common_block_start, define_symbol)
11019         (process_one_symbol, symbol_reference_defined, ref_add):
11020         * symfile.c (get_section_index, add_symbol_file_command):
11021         * symfile.h (get_section_index): Constify.
11022         * target-descriptions.c (tdesc_type::name): Constify.
11023         (tdesc_free_type): Add cast.
11024         * target.c (find_default_run_target):
11025         (add_deprecated_target_alias, find_default_run_target)
11026         (target_announce_detach): Constify.
11027         (do_option): Constify.
11028         * target.h (add_deprecated_target_alias): Constify.
11029         * thread.c (print_thread_info_1): Constify.
11030         * top.c (deprecated_readline_begin_hook, command_line_input):
11031         Constify.
11032         (init_main): Add casts.
11033         * top.h (handle_line_of_input): Constify.
11034         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11035         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11036         (tfind_command): Rename to ...
11037         (tfind_command_1): ... this and constify.
11038         (tfind_command): New function.
11039         (tfind_end_command, tfind_start_command): Adjust.
11040         (encode_source_string): Constify.
11041         * tracepoint.h (encode_source_string): Constify.
11042         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11043         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11044         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11045         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11046         * tui/tui-win.c (parse_scrolling_args): Constify.
11047         * tui/tui-windata.c (tui_erase_data_content): Constify.
11048         * tui/tui-windata.h (tui_erase_data_content): Constify.
11049         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11050         * tui/tui.c (tui_enable): Add cast.
11051         * utils.c (defaulted_query): Constify.
11052         (init_page_info): Add cast.
11053         (puts_debug, subset_compare): Constify.
11054         * utils.h (subset_compare): Constify.
11055         * varobj.c (varobj_format_string): Constify.
11056         * varobj.h (varobj_format_string): Constify.
11057         * vax-tdep.c (vax_register_name): Constify.
11058         * windows-nat.c (windows_detach): Constify.
11059         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11060         * xml-support.c (gdb_xml_end_element): Constify.
11061         * xml-tdesc.c (tdesc_start_reg): Constify.
11062         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11063         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11064         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11065
11066 2017-04-05  Pedro Alves  <palves@redhat.com>
11067
11068         * proc-api.c (struct trans): Constify.
11069         (procfs_note): Constify.
11070         * proc-events.c (struct trans, syscall_table):
11071         * proc-flags.c (struct trans): Constify.
11072         * proc-utils.h (procfs_note): Constify.
11073         * proc-why.c (struct trans): Constify.
11074         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11075         (procfs_detach): Constify.
11076         * sol-thread.c (struct string_map): Constify.
11077         (td_err_string, td_state_string): Constify.
11078
11079 2017-04-05  Pedro Alves  <palves@redhat.com>
11080
11081         * proc-api.c (procfs_filename): Don't initialize
11082         procfs_filename.
11083         (prepare_to_trace): Assume procfs_filename is non-NULL.
11084         (_initialize_proc_api): Give procfs_filename a default value here.
11085
11086 2017-04-05  Pedro Alves  <palves@redhat.com>
11087
11088         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11089         'cond_string' parameter.
11090         (extract_exception_regexp): Constify 'string' parameter.
11091         (catch_exception_command_1): Constify.
11092         * breakpoint.c (init_catchpoint)
11093         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11094         parameter.
11095         (ep_parse_optional_if_clause, catch_fork_command_1)
11096         (catch_exec_command_1): Constify.
11097         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11098         parameter.
11099         (ep_parse_optional_if_clause): Constify.
11100         * cli/cli-utils.c (remove_trailing_whitespace)
11101         (check_for_argument): Constify.
11102         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11103         non-const overload.
11104         (check_for_argument): Likewise.
11105
11106 2017-04-05  Pedro Alves  <palves@redhat.com>
11107
11108         * event-top.c (command_line_handler): Add cast to execute_command
11109         call.
11110         * record-btrace.c (cmd_record_btrace_bts_start)
11111         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11112         (cmd_record_btrace_start): Add cast to execute_command call.
11113         * record-full.c (record_full_goto_insn):
11114         * record.c (record_start, record_stop): Add cast to
11115         execute_command_to_string calls.
11116         (cmd_record_start): Add cast to execute_command calls.
11117
11118 2017-04-05  Pedro Alves  <palves@redhat.com>
11119
11120         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11121         static inline function.
11122         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11123         array and use gdb_PyArg_ParseTupleAndKeywords.
11124         * python/py-cmd.c (cmdpy_init): Likewise.
11125         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11126         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11127         (infpy_search_memory): Likewise.
11128         * python/py-objfile.c (objfpy_add_separate_debug_file)
11129         (gdbpy_lookup_objfile): Likewise.
11130         * python/py-symbol.c (gdbpy_lookup_symbol)
11131         (gdbpy_lookup_global_symbol): Likewise.
11132         * python/py-type.c (gdbpy_lookup_type): Likewise.
11133         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11134         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11135         Likewise.
11136
11137 2017-04-05  Pedro Alves  <palves@redhat.com>
11138
11139         * python/python-internal.h (gdb_PyGetSetDef): New type.
11140         * python/py-block.c (block_object_getset)
11141         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11142         * python/py-event.c (event_object_getset)
11143         (finish_breakpoint_object_getset): Likewise.
11144         * python/py-inferior.c (inferior_object_getset): Likewise.
11145         * python/py-infthread.c (thread_object_getset): Likewise.
11146         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11147         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11148         * python/py-objfile.c (objfile_getset): Likewise.
11149         * python/py-progspace.c (pspace_getset): Likewise.
11150         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11151         Likewise.
11152         * python/py-record.c (recpy_record_getset): Likewise.
11153         * python/py-symbol.c (symbol_object_getset): Likewise.
11154         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11155         Likewise.
11156         * python/py-type.c (type_object_getset, field_object_getset):
11157         Likewise.
11158         * python/py-value.c (value_object_getset): Likewise.
11159
11160 2017-04-05  Pedro Alves  <palves@redhat.com>
11161
11162         * python/python-internal.h (gdb_PyObject_CallMethod)
11163         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11164         New functions.
11165         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11166         (PySys_GetObject, PySys_SetPath): New macros.
11167
11168 2017-04-05  Pedro Alves  <palves@redhat.com>
11169
11170         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11171         info_osdata_command.
11172         * osdata.c (info_osdata_command): Rename to ...
11173         (info_osdata): ... this.  Constify 'type' parameter, and remove
11174         the 'from_tty' parameter.  Accept NULL TYPE.
11175         (info_osdata_command): New function.
11176         * osdata.h (info_osdata_command): Remove declaration.
11177         (info_osdata): New declaration.
11178
11179 2017-04-05  Pedro Alves  <palves@redhat.com>
11180
11181         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11182         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11183         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11184         parameter.
11185         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11186         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11187         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11188         parameter.
11189         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11190         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11191         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11192         (mi_cmd_file_list_exec_source_files)
11193         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11194         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11195         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11196         parameter.
11197         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11198         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11199         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11200         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11201         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11202         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11203         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11204         'command' parameter.
11205         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11206         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11207         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11208         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11209         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11210         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11211         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11212         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11213         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11214         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11215         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11216         parameter.
11217         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11218         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11219         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11220         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11221         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11222         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11223         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11224         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11225         (mi_cmd_data_list_changed_registers)
11226         (mi_cmd_data_write_register_values)
11227         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11228         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11229         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11230         (mi_cmd_list_features, mi_cmd_list_target_features)
11231         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11232         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11233         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11234         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11235         (mi_cmd_trace_frame_collected): Constify 'command'
11236         parameter.
11237         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11238         'command' parameter.
11239
11240 2017-04-05  Pedro Alves  <palves@redhat.com>
11241
11242         * ada-lang.c (ada_completer_word_break_characters): Now a const
11243         array.
11244         (ada_get_gdb_completer_word_break_characters): Constify.
11245         * completer.c (gdb_completer_command_word_break_characters)
11246         (gdb_completer_file_name_break_characters)
11247         (gdb_completer_quote_characters): Now const arrays.
11248         (get_gdb_completer_quote_characters): Constify.
11249         (set_rl_completer_word_break_characters): New function.
11250         (set_gdb_completion_word_break_characters)
11251         (complete_line_internal): Use it.
11252         * completer.h (get_gdb_completer_quote_characters): Constify.
11253         (set_rl_completer_word_break_characters): Declare.
11254         * f-lang.c (f_word_break_characters): Constify.
11255         * language.c (default_word_break_characters): Constify.
11256         * language.h (language_defn::la_word_break_characters): Constify.
11257         (default_word_break_characters): Constify.
11258         * top.c (init_main): Use set_rl_completer_word_break_characters.
11259
11260 2017-04-05  Pedro Alves  <palves@redhat.com>
11261
11262         * aix-thread.c (aix_thread_pid_to_str)
11263         (aix_thread_extra_thread_info): Constify.
11264         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11265         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11266         (bsd_uthread_pid_to_str): Constify.
11267         * corelow.c (core_pid_to_str): Constify.
11268         * darwin-nat.c (darwin_pid_to_str): Constify.
11269         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11270         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11271         Constify.
11272         * gnu-nat.c (gnu_pid_to_str): Constify.
11273         * go32-nat.c (go32_pid_to_str): Constify.
11274         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11275         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11276         * inferior.c (inferior_pid_to_str): Constify.
11277         * linux-nat.c (linux_nat_pid_to_str): Constify.
11278         * linux-tdep.c (linux_core_pid_to_str): Constify.
11279         * linux-thread-db.c (thread_db_pid_to_str)
11280         (thread_db_extra_thread_info): Constify.
11281         * nto-tdep.c (nto_extra_thread_info): Constify.
11282         * nto-tdep.h (nto_extra_thread_info): Constify.
11283         * obsd-nat.c (obsd_pid_to_str): Constify.
11284         * procfs.c (procfs_pid_to_str): Constify.
11285         * ravenscar-thread.c (ravenscar_extra_thread_info)
11286         (ravenscar_pid_to_str): Constify.
11287         * remote-sim.c (gdbsim_pid_to_str): Constify.
11288         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11289         Constify.
11290         * sol-thread.c (solaris_pid_to_str): Constify.
11291         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11292         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11293         * target.c (default_pid_to_str, target_pid_to_str)
11294         (normal_pid_to_str, default_pid_to_str): Constify.
11295         * target.h (target_ops::to_pid_to_str)
11296         (target_ops::to_extra_thread_info): Constify.
11297         (target_pid_to_str, normal_pid_to_str): Constify.
11298         * windows-nat.c (windows_pid_to_str): Constify.
11299         * gdbarch.sh (core_pid_to_str): Constify.
11300         * target-delegates.c: Regenerate.
11301         * gdbarch.h, gdbarch.c: Regenerate.
11302
11303 2017-04-05  Pedro Alves  <palves@redhat.com>
11304
11305         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11306         the memory of the temporary warning_pre_print override.
11307         * utils.c (warning_pre_print): Constify.
11308         * utils.h (warning_pre_print): Constify.
11309
11310 2017-04-05  Pedro Alves  <palves@redhat.com>
11311
11312         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11313         (shell_command): New function.
11314         (make_command): Use std::string.
11315         (init_cli_cmds): Register shell_command instead of shell_escape.
11316
11317 2017-04-05  Pedro Alves  <palves@redhat.com>
11318
11319         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11320         * tracepoint.c (default_collect): Don't initialize.
11321
11322 2017-04-05  Pedro Alves  <palves@redhat.com>
11323
11324         * macroexp.c (macro_buffer::shared): Now a bool.
11325         (init_buffer): Update.
11326         (init_shared_buffer): Constify 'addr' parameter.
11327         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11328         casts.
11329
11330 2017-04-05  Pedro Alves  <palves@redhat.com>
11331
11332         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11333         * disasm.c (set_disassembler_options): Constify local.
11334         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11335
11336 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11337
11338         PR gdb/21352
11339         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11340         option.
11341
11342 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11343
11344         * frame.c (frame_unwind_register_unsigned): Call
11345         frame_unwind_register_value.
11346
11347 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11348
11349         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11350         Use gdb_test_multiple, and don't match anchor.
11351
11352 2017-04-05  Pedro Alves  <palves@redhat.com>
11353
11354         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11355         (Write After Approval): Remove Simon Marchi.
11356
11357 2017-04-05  Pedro Alves  <palves@redhat.com>
11358
11359         * common/gdb_optional.h (optional::optional): Make constexpr and
11360         initialize m_dummy.
11361
11362 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11363
11364         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11365         (amd64fbsd_jmp_buf_reg_offset): Remove.
11366         (amd64fbsd_supply_uthread): Remove function.
11367         (amd64fbsd_collect_uthread): Remove function.
11368         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11369         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11370         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11371         (fbsd-nat.c): Update comment.
11372         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11373         (i386fbsd_jmp_buf_reg_offset): Remove.
11374         (i386fbsd_supply_uthread): Remove function.
11375         (i386fbsd_collect_uthread): Remove function.
11376         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11377
11378 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11379
11380         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11381         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11382         * NEWS: Mention that support for FreeBSD/alpha was removed.
11383         * alpha-fbsd-tdep.c: Delete file.
11384         * config/alpha/fbsd.mh: Delete file.
11385         * configure.host: Delete alpha*-*-freebsd* and
11386         alpha*-*-kfreebsd*-gnu.
11387         * configure.tgt: Delete alpha*-*-freebsd* and
11388         alpha*-*-kfreebsd*-gnu.
11389
11390 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11391
11392         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11393         amd64bsd_store_inferior_registers): Use ptid from regcache.
11394
11395 2017-04-04  Pedro Alves  <palves@redhat.com>
11396
11397         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11398         data fields, make them private and add "m_" prefixes.
11399         (lnp_state_machine::lnp_state_machine): New ctor.
11400         (record_line, check_line_address, handle_set_discriminator)
11401         (handle_set_address, handle_advance_pc, handle_special_opcode)
11402         (handle_advance_line, handle_set_file, handle_negate_stmt)
11403         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11404         (end_sequence, advance_line): New methods.
11405         (m_gdbarch, m_record_lines_p): New fields.
11406         (lnp_reader_state): Delete.
11407         (dwarf_record_line): Rename to ...
11408         (lnp_state_machine::record_line): ... adjust.
11409         (init_lnp_state_machine): Delete.
11410         (lnp_state_machine::lnp_state_machine): New.
11411         (check_line_address): Rename to ...
11412         (lnp_state_machine::check_line_address): This.
11413         (dwarf_decode_lines_1): Remove reference to "reader_state".
11414         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11415         State machine internal state manipulation moved to
11416         lnp_state_machine methods.
11417
11418 2017-04-04  Pedro Alves  <palves@redhat.com>
11419
11420         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11421         unittests/offset-type-selftests.c.
11422         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11423         * common/offset-type.h: New file.
11424         * common/preprocessor.h: New file.
11425         * common/traits.h: New file.
11426         * common/valid-expr.h: New file.
11427         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11428         sect_offset and cu_offset strong typedefs throughout.
11429         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11430         typedefs throughout.
11431         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11432         sect_offset and cu_offset strong typedefs throughout.
11433         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11434         typedefs throughout.
11435         * gdbtypes.h: Include "common/offset-type.h".
11436         (cu_offset): Now an offset type (strong typedef) instead of a
11437         struct.
11438         (sect_offset): Likewise.
11439         (union call_site_parameter_u): Rename "param_offset" field to
11440         "param_cu_off".
11441         * unittests/offset-type-selftests.c: New file.
11442
11443 2017-04-04  Pedro Alves  <palves@redhat.com>
11444
11445         * common/underlying.h: New file.
11446         * dwarf2read.c: Include "common/gdb_optional.h" and
11447         "common/underlying.h".
11448         (dir_index, file_name_index): New types.
11449         (file_entry): Use them.
11450         (file_entry::include): Use to_underlying.
11451         (line_header::add_file_name): Use dir_index.
11452         (read_formatted_entries): Use gdb::optional.  Read form before
11453         writting to file_entry.
11454         (dwarf_decode_line_header): Use dir_index.
11455         (lnp_state_machine::current_file): Use to_underlying.
11456         (lnp_state_machine::file): Change type to file_name_index.
11457         (dwarf_record_line): Use to_underlying.
11458         (init_lnp_state_machine): Use file_name_index.
11459         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11460
11461 2017-04-04  Pedro Alves  <palves@redhat.com>
11462
11463         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11464         operator bool, has_value and get methods.
11465
11466 2017-04-04  Pedro Alves  <palves@redhat.com>
11467
11468         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11469         fields.
11470         (line_header): Initialize all data fields.  Change type of
11471         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11472         Change type of include_dirs to std::vector<const char *>.  Remove
11473         num_include_dirs, include_dirs_size.  Change type of file_names to
11474         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11475         (line_header::line_header): New.
11476         (line_header::add_include_dir, line_header::add_file_name): New
11477         methods.
11478         (line_header::include_dir_at): Remove NULL check.
11479         (line_header::file_name_at): Add const overload.
11480         (line_header_up): New unique_ptr typedef.
11481         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11482         std::vector.  Remove free_line_header call.
11483         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11484         free_line_header call.
11485         (free_cu_line_header): Delete.
11486         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11487         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11488         Adjust to use std::vector.
11489         (free_line_header): Delete.
11490         (free_line_header_voidp): Use delete.
11491         (add_include_dir): Replace with ...
11492         (line_header::add_include_dir): ... this method.  Use std::vector.
11493         (add_file_name): Replace with ...
11494         (line_header::add_file_name): ... this method.  Use std::vector.
11495         (add_include_dir_stub): Delete.
11496         (read_formatted_entries): Remove memset.
11497         (dwarf_decode_line_header): Return a line_header_up instead of a
11498         raw pointer.  Remove cleanup handling.  Pass lambdas to
11499         read_formatted_entries.  Adjust to use line_header methods.
11500         (dwarf_decode_lines_1): Adjust to use line_header methods.
11501         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11502         use std::vector.
11503
11504 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11505
11506         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11507         instead of struct ptid.
11508
11509 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11510
11511         * frame.c (get_frame_register_bytes): Unwind using value.
11512         (put_frame_register_bytes): Likewise.
11513
11514 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11515
11516         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11517         aggregate-like.
11518
11519 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11520
11521         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11522
11523 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11524
11525         * gdbthread.h (struct thread_info): Declare constructor and
11526         destructor.  Add some in-class member initializers.
11527         * thread.c (free_thread): Remove.
11528         (init_thread_list): Call delete instead of free_thread.
11529         (new_thread): Call thread_info constructor.
11530         (thread_info::thread_info): New function.
11531         (thread_info::~thread_info): New function.
11532         (delete_thread_1): Call delete instead of free_thread.
11533         (make_cleanup_restore_current_thread): Move tp and frame to
11534         inner block.
11535
11536 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11537
11538         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11539         (arc_skip_prologue): Likewise.
11540         (arc_make_frame_cache): Likewise.
11541         (arc_pv_get_operand): New function.
11542         (arc_is_in_prologue): Likewise.
11543         (arc_analyze_prologue): Likewise.
11544         (arc_print_frame_cache): Likewise.
11545         (MAX_PROLOGUE_LENGTH): New constant.
11546
11547 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11548
11549         * configure.tgt: Add arc-insn.o.
11550         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11551         (dump_arc_instruction_command): New function.
11552         (arc_fprintf_disasm): Likewise.
11553         (arc_disassemble_info): Likewise.
11554         (arc_insn_get_operand_value): Likewise.
11555         (arc_insn_get_operand_value_signed): Likewise.
11556         (arc_insn_get_memory_base_reg): Likewise.
11557         (arc_insn_get_memory_offset): Likewise.
11558         (arc_insn_get_branch_target): Likewise.
11559         (arc_insn_dump): Likewise.
11560         (arc_insn_get_linear_next_pc): Likewise.
11561         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11562         (arc_disassemble_info): Likewise.
11563         (arc_insn_get_branch_target): Likewise.
11564         (arc_insn_get_linear_next_pc): Likewise.
11565         * NEWS: Mention new "maint print arc arc-instruction".
11566
11567 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11568
11569         * arc-tdep (maintenance_print_arc_list): New variable.
11570         (maintenance_print_arc_command): New function.
11571
11572 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11573
11574         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11575         Add "limm" and "reserved".
11576         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11577         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11578         * arc-tdep.h (arc_regnum): Likewise.
11579
11580 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11581
11582         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11583         for THREADPTR register.
11584         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11585         register.
11586         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11587         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11588         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11589
11590 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11591
11592         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11593         registers above gdbarch_num_regs (gdbarch) as privileged in
11594         call0 ABI.
11595
11596 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11597
11598         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11599         for a single specified register or for all registers in
11600         a0_base..a0_base + C0_NREGS range.
11601         (supply_gregset_reg): Call regcache_raw_supply for a single
11602         specified register or for all registers in a0_base..a0_base +
11603         C0_NREGS range.
11604
11605 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11606
11607         * arch/xtensa.h (C0_NREGS): Add definition.
11608         * xtensa-tdep.c (C0_NREGS): Remove definition.
11609
11610 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11611
11612         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11613         Drop xtensa_default_isa initialization.
11614         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11615
11616 2017-03-27  Pedro Alves  <palves@redhat.com>
11617
11618         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11619         (file_entry::include_dir): New method.
11620         (line_header::include_dir_at, line_header::file_name_at): New
11621         methods.
11622         (setup_type_unit_groups, setup_type_unit_groups)
11623         (psymtab_include_file_name): Simplify using the new methods.
11624         (lnp_state_machine) <the_line_header>: New field.
11625         <file>: Add comment.
11626         (lnp_state_machine::current_file): New method.
11627         (dwarf_record_line): Simplify using the new methods.
11628         (init_lnp_state_machine): Initialize the "the_line_header" field.
11629         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11630         Simplify using the new methods.
11631
11632 2017-03-27  Pedro Alves  <palves@redhat.com>
11633
11634         * cp-name-parser.y (make_empty): Delete.
11635         (demangler_special, nested_name, ptr_operator, array_indicator)
11636         (direct_declarator, declarator_1): Use fill_comp instead of
11637         make_empty.
11638
11639 2017-03-27  Pedro Alves  <palves@redhat.com>
11640
11641         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11642         to ATTRIBUTE_PRINTF.
11643         * solib-target.c (library_list_start_list): Print "string" not
11644         "version".
11645         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11646         gdb_xml_error call.
11647
11648 2017-03-27  Pedro Alves  <palves@redhat.com>
11649
11650         * dwarf2read.c (struct file_and_directory): New.
11651         (dwarf2_get_dwz_file): Adjust to use std::string.
11652         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11653         (find_file_and_directory): Adjust to return a file_and_directory
11654         object.
11655         (read_file_scope): Adjust to use file_and_directory.  Remove
11656         make_cleanup/do_cleanups calls.
11657         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11658         make_cleanup/do_cleanups calls.
11659         * python/python.c (do_start_initialization): Adjust to ldirname
11660         returning a std::string.
11661         * utils.c (ldirname): Now returns a std::string.
11662         * utils.h (ldirname): Change return type to std::string.
11663         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11664         returning a std::string.
11665         * xml-tdesc.c (file_read_description_xml): Likewise.
11666
11667 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11668
11669         * regcache.c (regcache_debug_print_register): New function.
11670         * regcache.h (regcache_debug_print_register): New declaration.
11671         * target.c (debug_print_register): Remove.
11672         (target_fetch_registers): Call regcache_debug_print_register.
11673         (target_store_registers): Likewise.
11674
11675 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11676
11677         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11678         reference beyond the 'lh->include_dirs' array before accessing to
11679         it.
11680         (psymtab_include_file_name): Likewise.
11681         (dwarf_decode_lines_1): Likewise.
11682         (dwarf_decode_lines): Likewise.
11683         (file_file_name): Likewise.
11684
11685 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11686
11687         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11688         inferior_ptid.
11689         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11690         ps_lsetfpregs): Likewise.
11691         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11692         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11693         ps_lsetfpregs): Likewise.
11694         * target.c (target_fetch_registers, target_store_registers):
11695         Remove asserts.
11696
11697 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11698
11699         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11700
11701 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11702
11703         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11704         (_initialize_aarch64_tdep): Register it.
11705         (aarch64_record_load_store): Handle PRFM instruction.
11706         (aarch64_process_record_test): New function.
11707
11708 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11709
11710         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11711         indentation.
11712
11713 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11714
11715         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11716
11717 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11718
11719         python/python.c (do_start_initialization): Fix memory leak.
11720
11721 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11722
11723         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11724         using get_ptrace_pid.
11725         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11726         inferior_ptid.
11727         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11728         inferior_ptid instead of pid.
11729
11730 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11731
11732         * aarch64-tdep.c: Wrap locally used classes in anonymous
11733         namespace.
11734         * arm-tdep.c: Likewise.
11735         * linespec.c: Likewise.
11736         * ui-out.c: Likewise.
11737
11738 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11739
11740         PR gdb/19637
11741         * python/lib/gdb/printer/bound_registers.py: Import sys.
11742
11743 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11744
11745         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11746         windows_thread_info parameter and use it instead of
11747         current_thread.
11748         (windows_fetch_inferior_registers): Don't set current_thread,
11749         pass the thread to do_windows_fetch_inferior_registers.  Use
11750         ptid from regcache instead of inferior_ptid.
11751         (do_windows_store_inferior_registers): Add windows_thread_info
11752         parameter and use it instead of current_thread.
11753         (windows_store_inferior_registers): Don't set current_thread,
11754         pass the thread to do_windows_store_inferior_registers.  Use
11755         ptid from regcache instead of inferior_ptid.
11756
11757 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11758
11759         * ser-mingw.c (ser_windows_raw): Remove reference to
11760         struct serial::current_timeout.
11761
11762 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11763
11764         PR tdep/20928
11765         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11766         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11767         (sparc64_fsr_type): Fix %fsr decoding.
11768
11769 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11770
11771         * python/py-record-btrace.c (btpy_insn_data): Change return type
11772         for Python 2.
11773
11774 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11775
11776         * spu-linux-nat.c (spu_fetch_inferior_registers,
11777         spu_store_inferior_registers): Use ptid from regcache, set and
11778         restore inferior_ptid.
11779         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11780         Likewise.
11781
11782 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11783
11784         * i386-linux-nat.c (fetch_register, store_register,
11785         i386_linux_fetch_inferior_registers,
11786         i386_linux_store_inferior_registers): Use ptid from regcache.
11787         * ia64-linux-nat.c (ia64_linux_fetch_register,
11788         ia64_linux_store_register): Likewise.
11789         * inf-ptrace.c (inf_ptrace_fetch_register,
11790         inf_ptrace_store_register): Likewise.
11791         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11792         m32r_linux_store_inferior_registers): Likewise.
11793         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11794         m68kbsd_store_inferior_registers): Likewise.
11795         * m68k-linux-nat.c (fetch_register, store_register,
11796         m68k_linux_fetch_inferior_registers,
11797         m68k_linux_store_inferior_registers): Likewise.
11798         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11799         m88kbsd_store_inferior_registers): Likewise.
11800         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11801         mips_fbsd_store_inferior_registers): Likewise.
11802         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11803         mips64_linux_regsets_store_registers): Likewise.
11804         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11805         mipsnbsd_store_inferior_registers): Likewise.
11806         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11807         mips64obsd_store_inferior_registers): Likewise.
11808         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11809         Likewise.
11810         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11811         ppcfbsd_store_inferior_registers): Likewise.
11812         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11813         ppc_linux_store_inferior_registers): Likewise.
11814         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11815         ppcnbsd_store_inferior_registers): Likewise.
11816         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11817         ppcobsd_store_registers): Likewise.
11818         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11819         Likewise.
11820         * ravenscar-thread.c (ravenscar_fetch_registers,
11821         ravenscar_store_registers, ravenscar_prepare_to_store):
11822         Likewise.
11823         * record-btrace.c (record_btrace_fetch_registers,
11824         record_btrace_store_registers, record_btrace_prepare_to_store):
11825         Likewise.
11826         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11827         Lookup inferior using ptid from regcache, instead of
11828         current_inferior.
11829         * remote.c (remote_fetch_registers, remote_store_registers): Use
11830         ptid from regcache.
11831         * rs6000-nat.c (fetch_register, store_register): Likewise.
11832         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11833         s390_linux_store_inferior_registers): Likewise.
11834         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11835         shnbsd_store_inferior_registers): Likewise.
11836         * sol-thread.c (sol_thread_fetch_registers,
11837         sol_thread_store_registers): Likewise.
11838         * sparc-nat.c (sparc_fetch_inferior_registers,
11839         sparc_store_inferior_registers): Likewise.
11840         * tilegx-linux-nat.c (fetch_inferior_registers,
11841         store_inferior_registers): Likewise.
11842         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11843         vaxbsd_store_inferior_registers): Likewise.
11844         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11845         store_xtregs): Likewise.
11846
11847 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11848
11849         PR gdb/14441
11850         * NEWS: Mention support for rvalue references in GDB and python.
11851         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11852         supports both lvalue and rvalue references.
11853
11854 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11855
11856         PR gdb/14441
11857         * gdbtypes.c (rank_one_type): Implement overloading
11858         resolution rules regarding rvalue references.
11859
11860 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11861
11862         PR gdb/14441
11863         * aarch64-tdep.c (aarch64_type_align)
11864         (aarch64_extract_return_value, aarch64_store_return_value): Change
11865         lvalue reference type checks to general reference type checks.
11866         * amd64-tdep.c (amd64_classify): Likewise.
11867         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11868         Likewise.
11869         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11870         (arm_store_return_value): Likewise.
11871         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11872         * c-typeprint.c (c_print_type): Likewise.
11873         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11874         (cplus_number_of_children, cplus_describe_child): Likewise.
11875         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11876         * completer.c (expression_completer): Likewise.
11877         * cp-support.c (make_symbol_overload_list_adl_namespace):
11878         Likewise.
11879         * darwin-nat-info.c (info_mach_region_command): Likewise.
11880         * dwarf2loc.c (entry_data_value_coerce_ref)
11881         (value_of_dwarf_reg_entry): Likewise.
11882         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11883         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11884         Likewise.
11885         * findvar.c (extract_typed_address, store_typed_address):
11886         Likewise.
11887         * gdbtypes.c (rank_one_type): Likewise.
11888         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11889         * infcall.c (value_arg_coerce): Likewise.
11890         * language.c (pointer_type): Likewise.
11891         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11892         Likewise.
11893         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11894         * mn10300-tdep.c (mn10300_type_align): Likewise.
11895         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11896         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11897         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11898         Likewise.
11899         * printcmd.c (print_formatted, x_command): Likewise.
11900         * python/py-type.c (typy_get_composite, typy_template_argument):
11901         Likewise.
11902         * python/py-value.c (valpy_referenced_value)
11903         (valpy_get_dynamic_type, value_has_field): Likewise.
11904         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11905         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11906         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11907         * spu-tdep.c (spu_scalar_value_p): Likewise.
11908         * symtab.c (lookup_symbol_aux): Likewise.
11909         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11910         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11911         Likewise.
11912         * valops.c (value_cast_pointers, value_cast)
11913         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11914         (value_struct_elt, value_struct_elt_bitpos)
11915         (value_find_oload_method_list, find_overload_match)
11916         (value_rtti_indirect_type): Likewise.
11917         * valprint.c (val_print_scalar_type_p, generic_val_print):
11918         Likewise.
11919         * value.c (value_actual_type, value_as_address, unpack_long)
11920         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11921         (coerce_ref): Likewise.
11922         * varobj.c (varobj_get_value_type): Likewise.
11923
11924 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11925
11926         PR gdb/14441
11927         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11928         table of constants.
11929         * python/lib/gdb/command/explore.py: Support exploring values
11930         of rvalue reference types.
11931         * python/lib/gdb/types.py: Implement get_basic_type() for
11932         rvalue reference types.
11933         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11934         constant.
11935         * python/py-value.c (valpy_getitem): Add an rvalue reference
11936         check.
11937         (valpy_reference_value): Add new parameter "refcode".
11938         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11939         New wrappers for valpy_reference_value().
11940         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11941         (gdbpy_invoke_xmethod): Likewise.
11942
11943 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11944
11945         PR gdb/14441
11946         * dwarf2read.c (process_die, read_type_die_1): Handle the
11947         DW_TAG_rvalue_reference_type DIE.
11948         (read_tag_reference_type): Add new parameter "refcode".
11949
11950 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11951
11952         PR gdb/14441
11953         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11954         (c_type_print_modifier, c_type_print_varspec_suffix)
11955         (c_type_print_base): Support printing rvalue reference types.
11956         * c-valprint.c (c_val_print, c_value_print): Support printing
11957         rvalue reference values.
11958
11959 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11960
11961         PR gdb/14441
11962         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11963         typename.
11964         * cp-support.c (replace_typedefs): Handle
11965         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11966         * python/py-type.c (typy_lookup_type): Likewise.
11967
11968 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11969
11970         PR gdb/14441
11971         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11972         * parse.c (insert_type): Change assert statement.
11973         (follow_types): Handle rvalue reference types.
11974         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11975         constant.
11976
11977 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11978
11979         PR gdb/14441
11980         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11981         value_ref() interface.
11982         * c-valprint.c (c_value_print): Likewise.
11983         * infcall.c (value_arg_coerce): Likewise.
11984         * python/py-value.c (valpy_reference_value): Likewise.
11985         * valops.c (value_cast, value_reinterpret_cast)
11986         (value_dynamic_cast, typecmp): Likewise.
11987         (value_ref): Parameterize by kind of return value reference type.
11988         * value.h (value_ref): Add new parameter "refcode".
11989
11990 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11991
11992         PR gdb/14441
11993         * dwarf2read.c (read_tag_reference_type): Use
11994         lookup_lvalue_reference_type() instead of lookup_reference_type().
11995         * eval.c (evaluate_subexp_standard): Likewise.
11996         * f-exp.y: Likewise.
11997         * gdbtypes.c (make_reference_type, lookup_reference_type):
11998         Generalize with rvalue reference types.
11999         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12000         convenience wrappers for lookup_reference_type().
12001         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12002         reference kind parameter.
12003         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12004         wrappers for lookup_reference_type().
12005         * guile/scm-type.c (gdbscm_type_reference): Use
12006         lookup_lvalue_reference_type() instead of lookup_reference_type().
12007         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12008         * parse.c (follow_types): Likewise.
12009         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12010         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12011         Likewise.
12012         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12013         (gdbpy_invoke_xmethod): Likewise.
12014         * stabsread.c: Provide extra argument to make_reference_type()
12015         call.
12016         * valops.c (value_ref, value_rtti_indirect_type): Use
12017         lookup_lvalue_reference_type() instead of lookup_reference_type().
12018
12019 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12020
12021         PR gdb/14441
12022         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12023         (TYPE_IS_REFERENCE): New macro.
12024         (struct type): Add rvalue_reference_type field.
12025         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12026
12027 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12028
12029         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12030         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12031         New function definition.
12032         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12033         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12034         New function declaration.
12035         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12036         * mi/mi-interp.h: New file.
12037         * solib.c (info_sharedlibrary_command): Replace for loop with
12038         ALL_SO_LIBS macro
12039         * solib.h (update_solib_list): New function declaration.
12040         (so_list_head): Move macro.
12041         * solist.h (ALL_SO_LIBS): New macro.
12042
12043 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12044
12045         * infcmd.c (post_create_inferior): Remove unused argument in
12046         call to solib_add.
12047         * remote.c (remote_start_remote): Likewise.
12048         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12049         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12050         (enable_break): Likewise.
12051         * solib.c (update_solib_list): Remove unused target argument
12052         and its documentation.
12053         (solib_add): Remove unused target argument.  Remove unused
12054         argument in call to update_solib_list.
12055         (info_sharedlibrary_command): Remove unused argument in call
12056         to update_solib_list.
12057         (sharedlibrary_command): Remove unused argument in call to
12058         solib_add.
12059         (handle_solib_event): Likewise.
12060         (reload_shared_libraries): Likewise.
12061         * solib.h (solib_add): Remove unused target argument.
12062
12063 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12064
12065         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12066         (s390_displaced_step_fixup): Cover relative branches with the
12067         default fixup handling.  This fixes lack of support for some
12068         relative branch instructions.
12069
12070 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12071
12072         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12073         ptid from regcache.
12074
12075 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12076
12077         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12078         i386_darwin_store_inferior_registers): Use ptid from regcache.
12079
12080 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12081
12082         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12083         i386bsd_store_inferior_registers): Use ptid from regcache.
12084
12085 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12086
12087         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12088         hppaobsd_store_registers): Use ptid from regcache.
12089
12090 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12091
12092         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12093         hppanbsd_store_registers): Use ptid from regcache.
12094
12095 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12096
12097         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12098         from regcache.  Use get_ptrace_pid.
12099
12100 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12101
12102         * corelow.c (get_core_register_section): Use ptid from regcache,
12103         update doc.
12104
12105 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12106
12107         * bsd-uthread.c (bsd_uthread_fetch_registers,
12108         bsd_uthread_store_registers): Use ptid from regcache, set and
12109         restore inferior_ptid.
12110
12111 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12112
12113         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12114         fetch_fp_regs, store_register, store_regs, store_fp_register,
12115         store_fp_regs): Use ptid from regcache.
12116
12117 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12118
12119         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12120         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12121         store_vfp_regs): Use ptid from regcache.
12122
12123 2017-03-17  Pedro Alves  <palves@redhat.com>
12124
12125         PR remote/21188
12126         * ser-base.c (ser_base_wait_for): Add comment.
12127         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12128         version.
12129         * ser-unix.c (hardwire_raw): Remove reference to
12130         scb->current_timeout.
12131         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12132         (hardwire_ops): Install ser_base_readchar instead of
12133         hardwire_readchar.
12134         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12135         Remove fields.
12136
12137 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12138
12139         PR gdb/19637
12140         * python/lib/gdb/printer/bound_registers.py: Add support for
12141         Python 3.
12142
12143 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12144
12145         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12146         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12147         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12148         byte_offset to subobj_byte_offset.  Fix the handling of
12149         DWARF_VALUE_STACK on big-endian targets when coming via an
12150         implicit pointer.
12151         (dwarf2_evaluate_loc_desc): Adjust call to
12152         dwarf2_evaluate_loc_desc_full.
12153         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12154         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12155
12156 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12157
12158         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12159         and REVSH instructions.
12160
12161 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12162
12163         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12164         (arm_record_test): Declare.
12165         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12166         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12167         align with the manual.
12168         (thumb_record_misc): Adjust the code order to align with the
12169         manual.
12170         (thumb2_record_decode_insn_handler): Fix instruction matching.
12171         (instruction_reader_thumb): New class.
12172         (arm_record_test): New function.
12173
12174 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12175
12176         * arm-tdep.c (abstract_memory_reader): New class.
12177         (instruction_reader): New class.
12178         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12179         (decode_insn): Likewise.
12180
12181 2017-03-16  Doug Evans  <dje@google.com>
12182
12183         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12184         member.  Change type of TYPE member to SCM.  All uses updated.
12185         (lsscm_make_lazy_string_smob): Add assert.
12186         (lsscm_make_lazy_string): Flag bad length values.
12187         (lsscm_elt_type): New function.
12188         (gdbscm_lazy_string_to_value): Rewrite to use
12189         lsscm_safe_lazy_string_to_value.
12190         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12191         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12192         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12193         in incoming type.
12194         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12195         * guile/scm-type.c (tyscm_scm_to_type): New function.
12196
12197 2017-03-15  Doug Evans  <dje@google.com>
12198
12199         PR python/17728, python/18439, python/18779
12200         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12201         member.  Change type of TYPE member to PyObject *.  All uses updated.
12202         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12203         (gdbpy_create_lazy_string_object): Flag bad length values.
12204         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12205         Handle typedefs in incoming type.
12206         (stpy_lazy_string_elt_type): New function.
12207         (gdbpy_extract_lazy_string): Call it.
12208         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12209         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12210         typedefs in incoming type.
12211
12212 2017-03-16  Doug Evans  <dje@google.com>
12213
12214         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12215         * guile/scm-type.c (tyscm_scm_to_type): New function.
12216
12217 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12218
12219         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12220         "ULONGEST" for "skip".
12221
12222 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12223
12224         PR gdb/21220
12225         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12226         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12227         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12228         over ptrace peek/poke until end of buffer or error.
12229
12230 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12231
12232         * parse.c (length_of_subexp): Make static.
12233         * parser-defs.h (length_of_subexp): Remove.
12234
12235 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12236
12237         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12238         as well.
12239
12240 2017-03-14  Pedro Alves  <palves@redhat.com>
12241
12242         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12243         (main): Use std::unique_ptr.  Remove calls to
12244         cp_demangled_name_parse_free.
12245
12246 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12247
12248         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12249         alphabsd_store_inferior_registers): Use regcache->ptid instead
12250         of inferior_ptid.
12251
12252 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12253
12254         * aix-thread.c (aix_thread_fetch_registers,
12255         aix_thread_store_registers): Use regcache->ptid instead of
12256         inferior_ptid.
12257
12258 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12259
12260         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12261         store_gregs_to_thread, fetch_fpregs_from_thread,
12262         store_fpregs_to_thread): Use regcache->ptid instead of
12263         inferior_ptid.
12264
12265 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12266
12267         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12268         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12269         instead of inferior_ptid.
12270
12271 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12272
12273         * target.c (target_fetch_registers, target_store_registers): Add
12274         assert.
12275
12276 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12277
12278         * regcache.h (regcache_get_ptid): New function.
12279         * regcache.c (regcache_get_ptid): New function.
12280
12281 2017-03-13  Mark Wielaard  <mark@klomp.org>
12282
12283         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12284
12285 2017-03-10  Keith Seitz  <keiths@redhat.com>
12286
12287         PR c++/8218
12288         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12289
12290 2017-03-08  Pedro Alves  <palves@redhat.com>
12291
12292         PR gdb/18360
12293         * infrun.c (start_step_over, do_target_resume, resume)
12294         (restart_threads): Assert we're not resuming a thread that is
12295         meant to be stopped.
12296         (infrun_thread_stop_requested_callback): Delete.
12297         (infrun_thread_stop_requested): If the thread is internally
12298         stopped, queue a pending stop event and clear the thread's
12299         inline-frame state.
12300         (handle_stop_requested): New function.
12301         (handle_syscall_event, handle_inferior_event_1): Use
12302         handle_stop_requested.
12303         (handle_stop_requested): New function.
12304         (handle_signal_stop): Set the thread's stop_signal here instead of
12305         at caller.
12306         (finish_step_over): Clear step over info unconditionally.
12307         (handle_signal_stop): If the user had interrupted the event
12308         thread, consider the stop a random signal.
12309         (handle_signal_stop) <signal arrived while stepping over
12310         breakpoint>: Don't restart threads here.
12311         (stop_waiting): Don't clear step-over info here.
12312
12313 2017-03-08  Pedro Alves  <palves@redhat.com>
12314
12315         PR 21206
12316         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12317         goes to argument 2, not 1.
12318
12319 2017-03-08  Pedro Alves  <palves@redhat.com>
12320
12321         PR cli/21218
12322         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12323         display_gdb_prompt.
12324         (command_line_input): Add comment.
12325
12326 2017-03-08  Pedro Alves  <palves@redhat.com>
12327
12328         PR tui/21216
12329         * tui/tui-file.c (tui_file::write): New.
12330         * tui/tui-file.h (tui_file): Override "write".
12331         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12332         factored out from ...
12333         (tui_puts): ... here.
12334         (tui_putc): Use them.
12335         (tui_write): New function.
12336         * tui/tui-io.h (tui_write): Declare.
12337
12338 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12339
12340         * Makefile.in (SFILES): Replace "environ.c" with
12341         "common/environ.c".
12342         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12343         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12344         to...
12345         * common/environ.c: ... here.
12346         * environ.h: Moved to...
12347         * common/environ.h: ... here.
12348
12349 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12350
12351         * gdbarch.sh (pstring_ptr): New static function.
12352         (gdbarch_disassembler_options): Use it.
12353         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12354         not valid_disassembler_option->name.
12355         * gdbarch.c: Regenerate.
12356
12357 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12358
12359         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12360
12361 2017-03-07  Pedro Alves  <palves@redhat.com>
12362
12363         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12364
12365 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12366
12367         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12368         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12369         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12370         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12371
12372 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12373
12374         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12375
12376 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12377
12378         * remote.c (remote_add_target_side_commands): Use range-based
12379         for loop.
12380
12381 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12382
12383         PR gdb/21165
12384         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12385         value is lazy.
12386         * valprint.c (common_val_print): Likewise.
12387
12388 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12389
12390         * NEWS: Mention new set/show disassembler-options commands.
12391         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12392         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12393         (prospective_options): New static variable.
12394         (gdb_disassembler::gdb_disassembler): Initialize
12395         m_di.disassembler_options.
12396         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12397         (get_disassembler_options): New function.
12398         (set_disassembler_options): Likewise.
12399         (set_disassembler_options_sfunc): Likewise.
12400         (show_disassembler_options_sfunc): Likewise.
12401         (disassembler_options_completer): Likewise.
12402         (_initialize_disasm): Likewise.
12403         * disasm.h (get_disassembler_options): New prototype.
12404         (set_disassembler_options): Likewise.
12405         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12406         (gdbarch_verify_disassembler_options): Likewise.
12407         * gdbarch.c: Regenerate.
12408         * gdbarch.h: Likewise.
12409         * arm-tdep.c (num_disassembly_options): Delete.
12410         (set_disassembly_style): Likewise.
12411         (arm_disassembler_options): New static variable.
12412         (set_disassembly_style_sfunc): Convert short style name into long
12413         option name.  Call set_disassembler_options.
12414         (show_disassembly_style_sfunc): New function.
12415         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12416         set_gdbarch_verify_disassembler_options.
12417         (_initialize_arm_tdep): Delete regnames variable and update callers.
12418         (arm_disassembler_options): Initialize.
12419         (disasm_options): New variable.
12420         (num_disassembly_options): Rename from this...
12421         (num_disassembly_styles): ...to this.  Compute by scanning through
12422         disasm_options.
12423         (valid_disassembly_styles): Initialize using disasm_options.
12424         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12425         set_arm_regname_option.
12426         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12427         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12428         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12429         set_gdbarch_verify_disassembler_options.
12430         * s390-tdep.c (s390_disassembler_options): New static variable.
12431         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12432         set_gdbarch_verify_disassembler_options.
12433
12434 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12435
12436         * remote.c (remote_add_target_side_condition): Remove "struct"
12437         keyword from range-based for loop.
12438
12439 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12440
12441         * remote.c (remote_add_target_side_condition): Use range-based
12442         for loop.  Update comment.
12443
12444 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12445
12446         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12447
12448 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12449
12450         * regcache.c (regcache_raw_update): New function.
12451         (regcache_raw_read): Move code to regcache_raw_update.
12452         * regcache.h (regcache_raw_update): New declaration.
12453         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12454
12455 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12456
12457         * dwarf2read.c (create_debug_type_hash_table): Initialize
12458         header.signature and header.type_offset_in_tu.
12459
12460 2017-02-24  Pedro Alves  <palves@redhat.com>
12461
12462         * symtab.c (make_file_symbol_completion_list_1): Use
12463         add_symtab_completions.
12464
12465 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12466
12467         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12468
12469 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12470
12471         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12472         I386_MAX_REGISTER_SIZE.
12473         (i386_pseudo_register_write): Likewise.
12474         (i386_process_record): Likewise.
12475         * i387-tdep.c (i387_supply_xsave): Likewise.
12476         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12477         (store_register): Likewise.
12478
12479 2017-02-23  Pedro Alves  <palves@redhat.com>
12480
12481         * ada-lang.c: Include "common/function-view.h".
12482         (ada_iterate_over_symbols): Adjust to use function_view as
12483         callback type.
12484         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12485         (ada_make_symbol_completion_list): Use a lambda.
12486         (ada_exc_search_name_matches): Delete.
12487         (name_matches_regex): New.
12488         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12489         * compile/compile-c-support.c: Include "common/function-view.h".
12490         (print_one_macro): Change prototype to accept a ui_file pointer.
12491         (write_macro_definitions): Use a lambda.
12492         * dwarf2read.c: Include "common/function-view.h".
12493         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12494         (dw2_expand_symtabs_matching): Adjust to use function_view as
12495         callback type.
12496         * language.h: Include "common/function-view.h".
12497         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12498         function_view as callback type.
12499         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12500         * linespec.c: Include "common/function-view.h".
12501         (collect_info::add_symbol): New method.
12502         (struct symbol_and_data_callback, iterate_inline_only, struct
12503         symbol_matcher_data, iterate_name_matcher): Delete.
12504         (iterate_over_all_matching_symtabs): Adjust to use function_view
12505         as callback type and lambdas.
12506         (iterate_over_file_blocks): Adjust to use function_view as
12507         callback type.
12508         (decode_compound_collector): Now a class with private fields.
12509         (decode_compound_collector::release_symbols): New method.
12510         (collect_one_symbol): Rename to...
12511         (decode_compound_collector::operator()): ... this and adjust.
12512         (lookup_prefix_sym): decode_compound_collector construction bits
12513         move to decode_compound_collector ctor.  Pass the
12514         decode_compound_collector object directly as callback.  Remove
12515         cleanups and use decode_compound_collector::release_symbols
12516         instead.
12517         (symtab_collector): Now a class with private fields.
12518         (symtab_collector::release_symtabs): New method.
12519         (add_symtabs_to_list): Rename to...
12520         (symtab_collector::operator()): ... this and adjust.
12521         (collect_symtabs_from_filename): symtab_collector construction
12522         bits move to symtab_collector ctor.  Pass the symtab_collector
12523         object directly as callback.  Remove cleanups and use
12524         symtab_collector::release_symtabs instead.
12525         (collect_symbols): Delete.
12526         (add_matching_symbols_to_info): Use lambdas.
12527         * macrocmd.c (print_macro_callback): Delete.
12528         (info_macro_command): Use a lambda.
12529         (info_macros_command): Pass print_macro_definition as callable
12530         directly.
12531         (print_one_macro): Remove 'ignore' parameter.
12532         (macro_list_command): Adjust.
12533         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12534         (macro_for_each_data::user_data): Delete field.
12535         (foreach_macro): Adjust to call the function_view.
12536         (macro_for_each): Adjust to use function_view as callback type.
12537         (foreach_macro_in_scope): Adjust to call the function_view.
12538         (macro_for_each_in_scope): Adjust to use function_view as callback
12539         type.
12540         * macrotab.h: Include "common/function-view.h".
12541         (macro_callback_fn): Declare a prototype instead of a pointer.
12542         Remove "user_data" parameter.
12543         (macro_for_each, macro_for_each_in_scope): Adjust to use
12544         function_view as callback type.
12545         * psymtab.c (partial_map_expand_apply)
12546         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12547         Adjust to use function_view as callback type and to return bool.
12548         (psym_expand_symtabs_matching): Adjust to use function_view as
12549         callback types.
12550         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12551         to use function_view as callback type and to return bool.
12552         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12553         callback types.
12554         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12555         as callback types.
12556         * symfile.h: Include "common/function-view.h".
12557         (expand_symtabs_file_matcher_ftype)
12558         (expand_symtabs_symbol_matcher_ftype)
12559         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12560         return bool.
12561         (quick_symbol_functions::map_symtabs_matching_filename)
12562         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12563         function_view as callback type and return bool.
12564         (expand_symtabs_matching): Adjust to use function_view as callback
12565         type.
12566         (maintenance_expand_name_matcher)
12567         (maintenance_expand_file_matcher): Delete.
12568         (maintenance_expand_symtabs): Use lambdas.
12569         * symtab.c (iterate_over_some_symtabs): Adjust to use
12570         function_view as callback types and return bool.
12571         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12572         of a cleanup.
12573         (lookup_symtab_callback): Delete.
12574         (lookup_symtab): Use a lambda.
12575         (iterate_over_symbols): Adjust to use function_view as callback
12576         type.
12577         (struct search_symbols_data, search_symbols_file_matches)
12578         (search_symbols_name_matches): Delete.
12579         (search_symbols): Use a pair of lambdas.
12580         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12581         (symtab_expansion_callback): Delete.
12582         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12583         * symtab.h: Include "common/function-view.h".
12584         (iterate_over_some_symtabs): Adjust to use function_view as
12585         callback type and return bool.
12586         (iterate_over_symtabs): Adjust to use function_view as callback
12587         type.
12588         (symbol_found_callback_ftype): Remove 'data' parameter and return
12589         bool.
12590         (iterate_over_symbols): Adjust to use function_view as callback
12591         type.
12592
12593 2017-02-23  Pedro Alves  <palves@redhat.com>
12594
12595         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12596         (%.o) <unittests/%.c>: New pattern.
12597         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12598         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12599         * common/function-view.h: New file.
12600         * unittests/function-view-selftests.c: New file.
12601         * configure: Regenerate.
12602
12603 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12604
12605         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12606         inferior_ptid.
12607         * go32-nat.c (go32_thread_alive): Likewise.
12608
12609 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12610
12611         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12612         delete.
12613
12614 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12615
12616         * varobj.c (varobj_clear_saved_item): Use delete instead of
12617         xfree.
12618         (update_dynamic_varobj_children): Likewise.
12619
12620 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12621
12622         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12623
12624 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12625
12626         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12627         m_enum_value to 0 in default constructor.
12628
12629 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12630
12631         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12632         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12633         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12634         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12635         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12636         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12637         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12638         IS_STORE_CONDITIONAL_INSN.
12639
12640 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12641
12642         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12643
12644 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12645
12646         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12647
12648 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12649
12650         * dwarf2read.c (skip_one_die, read_attribute_value)
12651         (dwarf2_const_value_attr, dump_die_shallow)
12652         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12653         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12654
12655 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12656
12657         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12658         (dwarf_parse_macro_header): Accept DWARF version 5.
12659         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12660
12661 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12662
12663         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12664         DW_AT_GNU_*.
12665         * common/common-exceptions.h (enum errors): Likewise.
12666         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12667         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12668         (dwarf_expr_context::execute_stack_op): Likewise.
12669         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12670         Likewise.
12671         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12672         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12673         (show_entry_values_debug, call_site_to_target_addr)
12674         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12675         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12676         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12677         (value_of_dwarf_block_entry, indirect_pieced_value)
12678         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12679         (disassemble_dwarf_expression): Likewise.
12680         * dwarf2read.c (process_die, inherit_abstract_dies)
12681         (read_call_site_scope): Likewise.
12682         * gdbtypes.h (struct func_type, struct call_site_parameter)
12683         (struct call_site): Likewise.
12684         * stack.c (read_frame_arg): Likewise.
12685         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12686
12687 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12688
12689         * defs.h (read_unsigned_leb128): New declaration.
12690         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12691         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12692         (dwarf2_find_location_expression): Call also
12693         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12694         * dwarf2loc.h (dwarf2_version): New declaration.
12695         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12696         rnglists.
12697         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12698         .debug_rnglists.
12699         (struct dwop_section_names): Add loclists_dwo.
12700         (dwop_section_names): Add .debug_loclists.dwo.
12701         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12702         (struct dwarf2_per_cu_data): Add dwarf_version.
12703         (struct dwo_sections): Add loclists.
12704         (struct attr_abbrev): Add implicit_const.
12705         (read_indirect_line_string): New declaration.
12706         (read_unsigned_leb128): Delete declaration.
12707         (rcuh_kind): New definition.
12708         (read_and_check_comp_unit_head): Change parameter
12709         is_debug_types_section to section_kind.
12710         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12711         (read_comp_unit_head): Change parameter abfd to section, add parameter
12712         section_kind.  Handle DWARF-5.
12713         (error_check_comp_unit_head): Accept also DWARF version 5.
12714         (read_and_check_comp_unit_head): Change parameter
12715         is_debug_types_section to section_kind.
12716         (read_and_check_type_unit_head): Delete function.
12717         (read_abbrev_offset): Handle DWARF-5.
12718         (create_debug_type_hash_table): Add parameter section_kind.  Process
12719         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12720         comp_unit_head.
12721         (create_debug_types_hash_table): Update create_debug_type_hash_table
12722         caller.
12723         (create_all_type_units): Call create_debug_type_hash_table.
12724         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12725         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12726         caller.
12727         (skip_one_die): Handle DW_FORM_implicit_const.
12728         (dwarf2_rnglists_process): New function.
12729         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12730         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12731         (read_attribute_value): Handle DW_FORM_implicit_const,
12732         DW_FORM_line_strp.
12733         (read_attribute): Handle DW_FORM_implicit_const.
12734         (read_indirect_string_at_offset_from): New function from
12735         read_indirect_string_at_offset.
12736         (read_indirect_string_at_offset): Call
12737         read_indirect_string_at_offset_from.
12738         (read_indirect_line_string_at_offset): New function.
12739         (read_indirect_string): New function comment.
12740         (read_indirect_line_string): New function.
12741         (read_unsigned_leb128): Make it global.
12742         (dwarf2_string_attr): Handle DWARF-5.
12743         (add_include_dir_stub, read_formatted_entries): New functions.
12744         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12745         Handle DWARF-5.
12746         (per_cu_header_read_in): Update read_comp_unit_head caller.
12747         (dwarf2_version): New function.
12748         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12749         rnglists.
12750         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12751         fields.
12752
12753 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12754
12755         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12756
12757 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12758
12759         * dwarf2read.c (dwarf2_ranges_process): New function from
12760         dwarf2_ranges_read.
12761         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12762         dwarf2_ranges_process.
12763
12764 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12765
12766         * dwarf2read.c (create_debug_type_hash_table): New function from
12767         create_debug_types_hash_table.
12768         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12769         (create_all_type_units, open_and_init_dwo_file): Update
12770         create_debug_types_hash_table callers.
12771
12772 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12773
12774         PR gdb/16188
12775         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12776         refer to 'ap', not 'args'.
12777
12778 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12779             Pedro Alves  <palves@redhat.com>
12780
12781         PR gdb/16188
12782         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12783         calls succeeded.
12784         * fork-child.c (trace_start_error): New function.
12785         (trace_start_error_with_name): Likewise.
12786         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12787         * inf-ptrace.c (inf_ptrace_me): Likewise.
12788         * inferior.h (trace_start_error): New prototype.
12789         (trace_start_error_with_name): Likewise.
12790
12791 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12792
12793         PR gdb/21164
12794         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12795         NULL before using it.
12796         * symmisc.c (maintenance_print_symbols): Likewise.
12797         (maintenance_print_msymbols): Likewise.
12798
12799 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12800
12801         * NEWS: Add record Python bindings entry.
12802
12803 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12804
12805         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12806         py-record-full.o.
12807         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12808         * python/py-record-btrace.c, python/py-record-btrace.h,
12809         python/py-record-full.c, python/py-record-full.h: New file.
12810         * python/py-record.c: Add include for py-record-btrace.h and
12811         py-record-full.h.
12812         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12813         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12814         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12815         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12816         New definition.
12817         (gdbpy_initialize_btrace): New export.
12818         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12819
12820 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12821
12822         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12823         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12824         * python/py-record.c: New file.
12825         * python/python-internal.h (gdbpy_start_recording,
12826         gdbpy_current_recording, gdpy_stop_recording,
12827         gdbpy_initialize_record): New export.
12828         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12829         (python_GdbMethods): Add gdbpy_start_recording,
12830         gdbpy_current_recording and gdbpy_stop_recording.
12831
12832 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12833
12834         * record-btrace.c (record_btrace_record_method): New function.
12835         (init_record_btrace_ops): Initialize to_record_method.
12836         * record-full.c (record_full_record_method): New function.
12837         (init_record_full_ops, init_record_full_core_ops): Add
12838         record_full_record_method.
12839         * record.h (enum record_method): New enum.
12840         * target-debug.h (target_debug_print_enum_record_method: New define.
12841         * target-delegates.c: Regenerate.
12842         * target.c (target_record_method): New function.
12843         * target.h: Include record.h.
12844         (struct target_ops) <to_record_method>: New field.
12845         (target_record_method): New export.
12846
12847 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12848
12849         * record.h (record_start, record_stop): New export.
12850         * record.c (record_start, record_stop): New function.
12851
12852 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12853
12854         * btrace.c (btrace_fetch): Copy function call segments pointer
12855         into a vector.
12856         (btrace_clear): Clear the vector.
12857         (btrace_find_insn_by_number): Use binary search to find the correct
12858         function call segment.
12859         * btrace.h (brace_fun_p): New typedef.
12860         (struct btrace_thread_info) <functions>: New field.
12861
12862 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12863
12864         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12865         * btrace.c (btrace_decode_error): ... here.  New function.
12866         * btrace.h (btrace_decode_error): New export.
12867
12868 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12869
12870         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12871         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12872         btrace_find_insn_by_number): Remove special case for gaps.
12873         * btrace.h (btrace_insn_get_error): New export.
12874         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12875         * record-btrace.c (btrace_insn_history): Print number for gaps.
12876         (record_btrace_info, record_btrace_goto): Handle gaps.
12877
12878 2017-02-14  Tom Tromey  <tom@tromey.com>
12879
12880         PR python/13598:
12881         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12882         event.
12883         * python/py-evts.c (gdbpy_initialize_py_events): Add
12884         before_prompt registry.
12885         * python/py-events.h (events_object) <before_prompt>: New field.
12886
12887 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12888
12889         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12890
12891 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12892
12893         * symfile (_initialize_symfile): Add usage text to the load command's
12894         help text.
12895
12896 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12897
12898         * utils.c (defaulted_query): Don't query on secondary UIs.
12899
12900 2017-02-10  Tom Tromey  <tom@tromey.com>
12901
12902         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12903
12904 2017-02-10  Tom Tromey  <tom@tromey.com>
12905
12906         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12907         "cleanup" local.
12908         * python/py-type.c (typy_legacy_template_argument): Remove
12909         unnecessary "cleanup" local.
12910
12911 2017-02-10  Tom Tromey  <tom@tromey.com>
12912
12913         * python/python.c (do_start_initialization): New function, from
12914         _initialize_python.
12915         (_initialize_python): Call do_start_initialization.
12916         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12917         goto.
12918
12919 2017-02-10  Tom Tromey  <tom@tromey.com>
12920
12921         * python/py-prettyprint.c (pretty_print_one_value): Use
12922         gdbpy_ref.
12923
12924 2017-02-10  Tom Tromey  <tom@tromey.com>
12925
12926         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12927         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12928         gdbpy_ref.
12929         * python/py-type.c (field_new): Use gdbpy_ref.
12930         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12931         gdbpy_ref.
12932         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12933         (py_free_pspace): Likewise.
12934         (pspace_to_pspace_object): Likewise.
12935         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12936         (py_free_objfile): Likewise.
12937         (objfile_to_objfile_object): Likewise.
12938         * python/py-inferior.c (delete_thread_object): Use
12939         gdbpy_ref.
12940         (infpy_read_memory): Likewise.
12941         (py_free_inferior): Likewise.
12942         * python/py-evtregistry.c (create_eventregistry_object): Use
12943         gdbpy_ref.
12944         * python/py-event.c (create_event_object): Use gdbpy_ref.
12945
12946 2017-02-10  Tom Tromey  <tom@tromey.com>
12947
12948         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12949         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12950         used.
12951         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12952         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12953         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12954         python/py-framefilter.c, python/py-function.c,
12955         python/py-inferior.c, python/py-infevents.c,
12956         python/py-linetable.c, python/py-newobjfileevent.c,
12957         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12958         python/py-signalevent.c, python/py-stopevent.c,
12959         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12960         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12961         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12962         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12963
12964 2017-02-10  Tom Tromey  <tom@tromey.com>
12965
12966         * ui-out.h (ui_out_emit_type): New class.
12967         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12968         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12969         and ui_out_emit_tuple.
12970         (enumerate_locals): Likewise.
12971         (py_mi_print_variables, py_print_locals, py_print_args): Use
12972         ui_out_emit_list.
12973         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12974         ui_out_emit_list.
12975         * common/gdb_optional.h: New file.
12976
12977 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12978
12979         * MAINTAINERS (Write After Approval): Update my e-mail address.
12980
12981 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
12982
12983         PR gdb/21122
12984         * breakpoint.c (_initialize_breakpoint): Update the help description
12985         of the 'commands' command to indicate that it takes a list argument.
12986
12987 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
12988
12989         * interps.c (current_interp_set_logging): Remove "return".
12990
12991 2017-02-09  Gary Benson  <gbenson@redhat.com>
12992
12993         * symtab.c (add_symtab_completions): Prevent NULL pointer
12994         dereference.
12995
12996 2017-02-08  Pedro Alves  <palves@redhat.com>
12997
12998         * interps.c (interp::interp): Remove reference to quiet_p.
12999         (interp_set): Make static.  Remove dead "Switching to" output
13000         code.
13001         (interp_quiet_p, interp_set_quiet): Delete.
13002         (interpreter_exec_cmd): Don't set the interpreter quiet.
13003         * interps.h (interp_quiet_p): Make static.
13004         (class interp) <quiet_p>: Remove field
13005
13006 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13007
13008         * cli/cli-decode.c (find_command_name_length): Make it extern.
13009         * cli/cli-decode.h (find_command_name_length): Declare.
13010         * cli/cli-script.c (command_name_equals, line_first_arg):
13011         New functions.
13012         (process_next_line): Use cli-decode to parse command names.
13013         (build_command_line): Make args a constant pointer.
13014
13015 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13016
13017         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13018         Remove case-insensitive search.
13019
13020 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13021
13022         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13023         at the end of the line.  Avoids an ARI warning.
13024
13025 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13026
13027         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13028         rdseed instructions.
13029         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13030
13031 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13032
13033         PR tdep/20936
13034         Provide and use sparc32 and sparc64 target description XML files.
13035         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13036         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13037         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13038         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13039         * features/sparc/sparc32-solaris.xml: New file.
13040         * features/sparc/sparc64-solaris.xml: New file.
13041         * features/sparc/sparc32-solaris.c: Generated.
13042         * features/sparc/sparc64-solaris.c: Generated.
13043         * sparc-tdep.h: Account for differences in target descriptions.
13044         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13045         (sparc32_register_type): Use target provided registers.
13046         (validate_tdesc_registers): New function.
13047         (sparc32_gdbarch_init): Use tdesc_has_registers.
13048         Set pseudoregister functions.
13049         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13050         (sparc64_register_type): Use target provided registers.
13051         (sparc64_init_abi): Set pseudoregister functions.
13052
13053 2017-02-03  Tom Tromey  <tom@tromey.com>
13054
13055         PR rust/21097:
13056         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13057         with a single member.
13058
13059 2017-02-03  Pedro Alves  <palves@redhat.com>
13060
13061         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13062         (cli_interp_base::~cli_interp_base): New.
13063         (cli_interp): New struct.
13064         (as_cli_interp): Cast the interp itself to cli_interp.
13065         (cli_interpreter_pre_command_loop): Rename to ...
13066         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13067         parameter.
13068         (cli_interpreter_init): Rename to ...
13069         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13070         boolean.  Make extern.
13071         (cli_interpreter_resume): Rename to ...
13072         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13073         extern.
13074         (cli_interpreter_suspend): Rename to ...
13075         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13076         extern.
13077         (cli_interpreter_exec): Rename to ...
13078         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13079         extern.
13080         (cli_interpreter_supports_command_editing): Rename to ...
13081         (cli_interp_base::supports_command_editing): ... this.  Remove
13082         'interp' parameter.  Make extern.
13083         (cli_ui_out): Rename to ...
13084         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13085         Make extern.
13086         (cli_set_logging): Rename to ...
13087         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13088         parameter.  Make extern.
13089         (cli_interp_procs): Delete.
13090         (cli_interp_factory): Adjust to use "new".
13091         * cli/cli-interp.h: Include "interps.h".
13092         (struct cli_interp_base): New struct.
13093         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13094         (interp_new): Delete.
13095         (interp::interp, interp::~interp): New.
13096         (interp_set): Use bool, and return void.  Assume the interpreter
13097         has suspend, init and resume methods, and that the all return
13098         void.
13099         (set_top_level_interpreter): interp_set returns void.
13100         (interp_ui_out): Adapt.
13101         (current_interp_set_logging): Adapt.
13102         (interp_data): Delete.
13103         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13104         (interp_exec): Adapt.
13105         (top_level_interpreter_data): Delete.
13106         * interps.h (interp_init_ftype, interp_resume_ftype)
13107         (interp_suspend_ftype, interp_exec_ftype)
13108         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13109         (class interp): New.
13110         (interp_new): Delete.
13111         (interp_set): Now returns void.  Use bool.
13112         (interp_data, top_level_interpreter_data): Delete.
13113         * mi/mi-common.h: Include interps.h.
13114         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13115         init, resume, suspect, exec, interp_ui_out, set_logging and
13116         pre_command_loop methods.
13117         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13118         (mi_interpreter_init): Rename to ...
13119         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13120         bool, return void and make extern.  Adjust.
13121         (mi_interpreter_resume): ... Rename to ...
13122         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13123         return void and make extern.  Adjust.
13124         (mi_interpreter_suspend): ... Rename to ...
13125         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13126         return void and make extern.  Adjust.
13127         (mi_interpreter_exec): ... Rename to ...
13128         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13129         extern.  Adjust.
13130         (mi_interpreter_pre_command_loop): ... Rename to ...
13131         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13132         parameter and make extern.
13133         (mi_on_normal_stop_1): Adjust.
13134         (mi_ui_out): Rename to ...
13135         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13136         parameter and make extern.  Adjust.
13137         (mi_set_logging): Rename to ...
13138         (mi_interp::set_logging): ... this.  Remove the 'interp'
13139         parameter and make extern.  Adjust.
13140         (mi_interp_procs): Delete.
13141         (mi_interp_factory): Adjust to use 'new'.
13142         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13143         (mi_print_exception, mi_execute_command, mi_load_progress):
13144         Adjust.
13145         * tui/tui-interp.c (tui_interp): New class.
13146         (as_tui_interp): Return a tui_interp pointer.
13147         (tui_on_normal_stop, tui_on_signal_received)
13148         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13149         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13150         to use interp::interp_ui_out.
13151         (tui_init): Rename to ...
13152         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13153         bool, return void and make extern.  Adjust.
13154         (tui_resume): Rename to ...
13155         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13156         return void and make extern.  Adjust.
13157         (tui_suspend): Rename to ...
13158         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13159         return void and make extern.  Adjust.
13160         (tui_ui_out): Rename to ...
13161         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13162         parameter, and make extern.  Adjust.
13163         (tui_exec): Rename to ...
13164         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13165         make extern.
13166         (tui_interp_procs): Delete.
13167         (tui_interp_factory): Use "new".
13168
13169 2017-02-02  Tom Tromey  <tom@tromey.com>
13170
13171         * rust-exp.y (ends_raw_string, space_then_number)
13172         (rust_identifier_start_p): Return bool.
13173         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13174         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13175         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13176         (rust_chartype_p): Return bool.
13177         (val_print_struct, rust_print_struct_def, rust_print_type):
13178         Update.
13179         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13180         Return bool.
13181
13182 2017-02-02  Tom Tromey  <tom@tromey.com>
13183
13184         * rust-lang.c: Reindent.
13185
13186 2017-02-02  Tom Tromey  <tom@tromey.com>
13187
13188         * rust-lang.h (rust_crate_for_block): Update.
13189         * rust-lang.c (rust_crate_for_block): Return std::string.
13190         (rust_get_disr_info): Use std:;string, not
13191         gdb::unique_xmalloc_ptr.
13192         * rust-exp.y (crate_name): Update.
13193
13194 2017-02-02  Pedro Alves  <palves@redhat.com>
13195
13196         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13197         field out of gdb_disassembler_test and make it static.
13198
13199 2017-02-02  Pedro Alves  <palves@redhat.com>
13200
13201         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13202         mi1_interp and mi_interp fields.
13203
13204 2017-02-02  Pedro Alves  <palves@redhat.com>
13205
13206         * cli/cli-interp.c (struct saved_output_files, saved_output):
13207         Moved from cli/cli-logging.c.
13208         (cli_set_logging): New function.
13209         (cli_interp_procs): Install cli_set_logging.
13210         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13211         Declare.
13212         * cli/cli-logging.c (struct saved_output_files, saved_output):
13213         Moved to cli/cli-interp.c.
13214         (pop_output_files): Don't save outputs here.
13215         (make_logging_output): New function.
13216         (handle_redirections): Don't build tee nor save previous outputs
13217         here.
13218         * interps.c (current_interp_set_logging): Change prototype.
13219         Assume there's always a set_logging_proc method installed.
13220         * interps.h (interp_set_logging_ftype): Change prototype.
13221         (current_interp_set_logging): Change prototype and adjust comment.
13222         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13223         use make_logging_output.
13224         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13225 2017-02-02  Pedro Alves  <palves@redhat.com>
13226
13227         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13228         from ...
13229         (set_logging_overwrite): ... here.
13230         (logging_no_redirect_file): Delete.
13231         (set_logging_redirect): Don't handle redirection on the fly.
13232         Instead warn that "logging off" / "logging on" is necessary.
13233         (pop_output_files): Delete references to logging_no_redirect_file.
13234         (show_logging_command): Always speak in terms of what will happen
13235         once logging is reenabled.
13236
13237 2017-02-02  Pedro Alves  <palves@redhat.com>
13238
13239         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13240
13241 2017-02-02  Pedro Alves  <palves@redhat.com>
13242
13243         * disasm.c (gdb_pretty_print_insn): Rename to ...
13244         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13245         Remove gdbarch parameter.  Adapt to clear the object's buffers
13246         instead of allocating new buffers, and to print using the object's
13247         gdb_disassembler instead of calling gdb_print_insn.
13248         (dump_insns): Use gdb_pretty_print_disassembler.
13249         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13250         (gdb_pretty_print_disassembler): New class.
13251         * record-btrace.c (btrace_insn_history): Use
13252         gdb_pretty_print_disassembler.
13253
13254 2017-02-02  Pedro Alves  <palves@redhat.com>
13255
13256         * ada-lang.c (type_as_string): Use string_file.
13257         * ada-valprint.c (ada_print_floating): Use string_file.
13258         * ada-varobj.c (ada_varobj_scalar_image)
13259         (ada_varobj_get_value_image): Use string_file.
13260         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13261         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13262         * breakpoint.c (update_inserted_breakpoint_locations)
13263         (insert_breakpoint_locations, reattach_breakpoints)
13264         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13265         (print_it_watchpoint): Use string_file.
13266         (save_breakpoints): Use stdio_file.
13267         * c-exp.y (oper): Use string_file.
13268         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13269         tee_file.
13270         (pop_output_files): Use delete.
13271         (handle_redirections): Use stdio_file and tee_file.
13272         * cli/cli-setshow.c (do_show_command): Use string_file.
13273         * compile/compile-c-support.c (c_compute_program): Use
13274         string_file.
13275         * compile/compile-c-symbols.c (generate_vla_size): Take a
13276         'string_file &' instead of a 'ui_file *'.
13277         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13278         of a 'ui_file *'.  Use string_file.
13279         (generate_c_for_variable_locations): Take a 'string_file &'
13280         instead of a 'ui_file *'.
13281         * compile/compile-internal.h (generate_c_for_for_one_variable):
13282         Take a 'string_file &' instead of a 'ui_file *'.
13283         * compile/compile-loc2c.c (push, pushf, unary, binary)
13284         (print_label, pushf_register_address, pushf_register)
13285         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13286         'ui_file *'.  Adjust.
13287         * compile/compile.c (compile_to_object): Use string_file.
13288         * compile/compile.h (compile_dwarf_expr_to_c)
13289         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13290         'ui_file *'.
13291         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13292         (replace_typedefs_qualified_name): Use string_file and
13293         obstack_copy0.
13294         * disasm.c (gdb_pretty_print_insn): Use string_file.
13295         (gdb_disassembly): Adjust reference the null_stream global.
13296         (do_ui_file_delete): Delete.
13297         (gdb_insn_length): Use null_stream.
13298         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13299         * dwarf2loc.c (dwarf2_compile_property_to_c)
13300         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13301         'string_file &' instead of a 'ui_file *'.
13302         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13303         * dwarf2read.c (do_ui_file_peek_last): Delete.
13304         (dwarf2_compute_name): Use string_file.
13305         * event-top.c (gdb_setup_readline): Use stdio_file.
13306         * gdbarch.sh (verify_gdbarch): Use string_file.
13307         * gdbtypes.c (safe_parse_type): Use null_stream.
13308         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13309         string_file.
13310         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13311         'string_file *' instead of a 'ui_file *'.
13312         (gdbscm_arch_disassemble): Use string_file.
13313         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13314         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13315         inherits from ui_file.
13316         (ioscm_file_port_delete, ioscm_file_port_rewind)
13317         (ioscm_file_port_put): Delete.
13318         (ioscm_file_port_write): Rename to ...
13319         (ioscm_file_port::write): ... this.  Remove file_port_magic
13320         checks.
13321         (ioscm_file_port_new): Delete.
13322         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13323         ui_file_up.
13324         * guile/scm-type.c (tyscm_type_name): Use string_file.
13325         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13326         Use string_file.
13327         * infcmd.c (print_return_value_1): Use string_file.
13328         * infrun.c (print_target_wait_results): Use string_file.
13329         * language.c (add_language): Use string_file.
13330         * location.c (explicit_to_string_internal): Use string_file.
13331         * main.c (captured_main_1): Use null_file.
13332         * maint.c (maintenance_print_architecture): Use stdio_file.
13333         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13334         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13335         event_channel>: Change type to mi_console_file pointer.
13336         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13337         (mi_console_file_delete): Delete.
13338         (struct mi_console_file): Delete.
13339         (mi_console_file_magic): Delete.
13340         (mi_console_file_new): Delete.
13341         (mi_console_file::mi_console_file): New.
13342         (mi_console_file_delete): Delete.
13343         (mi_console_file_fputs): Delete.
13344         (mi_console_file::write): New.
13345         (mi_console_raw_packet): Delete.
13346         (mi_console_file::flush): New.
13347         (mi_console_file_flush): Delete.
13348         (mi_console_set_raw): Rename to ...
13349         (mi_console_file::set_raw): ... this.
13350         * mi/mi-console.h (class mi_console_file): New class.
13351         (mi_console_file_new, mi_console_set_raw): Delete.
13352         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13353         (mi_set_logging): Use delete and tee_file.  Adjust.
13354         * mi/mi-main.c (output_register): Use string_file.
13355         (mi_cmd_data_evaluate_expression): Use string_file.
13356         (mi_cmd_data_read_memory): Use string_file.
13357         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13358         * mi/mi-out.c (mi_ui_out::main_stream): New.
13359         (mi_ui_out::rewind): Use main_stream and
13360         string_file.
13361         (mi_ui_out::put): Use main_stream and string_file.
13362         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13363         Allocate a 'string_file' instead.
13364         (mi_out_new): Don't allocate a mem_fileopen stream here.
13365         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13366         (mi_ui_out::main_stream): Declare method.
13367         * printcmd.c (eval_command): Use string_file.
13368         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13369         * python/py-arch.c (archpy_disassemble): Use string_file.
13370         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13371         * python/py-frame.c (frapy_str): Use string_file.
13372         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13373         Use string_file.
13374         * python/py-type.c (typy_str): Use string_file.
13375         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13376         * python/py-value.c (valpy_str): Use string_file.
13377         * record-btrace.c (btrace_insn_history): Use string_file.
13378         * regcache.c (regcache_print): Use stdio_file.
13379         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13380         * remote.c (escape_buffer): Use string_file.
13381         * rust-lang.c (rust_get_disr_info): Use string_file.
13382         * serial.c (serial_open_ops_1): Use stdio_file.
13383         (do_serial_close): Use delete.
13384         * stack.c (print_frame_arg): Use string_file.
13385         (print_frame_args): Remove local mem_fileopen stream, not used.
13386         (print_frame): Use string_file.
13387         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13388         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13389         Take a 'string_file *' instead of a 'ui_file *'.
13390         * top.c (new_ui): Use stdio_file and stderr_file.
13391         (free_ui): Use delete.
13392         (execute_command_to_string): Use string_file.
13393         (quit_confirm): Use string_file.
13394         * tracepoint.c (collection_list::append_exp): Use string_file.
13395         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13396         * tui/tui-file.c: Don't include "ui-file.h".
13397         (enum streamtype, struct tui_stream): Delete.
13398         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13399         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13400         (tui_file::tui_file): New method.
13401         (tui_file_fputs): Delete.
13402         (tui_file_get_strbuf): Delete.
13403         (tui_file::puts): New method.
13404         (tui_file_adjust_strbuf): Delete.
13405         (tui_file_flush): Delete.
13406         (tui_file::flush): New method.
13407         * tui/tui-file.h: Tweak intro comment.
13408         Include ui-file.h.
13409         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13410         (tui_file_adjust_strbuf): Delete declarations.
13411         (class tui_file): New class.
13412         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13413         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13414         (tui_register_format): Use string_stream.
13415         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13416         (tui_get_function_from_frame): Use string_file.
13417         * typeprint.c (type_to_string): Use string_file.
13418         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13419         (null_stream): New global.
13420         (ui_file_delete): Delete.
13421         (ui_file::ui_file): New.
13422         (null_file_isatty): Delete.
13423         (ui_file::~ui_file): New.
13424         (null_file_rewind): Delete.
13425         (ui_file::printf): New.
13426         (null_file_put): Delete.
13427         (null_file_flush): Delete.
13428         (ui_file::putstr): New.
13429         (null_file_write): Delete.
13430         (ui_file::putstrn): New.
13431         (null_file_read): Delete.
13432         (ui_file::putc): New.
13433         (null_file_fputs): Delete.
13434         (null_file_write_async_safe): Delete.
13435         (ui_file::vprintf): New.
13436         (null_file_delete): Delete.
13437         (null_file::write): New.
13438         (null_file_fseek): Delete.
13439         (null_file::puts): New.
13440         (ui_file_data): Delete.
13441         (null_file::write_async_safe): New.
13442         (gdb_flush, ui_file_isatty): Adjust.
13443         (ui_file_put, ui_file_rewind): Delete.
13444         (ui_file_write): Adjust.
13445         (ui_file_write_for_put): Delete.
13446         (ui_file_write_async_safe, ui_file_read): Adjust.
13447         (ui_file_fseek): Delete.
13448         (fputs_unfiltered): Adjust.
13449         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13450         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13451         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13452         (set_ui_file_data): Delete.
13453         (string_file::~string_file, string_file::write)
13454         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13455         (do_ui_file_as_string, ui_file_as_string): Delete.
13456         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13457         (struct mem_file): Delete.
13458         (mem_file_new): Delete.
13459         (stdio_file::stdio_file): New.
13460         (mem_file_delete): Delete.
13461         (stdio_file::stdio_file): New.
13462         (mem_fileopen): Delete.
13463         (stdio_file::~stdio_file): New.
13464         (mem_file_rewind): Delete.
13465         (stdio_file::set_stream): New.
13466         (mem_file_put): Delete.
13467         (stdio_file::open): New.
13468         (mem_file_write): Delete.
13469         (stdio_file_magic, struct stdio_file): Delete.
13470         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13471         (stdio_file::flush): New.
13472         (stdio_file_read): Rename to ...
13473         (stdio_file::read): ... this.  Adjust.
13474         (stdio_file_write): Rename to ...
13475         (stdio_file::write): ... this.  Adjust.
13476         (stdio_file_write_async_safe): Rename to ...
13477         (stdio_file::write_async_safe) ... this.  Adjust.
13478         (stdio_file_fputs): Rename to ...
13479         (stdio_file::puts) ... this.  Adjust.
13480         (stdio_file_isatty): Delete.
13481         (stdio_file_fseek): Delete.
13482         (stdio_file::isatty): New.
13483         (stderr_file_write): Rename to ...
13484         (stderr_file::write) ... this.  Adjust.
13485         (stderr_file_fputs): Rename to ...
13486         (stderr_file::puts) ... this.  Adjust.
13487         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13488         (stderr_file::stderr_file): New.
13489         (tee_file_magic): Delete.
13490         (struct tee_file): Delete.
13491         (tee_file::tee_file): New.
13492         (tee_file_new): Delete.
13493         (tee_file::~tee_file): New.
13494         (tee_file_delete): Delete.
13495         (tee_file_flush): Rename to ...
13496         (tee_file::flush): ... this.  Adjust.
13497         (tee_file_write): Rename to ...
13498         (tee_file::write): ... this.  Adjust.
13499         (tee_file::write_async_safe): New.
13500         (tee_file_fputs): Rename to ...
13501         (tee_file::puts): ... this.  Adjust.
13502         (tee_file_isatty): Rename to ...
13503         (tee_file::isatty): ... this.  Adjust.
13504         * ui-file.h (struct obstack, struct ui_file): Don't
13505         forward-declare.
13506         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13507         (ui_file_write_ftype)
13508         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13509         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13510         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13511         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13512         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13513         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13514         (set_ui_file_fseek): Delete.
13515         (ui_file_data, ui_file_delete, ui_file_rewind)
13516         (struct ui_file): New.
13517         (ui_file_up): New.
13518         (class null_file): New.
13519         (null_stream): Declare.
13520         (ui_file_write_for_put, ui_file_put): Delete.
13521         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13522         Delete.
13523         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13524         (gdb_fopen, tee_file_new): Delete.
13525         (struct string_file): New.
13526         (struct stdio_file): New.
13527         (stdio_file_up): New.
13528         (struct stderr_file): New.
13529         (class tee_file): New.
13530         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13531         of a 'ui_file *'.  Adjust.
13532         * ui-out.h (class ui_out) <field_stream>: Likewise.
13533         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13534         (null_stream): Delete.
13535         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13536         Adjust.
13537         * utils.h (struct ui_file): Delete forward declaration..
13538         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13539         (error_stream): Take a 'string_file &' instead of a
13540         'ui_file *'.
13541         * varobj.c (varobj_value_get_print_value): Use string_file.
13542         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13543         * gdbarch.c: Regenerate.
13544
13545 2017-02-02  Pedro Alves  <palves@redhat.com>
13546
13547         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13548         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13549         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13550         Adjust to call gdb_print_insn instead of
13551         gdb_disassembler::print_insn.
13552         (dump_insns, do_mixed_source_and_assembly_deprecated)
13553         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13554         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13555         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13556         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13557         declaration.
13558         (gdb_pretty_print_insn): Re-add declaration.
13559         * record-btrace.c (btrace_insn_history): Don't allocate a
13560         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13561
13562 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13563
13564         * disasm.h (gdb_disassembly): Remove file_string parameter.
13565         * disasm.c (gdb_disassembly): Likewise.
13566         * cli/cli-cmds.c (print_disassembly): Adapt.
13567         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13568         * stack.c (do_gdb_disassembly): Likewise.
13569
13570 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13571
13572         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13573         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13574         targets.  And if the implicit value is longer than needed, extract
13575         the first bytes instead of the "least significant" ones.
13576
13577 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13578
13579         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13580         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13581         (btrace_fetch): Assert can_access_registers_ptid.
13582         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13583         validate_registers_access.
13584
13585 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13586
13587         * gdbthread.h (can_access_registers_ptid): New.
13588         * thread.c (can_access_registers_ptid): New.
13589
13590 2017-02-01  Pedro Alves  <palves@redhat.com>
13591
13592         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13593
13594 2017-01-31  Pedro Alves  <palves@redhat.com>
13595
13596         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13597         Fix typos.
13598
13599 2017-01-31  Pedro Alves  <palves@redhat.com>
13600
13601         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13602         not used.
13603
13604 2017-01-31  Pedro Alves  <palves@redhat.com>
13605
13606         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13607
13608 2017-01-31  Pedro Alves  <palves@redhat.com>
13609
13610         * common/scoped_restore.h
13611         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13612         change the value's parameter type to T2.
13613         (make_scoped_restore): Likewise.
13614
13615 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13616             Richard Henderson  <rth@redhat.com>
13617
13618         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13619         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13620         GS_BASE for older kernels.
13621         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13622         GS_BASE for older kernels.
13623         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13624         and GS_BASE to the offset table.
13625         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13626         system register group.
13627         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13628         for older kernels.
13629         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13630         amd64 ABI.
13631         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13632         AMD64_GSBASE_REGNUM.
13633         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13634         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13635         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13636         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13637         i386/64bit-segments.xml in those rules.
13638         * features/i386/64bit-segments.xml: New file.
13639         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13640         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13641         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13642         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13643         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13644         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13645         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13646         * features/i386/amd64-avx-linux.c: Regenerated.
13647         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13648         * features/i386/amd64-avx-mpx.c: Regenerated.
13649         * features/i386/amd64-avx512-linux.c: Regenerated.
13650         * features/i386/amd64-linux.c: Regenerated.
13651         * features/i386/amd64-mpx-linux.c: Regenerated.
13652         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13653         * features/i386/i386-avx-mpx.c: Regenerated.
13654         * features/i386/x32-avx-linux.c: Regenerated.
13655         * features/i386/x32-avx512-linux.c: Regenerated.
13656         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13657         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13658         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13659         * regformats/i386/amd64-linux.dat: Regenerated.
13660         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13661         * regformats/i386/x32-avx-linux.dat: Regenerated.
13662         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13663         * regformats/i386/x32-linux.dat: Regenerated.
13664
13665 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13666
13667         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13668         Set to AMD64_NUM_REGS.
13669
13670 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13671
13672         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13673         that checks validity of a register number.
13674
13675 2017-01-27  Kees Cook  <keescook@google.com>
13676
13677         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13678         fetch_fpregs if target has fpa registers.
13679         (arm_linux_store_inferior_registers): Call store_fpregs if target
13680         has fpa registers.
13681
13682 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13683
13684         * cris-tdep.c (cris_gdbarch_init): Remove check for
13685         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13686
13687 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13688
13689         * corelow.c (get_core_register_section): Check for regset
13690         existence before checking for REGSET_VARIABLE_SIZE.
13691
13692 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13693             Pedro Alves  <palves@redhat.com>
13694
13695         PR gdb/20939
13696         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13697         call memory_error, save memaddr instead.
13698         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13699         negative, cal memory_error.
13700         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13701
13702 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13703
13704         * disasm-selftests.c (memory_error_test): New function.
13705         (_initialize_disasm_selftests): Register memory_error_test.
13706
13707 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13708
13709         * Makefile.in (SFILES): Add disasm-selftests.c and
13710         selftest-arch.c.
13711         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13712         * disasm-selftests.c: New file.
13713         * selftest-arch.c: New file.
13714         * selftest-arch.h: New file.
13715
13716 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13717
13718         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13719         to bfd_arch_mep.  Don't return 0 if section is not
13720         found.  Call print_insn_mep.
13721
13722 2017-01-26  Pedro Alves  <palves@redhat.com>
13723             Yao Qi  <yao.qi@linaro.org>
13724
13725         * arm-tdep.c: Include "disasm.h".
13726         (gdb_print_insn_arm): Update code to get gdbarch.
13727         * disasm.c (dis_asm_read_memory): Change it to
13728         gdb_disassembler::dis_asm_read_memory.
13729         (dis_asm_memory_error): Likewise.
13730         (dis_asm_print_address): Likewise.
13731         (gdb_pretty_print_insn): Change it to
13732         gdb_disassembler::pretty_print_insn.
13733         (dump_insns): Add one argument gdb_disassemlber.  All
13734         callers updated.
13735         (do_mixed_source_and_assembly_deprecated): Likewise.
13736         (do_mixed_source_and_assembly): Likewise.
13737         (do_assembly_only): Likewise.
13738         (gdb_disassembler::gdb_disassembler): New.
13739         (gdb_disassembler::print_insn): New.
13740         * disasm.h (class gdb_disassembler): New.
13741         (gdb_pretty_print_insn): Remove declaration.
13742         (gdb_disassemble_info): Likewise.
13743         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13744         (gdbscm_disasm_read_memory_worker): Update.
13745         (gdbscm_disasm_read_memory): Update.
13746         (gdbscm_disasm_memory_error): Remove.
13747         (gdbscm_disasm_print_address): Remove.
13748         (gdbscm_disassembler::gdbscm_disassembler): New.
13749         (gdbscm_print_insn_from_port): Update.
13750         * mips-tdep.c: Include disasm.h.
13751         (gdb_print_insn_mips): Update code to get gdbarch.
13752         * record-btrace.c (btrace_insn_history): Update.
13753         * spu-tdep.c: Include disasm.h.
13754         (struct spu_dis_asm_data): Remove.
13755         (struct spu_dis_asm_info): New.
13756         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13757         SPU id.
13758         (gdb_print_insn_spu): Cast disassemble_info to
13759         spu_dis_asm_info.
13760
13761 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13762
13763         * disasm.c (do_ui_file_delete): Delete.
13764         (gdb_insn_length): Move code creating stream to ...
13765         * utils.c (null_stream): ... here.  New function.
13766         * utils.h (null_stream): Declare.
13767
13768 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13769
13770         * python/py-inferior.c (find_thread_object): Return directly
13771         from the loop.  Remove "found" variable.
13772
13773 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13774
13775         GDB 7.12.1 released.
13776
13777 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13778
13779         * python/py-function.c (fnpy_call): Reorder declarations to have
13780         the gdbpy_enter object declared first.
13781         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13782
13783 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13784
13785         PR python/21068
13786         * python/python-internal.h (PyMem_RawMalloc): Define for
13787         Python < 3.4.
13788         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13789         PyMem_RawMalloc instead of PyMem_Malloc.
13790
13791 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13792             Luis Machado  <lgustavo@codesourcery.com>
13793
13794         * NEWS (New commands): Mention flash-erase.
13795         (New MI commands): Mention target-flash-erase.
13796         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13797         command.
13798         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13799         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13800         * target.c (flash_erase_command): New function.
13801         (initialize_targets): Add new flash-erase command.
13802         * target.h (flash_erase_command): New declaration.
13803
13804 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13805
13806         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13807         HAVE_SYS_PROCFS_H is defined.
13808
13809 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13810
13811         * remote.c (struct cached_reg): Change data into a pointer.
13812         * (stop_reply_dtr): Free data pointers before deleting vector.
13813         (process_stop_reply): Likewise.
13814         (remote_parse_stop_reply): Allocate space for data
13815
13816 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13817
13818         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13819         MAX_REGISTER_SIZE.
13820         (amd64_pseudo_register_read_value): Likewise.
13821         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13822         (store_register_using_P): Likewise.
13823         * regcache.c (regcache_xfer_part): Likewise.
13824
13825 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13826
13827         Split real and pseudo registers.
13828         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13829         (sparc32_pseudo_regnum): New enum.
13830         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13831         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13832         (SPARC32_CP0_REGISTERS): New macro.
13833         (sparc32_pseudo_register_name): New function.
13834         (sparc32_register_name): Use sparc32_pseudo_register_name.
13835         (sparc32_pseudo_register_type): New function.
13836         (sparc32_register_type): Use sparc32_pseudo_register_type.
13837         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13838         pseudo register numbers.
13839         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13840         (SPARC64_CP0_REGISTERS): New macro.
13841         (sparc64_pseudo_register_name): New function.
13842         (sparc64_register_name): Use sparc64_pseudo_register_name.
13843         (sparc64_pseudo_register_type): New function.
13844         (sparc64_register_type): Use sparc64_pseudo_register_type.
13845         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13846         pseudo register numbers.
13847         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13848         sparc64_store_arguments): Handle pseudo register numbers.
13849
13850 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13851
13852         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13853         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13854         output.
13855         (getpkt_or_notif_sane_1): Likewise.
13856
13857 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13858
13859         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13860         of CC.  Pass "-x c++-header" instead of "-x c".
13861
13862 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13863
13864         * remote.c (remote_can_async_p): Update comment.
13865
13866 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13867
13868         * linux-nat.c (linux_nat_can_async_p): Update comment.
13869
13870 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13871
13872         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13873
13874 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13875
13876         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13877
13878 2017-01-10  Tom Tromey  <tom@tromey.com>
13879
13880         * python/py-type.c (typy_legacy_template_argument): Update.
13881         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13882         ~demangle_parse_info): Declare new members.
13883         (cp_demangled_name_to_comp): Return unique_ptr.
13884         (cp_demangled_name_parse_free)
13885         (make_cleanup_cp_demangled_name_parse_free)
13886         (cp_new_demangle_parse_info): Remove.
13887         * cp-support.c (do_demangled_name_parse_free_cleanup)
13888         (make_cleanup_cp_demangled_name_parse_free): Remove.
13889         (inspect_type, cp_canonicalize_string_full)
13890         (cp_canonicalize_string): Update.
13891         (mangled_name_to_comp): Change return type.
13892         (cp_class_name_from_physname, method_name_from_physname)
13893         (cp_func_name, cp_remove_params): Update.
13894         * cp-name-parser.y (demangle_parse_info): New constructor, from
13895         cp_new_demangle_parse_info.
13896         (~demangle_parse_info): New destructor, from
13897         cp_demangled_name_parse_free.
13898         (cp_merge_demangle_parse_infos): Update.
13899         (cp_demangled_name_to_comp): Change return type.
13900
13901 2017-01-10  Tom Tromey  <tom@tromey.com>
13902
13903         * top.c (prevent_dont_repeat): Change return type.
13904         * python/python.c (execute_gdb_command): Use std::string.
13905         Update.
13906         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13907         * command.h (prevent_dont_repeat): Change return type.
13908         * breakpoint.c (bpstat_do_actions_1): Update.
13909
13910 2017-01-10  Tom Tromey  <tom@tromey.com>
13911
13912         * value.h (scoped_value_mark::~scoped_value_mark): Call
13913         free_to_mark.
13914         (scoped_value_mark::free_to_mark): New method.
13915         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13916         scoped_value_mark.
13917
13918 2017-01-10  Tom Tromey  <tom@tromey.com>
13919
13920         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13921         (valpy_reference_value, valpy_const_value, valpy_get_address)
13922         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13923         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13924         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13925         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13926         scoped_value_mark.
13927         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13928         * value.h (scoped_value_mark): New class.
13929
13930 2017-01-10  Tom Tromey  <tom@tromey.com>
13931
13932         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13933         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13934         * psymtab.c (discard_psymtabs_upto): Remove.
13935         (make_cleanup_discard_psymtabs): Remove.
13936         (struct psymtab_state): Remove.
13937
13938 2017-01-10  Tom Tromey  <tom@tromey.com>
13939
13940         * record-full.c (record_full_save_cleanups): Remove.
13941         (record_full_save): Use gdb::unlinker.
13942         * gcore.c (do_bfd_delete_cleanup): Remove.
13943         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13944         cleanups.
13945         * dwarf2read.c (unlink_if_set): Remove.
13946         (write_psymtabs_to_index): Use gdb::unlinker.
13947         * common/gdb_unlinker.h: New file.
13948
13949 2017-01-10  Tom Tromey  <tom@tromey.com>
13950
13951         * windows-tdep.c (windows_xfer_shared_library): Update.
13952         * windows-nat.c (windows_make_so): Update.
13953         * utils.h (make_cleanup_bfd_unref): Remove.
13954         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13955         * symfile.h (symfile_bfd_open)
13956         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13957         * symfile.c (read_symbols, symbol_file_add)
13958         (separate_debug_file_exists): Update.
13959         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13960         (generic_load, reread_symbols): Update.
13961         * symfile-mem.c (symbol_file_add_from_memory): Update.
13962         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13963         (spu_symbol_file_add_from_memory): Update.
13964         * solist.h (struct target_so_ops) <bfd_open>: Return
13965         gdb_bfd_ref_ptr.
13966         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13967         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13968         gdb_bfd_ref_ptr.
13969         (solib_map_sections, reload_shared_libraries_1): Update.
13970         * solib-svr4.c (enable_break): Update.
13971         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13972         * solib-frv.c (enable_break2): Update.
13973         * solib-dsbt.c (enable_break): Update.
13974         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13975         gdb_bfd_ref_ptr.
13976         (darwin_solib_get_all_image_info_addr_at_init): Update.
13977         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13978         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13979         * record-full.c (record_full_save): Update.
13980         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13981         * procfs.c (insert_dbx_link_bpt_in_file): Update.
13982         * minidebug.c (find_separate_debug_file_in_section): Return
13983         gdb_bfd_ref_ptr.
13984         * machoread.c (macho_add_oso_symfile): Change abfd to
13985         gdb_bfd_ref_ptr.
13986         (macho_symfile_read_all_oso): Update.
13987         (macho_check_dsym): Return gdb_bfd_ref_ptr.
13988         (macho_symfile_read): Update.
13989         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13990         (jit_bfd_try_read_symtab): Update.
13991         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13992         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13993         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13994         gdb_bfd_ref_ptr.
13995         (gdb_bfd_ref_policy): New struct.
13996         (gdb_bfd_ref_ptr): New typedef.
13997         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13998         (gdb_bfd_openw, gdb_bfd_openr_iovec)
13999         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14000         gdb_bfd_ref_ptr.
14001         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14002         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14003         (gcore_command): Update.
14004         * exec.c (exec_file_attach): Update.
14005         * elfread.c (elf_symfile_read): Update.
14006         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14007         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14008         (open_and_init_dwo_file): Update.
14009         (open_dwp_file): Return gdb_bfd_ref_ptr.
14010         (open_and_init_dwp_file): Update.
14011         * corelow.c (core_open): Update.
14012         * compile/compile-object-load.c (compile_object_load): Update.
14013         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14014         * coffread.c (coff_symfile_read): Update.
14015         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14016         gdb_bfd_ref_ptr.  Rename.
14017         (dump_bfd_file, restore_command): Update.
14018         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14019         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14020         (find_separate_debug_file_by_buildid): Update.
14021
14022 2017-01-10  Tom Tromey  <tom@tromey.com>
14023
14024         * common/gdb_ref_ptr.h: New file.
14025         * python/py-ref.h (struct gdbpy_ref_policy): New.
14026         (gdbpy_ref): Now a typedef.
14027
14028 2017-01-10  Tom Tromey  <tom@tromey.com>
14029
14030         * utils.h (make_cleanup_htab_delete): Don't declare.
14031         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14032         Remove.
14033         * linespec.c (decode_compound_collector): Add constructor,
14034         destructor.
14035         (lookup_prefix_sym): Remove cleanup.
14036         (symtab_collector): Add constructor, destructor.
14037         (collect_symtabs_from_filename): Remove cleanup.
14038         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14039         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14040         Use htab_up.
14041         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14042         * dwarf2read.c (dw2_expand_symtabs_matching)
14043         (dw2_map_symbol_filenames, dwarf_decode_macros)
14044         (write_psymtabs_to_index): Use htab_up.
14045         * dwarf2loc.c (func_verify_no_selftailcall)
14046         (call_site_find_chain_1, func_verify_no_selftailcall)
14047         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14048         std::vector, gdb::unique_xmalloc_ptr.
14049         (call_sitep): Remove typedef.
14050         (dwarf2_locexpr_baton_eval): Remove unused variable.
14051
14052 2017-01-10  Tom Tromey  <tom@tromey.com>
14053
14054         * python/python-internal.h (make_cleanup_py_decref)
14055         (make_cleanup_py_xdecref): Don't declare.
14056         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14057         (py_xdecref, make_cleanup_py_xdecref): Remove.
14058
14059 2017-01-10  Tom Tromey  <tom@tromey.com>
14060
14061         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14062         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14063
14064 2017-01-10  Tom Tromey  <tom@tromey.com>
14065
14066         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14067
14068 2017-01-10  Tom Tromey  <tom@tromey.com>
14069
14070         * python/py-utils.c (unicode_to_encoded_string)
14071         (python_string_to_target_string)
14072         (python_string_to_target_python_string)
14073         (python_string_to_host_string, gdbpy_obj_to_string)
14074         (get_addr_from_python): Use gdbpy_ref.
14075
14076 2017-01-10  Tom Tromey  <tom@tromey.com>
14077
14078         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14079         gdbpy_ref.
14080
14081 2017-01-10  Tom Tromey  <tom@tromey.com>
14082
14083         * python/python.c (eval_python_command, gdbpy_decode_line)
14084         (gdbpy_run_events, gdbpy_start_type_printers)
14085         (gdbpy_apply_type_printers): Use gdbpy_ref.
14086
14087 2017-01-10  Tom Tromey  <tom@tromey.com>
14088
14089         * python/py-param.c (get_doc_string, compute_enum_values): Use
14090         gdbpy_ref.
14091
14092 2017-01-10  Tom Tromey  <tom@tromey.com>
14093
14094         * python/py-inferior.c (find_thread_object, build_inferior_list):
14095         Use gdbpy_ref.
14096
14097 2017-01-10  Tom Tromey  <tom@tromey.com>
14098
14099         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14100
14101 2017-01-10  Tom Tromey  <tom@tromey.com>
14102
14103         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14104         gdbpy_ref.
14105
14106 2017-01-10  Tom Tromey  <tom@tromey.com>
14107
14108         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14109         extra incref.
14110         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14111         Use gdbpy_ref.
14112
14113 2017-01-10  Tom Tromey  <tom@tromey.com>
14114
14115         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14116         gdbpy_ref.
14117
14118 2017-01-10  Tom Tromey  <tom@tromey.com>
14119
14120         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14121         decref results of PyArg_ParseTupleAndKeywords.
14122
14123 2017-01-10  Tom Tromey  <tom@tromey.com>
14124
14125         * python/python.c (python_run_simple_file): Use
14126         unique_xmalloc_ptr, gdbpy_ref.
14127
14128 2017-01-10  Tom Tromey  <tom@tromey.com>
14129
14130         * python/py-prettyprint.c (print_stack_unless_memory_error)
14131         (print_string_repr, print_children): Use gdbpy_ref.
14132         (dummy_python_frame): New class.
14133         (dummy_python_frame::dummy_python_frame): Rename from
14134         push_dummy_python_frame.
14135         (py_restore_tstate): Remove.
14136
14137 2017-01-10  Tom Tromey  <tom@tromey.com>
14138
14139         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14140
14141 2017-01-10  Tom Tromey  <tom@tromey.com>
14142
14143         * python/python.c (ensure_python_env, restore_python_env):
14144         Remove.
14145         * python/python-internal.h (ensure_python_env): Don't declare.
14146         * varobj.h (varobj_ensure_python_env): Don't declare.
14147         * varobj.c (varobj_ensure_python_env): Remove.
14148
14149 2017-01-10  Tom Tromey  <tom@tromey.com>
14150
14151         * varobj.c (varobj_value_get_print_value): Use
14152         gdbpy_enter_varobj.
14153
14154 2017-01-10  Tom Tromey  <tom@tromey.com>
14155
14156         * python/py-prettyprint.c (print_string_repr, print_children):
14157         Update.
14158         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14159         of "encoding".
14160         * varobj.c (varobj_value_get_print_value): Update.
14161         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14162
14163 2017-01-10  Tom Tromey  <tom@tromey.com>
14164
14165         * varobj.c (varobj_get_display_hint)
14166         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14167         (varobj_set_visualizer, free_variable): Use
14168         gdbpy_enter_varobj.
14169
14170 2017-01-10  Tom Tromey  <tom@tromey.com>
14171
14172         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14173         (do_finish_initialization): New function.  Use gdbpy_ref.
14174         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14175         do_finish_initialization.
14176
14177 2017-01-10  Tom Tromey  <tom@tromey.com>
14178
14179         * python/py-param.c (get_set_value, get_show_value): Use
14180         gdbpy_enter, gdbpy_ref.
14181
14182 2017-01-10  Tom Tromey  <tom@tromey.com>
14183
14184         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14185
14186 2017-01-10  Tom Tromey  <tom@tromey.com>
14187
14188         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14189
14190 2017-01-10  Tom Tromey  <tom@tromey.com>
14191
14192         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14193         Use gdbpy_enter_varobj.
14194
14195 2017-01-10  Tom Tromey  <tom@tromey.com>
14196
14197         * varobj.c (gdbpy_enter_varobj): New constructor.
14198         * python/python-internal.h (gdbpy_enter_varobj): New class.
14199         * python/py-varobj.c (py_varobj_get_iterator): Use
14200         gdbpy_enter_varobj.
14201
14202 2017-01-10  Tom Tromey  <tom@tromey.com>
14203
14204         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14205         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14206         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14207         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14208         unique_xmalloc_ptr.
14209         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14210
14211 2017-01-10  Tom Tromey  <tom@tromey.com>
14212
14213         * python/py-xmethods.c (invoke_match_method): Use
14214         gdbpy_ref.
14215
14216 2017-01-10  Tom Tromey  <tom@tromey.com>
14217
14218         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14219         gdbpy_enter, gdbpy_ref.
14220
14221 2017-01-10  Tom Tromey  <tom@tromey.com>
14222
14223         * python/python.c (python_interactive_command): Use gdbpy_enter.
14224
14225 2017-01-10  Tom Tromey  <tom@tromey.com>
14226
14227         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14228         gdbpy_ref.
14229
14230 2017-01-10  Tom Tromey  <tom@tromey.com>
14231
14232         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14233         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14234
14235 2017-01-10  Tom Tromey  <tom@tromey.com>
14236
14237         * utils.h (htab_deleter): New struct.
14238         (htab_up): New typedef.
14239         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14240         gdbpy_enter, gdbpy_ref, htab_up.
14241
14242 2017-01-10  Tom Tromey  <tom@tromey.com>
14243
14244         * python/py-unwind.c (pending_frame_invalidate): Remove.
14245         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14246
14247 2017-01-10  Tom Tromey  <tom@tromey.com>
14248
14249         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14250         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14251
14252 2017-01-10  Tom Tromey  <tom@tromey.com>
14253
14254         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14255
14256 2017-01-10  Tom Tromey  <tom@tromey.com>
14257
14258         * python/python.c (gdbpy_eval_from_control_command)
14259         (gdbpy_source_script, gdbpy_run_events)
14260         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14261         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14262         gdbpy_enter.
14263
14264 2017-01-10  Tom Tromey  <tom@tromey.com>
14265
14266         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14267
14268 2017-01-10  Tom Tromey  <tom@tromey.com>
14269
14270         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14271
14272 2017-01-10  Tom Tromey  <tom@tromey.com>
14273
14274         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14275         (python_on_inferior_call_pre, python_on_inferior_call_post)
14276         (python_on_memory_change, python_on_register_change)
14277         (python_inferior_exit, python_new_objfile, add_thread_object)
14278         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14279
14280 2017-01-10  Tom Tromey  <tom@tromey.com>
14281
14282         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14283         (bpfinishpy_handle_exit): Use gdbpy_enter.
14284
14285 2017-01-10  Tom Tromey  <tom@tromey.com>
14286
14287         * python/py-cmd.c (cmdpy_destroyer)
14288         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14289         gdbpy_enter.
14290
14291 2017-01-10  Tom Tromey  <tom@tromey.com>
14292
14293         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14294         gdbpy_enter.
14295         (gdbpy_breakpoint_has_cond): Likewise.
14296
14297 2017-01-10  Tom Tromey  <tom@tromey.com>
14298
14299         * python/python.c (gdbpy_enter): New constructor.
14300         (~gdbpy_enter): New destructor.
14301         (restore_python_env, ensure_python_env): Rewrite.
14302         * python/python-internal.h (gdbpy_enter): New class.
14303
14304 2017-01-10  Tom Tromey  <tom@tromey.com>
14305
14306         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14307
14308 2017-01-10  Tom Tromey  <tom@tromey.com>
14309
14310         * python/py-value.c (value_has_field, get_field_flag)
14311         (get_field_type, valpy_getitem, convert_value_from_python): Use
14312         gdbpy_ref.
14313
14314 2017-01-10  Tom Tromey  <tom@tromey.com>
14315
14316         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14317         gdbpy_ref.
14318
14319 2017-01-10  Tom Tromey  <tom@tromey.com>
14320
14321         * python/py-prettyprint.c (search_pp_list)
14322         (find_pretty_printer_from_objfiles)
14323         (find_pretty_printer_from_progspace)
14324         (find_pretty_printer_from_gdb, find_pretty_printer)
14325         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14326         gdbpy_ref.
14327
14328 2017-01-10  Tom Tromey  <tom@tromey.com>
14329
14330         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14331
14332 2017-01-10  Tom Tromey  <tom@tromey.com>
14333
14334         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14335         (ltpy_get_all_source_lines): Use gdbpy_ref.
14336
14337 2017-01-10  Tom Tromey  <tom@tromey.com>
14338
14339         * python/py-framefilter.c (extract_sym, extract_value)
14340         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14341         gdbpy_ref.
14342
14343 2017-01-10  Tom Tromey  <tom@tromey.com>
14344
14345         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14346
14347 2017-01-10  Tom Tromey  <tom@tromey.com>
14348
14349         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14350
14351 2017-01-10  Tom Tromey  <tom@tromey.com>
14352
14353         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14354         gdbpy_ref.
14355
14356 2017-01-10  Tom Tromey  <tom@tromey.com>
14357
14358         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14359
14360 2017-01-10  Tom Tromey  <tom@tromey.com>
14361
14362         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14363         (typy_range): Use gdbpy_ref.
14364
14365 2017-01-10  Tom Tromey  <tom@tromey.com>
14366
14367         * python/py-threadevent.c (create_thread_event_object): Use
14368         gdbpy_ref.
14369         * python/py-stopevent.c (create_stop_event_object): Simplify.
14370         (emit_stop_event): Use gdbpy_ref.
14371         * python/py-signalevent.c (create_signal_event_object): Use
14372         gdbpy_ref.
14373         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14374         (emit_new_objfile_event, create_clear_objfiles_event_object)
14375         (emit_clear_objfiles_event): Use gdbpy_ref.
14376         * python/py-infevents.c (create_inferior_call_event_object)
14377         (create_register_changed_event_object)
14378         (create_memory_changed_event_object, emit_inferior_call_event)
14379         (emit_memory_changed_event, emit_register_changed_event): Use
14380         gdbpy_ref.
14381         * python/py-exitedevent.c (create_exited_event_object)
14382         (emit_exited_event): Use gdbpy_ref.
14383         * python/py-event.h (evpy_emit_event): Remove
14384         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14385         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14386         * python/py-continueevent.c (emit_continue_event): Use
14387         gdbpy_ref.
14388         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14389         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14390         gdbpy_ref.
14391         * python/py-bpevent.c (create_breakpoint_event_object): Use
14392         gdbpy_ref.
14393
14394 2017-01-10  Tom Tromey  <tom@tromey.com>
14395
14396         * python/py-ref.h: New file.
14397
14398 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14399
14400         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14401         void.
14402         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14403         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14404         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14405         * ui-out.c (ui_out::redirect): Likewise.
14406         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14407         * cli/cli-logging.c (set_logging_redirect): Update call site of
14408         ui_out::redirect.
14409         (handle_redirections): Likewise.
14410         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14411         * top.c (execute_command_to_string): Likewise.
14412         * utils.c (do_ui_out_redirect_pop): Likewise.
14413
14414 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14415
14416         * stack.c (_initialize_stack): Update "frame" command help message.
14417
14418 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14419
14420         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14421
14422 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14423
14424         * x86-linux-nat.h: Include gdb_proc_service.h.
14425
14426 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14427
14428         * ser-base.h: Include serial.h.
14429
14430 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14431
14432         * ppc-linux-tdep.h: Include ppc-tdep.h.
14433
14434 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14435
14436         * nat/amd64-linux-siginfo.h: Include signal.h.
14437
14438 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14439
14440         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14441
14442 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14443
14444         * mi/mi-parse.h: Include mi-cmds.h.
14445
14446 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14447
14448         * inf-loop.c: Don't include "target.h".
14449         * inf-loop.h: Include it here.
14450
14451 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14452
14453         * dfp.h: Include "dboulest.h" and "expression.h".
14454
14455 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14456
14457         * ax-gdb.h: Include "ax.h".
14458
14459 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14460
14461         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14462         with nat/gdb_ptrace.h.
14463
14464 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14465
14466         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14467         new line.
14468         (mips64_fbsd_sigframe_init): Likewise.
14469
14470 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14471
14472         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14473         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14474
14475 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14476
14477         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14478         * NEWS: Mention new FreeBSD/mips native configuration.
14479         * config/mips/fbsd.mh: New file.
14480         * configure.host: Add mips*-*-freebsd*.
14481         * mips-fbsd-nat.c: New file.
14482
14483 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14484
14485         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14486         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14487         * NEWS: Mention new FreeBSD/mips target.
14488         * configure.tgt: Add mips*-*-freebsd*.
14489         * mips-fbsd-tdep.c: New file.
14490         * mips-fbsd-tdep.h: New file.
14491
14492 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14493
14494         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14495         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14496
14497 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14498
14499         Update copyright year range in all GDB files.
14500
14501 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14502
14503         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14504
14505 For older changes see ChangeLog-2016.
14506 \f
14507 Local Variables:
14508 mode: change-log
14509 left-margin: 8
14510 fill-column: 74
14511 version-control: never
14512 coding: utf-8
14513 End: