Target FP: Add binop and compare 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: Include <math.h>.
4         (floatformat_binop): New function.
5         (floatformat_compare): Likewise.
6         (target_float_binop): Likewise.
7         (target_float_compare): Likewise.
8         * target-float.h: Include "expression.h".
9         (target_float_binop): Add prototype.
10         (target_float_compare): Likewise.
11
12         * valarith.c: Do not include "doublest.h" and "dfp.h".
13         Include "common/byte-vector.h".
14         (value_args_as_decimal): Remove, replace by ...
15         (value_args_as_target_float): ... this function.  Handle both
16         binary and decimal target floating-point formats.
17         (scalar_binop): Handle both binary and decimal FP using
18         value_args_as_target_float and target_float_binop.
19         (value_equal): Handle both binary and decimal FP using
20         value_args_as_target_float and target_float_compare.
21         (value_less): Likewise.
22         (value_pos): Handle all scalar types as simple copy.
23         (value_neg): Handle all scalar types via BINOP_SUB from 0.
24         * dfp.c (decimal_binop): Throw error instead of internal_error
25         when called with an unsupported operation code.
26
27 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
28
29         * target-float.c (target_float_to_string): New function.
30         (target_float_from_string): New function.
31         * target-float.h (target_float_to_string): Add prototype.
32         (target_float_from_string): Add prototype.
33
34         * valprint.c: Include "target-float.h".  Do not include
35         "doublest.h" and "dfp.h".
36         (print_floating): Use target_float_to_string.
37         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
38         (printf_floating): Use target_float_to_string.
39         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
40         (print_i387_value): Use target_float_to_string.
41         * mips-tdep.c: Include "target-float.h".
42         (mips_print_fp_register): Use target_float_to_string.
43         * sh64-tdep.c: Include "target-float.h".
44         (sh64_do_fp_register): Use target_float_to_string.
45
46         * parse.c: Include "target-float.h".  Do not include
47         "doublest.h" and "dfp.h".
48         (parse_float): Use target_float_from_string.
49         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
50         (define_symbol): Use target_float_from_string.
51         * gdbarch-selftests.c: Include "target-float.h".
52         (register_to_value_test): Use target_float_from_string.
53
54 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
55
56         * Makefile.c (SFILES): Add target-float.c.
57         (HFILES_NO_SRCDIR): Add target-float.h.
58         (COMMON_OBS): Add target-float.o.
59         * target-float.h: New file.
60         * target-float.c: New file.
61
62         * doublest.c (floatformat_classify): Fix detection of float_zero.
63
64         * gdbtypes.c (is_floating_type): New function.
65         * gdbtypes.h (is_floating_type): Add prototype.
66
67         * value.c: Do not include "floatformat.h".
68         (unpack_double): Use target_float_is_valid.
69         (is_floating_value): New function.
70         * value.h (is_floating_value): Add prototype-
71
72         * valarith.c: Include "target-float.h".
73         (value_logical_not): Use target_float_is_zero.
74
75         * python/py-value.c: Include "target-float.h".
76         (valpy_nonzero): Use target_float_is_zero.
77
78 2017-11-04  Tom Tromey  <tom@tromey.com>
79
80         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
81
82 2017-11-04  Tom Tromey  <tom@tromey.com>
83
84         * breakpoint.c (set_momentary_breakpoint): Return
85         breakpoint_up.
86         (until_break_command): Update.
87         (new_until_break_fsm): Change argument types to
88         breakpoint_up.
89         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
90         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
91         Remove.
92         * infcmd.c (finish_forward): Update.
93         * breakpoint.h (set_momentary_breakpoint)
94         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
95         (make_cleanup_delete_breakpoint): Remove.
96         (struct breakpoint_deleter): New.
97         (breakpoint_up): New typedef.
98         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
99         (insert_exception_resume_breakpoint): Update.
100         (insert_exception_resume_from_probe): Update.
101         (insert_longjmp_resume_breakpoint): Update.
102         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
103         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
104         * infcall.c (call_function_by_hand_dummy): Update
105
106 2017-11-04  Tom Tromey  <tom@tromey.com>
107
108         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
109
110 2017-11-04  Tom Tromey  <tom@tromey.com>
111
112         * linux-tdep.c (linux_core_info_proc_mappings): Use
113         gdb::def_vector.
114         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
115         "size" argument.
116         (linux_corefile_thread): Update.
117         (linux_make_corefile_notes): Remove unused variable.
118
119 2017-11-04  Tom Tromey  <tom@tromey.com>
120
121         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
122         gdb::byte_vector.
123
124 2017-11-04  Tom Tromey  <tom@tromey.com>
125
126         * objfiles.c (do_free_objfile_cleanup): Remove.
127         * compile/compile-object-load.c (compile_object_load): Update.
128         * objfiles.h (make_cleanup_free_objfile): Remove.
129
130 2017-11-04  Tom Tromey  <tom@tromey.com>
131
132         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
133         (adi_read_versions): Change "tags" to "gdb_byte *".
134         (adi_print_versions): Likewise.
135
136 2017-11-04  Tom Tromey  <tom@tromey.com>
137
138         * breakpoint.c
139         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
140         from start_rbreak_breakpoints.
141         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
142         * breakpoint.h (class scoped_rbreak_breakpoints): New.
143         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
144         * symtab.c (do_end_rbreak_breakpoints): Remove.
145         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
146
147 2017-11-04  Tom Tromey  <tom@tromey.com>
148
149         * cp-namespace.c (reset_directive_searched): Remove.
150         (cp_lookup_symbol_via_imports): Use scoped_restore.
151         * cp-support.c (reset_directive_searched): Remove.
152         (make_symbol_overload_list_using): Use scoped_restore.
153         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
154         (reset_directive_searched): Remove.
155
156 2017-11-04  Tom Tromey  <tom@tromey.com>
157
158         * symfile.c (find_separate_debug_file_by_debuglink): Use
159         unique_xmalloc_ptr.
160
161 2017-11-04  Tom Tromey  <tom@tromey.com>
162
163         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
164         type of "info".
165         (compute_stack_depth): Likewise.
166         (do_compile_dwarf_expr_to_c): Use std::vector.
167
168 2017-11-04  Tom Tromey  <tom@tromey.com>
169
170         * compile/compile-object-load.c (link_callbacks_einfo): Use
171         std::string.
172
173 2017-11-04  Tom Tromey  <tom@tromey.com>
174
175         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
176         Use scoped_free_pendings.
177         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
178         scoped_free_pendings.
179         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
180         (xcoff_initial_scan): Likewise.
181         * buildsym.c (reset_symtab_globals): Update comment.
182         (scoped_free_pendings): Rename from really_free_pendings.
183         (prepare_for_building): Update comment.
184         (buildsym_init): Likewise.
185         * buildsym.h (class scoped_free_pendings): New class.
186         (really_free_pendings): Don't declare.
187
188 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
189
190         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
191         output when converting a zero value to a special byteorder format.
192
193 2017-11-02  Yao Qi  <yao.qi@linaro.org>
194
195         * frame.c (do_frame_register_read): Remove aspace.
196         * jit.c (jit_frame_sniffer): Likwise.
197         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
198         * regcache.c (regcache::regcache): Pass nullptr.
199         (regcache_print): Caller updated.
200         * regcache.h (regcache::regcache): Remove one constructor
201         parameter aspace.
202
203 2017-11-02  Yao Qi  <yao.qi@linaro.org>
204
205         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
206
207 2017-11-02  Yao Qi  <yao.qi@linaro.org>
208
209         * breakpoint.c (insert_single_step_breakpoints): Update.
210         * frame.c (struct frame_info) <aspace>: Add const.
211         (frame_save_as_regcache): Add const.
212         (get_frame_address_space): Return const address_space *.
213         * frame.h (get_frame_address_space): Update declaration.
214         * infrun.c (struct step_over_info) <aspace>: Add const.
215         (set_step_over_info): Make aspace const.
216         (displaced_step_prepare_throw): Change variable const.
217         (resume): Likewise.
218         (proceed): Likewise.
219         (adjust_pc_after_break): Likewise.
220         (save_waitstatus): Likewise.
221         (handle_signal_stop): Likewise.
222         (keep_going_pass_signal): Likewise.
223         * jit.c (jit_frame_sniffer): Add const.
224         * mips-tdep.c (mips_single_step_through_delay): Likewise.
225         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
226         * record-full.c (record_full_wait_1): Likewise.
227         * regcache.c (regcache::regcache): Change parameter to const.
228         * regcache.h (regcache::regcache): Likewise.
229         (regcache::aspace): Return const address_space *.
230         (regcache) <m_aspace>: Add const.
231
232 2017-11-02  Yao Qi  <yao.qi@linaro.org>
233
234         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
235         * frame.c (create_sentinel_frame): Likewise.
236         * infrun.c (displaced_step_prepare_throw): Likewise.
237         (resume): Likewise.
238         (thread_still_needs_step_over_bp): Likewise.
239         (proceed): Likewise.
240         (do_target_wait): Likewise.
241         (adjust_pc_after_break): Likewise.
242         (handle_syscall_event): Likewise.
243         (save_waitstatus): Likewise.
244         (handle_inferior_event_1): Likewise.
245         (handle_signal_stop): Likewise.
246         (keep_going_pass_signal): Likewise.
247         * linux-nat.c (status_callback): Likewise.
248         (save_stop_reason): Likewise.
249         (resume_stopped_resumed_lwps): Likewise.
250         * record-full.c (record_full_exec_insn): Likewise.
251         (record_full_wait_1): Likewise.
252         * regcache.c (get_regcache_aspace): Remove.
253         * regcache.h (get_regcache_aspace): Remove.
254
255 2017-11-02  Yao Qi  <yao.qi@linaro.org>
256
257         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
258         (init_regcache_descr): Use gdbarch_num_regs.
259         (regcache::regcache): Likewise.
260         (regcache::get_register_status): Likewise.
261         (regcache::assert_raw_regnum): Likewise.
262         (regcache::cooked_read): Likewise.
263         (regcache::cooked_read_value): Likewise.
264         (regcache::cooked_write): Likewise.
265         (regcache::dump): Likewise.
266         (regcache::num_raw_registers): New method.
267         * regcache.h (class regcache) <num_raw_registers>: New.
268
269 2017-11-02  Yao Qi  <yao.qi@linaro.org>
270
271         * regcache.c (regcache::assert_regnum): New method.
272         (regcache::invalidate): Call assert_regnum.
273         (regcache::raw_update): Likewise.
274         (regcache::raw_write): Likewise.
275         (regcache::raw_read_part): Likewise.
276         (regcache::raw_write_part): Likewise.
277         (regcache::raw_supply): Likewise.
278         (regcache::raw_supply_integer): Likewise.
279         (regcache::raw_supply_zeroed): Likewise.
280         (regcache::raw_collect): Likewise.
281         (regcache::raw_collect_integer): Likewise.
282         * regcache.h (regcache::assert_regnum): Declare.
283
284 2017-11-02  Yao Qi  <yao.qi@linaro.org>
285
286         * regcache.c (regcache::dump): Remove code.
287
288 2017-11-02  Yao Qi  <yao.qi@linaro.org>
289
290         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
291         Remove.
292         <sizeof_cooked_register_status>: Remove.
293         (init_regcache_descr): Update.
294         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
295         (regcache::save): Likewise.
296         (regcache::dump): Likewise.
297
298 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
299
300         * ft32-tdep.c (ft32_fetch_instruction): New function.
301         (ft32_analyze_prologue): Use ft32_fetch_instruction().
302
303 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
304
305         * cli/cli-script.c (execute_control_command): Rename to ...
306         (execute_control_command_1): ... this.
307         (execute_control_command): New function.
308
309 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
310
311         * tracepoint.c (tfind_command): Remove const_cast.
312
313 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
314
315         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
316
317 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
318
319         * common/common-utils.h (in_inclusive_range): New function.
320         * arm-tdep.c (arm_record_extension_space): Use
321         in_inclusive_range.
322         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
323         * cris-tdep.c (cris_spec_reg_applicable): Use
324         in_inclusive_range.
325
326 2017-10-30  Pedro Alves  <palves@redhat.com>
327             Simon Marchi <simon.marchi@ericsson.com>
328
329         * remote.c (remote_set_syscall_catchpoint): Build a std::string
330         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
331
332 2017-10-30  Pedro Alves  <palves@redhat.com>
333
334         * common/common-utils.c (string_appendf, string_vappendf): New
335         functions.
336         * common/common-utils.h (string_appendf, string_vappendf): New
337         declarations.
338         * unittests/common-utils-selftests.c (string_appendf_func)
339         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
340         (string_vappendf_tests): New functions.
341         (_initialize_common_utils_selftests): Register "string_appendf" and
342         "string_vappendf tests".
343
344 2017-10-30  Pedro Alves  <palves@redhat.com>
345
346         * unittests/common-utils-selftests.c (format_func): New typedef.
347         (string_printf_tests, string_vprintf_tests): Tests factored out
348         and merged to ...
349         (test_format_func): ... this new function.
350         (string_printf_tests, string_vprintf_tests): Reimplement on top of
351         test_format_func.
352
353 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
354
355         * darwin-nat.c: Remove include of gdb.h.
356
357 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
358
359         * xtensa-xtregs.c: Fix formatting issues.
360
361 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
362
363         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
364
365 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
366
367         PR python/21213
368         * python/py-infthread.c (thpy_get_inferior): Increment reference
369         of inferior before returning it.
370
371 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
372
373         * unittests/common-utils-selftests.c (format): Add
374         ATTRIBUTE_PRINTF.
375
376 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
377
378         * xml-syscall.c (struct syscall_desc): Add constructor.
379         <name>: Change type to std::string.
380         (syscall_desc_up): New typedef.
381         (syscall_desc_p): Remove typeder.
382         (DEF_VEC_P(syscall_desc_p)): Remove.
383         (struct syscall_group_desc): Add constructor.
384         <name>: Change type to std::string.
385         <syscalls>: Change type to std::vector.
386         (syscall_group_desc_up): New typedef.
387         (syscall_group_desc_p): Remove typedef.
388         (DEF_VEC_P(syscall_group_desc_p)): Remove.
389         (struct syscalls_info) <syscalls>: Change type to std::vector of
390         unique_ptr.
391         <groups>: Likewise.
392         <my_gdb_datadir>: Change type to std::string.
393         (syscalls_info_up): New typedef.
394         (allocate_syscalls_info): Remove.
395         (syscalls_info_free_syscalls_desc): Remove.
396         (syscalls_info_free_syscall_group_desc): Remove.
397         (free_syscalls_info): Remove.
398         (make_cleanup_free_syscalls_info): Remove.
399         (syscall_group_create_syscall_group_desc): Adjust.
400         (syscall_group_add_syscall): Adjust.
401         (syscall_create_syscall_desc): Adjust.
402         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
403         (init_syscalls_info): Adjust.
404         (syscall_group_get_group_by_name): Adjust.
405         (xml_get_syscall_number): Adjust.
406         (xml_get_syscall_name): Adjust.
407         (xml_list_of_syscalls): Adjust.
408         (xml_list_syscalls_by_group): Adjust.
409         (xml_list_of_groups): Adjust.
410
411 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
412
413         * probe.h: Don't include gdb_vecs.h.
414         (DEF_VEC_P (probe_p)): Remove.
415         (find_probes_in_objfile): Return an std::vector.
416         * probe.c (find_probes_in_objfile): Likewise.
417         * breakpoint.c (breakpoint_objfile_data)
418         <longjmp_probes>: Change type to std::vector.
419         <exception_probes>: Likewise.
420         (free_breakpoint_probes): Don't manually free vectors.
421         (create_longjmp_master_breakpoint): Adjust.
422         (create_exception_master_breakpoint): Adjust.
423         * solib-svr4.c (svr4_create_probe_breakpoints): Change
424         parameter type, adjust.
425         (svr4_create_solib_event_breakpoints): Adjust.
426
427 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
428
429         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
430         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
431         with new.
432         (free_breakpoint_probes): Rename to ...
433         (free_breakpoint_objfile_data): ... this, and call delete on
434         bp_objfile_data..
435
436 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
437
438         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
439         (loaded_script_ptr): Remove typedef.
440         (DEF_VEC_P (loaded_script_ptr)): Remove.
441         (struct collect_matching_scripts_data): Add constructor.
442         <scripts_p>: Change type to (pointer to) std::vector.
443         (collect_matching_scripts_data): Adjust.
444         (sort_scripts_by_name): Make suitable for std::sort.
445         (print_scripts): Don't sort vector, adjust to std::vector.
446         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
447
448 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
449
450         * symfile.c (filename_language): Make struct, not typedef.  Add
451         constructor.
452         <ext>: Change type to std::string.
453         (DEF_VEC_O (filename_language)): Remove.
454         (filename_language_table): Change type to std::vector.
455         (add_filename_language): Adjust.
456         (set_ext_lang_command): Adjust.
457         (info_ext_lang_command): Adjust.
458         (deduce_language_from_filename): Adjust.
459         (class scoped_restore_filename_language_table): Remove.
460         (test_filename_language): Use scoped_restore.
461         (test_set_ext_lang_command): Use scoped_restore, adjust to
462         std::vector change.
463
464 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
465
466         * symfile.c: Include selftest.h.
467         (class scoped_restore_filename_language_table): New.
468         (test_filename_language): New test.
469         (test_set_ext_lang_command): New test.
470         (_initialize_symfile): Register tests.
471
472 2017-10-27  Keith Seitz  <keiths@redhat.com>
473
474         * breakpoint.c (print_breakpoint_location): Use the symbol saved
475         in the bp_location, falling back to find_pc_sect_function when
476         needed.
477         (add_location_to_breakpoint): Save sal->symbol.
478         * breakpoint.h (struct bp_location) <symbol>: New field.
479         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
480         * symtab.h (struct symtab_and_line) <symbol>: New field.
481
482 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
483
484         PR gdb/13669
485         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
486         to rewind obstack.
487
488 2017-10-26  Pedro Alves  <palves@redhat.com>
489
490         * remote.c (remote_async_terminal_ours_p): Delete.
491         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
492         Remove references to 'remote_async_terminal_ours_p'.
493
494 2017-10-26  Yao Qi  <yao.qi@linaro.org>
495
496         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
497
498 2017-10-26  Yao Qi  <yao.qi@linaro.org>
499
500         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
501         aspace const.
502         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
503         Likewise.
504         * breakpoint.c (bpstat_check_location): Remove cast.
505         (breakpoint_hit_catch_fork): Make aspce const.
506         (breakpoint_hit_catch_solib): Likewise.
507         (breakpoint_hit_catch_exec): Likewise.
508         (breakpoint_hit_ranged_breakpoint): Likewise.
509         (breakpoint_hit_watchpoint): Likewise.
510         (base_breakpoint_breakpoint_hit): Likewise.
511         (bkpt_breakpoint_hit): Likewise.
512         (dprintf_breakpoint_hit): Likewise.
513         (tracepoint_breakpoint_hit): Likewise.
514         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
515
516 2017-10-26  Yao Qi  <yao.qi@linaro.org>
517
518         * breakpoint.c (breakpoint_location_address_match): Change
519         "struct address_space *" to "const address_space".
520         (breakpoint_location_address_range_overlap): Likewise.
521         (breakpoint_here_p): Likewise.
522         (breakpoint_in_range_p): Likewise.
523         (moribund_breakpoint_here_p): Likewise.
524         (bp_location_inserted_here_p): Likewise.
525         (software_breakpoint_inserted_here_p): Likewise.
526         (hardware_breakpoint_inserted_here_p): Likewise.
527         (hardware_watchpoint_inserted_in_range): Likewise.
528         (bpstat_check_location): Likewise.
529         (bpstat_stop_status): Likewise.
530         (breakpoint_address_match): Likewise.
531         (breakpoint_address_match_range): Likewise.
532         (breakpoint_location_address_match): Likewise.
533         (breakpoint_location_address_range_overlap): Likewise.
534         (insert_single_step_breakpoint): Likewise.
535         (breakpoint_has_location_inserted_here): Likewise.
536         (single_step_breakpoint_inserted_here_p): Likewise.
537         (pc_at_non_inline_function): Likewise.
538         * breakpoint.h (bpstat_stop_status): Update declaration.
539         (breakpoint_here_p): Likewise.
540         (breakpoint_in_range_p): Likewise.
541         (moribund_breakpoint_here_p): Likewise.
542         (breakpoint_inserted_here_p): Likewise.
543         (software_breakpoint_inserted_here_p): Likewise.
544         (hardware_breakpoint_inserted_here_p): Likewise.
545         (breakpoint_has_location_inserted_here): Likewise.
546         (single_step_breakpoint_inserted_here_p): Likewise.
547         (hardware_watchpoint_inserted_in_range): Likewise.
548         (breakpoint_address_match): Likewise.
549         (insert_single_step_breakpoint): Likewise.
550         (pc_at_non_inline_function): Likewise.
551         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
552         * record.c (record_check_stopped_by_breakpoint): Likewise.
553         * record.h (record_check_stopped_by_breakpoint): Likewise.
554         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
555
556 2017-10-25  Yao Qi  <yao.qi@linaro.org>
557
558         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
559         regcache->arch () instead get_regcache_arch.
560         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
561         Likewise.
562         (aarch64_fbsd_store_inferior_registers): Likewise.
563         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
564         (store_gregs_to_thread): Likewise.
565         (fetch_fpregs_from_thread): Likewise.
566         (store_fpregs_to_thread): Likewise.
567         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
568         (aarch64_store_return_value): Likewise.
569         (aarch64_software_single_step): Likewise.
570         * aix-thread.c (aix_thread_wait): Likewise.
571         (supply_reg32): Likewise.
572         (supply_sprs64): Likewise.
573         (supply_sprs32): Likewise.
574         (fill_gprs64): Likewise.
575         (fill_gprs32): Likewise.
576         (fill_sprs64): Likewise.
577         (fill_sprs32): Likewise.
578         (store_regs_user_thread): Likewise.
579         (store_regs_kernel_thread): Likewise.
580         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
581         (alphabsd_store_inferior_registers): Likewise.
582         * alpha-tdep.c (alpha_extract_return_value): Likewise.
583         (alpha_store_return_value): Likewise.
584         (alpha_deal_with_atomic_sequence): Likewise.
585         (alpha_next_pc): Likewise.
586         (alpha_software_single_step): Likewise.
587         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
588         (amd64bsd_store_inferior_registers): Likewise.
589         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
590         Likewise.
591         (amd64_linux_store_inferior_registers): Likewise.
592         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
593         (amd64_collect_native_gregset): Likewise.
594         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
595         (amd64obsd_collect_uthread): Likewise.
596         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
597         (amd64_collect_fpregset): Likewise.
598         (amd64_supply_fxsave): Likewise.
599         (amd64_supply_xsave): Likewise.
600         (amd64_collect_fxsave): Likewise.
601         (amd64_collect_xsave): Likewise.
602         * arc-tdep.c (arc_write_pc): Likewise.
603         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
604         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
605         (arm_fbsd_store_inferior_registers): Likewise.
606         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
607         (store_vfp_regs): Likewise.
608         (arm_linux_fetch_inferior_registers): Likewise.
609         (arm_linux_store_inferior_registers): Likewise.
610         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
611         (arm_linux_sigreturn_next_pc): Likewise.
612         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
613         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
614         (fetch_register): Likewise.
615         (store_register): Likewise.
616         * arm-tdep.c (arm_is_thumb): Likewise.
617         (displaced_in_arm_mode): Likewise.
618         (bx_write_pc): Likewise.
619         (arm_get_next_pcs_addr_bits_remove): Likewise.
620         (arm_software_single_step): Likewise.
621         (arm_extract_return_value): Likewise.
622         (arm_store_return_value): Likewise.
623         (arm_write_pc): Likewise.
624         * bfin-tdep.c (bfin_extract_return_value): Likewise.
625         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
626         (bsd_uthread_store_registers): Likewise.
627         * core-regset.c (fetch_core_registers): Likewise.
628         * corelow.c (get_core_registers): Likewise.
629         * cris-tdep.c (cris_store_return_value): Likewise.
630         (cris_extract_return_value): Likewise.
631         (find_step_target): Likewise.
632         (find_step_target): Likewise.
633         (cris_software_single_step): Likewise.
634         * ctf.c (ctf_fetch_registers): Likewise.
635         * darwin-nat.c (cancel_breakpoint): Likewise.
636         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
637         * frv-tdep.c (frv_extract_return_value): Likewise.
638         * ft32-tdep.c (ft32_store_return_value): Likewise.
639         (ft32_extract_return_value): Likewise.
640         * go32-nat.c (fetch_register): Likewise.
641         (go32_fetch_registers): Likewise.
642         (go32_store_registers): Likewise.
643         (store_register): Likewise.
644         * h8300-tdep.c (h8300_extract_return_value): Likewise.
645         (h8300_store_return_value): Likewise.
646         * hppa-linux-nat.c (fetch_register): Likewise.
647         (store_register): Likewise.
648         (hppa_linux_fetch_inferior_registers): Likewise.
649         (hppa_linux_store_inferior_registers): Likewise.
650         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
651         (i386_darwin_store_inferior_registers): Likewise.
652         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
653         (gnu_store_registers): Likewise.
654         * i386-linux-nat.c (fetch_register): Likewise.
655         (store_register): Likewise.
656         (supply_gregset): Likewise.
657         (fill_gregset): Likewise.
658         (i386_linux_fetch_inferior_registers): Likewise.
659         (i386_linux_store_inferior_registers): Likewise.
660         (i386_linux_resume): Likewise.
661         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
662         Likewise.
663         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
664         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
665         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
666         (i386obsd_collect_uthread): Likewise.
667         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
668         (i386_supply_gregset): Likewise.
669         (i386_collect_gregset): Likewise.
670         (i386_supply_fpregset): Likewise.
671         (i386_collect_fpregset): Likewise.
672         (i386_mpx_bd_base): Likewise.
673         * i386-v4-nat.c (supply_fpregset): Likewise.
674         (fill_fpregset): Likewise.
675         * i387-tdep.c (i387_supply_fsave): Likewise.
676         (i387_collect_fsave): Likewise.
677         (i387_supply_fxsave): Likewise.
678         (i387_collect_fxsave): Likewise.
679         (i387_supply_xsave): Likewise.
680         (i387_collect_xsave): Likewise.
681         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
682         (ia64_linux_store_registers): Likewise.
683         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
684         (ia64_extract_return_value): Likewise.
685         (ia64_store_return_value): Likewise.
686         (find_func_descr): Likewise.
687         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
688         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
689         (inf_ptrace_store_registers): Likewise.
690         * infrun.c (use_displaced_stepping): Likewise.
691         (displaced_step_prepare_throw): Likewise.
692         (resume): Likewise.
693         (proceed): Likewise.
694         (do_target_wait): Likewise.
695         (adjust_pc_after_break): Likewise.
696         (handle_inferior_event_1): Likewise.
697         (handle_signal_stop): Likewise.
698         (save_infcall_suspend_state): Likewise.
699         (restore_infcall_suspend_state): Likewise.
700         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
701         * jit.c (jit_frame_prev_register): Likewise.
702         * linux-nat.c (save_stop_reason): Likewise.
703         (linux_nat_wait_1): Likewise.
704         (resume_stopped_resumed_lwps): Likewise.
705         * linux-record.c (record_linux_sockaddr): Likewise.
706         (record_linux_msghdr): Likewise.
707         (record_linux_system_call): Likewise.
708         * linux-tdep.c (linux_collect_thread_registers): Likewise.
709         * lm32-tdep.c (lm32_extract_return_value): Likewise.
710         (lm32_store_return_value): Likewise.
711         * m32c-tdep.c (m32c_read_flg): Likewise.
712         (m32c_pseudo_register_read): Likewise.
713         (m32c_pseudo_register_write): Likewise.
714         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
715         (m32r_linux_collect_gregset): Likewise.
716         * m32r-tdep.c (m32r_store_return_value): Likewise.
717         (m32r_extract_return_value): Likewise.
718         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
719         (m68kbsd_collect_fpregset): Likewise.
720         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
721         * m68k-linux-nat.c (fetch_register): Likewise.
722         (old_fetch_inferior_registers): Likewise.
723         (old_store_inferior_registers): Likewise.
724         (store_regs): Likewise.
725         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
726         (m68k_svr4_store_return_value): Likewise.
727         * m88k-tdep.c (m88k_store_arguments): Likewise.
728         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
729         (mi_cmd_data_write_register_values): Likewise.
730         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
731         (mips_fbsd_store_inferior_registers): Likewise.
732         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
733         (mips_fbsd_supply_gregs): Likewise.
734         (mips_fbsd_collect_fpregs): Likewise.
735         (mips_fbsd_collect_gregs): Likewise.
736         (mips_fbsd_supply_fpregset): Likewise.
737         (mips_fbsd_collect_fpregset): Likewise.
738         (mips_fbsd_supply_gregset): Likewise.
739         (mips_fbsd_collect_gregset): Likewise.
740         * mips-linux-nat.c (supply_gregset): Likewise.
741         (fill_gregset): Likewise.
742         (supply_fpregset): Likewise.
743         (fill_fpregset): Likewise.
744         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
745         (mips_fill_gregset): Likewise.
746         (mips_supply_fpregset): Likewise.
747         (mips_fill_fpregset): Likewise.
748         (mips64_supply_gregset): Likewise.
749         (micromips_linux_sigframe_validate): Likewise.
750         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
751         (mipsnbsd_fetch_inferior_registers): Likewise.
752         (mipsnbsd_store_inferior_registers): Likewise.
753         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
754         (mipsnbsd_supply_gregset): Likewise.
755         (mipsnbsd_iterate_over_regset_sections): Likewise.
756         (mipsnbsd_supply_reg): Likewise.
757         (mipsnbsd_supply_fpreg): Likewise.
758         * mips-tdep.c (mips_in_frame_stub): Likewise.
759         (mips_dummy_id): Likewise.
760         (is_octeon_bbit_op): Likewise.
761         (micromips_bc1_pc): Likewise.
762         (extended_mips16_next_pc): Likewise.
763         (mips16_next_pc): Likewise.
764         (deal_with_atomic_sequence): Likewise.
765         * moxie-tdep.c (moxie_process_readu): Likewise.
766         * nios2-tdep.c (nios2_get_next_pc): Likewise.
767         * nto-procfs.c (procfs_store_registers): Likewise.
768         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
769         (ppcfbsd_store_inferior_registers): Likewise.
770         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
771         (fetch_altivec_register): Likewise.
772         (get_spe_registers): Likewise.
773         (fetch_spe_register): Likewise.
774         (fetch_altivec_registers): Likewise.
775         (fetch_all_gp_regs): Likewise.
776         (fetch_all_fp_regs): Likewise.
777         (store_vsx_register): Likewise.
778         (store_altivec_register): Likewise.
779         (set_spe_registers): Likewise.
780         (store_spe_register): Likewise.
781         (store_altivec_registers): Likewise.
782         (store_all_gp_regs): Likewise.
783         (store_all_fp_regs): Likewise.
784         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
785         (ppc_linux_collect_gregset): Likewise.
786         (ppc_canonicalize_syscall): Likewise.
787         (ppc_linux_record_signal): Likewise.
788         (ppu2spu_prev_register): Likewise.
789         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
790         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
791         (ppcobsd_store_registers): Likewise.
792         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
793         Likewise.
794         (ppc_ravenscar_generic_store_registers): Likewise.
795         * procfs.c (procfs_fetch_registers): Likewise.
796         (procfs_store_registers): Likewise.
797         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
798         (ravenscar_store_registers): Likewise.
799         (ravenscar_prepare_to_store): Likewise.
800         * record-btrace.c (record_btrace_fetch_registers): Likewise.
801         * record-full.c (record_full_wait_1): Likewise.
802         (record_full_registers_change): Likewise.
803         (record_full_store_registers): Likewise.
804         (record_full_core_fetch_registers): Likewise.
805         (record_full_save): Likewise.
806         (record_full_goto_insn): Likewise.
807         * regcache.c (regcache_register_size): Likewise.
808         (get_regcache_arch): Remove.
809         (regcache_read_pc): Likewise.
810         * regcache.h (get_regcache_arch): Remove.
811         * remote-sim.c (gdbsim_fetch_register): Likewise.
812         (gdbsim_store_register): Likewise.
813         * remote.c (fetch_register_using_p): Likewise.
814         (send_g_packet): Likewise.
815         (remote_prepare_to_store): Likewise.
816         (store_registers_using_G): Likewise.
817         * reverse.c (save_bookmark_command): Likewise.
818         (goto_bookmark_command): Likewise.
819         * rs6000-aix-tdep.c (branch_dest): Likewise.
820         * rs6000-nat.c (rs6000_ptrace64): Likewise.
821         (fetch_register): Likewise.
822         * rs6000-tdep.c (ppc_supply_reg): Likewise.
823         (ppc_collect_reg): Likewise.
824         (ppc_collect_gregset): Likewise.
825         (ppc_collect_fpregset): Likewise.
826         (ppc_collect_vsxregset): Likewise.
827         (ppc_collect_vrregset): Likewise.
828         (ppc_displaced_step_hw_singlestep): Likewise.
829         (rs6000_pseudo_register_read): Likewise.
830         (rs6000_pseudo_register_write): Likewise.
831         * s390-linux-nat.c (supply_gregset): Likewise.
832         (fill_gregset): Likewise.
833         (s390_linux_fetch_inferior_registers): Likewise.
834         * s390-linux-tdep.c (s390_write_pc): Likewise.
835         (s390_software_single_step): Likewise.
836         (s390_all_but_pc_registers_record): Likewise.
837         (s390_linux_syscall_record): Likewise.
838         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
839         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
840         (shnbsd_store_inferior_registers): Likewise.
841         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
842         (sh_extract_return_value_fpu): Likewise.
843         (sh_store_return_value_nofpu): Likewise.
844         (sh_corefile_supply_regset): Likewise.
845         (sh_corefile_collect_regset): Likewise.
846         * sh64-tdep.c (sh64_extract_return_value): Likewise.
847         (sh64_store_return_value): Likewise.
848         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
849         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
850         (sparc_store_inferior_registers): Likewise.
851         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
852         (sparc_ravenscar_prepare_to_store): Likewise.
853         * sparc-tdep.c (sparc32_store_arguments): Likewise.
854         (sparc_analyze_control_transfer): Likewise.
855         (sparc_step_trap): Likewise.
856         (sparc_software_single_step): Likewise.
857         (sparc32_gdbarch_init): Likewise.
858         (sparc_supply_rwindow): Likewise.
859         (sparc_collect_rwindow): Likewise.
860         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
861         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
862         (sparc64nbsd_collect_gregset): Likewise.
863         (sparc64nbsd_supply_fpregset): Likewise.
864         (sparc64nbsd_collect_fpregset): Likewise.
865         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
866         (sparc64_supply_gregset): Likewise.
867         (sparc64_collect_gregset): Likewise.
868         (sparc64_supply_fpregset): Likewise.
869         (sparc64_collect_fpregset): Likewise.
870         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
871         * spu-tdep.c (spu_unwind_sp): Likewise.
872         (spu2ppu_prev_register): Likewise.
873         (spu_memory_remove_breakpoint): Likewise.
874         * stack.c (return_command): Likewise.
875         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
876         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
877         * tracefile.c (trace_save_ctf): Likewise.
878         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
879         (do_windows_store_inferior_registers): Likewise.
880         (windows_resume): Likewise.
881         * xtensa-linux-nat.c (fill_gregset): Likewise.
882         (supply_gregset_reg): Likewise.
883         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
884         (xtensa_register_read_masked): Likewise.
885         (xtensa_supply_gregset): Likewise.
886         (xtensa_extract_return_value): Likewise.
887         (xtensa_store_return_value): Likewise.
888
889 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
890
891         * doublest.c (floatformat_from_string): New function.
892         * doublest.h (floatformat_from_string): Add prototype.
893
894         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
895         (OP_FLOAT): ... this.
896         * expression.h: Do not include "doublest.h".
897         (union exp_element): Replace doubleconst and decfloatconst by
898         new element floatconst.
899         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
900         (ada_evaluate_subexp): Likewise.
901         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
902         OP_DOUBLE and OP_DECFLOAT.
903         * expprint.c (print_subexp_standard): Likewise.
904         (dump_subexp_body_standard): Likewise.
905         * breakpoint.c (watchpoint_exp_is_const): Likewise.
906
907         * parse.c: Include "dfp.h".
908         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
909         (write_exp_elt_floatcst): New function.
910         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
911         and OP_DECFLOAT.
912         (operator_check_standard): Likewise.
913         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
914         Return target format buffer instead of host DOUBLEST.
915         Use floatformat_from_string and decimal_from_string to parse
916         either binary or decimal floating-point types.
917         (parse_c_float): Remove.
918         * parser-defs.h: Do not include "doublest.h".
919         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
920         (write_exp_elt_floatcst): Add prototype.
921         (parse_float): Update prototype.
922         (parse_c_float): Remove.
923
924         * c-exp.y: Do not include "dfp.h".
925         (typed_val_float): Use byte buffer instead of DOUBLEST.
926         (typed_val_decfloat): Remove.
927         (DECFLOAT): Remove.
928         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
929         (parse_number): Update to new parse_float interface.
930         Parse suffixes and determine type before calling parse_float.
931         Handle decimal and binary FP types the same way.
932
933         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
934         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
935         (parse_number): Update to new parse_float interface.
936         Parse suffixes and determine type before calling parse_float.
937
938         * f-exp.y: Replace dval by typed_val_float.
939         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
940         (parse_number): Use parse_float instead of atof.
941
942         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
943         (parse_go_float): Remove.
944         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
945         (parse_number): Call parse_float instead of parse_go_float.
946         Parse suffixes and determine type before calling parse_float.
947
948         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
949         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
950         (parse_number): Update to new parse_float interface.
951         Parse suffixes and determine type before calling parse_float.
952
953         * m2-exp.y: Replace dval by byte buffer val.
954         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
955         (parse_number): Call parse_float instead of atof.
956
957         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
958         (lex_number): Call parse_float instead of strtod.
959         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
960         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
961         Use write_exp_elt_floatcst.
962         (unit_testing): Remove static variable.
963         (rust_type): Do not check unit_testing.
964         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
965
966         * ada-exp.y (type_float, type_double): Remove.
967         (typed_val_float): Use byte buffer instead of DOUBLEST.
968         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
969         * ada-lex.l (processReal): Use parse_float instead of sscanf.
970
971 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
972
973         * aarch64-tdep.h (enum aarch64_regnum): Remove.
974         * arch/aarch64.h: New file.
975
976 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
977
978         * dfp.h (decimal_from_string): Use const reference for argument.
979         * dfp.c (decimal_from_string): Likewise.
980
981 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
982
983         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
984         * sh64-tdep.c (sh64_do_fp_register): Likewise.
985         * mips-tdep.c (mips_print_fp_register): Likewise.
986
987 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
988
989         * common/format.h (enum argclass): Replace decfloat_arg by
990         dec32float_arg, dec64float_arg, and dec128float_arg.
991         * common/format.c (parse_format_string): Update to return
992         new decimal float argument classes.
993
994         * printcmd.c (printf_decfloat): Rename to ...
995         (printf_floating): ... this.  Add argclass argument, and use it
996         instead of parsing the format string again.  Add support for
997         binary floating-point values, using floatformat_to_string.
998         Convert value to the target format if it doesn't already match.
999         (ui_printf): Call printf_floating instead of printf_decfloat,
1000         also for double_arg / long_double_arg.  Pass argclass.
1001
1002         * dfp.c (decimal_to_string): Add format string argument.
1003         * dfp.h (decimal_to_string): Likewise.
1004
1005         * doublest.c (floatformat_to_string): Add format string argument.
1006         * doublest.h (floatformat_to_string): Likewise.
1007
1008 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1009
1010         * doublest.c (floatformat_precision): New routine.
1011         (floatformat_to_string): Likewise.
1012         * doublest.c (floatformat_to_string): Add prototype.
1013
1014         * printcmd.c (print_scalar_formatted): Only call print_floating
1015         on floating-point types.
1016         * valprint.c: Do not include "floatformat.h".
1017         (generic_val_print_decfloat): Remove.
1018         (generic_val_print): Call generic_val_print_float for both
1019         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1020         (print_floating): Use floatformat_to_string.  Handle decimal float.
1021         (print_decimal_floating): Remove, merge into floatformat_to_string.
1022         * value.h (print_decimal_floating): Remove.
1023
1024         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1025
1026 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1027
1028         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1029
1030 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1031
1032         * memattr.h: Don't include vec.h.
1033         (struct mem_attrib): Initialize fields.
1034         <unknown>: New static method.
1035         (struct mem_region): Add constructors, operator<, initialize
1036         fields.
1037         * memattr.c: Include algorithm.
1038         (default_mem_attrib, unknown_mem_attrib): Remove.
1039         (user_mem_region_list): New global.
1040         (target_mem_region_list, mem_region_list): Change type to
1041         std::vector<mem_region>.
1042         (mem_use_target): Now a function.
1043         (target_mem_regions_valid): Change type to bool.
1044         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1045         (require_user_regions): Adjust.
1046         (require_target_regions): Adjust.
1047         (create_mem_region): Adjust.
1048         (lookup_mem_region): Adjust.
1049         (invalidate_target_mem_regions): Adjust.
1050         (mem_clear): Rename to...
1051         (user_mem_clear): ... this, and adjust.
1052         (mem_command): Adjust.
1053         (info_mem_command): Adjust.
1054         (mem_enable, enable_mem_command, mem_disable,
1055         disable_mem_command): Adjust.
1056         (mem_delete): Adjust.
1057         (delete_mem_command): Adjust.
1058         * memory-map.h (parse_memory_map): Return an std::vector.
1059         * memory-map.c (parse_memory_map): Likewise.
1060         (struct memory_map_parsing_data): Add constructor.
1061         <memory_map>: Point to std::vector.
1062         (memory_map_start_memory): Adjust.
1063         (memory_map_end_memory): Adjust.
1064         (memory_map_end_property): Adjust.
1065         (clear_result): Remove.
1066         * remote.c (remote_memory_map): Return an std::vector.
1067         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1068         Remove.
1069         (target_debug_print_mem_region_vector): New.
1070         * target-delegates.c: Regenerate.
1071         * target.h (mem_region_vector): New typedef.
1072         (to_memory_map): Return mem_region_vector.
1073         (target_memory_map): Return an std::vector.
1074         * target.c (target_memory_map): Return an std::vector.
1075         (flash_erase_command): Adjust.
1076
1077 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1078
1079         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1080         Change type to std::string.
1081         (memory_map_start_property): Adjust.
1082         (memory_map_end_property): Adjust.
1083
1084 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1085
1086         * infrun.h: Include common/byte-vector.h.
1087         (struct displaced_step_closure): New struct.
1088         (struct buf_displaced_step_closure): New struct.
1089         * infrun.c (displaced_step_closure::~displaced_step_closure):
1090         Provide default implementation.
1091         (displaced_step_clear): Deallocate step closure with delete.
1092         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1093         (aarch64_displaced_step_closure): ... this, extend
1094         displaced_step_closure.
1095         (aarch64_displaced_step_data) <dsc>: Change type to
1096         aarch64_displaced_step_closure.
1097         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1098         unique_ptr.
1099         (aarch64_displaced_step_fixup): Add cast for displaced step
1100         closure.
1101         * amd64-tdep.c (displaced_step_closure): Rename to ...
1102         (amd64_displaced_step_closure): ... this, extend
1103         displaced_step_closure.
1104         <insn_buf>: Change type to std::vector<gdb_byte>.
1105         <max_len>: Remove.
1106         (fixup_riprel): Change type of DSC parameter, adjust to type
1107         change of insn_buf.
1108         (fixup_displaced_copy): Change type of DSC parameter.
1109         (amd64_displaced_step_copy_insn): Instantiate
1110         amd64_displaced_step_closure.
1111         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1112         to type change of insn_buf.
1113         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1114         parameter DSC.
1115         (arm_linux_copy_svc): Likewise.
1116         (cleanup_kernel_helper_return): Likewise.
1117         (arm_catch_kernel_helper_return): Likewise.
1118         (arm_linux_displaced_step_copy_insn): Instantiate
1119         arm_displaced_step_closure.
1120         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1121         (displaced_read_reg): Change type of parameter DSC.
1122         (branch_write_pc): Likewise.
1123         (load_write_pc): Likewise.
1124         (alu_write_pc): Likewise.
1125         (displaced_write_reg): Likewise.
1126         (arm_copy_unmodified): Likewise.
1127         (thumb_copy_unmodified_32bit): Likewise.
1128         (thumb_copy_unmodified_16bit): Likewise.
1129         (cleanup_preload): Likewise.
1130         (install_preload): Likewise.
1131         (arm_copy_preload): Likewise.
1132         (thumb2_copy_preload): Likewise.
1133         (install_preload_reg): Likewise.
1134         (arm_copy_preload_reg): Likewise.
1135         (cleanup_copro_load_store): Likewise.
1136         (install_copro_load_store): Likewise.
1137         (arm_copy_copro_load_store) Likewise.
1138         (thumb2_copy_copro_load_store): Likewise.
1139         (cleanup_branch): Likewise.
1140         (install_b_bl_blx): Likewise.
1141         (arm_copy_b_bl_blx): Likewise.
1142         (thumb2_copy_b_bl_blx): Likewise.
1143         (thumb_copy_b): Likewise.
1144         (install_bx_blx_reg): Likewise.
1145         (arm_copy_bx_blx_reg): Likewise.
1146         (thumb_copy_bx_blx_reg): Likewise.
1147         (cleanup_alu_imm): Likewise.
1148         (arm_copy_alu_imm): Likewise.
1149         (thumb2_copy_alu_imm): Likewise.
1150         (cleanup_alu_reg): Likewise.
1151         (install_alu_reg): Likewise.
1152         (arm_copy_alu_reg): Likewise.
1153         (thumb_copy_alu_reg): Likewise.
1154         (cleanup_alu_shifted_reg): Likewise.
1155         (install_alu_shifted_reg): Likewise.
1156         (arm_copy_alu_shifted_reg): Likewise.
1157         (cleanup_load): Likewise.
1158         (cleanup_store): Likewise.
1159         (arm_copy_extra_ld_st): Likewise.
1160         (install_load_store): Likewise.
1161         (thumb2_copy_load_literal): Likewise.
1162         (thumb2_copy_load_reg_imm): Likewise.
1163         (arm_copy_ldr_str_ldrb_strb): Likewise.
1164         (cleanup_block_load_all): Likewise.
1165         (cleanup_block_store_pc): Likewise.
1166         (cleanup_block_load_pc): Likewise.
1167         (arm_copy_block_xfer): Likewise.
1168         (thumb2_copy_block_xfer): Likewise.
1169         (cleanup_svc): Likewise.
1170         (install_svc): Likewise.
1171         (arm_copy_svc): Likewise.
1172         (thumb_copy_svc): Likewise.
1173         (arm_copy_undef): Likewise.
1174         (thumb_32bit_copy_undef): Likewise.
1175         (arm_copy_unpred): Likewise.
1176         (arm_decode_misc_memhint_neon): Likewise.
1177         (arm_decode_unconditional): Likewise.
1178         (arm_decode_miscellaneous): Likewise.
1179         (arm_decode_dp_misc): Likewise.
1180         (arm_decode_ld_st_word_ubyte): Likewise.
1181         (arm_decode_media): Likewise.
1182         (arm_decode_b_bl_ldmstm): Likewise.
1183         (arm_decode_ext_reg_ld_st): Likewise.
1184         (thumb2_decode_dp_shift_reg): Likewise.
1185         (thumb2_decode_ext_reg_ld_st): Likewise.
1186         (arm_decode_svc_copro): Likewise.
1187         (thumb2_decode_svc_copro): Likewise.
1188         (install_pc_relative): Likewise.
1189         (thumb_copy_pc_relative_16bit): Likewise.
1190         (thumb_decode_pc_relative_16bit): Likewise.
1191         (thumb_copy_pc_relative_32bit): Likewise.
1192         (thumb_copy_16bit_ldr_literal): Likewise.
1193         (thumb_copy_cbnz_cbz): Likewise.
1194         (thumb2_copy_table_branch): Likewise.
1195         (cleanup_pop_pc_16bit_all): Likewise.
1196         (thumb_copy_pop_pc_16bit): Likewise.
1197         (thumb_process_displaced_16bit_insn): Likewise.
1198         (decode_thumb_32bit_ld_mem_hints): Likewise.
1199         (thumb_process_displaced_32bit_insn): Likewise.
1200         (thumb_process_displaced_insn): Likewise.
1201         (arm_process_displaced_insn): Likewise.
1202         (arm_displaced_init_closure): Likewise.
1203         (arm_displaced_step_fixup): Add cast for closure.
1204         * arm-tdep.h: Include infrun.h.
1205         (displaced_step_closure): Rename to ...
1206         (arm_displaced_step_closure): ... this, extend
1207         displaced_step_closure.
1208         <u::svc::copy_svc_os>: Change type of parameter DSC.
1209         <cleanup>: Likewise.
1210         (arm_process_displaced_insn): Likewise.
1211         (arm_displaced_init_closure): Likewise.
1212         (displaced_read_reg): Likewise.
1213         (displaced_write_reg): Likewise.
1214         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1215         Adjust.
1216         * i386-tdep.h: Include infrun.h.
1217         (i386_displaced_step_closure): New typedef.
1218         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1219         i386_displaced_step_closure.
1220         (i386_displaced_step_fixup): Adjust.
1221         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1222         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1223         and unique_ptr.
1224         (ppc_displaced_step_fixup): Adjust.
1225         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1226         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1227         and unique_ptr.
1228         (s390_displaced_step_fixup): Adjust.
1229
1230 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1231
1232         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1233         Remove declarations.
1234
1235 2017-10-20  Tom Tromey  <tom@tromey.com>
1236
1237         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1238         std::vector.
1239         (gdb_bfd_record_inclusion): Update.
1240         (bfdp): Remove typedef.
1241
1242 2017-10-20  Tom Tromey  <tom@tromey.com>
1243
1244         * gdb_bfd.c (gdb_bfd_ref): Use new.
1245         (struct gdb_bfd_data): Add constructor, destructor, and member
1246         initializers.
1247         (gdb_bfd_unref): Use delete.
1248
1249 2017-10-20  Tom Tromey  <tom@tromey.com>
1250
1251         * exec.c (exec_file_attach): Use new_bfd_ref.
1252         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1253         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1254         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1255         new_bfd_ref.
1256         * gdb_bfd.h (new_bfd_ref): New function.
1257
1258 2017-10-20  Pedro Alves  <palves@redhat.com>
1259
1260         * main.c (captured_command_loop): Add attribute noinline.
1261
1262 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1263
1264         * interps.c (struct interp_factory): Add constructor.
1265         (interp_factory_p): Remove typedef.
1266         (DEF_VEC_P(interp_factory_p)): Remove.
1267         (interpreter_factories): Change type to std::vector.
1268         (interp_factory_register): Adjust.
1269         (interp_lookup): Adjust.
1270         (interpreter_completer): Adjust.
1271
1272 2017-10-19  Tom Tromey  <tom@tromey.com>
1273
1274         * break-catch-syscall.c (catch_syscall_completer): Use
1275         std::string, gdb::unique_xmalloc_ptr.
1276
1277 2017-10-19  Tom Tromey  <tom@tromey.com>
1278
1279         * infcall.c (call_function_by_hand_dummy): Use std::string.
1280
1281 2017-10-19  Tom Tromey  <tom@tromey.com>
1282
1283         * mi/mi-main.c (mi_cmd_execute): Update.
1284         * top.h (prepare_execute_command): Return scoped_value_mark.
1285         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1286         Add move constructor.
1287         * top.c (prepare_execute_command): Return scoped_value_mark.
1288         (execute_command): Update.
1289
1290 2017-10-19  Pedro Alves  <palves@redhat.com>
1291
1292         * xml-support.c (xml_fetch_content_from_file): Check fread's
1293         return.
1294
1295 2017-10-19  Pedro Alves  <palves@redhat.com>
1296
1297         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1298         async.
1299         (handle_error_fd): New function.
1300         (ser_base_async): Add/delete an event loop file handler for
1301         error_fd.
1302
1303 2017-10-19  Pedro Alves  <palves@redhat.com>
1304
1305         * xml-support.c (xml_fetch_content_from_file): Don't read in
1306         chunks.  Instead use fseek to determine the file's size, and read
1307         it in one go.
1308
1309 2017-11-18  Keith Seitz  <keiths@redhat.com>
1310
1311         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1312         types.
1313         Add whitespace to front of type name.
1314
1315 2017-10-18  Keith Seitz  <keiths@redhat.com>
1316
1317         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1318         DW_AT_accessibility.
1319
1320 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1321
1322         * features/tic6x-c62x-linux.c: Remove.
1323
1324 2017-10-17  Tom Tromey  <tom@tromey.com>
1325
1326         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1327         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1328         (do_mixed_source_and_assembly): Likewise.
1329
1330 2017-10-17  Tom Tromey  <tom@tromey.com>
1331
1332         * regcache.c (regcache::xfer_part): Remove assertion.
1333
1334 2017-10-17  Pedro Alves  <palves@redhat.com>
1335
1336         * xml-support.c (xml_fetch_content_from_file): Call
1337         unique_ptr::release() instead unique_ptr::get() when passing
1338         through xrealloc.
1339
1340 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1341
1342         * regcache.c (regcache::xfer_part): Remove parameters read and
1343         write, add parameter is_raw.  All callers are updated.
1344
1345 2017-10-16  Keith Seitz  <keiths@redhat.com>
1346
1347         * c-typeprint.c (enum access_specifier): Moved here from
1348         c_type_print_base.
1349         (output_access_specifier): New function.
1350         (c_type_print_base): Consider typedefs when assessing
1351         whether access labels are needed.
1352         Use output_access_specifier as needed.
1353         Output access specifier for typedefs, if needed.
1354         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1355         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1356         fields.
1357         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1358         accessor macros.
1359
1360 2017-10-16  Tom Tromey  <tom@tromey.com>
1361
1362         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1363         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1364         * target.c (target_fileio_read_stralloc): Update.
1365         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1366         * target.h (target_fileio_read_stralloc): Return
1367         unique_xmalloc_ptr.
1368
1369 2017-10-16  Tom Tromey  <tom@tromey.com>
1370
1371         * xml-syscall.c (xml_init_syscalls_info): Update.
1372         * xml-support.c (xinclude_start_include): Update.
1373         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1374         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1375         (xml_fetch_content_from_file): Likewise.
1376         * osdata.c (get_osdata): Update.
1377         * target.h (target_read_stralloc, target_get_osdata): Return
1378         unique_xmalloc_ptr.
1379         * solib-aix.c (solib_aix_get_library_list): Update.
1380         * solib-target.c (solib_target_current_sos): Update.
1381         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1382         * xml-tdesc.c (fetch_available_features_from_target): Update.
1383         (target_fetch_description_xml): Update.
1384         (file_read_description_xml): Update.
1385         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1386         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1387         (remote_pid_to_exec_file): Update.
1388         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1389         (target_get_osdata): Likewise.
1390
1391 2017-10-16  Tom Tromey  <tom@tromey.com>
1392
1393         * remote.c (remote_register_number_and_offset): Use std::vector.
1394         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1395         (putpkt_binary): Use gdb::def_vector.
1396         (compare_sections_command): Use gdb::byte_vector.
1397
1398 2017-10-16  Tom Tromey  <tom@tromey.com>
1399
1400         * ppc-linux-nat.c (hwdebug_insert_point): Use
1401         gdb::unique_xmalloc_ptr, XDUP.
1402
1403 2017-10-16  Tom Tromey  <tom@tromey.com>
1404
1405         * probe.c (parse_probes): Use std::string.
1406         (info_probes_for_ops, enable_probes_command)
1407         (disable_probes_command): Remove cleanups.
1408
1409 2017-10-16  Tom Tromey  <tom@tromey.com>
1410
1411         * buildsym.c (block_compar): Remove.
1412         (end_symtab_get_static_block): Use std::vector.
1413
1414 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1415
1416         * memrange.h (struct mem_range): Define operator< and operator==.
1417         (mem_range_s): Remove.
1418         (DEF_VEC_O (mem_range_s)): Remove.
1419         (normalize_mem_ranges): Change parameter type to std::vector.
1420         * memrange.c (compare_mem_ranges): Remove.
1421         (normalize_mem_ranges): Change parameter type to std::vector,
1422         adjust to vector change.
1423         * exec.c (section_table_available_memory): Return vector, remove
1424         parameter.
1425         (section_table_read_available_memory): Adjust to std::vector
1426         change.
1427         * remote.c (remote_read_bytes): Adjust to std::vector
1428         change.
1429         * tracepoint.h (traceframe_available_memory): Change parameter
1430         type to std::vector.
1431         * tracepoint.c (traceframe_available_memory): Change parameter
1432         type to std::vector, adjust.
1433         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1434         std::vector change.
1435         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1436         unittests/memrange-selftests.c.
1437         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1438         * gdb/unittests/memrange-selftests.c: New file.
1439
1440 2017-10-16  Pedro Alves  <palves@redhat.com>
1441
1442         * elfread.c (probe_key_free): Rename range-for variable.
1443         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1444         (find_probe_by_pc, collect_probes): Rename range-for variable.
1445
1446 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1447
1448         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1449         * features/tic6x-c62x.c: Remove.
1450         * features/tic6x-c64x-linux.c: Remove.
1451         * features/tic6x-c64x.c: Remove.
1452         * features/tic6x-c64xp-linux.c: Remove.
1453         * features/tic6x-c64xp.c: Remove.
1454         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1455         initialize_tdesc_tic6x_*_linux functions.
1456         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1457         initialize_tdesc_tic6x_* functions.
1458
1459 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1460
1461         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1462         tic6x-c62x.
1463         * regformats/tic6x-c62x.dat: Remove.
1464         * regformats/tic6x-c64x.dat: Remove.
1465         * regformats/tic6x-c64xp.dat: Remove.
1466
1467 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1468
1469         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1470         (the !HAVE_LIBEXPAT version).
1471
1472 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1473
1474         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1475         const.
1476
1477 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1478
1479         * target.h: Include tracepoint.h.
1480         (enum trace_find_type): Move to tracepoint.h.
1481         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1482         * tracepoint.h: Don't include target.h
1483         (enum trace_find_type): Move from target.h.
1484         (parse_traceframe_info): Return a unique ptr.
1485         * tracepoint.c (current_traceframe_info): Change type to unique
1486         ptr.
1487         (free_traceframe_info): Remove.
1488         (clear_traceframe_info): Don't manually free
1489         current_traceframe_info.
1490         (free_result): Remove.
1491         (parse_traceframe_info): Return a unique ptr.
1492         (get_traceframe_info): Adjust to unique ptr.
1493         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1494         * remote.c (remote_traceframe_info): Return a unique ptr.
1495         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1496         ptr.
1497         * target-debug.h (target_debug_print_traceframe_info_up): New
1498         macro.
1499         * target-delegates.c: Regenerate.
1500
1501 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1502
1503         * memrange.h (struct mem_range): Add constructors.
1504         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1505         std::vector<mem_range>.
1506         * tracepoint.c (free_traceframe_info): Don't manually free
1507         vector.
1508         (traceframe_info_start_memory): Adjust to vector change.
1509         (traceframe_available_memory): Likewise.
1510         * tracefile-tfile.c (build_traceframe_info): Likewise.
1511         * ctf.c (ctf_traceframe_info): Likewise.
1512
1513 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1514
1515         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1516         std::vector<int>.
1517         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1518         (traceframe_info_start_tvar): Adjust to vector change.
1519         (parse_traceframe_info): Allocate with new.
1520         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1521         vector change.
1522         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1523         change.
1524         tfile_traceframe_info): Allocate with new.
1525         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1526         change.
1527
1528 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1529
1530         * tracepoint.c (traceframe_info): Rename to...
1531         (current_traceframe_info): ...this.
1532         (clear_traceframe_info): Adjust.
1533         (get_traceframe_info): Adjust.
1534
1535 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1536
1537         * nat/linux-osdata.c: Include algorithm.
1538         (compare_processes): Remove.
1539         (struct pid_pgid_entry): New struct.
1540         (linux_xfer_osdata_processgroups): Use std::vector instead of
1541         XNEWVEC.
1542
1543 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1544
1545         * objfiles.h: Don't include symfile.h.
1546         (struct partial_symbol): Remove forward-declaration.
1547         (struct objfile) <global_psymbols, static_psymbols>: Change type
1548         to std::vector<partial_symbol *>.
1549         * objfiles.c (objfile::objfile): Don't memset those fields.
1550         (objfile::~objfile): Don't free those fields.
1551         * psympriv.h (struct psymbol_allocation_list): Remove
1552         forward-declaration.
1553         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1554         to std::vector.
1555         (start_psymtab_common): Change parameters to std::vector.
1556         * psymtab.c: Include algorithm.
1557         (require_partial_symbols): Call shrink_to_fit.
1558         (find_pc_sect_psymbol): Adjust to vector change.
1559         (match_partial_symbol): Likewise.
1560         (lookup_partial_symbol): Likewise.
1561         (psym_relocate): Likewise.
1562         (dump_psymtab): Likewise.
1563         (recursively_search_psymtabs): Likewise.
1564         (compare_psymbols): Remove.
1565         (sort_pst_symbols): Adjust to vector change.
1566         (start_psymtab_common): Likewise.
1567         (end_psymtab_common): Likewise.
1568         (psymbol_bcache_full): De-constify return value.
1569         (add_psymbol_to_bcache): Likewise.
1570         (extend_psymbol_list): Remove.
1571         (append_psymbol_to_list): Adjust to vector change.
1572         (add_psymbol_to_list): Likewise.
1573         (init_psymbol_list): Likewise.
1574         (maintenance_info_psymtabs): Likewise.
1575         (maintenance_check_psymtabs): Likewise.
1576         * symfile.h (struct psymbol_allocation_list): Remove.
1577         * symfile.c (reread_symbols): Adjust to vector change.
1578         * dbxread.c (start_psymtab): Change type of parameters.
1579         (dbx_symfile_read): Adjust to vector change.
1580         (read_dbx_symtab): Likewise.
1581         (start_psymtab): Change type of parameters.
1582         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1583         (create_partial_symtab): Likewise.
1584         (add_partial_symbol): Likewise.
1585         (write_one_signatured_type): Likewise.
1586         (recursively_write_psymbols): Likewise.
1587         * mdebugread.c (parse_partial_symbols): Likewise.
1588         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1589         (scan_xcoff_symtab): Adjust to vector change.
1590         (xcoff_initial_scan): Likewise.
1591
1592 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1593
1594         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1595
1596 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1597
1598         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1599         Remove s390x-*-expedite, add s390x-expedite.
1600
1601 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1602
1603         * features/s390-gs-linux64.c: Regenerated.
1604         * features/s390x-gs-linux64.c: Regenerated.
1605
1606 2017-10-13  Tom Tromey  <tom@tromey.com>
1607
1608         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1609         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1610         delete.
1611         * symfile.c (symbol_file_add_with_addrs): Use new.
1612         (symbol_file_add_separate): Update comment.
1613         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1614         * jit.c (jit_object_close_impl): Use new.
1615         (jit_unregister_code): Use delete.
1616         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1617         (~objfile): Rename from free_objfile.
1618         (free_objfile_separate_debug, do_free_objfile_cleanup)
1619         (free_all_objfiles, objfile_purge_solibs): Use delete.
1620         * objfiles.h (struct objfile): Add constructor and destructor.
1621         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1622         (allocate_objfile, free_objfile): Don't declare.
1623         (struct objstats): Add initializers.
1624
1625 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1626
1627         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1628         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1629         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1630         * gdbarch.h: Regenerate.
1631         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1632         Adjust comment.
1633         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1634         (i386_displaced_step_fixup): Adjust comment.
1635         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1636
1637 2017-10-12  Tom Tromey  <tom@tromey.com>
1638
1639         * prologue-value.h (pv_area::store_would_trash): Return bool.
1640         (pv_area::find_reg): Likewise.
1641         * prologue-value.c (pv_area::store_would_trash): Return bool.
1642         (pv_area::find_reg): Likewise.
1643
1644 2017-10-12  Tom Tromey  <tom@tromey.com>
1645
1646         * s390-linux-tdep.c (s390_store, s390_load)
1647         (s390_check_for_saved, s390_analyze_prologue): Update.
1648         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1649         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1650         * prologue-value.h (class pv_area): Move from prologue-value.c.
1651         Change names of members.  Add constructor, destructor, member
1652         functions.
1653         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1654         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1655         (pv_area_fetch, pv_area_scan): Don't declare.
1656         * prologue-value.c (struct pv_area::area_entry): Now member of
1657         pv_area.
1658         (struct pv_area): Move to prologue-value.h.
1659         (pv_area::pv_area): Rename from make_pv_area.
1660         (pv_area::~pv_area): Rename from free_pv_area.
1661         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1662         (clear_entries, find_entry, overlaps, store_would_trash, store)
1663         (fetch, find_reg, scan): Now member of pv_area.
1664         Remove "area" argument.  Update.
1665         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1666         Update.
1667         * mn10300-tdep.c (push_reg, check_for_saved)
1668         (mn10300_analyze_prologue): Update.
1669         * mep-tdep.c (is_arg_spill, check_for_saved)
1670         (mep_analyze_prologue): Update.
1671         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1672         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1673         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1674         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1675         Update.
1676         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1677         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1678
1679 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1680
1681         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1682         * linux-nat.c (linux_nat_delete_thread): New variable.
1683         (lwp_free): Invoke linux_nat_delete_thread if set.
1684         (linux_nat_set_delete_thread): New function.
1685         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1686         thread delete callback.
1687         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1688         (_initialize_arm_linux_nat): Assign thread delete callback.
1689         * s390-linux-nat.c (s390_delete_thread): New function.
1690         (_initialize_s390_nat): Assign thread delete callback.
1691         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1692         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1693         function.
1694         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1695         declaration.
1696         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1697         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1698
1699 2017-10-09  Tom Tromey  <tom@tromey.com>
1700
1701         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1702         std::string.
1703         * tui/tui-layout.c (enum tui_status): Use std::string.
1704
1705 2017-10-11  Tom Tromey  <tom@tromey.com>
1706
1707         * gdbthread.h (thread_command): Constify.
1708         * inferior.h (detach_command): Constify.
1709         * top.h (set_history, show_history): Constify.
1710         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1711         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1712         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1713         * printcmd.c (set_command): Constify.
1714         (non_const_set_command): New function.
1715         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1716         * breakpoint.c (enable_command, disable_command, delete_command)
1717         (catch_command, tcatch_command, set_breakpoint_cmd)
1718         (show_breakpoint_cmd): Constify.
1719         * macrocmd.c (macro_command): Constify.
1720         * infcmd.c (unset_command, kill_command, detach_command)
1721         (info_proc_cmd): Constify.
1722         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1723         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1724         (info_auto_load_cmd): Constify.
1725         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1726         (unset_tdesc_cmd): Constify.
1727         * ada-lang.c (set_ada_command, show_ada_command)
1728         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1729         * guile/guile.c (set_guile_command, show_guile_command)
1730         (info_guile_command): Constify.
1731         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1732         Constify.
1733         * skip.c (skip_command): Constify.
1734         * compile/compile.c (_initialize_compile): Constify.
1735         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1736         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1737         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1738         (maint_btrace_pt_show_cmd): Constify.
1739         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1740         Constify.
1741         * python/python.c (user_show_python, user_set_python): Constify.
1742         * mips-tdep.c (set_mips_command, show_mips_command)
1743         (set_mipsfpu_command): Constify.
1744         * record-btrace.c (cmd_record_btrace_start)
1745         (cmd_set_record_btrace, cmd_show_record_btrace)
1746         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1747         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1748         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1749         Constify.
1750         * symfile.c (overlay_command): Constify.
1751         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1752         * cli/cli-logging.c (set_logging_command, show_logging_command):
1753         Constify.
1754         * cli/cli-dump.c (dump_command, append_command)
1755         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1756         (tekhex_dump_command, binary_dump_command)
1757         (binary_append_command): Constify.
1758         * cli/cli-decode.c (struct cmd_list_element): Change type of
1759         "fun".
1760         * cli/cli-cmds.c (info_command, show_command, set_debug)
1761         (show_debug): Constify.
1762         (show_command): Add non-const overload.
1763         * top.c (set_history, show_history): Constify.
1764         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1765         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1766         * target.c (target_command): Constify.
1767         * sparc64-tdep.c (info_adi_command): Constify.
1768         * record-full.c (cmd_record_full_start): Constify.
1769         (set_record_full_command): Constify.  Fix typo.
1770         (show_record_full_command): Constify.
1771         * thread.c (thread_command, thread_apply_command): Constify.
1772         * memattr.c (dummy_cmd): Constify.
1773         * value.c (function_command): Constify.
1774         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1775         * probe.c (info_probes_command): Constify.
1776         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1777         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1778         (show_thread_cmd, set_thread_default_cmd)
1779         (show_thread_default_cmd): Constify.
1780         (check_empty): Constify.
1781         * tracepoint.c (tfind_command): Constify.
1782         * cp-support.c (maint_cplus_command): Constify.
1783         * windows-tdep.c (info_w32_command): Constify.
1784         * record.c (cmd_record_start, set_record_command)
1785         (show_record_command, info_record_command, cmd_record_goto):
1786         Constify.
1787         * ravenscar-thread.c (set_ravenscar_command)
1788         (show_ravenscar_command): Constify.
1789         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1790         Constify.
1791         (add_internal_problem_command): Remove casts.
1792         * arc-tdep.c (maintenance_print_arc_command): Constify.
1793         * valprint.c (set_print, show_print, set_print_raw)
1794         (show_print_raw): Constify.
1795         * maint.c (maintenance_command, maintenance_info_command)
1796         (maintenance_print_command, maintenance_set_cmd)
1797         (maintenance_show_cmd, set_per_command_cmd)
1798         (show_per_command_cmd, maintenance_check_command): Constify.
1799         * language.c (set_check, show_check): Constify.
1800         * typeprint.c (show_print_type, set_print_type): Constify.
1801         * go32-nat.c (go32_info_dos_command): Constify.
1802
1803 2017-10-11  Tom Tromey  <tom@tromey.com>
1804
1805         * breakpoint.c (prepare_re_set_context): Remove.
1806         (breakpoint_re_set_one): Update.  Don't use cleanups.
1807         (breakpoint_re_set): Use scoped_restore, std::string, and
1808         scoped_restore_current_language.
1809
1810 2017-10-11  Tom Tromey  <tom@tromey.com>
1811
1812         * breakpoint.c (commands_command_1): Use std::string.
1813         (cleanup_executing_breakpoints): Remove.
1814         (bpstat_do_actions_1): Use scoped_restore.
1815         (bpstat_check_watchpoint): Use std::string.
1816         (decode_static_tracepoint_spec): Likewise.
1817         (break_range_command): Likewise.
1818         (watch_command_1): Likewise.
1819         (compare_breakpoints): Change argument types.
1820         (clear_command): Use std::vector.
1821         (cleanup_executing_breakpoints): Remove.
1822         (update_global_location_list): Use unique_xmalloc_ptr.
1823         (strace_command): Remove unused declaration.
1824
1825 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1826
1827         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1828         * NEWS: Mention new FreeBSD/arm native configuration.
1829         * configure.host: Add arm*-*-freebsd*.
1830         * configure.nat: Likewise.
1831         * arm-fbsd-nat.c: New file.
1832
1833 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1834
1835         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1836         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1837         * NEWS: Mention new FreeBSD/arm target.
1838         * configure.tgt: Add arm*-*-freebsd*.
1839         * arm-fbsd-tdep.c: New file.
1840         * arm-fbsd-tdep.h: New file.
1841
1842 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1843
1844         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1845         `gdbarch_elfcore_write_linux_prpsinfo'.
1846         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1847         method.
1848         (elf_internal_linux_prpsinfo): Remove declaration.
1849         * gdbarch.h: Regenerate.
1850         * gdbarch.c: Regenerate.
1851
1852 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1853
1854         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1855         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1856
1857 2017-10-11  Pedro Alves  <palves@redhat.com>
1858
1859         * breakpoint.c (reattach_breakpoints): Delete.
1860         * breakpoint.h (reattach_breakpoints): Delete.
1861
1862 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1863
1864         * symfile.c (registered_sym_fns): Make struct, not typedef.
1865         (DEF_VEC_O (registered_sym_fns)): Remove.
1866         (symtab_fns): Change type to std::vector.
1867         (add_symtab_fns): Adjust.
1868         (find_sym_fns): Adjust.
1869
1870 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1871
1872         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1873         * arc-tdep.h (arc_arch_is_em): New function.
1874         (arc_arch_is_hs): Likewise.
1875
1876 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1877
1878         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1879         parentheses in the declaration.
1880         (macro_lookup_inclusion): Likewise.
1881         (macro_lookup_definition): Likewise.
1882         * p-lang.h (pascal_builtin_types): Likewise.
1883         * tui/tui-data.c (tui_win_list): Likewise.
1884         * tui/tui-data.h (tui_win_list): Likewise.
1885         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1886
1887 2017-10-11  Mark Rages  <markrages@gmail.com>
1888
1889         * target-memory.c (block_boundaries): Fix for block address not
1890         aligned on block size.
1891
1892 2017-10-10  Pedro Alves <palves@redhat.com>
1893             Tom Tromey  <tom@tromey.com>
1894
1895         * breakpoint.c (struct captured_breakpoint_query_args)
1896         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1897         (print_breakpoint): New.
1898         * breakpoint.h (print_breakpoint): Declare.
1899         * common/common-exceptions.h (enum return_reason): Remove
1900         references to catch_exceptions.
1901         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1902         Delete.
1903         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1904         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1905         * gdb.h: Delete.
1906         * gdbthread.h (thread_select): Declare.
1907         * mi/mi-cmd-break.c: Don't include gdb.h.
1908         (breakpoint_notify): Use print_breakpoint.
1909         * mi/mi-cmd-catch.c: Don't include gdb.h.
1910         * mi/mi-interp.c: Don't include gdb.h.
1911         (mi_print_breakpoint_for_event): New.
1912         (mi_breakpoint_created, mi_breakpoint_modified): Use
1913         mi_print_breakpoint_for_event.
1914         * mi/mi-main.c: Don't include gdb.h.
1915         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1916         thread_select instead of gdb_thread_select.
1917         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1918         of using gdb_list_thread_ids.
1919         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1920         FILEIO_ENOSYS here.
1921         (remote_fileio_request): Use TRY/CATCH instead of
1922         catch_exceptions.
1923         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1924         (symbol_file_add_from_memory_wrapper): Delete.
1925         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1926         * thread.c: Don't include gdb.h.
1927         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1928         (thread_alive): Use thread_select.
1929         (do_captured_thread_select): Delete, parts salvaged as ...
1930         (thread_select): ... this new function.
1931         (gdb_thread_select): Delete.
1932
1933 2017-10-10  Pedro Alves  <palves@redhat.com>
1934             Tom Tromey  <tom@tromey.com>
1935
1936         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1937         and reverse logic.
1938         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1939         No longer macros.  Instead ...
1940         (enum wp_check_result): They're now values of this new
1941         enumeration.
1942         (watchpoint_check): Change return type to wp_check_result and
1943         parameter type to bpstat.
1944         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1945         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1946         catch_errors.  Reverse logic of watchpoint_check call.
1947         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1948         pointer as parameter.
1949         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1950         * common/common-exceptions.c (throw_exception_sjlj): Update
1951         comments to avoid mentioning catch_errors.
1952         * exceptions.c (catch_errors): Delete.
1953         * exceptions.h: Update comments to avoid mentioning catch_errors.
1954         (catch_errors_ftype, catch_errors): Delete.
1955         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1956         (hook_stop_stub): Delete.
1957         (restore_selected_frame): Change return type to void, and
1958         parameter type to const frame_id &.
1959         (restore_infcall_control_state): Use TRY/CATCH instead of
1960         catch_errors.
1961         * main.c (captured_command_loop): Return void and remove
1962         parameter.  Remove references to catch_errors.
1963         (captured_main): Use TRY/CATCH instead of catch_errors.
1964         * objc-lang.c (objc_submethod_helper_data)
1965         (find_objc_msgcall_submethod_helper): Delete.
1966         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1967         catch_errors.
1968         * record-full.c (record_full_message): Return void.
1969         (record_full_message_args, record_full_message_wrapper): Delete.
1970         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1971         instead of catch_errors.
1972         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1973         parameter type to int.
1974         * solib-darwin.c (open_symbol_file_object): Ditto.
1975         * solib-dsbt.c (open_symbol_file_object): Ditto.
1976         * solib-frv.c (open_symbol_file_object): Ditto.
1977         * solib-svr4.c (open_symbol_file_object): Ditto.
1978         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1979         * solib.c (update_solib_list): Use TRY/CATCH instead of
1980         catch_errors.
1981         * solist.h (struct target_so_ops) <open_symbol_file_object>:
1982         Change type.
1983         * symmisc.c (struct print_symbol_args): Remove.
1984         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1985         (print_symbol): Change type.
1986         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1987         and remove parameters.
1988         (catch_errors): New.
1989         (get_windows_debug_event): Adjust.
1990
1991 2017-10-09  Tom Tromey  <tom@tromey.com>
1992
1993         * mi/mi-main.c (free_splay_tree): Remove.
1994         (list_available_thread_groups): Use splay_tree_up.
1995         * common/gdb_splay_tree.h: New file.
1996
1997 2017-10-09  Tom Tromey  <tom@tromey.com>
1998
1999         * mi/mi-main.c (do_nothing): Remove.
2000         (list_available_thread_groups): Update.
2001
2002 2017-10-09  Pedro Alves  <palves@redhat.com>
2003
2004         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2005         reading registers when switching context.
2006
2007 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2008
2009         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2010         (fbsd_convert_siginfo): Likewise.
2011         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2012
2013 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2014
2015         * configure.ac (try_guile_versions): Remove guile-2.2.
2016         * configure: Regenerate.
2017
2018 2017-10-09  Tom Tromey  <tom@tromey.com>
2019
2020         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2021         (COMPILE.pre): Use $(CXX).
2022
2023 2017-10-09  Pedro Alves  <palves@redhat.com>
2024
2025         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2026         Use bool.
2027         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2028         * cp-support.h (cp_remove_params): Now returns a
2029         gdb::unique_xmalloc_ptr.
2030         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2031         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2032         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2033         returning a gdb::unique_xmalloc_ptr.
2034         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2035         * stack.c (find_frame_funname): Adjust to cp_remove_params
2036         returning a gdb::unique_xmalloc_ptr.
2037
2038 2017-10-08  Tom Tromey  <tom@tromey.com>
2039
2040         * dwarf2read.c (dwarf2_get_dwz_file): Use
2041         gdb::unique_xmalloc_ptr.
2042         (find_slot_in_mapped_hash): Likewise.
2043         (dwarf2_physname): Likewise.
2044         (create_dwo_unit_in_dwp_v1): Use std::string.
2045         (create_dwo_unit_in_dwp_v2): Likewise.
2046         (lookup_dwo_cutu): Likewise.
2047         (inherit_abstract_dies): Use std::vector.
2048         (read_array_type): Likewise.
2049         (dwarf_decode_macros): Remove unused declaration.
2050         (unsigned_int_compar): Remove.
2051         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2052         (psymtabs_addrmap_cleanup): Remove.
2053
2054 2017-10-08  Tom Tromey  <tom@tromey.com>
2055
2056         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2057         * frame.h (frame_cleanup_after_sniffer): Declare.
2058         (frame_prepare_for_sniffer): Return void.
2059         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2060         type of argument.
2061         (frame_prepare_for_sniffer): Return void.
2062
2063 2017-10-08  Tom Tromey  <tom@tromey.com>
2064
2065         * utils.h (make_cleanup_value_free): Remove.
2066         * utils.c (do_value_free, struct cleanup): Remove.
2067         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2068         Use gdb_value_up.
2069         * value.h (struct value_deleter): New.
2070         (gdb_value_up): New typedef.
2071
2072 2017-10-08  Tom Tromey  <tom@tromey.com>
2073
2074         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2075         (make_cleanup_free_search_symbols): Remove.
2076         (search_symbols): Return std::vector.
2077         (symbol_search::compare_search_syms): Now member of
2078         symbol_search.  Change arguments.
2079         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2080         (symtab_symbol_info, rbreak_command): Update.
2081         * symtab.h (struct symbol_search) <next>: Remove.
2082         Add constructors.
2083         (symbol_search::operator<): New function.
2084         (symbol_search::operator==): New function.
2085         (search_symbols): Remove std::vector.
2086         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2087         (symbol_search::compare_search_syms): Declare.
2088
2089 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2090
2091         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2092         arch/aarch64-insn.o.
2093         Remove one rule.
2094         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2095
2096 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2097
2098         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2099         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2100         arch/arm-linux.o respectively.
2101         * configure.tgt: Likewise.
2102
2103 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2104
2105         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2106         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2107
2108 2017-10-06  Pedro Alves  <palves@redhat.com>
2109
2110         * windows-nat.c: Include <algorithm>.
2111
2112 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2113
2114         * configure.tgt (i386_tobjs): New variable.
2115         (amd64_tobjs): New variable.
2116         Set $cpu_obs and $os_obs.
2117
2118 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2119
2120         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2121         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2122         (clean): Remove object files and dependency files.
2123         (distclean): Remove the directory.
2124         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2125         * configure: Re-generated.
2126         * configure.tgt: Replace amd64.o with arch/amd64.o.
2127
2128 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2129
2130         PR build/22188
2131         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2132         and SETEND.
2133
2134 2017-10-05  Pedro Alves  <palves@redhat.com>
2135
2136         * linux-nat.c (linux_child_follow_fork): When following the parent
2137         and detaching the child, consult the parent thread's architecture
2138         instead of the child's.
2139
2140 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2141
2142         * ax.h: Do not include "doublest.h".
2143         (union agent_val): Remove.
2144
2145 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2146
2147         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2148         (decimal_to_string): Return std::string object.
2149         (decimal_from_string): Accept std::string object.  Return bool.
2150         (decimal_from_integral, decimal_from_doublest): Remove.
2151         (decimal_from_longest): Add prototype.
2152         (decimal_from_ulongest): Likewise.
2153         (decimal_to_longest): Likewise.
2154         (decimal_from_doublest): Likewise.
2155         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2156         (MAX_DECIMAL_STRING): Move here.
2157         (decimal_to_string): Return std::string object.
2158         (decimal_from_string): Accept std::string object.  Return bool.
2159         (decimal_from_integral): Remove, replace by ...
2160         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2161         (decimal_to_longest): New function.
2162         (decimal_from_floating): Remove, replace by ...
2163         (decimal_from_doublest): ... this new function.
2164         (decimal_to_doublest): Update to new decimal_to_string interface.
2165
2166         * value.c (unpack_long): Use decimal_to_longest.
2167         * valops.c (value_cast): Use decimal_from_doublest instead of
2168         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2169         decimal_from_integral.
2170         * valarith.c (value_args_as_decimal): Likewise.
2171         * valprint.c (print_decimal_floating): Update to new
2172         decimal_to_string interface.
2173         * printcmd.c (printf_decfloat): Likewise.
2174         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2175
2176 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2177
2178         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2179         * gdbtypes.c: Include "floatformat.h".
2180         * value.c: Likewise.
2181         * m68k-tdep.c: Likewise.
2182
2183         * findvar.c: Do not include "floatformat.h".
2184         * amd64-darwin-tdep.c: Likewise.
2185         * arm-linux-tdep.c: Likewise.
2186         * i386-darwin-tdep.c: Likewise.
2187         * i387-tdep.c: Likewise.
2188         * m68k-linux-tdep.c: Likewise.
2189         * mep-tdep.c: Likewise.
2190         * mips-tdep.c: Likewise.
2191         * nios2-tdep.c: Likewise.
2192         * s390-linux-tdep.c: Likewise.
2193         * sparc-obsd-tdep.c: Likewise.
2194         * sparc-tdep.c: Likewise.
2195         * sparc64-tdep.c: Likewise.
2196         * spu-tdep.c: Likewise.
2197         * tic6x-tdep.c: Likewise.
2198         * tilegx-tdep.c: Likewise.
2199         * vax-tdep.c: Likewise.
2200         * xstormy16-tdep.c: Likewise.
2201         * xtensa-tdep.c: Likewise.
2202
2203         * top.c: Do not include "doublest.h".
2204         * aarch64-tdep.c: Likewise.
2205         * alpha-tdep.c: Likewise.
2206         * arm-linux-tdep.c: Likewise.
2207         * m68k-linux-tdep.c: Likewise.
2208         * tilegx-tdep.c: Likewise.
2209         * xstormy16-tdep.c: Likewise.
2210
2211 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2212
2213         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2214         (mipsn32_fbsd_sigframe): Define.
2215         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2216         for FreeBSD/mipsn32.
2217
2218 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2219
2220         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2221         AT_HWCAP.
2222
2223 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2224
2225         * MAINTAINERS (Misc): Update my email address.
2226
2227 2017-10-04  Pedro Alves  <palves@redhat.com>
2228
2229         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2230         it instead of target_gdbarch.
2231         (get_remote_state, get_remote_packet_size): Adjust
2232         get_remote_arch_state calls, passing down target_gdbarch
2233         explicitly.
2234         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2235         'gdbarch' and use it instead of target_gdbarch.
2236         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2237         passing down target_gdbarch explicitly.
2238         (struct stop_reply) <arch>: New field.
2239         (remote_parse_stop_reply): Use the stopped thread's architecture,
2240         not the current inferior's.  Save the architecture in the
2241         stop_reply.
2242         (process_stop_reply): Use the stop reply's architecture.
2243         (process_g_packet, remote_fetch_registers)
2244         (remote_prepare_to_store, store_registers_using_G)
2245         (remote_store_registers): Adjust get_remote_arch_state calls,
2246         using the regcache's architecture.
2247         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2248         passing down target_gdbarch explicitly.
2249         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2250         beneath instead of calling target_gdbarch.
2251         * target.c (default_thread_architecture): Use the specified
2252         inferior's architecture, instead of the current inferior's
2253         architecture (via target_gdbarch).
2254
2255 2017-10-04  Pedro Alves  <palves@redhat.com>
2256
2257         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2258         case.
2259         (regcache_print): Handle !target_has_registers here instead.
2260
2261 2017-10-04  Pedro Alves  <palves@redhat.com>
2262
2263         * frame.c (create_test_frame): Delete.
2264         * frame.h (create_test_frame): Delete.
2265         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2266         (class regcache_test): Delete.
2267         (test_target_has_registers, test_target_has_stack)
2268         (test_target_has_memory, test_target_prepare_to_store)
2269         (test_target_store_registers): New functions.
2270         (test_target_ops): New class.
2271         (register_to_value_test): Error out if there's already a
2272         process_stratum (or higher) target pushed.  Create a fuller mock
2273         environment, with mock target_ops, inferior, address space, thread
2274         and inferior_ptid.
2275         * progspace.c (struct address_space): Move to ...
2276         * progspace.h (struct address_space): ... here.
2277         * regcache.h (regcache::~regcache, regcache::raw_write)
2278         [GDB_SELF_TEST]: No longer virtual.
2279
2280 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2281
2282         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2283
2284 2017-10-04  Pedro Alves  <palves@redhat.com>
2285
2286         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2287         out of 'between TRY and CATCH'.
2288
2289 2017-10-04  Pedro Alves  <palves@redhat.com>
2290
2291         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2292         * common/common-exceptions.h (TRY): Open an outermost scope.
2293         Expand intro comment.
2294         (CATCH): Reindent.
2295         (END_CATCH): Close the outermost scope.
2296         * completer.c (complete_line_internal): Add missing END_CATCH.
2297
2298 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2299
2300         * NEWS (Changes since GDB 8.0): Add entry about new
2301         'set-cwd-on-gdbserver' feature.
2302         (New remote packets): Add entry for QSetWorkingDir.
2303         * common/common-inferior.h (set_inferior_cwd): New prototype.
2304         * infcmd.c (set_inferior_cwd): Remove "static".
2305         (show_cwd_command): Expand text to include remote debugging.
2306         * remote.c: Add PACKET_QSetWorkingDir.
2307         (remote_protocol_features) <QSetWorkingDir>: New entry for
2308         PACKET_QSetWorkingDir.
2309         (extended_remote_set_inferior_cwd): New function.
2310         (extended_remote_create_inferior): Call
2311         "extended_remote_set_inferior_cwd".
2312         (_initialize_remote): Call "add_packet_config_cmd" for
2313         QSetWorkingDir.
2314
2315 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2316
2317         * NEWS (New commands): Mention "set/show cwd".
2318         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2319         "cd" command's help text.
2320         * common/common-inferior.h (get_inferior_cwd): New prototype.
2321         * infcmd.c (inferior_cwd_scratch): New global variable.
2322         (set_inferior_cwd): New function.
2323         (get_inferior_cwd): Likewise.
2324         (set_cwd_command): Likewise.
2325         (show_cwd_command): Likewise.
2326         (_initialize_infcmd): Add "set/show cwd" commands.
2327         * inferior.h (class inferior) <cwd>: New field.
2328         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2329         (fork_inferior): Change inferior's cwd before its execution.
2330         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2331         to CreateProcess.
2332
2333 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2334
2335         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2336         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2337         (COMMON_OBS): Add gdb_tilde_expand.o.
2338         * common/gdb_tilde_expand.c: New file.
2339         * common/gdb_tilde_expand.h: Likewise.
2340
2341 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2342
2343         * gdbarch.sh (objfile): Remove duplicate declaration.
2344         * gdbarch.h: Regenerate.
2345
2346 2017-10-03  Tom Tromey  <tom@tromey.com>
2347
2348         * utils.c (internal_vproblem): Use string_vprintf.
2349
2350 2017-10-03  Tom Tromey  <tom@tromey.com>
2351
2352         * printcmd.c (info_symbol_command): Use std::string.
2353
2354 2017-10-03  Tom Tromey  <tom@tromey.com>
2355
2356         * top.c (gdb_safe_append_history): Use std::string.
2357
2358 2017-10-03  Tom Tromey  <tom@tromey.com>
2359
2360         * event-top.c (stdin_event_handler): Update.
2361         * main.c (captured_main_1): Update.
2362         * top.h (make_delete_ui_cleanup): Remove.
2363         (struct ui): Add constructor and destructor.
2364         (new_ui, delete_ui): Remove.
2365         * top.c (make_delete_ui_cleanup): Remove.
2366         (new_ui_command): Use std::unique_ptr.
2367         (delete_ui_cleanup): Remove.
2368         (ui::ui): Rename from new_ui.  Update.
2369         (free_ui): Remove.
2370         (ui::~ui): Rename from delete_ui.  Update.
2371
2372 2017-10-03  Tom Tromey  <tom@tromey.com>
2373
2374         * symfile.c (load_progress): Use gdb::byte_vector.
2375
2376 2017-10-03  Tom Tromey  <tom@tromey.com>
2377
2378         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2379         declaration.
2380         * printcmd.c (x_command): Remove unused declaration.
2381         * symfile.c (symbol_file_command): Remove unused declaration.
2382
2383 2017-10-03  Tom Tromey  <tom@tromey.com>
2384
2385         * utils.c (internal_vproblem): Use std::string.
2386         (defaulted_query): Likewise.
2387
2388 2017-10-03  Tom Tromey  <tom@tromey.com>
2389
2390         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2391         * top.c (execute_command_to_string): Update.
2392         * utils.c (make_cleanup_restore_page_info): Remove.
2393         (do_restore_page_info_cleanup): Remove.
2394         (set_batch_flag_and_restore_page_info):
2395         New.
2396         (make_cleanup_restore_page_info): Remove.
2397         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2398         (~set_batch_flag_and_restore_page_info): New
2399         (make_cleanup_restore_uinteger): Remove.
2400         (make_cleanup_restore_integer): Remove.
2401         (struct restore_integer_closure): Remove.
2402         (restore_integer): Remove.
2403         * utils.h (struct set_batch_flag_and_restore_page_info): New
2404         class.
2405         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2406         (make_cleanup_restore_page_info): Remove.
2407         (make_cleanup_restore_uinteger) Remove.
2408         (make_cleanup_restore_integer) Remove.
2409
2410 2017-10-03  Tom Tromey  <tom@tromey.com>
2411
2412         * record-full.h (record_full_gdb_operation_disable_set): Return
2413         scoped_restore_tmpl<int>.
2414         * infrun.c (adjust_pc_after_break): Update.
2415         (handle_signal_stop): Update.
2416         * record-full.c (record_full_gdb_operation_disable_set): Return
2417         scoped_restore_tmpl<int>.
2418         (record_full_wait_1, record_full_insert_breakpoint)
2419         (record_full_remove_breakpoint, record_full_save)
2420         (record_full_goto_insn): Update.
2421
2422 2017-10-02  Tom Tromey  <tom@tromey.com>
2423
2424         PR rust/22236:
2425         * rust-lang.c (rust_val_print_str): New function.
2426         (val_print_struct): Call it.
2427         (rust_subscript): Preserve name of slice type.
2428
2429 2017-10-02  Tom Tromey  <tom@tromey.com>
2430
2431         * rust-lang.c (rust_subscript): Handle slices in
2432         EVAL_AVOID_SIDE_EFFECTS case.
2433
2434 2017-10-02  Tom Tromey  <tom@tromey.com>
2435
2436         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2437
2438 2017-10-02  Tom Tromey  <tom@tromey.com>
2439
2440         * rust-lang.h (rust_slice_type): Add "extern".
2441
2442 2017-10-02  Tom Tromey  <tom@tromey.com>
2443             Pedro Alves  <palves@redhat.com>
2444
2445         * ada-lang.h (ada_exc_info::operator<): Make const.
2446         (ada_exc_info::operator==): Make const.
2447         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2448         Make const.
2449
2450 2017-09-29  Tom Tromey  <tom@tromey.com>
2451
2452         * target.c (read_whatever_is_readable): Change type of "result".
2453         Update.
2454         (free_memory_read_result_vector): Remove.
2455         (read_memory_robust): Change return type.  Update.
2456         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2457         bin2hex, std::string.
2458         * target.h (memory_read_result_s): Remove typedef.
2459         (free_memory_read_result_vector): Remove.
2460         (read_memory_robust): Return std::vector.
2461
2462 2017-09-29  Tom Tromey  <tom@tromey.com>
2463
2464         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2465
2466 2017-09-29  Tom Tromey  <tom@tromey.com>
2467
2468         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2469         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2470         operator< and operator==.
2471         (ada_exceptions_list): Return a std::vector.
2472         * ada-lang.c (ada_exc_info::operator<): Rename from
2473         compare_ada_exception_info.
2474         (ada_exc_info::operator==): New.
2475         (sort_remove_dups_ada_exceptions_list): Change type of
2476         "exceptions".
2477         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2478         (ada_add_global_exceptions): Likewise.
2479         (ada_exceptions_list_1): Return a std::vector.
2480         (ada_exceptions_list): Likewise.
2481
2482 2017-09-29  Tom Tromey  <tom@tromey.com>
2483
2484         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2485         'std::set *'.
2486         (print_one_inferior): Update.
2487         (free_vector_of_ints): Remove.
2488         (list_available_thread_groups): Change "ids" to std::set.
2489         (mi_cmd_list_thread_groups): Update.
2490         (struct collect_cores_data) <core>: Now a std::set.
2491         (collect_cores): Update.
2492         (unique): Remove.
2493         (print_one_inferior): Update.
2494
2495 2017-09-29  Tom Tromey  <tom@tromey.com>
2496
2497         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2498         (mi_execute_async_cli_command): Likewise.
2499         (mi_cmd_trace_frame_collected): Use field_fmt.
2500
2501 2017-09-29  Tom Tromey  <tom@tromey.com>
2502
2503         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2504         gdb::byte_vector.
2505
2506 2017-09-29  Tom Tromey  <tom@tromey.com>
2507
2508         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2509
2510 2017-09-29  Tom Tromey  <tom@tromey.com>
2511
2512         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2513
2514 2017-09-29  Tom Tromey  <tom@tromey.com>
2515
2516         * varobj.h (varobj_gen_name): Return std::string.
2517         * varobj.c (varobj_gen_name): Return std::string.
2518         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2519         (mi_cmd_var_delete): Don't copy "name".
2520
2521 2017-09-29  Tom Tromey  <tom@tromey.com>
2522
2523         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2524         (mi_cmd_break_insert_1): Update.
2525
2526 2017-09-29  Tom Tromey  <tom@tromey.com>
2527
2528         * target.h (make_scoped_defer_target_commit_resume): Update.
2529         * target.c (make_scoped_defer_target_commit_resume): Rename from
2530         make_cleanup_defer_target_commit_resume.  Return a
2531         scoped_restore.
2532         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2533
2534 2017-09-29  Tom Tromey  <tom@tromey.com>
2535
2536         * main.c (captured_main_1): Remove unused declaration.
2537         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2538
2539 2017-09-29  Tom Tromey  <tom@tromey.com>
2540
2541         * symtab.c (search_symbols): Remove unused outer cleanup.
2542         (make_source_files_completion_list): Remove unused declaration.
2543
2544 2017-09-29  Tom Tromey  <tom@tromey.com>
2545
2546         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2547
2548 2017-09-29  Tom Tromey  <tom@tromey.com>
2549
2550         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2551         gdb::byte_vector.
2552
2553 2017-09-29  Tom Tromey  <tom@tromey.com>
2554
2555         * complaints.c (vcomplaint): Use std::string.
2556
2557 2017-09-29  Tom Tromey  <tom@tromey.com>
2558
2559         * tracepoint.c (trace_variable_command): Use std::string.
2560         (encode_actions_1): Remove unused declarations.
2561         (create_tsv_from_upload): Use std::string.
2562
2563 2017-09-29  Tom Tromey  <tom@tromey.com>
2564
2565         * cp-support.c (gdb_demangle): Use std::string.
2566
2567 2017-09-29  Tom Tromey  <tom@tromey.com>
2568
2569         * stack.c (parse_frame_specification): Use std::string
2570         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2571
2572 2017-09-29  Tom Tromey  <tom@tromey.com>
2573
2574         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2575
2576 2017-09-29  Tom Tromey  <tom@tromey.com>
2577
2578         * utils.c (vfprintf_maybe_filtered): Use std::string.
2579         (vfprintf_unfiltered): Likewise.
2580
2581 2017-09-29  Tom Tromey  <tom@tromey.com>
2582
2583         * event-top.c (top_level_prompt): Return std::string.
2584         (display_gdb_prompt): Update.
2585
2586 2017-09-29  Tom Tromey  <tom@tromey.com>
2587
2588         * unittests/common-utils-selftests.c (format): New function.
2589         (string_vprintf_tests): New function.
2590         (_initialize_common_utils_selftests): Register new tests.
2591         * common/common-utils.c (string_vprintf): New function.
2592         * common/common-utils.h (string_vprintf): Declare.
2593
2594 2017-09-29  Pedro Alves  <palves@redhat.com>
2595
2596         * common/rsp-low.c (unpack_varlen_hex): Constify.
2597         * common/rsp-low.h (unpack_varlen_hex): Constify.
2598         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2599         Constify.
2600         * remote.c (remote_set_permissions, read_ptid)
2601         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2602         (remote_static_tracepoint_marker_at)
2603         (remote_static_tracepoint_markers_by_strid)
2604         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2605         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2606         (parse_tracepoint_definition, parse_tsv_definition)
2607         (parse_static_tracepoint_marker_definition): Constify.
2608         * tracepoint.h (parse_static_tracepoint_marker_definition)
2609         (parse_trace_status, parse_tracepoint_status)
2610         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2611
2612 2017-09-29  Pedro Alves  <palves@redhat.com>
2613
2614         * remote.c (target_buf, target_buf_size): Delete.
2615         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2616         Use the connection's packet buffer instead.
2617         All callers adjusted.
2618         (_initialize_remote): Remove references to target_buf and
2619         target_buf_size.
2620
2621 2017-09-28  Pedro Alves  <palves@redhat.com>
2622
2623         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2624         unittests/common-utils-selftests.c.
2625         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2626         (COMMON_OBS): Remove utils-selftests.o.
2627         * utils-selftests.c: Move to ...
2628         * unittests/common-utils-selftests.c: ... here and rename self
2629         test to "string_printf".
2630
2631 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2632
2633         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2634         having NULL cus or tus.
2635
2636 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2637
2638         * arm-tdep.c: (convert_from_extended): Remove.
2639         (convert_to_extended): Likewise.
2640         (arm_extract_return_value): Use convert_typed_floating.
2641         (arm_store_return_value): Likewise.
2642
2643         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2644         * sh-tdep.c: Do not include "floatformat.h".
2645         (sh_littlebyte_bigword_type): New function.
2646         (sh_register_convert_to_virtual): Use convert_typed_floating.
2647         (sh_register_convert_to_raw): Likewise.
2648         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2649         (sh64_littlebyte_bigword_type): New function.
2650         (sh64_extract_return_value): Use convert_typed_floating.
2651         (sh64_register_convert_to_virtual): Likewise.
2652         (sh64_register_convert_to_raw): Likewise.
2653
2654 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2655
2656         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2657         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2658
2659         * gdbtypes.h (union type_specific): Make field floatformat hold
2660         just a single struct floatformat, not an array.
2661         (floatformat_from_type): Move here.
2662         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2663         changed TYPE_FLOATFORMAT definition.
2664         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2665         (recursive_dump_type): Likewise.
2666         (init_float_type): Install correct floatformat for byte order.
2667         (arch_float_type): Likewise.
2668
2669 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2670
2671         * gdbtypes.c (init_type): Change incoming argument from
2672         length-in-bytes to length-in-bits.  Assert length is a
2673         multiple of TARGET_CHAR_BITS.
2674         (arch_type, arch_flags_type): Likewise.
2675         (init_integer_type): Update call to init_type.
2676         (init_character_type): Likewise.
2677         (init_boolean_type): Likewise.
2678         (init_float_type): Likewise.
2679         (init_decfloat_type): Likewise.
2680         (init_complex_type): Likewise.
2681         (init_pointer_type): Likewise.
2682         (objfile_type): Likewise.
2683         (arch_integer_type): Update call to arch_type.
2684         (arch_character_type): Likewise.
2685         (arch_boolean_type): Likewise.
2686         (arch_float_type): Likewise.
2687         (arch_decfloat_type): Likewise.
2688         (arch_complex_type): Likewise.
2689         (arch_pointer_type): Likewise.
2690         (gdbtypes_post_init): Likewise.
2691
2692         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2693         (read_base_type): Likewise.
2694         * mdebugread.c (basic_type): Likewise.
2695         * stabsread.c (dbx_init_float_type): Likewise.
2696         (rs6000_builtin_type): Likewise.
2697         (read_range_type): Likewise.  Also, fix call to init_integer_type
2698         with erroneous length argument.
2699
2700         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2701         * d-lang.c (build_d_types): Likewise.
2702         * f-lang.c (build_fortran_types): Likewise.
2703         * go-lang.c (build_go_types): Likewise.
2704         * opencl-lang.c (build_opencl_types): Likewise.
2705         * jit.c (finalize_symtab): Likewise.
2706         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2707         (build_std_type_info_type): Likewise.
2708         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2709         update call to arch_flags_type.
2710
2711         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2712         arch_type.
2713         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2714         * windows-tdep.c (windows_get_tlb_type): Likewise.
2715
2716         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2717         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2718         * m32c-tdep.c (make_types): Likewise.
2719         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2720         (rl78_psw_type): Update call to arch_flags_type.
2721         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2722         * rx-tdep.c (rx_psw_type): Likewise.
2723         (rx_fpsw_type): Likewise.
2724         * sparc-tdep.c (sparc_psr_type): Likewise.
2725         (sparc_fsr_type): Likewise.
2726         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2727         (sparc64_ccr_type): Likewise.
2728         (sparc64_fsr_type): Likewise.
2729         (sparc64_fprs_type): Likewise.
2730
2731 2017-09-27  Tom Tromey  <tom@tromey.com>
2732
2733         * findcmd.c (find_command): Constify.
2734
2735 2017-09-27  Tom Tromey  <tom@tromey.com>
2736
2737         * ada-tasks.c (task_command_1, task_command): Constify.
2738
2739 2017-09-27  Tom Tromey  <tom@tromey.com>
2740
2741         * symtab.c (maintenance_print_symbol_cache)
2742         (maintenance_flush_symbol_cache)
2743         (maintenance_print_symbol_cache_statistics): Constify.
2744
2745 2017-09-27  Tom Tromey  <tom@tromey.com>
2746
2747         * inferior.c (detach_inferior_command, kill_inferior_command)
2748         (inferior_command): Constify.
2749
2750 2017-09-27  Tom Tromey  <tom@tromey.com>
2751
2752         * regcache.c (regcache_print, maintenance_print_registers)
2753         (maintenance_print_raw_registers)
2754         (maintenance_print_cooked_registers)
2755         (maintenance_print_register_groups)
2756         (maintenance_print_remote_registers): Constify.
2757
2758 2017-09-27  Tom Tromey  <tom@tromey.com>
2759
2760         * printcmd.c (map_display_numbers, undisplay_command)
2761         (enable_disable_display_command, enable_display_command)
2762         (disable_display_command): Constify.
2763
2764 2017-09-27  Tom Tromey  <tom@tromey.com>
2765
2766         * breakpoint.h (delete_command): Don't declare.
2767         * breakpoint.c (delete_command, enable_once_command)
2768         (enable_count_command, enable_delete_command, breakpoint_1)
2769         (maintenance_info_breakpoints, stopin_command, stopat_command)
2770         (delete_command, delete_trace_command, save_breakpoints)
2771         (save_breakpoints_command, save_tracepoints_command): Constify.
2772
2773 2017-09-27  Tom Tromey  <tom@tromey.com>
2774
2775         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2776         (skip_ws, extract_identifier, macro_define_command)
2777         (macro_undef_command, macro_list_command): Constify.
2778
2779 2017-09-27  Tom Tromey  <tom@tromey.com>
2780
2781         * infcmd.c (environment_info, set_environment_command)
2782         (unset_environment_command, path_info, info_proc_cmd_1)
2783         (info_proc_cmd_mappings, info_proc_cmd_stat)
2784         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2785         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2786
2787 2017-09-27  Tom Tromey  <tom@tromey.com>
2788
2789         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2790         Constify.
2791
2792 2017-09-27  Tom Tromey  <tom@tromey.com>
2793
2794         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2795
2796 2017-09-27  Tom Tromey  <tom@tromey.com>
2797
2798         * demangle.c (demangle_command): Constify.
2799
2800 2017-09-27  Tom Tromey  <tom@tromey.com>
2801
2802         * progspace.c (maintenance_info_program_spaces_command):
2803         Constify.
2804
2805 2017-09-27  Tom Tromey  <tom@tromey.com>
2806
2807         * compile/compile.c (check_raw_argument, compile_file_command)
2808         (compile_code_command, compile_print_command): Constify.
2809
2810 2017-09-27  Tom Tromey  <tom@tromey.com>
2811
2812         * reggroups.c (maintenance_print_reggroups): Constify.
2813
2814 2017-09-27  Tom Tromey  <tom@tromey.com>
2815
2816         * dwarf2read.c (save_gdb_index_command): Constify.
2817
2818 2017-09-27  Tom Tromey  <tom@tromey.com>
2819
2820         * stap-probe.c (info_probes_stap_command): Constify.
2821
2822 2017-09-27  Tom Tromey  <tom@tromey.com>
2823
2824         * fork-child.c (unset_exec_wrapper_command): Constify.
2825
2826 2017-09-27  Tom Tromey  <tom@tromey.com>
2827
2828         * btrace.c (get_uint, get_context_size, no_chunk)
2829         (maint_btrace_packet_history_cmd)
2830         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2831         (maint_info_btrace_cmd): Constify.
2832
2833 2017-09-27  Tom Tromey  <tom@tromey.com>
2834
2835         * reverse.c (delete_bookmark_command): Constify.
2836
2837 2017-09-27  Tom Tromey  <tom@tromey.com>
2838
2839         * remote.c (set_memory_packet_size)
2840         (set_memory_write_packet_size, show_memory_write_packet_size)
2841         (set_memory_read_packet_size, show_memory_read_packet_size)
2842         (compare_sections_command, packet_command, remote_put_command)
2843         (remote_get_command, remote_delete_command): Constify.
2844
2845 2017-09-27  Tom Tromey  <tom@tromey.com>
2846
2847         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2848         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2849         (set_mipsfpu_auto_command): Constify.
2850
2851 2017-09-27  Tom Tromey  <tom@tromey.com>
2852
2853         * cli/cli-cmds.h (cd_command): Constify.
2854         * cli/cli-cmds.c (cd_command): Constify.
2855
2856 2017-09-27  Tom Tromey  <tom@tromey.com>
2857
2858         * thread.c (thread_name_command, thread_find_command): Constify.
2859
2860 2017-09-27  Tom Tromey  <tom@tromey.com>
2861
2862         * probe.c (enable_probes_command, disable_probes_command):
2863         Constify.
2864
2865 2017-09-27  Tom Tromey  <tom@tromey.com>
2866
2867         * symfile.c (symbol_file_command): Constify.
2868         * gdbcore.h (deprecated_file_changed_hook): Constify.
2869         * exec.c (deprecated_file_changed_hook, exec_file_command)
2870         (file_command): Constify.
2871         * defs.h (symbol_file_command): Constify.
2872
2873 2017-09-27  Tom Tromey  <tom@tromey.com>
2874
2875         * remote-fileio.c (set_system_call_allowed)
2876         (show_system_call_allowed): Constify.
2877
2878 2017-09-27  Tom Tromey  <tom@tromey.com>
2879
2880         * tracepoint.c (delete_trace_variable_command)
2881         (tfind_end_command, tfind_start_command, tfind_pc_command)
2882         (tfind_tracepoint_command, tfind_line_command)
2883         (tfind_range_command, tfind_outside_command): Constify.
2884
2885 2017-09-27  Tom Tromey  <tom@tromey.com>
2886
2887         * ax-gdb.c (maint_agent_printf_command, agent_command)
2888         (agent_eval_command): Constify.
2889
2890 2017-09-27  Tom Tromey  <tom@tromey.com>
2891
2892         * tracepoint.c (info_scope_command): Constify.
2893         * python/python.c (gdbpy_decode_line): Constify.
2894         * python/py-breakpoint.c (bppy_init): Constify.
2895         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2896         * location.h: (new_linespec_location)
2897         (string_to_event_location_basic, string_to_event_location):
2898         Constify.
2899         * location.c (new_linespec_location)
2900         (string_to_event_location_basic, string_to_event_location):
2901         Constify.
2902         * linespec.h (decode_line_with_current_source)
2903         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2904         * linespec.c (linespec_lex_to_end)
2905         (decode_line_with_current_source)
2906         (decode_line_with_last_displayed): Constify.
2907         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2908         Constify.
2909         * cli/cli-cmds.c (edit_command, list_command): Constify.
2910         * breakpoint.h (until_break_command, watch_command_wrapper)
2911         (awatch_command_wrapper, rwatch_command_wrapper)
2912         (init_ada_exception_breakpoint): Constify.
2913         * breakpoint.c (break_command_1, dprintf_command)
2914         (break_range_command, watch_command_wrapper)
2915         (rwatch_command_wrapper, awatch_command_wrapper)
2916         (until_break_command, init_ada_exception_breakpoint)
2917         (strace_marker_create_sals_from_location, trace_command)
2918         (ftrace_command, strace_command, struct tracepoint): Constify.
2919         * ax-gdb.c (agent_command_1): Constify.
2920         * ada-lang.c (ada_exception_sal): Constify.
2921
2922 2017-09-27  Tom Tromey  <tom@tromey.com>
2923
2924         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2925         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2926         (get_context_size, no_chunk, get_insn_history_modifiers)
2927         (cmd_record_insn_history, get_call_history_modifiers)
2928         (cmd_record_call_history): Constify.
2929
2930 2017-09-27  Tom Tromey  <tom@tromey.com>
2931
2932         * source.c (show_substitute_path_command)
2933         (unset_substitute_path_command, set_substitute_path_command):
2934         Constify.
2935
2936 2017-09-27  Tom Tromey  <tom@tromey.com>
2937
2938         * typeprint.c (maintenance_print_type): Constify.
2939         * maint.c (maintenance_dump_me, maintenance_demangle)
2940         (maintenance_time_display, maintenance_info_sections)
2941         (maintenance_print_statistics, maintenance_deprecate)
2942         (maintenance_undeprecate): Constify.
2943         (maintenance_do_deprecate): Constify.  Use std::string.
2944         (maintenance_selftest): Constify.
2945         * gdbtypes.h (maintenance_print_type): Constify.
2946
2947 2017-09-27  Tom Tromey  <tom@tromey.com>
2948
2949         * hppa-tdep.c (unwind_command): Constify.
2950
2951 2017-09-27  Tom Tromey  <tom@tromey.com>
2952
2953         * target-descriptions.c (unset_tdesc_filename_cmd)
2954         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2955         Constify.
2956
2957 2017-09-27  Tom Tromey  <tom@tromey.com>
2958
2959         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2960
2961 2017-09-27  Tom Tromey  <tom@tromey.com>
2962
2963         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2964
2965 2017-09-27  Tom Tromey  <tom@tromey.com>
2966
2967         * tui/tui-regs.c (tui_reg_command): Constify.
2968
2969 2017-09-27  Tom Tromey  <tom@tromey.com>
2970
2971         * skip.c (skip_file_command, skip_function_command)
2972         (skip_enable_command, skip_disable_command, skip_delete_command):
2973         Constify.
2974
2975 2017-09-27  Tom Tromey  <tom@tromey.com>
2976
2977         * record-btrace.c (cmd_record_btrace_bts_start)
2978         (cmd_record_btrace_pt_start): Constify.
2979
2980 2017-09-27  Tom Tromey  <tom@tromey.com>
2981
2982         * symmisc.c (maintenance_print_symbols)
2983         (maintenance_print_msymbols, maintenance_print_objfiles)
2984         (maintenance_info_symtabs, maintenance_check_symtabs)
2985         (maintenance_expand_symtabs, maintenance_info_line_tables):
2986         Constify.
2987
2988 2017-09-27  Tom Tromey  <tom@tromey.com>
2989
2990         * top.c (new_ui_command): Constify.
2991
2992 2017-09-27  Tom Tromey  <tom@tromey.com>
2993
2994         * symfile.c (add_symbol_file_command)
2995         (remove_symbol_file_command, list_overlays_command)
2996         (map_overlay_command, unmap_overlay_command)
2997         (overlay_auto_command, overlay_manual_command)
2998         (overlay_off_command, overlay_load_command): Constify.
2999
3000 2017-09-27  Tom Tromey  <tom@tromey.com>
3001
3002         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3003         (info_spu_mailbox_command, info_spu_dma_command)
3004         (info_spu_proxydma_command): Constify.
3005
3006 2017-09-27  Tom Tromey  <tom@tromey.com>
3007
3008         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3009
3010 2017-09-27  Tom Tromey  <tom@tromey.com>
3011
3012         * cli/cli-script.c (user_defined_command): Constify.
3013
3014 2017-09-27  Tom Tromey  <tom@tromey.com>
3015
3016         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3017         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3018         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3019         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3020         (dump_binary_value, append_binary_memory, append_binary_value):
3021         Constify.
3022         (struct dump_context) <func>: Constify.
3023         (add_dump_command): Update.
3024
3025 2017-09-27  Tom Tromey  <tom@tromey.com>
3026
3027         * cli/cli-cmds.c (show_version, show_configuration)
3028         (source_command, show_user): Constify.
3029
3030 2017-09-27  Tom Tromey  <tom@tromey.com>
3031
3032         * target.c (maintenance_print_target_stack): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * interps.c (interpreter_exec_cmd): Constify.
3037
3038 2017-09-27  Tom Tromey  <tom@tromey.com>
3039
3040         * record-full.c (cmd_record_full_restore): Constify.
3041
3042 2017-09-27  Tom Tromey  <tom@tromey.com>
3043
3044         * memattr.c (enable_mem_command, disable_mem_command)
3045         (delete_mem_command): Constify.
3046
3047 2017-09-27  Tom Tromey  <tom@tromey.com>
3048
3049         * value.c (show_convenience): Constify.
3050
3051 2017-09-27  Tom Tromey  <tom@tromey.com>
3052
3053         * gdbcore.h (core_file_command): Update.
3054         * corefile.c (core_file_command): Constify.
3055
3056 2017-09-27  Tom Tromey  <tom@tromey.com>
3057
3058         * user-regs.c (maintenance_print_user_registers): Constify.
3059
3060 2017-09-27  Tom Tromey  <tom@tromey.com>
3061
3062         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3063
3064 2017-09-27  Tom Tromey  <tom@tromey.com>
3065
3066         * cp-support.c (first_component_command): Constify.
3067
3068 2017-09-27  Tom Tromey  <tom@tromey.com>
3069
3070         * psymtab.c (maintenance_print_psymbols)
3071         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3072         Constify.
3073
3074 2017-09-27  Tom Tromey  <tom@tromey.com>
3075
3076         * windows-tdep.c (display_tib): Constify.
3077
3078 2017-09-27  Tom Tromey  <tom@tromey.com>
3079
3080         * linux-fork.c (delete_checkpoint_command)
3081         (detach_checkpoint_command): Constify.
3082
3083 2017-09-27  Tom Tromey  <tom@tromey.com>
3084
3085         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3086
3087 2017-09-27  Tom Tromey  <tom@tromey.com>
3088
3089         * arc-tdep.c (dump_arc_instruction_command): Constify.
3090
3091 2017-09-27  Tom Tromey  <tom@tromey.com>
3092
3093         * valprint.c (set_radix, show_radix): Constify.
3094
3095 2017-09-27  Tom Tromey  <tom@tromey.com>
3096
3097         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3098
3099 2017-09-27  Tom Tromey  <tom@tromey.com>
3100
3101         * command.h (not_just_help_class_command): Update.
3102         * cli/cli-decode.h (not_just_help_class_command): Update.
3103         * cli/cli-decode.c (not_just_help_class_command): Constify.
3104
3105 2017-09-27  Tom Tromey  <tom@tromey.com>
3106
3107         * gdb_bfd.c (maintenance_info_bfds): Constify.
3108
3109 2017-09-27  Tom Tromey  <tom@tromey.com>
3110
3111         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3112         overloads.
3113         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3114         (do_const_cfunc): New function.
3115         (cmd_cfunc_eq): New overload.
3116         (cli_user_command_p): Check do_const_cfunc.
3117         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3118         const_cfunc.
3119         * command.h (add_cmd): Add const overload and no-function
3120         overload.
3121         (set_cmd_cfunc): Add const overload.
3122         (cmd_const_cfunc_ftype): Declare.
3123         (cmd_cfunc_eq): Add const overload.
3124         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3125         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3126         overload.
3127
3128 2017-09-27  Tom Tromey  <tom@tromey.com>
3129
3130         * macroexp.c (get_next_token_for_substitution): New function.
3131         (substitute_args): Call it.  Check for __VA_OPT__.
3132
3133 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3134             Pedro Alves <palves@redhat.com>
3135
3136         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3137         producer_is_icc_lt_14.
3138         (producer_is_icc_lt_14): New function.
3139         (check_producer): Add code for checking version of ICC.
3140         (producer_is_icc): Move to producer.c.
3141         (read_structure_type): Restrict ICC workaround to ICC<14.
3142         * producer.c: Include selftest.h.
3143         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3144         New functions.
3145         * producer.h (producer_is_icc): New declaration.
3146
3147 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3148
3149         * Makefile.in (SFILES): Add producer.c.
3150         (COMMON_OBS): Add producer.o
3151         * amd64-tdep.c (producer.h): Add new include.
3152         * dwarf2read.c (producer.h): Add new include.
3153         * producer.c: New file.
3154         * producer.h: New file.
3155         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3156         producer.c.
3157         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3158         producer.h.
3159
3160 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3161
3162         * configure.ac: Search ncursesw before ncurses.
3163         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3164         * gdb_curses.h: Include <ncursesw/ncurses.h>
3165         * config.in, configure: Regenerate.
3166
3167 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3168
3169         PR gdb/22185
3170         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3171         obsolete.
3172         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3173         Remove i386sol2 support.
3174         * configure.nat <i386sol2>: Remove.
3175         <sol2-64>: Fold into ...
3176         <sol2>: ... this.
3177         Move common settings to default section.
3178         Add sol-thread.o.
3179         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3180         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3181         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3182         <i[34567]86-*-solaris*>: Remove.
3183         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3184
3185         * configure.ac: Remove wctype in libw check.
3186         (_MSE_INT_H): Don't define on Solaris 7-9.
3187         <solaris*>: Remove libthread_db.so.1 check.
3188         * configure: Regenerate.
3189         * config.in: Regenerate.
3190
3191         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3192         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3193         (gdb_ps_size_t): Remove.
3194         Use base types in users.
3195         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3196
3197         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3198
3199 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3200
3201         PR build/22206
3202         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3203         (adi_is_addr_mapped): Likewise.
3204         (PSR_ICC): Don't redefine.
3205         (PSR_IMPL): Likewise.
3206
3207 2017-09-25  Tom Tromey  <tom@tromey.com>
3208
3209         * regcache.c (regcache::dump): Use string_printf.
3210
3211 2017-09-25  Tom Tromey  <tom@tromey.com>
3212
3213         * regcache.c (class regcache_invalidator): New.
3214         (struct register_to_invalidate): Remove.
3215         (make_cleanup_regcache_invalidate): Remove.
3216         (regcache::raw_write): Use regcache_invalidator.
3217
3218 2017-09-25  Tom Tromey  <tom@tromey.com>
3219
3220         * spu-tdep.c (spu2ppu_sniffer): Update.
3221         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3222         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3223         Remove.
3224         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3225         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3226         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3227         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3228         (frame_pop): Update.
3229
3230 2017-09-25  Tom Tromey  <tom@tromey.com>
3231
3232         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3233         * regcache.h (regcache_xfree): Don't declare.
3234         * regcache.c (regcache_xfree): Remove.
3235         (do_regcache_xfree): Use delete.
3236         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3237         * linux-fork.c (free_fork): Use delete.
3238         (fork_save_infrun_state): Likewise.
3239         * jit.c (jit_dealloc_cache): Use delete.
3240         * infrun.c (discard_infcall_suspend_state): Use delete.
3241
3242 2017-09-25  Tom Tromey  <tom@tromey.com>
3243
3244         * regcache.h (regcache_xmalloc): Don't declare.
3245         (regcache_raw_set_cached_value): Update comment.
3246         * regcache.c (regcache_xmalloc): Remove.
3247         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3248         * jit.c (jit_frame_sniffer): Use new.
3249         * frame.c (frame_save_as_regcache): Use new.
3250
3251 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3252
3253         * NEWS: Advertise support for guarded-storage registers on IBM z.
3254
3255 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3256
3257         * s390-linux-nat.c (have_regset_gs): New static variable.
3258         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3259         control block and guarded-storage broadcast control regsets.
3260         (s390_read_description): Detect whether the target has
3261         guarded-storage support, return appropriate tdesc.
3262         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3263         (features/s390x-gs-linux64.c): Likewise.
3264         (struct gdbarch_tdep) <have_gs>: New field.
3265         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3266         (s390_gsbc_regset): New variables.
3267         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3268         and s390_gsbc_regset, if applicable.
3269         (s390_core_read_description): Check whether core file was from a
3270         target with guarded-storage support; include appropriate regsets.
3271         (s390_gdbarch_init): Add registers for guarded-storage support.
3272         (_initialize_s390_tdep): Initialize new target descriptions that
3273         include registers for guarded-storage support.
3274         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3275         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3276         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3277         (S390_NUM_REGS): Adjust macro definition.
3278         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3279         (tdesc_s390x_gs_linux64): New declarations.
3280
3281 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3282
3283         * features/s390-gs-linux64.xml: New file.
3284         * features/s390-gs.xml: New file.
3285         * features/s390-gsbc.xml: New file.
3286         * features/s390x-gs-linux64.xml: New file.
3287         * features/Makefile (WHICH): Add s390-gs-linux64 and
3288         s390x-gs-linux64.
3289         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3290         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3291         * features/s390-gs-linux64.c: New generated file.
3292         * features/s390x-gs-linux64.c: New file.
3293         * regformats/s390-gs-linux64.dat: New file.
3294         * regformats/s390x-gs-linux64.dat: New file.
3295
3296 2017-09-23  Tom Tromey  <tom@tromey.com>
3297
3298         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3299
3300 2017-09-22  Tom Tromey  <tom@tromey.com>
3301
3302         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3303         type to scoped_restore_tmpl.
3304         <scoped_input_handler>: Initialize m_quit_handler directly.
3305
3306 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3307
3308         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3309         (cd_command): Likewise.  Free "current_directory" before
3310         assigning to it.
3311         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3312         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3313         * top.c (gdb_dirbuf): Remove global declaration.
3314         * top.h (gdb_dirbuf): Likewise.
3315
3316 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3317
3318         * gnulib/aclocal.m4: Regenerate.
3319         * gnulib/config.in: Regenerate.
3320         * gnulib/configure: Regenerate.
3321         * gnulib/import/Makefile.am: Regenerate.
3322         * gnulib/import/Makefile.in: Regenerate.
3323         * gnulib/import/assure.h: New file.
3324         * gnulib/import/at-func.c: Likewise
3325         * gnulib/import/chdir-long.c: New file.
3326         * gnulib/import/chdir-long.h: New file.
3327         * gnulib/import/cloexec.c: New file.
3328         * gnulib/import/cloexec.h: New file.
3329         * gnulib/import/close.c: New file.
3330         * gnulib/import/closedir.c: New file.
3331         * gnulib/import/dirent-private.h: New file.
3332         * gnulib/import/dup-safer.c: New file.
3333         * gnulib/import/dup.c: New file.
3334         * gnulib/import/dup2.c: New file.
3335         * gnulib/import/error.c: New file.
3336         * gnulib/import/error.h: New file.
3337         * gnulib/import/exitfail.c: New file.
3338         * gnulib/import/exitfail.h: New file.
3339         * gnulib/import/fchdir.c: New file.
3340         * gnulib/import/fcntl.c: New file.
3341         * gnulib/import/fcntl.in.h: New file.
3342         * gnulib/import/fd-hook.c: New file.
3343         * gnulib/import/fd-hook.h: New file.
3344         * gnulib/import/fd-safer.c: New file.
3345         * gnulib/import/fdopendir.c: New file.
3346         * gnulib/import/filename.h: New file.
3347         * gnulib/import/filenamecat-lgpl.c: New file.
3348         * gnulib/import/filenamecat.h: New file.
3349         * gnulib/import/fstat.c: New file.
3350         * gnulib/import/fstatat.c: New file.
3351         * gnulib/import/getcwd-lgpl.c: New file.
3352         * gnulib/import/getcwd.c: New file.
3353         * gnulib/import/getdtablesize.c: New file.
3354         * gnulib/import/getlogin_r.c: New file.
3355         * gnulib/import/getprogname.c: New file.
3356         * gnulib/import/getprogname.h: New file.
3357         * gnulib/import/gettext.h: New file.
3358         * gnulib/import/glob-libc.h: New file.
3359         * gnulib/import/glob.c: New file.
3360         * gnulib/import/glob.in.h: New file.
3361         * gnulib/import/intprops.h: New file.
3362         * gnulib/import/m4/chdir-long.m4: New file.
3363         * gnulib/import/m4/close.m4: New file.
3364         * gnulib/import/m4/closedir.m4: New file.
3365         * gnulib/import/m4/d-ino.m4: New file.
3366         * gnulib/import/m4/d-type.m4: New file.
3367         * gnulib/import/m4/dup.m4: New file.
3368         * gnulib/import/m4/dup2.m4: New file.
3369         * gnulib/import/m4/error.m4: New file.
3370         * gnulib/import/m4/fchdir.m4: New file.
3371         * gnulib/import/m4/fcntl.m4: New file.
3372         * gnulib/import/m4/fcntl_h.m4: New file.
3373         * gnulib/import/m4/fdopendir.m4: New file.
3374         * gnulib/import/m4/filenamecat.m4: New file.
3375         * gnulib/import/m4/fstat.m4: New file.
3376         * gnulib/import/m4/fstatat.m4: New file.
3377         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3378         * gnulib/import/m4/getcwd-path-max.m4: New file.
3379         * gnulib/import/m4/getcwd.m4: New file.
3380         * gnulib/import/m4/getdtablesize.m4: New file.
3381         * gnulib/import/m4/getlogin_r.m4: New file.
3382         * gnulib/import/m4/getprogname.m4: New file.
3383         * gnulib/import/m4/glob.m4: New file.
3384         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3385         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3386         * gnulib/import/m4/mempcpy.m4: New file.
3387         * gnulib/import/m4/memrchr.m4: New file.
3388         * gnulib/import/m4/mode_t.m4: New file.
3389         * gnulib/import/m4/msvc-inval.m4: New file.
3390         * gnulib/import/m4/msvc-nothrow.m4: New file.
3391         * gnulib/import/m4/open.m4: New file.
3392         * gnulib/import/m4/openat.m4: New file.
3393         * gnulib/import/m4/opendir.m4: New file.
3394         * gnulib/import/m4/readdir.m4: New file.
3395         * gnulib/import/m4/realloc.m4: New file.
3396         * gnulib/import/m4/rewinddir.m4: New file.
3397         * gnulib/import/m4/save-cwd.m4: New file.
3398         * gnulib/import/m4/strdup.m4: New file.
3399         * gnulib/import/m4/strerror.m4: New file.
3400         * gnulib/import/m4/unistd-safer.m4: New file.
3401         * gnulib/import/mempcpy.c: New file.
3402         * gnulib/import/memrchr.c: New file.
3403         * gnulib/import/msvc-inval.c: New file.
3404         * gnulib/import/msvc-inval.h: New file.
3405         * gnulib/import/msvc-nothrow.c: New file.
3406         * gnulib/import/msvc-nothrow.h: New file.
3407         * gnulib/import/open.c: New file.
3408         * gnulib/import/openat-die.c: New file.
3409         * gnulib/import/openat-priv.h: New file.
3410         * gnulib/import/openat-proc.c: New file.
3411         * gnulib/import/openat.c: New file.
3412         * gnulib/import/openat.h: New file.
3413         * gnulib/import/opendir.c: New file.
3414         * gnulib/import/pipe-safer.c: New file.
3415         * gnulib/import/readdir.c: New file.
3416         * gnulib/import/realloc.c: New file.
3417         * gnulib/import/rewinddir.c: New file.
3418         * gnulib/import/save-cwd.c: New file.
3419         * gnulib/import/save-cwd.h: New file.
3420         * gnulib/import/strdup.c: New file.
3421         * gnulib/import/strerror-override.c: New file.
3422         * gnulib/import/strerror-override.h: New file.
3423         * gnulib/import/strerror.c: New file.
3424         * gnulib/import/unistd--.h: New file.
3425         * gnulib/import/unistd-safer.h: New file.
3426         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3427         "getcwd" and "glob".
3428         * ser-tcp.c: Undefine "close" before redefining it.
3429
3430 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3431
3432         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3433         get rid of res_val.
3434
3435 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3436
3437         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3438         <sol2,sparc>: Likewise.
3439         <sol2-64,i386>: Likewise.
3440
3441         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3442         -Wdeprecated-declarations on *-*-solaris*.
3443         * configure: Regenerate.
3444
3445         * procfs.c: Include "nat/inferior.h".
3446         (procfs_info_proc): Fix typo.
3447
3448 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3449
3450         * remote.c (vector): Include.
3451         (struct private_thread_info): Add field, thread_handle.
3452         (free_private_thread_info): Deallocate storage associated with
3453         thread handle.
3454         (get_private_info_thread): Initialize `thread_handle' field.
3455         (struct thread_item): Add field, thread_handle.
3456         (clear_threads_listing_context): Deallocate storage associated
3457         with thread handle.
3458         (start_thread): Add support for "handle" attribute.
3459         (thread_attributes): Add "handle".
3460         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3461         field.
3462         (remote_update_thread_list): Update thread_handle.
3463         (remote_thread_handle_to_thread_info): New function.
3464         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3465
3466 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3467
3468         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3469         function.
3470         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3471         * python/python-internal.h (thread_object_type): Declare.
3472
3473 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3474
3475         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3476         (target_thread_handle_to_thread_info): Declare.
3477         * target.c (target_thread_handle_to_thread_info): New function.
3478         * target-delegates.c: Regenerate.
3479         * gdbthread.h (find_thread_by_handle): Declare.
3480         * thread.c (find_thread_by_handle): New function.
3481         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3482         function.
3483         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3484
3485 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3486
3487         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3488
3489 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3490
3491         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3492
3493 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3494
3495         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3496         to gdb_target_obs.
3497
3498 2017-09-20  Tom Tromey  <tom@tromey.com>
3499
3500         * breakpoint.c (struct counted_command_line): Remove.
3501         (breakpoint_commands): Update.
3502         (alloc_counted_command_line, incref_counted_command_line)
3503         (decref_counted_command_line, do_cleanup_counted_command_line)
3504         (make_cleanup_decref_counted_command_line): Remove.
3505         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3506         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3507         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3508         (save_breakpoints): Update.
3509         * breakpoint.h (counted_command_line): Now a typedef to
3510         shared_ptr.
3511         (struct breakpoint) <commands>: Now a counted_command_line.
3512         (struct bpstats) <command>: Likewise.
3513
3514 2017-09-20  Tom Tromey  <tom@tromey.com>
3515
3516         * breakpoint.c (struct commands_info, do_map_commands_command):
3517         Remove.
3518         (commands_command_1): Update.
3519         (iterate_over_related_breakpoints): Take a function_view.
3520         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3521         (delete_command): Update.
3522         (map_breakpoint_numbers): Take a function_view.
3523         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3524         (disable_command): Update.
3525         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3526         (enable_command): Update.
3527         (struct disp_data, do_enable_breakpoint_disp)
3528         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3529         (do_map_enable_delete_breakpoint): Remove.
3530         (enable_once_command, enable_count_command, enable_delete_command)
3531         (delete_trace_variable_command): Update.
3532
3533 2017-09-20  Tom Tromey  <tom@tromey.com>
3534
3535         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3536         (bpstat_clear): Use delete.
3537         (bpstats): New constructors.
3538         (bpstat_copy, bpstat_stop_status): Use new.
3539         (dprintf_after_condition_true): Update.
3540         * breakpoint.h (bpstats::bpstats): Add constructors.
3541         (bpstats::~bpstats): Add destructor.
3542
3543 2017-09-20  Pedro Alves  <palves@redhat.com>
3544
3545         * eval.c (make_params): Delete, refactored as ...
3546         (class fake_method): ... this new type's ctor.
3547         (fake_method::~fake_method): New.
3548         (evaluate_subexp_standard): Use 'fake_method'.
3549
3550 2017-09-20  Tom Tromey  <tom@tromey.com>
3551
3552         * windows-nat.c (get_windows_debug_event, windows_wait)
3553         (do_initial_windows_stuff, windows_attach): Update.
3554         * utils.c (vwarning, internal_vproblem): Update.
3555         (ui_unregister_input_event_handler_cleanup)
3556         (prepare_to_handle_input): Remove.
3557         (class scoped_input_handler): New.
3558         (defaulted_query, prompt_for_continue): Update.
3559         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3560         Update.
3561         * top.c (undo_terminal_modifications_before_exit): Update.
3562         * target/target.h (target_terminal_init, target_terminal_inferior)
3563         (target_terminal_ours): Don't declare.
3564         (class target_terminal): New.
3565         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3566         (target_terminal_ours_for_output)
3567         (make_cleanup_restore_target_terminal): Don't declare.
3568         (target_terminal_info): Remove.
3569         * target.c (enum terminal_state, terminal_state): Remove.
3570         (target_terminal::terminal_state): Define.
3571         (target_terminal::init): Rename from target_terminal_init.
3572         (target_terminal::inferior): Rename from
3573         target_terminal_inferior.
3574         (target_terminal::ours): Rename from target_terminal_ours.
3575         (target_terminal::ours_for_output): Rename from
3576         target_terminal_ours_for_output.
3577         (target_terminal::info): New method.
3578         (cleanup_restore_target_terminal)
3579         (make_cleanup_restore_target_terminal): Remove.
3580         * solib.c (handle_solib_event): Update.
3581         * remote.c (remote_serial_quit_handler): Update.
3582         (remote_terminal_inferior, remote_wait_as): Update.
3583         * record-full.c (record_full_wait_1): Update.
3584         * nto-procfs.c (procfs_create_inferior): Update.
3585         * nat/fork-inferior.c (startup_inferior): Update.
3586         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3587         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3588         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3589         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3590         (mi_breakpoint_created, mi_breakpoint_deleted)
3591         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3592         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3593         (mi_user_selected_context_changed, report_initial_inferior):
3594         Update.
3595         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3596         (linux_nat_terminal_inferior): Update.
3597         * infrun.c (follow_fork_inferior)
3598         (handle_vfork_child_exec_or_exit, do_target_resume)
3599         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3600         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3601         Update.
3602         * inflow.c (child_terminal_init, info_terminal_command): Update.
3603         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3604         (attach_command): Update.
3605         * infcall.c (call_thread_fsm_should_stop): Update.
3606         * gnu-nat.c (gnu_attach): Update.
3607         * extension.c (struct active_ext_lang_state)
3608         (restore_active_ext_lang): Update.
3609         * exceptions.c (print_flush): Update.
3610         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3611         (struct quit_handler_cleanup_data, restore_quit_handler)
3612         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3613         Remove.
3614         * cp-support.c (gdb_demangle): Update.
3615         * breakpoint.c (update_inserted_breakpoint_locations)
3616         (insert_breakpoint_locations, handle_jit_event)
3617         (disable_breakpoints_in_unloaded_shlib): Update.
3618         * annotate.c (annotate_breakpoints_invalid)
3619         (annotate_frames_invalid): Update.
3620
3621 2017-09-20  Tom Tromey  <tom@tromey.com>
3622
3623         * main.c (catch_command_errors): Rename from
3624         catch_command_errors_const.
3625         (captured_main_1): Update.
3626
3627 2017-09-20  Pedro Alves  <palves@redhat.com>
3628
3629         * cli/cli-cmds.c (list_command): Use print_sal_location.
3630         (print_sal_location): New function.
3631         (ambiguous_line_spec): Use print_sal_location.
3632         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3633         * symtab.c (find_function_start_sal): Likewise.
3634         * symtab.h (symtab_and_line::symbol): New field.
3635
3636 2017-09-20  Pedro Alves  <palves@redhat.com>
3637
3638         * linespec.c (minsym_found): Handle non-text minsyms.
3639         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3640
3641 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3642
3643         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3644         backslash.
3645
3646 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3647
3648         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3649         vmovups instead vmovaps.
3650         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3651
3652 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3653
3654         * NEWS (Changes since GDB 8.0): Add starti.
3655         * infcmd.c (enum run_break): New.
3656         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3657         case.
3658         (run_command): Use enum run_how.
3659         (start_command): Likewise.
3660         (starti_command): New function.
3661         (RUN_ARGS_HELP): New macro.
3662         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3663         commands.  Add starti command.
3664
3665 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3666
3667         * Makefile.in (monitor.o): Remove the rule.
3668
3669 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3670
3671         * annotate.h (struct annotate_arg_emitter): Use
3672         DISABLE_COPY_AND_ASSIGN.
3673         * common/refcounted-object.h (refcounted_object): Likewise.
3674         * completer.h (struct completion_result): Likewise.
3675         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3676         * filename-seen-cache.h (filename_seen_cache): Likewise.
3677         * gdbcore.h (thread_section_name): Likewise.
3678         * gdb_regex.h (compiled_regex): Likewise.
3679         * gdbthread.h (scoped_restore_current_thread): Likewise.
3680         * inferior.h (scoped_restore_current_inferior): Likewise.
3681         * jit.c (jit_reader): Likewise.
3682         * linespec.h (struct linespec_result): Likewise.
3683         * mi/mi-parse.h (struct mi_parse): Likewise.
3684         * nat/fork-inferior.c (execv_argv): Likewise.
3685         * progspace.h (scoped_restore_current_program_space): Likewise.
3686         * python/python-internal.h (class gdbpy_enter): Likewise.
3687         * regcache.h (regcache): Likewise.
3688         * target-descriptions.c (struct tdesc_reg): Likewise.
3689         (struct tdesc_type): Likewise.
3690         (struct tdesc_feature): Likewise.
3691         * ui-out.h (ui_out_emit_type): Likewise.
3692
3693 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3694
3695         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3696         label abort_expression.
3697
3698 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3699
3700         * common/buffer.c (buffer_xml_printf): Adjust.
3701         * common/xml-utils.c (xml_escape_text): Change return type to
3702         std::string, update code accordingly.
3703         * common/xml-utils.h (xml_escape_text): Change return type to
3704         std::string.
3705         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3706         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3707         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3708         Adjust.
3709
3710 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3711
3712         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3713         (SUBDIR_UNITTESTS_OBS): Add new object file.
3714         * unittests/xml-utils-selftests.c: New file.
3715
3716 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3717
3718         * common/selftest.h (selftest): New struct/interface.
3719         (register_test): Add name parameter, add new overload.
3720         (run_tests): Add filter parameter.
3721         (for_each_selftest_ftype): New typedef.
3722         (for_each_selftest): New declaration.
3723         * common/selftest.c (tests): Change type to
3724         map<string, unique_ptr<selftest>>.
3725         (simple_selftest): New struct.
3726         (register_test): New function.
3727         (register_test): Add name parameter and use it.
3728         (run_tests): Add filter parameter and use it.  Add prints.
3729         Adjust to vector -> map change.
3730         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3731         registering selftests.
3732         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3733         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3734         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3735         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3736         * findvar.c (_initialize_findvar): Likewise.
3737         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3738         * maint.c (maintenance_selftest): Update call to run_tests.
3739         (maintenance_info_selftests): New function.
3740         (_initialize_maint_cmds): Register "maintenance info selftests"
3741         command.  Update "maintenance selftest" doc.
3742         * regcache.c (_initialize_regcache): Add names when registering
3743         selftests.
3744         * rust-exp.y (_initialize_rust_exp): Likewise.
3745         * selftest-arch.c (gdbarch_selftest): New struct.
3746         (gdbarch_tests): Remove.
3747         (register_test_foreach_arch): Add name parameter.  Call
3748         register_test.
3749         (tests_with_arch): Remove, move most content to
3750         gdbarch_selftest::operator().
3751         (_initialize_selftests_foreach_arch): Remove.
3752         * selftest-arch.h (register_test_foreach_arch): Add name
3753         parameter.
3754         (run_tests_with_arch): New declaration.
3755         * utils-selftests.c (_initialize_utils_selftests): Add names
3756         when registering selftests.
3757         * utils.c (_initialize_utils): Likewise.
3758         * unittests/array-view-selftests.c
3759         (_initialize_array_view_selftests): Likewise.
3760         * unittests/environ-selftests.c (_initialize_environ_selftests):
3761         Likewise.
3762         * unittests/function-view-selftests.c
3763         (_initialize_function_view_selftests): Likewise.
3764         * unittests/offset-type-selftests.c
3765         (_initialize_offset_type_selftests): Likewise.
3766         * unittests/optional-selftests.c
3767         (_initialize_optional_selftests): Likewise.
3768         * unittests/scoped_restore-selftests.c
3769         (_initialize_scoped_restore_selftests): Likewise.
3770         * NEWS: Document "maintenance selftest" and "maint info
3771         selftests".
3772
3773 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3774
3775         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3776         scoped_restore.
3777
3778 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3779
3780         * mi/mi-main.c (mi_load_progress): Make uiout variable
3781         a unique_ptr.
3782
3783 2017-09-15  Pedro Alves  <palves@redhat.com>
3784
3785         * compile/compile-c-types.c (convert_enum, convert_int)
3786         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3787
3788 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3789
3790         * dwarf2read.c (copy_string): Remove.
3791         (parse_macro_definition): Replace copy_string with savestring.
3792
3793 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3794
3795         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3796         gdb_target_obs.
3797         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3798         Likewise.
3799         (i[34567]86-*-linux*): Likewise.
3800
3801 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3802
3803         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3804         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3805         <stack>: Change type to std::vector.
3806         <stack_len, stack_allocated>: Remove.
3807         <grow_stack>: Remove.
3808         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3809         (dwarf_expr_context::~dwarf_expr_context): Remove.
3810         (dwarf_expr_context::grow_stack): Remove.
3811         (dwarf_expr_context::push): Adjust.
3812         (dwarf_expr_context::pop): Adjust.
3813         (dwarf_expr_context::fetch): Adjust.
3814         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3815         (dwarf_expr_context::stack_empty_p): Adjust.
3816         (dwarf_expr_context::execute_stack_op): Adjust.
3817
3818 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3819
3820         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3821         return type to bool.
3822         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3823
3824 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3825
3826         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3827         Change type to bool.
3828         (dwarf_stack_value) <in_stack_memory>: Likewise.
3829         (dwarf_expr_context) <push_address>: Change parameter type to
3830         bool.
3831         <fetch_in_stack_memory>: Change return type to bool.
3832         <push>: Change parameter type to bool.
3833         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3834         to bool.
3835         (dwarf_expr_context::push_address): Likewise.
3836         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3837         to bool.
3838         (dwarf_expr_context::execute_stack_op): Adjust.
3839         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3840
3841 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3842
3843         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3844         (struct dwarf_expr_context) <n_pieces>: Remove.
3845         <pieces>: Change type to std::vector.
3846         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3847         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3848         pieces.
3849         (dwarf_expr_context::add_piece): Adjust.
3850         * dwarf2loc.c (struct piece_closure): Initialize fields.
3851         <n_pieces>: Remove.
3852         <pieces>: Change type to std::vector.
3853         (allocate_piece_closure): Adjust, change parameter to
3854         std::vector rvalue and std::move it to piece_closure.
3855         (rw_pieced_value): Adjust.
3856         (check_pieced_synthetic_pointer): Adjust.
3857         (indirect_synthetic_pointer): Adjust.
3858         (coerce_pieced_ref): Adjust.
3859         (free_pieced_value_closure):  Adjust.  Use delete to free
3860         piece_closure.
3861         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3862         to allocate_piece_closure.
3863         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3864
3865 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3866
3867         * probe.h (probe_ops_cp): Remove typedef.
3868         (DEF_VEC_P (probe_ops_cp)): Remove.
3869         (all_probe_ops): Change type to std::vector.
3870         * probe.c (info_probes_for_ops): Adjust to vector change.
3871         (probe_linespec_to_ops): Likewise.
3872         (all_probe_ops): Change type to std::vector.
3873         (_initialize_probe): Adjust to vector change.
3874         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3875         * elfread.c (elf_get_probes): Likewise.
3876         * stap-probe.c (_initialize_stap_probe): Likewise.
3877
3878 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3879
3880         * probe.h (struct bound_probe): Define constructors.
3881         * probe.c (bound_probe_s): Remove typedef.
3882         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3883         (collect_probes): Change return type to std::vector, remove
3884         cleanup.
3885         (compare_probes): Return bool, change parameter type.  Change
3886         semantic to "less than".
3887         (gen_ui_out_table_header_info): Change parameter to std::vector
3888         and update.
3889         (exists_probe_with_pops): Likewise.
3890         (info_probes_for_ops): Update to std::vector change.
3891         (enable_probes_command): Likewise.
3892         (disable_probes_command): Likewise.
3893
3894 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3895
3896         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3897         vec to std::vector.
3898         * probe.c (parse_probes_in_pspace): Update.
3899         (find_probes_in_objfile): Update.
3900         (find_probe_by_pc): Update.
3901         (collect_probes): Update.
3902         (probe_any_get_probes): Update.
3903         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3904         return type to reference to std::vector.
3905         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3906         std::vector and update.
3907         (dtrace_process_dof): Likewise.
3908         (dtrace_get_probes): Likewise.
3909         * elfread.c (elf_get_probes): Change return type to std::vector,
3910         store an std::vector in bfd_data.
3911         (probe_key_free): Update to std::vector.
3912         * stap-probe.c (handle_stap_probe): Change parameter to
3913         std::vector and update.
3914         (stap_get_probes): Likewise.
3915         * symfile-debug.c (debug_sym_get_probes): Change return type to
3916         std::vector and update.
3917
3918 2017-09-11  Tom Tromey  <tom@tromey.com>
3919
3920         * breakpoint.c (program_breakpoint_here_p): Update.
3921         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3922         from make_show_memory_breakpoints_cleanup.  Return a
3923         scoped_restore_tmpl<int>.
3924         (restore_show_memory_breakpoints): Remove.
3925         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3926         * mem-break.c (memory_validate_breakpoint): Update.
3927         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3928         (ia64_memory_remove_breakpoint): Update.
3929         (ia64_breakpoint_from_pc): Update.
3930         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3931         from make_show_memory_breakpoints_cleanup.
3932
3933 2017-09-11  Tom Tromey  <tom@tromey.com>
3934
3935         * d-namespace.c (d_lookup_symbol): Use std::string.
3936         (find_symbol_in_baseclass): Likewise.
3937
3938 2017-09-11  Tom Tromey  <tom@tromey.com>
3939
3940         * ctf.c (ctf_start): Use std::string.
3941
3942 2017-09-11  Tom Tromey  <tom@tromey.com>
3943
3944         * ada-lang.c (is_known_support_routine): Update.
3945         (ada_unhandled_exception_name_addr_from_raise): Update.
3946         * guile/scm-frame.c (gdbscm_frame_name): Update.
3947         * python/py-frame.c (frapy_name): Update.
3948         (frapy_function): Update.
3949         * stack.h (find_frame_funname): Update.
3950         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3951         (print_frame): Update.
3952
3953 2017-09-11  Tom Tromey  <tom@tromey.com>
3954
3955         * findcmd.c (put_bits): Take a gdb::byte_vector.
3956         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3957         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3958         cleanups.
3959         (find_command): Update.
3960
3961 2017-09-11  Tom Tromey  <tom@tromey.com>
3962
3963         * cli/cli-script.c (class scoped_restore_hook_in): New.
3964         (clear_hook_in_cleanup): Remove.
3965         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3966         scoped_restore_hook_in.
3967
3968 2017-09-11  Tom Tromey  <tom@tromey.com>
3969
3970         * cli/cli-script.c (restore_interp): Remove.
3971         (read_command_lines): Use scoped_restore_interp.
3972         * interps.c (scoped_restore_interp::set_temp): Rename from
3973         interp_set_temp.
3974         * interps.h (class scoped_restore_interp): New.
3975         (interp_set_temp): Remove.
3976
3977 2017-09-11  Tom Tromey  <tom@tromey.com>
3978
3979         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3980         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3981         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3982         scoped_restore.
3983         (mi_cmd_break_insert_1): Update.
3984         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3985         scoped_restore.
3986
3987 2017-09-11  Tom Tromey  <tom@tromey.com>
3988
3989         * demangle.c (demangle_command): Update.
3990         * breakpoint.c (disable_command): Update.
3991         (enable_command): Update.
3992         (find_location_by_number): Make "number" const.  Use
3993         get_number_trailer.
3994         * cli/cli-utils.c (extract_arg): Return std::string.
3995         * probe.c (parse_probe_linespec): Update.  Change types.
3996         (collect_probes): Take string arguments.
3997         (parse_probe_linespec): Likewise.
3998         (info_probes_for_ops): Update.
3999         (enable_probes_command): Update.
4000         (disable_probes_command): Update.
4001         * break-catch-sig.c (catch_signal_split_args): Update.
4002         * mi/mi-parse.c (mi_parse): Update.
4003
4004 2017-09-11  Tom Tromey  <tom@tromey.com>
4005
4006         * language.h (language_enum): Make argument const.
4007         * language.c (language_enum): Make argument const.
4008
4009 2017-09-11  Tom Tromey  <tom@tromey.com>
4010
4011         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4012         as function.
4013         (skip_to_space): Rename from skip_to_space_const.
4014         * common/common-utils.c (skip_to_space): New function.
4015         (skip_to_space): Rename from skip_to_space_const.
4016         * cli/cli-utils.h (get_number): Rename from get_number_const.
4017         (extract_arg): Rename from extract_arg_const.
4018         * cli/cli-utils.c (get_number): Rename from get_number_const.
4019         (extract_arg): Rename from extract_arg_const.
4020         (number_or_range_parser::get_number): Use ::get_number.
4021         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4022         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4023         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4024         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4025         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4026         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4027         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4028         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4029
4030 2017-09-11  Tom Tromey  <tom@tromey.com>
4031
4032         * python/python.c (do_start_initialization): Use
4033         py-event-types.def to initialize types.
4034         Define all object type structures.
4035         * python/python-internal.h: Don't declare event initialization
4036         functions.
4037         * python/py-threadevent.c (thread_event_object_type): Don't
4038         define.
4039         * python/py-stopevent.c (stop_event_object_type): Don't define.
4040         * python/py-signalevent.c (signal_event_object_type): Don't
4041         declare or define.
4042         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4043         (clear_objfiles_event_object_type): Don't declare or define.
4044         * python/py-infevents.c (inferior_call_pre_event_object_type)
4045         (inferior_call_post_event_object_type)
4046         (register_changed_event_object_type)
4047         (memory_changed_event_object_type): Don't declare or define.
4048         * python/py-inferior.c (new_thread_event_object_type)
4049         (new_inferior_event_object_type)
4050         (inferior_deleted_event_object_type): Don't declare or define.
4051         * python/py-exitedevent.c (exited_event_object_type): Don't
4052         declare or define.
4053         * python/py-evts.c (gdbpy_initialize_py_events): Use
4054         py-all-events.def.
4055         * python/py-events.h (thread_event_object_type): Don't declare.
4056         (events_object): Use py-all-events.def.
4057         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4058         py-event-types.def.
4059         * python/py-event-types.def: New file.
4060         * python/py-continueevent.c (create_continue_event_object): Don't
4061         declare or define.
4062         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4063         declare or define.
4064         * python/py-all-events.def: New file.
4065
4066 2017-09-11  Tom Tromey  <tom@tromey.com>
4067
4068         * python/py-threadevent.c (create_thread_event_object): Return
4069         gdbpy_ref.
4070         * python/py-stopevent.h (create_stop_event_object)
4071         (create_breakpoint_event_object, create_signal_event_object):
4072         Update.
4073         * python/py-stopevent.c (create_stop_event_object): Return
4074         gdbpy_ref.
4075         (emit_stop_event): Update.
4076         * python/py-signalevent.c (create_signal_event_object): Return
4077         gdbpy_ref.
4078         * python/py-infevents.c (create_inferior_call_event_object):
4079         Update.
4080         * python/py-event.h (create_event_object)
4081         (create_thread_event_object): Update.
4082         * python/py-event.c (create_event_object): Return gdbpy_ref.
4083         * python/py-continueevent.c: Return gdbpy_ref.
4084         * python/py-bpevent.c (create_breakpoint_event_object): Return
4085         gdbpy_ref.
4086
4087 2017-09-11  Tom Tromey  <tom@tromey.com>
4088
4089         PR python/15622:
4090         * NEWS: Add entry.
4091         * python/python.c (do_start_initialization): Initialize new event
4092         types.
4093         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4094         (gdbpy_initialize_inferior_deleted_event)
4095         (gdbpy_initialize_new_thread_event): Declare.
4096         * python/py-threadevent.c (create_thread_event_object): Add option
4097         "thread" parameter.
4098         * python/py-inferior.c (new_thread_event_object_type)
4099         (new_inferior_event_object_type)
4100         (inferior_deleted_event_object_type): Declare.
4101         (python_new_inferior, python_inferior_deleted): New functions.
4102         (add_thread_object): Emit new_thread event.
4103         (gdbpy_initialize_inferior): Attach new functions to corresponding
4104         observers.
4105         (new_thread, new_inferior, inferior_deleted): Define new event
4106         types.
4107         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4108         registries.
4109         * python/py-events.h (events_object) <new_inferior,
4110         inferior_deleted, new_thread>: New fields.
4111         * python/py-event.h (create_thread_event_breakpoint): Add optional
4112         "thread" parameter.
4113
4114 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4115
4116         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4117         check current_ui instead.
4118         (internal_vproblem): Likewise.
4119
4120 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4121
4122         * thread.c (print_thread_info_1): Remove unnecessary calls to
4123         uiout->is_mi_like_p.
4124
4125 2017-09-09  Tom Tromey  <tom@tromey.com>
4126
4127         * namespace.h (add_using_directive): Update.
4128         * namespace.c (add_using_directive): Change type of excludes to
4129         std::vector.
4130         * dwarf2read.c (read_import_statement): Use std::vector.
4131         (read_namespace): Update.
4132         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4133
4134 2017-09-09  Tom Tromey  <tom@tromey.com>
4135
4136         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4137
4138 2017-09-09  Tom Tromey  <tom@tromey.com>
4139
4140         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4141
4142 2017-09-09  Tom Tromey  <tom@tromey.com>
4143
4144         * stack.c (func_command): Use gdb::def_vector.
4145
4146 2017-09-09  Tom Tromey  <tom@tromey.com>
4147
4148         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4149         ui_out_emit_list, ui_out_emit_tuple.
4150         (mi_cmd_var_update): Likewise.
4151
4152 2017-09-09  Tom Tromey  <tom@tromey.com>
4153
4154         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4155         ui_out_redirect_pop.
4156         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4157         ui_out_redirect_pop.
4158         * utils.c (do_ui_out_redirect_pop)
4159         (make_cleanup_ui_out_redirect_pop): Remove.
4160         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4161         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4162         * ui-out.h (ui_out_redirect_pop): New class.
4163
4164 2017-09-09  Tom Tromey  <tom@tromey.com>
4165
4166         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4167         (list_available_thread_groups, mi_cmd_list_thread_groups)
4168         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4169         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4170         Likewise.
4171
4172 2017-09-09  Tom Tromey  <tom@tromey.com>
4173
4174         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4175         ui_out_emit_tuple.
4176
4177 2017-09-09  Tom Tromey  <tom@tromey.com>
4178
4179         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4180         * stack.c (print_frame): Use ui_out_emit_tuple.
4181         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4182         (info_spu_mailbox_command, info_spu_dma_command)
4183         (info_spu_proxydma_command): Likewise.
4184         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4185         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4186         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4187         ui_out_emit_tuple.
4188         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4189
4190 2017-09-09  Tom Tromey  <tom@tromey.com>
4191
4192         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4193         (class ui_out_emit_table): Update comment.
4194         * ui-out.c (do_cleanup_table_end)
4195         (make_cleanup_ui_out_table_begin_end): Remove.
4196         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4197         (info_spu_dma_cmdlist): Likewise.
4198         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4199         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4200         ui_out_emit_table.
4201
4202 2017-09-09  Tom Tromey  <tom@tromey.com>
4203
4204         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4205         ui_out_emit_list, gdb::optional.
4206
4207 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4208
4209         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4210         prototype.
4211         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4212         prototype.
4213         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4214         prototype.
4215         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4216         * ada-exp.y: Remove _initialize_ada_exp prototype.
4217         * ada-lang.c: Remove _initialize_ada_language prototype.
4218         * ada-tasks.c: Remove _initialize_tasks prototype.
4219         * addrmap.c: Remove _initialize_addrmap prototype.
4220         * agent.c: Remove _initialize_agent prototype.
4221         * aix-thread.c: Remove _initialize_aix_thread prototype.
4222         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4223         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4224         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4225         prototype.
4226         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4227         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4228         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4229         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4230         prototype.
4231         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4232         prototype.
4233         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4234         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4235         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4236         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4237         prototype.
4238         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4239         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4240         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4241         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4242         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4243         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4244         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4245         prototype.
4246         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4247         prototype.
4248         * annotate.c: Remove _initialize_annotate prototype.
4249         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4250         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4251         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4252         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4253         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4254         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4255         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4256         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4257         prototype.
4258         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4259         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4260         * auto-load.c: Remove _initialize_auto_load prototype.
4261         * auxv.c: Remove _initialize_auxv prototype.
4262         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4263         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4264         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4265         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4266         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4267         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4268         prototype.
4269         * break-catch-throw.c: Remove _initialize_break_catch_throw
4270         prototype.
4271         * breakpoint.c: Remove _initialize_breakpoint prototype.
4272         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4273         * btrace.c: Remove _initialize_btrace prototype.
4274         * charset.c: Remove _initialize_charset prototype.
4275         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4276         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4277         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4278         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4279         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4280         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4281         * coffread.c: Remove _initialize_coffread prototype.
4282         * compile/compile.c: Remove _initialize_compile prototype.
4283         * complaints.c: Remove _initialize_complaints prototype.
4284         * completer.c: Remove _initialize_completer prototype.
4285         * copying.awk: Remove _initialize_copying prototype.
4286         * copying.c: Regenerate.
4287         * core-regset.c: Remove _initialize_core_regset prototype.
4288         * corefile.c: Remove _initialize_core prototype.
4289         * corelow.c: Remove _initialize_corelow prototype.
4290         * cp-abi.c: Remove _initialize_cp_abi prototype.
4291         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4292         * cp-support.c: Remove _initialize_cp_support prototype.
4293         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4294         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4295         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4296         * ctf.c: Remove _initialize_ctf prototype.
4297         * d-lang.c: Remove _initialize_d_language prototype.
4298         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4299         prototype.
4300         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4301         * dbxread.c: Remove _initialize_dbxread prototype.
4302         * dcache.c: Remove _initialize_dcache prototype.
4303         * demangle.c: Remove _initialize_demangler prototype.
4304         * disasm-selftests.c: Remove _initialize_disasm_selftests
4305         prototype.
4306         * disasm.c: Remove _initialize_disasm prototype.
4307         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4308         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4309         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4310         prototype.
4311         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4312         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4313         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4314         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4315         * elfread.c: Remove _initialize_elfread prototype.
4316         * exec.c: Remove _initialize_exec prototype.
4317         * extension.c: Remove _initialize_extension prototype.
4318         * f-lang.c: Remove _initialize_f_language prototype.
4319         * f-valprint.c: Remove _initialize_f_valprint prototype.
4320         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4321         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4322         * filesystem.c: Remove _initialize_filesystem prototype.
4323         * findcmd.c: Remove _initialize_mem_search prototype.
4324         * fork-child.c: Remove _initialize_fork_child prototype.
4325         * frame-base.c: Remove _initialize_frame_base prototype.
4326         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4327         * frame.c: Remove _initialize_frame prototype.
4328         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4329         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4330         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4331         * gcore.c: Remove _initialize_gcore prototype.
4332         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4333         * gdbarch.c: Regenerate.
4334         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4335         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4336         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4337         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4338         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4339         * go-lang.c: Remove _initialize_go_language prototype.
4340         * go32-nat.c: Remove _initialize_go32_nat prototype.
4341         * guile/guile.c: Remove _initialize_guile prototype.
4342         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4343         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4344         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4345         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4346         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4347         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4348         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4349         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4350         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4351         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4352         prototype.
4353         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4354         prototype.
4355         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4356         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4357         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4358         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4359         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4360         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4361         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4362         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4363         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4364         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4365         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4366         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4367         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4368         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4369         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4370         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4371         prototype.
4372         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4373         prototype.
4374         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4375         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4376         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4377         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4378         * infcall.c: Remove _initialize_infcall prototype.
4379         * infcmd.c: Remove _initialize_infcmd prototype.
4380         * inferior.c: Remove _initialize_inferiors prototype.
4381         * inflow.c: Remove _initialize_inflow prototype.
4382         * infrun.c: Remove _initialize_infrun prototype.
4383         * interps.c: Remove _initialize_interpreter prototype.
4384         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4385         * jit.c: Remove _initialize_jit prototype.
4386         * language.c: Remove _initialize_language prototype.
4387         * linux-fork.c: Remove _initialize_linux_fork prototype.
4388         * linux-nat.c: Remove _initialize_linux_nat prototype.
4389         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4390         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4391         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4392         * m2-lang.c: Remove _initialize_m2_language prototype.
4393         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4394         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4395         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4396         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4397         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4398         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4399         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4400         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4401         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4402         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4403         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4404         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4405         * machoread.c: Remove _initialize_machoread prototype.
4406         * macrocmd.c: Remove _initialize_macrocmd prototype.
4407         * macroscope.c: Remove _initialize_macroscope prototype.
4408         * maint.c: Remove _initialize_maint_cmds prototype.
4409         * mdebugread.c: Remove _initialize_mdebugread prototype.
4410         * memattr.c: Remove _initialize_mem prototype.
4411         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4412         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4413         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4414         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4415         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4416         * microblaze-linux-tdep.c: Remove
4417         _initialize_microblaze_linux_tdep prototype.
4418         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4419         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4420         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4421         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4422         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4423         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4424         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4425         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4426         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4427         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4428         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4429         prototype.
4430         * mipsread.c: Remove _initialize_mipsread prototype.
4431         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4432         prototype.
4433         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4434         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4435         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4436         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4437         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4438         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4439         prototype.
4440         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4441         * nto-procfs.c: Remove _initialize_procfs prototype.
4442         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4443         * objc-lang.c: Remove _initialize_objc_language prototype.
4444         * objfiles.c: Remove _initialize_objfiles prototype.
4445         * observer.c: Remove observer_test_first_notification_function,
4446         observer_test_second_notification_function,
4447         observer_test_third_notification_function, and
4448         _initialize_observer prototypes.
4449         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4450         * osabi.c: Remove _initialize_gdb_osabi prototype.
4451         * osdata.c: Remove _initialize_osdata prototype.
4452         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4453         * parse.c: Remove _initialize_parse prototype.
4454         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4455         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4456         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4457         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4458         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4459         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4460         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4461         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4462         * printcmd.c: Remove _initialize_printcmd prototype.
4463         * probe.c: Remove _initialize_probe prototype.
4464         * proc-api.c: Remove _initialize_proc_api prototype.
4465         * proc-events.c: Remove _initialize_proc_events prototype.
4466         * proc-service.c: Remove _initialize_proc_service prototype.
4467         * procfs.c: Remove _initialize_procfs prototype.
4468         * psymtab.c: Remove _initialize_psymtab prototype.
4469         * python/python.c: Remove _initialize_python prototype.
4470         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4471         * record-btrace.c: Remove _initialize_record_btrace prototype.
4472         * record-full.c: Remove _initialize_record_full prototype.
4473         * record.c: Remove _initialize_record prototype.
4474         * regcache.c: Remove _initialize_regcache prototype.
4475         * reggroups.c: Remove _initialize_reggroup prototype.
4476         * remote-notif.c: Remove _initialize_notif prototype.
4477         * remote-sim.c: Remove _initialize_remote_sim prototype.
4478         * remote.c: Remove _initialize_remote prototype.
4479         * reverse.c: Remove _initialize_reverse prototype.
4480         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4481         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4482         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4483         prototype.
4484         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4485         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4486         * rust-exp.y: Remove _initialize_rust_exp prototype.
4487         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4488         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4489         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4490         * score-tdep.c: Remove _initialize_score_tdep prototype.
4491         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4492         prototype.
4493         * ser-go32.c: Remove _initialize_ser_dos prototype.
4494         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4495         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4496         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4497         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4498         * serial.c: Remove _initialize_serial prototype.
4499         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4500         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4501         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4502         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4503         * skip.c: Remove _initialize_step_skip prototype.
4504         * sol-thread.c: Remove _initialize_sol_thread prototype.
4505         * solib-aix.c: Remove _initialize_solib_aix prototype.
4506         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4507         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4508         * solib-frv.c: Remove _initialize_frv_solib prototype.
4509         * solib-spu.c: Remove _initialize_spu_solib prototype.
4510         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4511         * solib-target.c: Remove _initialize_solib_target prototype.
4512         * solib.c: Remove _initialize_solib prototype.
4513         * source.c: Remove _initialize_source prototype.
4514         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4515         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4516         prototype.
4517         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4518         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4519         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4520         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4521         prototype.
4522         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4523         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4524         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4525         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4526         prototype.
4527         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4528         prototype.
4529         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4530         prototype.
4531         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4532         prototype.
4533         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4534         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4535         prototype.
4536         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4537         prototype.
4538         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4539         prototype.
4540         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4541         prototype.
4542         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4543         prototype.
4544         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4545         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4546         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4547         * stabsread.c: Remove _initialize_stabsread prototype.
4548         * stack.c: Remove _initialize_stack prototype.
4549         * stap-probe.c: Remove _initialize_stap_probe prototype.
4550         * std-regs.c: Remove _initialize_frame_reg prototype.
4551         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4552         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4553         * symfile.c: Remove _initialize_symfile prototype.
4554         * symmisc.c: Remove _initialize_symmisc prototype.
4555         * symtab.c: Remove _initialize_symtab prototype.
4556         * target-dcache.c: Remove _initialize_target_dcache prototype.
4557         * target-descriptions.c: Remove _initialize_target_descriptions
4558         prototype.
4559         * thread.c: Remove _initialize_thread prototype.
4560         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4561         prototype.
4562         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4563         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4564         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4565         prototype.
4566         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4567         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4568         * tracefile.c: Remove _initialize_tracefile prototype.
4569         * tracepoint.c: Remove _initialize_tracepoint prototype.
4570         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4571         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4572         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4573         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4574         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4575         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4576         * tui/tui.c: Remove _initialize_tui prototype.
4577         * typeprint.c: Remove _initialize_typeprint prototype.
4578         * user-regs.c: Remove _initialize_user_regs prototype.
4579         * utils.c: Remove _initialize_utils prototype.
4580         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4581         * valarith.c: Remove _initialize_valarith prototype.
4582         * valops.c: Remove _initialize_valops prototype.
4583         * valprint.c: Remove _initialize_valprint prototype.
4584         * value.c: Remove _initialize_values prototype.
4585         * varobj.c: Remove _initialize_varobj prototype.
4586         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4587         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4588         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4589         * windows-nat.c: Remove _initialize_windows_nat,
4590         _initialize_check_for_gdb_ini, and _initialize_loadable
4591         prototypes.
4592         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4593         * xcoffread.c: Remove _initialize_xcoffread prototype.
4594         * xml-support.c: Remove _initialize_xml_support prototype.
4595         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4596         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4597         prototype.
4598         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4599         prototype.
4600         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4601
4602 2017-09-08  Keith Seitz  <keiths@redhat.com>
4603
4604         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4605         field.
4606
4607 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4608
4609         * f-valprint.c (f_val_print): Remove check for one byte
4610         sized integers. Remove printing of character type.
4611
4612 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4613             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4614             Bernhard Heckel  <bernhard.heckel@intel.com>
4615
4616         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4617         to maintain proper indentation when printing pointers/refs.
4618
4619 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4620
4621         GDB 8.0.1 released.
4622
4623 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4624
4625         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4626
4627 2017-09-05  Tom Tromey  <tom@tromey.com>
4628
4629         * parse.c (funcall_chain): Now a std::vector.
4630         (start_arglist, end_arglist): Simplify.
4631         (free_funcalls): Remove.
4632         (parse_exp_in_context_1): Remove cleanup.
4633
4634 2017-09-05  Tom Tromey  <tom@tromey.com>
4635
4636         * go-exp.y (go_parse): Don't create a cleanup.
4637
4638 2017-09-05  Tom Tromey  <tom@tromey.com>
4639
4640         * d-exp.y (PrimaryExpression): Use std::string.
4641         (d_parse): Don't create a cleanup.
4642
4643 2017-09-05  Tom Tromey  <tom@tromey.com>
4644
4645         * utils.c (do_clear_parser_state): Remove.
4646         (make_cleanup_clear_parser_state): Remove.
4647         * p-exp.y (pascal_parse): Use scoped_restore.
4648         * m2-exp.y (m2_parse): Use scoped_restore.
4649         * f-exp.y (f_parse): Use scoped_restore.
4650         * d-exp.y (d_parse): Use scoped_restore.
4651         * c-exp.y (c_parse): Use scoped_restore.
4652         * ada-exp.y (ada_parse): Use scoped_restore.
4653         * utils.h (make_cleanup_clear_parser_state): Remove.
4654
4655 2017-09-06  Keith Seitz  <keiths@redhat.com>
4656
4657         * dwarf2read.c (dw2_linkage_name_attr): New function.
4658         (dw2_linkage_name): New function.
4659         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4660         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4661         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4662
4663 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4664
4665         * config/djgpp/djconfig.sh: Correct shell portability issue.
4666
4667 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4668
4669         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4670
4671 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4672
4673         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4674         * NEWS: Mention new FreeBSD/mips native configuration.
4675         * configure.host: Add aarch64*-*-freebsd*.
4676         * configure.nat: Likewise.
4677         * aarch64-fbsd-nat.c: New file.
4678
4679 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4680
4681         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4682         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4683         * NEWS: Mention new FreeBSD/aarch64 target.
4684         * configure.tgt: Add aarch64*-*-freebsd*.
4685         * aarch64-fbsd-tdep.c: New file.
4686         * aarch64-fbsd-tdep.h: New file.
4687
4688 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4689
4690         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4691
4692 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4693
4694         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4695         of TLS symbols.
4696
4697 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4698
4699         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4700         call.
4701
4702 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4703
4704         * infrun.c (follow_exec): Call add_thread after
4705         target_find_description.
4706
4707 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4708
4709         * infrun.c (handle_inferior_event_1): When exec'ing, read
4710         stop_pc after follow_exec.
4711
4712 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4713
4714         * remote.c (process_g_packet): Update error message.
4715
4716 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4717
4718         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4719         targets.
4720
4721 2017-09-05  Pedro Alves  <palves@redhat.com>
4722
4723         * eval.c (eval_call, evaluate_funcall): New functions, factored
4724         out from ...
4725         (evaluate_subexp_standard): ... this.
4726
4727 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4728
4729         * amd64-tdep.c (amd64_target_description): Create target
4730         descriptions.
4731         (_initialize_amd64_tdep): Don't call functions
4732         initialize_tdesc_amd64_*.  Add self tests.
4733         * arch/amd64.c (amd64_create_target_description): Add parameter
4734         is_linux.  Call set_tdesc_osabi if is_linux is true.
4735         * arch/amd64.h (amd64_create_target_description): Update the
4736         declaration.
4737         * arch/i386.c (i386_create_target_description): Add parameter
4738         is_linux.  Call set_tdesc_osabi if is_linux is true.
4739         * arch/i386.h (i386_create_target_description): Update
4740         declaration.
4741         * configure.tgt: Add i386.o to gdb_target_obs.
4742         * features/Makefile (XMLTOC): Remove i386/*.xml.
4743         * features/i386/amd64-avx-avx512.c: Remove.
4744         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4745         * features/i386/amd64-avx-mpx.c: Remove.
4746         * features/i386/amd64-avx.c: Remove.
4747         * features/i386/amd64-mpx.c: Remove.
4748         * features/i386/amd64.c: Remove.
4749         * features/i386/i386-avx-avx512.c: Remove.
4750         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4751         * features/i386/i386-avx-mpx.c: Remove.
4752         * features/i386/i386-avx.c: Remove.
4753         * features/i386/i386-mmx.c: Remove.
4754         * features/i386/i386-mpx.c: Remove.
4755         * features/i386/i386.c: Remove.
4756         * i386-tdep.c: Don't include features/i386/i386*.c., include
4757         target-descriptions.h and arch/i386.h.
4758         (i386_target_description): Create target descriptions.
4759         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4760         functions.  Do self tests.
4761
4762 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4763
4764         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4765         * features/i386/amd64-avx-avx512-linux.c: Removed.
4766         * features/i386/amd64-avx-linux.c: Removed.
4767         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4768         * features/i386/amd64-avx-mpx-linux.c: Removed.
4769         * features/i386/amd64-linux.c: Removed.
4770         * features/i386/amd64-mpx-linux.c: Removed.
4771         * features/i386/x32-avx-avx512-linux.c: Removed.
4772         * features/i386/x32-avx-linux.c: Removed.
4773         * features/i386/x32-linux.c: Removed.
4774
4775 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4776
4777         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4778         features/i386/*.c.
4779         (amd64_linux_read_description): Call
4780         amd64_create_target_description.
4781         * arch/amd64.c: New file.
4782         * arch/amd64.h: New file.
4783         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4784         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4785
4786 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4787
4788         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4789         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4790         (amd64_linux_read_description): Create target descriptions.
4791         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4792         functions.  Add unit tests.
4793         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4794         x32-core.xml.
4795         * features/i386/64bit-avx.c: Generated.
4796         * features/i386/64bit-avx512.c: Generated.
4797         * features/i386/64bit-core.c: Generated.
4798         * features/i386/64bit-linux.c: Generated.
4799         * features/i386/64bit-mpx.c: Generated.
4800         * features/i386/64bit-pkeys.c: Generated.
4801         * features/i386/64bit-segments.c: Generated.
4802         * features/i386/64bit-sse.c: Generated.
4803         * features/i386/x32-core.c: Generated.
4804         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4805         c files for amd64-linux and x32-linux.
4806
4807 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4808
4809         * amd64-linux-tdep.c (amd64_linux_read_description): New
4810         function.
4811         (amd64_linux_core_read_description): Call
4812         amd64_linux_read_description.
4813         (amd64_linux_init_abi): Likewise.
4814         (amd64_x32_linux_init_abi): Likewise.
4815         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4816         * x86-linux-nat.c (x86_linux_read_description): Call
4817         amd64_linux_read_description.
4818
4819 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4820
4821         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4822         comments.
4823
4824 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4825
4826         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4827         * features/i386/i386-avx-avx512-linux.c: Remove.
4828         * features/i386/i386-avx-linux.c: Remove.
4829         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4830         * features/i386/i386-avx-mpx-linux.c: Remove.
4831         * features/i386/i386-linux.c: Remove.
4832         * features/i386/i386-mmx-linux.c: Remove.
4833         * features/i386/i386-mpx-linux.c: Remove.
4834
4835 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4836
4837         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4838         (SFILES): Add arch/i386.c.
4839         (HFILES_NO_SRCDIR): Add arch/i386.h.
4840         * arch/i386.c: New file.
4841         * arch/i386.h: New file.
4842         * arch/tdesc.h (allocate_target_description): Declare.
4843         (set_tdesc_architecture): Declare.
4844         (set_tdesc_osabi): Declare.
4845         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4846         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4847         include arch/i386.h.
4848         (i386_linux_read_description): Remove code and call
4849         i386_create_target_description.
4850         (set_tdesc_architecture): New function.
4851         (set_tdesc_osabi): New function.
4852         * target-descriptions.h (allocate_target_description): Remove.
4853
4854 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4855
4856         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4857         * target-descriptions.c (tdesc_create_feature): Likewise, and
4858         adjust code.
4859         * features/i386/32bit-avx.c: Re-generated.
4860         * features/i386/32bit-avx512.c: Re-generated.
4861         * features/i386/32bit-core.c: Re-generated.
4862         * features/i386/32bit-linux.c: Re-generated.
4863         * features/i386/32bit-mpx.c: Re-generated.
4864         * features/i386/32bit-pkeys.c: Re-generated.
4865         * features/i386/32bit-sse.c: Re-generated.
4866
4867 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4868
4869         * regformats/regdef.h (struct reg): Override operator == and !=.
4870
4871 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4872
4873         * arch/tdesc.h: New file.
4874         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4875         * target-descriptions.c: Update comments.
4876         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4877         declarations.
4878         * features/i386/32bit-avx.c: Re-generated.
4879         * features/i386/32bit-avx512.c: Re-generated.
4880         * features/i386/32bit-core.c: Re-generated.
4881         * features/i386/32bit-linux.c: Re-generated.
4882         * features/i386/32bit-mpx.c: Re-generated.
4883         * features/i386/32bit-pkeys.c: Re-generated.
4884         * features/i386/32bit-sse.c: Re-generated.
4885
4886 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4887
4888         * regformats/regdat.sh: Update generated code.
4889
4890 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4891
4892         * regformats/regdat.sh: Adjust code order.
4893
4894 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4895
4896         * expprint.c (dump_subexp_body_standard): Use constant format
4897         string in fprintf_filtered call.
4898
4899 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4900
4901         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4902         NetBSD/i386.
4903         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4904
4905 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4906
4907         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4908
4909 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4910
4911         * bsd-kvm.o: Define _KMEMUSER.
4912         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4913         * configure: Regenerate.
4914
4915 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4916
4917         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4918         * i386-fbsd-nat.c: Likewise.
4919
4920 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4921
4922         * unittests/array-view-selftests.c: Add include of <array>.
4923
4924 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4925
4926         * spu-tdep.c (flush_ea_cache): Add missing argument to
4927         call_function_by_hand.
4928
4929 2017-09-04  Pedro Alves  <palves@redhat.com>
4930
4931         * NEWS (Safer support for debugging with no debug info): New.
4932
4933 2017-09-04  Pedro Alves  <palves@redhat.com>
4934
4935         * c-exp.y (function_method, function_method_void): Add current
4936         instance flags to TYPE_INSTANCE.
4937         * dwarf2read.c (check_modifier): New.
4938         (compute_delayed_physnames): Assert that only C++ adds delayed
4939         physnames.  Mark fn_fields as const/volatile depending on
4940         physname.
4941         * eval.c (make_params): New type_instance_flags parameter.  Use
4942         it as the new type's instance flags.
4943         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4944         flags element and pass it to make_params.
4945         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4946         instance flags element.
4947         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4948         * gdbtypes.h: Include "enum-flags.h".
4949         (type_instance_flags): New enum-flags type.
4950         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4951         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4952         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4953         (follow_type_instance_flags): New function.
4954         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4955         * parser-defs.h (follow_type_instance_flags): Declare.
4956         * valops.c (value_struct_elt_for_reference): const/volatile must
4957         match too.
4958
4959 2017-09-04  Pedro Alves  <palves@redhat.com>
4960
4961         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4962         function/method scopes; lookup the nested name as a function local
4963         static variable.
4964
4965 2017-09-04  Pedro Alves  <palves@redhat.com>
4966
4967         (%type <voidval>): Add function_method.
4968         * c-exp.y (exp): New production for calls with no arguments.
4969         (function_method, function_method_void_or_typelist): New
4970         productions.
4971         (exp): New production for "method()::static_var".
4972         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4973         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4974         Handle OP_FUNC_STATIC_VAR.
4975         * parse.c (operator_length_standard):
4976         Handle OP_FUNC_STATIC_VAR.
4977
4978 2017-09-04  Pedro Alves  <palves@redhat.com>
4979
4980         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4981         handling.
4982         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4983         Ditto.
4984         * parse.c (operator_length_standard, operator_check_standard):
4985         Ditto.
4986         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4987
4988 2017-09-04  Pedro Alves  <palves@redhat.com>
4989
4990         * ax-gdb.c: Include "typeprint.h".
4991         (gen_expr_for_cast): New function.
4992         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4993         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4994         type is unknown.
4995         * dwarf2read.c (new_symbol_full): Fallback to int instead of
4996         nodebug_data_symbol.
4997         * eval.c: Include "typeprint.h".
4998         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4999         Error out if symbol has unknown type.
5000         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5001         evaluate_subexp_for_cast.
5002         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5003         OP_VAR_MSYM_VALUE.
5004         (evaluate_subexp_for_cast): New function.
5005         * gdbtypes.c (init_nodebug_var_type): New function.
5006         (objfile_type): Use it to initialize types of variables with no
5007         debug info.
5008         * typeprint.c (error_unknown_type): New.
5009         * typeprint.h (error_unknown_type): New declaration.
5010         * compile/compile-c-types.c (convert_type_basic): Handle
5011         TYPE_CODE_ERROR; warn and fallback to int for variables with
5012         unknown type.
5013
5014 2017-09-04  Pedro Alves  <palves@redhat.com>
5015
5016         * eval.c (evaluate_var_value): New function, factored out from ...
5017         (evaluate_subexp_standard): ... here.
5018
5019 2017-09-04  Pedro Alves  <palves@redhat.com>
5020
5021         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5022         Remove useless assignments to 'op'.
5023
5024 2017-09-04  Pedro Alves  <palves@redhat.com>
5025
5026         * eval.c (eval_skip_value): New function.
5027         (evaluate_subexp_standard): Use it.
5028
5029 2017-09-04  Pedro Alves  <palves@redhat.com>
5030
5031         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5032         function name from symbol/minsym and pass it to
5033         error_call_unknown_return_type.
5034
5035 2017-09-04  Pedro Alves  <palves@redhat.com>
5036
5037         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5038         * ax-gdb.c (gen_msym_var_ref): New function.
5039         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5040         * eval.c (evaluate_var_msym_value): New function.
5041         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5042         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5043         to call_function_by_hand.
5044         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5045         Handle OP_VAR_MSYM_VALUE.
5046         (union exp_element) <msymbol>: New field.
5047         * minsyms.h (struct type): Forward declare.
5048         (find_minsym_type_and_address): Declare.
5049         * parse.c (write_exp_elt_msym): New function.
5050         (write_exp_msymbol): Delete, refactored as ...
5051         (find_minsym_type_and_address): ... this new function.
5052         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5053         (operator_length_standard, operator_check_standard): Handle
5054         OP_VAR_MSYM_VALUE.
5055         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5056
5057 2017-09-04  Pedro Alves  <palves@redhat.com>
5058
5059         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5060         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5061         unknown.
5062         * ada-typeprint.c (print_func_type): Handle functions with unknown
5063         return type.
5064         * c-typeprint.c (c_type_print_base): Handle functions and methods
5065         with unknown return type.
5066         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5067         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5068         * compile/compile-c-types.c: Include "objfiles.h".
5069         (convert_func): For functions with unknown return type, warn and
5070         default to int.
5071         * compile/compile-object-run.c (compile_object_run): Adjust call
5072         to call_function_by_hand_dummy.
5073         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5074         call_function_by_hand.
5075         * eval.c (evaluate_subexp_standard): Adjust calls to
5076         call_function_by_hand.  Handle functions and methods with unknown
5077         return type.  Pass expect_type to call_function_by_hand.
5078         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5079         return type.
5080         * gcore.c (call_target_sbrk): Adjust call to
5081         call_function_by_hand.
5082         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5083         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5084         an integer address type instead of nodebug.
5085         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5086         call_function_by_hand.
5087         * infcall.c (error_call_unknown_return_type): New function.
5088         (call_function_by_hand): New "default_return_type" parameter.
5089         Pass it down.
5090         (call_function_by_hand_dummy): New "default_return_type"
5091         parameter.  Use it instead of defaulting to int.  If there's no
5092         default and the return type is unknown, throw an error.  If
5093         there's a default return type, and the called function has no
5094         debug info, then assume the function is prototyped.
5095         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5096         New "default_return_type" parameter.
5097         (error_call_unknown_return_type): New declaration.
5098         * linux-fork.c (call_lseek): Cast return type of lseek.
5099         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5100         call_function_by_hand.
5101         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5102         calls to call_function_by_hand.
5103         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5104         return type.
5105         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5106         (value_nsstring, print_object_command): Adjust calls to
5107         call_function_by_hand.
5108         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5109         functions with unknown return type.
5110         (pascal_type_print_func_varspec_suffix): New function.
5111         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5112         TYPE_CODE_METHOD>: Use it.
5113         * python/py-value.c (valpy_call): Adjust call to
5114         call_function_by_hand.
5115         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5116         call_function_by_hand.
5117         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5118         call_function_by_hand.
5119         * valops.c (value_allocate_space_in_inferior): Adjust call to
5120         call_function_by_hand.
5121         * typeprint.c (type_print_unknown_return_type): New function.
5122         * typeprint.h (type_print_unknown_return_type): New declaration.
5123
5124 2017-09-04  Pedro Alves  <palves@redhat.com>
5125
5126         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5127         types with more than one parameter as prototyped.
5128
5129 2017-09-04  Pedro Alves  <palves@redhat.com>
5130
5131         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5132         (disassemble_command): Use gdb_disassembly_flags instead of bare
5133         int.
5134         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5135         (dump_insns, do_mixed_source_and_assembly_deprecated)
5136         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5137         Use gdb_disassembly_flags instead of bare int.
5138         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5139         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5140         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5141         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5142         (enum gdb_disassembly_flag): ... values of this new enumeration.
5143         (gdb_disassembly_flags): Define.
5144         (gdb_disassembly)
5145         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5146         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5147         gdb_disassembly_flags instead of bare int.
5148         * record-btrace.c (btrace_insn_history)
5149         (record_btrace_insn_history, record_btrace_insn_history_range)
5150         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5151         instead of bare int.
5152         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5153         Use gdb_disassembly_flags instead of bare int.
5154         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5155         Define.
5156         * target-delegates.c: Regenerate.
5157         * target.c (target_insn_history, target_insn_history_from)
5158         (target_insn_history_range): Use gdb_disassembly_flags instead of
5159         bare int.
5160         * target.h: Include "disasm.h".
5161         (struct target_ops) <to_insn_history, to_insn_history_from,
5162         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5163         int.
5164         (target_insn_history, target_insn_history_from)
5165         (target_insn_history_range): Use gdb_disassembly_flags instead of
5166         bare int.
5167
5168 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5169
5170         * cli/cli-script.c (build_command_line): For if/while commands,
5171         check whether args is empty.
5172
5173 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5174
5175         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5176         (enum command_control_type): Likewise.
5177         (struct command_line): Likewise.
5178         (free_command_lines): Likewise.
5179         (struct command_lines_deleter): Likewise.
5180         (command_line_up): Likewise.
5181         (read_command_lines): Likewise.
5182         (read_command_lines_1): Likewise.
5183         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5184         (enum command_control_type): Likewise.
5185         (struct command_line): Likewise.
5186         (free_command_lines): Likewise.
5187         (struct command_lines_deleter): Likewise.
5188         (command_line_up): Likewise.
5189         (read_command_lines): Likewise.
5190         (read_command_lines_1): Likewise.
5191         * breakpoint.h: Include cli/cli-script.h.
5192         * extension-priv.h: Likewise.
5193         * gdbcmd.h: Likewise.
5194
5195 2017-09-04  Pedro Alves  <palves@redhat.com>
5196
5197         * ada-lang.c (is_known_support_routine): Move sal declaration to
5198         where it is initialized.
5199         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5200         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5201         (clear_command, update_static_tracepoint): Remove init_sal
5202         references.  Move declarations closer to initializations.
5203         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5204         initializations.
5205         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5206         references.  Move sal declarations closer to initializations.
5207         * frame.c (find_frame_sal): Return a symtab_and_line via function
5208         return instead of output parameter.  Remove init_sal references.
5209         * frame.h (find_frame_sal): Return a symtab_and_line via function
5210         return instead of output parameter.
5211         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5212         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5213         instead of memset.
5214         (gdbscm_find_pc_line): Remove init_sal reference.
5215         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5216         references.  Move declarations closer to initializations.
5217         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5218         initializations.
5219         (finish_backward): Remove init_sal references.  Move declarations
5220         closer to initializations.
5221         * infrun.c (process_event_stop_test, handle_step_into_function)
5222         (insert_hp_step_resume_breakpoint_at_frame)
5223         (insert_step_resume_breakpoint_at_caller): Likewise.
5224         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5225         (symbol_to_sal): Likewise.
5226         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5227         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5228         to its initialization.
5229         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5230         init_sal references.  Move declarations closer to initializations.
5231         * source.c (get_current_source_symtab_and_line): Remove brace
5232         initialization.
5233         (set_current_source_symtab_and_line): Now takes the sal by const
5234         reference.  Remove brace initialization.
5235         (line_info): Remove init_sal reference.
5236         * source.h (set_current_source_symtab_and_line): Now takes a
5237         symtab_and_line via const reference.
5238         * stack.c (set_current_sal_from_frame): Adjust.
5239         (print_frame_info): Adjust.
5240         (get_last_displayed_sal): Return the sal via function return
5241         instead of via output parameter.  Simplify.
5242         (frame_info): Adjust.
5243         * stack.h (get_last_displayed_sal): Return the sal via function
5244         return instead of via output parameter.
5245         * symtab.c (init_sal): Delete.
5246         (find_pc_sect_line): Remove init_sal references.  Move
5247         declarations closer to initializations.
5248         (find_function_start_sal): Remove init_sal references.  Move
5249         declarations closer to initializations.
5250         * symtab.h (struct symtab_and_line): In-class initialize all
5251         fields.
5252         * tracepoint.c (set_traceframe_context)
5253         (print_one_static_tracepoint_marker): Remove init_sal references.
5254         Move declarations closer to initializations.
5255         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5256         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5257         declarations closer to initializations.
5258         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5259         init_sal references.  Adjust.
5260
5261 2017-09-04  Pedro Alves  <palves@redhat.com>
5262
5263         * ax-gdb.c (agent_command_1): Use range-for.
5264         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5265         * breakpoint.c: Include "common/array-view.h".
5266         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5267         parameter from struct symtabs_and_lines to
5268         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5269         (breakpoint_sals_to_pc): Change sals parameter from struct
5270         symtabs_and_lines to std::vector reference.
5271         (check_fast_tracepoint_sals): Change sals parameter from struct
5272         symtabs_and_lines to std::array_view.  Use range-for.
5273         (decode_static_tracepoint_spec): Return a std::vector instead of
5274         symtabs_and_lines.  Update.
5275         (create_breakpoint): Update.
5276         (break_range_command, until_break_command, clear_command): Update.
5277         (base_breakpoint_decode_location, bkpt_decode_location)
5278         (bkpt_probe_create_sals_from_location)
5279         (bkpt_probe_decode_location, tracepoint_decode_location)
5280         (tracepoint_probe_decode_location)
5281         (strace_marker_create_sals_from_location): Return a std::vector
5282         instead of symtabs_and_lines.
5283         (strace_marker_create_breakpoints_sal): Update.
5284         (strace_marker_decode_location): Return a std::vector instead of
5285         symtabs_and_lines.  Update.
5286         (update_breakpoint_locations): Change struct symtabs_and_lines
5287         parameters to gdb::array_view.  Adjust.
5288         (location_to_sals): Return a std::vector instead of
5289         symtabs_and_lines.  Update.
5290         (breakpoint_re_set_default): Use std::vector instead of struct
5291         symtabs_and_lines.
5292         (decode_location_default): Return a std::vector instead of
5293         symtabs_and_lines.  Update.
5294         * breakpoint.h: Include "common/array-view.h".
5295         (struct breakpoint_ops) <decode_location>: Now returns a
5296         std::vector instead of returning a symtabs_and_lines via output
5297         parameter.
5298         (update_breakpoint_locations): Change sals parameters to use
5299         gdb::array_view.
5300         * cli/cli-cmds.c (edit_command, list_command): Update to use
5301         std::vector and gdb::array_view.
5302         (ambiguous_line_spec): Adjust to use gdb::array_view and
5303         range-for.
5304         (compare_symtabs): Rename to ...
5305         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5306         const reference and adjust.
5307         (filter_sals): Rewrite using std::vector and standard algorithms.
5308         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5309         (jump_command): Update to use std::vector.
5310         * linespec.c (struct linespec_state) <canonical_names>: Update
5311         comment.
5312         (add_sal_to_sals_basic): Delete.
5313         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5314         (decode_line_2, create_sals_line_offset)
5315         (convert_address_location_to_sals, convert_linespec_to_sals)
5316         (convert_explicit_location_to_sals, parse_linespec)
5317         (event_location_to_sals, decode_line_full, decode_line_1)
5318         (decode_line_with_current_source)
5319         (decode_line_with_last_displayed, decode_objc)
5320         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5321         (linespec_result::~linespec_result): Adjust to use std::vector
5322         instead of symtabs_and_lines.
5323         * linespec.h (linespec_sals::sals): Now a std::vector.
5324         (struct linespec_result): Use std::vector, bool, and in-class
5325         initialization.
5326         (decode_line_1, decode_line_with_current_source)
5327         (decode_line_with_last_displayed): Return std::vector.
5328         * macrocmd.c (info_macros_command): Use std::vector.
5329         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5330         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5331         std::vector.
5332         * probe.h (parse_probes): Return a std::vector.
5333         * python/python.c (gdbpy_decode_line): Use std::vector and
5334         gdb::array_view.
5335         * source.c (select_source_symtab, line_info): Use std::vector.
5336         * stack.c (func_command): Use std::vector.
5337         * symtab.h (struct symtabs_and_lines): Delete.
5338         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5339
5340 2017-09-04  Pedro Alves  <palves@redhat.com>
5341
5342         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5343         unittests/array-view-selftests.c.
5344         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5345         * common/array-view.h: New file.
5346         * unittests/array-view-selftests.c: New file.
5347
5348 2017-09-04  Pedro Alves  <palves@redhat.com>
5349
5350         * cli/cli-cmds.c (edit_command): Pass message to
5351         ambiguous_line_spec.
5352         (list_command): Pass message to ambiguous_line_spec.  Say
5353         "first"/"last" instead of "start" and "end" to be consistent with
5354         the manual.
5355         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5356         them to print formatted message.
5357
5358 2017-09-04  Pedro Alves  <palves@redhat.com>
5359
5360         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5361         ftrace_update_insns by reference instead of pointer.
5362
5363 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5364
5365         * i386-go32-tdep.c: Include x86-xstate.h.
5366         (i386_go32_init_abi): Call i386_target_description.
5367         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5368         if xcr0 is X86_XSTATE_X87_MASK.
5369         * i386-tdep.h (tdesc_i386): Remove the declaration.
5370         (tdesc_i386_mmx): Likewise.
5371
5372 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5373
5374         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5375         X86_XSTATE_SSE_MASK instead of 0.
5376
5377 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5378
5379         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5380         i386_target_description.
5381         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5382         i386_target_description.
5383         * i386-tdep.c (i386_gdbarch_init): Likewise.
5384
5385 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5386
5387         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5388         (x86_darwin_init_abi_64): Call amd64_target_description.
5389         * amd64-dicos-tdep.c: Likewise.
5390         * amd64-fbsd-nat.c: Likewise.
5391         * amd64-fbsd-tdep.c: Likewise.
5392         * amd64-nbsd-tdep.c: Likewise.
5393         * amd64-obsd-tdep.c: Likewise.
5394         * amd64-sol2-tdep.c: Likewise.
5395         * amd64-windows-tdep.c: Likewise.
5396         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5397
5398 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5399
5400         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5401         (btrace_function) <insn>: Change type to use std::vector.
5402         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5403         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5404         ftrace_update_insns, ftrace_compute_global_level_offset,
5405         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5406         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5407         change to std::vector.
5408         (ftrace_update_insns): Adjust to change to std::vector, change
5409         type of INSN parameter.
5410         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5411         * record-btrace.c (btrace_call_history_insn_range,
5412         btrace_compute_src_line_range,
5413         record_btrace_frame_prev_register): Adjust to change to
5414         std::vector.
5415         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5416         to change to std::vector.
5417
5418 2017-09-03  Tom Tromey  <tom@tromey.com>
5419
5420         * corefile.c (reopen_exec_file): Use std::string.
5421
5422 2017-09-03  Tom Tromey  <tom@tromey.com>
5423
5424         * compile/compile.c (compile_register_name_mangled): Return
5425         std::string.
5426         * compile/compile-loc2c.c (pushf_register_address): Update.
5427         (pushf_register): Update.
5428         * compile/compile-c-types.c (convert_array): Update.
5429         * compile/compile-c-symbols.c (generate_vla_size): Update.
5430         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5431         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5432         (convert_one_symbol): Update.
5433         (generate_c_for_for_one_variable): Update.
5434         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5435         std::string.
5436         (generate_register_struct): Update.
5437         * compile/compile-internal.h (c_get_range_decl_name): Return a
5438         std::string.
5439         (compile_register_name_mangled): Return std::string.
5440
5441 2017-09-03  Tom Tromey  <tom@tromey.com>
5442
5443         * utils.c (perror_string): Return a std::string.
5444         (throw_perror_with_name, perror_warning_with_name): Update.
5445
5446 2017-09-03  Tom Tromey  <tom@tromey.com>
5447
5448         * demangle.c (demangle_command): Use std::string,
5449         unique_xmalloc_ptr.
5450
5451 2017-09-03  Tom Tromey  <tom@tromey.com>
5452
5453         * cli/cli-setshow.c (do_set_command): Use std::string.
5454
5455 2017-09-03  Tom Tromey  <tom@tromey.com>
5456
5457         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5458
5459 2017-09-03  Tom Tromey  <tom@tromey.com>
5460
5461         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5462
5463 2017-09-03  Tom Tromey  <tom@tromey.com>
5464
5465         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5466         gdb::unique_xmalloc_ptr.
5467
5468 2017-09-03  Tom Tromey  <tom@tromey.com>
5469
5470         * thread.c (print_thread_info_1): Use string_printf.
5471         (thread_apply_command, thread_apply_all_command): Use
5472         std::string.
5473
5474 2017-09-03  Tom Tromey  <tom@tromey.com>
5475
5476         * valprint.c (val_print_string): Update.
5477         * gdbcore.h (memory_error_message): Return std::string.
5478         * corefile.c (memory_error_message): Return std::string.
5479         (memory_error): Update.
5480         * breakpoint.c (insert_bp_location): Update.
5481
5482 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5483
5484         * target/waitstatus.h (target_waitstatus_to_string): Change
5485         return type to std::string.
5486         * target/waitstatus.c (target_waitstatus_to_string): Return
5487         std::string.
5488         * target.h (target_waitstatus_to_string): Remove declaration.
5489         * infrun.c (resume, clear_proceed_status_thread,
5490         print_target_wait_results, do_target_wait, save_waitstatus,
5491         stop_all_threads): Adjust.
5492         * record-btrace.c (record_btrace_wait): Adjust.
5493         * target-debug.h
5494         (target_debug_print_struct_target_waitstatus_p): Adjust.
5495
5496 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5497
5498         PR gdb/22046
5499         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5500         detection.
5501
5502 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5503
5504         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5505         for setting/unsetting environment variables on the remote target.
5506         (New remote packets): Add entries for QEnvironmentHexEncoded,
5507         QEnvironmentUnset and QEnvironmentReset.
5508         * common/environ.c (gdb_environ::operator=): Extend method to
5509         handle m_user_set_env_list and m_user_unset_env_list.
5510         (gdb_environ::clear): Likewise.
5511         (match_var_in_string): Change type of first parameter from 'char
5512         *' to 'const char *'.
5513         (gdb_environ::set): Extend method to handle
5514         m_user_set_env_list and m_user_unset_env_list.
5515         (gdb_environ::unset): Likewise.
5516         (gdb_environ::clear_user_set_env): New method.
5517         (gdb_environ::user_set_envp): Likewise.
5518         (gdb_environ::user_unset_envp): Likewise.
5519         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5520         m_user_unset_env_list on move constructor/assignment.
5521         (unset): Add new default parameter 'update_unset_list = true'.
5522         (clear_user_set_env): New method.
5523         (user_set_envp): Likewise.
5524         (user_unset_envp): Likewise.
5525         (m_user_set_env_list): New std::set.
5526         (m_user_unset_env_list): Likewise.
5527         * common/rsp-low.c (hex2str): New function.
5528         (bin2hex): New overload for bin2hex function.
5529         * common/rsp-low.c (hex2str): New prototype.
5530         (str2hex): New overload prototype.
5531         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5532         QEnvironmentUnset and QEnvironmentReset.
5533         (remote_protocol_features): Add QEnvironmentHexEncoded,
5534         QEnvironmentUnset and QEnvironmentReset packets.
5535         (send_environment_packet): New function.
5536         (extended_remote_environment_support): Likewise.
5537         (extended_remote_create_inferior): Call
5538         extended_remote_environment_support.
5539         (_initialize_remote): Add QEnvironmentHexEncoded,
5540         QEnvironmentUnset and QEnvironmentReset packet configs.
5541         * unittests/environ-selftests.c (gdb_selftest_env_var):
5542         New variable.
5543         (test_vector_initialization): New function.
5544         (test_init_from_host_environ): Likewise.
5545         (test_reinit_from_host_environ): Likewise.
5546         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5547         Likewise.
5548         (test_unset_set_empty_vector): Likewise.
5549         (test_vector_clear): Likewise.
5550         (test_std_move): Likewise.
5551         (test_move_constructor):
5552         (test_self_move): Likewise.
5553         (test_set_unset_reset): Likewise.
5554         (run_tests): Rewrite in terms of the functions above.
5555
5556 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5557
5558         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5559         (adi_available): Use a temp variable of type CORE_ADDR as argument
5560         3 when calling target_auxv_search.
5561         (adi_normalize_address): Use masks and xor operators to calculate
5562         normalized address.
5563         (adi_read_versions, adi_write_versions, adi_print_versions)
5564         (do_examine, do_assign): Use paddress.
5565
5566 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5567
5568         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5569         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5570         out of loop and add supply of FIR.
5571         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5572         add collect of FIR.
5573
5574 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5575
5576         PR gdb/21827
5577         * cli/cli-script.c (define_command): Don't convert command name
5578         to lower case.
5579
5580 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5581
5582         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5583         Update all callers accordingly. Remove all code blocks handling
5584         the case where DISPP is not NULL.
5585
5586 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5587
5588         PR symtab/22003
5589         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5590         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5591         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5592
5593 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5594
5595         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5596         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5597         (read_comp_units_from_section): New parameter abbrev_section, use
5598         read_and_check_comp_unit_head, allocate signatured_type if needed.
5599         (create_all_comp_units): Update read_comp_units_from_section caller.
5600
5601 2017-08-23  Pedro Alves  <palves@redhat.com>
5602
5603         PR remote/21852
5604         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5605         to null_ptid and switch to thread without reading the registers
5606         after adding the inferior.
5607
5608 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5609
5610         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5611         compile-gcc.
5612         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5613         (compile_to_object): Implement compile_gcc.
5614         (_initialize_compile): Install "set compile-gcc".  Initialize
5615         compile_gcc.
5616
5617 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5618
5619         * compile/compile.c (compile_to_object): Conditionally call
5620         set_verbose.  Conditionally call compile or compile_v0.
5621
5622 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5623
5624         * sparc64-tdep.h: (adi_normalize_address): New export.
5625         * sparc-nat.h: (open_adi_tag_fd): New export.
5626         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5627         * sparc64-linux-tdep.c:
5628         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5629         (sparc64_linux_handle_segmentation_fault): New function.
5630         (sparc64_linux_init_abi): Register
5631         sparc64_linux_handle_segmentation_fault
5632         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5633         (sparc64_addr_bits_remove): New function.
5634         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5635         (MAX_PROC_NAME_SIZE): New macro.
5636         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5637         (sparc64adilist): New variable.
5638         (adi_proc_list): New variable.
5639         (find_adi_info): New function.
5640         (add_adi_info): New function.
5641         (get_adi_info_proc): New function.
5642         (get_adi_info): New function.
5643         (info_adi_command): New function.
5644         (read_maps_entry): New function.
5645         (adi_available): New function.
5646         (adi_normalize_address): New function.
5647         (adi_align_address): New function.
5648         (adi_convert_byte_count): New function.
5649         (adi_tag_fd): New function.
5650         (adi_is_addr_mapped): New function.
5651         (adi_read_versions): New function.
5652         (adi_write_versions): New function.
5653         (adi_print_versions): New function.
5654         (do_examine): New function.
5655         (do_assign): New function.
5656         (adi_examine_command): New function.
5657         (adi_assign_command): New function.
5658         (_initialize_sparc64_adi_tdep): New function.
5659
5660 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5661
5662         * breakpoint.c (breakpoints_info): Rename to ...
5663         (info_breakpoints_command): ... this.
5664         (watchpoints_info): Rename to ...
5665         (info_watchpoints_command): ... this.
5666         (tracepoints_info): Rename to ...
5667         (info_tracepoints_command): ... this.
5668         (_initialize_breakpoint): Adjust.
5669         * dcache.c (dcache_info): Rename to ...
5670         (info_display_command): ... this.
5671         (_initialize_dcache): Adjust.
5672         * frame.h (args_info): Rename to ...
5673         (info_args_command): ... this.
5674         (locals_info): Rename to ...
5675         (info_locals_command): ... this.
5676         * infcmd.c (nofp_registers_info): Rename to ...
5677         (info_registers_command): ... this.
5678         (float_info): Rename to ...
5679         (info_float_command): ... this.
5680         (program_info): Rename to ...
5681         (info_program_command): ... this.
5682         (all_registers_info): Rename to ...
5683         (info_all_registers_command): ... this.
5684         (vector_info): Rename to ...
5685         (info_vector_command): ... this.
5686         (float_info): Rename to ...
5687         (info_float_command): ... this.
5688         (_initialize_infcmd): Adjust.
5689         * inferior.h (term_info): Rename to ...
5690         (info_terminal_command): ... this.
5691         * inflow.c (term_info): Rename to ...
5692         (info_terminal_command): ... this.
5693         (_initialize_inflow): Adjust.
5694         * infrun.c (signals_info): Rename to ...
5695         (info_signals_command): ... this.
5696         (_initialize_infrun): Adjust.
5697         * objc-lang.c (classes_info): Rename to ...
5698         (info_classes_command): ... this.
5699         (selectors_info): Rename to ...
5700         (info_selectors_command): ... this.
5701         (_initialize_objc_language): Adjust.
5702         * printcmd.c (sym_info): Rename to ...
5703         (info_symbol_command): ... this.
5704         (address_info): Rename to ...
5705         (info_address_command): ... this.
5706         (display_info): Rename to ...
5707         (info_display_command): ... this.
5708         (_initialize_printcmd): Adjust.
5709         * reverse.c (bookmarks_info): Rename to ...
5710         (info_breakpoints_command): ... this.
5711         (_initialize_reverse): Adjust.
5712         * ser-go32.c (dos_info): Rename to ...
5713         (info_serial_command): ... this.
5714         (_initialize_ser_dos): Adjust.
5715         * skip.c (skip_info): Rename to ...
5716         (info_skip_command): ... this.
5717         (_initialize_step_skip): Adjust.
5718         * source.c (line_info): Rename to ...
5719         (info_line_command): ... this.
5720         (source_info): Rename to ...
5721         (info_source_command)
5722         * stack.c (frame_info): Rename to ...
5723         (info_frame_command): ... this.
5724         (locals_info): Rename to ...
5725         (info_locals_command): ... this.
5726         (args_info): Rename to ...
5727         (info_args_command): ... this.
5728         (_initialize_stack): Adjust.
5729         * symtab.c (sources_info): Rename to ...
5730         (info_sources_command): ... this.
5731         (variables_info): Rename to ...
5732         (info_variables_command): ... this.
5733         (functions_info): Rename to ...
5734         (info_functions_command): ... this.
5735         (types_info): Rename to ...
5736         (info_types_command): ... this.
5737         (_initialize_symtab): Adjust.
5738         * target.c (target_info): Rename to ...
5739         (info_target_command): ... this.
5740         (initialize_targets): Adjust.
5741         * tracepoint.c (tvariables_info): Rename to ...
5742         (info_tvariables_command): ... this.
5743         (scope_info): Rename to ...
5744         (info_scope_command): ... this.
5745         (trace_dump_actions): Adjust.
5746         (_initialize_tracepoint): Adjust.
5747
5748 2017-08-22  Tom Tromey  <tom@tromey.com>
5749
5750         * breakpoint.h (install_breakpoint): Update.
5751         * breakpoint.c (add_solib_catchpoint): Update.
5752         (install_breakpoint): Change argument to a std::unique_ptr.
5753         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5754         (create_breakpoint_sal, create_breakpoint): Update.
5755         (watch_command_1, catch_exec_command_1)
5756         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5757         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5758         Return the breakpoint.
5759         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5760         (new_single_step_breakpoint): Update.
5761         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5762         std::unique_ptr.
5763         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5764         std::unique_ptr.
5765         * break-catch-sig.c (create_signal_catchpoint): Use
5766         std::unique_ptr.
5767         * ada-lang.c (create_ada_exception_catchpoint): Use
5768         std::unique_ptr.
5769
5770 2017-08-22  Tom Tromey  <tom@tromey.com>
5771
5772         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5773
5774 2017-08-22  Tom Tromey  <tom@tromey.com>
5775
5776         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5777         (lookup_partial_symbol): Update.
5778
5779 2017-08-22  Tom Tromey  <tom@tromey.com>
5780
5781         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5782         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5783         (find_and_open_source, symtab_to_fullname): Update.
5784         * psymtab.c (psymtab_to_fullname): Update.
5785
5786 2017-08-22  Tom Tromey  <tom@tromey.com>
5787
5788         * exec.c (exec_file_attach): Update.
5789         * linux-thread-db.c (try_thread_db_load): Update.
5790         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5791         * utils.c (gdb_realpath): Change return type.
5792         (gdb_realpath_keepfile): Update.
5793         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5794         (_initialize_utils): Register the new self test.
5795         * source.c (openp): Update.
5796         (find_and_open_source): Update.
5797         * nto-tdep.c (nto_find_and_open_solib): Update.
5798         * main.c (set_gdb_data_directory): Update.
5799         (captured_main_1): Update.
5800         * dwarf2read.c (dwarf2_get_dwz_file): Update
5801         (dw2_map_symbol_filenames): Update.
5802         * auto-load.c (auto_load_safe_path_vec_update): Update.
5803         (filename_is_in_auto_load_safe_path_vec): Change type of
5804         "filename_realp".
5805         (auto_load_objfile_script): Update.
5806         (file_is_auto_load_safe): Update.  Use std::string.
5807         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5808
5809 2017-08-22  Tom Tromey  <tom@tromey.com>
5810
5811         * utils.c (gdb_realpath_keepfile): Return a
5812         gdb::unique_xmalloc_ptr.
5813         * exec.c (exec_file_attach): Update.
5814         * utils.h (gdb_realpath_keepfile): Return a
5815         gdb::unique_xmalloc_ptr.
5816
5817 2017-08-22  Tom Tromey  <tom@tromey.com>
5818
5819         * compile/compile.c (compile_file_command): Use
5820         gdb::unique_xmalloc_ptr, std::string.
5821         * utils.c (gdb_abspath): Change return type.
5822         * source.c (openp): Update.
5823         * objfiles.c (allocate_objfile): Update.
5824         * main.c (set_gdb_data_directory): Update.
5825         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5826
5827 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5828
5829         * cli-cmds.c (list_commands): List actual code around more than
5830         one location.
5831
5832 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5833
5834         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5835
5836 2017-08-21  Pedro Alves  <palves@redhat.com>
5837
5838         PR gdb/19487
5839         * c-exp.y (variable production): Handle function aliases.
5840         * minsyms.c (msymbol_is_text): New function.
5841         * minsyms.h (msymbol_is_text): Declare.
5842         * symtab.c (find_function_alias_target): New function.
5843         * symtab.h (find_function_alias_target): Declare.
5844
5845 2017-08-21  Pedro Alves  <palves@redhat.com>
5846
5847         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5848         typedefs.
5849         * typeprint.c (whatis_exp): If handling "whatis", and expression
5850         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5851         typedefs here.
5852         * valops.c (value_cast): Save "to" type before resolving
5853         stubs/typedefs.  Use that type as resulting value's type.
5854
5855 2017-08-18  Tom Tromey  <tom@tromey.com>
5856             Pedro Alves  <palves@redhat.com>
5857
5858         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5859         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5860         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5861         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5862         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5863         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5864         (linux_get_siginfo_data): Add "thread" argument.  Use
5865         scoped_restore.
5866         * linux-nat.c (linux_child_follow_fork)
5867         (check_stopped_by_watchpoint): Use scoped_restore.
5868         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5869         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5870         (restore_inferior_ptid, save_inferior_ptid): Remove.
5871         * btrace.c (btrace_fetch): Use scoped_restore.
5872         * bsd-uthread.c (bsd_uthread_fetch_registers)
5873         (bsd_uthread_store_registers): Use scoped_restore.
5874         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5875         scoped_restore.
5876         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5877         (aix_thread_xfer_partial): Use scoped_restore.
5878         * inferior.h (save_inferior_ptid): Remove.
5879
5880 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5881
5882         PR tdep/21818
5883         * arm-tdep.c (gdb_print_insn_arm): Mark
5884         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5885
5886 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5887
5888         * NEWS: Mention GDBserver's new option "--selftest".
5889         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5890         * selftest.c: Move it to common/selftest.c.
5891         * selftest.h: Move it to common/selftest.h.
5892         * selftest-arch.c (reset): New function.
5893         (tests_with_arch): Call reset.
5894
5895 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5896
5897         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5898         instead of exception_fprintf and printf_filtered.
5899
5900 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5901
5902         * selftest.c (register_self_test): Rename it to
5903         selftests::register_test.
5904         (run_self_tests): selftest::run_tests.
5905         * selftest.h: Update declarations.
5906         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5907         selftests::register_test_foreach_arch.
5908         * selftest-arch.h: Update declaration.
5909         * aarch64-tdep.c: Update.
5910         * arm-tdep.c: Likewise.
5911         * disasm-selftests.c: Likewise.
5912         * dwarf2loc.c: Likewise.
5913         * dwarf2-frame.c: Likewise.
5914         * findvar.c: Likewise.
5915         * gdbarch-selftests.c: Likewise.
5916         * maint.c (maintenance_selftest): Likewise.
5917         * regcache.c: Likewise.
5918         * rust-exp.y: Likewise.
5919         * selftest-arch.c: Likewise.
5920         * unittests/environ-selftests.c: Likewise.
5921         * unittests/function-view-selftests.c: Likewise.
5922         * unittests/offset-type-selftests.c: Likewise.
5923         * unittests/optional-selftests.c: Likewise.
5924         * unittests/scoped_restore-selftests.c: Likewise.
5925         * utils-selftests.c: Likewise.
5926
5927 2017-08-17  Pedro Alves  <palves@redhat.com>
5928
5929         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5930         local.
5931
5932 2017-08-17  Pedro Alves  <palves@redhat.com>
5933
5934         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5935         field.
5936         (reset_die_in_process): Delete, replaced by ...
5937         (process_die_scope): ... this new class.  Make it responsible for
5938         freeing cu->line_header too.
5939         (process_die): Use process_die_scope.
5940         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5941         cu->line_header_die_owner.  Don't release the line header if it's
5942         owned by the CU.
5943         (setup_type_unit_groups): Make the CU/DIE own the line header.
5944         Don't release the line header here.
5945
5946 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5947
5948         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5949
5950 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5951
5952         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5953         Single-Key mode
5954
5955 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5956
5957         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5958         mode command list.
5959
5960 2017-08-15  Stafford Horne  <shorne@gmail.com>
5961
5962         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5963
5964 2017-08-15  Stafford Horne  <shorne@gmail.com>
5965
5966         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5967
5968 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5969
5970         PR gdb/21954
5971         * infcmd.c (unset_environment_command): Use the 'clear' method on
5972         the environment instead of resetting it.
5973
5974 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5975
5976         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5977         platforms.
5978
5979 2017-08-14  Tom Tromey  <tom@tromey.com>
5980
5981         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5982         (print_binary_chars): Likewise.
5983         (BITS_IN_BYTES): Remove.
5984
5985 2017-08-14  Tom Tromey  <tom@tromey.com>
5986
5987         PR gdb/21675
5988         * valprint.c (LOW_ZERO): Change value to 034.
5989         (print_octal_chars): Add static_asserts for octal constants.
5990         * printcmd.c (print_scalar_formatted): Add 'd' case.
5991
5992 2017-08-11  Tom Tromey  <tom@tromey.com>
5993
5994         * symfile.c (add_symbol_file_command): Use std::vector.
5995
5996 2017-08-14  Tom Tromey  <tom@tromey.com>
5997
5998         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5999         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6000         std::move.
6001         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6002
6003 2017-08-11  Pedro Alves  <palves@redhat.com>
6004
6005         * infrun.c (process_event_stop_test): Adjust
6006         function_name_is_marked_for_skip call.
6007         * skip.c: Include <list>.
6008         (skiplist_entry): Make it a class with private fields, and
6009         getters/setters.
6010         (skiplist_entry_chain): Delete.
6011         (skiplist_entries): New.
6012         (skiplist_entry_count): Delete.
6013         (highest_skiplist_entry_num): New.
6014         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6015         (add_skiplist_entry): Delete.
6016         (skiplist_entry::skiplist_entry): New.
6017         (skiplist_entry::add_entry): New.
6018         (skip_file_command, skip_function): Adjust.
6019         (compile_skip_regexp): Delete.
6020         (skip_command): Don't compile regexp here.  Adjust to use
6021         skiplist_entry::add_entry.
6022         (skip_info): Adjust to use range-for and getters.
6023         (skip_enable_command, skip_disable_command): Adjust to use
6024         range-for and setters.
6025         (skip_delete_command): Adjust to use std::list.
6026         (add_skiplist_entry): Delete.
6027         (skip_file_p): Delete, refactored as ...
6028         (skiplist_entry::do_skip_file_p): ... this new method.
6029         (skip_gfile_p): Delete, refactored as ...
6030         (skiplist_entry::do_gskip_file_p): ... this new method.
6031         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6032         (skiplist_entry::skip_function_p): ... this new method.
6033         (function_name_is_marked_for_skip): Now returns bool, and takes
6034         the function sal by const reference.  Adjust to use range-for and
6035         skiplist_entry methods.
6036         (_initialize_step_skip): Remove references to
6037         skiplist_entry_chain, skiplist_entry_count.
6038         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6039         takes the function sal by const reference.
6040
6041 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6042
6043         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6044         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6045         (dwarf2_frame_cache):
6046         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6047         RETURN_MASK_ALL and set *this_case to NULL.
6048         * frame-unwind.h: Update comments.
6049
6050 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6051
6052         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6053         (dwarf2_frame_state_copy_regs): Remove.
6054         (dwarf2_frame_state_free_regs): Remove.
6055         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6056         (dwarf2_restore_rule): Call method .alloc_regs instead of
6057         dwarf2_frame_state_alloc_regs.
6058         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6059         constructor.  Call std::move.
6060         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6061         (dwarf2_frame_cache): Likewise.
6062
6063         [GDB_SELF_TEST]: Include selftest.h and
6064         selftest-arch.h.
6065         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6066         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6067         execute_cfa_program_test.
6068
6069         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6070         copy ctor, assignment operator, move assignment.
6071         <alloc_regs>: New method.
6072         <swap>: New method.
6073         (struct dwarf2_frame_state): Delete dtor.
6074         (dwarf2_frame_state_alloc_regs): Remove declaration.
6075         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6076         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6077
6078 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6079
6080         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6081         (dwarf2_frame_state::dwarf2_frame_state): New.
6082         (dwarf2_frame_state::~dwarf2_frame_state): New.
6083         (dwarf2_fetch_cfa_info): Update.
6084         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6085         rather than a pointer.  Update code.
6086         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6087         dtor.
6088         <data_align, code_align, retaddr_column>: Change them to const.
6089         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6090         to bool.
6091
6092 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6093
6094         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6095         <loc.exp>: New field.
6096         * dwarf2-frame.c (execute_cfa_program): Update.
6097         (dwarf2_frame_prev_register): Update.
6098
6099 2017-08-10  Pedro Alves  <palves@redhat.com>
6100
6101         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6102
6103 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6104
6105         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6106         (fbsd_pending_children): Use std::list.
6107         (fbsd_remember_child): Likewise.
6108         (fbsd_is_child_pending): Likewise.
6109         (fbsd_pending_vfork_done): Use std::forward_list.
6110         (fbsd_add_vfork_done): Likewise.
6111         (fbsd_is_vfork_done_pending): Likewise.
6112         (fbsd_next_vfork_done): Likewise.
6113
6114 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6115
6116         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6117         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6118         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6119         for `mapfilename'.
6120         (fbsd_xfer_partial): Use gdb::byte_vector.
6121         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6122
6123 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6124
6125         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6126         "filestuff.h".
6127         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6128
6129 2017-08-09  Tom Tromey  <tom@tromey.com>
6130
6131         * skip.c (skiplist_entry): New constructor.
6132         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6133         (skiplist_entry::file_is_glob): Now bool.
6134         (skiplist_entry::file, skiplist_entry::function): Now
6135         std::string.
6136         (make_skip_entry): Return a unique_ptr.  Use new.
6137         (free_skiplist_entry, free_skiplist_entry_cleanup)
6138         (make_free_skiplist_entry_cleanup): Remove.
6139         (skip_command, skip_disable_command, add_skiplist_entry)
6140         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6141         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6142         (function_name_is_marked_for_skip): Update.
6143         (skip_delete_command): Update.  Use delete.
6144
6145 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6146
6147         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6148         (aarch64_linux_core_read_description): New function.
6149         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6150
6151 2017-08-09  Pedro Alves  <palves@redhat.com>
6152
6153         * cp-name-parser.y (cp_comp_to_string): Return a
6154         gdb::unique_xmalloc_ptr<char>.
6155         * cp-support.c (replace_typedefs_qualified_name)
6156         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6157         (cp_canonicalize_string_full): Use op= instead of explicit
6158         convertion.
6159         (cp_class_name_from_physname, method_name_from_physname)
6160         (cp_func_name, cp_remove_params): Adjust to use
6161         gdb::unique_xmalloc_ptr<char>.
6162         * cp-support.h (cp_comp_to_string): Return a
6163         gdb::unique_xmalloc_ptr<char>.
6164         * python/py-type.c (typy_lookup_type): Adjust to use
6165         gdb::unique_xmalloc_ptr<char>.
6166
6167 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6168
6169         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6170
6171 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6172             Yao Qi  <yao.qi@linaro.org>
6173
6174         * cp-support.c (cp_canonicalize_string_full): Use
6175         gdb::unique_xmalloc_ptr<char>.
6176         (cp_canonicalize_string): Likewise.
6177
6178 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6179
6180         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6181         * regformats/i386/amd64-avx-avx512.dat: Remove.
6182         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6183         * regformats/i386/amd64-avx-mpx.dat:Remove.
6184         * regformats/i386/amd64-avx.dat: Remove.
6185         * regformats/i386/amd64-mpx.dat: Remove.
6186         * regformats/i386/i386-avx-avx512.dat: Remove.
6187         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6188         * regformats/i386/i386-avx-mpx.dat: Remove.
6189         * regformats/i386/i386-mmx.dat: Remove.
6190         * regformats/i386/i386-mpx.dat: Remove.
6191
6192 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6193
6194         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6195         * amd64-tdep.c: Don't include features/i386/x32*.c.
6196         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6197         functions.
6198         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6199         and i386/x32-avx-avx512.
6200         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6201         and i386/x32.xml.
6202         * features/i386/x32-avx-avx512.c: Removed.
6203         * features/i386/x32-avx-avx512.xml: Removed.
6204         * features/i386/x32-avx.c: Removed.
6205         * features/i386/x32-avx.xml: Removed.
6206         * features/i386/x32.c: Removed.
6207         * features/i386/x32.xml: Removed.
6208         * regformats/i386/x32-avx-avx512.dat: Removed.
6209         * regformats/i386/x32-avx.dat: Removed.
6210         * regformats/i386/x32.dat: Removed.
6211
6212 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6213
6214         PR breakpoints/21886
6215         * mem-break.c (default_memory_insert_breakpoint): Use
6216         `->placed_address' rather than `->reqstd_address' for the
6217         breakpoint location.
6218
6219 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6220
6221         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6222         assertions.
6223
6224 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6225
6226         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6227         a union of `tdep_info', `tdesc_data' and `id'.
6228         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6229         rather than `info.tdep_info'.
6230         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6231         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6232         * i386-tdep.c (i386_gdbarch_init): Likewise.
6233         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6234         * mips-tdep.c (mips_gdbarch_init): Likewise.
6235         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6236         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6237         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6238         `info.tdep_info'.
6239         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6240         `info.tdep_info'.
6241         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6242         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6243         `info.tdep_info'.
6244         * spu-tdep.c (spu_gdbarch_init): Likewise.
6245         * gdbarch.h: Regenerate.
6246
6247 2017-08-07  Leszek Swirski  <leszeks@google.com>
6248
6249         PR symtab/20899
6250         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6251
6252 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6253
6254         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6255         (gdbsim_open): Rename gdb_argv args object to argv.
6256
6257 2017-08-05  Tom Tromey  <tom@tromey.com>
6258
6259         * compile/compile-object-load.c (compile_object_load): Use
6260         gdb::unique_xmalloc_ptr.
6261         * cli/cli-dump.c (scan_filename): Rename from
6262         scan_filename_with_cleanup.  Change return type.
6263         (scan_expression): Rename from scan_expression_with_cleanup.
6264         Change return type.
6265         (dump_memory_to_file, dump_value_to_file, restore_command):
6266         Use gdb::unique_xmalloc_ptr.  Update.
6267         * cli/cli-cmds.c (find_and_open_script): Use
6268         gdb::unique_xmalloc_ptr.
6269         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6270         * symmisc.c (maintenance_print_symbols)
6271         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6272         * symfile.c (symfile_bfd_open, generic_load)
6273         (add_symbol_file_command, remove_symbol_file_command): Use
6274         gdb::unique_xmalloc_ptr.
6275         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6276         * psymtab.c (maintenance_print_psymbols): Use
6277         gdb::unique_xmalloc_ptr.
6278         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6279         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6280         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6281         (reload_shared_libraries_1): Likewise.
6282
6283 2017-08-05  Tom Tromey  <tom@tromey.com>
6284
6285         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6286         (rust_op_vector, rust_set_vector): New typedefs.
6287         (current_parser): New global.
6288         (work_obstack): Change to pointer type.  Update all users.
6289         (rust_ast, pstate): Remove globals.
6290         (struct rust_parser): New.
6291         (%union) <params, field_inits>: Change type.
6292         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6293         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6294         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6295         (convert_params_to_types, convert_params_to_expression): Change
6296         type of "params".
6297         (ast_string): Change type of "fields".
6298         (rust_parse): Make a rust_parser.  Remove cleanups.
6299         (rust_lex_tests): Make and install an auto_obstack.
6300
6301 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6302
6303         * configure.srv (ipa_x32_linux_regobj): New.
6304         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6305         instead of X86_TDESC_AVX512.
6306         (initialize_low_tracepoint): Call
6307         init_registers_x32_avx_avx512_linux.
6308
6309 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6310
6311         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6312
6313 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6314
6315         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6316
6317 2017-08-03  Tom Tromey  <tom@tromey.com>
6318
6319         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6320         Remove.
6321         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6322
6323 2017-08-03  Tom Tromey  <tom@tromey.com>
6324
6325         * python/py-param.c (compute_enum_values): Use gdb_argv.
6326
6327 2017-08-03  Tom Tromey  <tom@tromey.com>
6328
6329         * utils.h (struct gdb_argv_deleter): New.
6330         (gdb_argv): New class.
6331         * utils.c (gdb_argv::reset): New method.
6332         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6333         * tracefile.c (tsave_command): Use gdb_argv.
6334         * top.c (new_ui_command): Use gdb_argv.
6335         * symmisc.c (maintenance_print_symbols)
6336         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6337         * symfile.c (symbol_file_command, generic_load)
6338         (remove_symbol_file_command): Use gdb_argv.
6339         * stack.c (backtrace_command): Use gdb_argv.
6340         * source.c (add_path, show_substitute_path_command)
6341         (unset_substitute_path_command, set_substitute_path_command):
6342         Use gdb_argv.
6343         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6344         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6345         * remote.c (extended_remote_run, remote_put_command)
6346         (remote_get_command, remote_delete_command): Use gdb_argv.
6347         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6348         (gdbsim_open): Use gdb_argv.
6349         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6350         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6351         * procfs.c (procfs_info_proc): Use gdb_argv.
6352         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6353         * infrun.c (handle_command): Use gdb_argv.
6354         * inferior.c (add_inferior_command, clone_inferior_command):
6355         Use gdb_argv.
6356         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6357         * exec.c (exec_file_command): Use gdb_argv.
6358         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6359         * compile/compile.c (build_argc_argv): Use gdb_argv.
6360
6361 2017-08-03  Tom Tromey  <tom@tromey.com>
6362
6363         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6364
6365 2017-08-03  Tom Tromey  <tom@tromey.com>
6366
6367         * python/python.c (compute_python_string): Return std::string.
6368         (gdbpy_eval_from_control_command): Update.
6369         (do_start_initialization): Use std::string.
6370         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6371         xstrprintf.
6372         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6373         xstrprintf.
6374
6375 2017-08-03  Tom Tromey  <tom@tromey.com>
6376
6377         * top.h (do_restore_instream_cleanup): Remove.
6378         * top.c (do_restore_instream_cleanup): Remove.
6379         (read_command_file): Use scoped_restore.
6380         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6381
6382 2017-08-03  Tom Tromey  <tom@tromey.com>
6383
6384         * cli/cli-script.c (execute_user_command)
6385         (execute_control_command): Use scoped_restore.
6386
6387 2017-08-03  Tom Tromey  <tom@tromey.com>
6388
6389         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6390         (execute_user_command): Remove user_call_depth; use
6391         user_args_stack's size instead.
6392
6393 2017-08-03  Tom Tromey  <tom@tromey.com>
6394
6395         * top.h (in_user_command): Remove.
6396         * top.c (in_user_command): Remove.
6397         * cli/cli-script.c (do_restore_user_call_depth)
6398         (execute_user_command): Update.
6399
6400 2017-08-03  Tom Tromey  <tom@tromey.com>
6401
6402         * valops.c (search_struct_method): Use gdb::byte_vector.
6403         * valarith.c (value_concat): Use std::vector.
6404         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6405         (simple_search_memory): Likewise.
6406         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6407         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6408         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6409         * elfread.c (elf_rel_plt_read): Use std::string.
6410         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6411         * cli/cli-dump.c (restore_section_callback): Use
6412         gdb::byte_vector.
6413
6414 2017-08-03  Tom Tromey  <tom@tromey.com>
6415
6416         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6417
6418 2017-08-03  Tom Tromey  <tom@tromey.com>
6419
6420         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6421         (tui_register_format): Use scoped_restore.
6422
6423 2017-08-03  Tom Tromey  <tom@tromey.com>
6424
6425         * reverse.c (exec_direction_default): Remove.
6426         (exec_reverse_once): Use scoped_restore.
6427         * remote.c (restore_remote_timeout): Remove.
6428         (remote_flash_erase, remote_flash_write, remote_flash_done)
6429         (readchar, remote_serial_write): Use scoped_restore.
6430         * cli/cli-script.c (struct source_cleanup_lines_args)
6431         (source_cleanup_lines): Remove.
6432         (script_from_file): Use scoped_restore.
6433         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6434         (source_command): Use scoped_restore.
6435
6436 2017-08-03  Tom Tromey  <tom@tromey.com>
6437
6438         * utils.h (make_cleanup_free_so): Remove.
6439         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6440         * solist.h (struct so_deleter): New.
6441         (so_list_up): New typedef.
6442         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6443
6444 2017-08-03  Tom Tromey  <tom@tromey.com>
6445
6446         * utils.h (make_cleanup_restore_current_language): Remove.
6447         * utils.c (do_restore_current_language)
6448         (make_cleanup_restore_current_language): Remove.
6449         * parse.c (parse_exp_in_context_1)
6450         (parse_expression_with_language): Use
6451         scoped_restore_current_language.
6452         * mi/mi-main.c (mi_cmd_execute): Use
6453         scoped_restore_current_language.
6454         * language.h (scoped_restore_current_language): New class.
6455
6456 2017-08-03  Tom Tromey  <tom@tromey.com>
6457
6458         * compile/compile.c (cleanup_unlink_file): Remove.
6459         (compile_to_object): Use gdb::unlinker.
6460         (eval_compile_command): Likewise.
6461
6462 2017-08-03  Tom Tromey  <tom@tromey.com>
6463
6464         * utils.h (make_cleanup_fclose): Remove.
6465         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6466
6467 2017-08-03  Tom Tromey  <tom@tromey.com>
6468
6469         * top.c (open_terminal_stream): Return gdb_file_up.
6470         (new_ui_command): Update.
6471
6472 2017-08-03  Tom Tromey  <tom@tromey.com>
6473
6474         * source.c (print_source_lines_base, forward_search_command)
6475         (reverse_search_command): Use gdb_file_up.
6476
6477 2017-08-03  Tom Tromey  <tom@tromey.com>
6478
6479         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6480
6481 2017-08-03  Tom Tromey  <tom@tromey.com>
6482
6483         * cli/cli-cmds.c (find_and_open_script): Change return type.
6484         Remove "streamp" and "full_path" parameters.
6485         (source_script_with_search): Update.
6486         * auto-load.c (source_script_file): Update.
6487         * cli/cli-cmds.h (find_and_open_script): Change type.
6488         (open_script): New struct.
6489
6490 2017-08-03  Tom Tromey  <tom@tromey.com>
6491
6492         * xml-support.c (xml_fetch_content_from_file): Update.
6493         * ui-file.c (stdio_file::open): Update.
6494         * tracefile-tfile.c (tfile_start): Update.
6495         * remote.c (remote_file_put, remote_file_get): Update.
6496         * nat/linux-procfs.c (linux_proc_get_int)
6497         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6498         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6499         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6500         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6501         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6502         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6503         * linux-nat.c (linux_proc_pending_signals): Update.
6504         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6505         (file_closer): Remove.
6506         * compile/compile.c (compile_to_object): Update.
6507         * common/filestuff.h (struct gdb_file_deleter): New.
6508         (gdb_file_up): New typedef.
6509         (gdb_fopen_cloexec): Change return type.
6510         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6511         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6512         (dump_binary_file, restore_binary_file): Update.
6513         * auto-load.c (auto_load_objfile_script_1): Update.
6514
6515 2017-08-03  Tom Tromey  <tom@tromey.com>
6516
6517         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6518         (info_static_tracepoint_markers_command): Likewise.
6519         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6520         * skip.c (skip_info): Use ui_out_emit_table.
6521         * progspace.c (print_program_space): Use ui_out_emit_table.
6522         * osdata.c (info_osdata): Use ui_out_emit_table.
6523         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6524         ui_out_emit_table.
6525         * linux-thread-db.c (info_auto_load_libthread_db): Use
6526         ui_out_emit_table.
6527         * inferior.c (print_inferior): Use ui_out_emit_table.
6528         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6529         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6530         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6531         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6532         * ui-out.h (class ui_out_emit_table): New.
6533
6534 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6535
6536         * mips-tdep.c (mips_fpu_type_str): New function.
6537         (mips_dump_tdep): Call it.
6538
6539 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6540
6541         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6542         `->mips_fpu_type'.
6543
6544 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6545
6546         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6547
6548 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6549
6550         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6551
6552 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6553
6554         * cli/cli-cmds.c (maintenancechecklist): New variable.
6555         * gdbcmd.h (maintenancechecklist): Declare it.
6556         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6557         Call i386_linux_read_description with different masks.
6558         * maint.c (maintenance_check_command): New function.
6559         (_initialize_maint_cmds): Call add_prefix_cmd.
6560         * target-descriptions.c (tdesc_reg): override operator != and ==.
6561         (tdesc_type): Likewise.
6562         (tdesc_feature): Likewise.
6563         (target_desc): Likewise.
6564         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6565         (maintenance_check_xml_descriptions): New function.
6566         (_initialize_target_descriptions) Add command "xml-descriptions".
6567         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6568
6569 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6570
6571         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6572         Include features/i386/32bit-*.c.
6573         (i386_linux_read_description): Generate target description if it
6574         doesn't exist.
6575         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6576         functions.
6577         * features/i386/32bit-linux.c: Re-generated.
6578         * features/i386/32bit-sse.c: Likewise.
6579         * target-descriptions.c (print_c_feature::visit): Print code to
6580         set register number if needed.
6581         (print_c_feature) <m_next_regnum>: New field.
6582
6583 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6584
6585         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6586         (FEATURE_XMLFILES): New.
6587         (FEATURE_CFILES): New.
6588         New rules.
6589         (clean-cfiles): Remove generated c files.
6590         * features/i386/32bit-avx.c: Generated.
6591         * features/i386/32bit-avx512.c: Generated.
6592         * features/i386/32bit-core.c: Generated.
6593         * features/i386/32bit-linux.c: Generated.
6594         * features/i386/32bit-mpx.c: Generated.
6595         * features/i386/32bit-pkeys.c: Generated.
6596         * features/i386/32bit-sse.c: Generated.
6597         * target-descriptions.c: Include algorithm.
6598         (tdesc_element_visitor): Add method visit_end.
6599         (print_c_tdesc): Implement visit_end.
6600         (print_c_tdesc:: m_filename_after_features): Move it to
6601         protected.
6602         (print_c_feature): New class.
6603         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6604         name starts with "i386/32bit-".
6605
6606 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6607
6608         * target-descriptions.c (tdesc_element_visitor): New class.
6609         (tdesc_element): New class.
6610         (tdesc_reg): Inherit from tdesc_element.
6611         (tdesc_reg::accept): New function.
6612         (tdesc_type): Inherit from tdesc_element.
6613         (tdesc_type::accept): New function.
6614         (tdesc_feature): Inherit from tdesc_element.
6615         (tdesc_feature::accept): New function.
6616         (target_desc): Inherit from tdesc_element.
6617         (target_desc::target_desc): New.
6618         (target_desc::~target_desc): New.
6619         (target_desc::accept): New.
6620         (allocate_target_description): Use new.
6621         (free_target_description): Use delete.
6622         (print_c_tdesc): New class.
6623         (maint_print_c_tdesc_cmd): Adjust.
6624
6625         * features/aarch64.c: Re-generated.
6626         * features/arc-arcompact.c: Re-generated.
6627         * features/arc-v2.c: Re-generated.
6628         * features/arm/arm-with-iwmmxt.c: Re-generated.
6629         * features/arm/arm-with-m.c: Re-generated.
6630         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6631         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6632         * features/arm/arm-with-neon.c: Re-generated.
6633         * features/arm/arm-with-vfpv2.c: Re-generated.
6634         * features/arm/arm-with-vfpv3.c: Re-generated.
6635         * features/i386/amd64-avx-avx512.c: Re-generated.
6636         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6637         * features/i386/amd64-avx.c: Re-generated.
6638         * features/i386/amd64-avx-linux.c: Re-generated.
6639         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6640         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6641         * features/i386/amd64-avx-mpx.c: Re-generated.
6642         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6643         * features/i386/amd64.c: Re-generated.
6644         * features/i386/amd64-linux.c: Re-generated.
6645         * features/i386/amd64-mpx.c: Re-generated.
6646         * features/i386/amd64-mpx-linux.c: Re-generated.
6647         * features/i386/i386-avx-avx512.c: Re-generated.
6648         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6649         * features/i386/i386-avx.c: Re-generated.
6650         * features/i386/i386-avx-linux.c: Re-generated.
6651         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6652         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6653         * features/i386/i386-avx-mpx.c: Re-generated.
6654         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6655         * features/i386/i386.c: Re-generated.
6656         * features/i386/i386-linux.c: Re-generated.
6657         * features/i386/i386-mmx.c: Re-generated.
6658         * features/i386/i386-mmx-linux.c: Re-generated.
6659         * features/i386/i386-mpx.c: Re-generated.
6660         * features/i386/i386-mpx-linux.c: Re-generated.
6661         * features/i386/x32-avx-avx512.c: Re-generated.
6662         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6663         * features/i386/x32-avx.c: Re-generated.
6664         * features/i386/x32-avx-linux.c: Re-generated.
6665         * features/i386/x32.c: Re-generated.
6666         * features/i386/x32-linux.c: Re-generated.
6667         * features/microblaze.c: Re-generated.
6668         * features/microblaze-with-stack-protect.c: Re-generated.
6669         * features/mips64-dsp-linux.c: Re-generated.
6670         * features/mips64-linux.c: Re-generated.
6671         * features/mips-dsp-linux.c: Re-generated.
6672         * features/mips-linux.c: Re-generated.
6673         * features/nds32.c: Re-generated.
6674         * features/nios2.c: Re-generated.
6675         * features/nios2-linux.c: Re-generated.
6676         * features/rs6000/powerpc-32.c: Re-generated.
6677         * features/rs6000/powerpc-32l.c: Re-generated.
6678         * features/rs6000/powerpc-403.c: Re-generated.
6679         * features/rs6000/powerpc-403gc.c : Re-generated.
6680         * features/rs6000/powerpc-405.c: Re-generated.
6681         * features/rs6000/powerpc-505.c: Re-generated.
6682         * features/rs6000/powerpc-601.c: Re-generated.
6683         * features/rs6000/powerpc-602.c: Re-generated.
6684         * features/rs6000/powerpc-603.c: Re-generated.
6685         * features/rs6000/powerpc-604.c: Re-generated.
6686         * features/rs6000/powerpc-64.c: Re-generated.
6687         * features/rs6000/powerpc-64l.c: Re-generated.
6688         * features/rs6000/powerpc-7400.c: Re-generated.
6689         * features/rs6000/powerpc-750.c: Re-generated.
6690         * features/rs6000/powerpc-860.c: Re-generated.
6691         * features/rs6000/powerpc-altivec32.c: Re-generated.
6692         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6693         * features/rs6000/powerpc-altivec64.c: Re-generated.
6694         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6695         * features/rs6000/powerpc-cell32l.c: Re-generated.
6696         * features/rs6000/powerpc-cell64l.c: Re-generated.
6697         * features/rs6000/powerpc-e500.c: Re-generated.
6698         * features/rs6000/powerpc-e500l.c: Re-generated.
6699         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6700         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6701         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6702         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6703         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6704         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6705         * features/rs6000/powerpc-vsx32.c: Re-generated.
6706         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6707         * features/rs6000/powerpc-vsx64.c: Re-generated.
6708         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6709         * features/rs6000/rs6000.c: Re-generated.
6710         * features/s390-linux32.c: Re-generated.
6711         * features/s390-linux32v1.c: Re-generated.
6712         * features/s390-linux32v2.c: Re-generated.
6713         * features/s390-linux64.c: Re-generated.
6714         * features/s390-linux64v1.c: Re-generated.
6715         * features/s390-linux64v2.c: Re-generated.
6716         * features/s390-te-linux64.c: Re-generated.
6717         * features/s390-tevx-linux64.c: Re-generated.
6718         * features/s390-vx-linux64.c: Re-generated.
6719         * features/s390x-linux64.c: Re-generated.
6720         * features/s390x-linux64v1.c: Re-generated.
6721         * features/s390x-linux64v2.c: Re-generated.
6722         * features/s390x-te-linux64.c: Re-generated.
6723         * features/s390x-tevx-linux64.c: Re-generated.
6724         * features/s390x-vx-linux64.c: Re-generated.
6725         * features/sparc/sparc32-solaris.c: Re-generated.
6726         * features/sparc/sparc64-solaris.c: Re-generated.
6727         * features/tic6x-c62x.c: Re-generated.
6728         * features/tic6x-c62x-linux.c: Re-generated.
6729         * features/tic6x-c64x.c: Re-generated.
6730         * features/tic6x-c64x-linux.c: Re-generated.
6731         * features/tic6x-c64xp.c: Re-generated.
6732         * features/tic6x-c64xp-linux.c: Re-generated.
6733
6734 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6735
6736         * i386-linux-tdep.c (i386_linux_read_description): New function.
6737         (i386_linux_core_read_description): Call
6738         i386_linux_read_description.
6739         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6740         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6741         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6742         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6743         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6744         * x86-linux-nat.c (x86_linux_read_description): Call
6745         i386_linux_read_description.
6746
6747 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6748
6749         * NEWS: Mention it.
6750         * features/Makefile (%.c: %.xml): Pass the xml file name to
6751         command "maint print c-tdesc".
6752         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6753         name from 'arg'.
6754
6755 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6756
6757         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6758         in-class initialization.
6759         (tdesc_create_feature): Call new instead of XCNEW.
6760         (free_target_description): Ue delete.
6761
6762 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6763
6764         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6765
6766 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6767
6768         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6769         constant.
6770         (amd64_x32_init_abi): Likewise.
6771         * amd64-tdep.h (amd64_init_abi): Update declaration.
6772         (amd64_x32_init_abi): Likewise.
6773
6774 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6775
6776         PR tdep/21717
6777         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6778         condition for FPSCR.
6779         (arm_linux_store_inferior_registers): Likewise.
6780
6781 2017-07-22  Tom Tromey  <tom@tromey.com>
6782
6783         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6784         <syscalls_counts>: Now a std::vector.
6785         (get_catch_syscall_inferior_data): Use "new".
6786         (catch_syscall_inferior_data_cleanup): Use "delete".
6787         (insert_catch_syscall, remove_catch_syscall)
6788         (clear_syscall_counts): Update.
6789
6790 2017-07-22  Tom Tromey  <tom@tromey.com>
6791
6792         * break-catch-syscall.c (syscall_catchpoint)
6793         <syscalls_to_be_caught>: Now a std::vector<int>
6794         (~syscall_catchpoint): Remove.
6795         (insert_catch_syscall, remove_catch_syscall)
6796         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6797         (print_mention_catch_syscall, print_recreate_catch_syscall):
6798         Update.
6799         (create_syscall_event_catchpoint): Change type of "filter"
6800         parameter.
6801         (catch_syscall_split_args): Return a std::vector.
6802         (catch_syscall_command_1, catching_syscall_number_1): Update.
6803
6804 2017-07-22  Tom Tromey  <tom@tromey.com>
6805
6806         * break-catch-throw.c (struct exception_catchpoint)
6807         <exception_rx>: Now a std::string.
6808         (~exception_catchpoint): Remove.
6809         (print_one_detail_exception_catchpoint): Update.
6810         (handle_gnu_v3_exceptions): Change type of except_rx.
6811         (extract_exception_regexp): Return a std::string.
6812         (catch_exception_command_1): Update.
6813
6814 2017-07-22  Tom Tromey  <tom@tromey.com>
6815
6816         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6817         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6818         std::vector.
6819         <catch_all>: Now a bool.
6820         (~signal_catchpoint): Remove.
6821         (signal_catchpoint_insert_location)
6822         (signal_catchpoint_remove_location)
6823         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6824         (signal_catchpoint_print_mention)
6825         (signal_catchpoint_print_recreate)
6826         (signal_catchpoint_explains_signal): Update.
6827         (create_signal_catchpoint): Change type of "filter" and
6828         "catch_all".
6829         (catch_signal_split_args): Return a std::vector.  Change type of
6830         "catch_all".
6831         (catch_signal_command): Update.
6832
6833 2017-07-20  Pedro Alves  <palves@redhat.com>
6834
6835         * ada-lang.c (ada_language_defn): Make extern.
6836         (_initialize_ada_language): Remove add_language call.
6837         * c-lang.c (c_language_defn, cplus_language_defn)
6838         (asm_language_defn, minimal_language_defn): Make extern.
6839         (_initialize_c_language): Delete.
6840         * completer.c (compare_cstrings): Delete, moved to utils.h.
6841         * d-lang.c (d_language_defn): Make extern.
6842         (_initialize_d_language): Remove add_language calls.
6843         * defs.h (enum language): Add comment.
6844         * f-lang.c (f_language_defn): Make extern.
6845         (_initialize_f_language): Remove add_language call.
6846         * go-lang.c (go_language_defn): Make extern.
6847         (_initialize_go_language): Remove add_language call.
6848         * language.c: Include <algorithm>.
6849         (languages): Redefine as const array.
6850         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6851         (set_language_command): Handle "local".  Use for-range loop.
6852         (set_language): Remove loop.
6853         (language_enum): Rewrite.
6854         (language_def, language_str): Remove loops.
6855         (add_language): Delete.
6856         (add_set_language_command): New, based on add_languages.
6857         (skip_language_trampoline): Adjust.
6858         (local_language_defn): Delete.
6859         (language_gdbarch_post_init): Adjust.
6860         (_initialize_language): Remove add_language calls.  Call
6861         add_set_language_command.
6862         * language.h (add_language): Delete.
6863         (auto_language_defn)
6864         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6865         (asm_language_defn, c_language_defn, cplus_language_defn)
6866         (d_language_defn, f_language_defn, go_language_defn)
6867         (m2_language_defn, objc_language_defn, opencl_language_defn)
6868         (pascal_language_defn, rust_language_defn): Declare.
6869         * m2-lang.c (m2_language_defn): Make extern.
6870         (_initialize_m2_language): Remove add_language call.
6871         * objc-lang.c (objc_language_defn): Make extern.
6872         (_initialize_objc_language): Remove add_language call.
6873         * opencl-lang.c (opencl_language_defn): Make extern.
6874         (_initialize_opencl_language): Remove add_language call.
6875         * p-lang.c (pascal_language_defn): Make extern.
6876         (_initialize_pascal_language): Delete.
6877         * rust-lang.c (rust_language_defn): Make extern.
6878         (_initialize_rust_language): Delete.
6879         * utils.h (compare_cstrings): New static inline function.
6880
6881 2017-07-20  Pedro Alves  <palves@redhat.com>
6882
6883         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6884         (get_var_value): Constify parameters.
6885         (get_int_var_value): Change prototype.
6886         (to_fixed_range_type): Adjust.
6887         * ada-lang.h (get_int_var_value): Change prototype.
6888
6889 2017-07-20  Pedro Alves  <palves@redhat.com>
6890
6891         * dwarf2read.c (dw2_lookup_symbol): Use
6892         SYMBOL_MATCHES_SEARCH_NAME.
6893         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6894
6895 2017-07-20  Pedro Alves  <palves@redhat.com>
6896
6897         * block.c (block_iter_name_step, block_iter_name_first)
6898         (block_iter_name_next): Delete.
6899         (block_lookup_symbol_primary): Adjust to use
6900         dict_iter_match_first/dict_iter_match_next.
6901         * block.h (block_iter_name_first, block_iter_name_next): Delete
6902         declarations.
6903         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6904         dict_iter_match_first/dict_iter_match_next.
6905
6906 2017-07-20  Pedro Alves  <palves@redhat.com>
6907
6908         * cp-support.c (cp_find_first_component_aux): Add missing case for
6909         end of string.
6910
6911 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6912
6913         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6914         of dwo_cu's dwo_file.
6915
6916 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6917
6918         * remote.c (store_registers_using_G): Remove one line comment.
6919
6920 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6921
6922         * regcache.c (regcache_cpy): Simplify it.
6923         (regcache::cpy_no_passthrough): Remove it.
6924         * regcache.h (cpy_no_passthrough): Remove it.
6925         (regcache_dup, regcache_cpy): Update comments.
6926
6927 2017-07-18  Pedro Alves  <palves@redhat.com>
6928
6929         * remote-sim.c (sim_command_completer): Adjust to work with a
6930         completion_tracker instead of a VEC.
6931
6932 2017-07-17  Pedro Alves  <palves@redhat.com>
6933
6934         * completer.c (complete_source_filenames): New function.
6935         (complete_address_and_linespec_locations): New function.
6936         (location_completer): Use complete_address_and_linespec_locations.
6937         (completion_tracker::build_completion_result): Honor the tracker's
6938         request to suppress append.
6939         * completer.h (completion_tracker::suppress_append_ws)
6940         (completion_tracker::set_suppress_append_ws): New methods.
6941         (completion_tracker::m_suppress_append_ws): New field.
6942         (complete_source_filenames): New declaration.
6943         * linespec.c (linespec_complete_what): New.
6944         (struct ls_parser) <complete_what, completion_word,
6945         completion_quote_char, completion_quote_end, completion_tracker>:
6946         New fields.
6947         (string_find_incomplete_keyword_at_end): New.
6948         (linespec_lexer_lex_string): Record quote char.  If in completion
6949         mode, don't throw.
6950         (linespec_lexer_consume_token): Advance the completion word point.
6951         (linespec_lexer_peek_token): Save/restore completion info.
6952         (save_stream_and_consume_token): New.
6953         (set_completion_after_number): New.
6954         (linespec_parse_basic): Set what to complete next depending on
6955         token.  Handle function and label completions specially.
6956         (parse_linespec): Disable objc shortcut in completion mode.  Set
6957         what to complete next depending on token type.  Skip keyword if in
6958         completion mode.
6959         (complete_linespec_component, linespec_complete): New.
6960         * linespec.h (linespec_complete): Declare.
6961
6962 2017-07-17  Pedro Alves  <palves@redhat.com>
6963
6964         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6965         Handle 'operator<' / 'operator<<'.
6966
6967 2017-07-17  Pedro Alves  <palves@redhat.com>
6968
6969         * completer.c (collect_explicit_location_matches): Handle
6970         MATCH_LABEL.
6971         (convert_explicit_location_to_linespec): New, factored out from
6972         ...
6973         (convert_explicit_location_to_sals): ... this.
6974         (complete_label): New.
6975         (linespec_complete_label, find_label_symbols_in_block): New.
6976         (find_label_symbols): Add completion_mode parameter and adjust to
6977         call find_label_symbols_in_block.
6978         * linespec.h (linespec_complete_label): Declare.
6979
6980 2017-07-17  Pedro Alves  <palves@redhat.com>
6981
6982         * ada-lang.c (ada_collect_symbol_completion_matches): Add
6983         complete_symbol_mode parameter.
6984         * cli/cli-cmds.c (complete_command): Get the completion result out
6985         of the handle_brkchars tracker if used a custom word point.
6986         * completer.c: Include "linespec.h".
6987         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6988         (advance_to_expression_complete_word_point): New.
6989         (completion_tracker::completes_to_completion_word): New.
6990         (complete_files_symbols): Pass down
6991         complete_symbol_mode::EXPRESSION.
6992         (explicit_options, probe_options): New.
6993         (collect_explicit_location_matches): Complete on the
6994         explictit_loc->foo instead of word.  Use
6995         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
6996         keyword and options completions.
6997         (backup_text_ptr): Delete.
6998         (skip_keyword): New.
6999         (complete_explicit_location): Remove 'word' parameter.  Add
7000         language, quoted_arg_start and quoted_arg_end parameters.
7001         Rewrite, parsing left to right.
7002         (location_completer): Rewrite.
7003         (location_completer_handle_brkchars): New function.
7004         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7005         (enum complete_line_internal_reason): Adjust comments.
7006         (completion_tracker::discard_completions): New.
7007         (completer_handle_brkchars_func_for_completer): Handle
7008         location_completer.
7009         (gdb_custom_word_point_brkchars)
7010         (gdb_org_rl_basic_quote_characters): New.
7011         (gdb_completion_word_break_characters_throw)
7012         (completion_find_completion_word): Handle trackers that use a
7013         custom word point.
7014         (completion_tracker::advance_custom_word_point_by): New.
7015         (completion_tracker::build_completion_result): Don't rely on
7016         readline appending the quote char.
7017         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7018         use a custom word point.
7019         (gdb_rl_attempted_completion_function): Restore
7020         rl_basic_quote_characters.
7021         * completer.h (class completion_tracker): Extend intro comment.
7022         (completion_tracker::set_quote_char)
7023         (completion_tracker::quote_char)
7024         (completion_tracker::set_use_custom_word_point)
7025         (completion_tracker::use_custom_word_point)
7026         (completion_tracker::custom_word_point)
7027         (completion_tracker::set_custom_word_point)
7028         (completion_tracker::advance_custom_word_point_by)
7029         (completion_tracker::completes_to_completion_word)
7030         (completion_tracker::discard_completions): New methods.
7031         (completion_tracker::m_quote_char)
7032         (completion_tracker::m_use_custom_word_point)
7033         (completion_tracker::m_custom_word_point): New fields.
7034         (advance_to_expression_complete_word_point): Declare.
7035         * f-lang.c (f_collect_symbol_completion_matches): Add
7036         complete_symbol_mode parameter.
7037         * language.h (struct language_defn)
7038         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7039         parameter.
7040         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7041         (linespec_complete_function): New function.
7042         (linespec_lexer_lex_keyword): Adjust.
7043         * linespec.h (linespec_keywords, linespec_complete_function): New
7044         declarations.
7045         * location.c (find_end_quote): New function.
7046         (explicit_location_lex_one): Add explicit_completion_info
7047         parameter.  Save quoting info.  Don't throw if being called for
7048         completion.  Don't handle Ada operators here.
7049         (is_cp_operator, skip_op_false_positives, first_of)
7050         (explicit_location_lex_one_function): New function.
7051         (string_to_explicit_location): Replace 'dont_throw' parameter with
7052         an explicit_completion_info pointer parameter.  Handle it.  Don't
7053         use explicit_location_lex_one to lex function names.  Use
7054         explicit_location_lex_one_function instead.
7055         * location.h (struct explicit_completion_info): New.
7056         (string_to_explicit_location): Replace 'dont_throw' parameter with
7057         an explicit_completion_info pointer parameter.
7058         * symtab.c (default_collect_symbol_completion_matches_break_on):
7059         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7060         (default_collect_symbol_completion_matches)
7061         (collect_symbol_completion_matches): Add complete_symbol_mode
7062         parameter.
7063         (collect_symbol_completion_matches_type): Pass down
7064         complete_symbol_mode::EXPRESSION.
7065         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7066         parameter.  Handle LINESPEC mode.
7067         * symtab.h (complete_symbol_mode): New.
7068         (default_collect_symbol_completion_matches_break_on)
7069         (default_collect_symbol_completion_matches)
7070         (collect_symbol_completion_matches)
7071         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7072         parameter.
7073
7074 2017-07-17  Pedro Alves  <palves@redhat.com>
7075
7076         * utils.c (enum class strncmp_iw_mode): New.
7077         (strcmp_iw): Rename to ...
7078         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7079         parameters.  Handle them.
7080         (strncmp_iw): New.
7081         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7082         * utils.h (strncmp_iw): Declare.
7083         (strcmp_iw): Move describing comments here.
7084
7085 2017-07-17  Pedro Alves  <palves@redhat.com>
7086
7087         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7088         CP_OPERATOR_STR.
7089         * c-typeprint.c (is_type_conversion_operator): Use
7090         CP_OPERATOR_STR.
7091         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7092         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7093         CP_OPERATOR_LEN.
7094         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7095         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7096         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7097         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7098         CP_OPERATOR_STR.
7099         * location.c: Include "cp-support.h".
7100         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7101         CP_OPERATOR_STR.
7102         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7103         CP_OPERATOR_LEN.
7104
7105 2017-07-17  Pedro Alves  <palves@redhat.com>
7106
7107         * cli/cli-cmds.c (complete_command): Use a completion tracker
7108         along with completion_find_completion_word for handle_brkchars
7109         phase.
7110         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7111         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7112         (struct gdb_rl_completion_word_info): New.
7113         (gdb_rl_find_completion_word): New.
7114         (completion_find_completion_word): New.
7115         * completer.h (completion_find_completion_word): Declare.
7116
7117 2017-07-17  Pedro Alves  <palves@redhat.com>
7118
7119         * ada-lang.c (symbol_completion_match): Adjust comments.
7120         (symbol_completion_add): Replace vector parameter with
7121         completion_tracker parameter.  Use it.
7122         (ada_make_symbol_completion_list): Rename to...
7123         (ada_collect_symbol_completion_matches): ... this.  Add
7124         completion_tracker parameter and use it.
7125         (ada_language_defn): Adjust.
7126         * break-catch-syscall.c (catch_syscall_completer): Adjust
7127         prototype and work with completion_tracker instead of VEC.
7128         * breakpoint.c (condition_completer): Adjust prototype and work
7129         with completion_tracker instead of VEC.
7130         * c-lang.c (c_language_defn, cplus_language_defn)
7131         (asm_language_defn, minimal_language_defn): Adjust to renames.
7132         * cli/cli-cmds.c (complete_command): Rework using
7133         completion_tracker.  Catch exceptions when completing.
7134         * cli/cli-decode.c (integer_unlimited_completer)
7135         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7136         with completion_tracker instead of VEC.
7137         * command.h (struct completion_tracker): Forward declare.
7138         (completer_ftype, completer_handle_brkchars_ftype): Change
7139         types.
7140         (complete_on_cmdlist, complete_on_enum): Adjust.
7141         * completer.c: Include <algorithm>.
7142         (struct gdb_completer_state): New.
7143         (current_completion): New global.
7144         (readline_line_completion_function): Delete.
7145         (noop_completer, filename_completer)
7146         (filename_completer_handle_brkchars, complete_files_symbols)
7147         (linespec_location_completer): Adjust to work with a
7148         completion_tracker instead of a VEC.
7149         (string_or_empty): New.
7150         (collect_explicit_location_matches): Adjust to work with a
7151         completion_tracker instead of a VEC.
7152         (explicit_location_completer): Rename to ...
7153         (complete_explicit_location): ... this and adjust to work with a
7154         completion_tracker instead of a VEC.
7155         (location_completer): Adjust to work with a completion_tracker
7156         instead of a VEC.
7157         (add_struct_fields): Adjust to work with a completion_list instead
7158         of VEC.
7159         (expression_completer): Rename to ...
7160         (complete_expression): ... this and adjust to work with a
7161         completion_tracker instead of a VEC.  Use complete_files_symbols.
7162         (expression_completer): Reimplement on top of complete_expression.
7163         (symbol_completer): Adjust to work with a completion_tracker
7164         instead of a VEC.
7165         (enum complete_line_internal_reason): Add describing comments.
7166         (complete_line_internal_normal_command): Adjust to work with a
7167         completion_tracker instead of a VEC.
7168         (complete_line_internal): Rename to ...
7169         (complete_line_internal_1): ... this and adjust to work with a
7170         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7171         handle_brkchars phase.
7172         (new_completion_tracker): Delete.
7173         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7174         complete_line_internal_1.
7175         (free_completion_tracker): Delete.
7176         (INITIAL_COMPLETION_HTAB_SIZE): New.
7177         (completion_tracker::completion_tracker)
7178         (completion_tracker::~completion_tracker): New.
7179         (maybe_add_completion): Delete.
7180         (completion_tracker::maybe_add_completion)
7181         (completion_tracker::add_completion)
7182         (completion_tracker::add_completions): New.
7183         (throw_max_completions_reached_error): Delete.
7184         (complete_line): Adjust to work with a completion_tracker instead
7185         of a VEC.  Don't create a completion_tracker_t or check for max
7186         completions here.
7187         (command_completer, command_completer_handle_brkchars)
7188         (signal_completer, reg_or_group_completer_1)
7189         (reg_or_group_completer, default_completer_handle_brkchars):
7190         Adjust to work with a completion_tracker.
7191         (gdb_completion_word_break_characters_throw): New.
7192         (gdb_completion_word_break_characters): Reimplement.
7193         (line_completion_function): Delete.
7194         (completion_tracker::recompute_lowest_common_denominator)
7195         (expand_preserving_ws)
7196         (completion_tracker::build_completion_result)
7197         (completion_result::completion_result)
7198         (completion_result::completion_result)
7199         (completion_result::~completion_result)
7200         (completion_result::completion_result)
7201         (completion_result::release_match_list, compare_cstrings)
7202         (completion_result::sort_match_list)
7203         (completion_result::reset_match_list)
7204         (gdb_rl_attempted_completion_function_throw)
7205         (gdb_rl_attempted_completion_function): New.
7206         * completer.h (completion_list, struct completion_result)
7207         (class completion_tracker): New.
7208         (complete_line): Add completion_tracker parameter.
7209         (readline_line_completion_function): Delete.
7210         (gdb_rl_attempted_completion_function): New.
7211         (noop_completer, filename_completer, expression_completer)
7212         (location_completer, symbol_completer, command_completer)
7213         (signal_completer, reg_or_group_completer): Update prototypes.
7214         (completion_tracker_t, new_completion_tracker)
7215         (make_cleanup_free_completion_tracker): Delete.
7216         (enum maybe_add_completion_enum): Delete.
7217         (maybe_add_completion): Delete.
7218         (throw_max_completions_reached_error): Delete.
7219         * corefile.c (complete_set_gnutarget): Adjust to work with a
7220         completion_tracker instead of a VEC.
7221         * cp-abi.c (cp_abi_completer): Adjust to work with a
7222         completion_tracker instead of a VEC.
7223         * d-lang.c (d_language_defn): Adjust.
7224         * disasm.c (disassembler_options_completer): Adjust to work with a
7225         completion_tracker instead of a VEC.
7226         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7227         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7228         with a completion_tracker instead of a VEC.
7229         (f_language_defn): Adjust.
7230         * go-lang.c (go_language_defn): Adjust.
7231         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7232         Adjust to work with a completion_tracker instead of a VEC.
7233         * infrun.c (handle_completer): Likewise.
7234         * interps.c (interpreter_completer): Likewise.
7235         * interps.h (interpreter_completer): Likewise.
7236         * language.c (unknown_language_defn, auto_language_defn)
7237         (local_language_defn): Adjust.
7238         * language.h (language_defn::la_make_symbol_completion_list):
7239         Rename to ...
7240         (language_defn::la_collect_symbol_completion_matches): ... this
7241         and adjust to work with a completion_tracker instead of a VEC.
7242         * m2-lang.c (m2_language_defn): Adjust.
7243         * objc-lang.c (objc_language_defn): Adjust.
7244         * opencl-lang.c (opencl_language_defn): Adjust.
7245         * p-lang.c (pascal_language_defn): Adjust.
7246         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7247         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7248         with a completion_tracker.
7249         * rust-lang.c (rust_language_defn): Adjust.
7250         * symtab.c (free_completion_list, do_free_completion_list)
7251         (return_val, completion_tracker): Delete.
7252         (completion_list_add_name, completion_list_add_symbol)
7253         (completion_list_add_msymbol, completion_list_objc_symbol)
7254         (completion_list_add_fields, add_symtab_completions): Add
7255         completion_tracker parameter and use it.
7256         (default_make_symbol_completion_list_break_on_1): Rename to...
7257         (default_collect_symbol_completion_matches_break_on): ... this.
7258         Add completion_tracker parameter and use it instead of allocating
7259         a completion tracker here.
7260         (default_make_symbol_completion_list_break_on): Delete old
7261         implementation.
7262         (default_make_symbol_completion_list): Delete.
7263         (default_collect_symbol_completion_matches): New.
7264         (make_symbol_completion_list): Delete.
7265         (collect_symbol_completion_matches): New.
7266         (make_symbol_completion_type): Rename to ...
7267         (collect_symbol_completion_matches_type): ... this.  Add
7268         completion_tracker parameter and use it instead of VEC.
7269         (make_file_symbol_completion_list_1): Rename to...
7270         (collect_file_symbol_completion_matches): ... this.  Add
7271         completion_tracker parameter and use it instead of VEC.
7272         (make_file_symbol_completion_list): Delete.
7273         (add_filename_to_list): Use completion_list instead of a VEC.
7274         (add_partial_filename_data::list): Now a completion_list.
7275         (make_source_files_completion_list): Work with a completion_list
7276         instead of a VEC.
7277         * symtab.h: Include "completer.h".
7278         (default_make_symbol_completion_list_break_on)
7279         (default_make_symbol_completion_list, make_symbol_completion_list)
7280         (make_symbol_completion_type, make_file_symbol_completion_list)
7281         (make_source_files_completion_list): Delete.
7282         (default_collect_symbol_completion_matches_break_on)
7283         (default_collect_symbol_completion_matches)
7284         (collect_symbol_completion_matches)
7285         (collect_symbol_completion_matches_type)
7286         (collect_file_symbol_completion_matches)
7287         (make_source_files_completion_list): New.
7288         * top.c (init_main): Don't install a rl_completion_entry_function
7289         hook.  Install a rl_attempted_completion_function hook instead.
7290         * tui/tui-layout.c (layout_completer): Adjust to work with a
7291         completion_tracker.
7292         * tui/tui-regs.c (tui_reggroup_completer):
7293         * tui/tui-win.c (window_name_completer, focus_completer)
7294         (winheight_completer): Adjust to work with a completion_tracker.
7295         * value.c: Include "completer.h".
7296         (complete_internalvar): Adjust to work with a completion_tracker.
7297         * value.h (complete_internalvar): Likewise.
7298
7299 2017-07-17  Pedro Alves  <palves@redhat.com>
7300
7301         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7302         renames.
7303         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7304         comments to completer_ftype's declaration.
7305         <completer_handle_brkchars>: Change type to
7306         completer_handle_brkchars_ftype.
7307         * command.h (completer_ftype): Add describing comment and give
7308         names to parameters.
7309         (completer_ftype_void): Rename to ...
7310         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7311         (set_cmd_completer_handle_brkchars): Adjust.
7312         * completer.c (filename_completer_handle_brkchars): New function.
7313         (complete_line_internal_normal_command): New function, factored
7314         out from ...
7315         (complete_line_internal): ... here.
7316         (command_completer_handle_brkchars)
7317         (default_completer_handle_brkchars)
7318         (completer_handle_brkchars_func_for_completer): New functions.
7319         * completer.h (set_gdb_completion_word_break_characters): Delete
7320         declaration.
7321         (completer_handle_brkchars_func_for_completer): New declaration.
7322         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7323         completer_handle_brkchars_func_for_completer.
7324
7325 2017-07-17  Pedro Alves  <palves@redhat.com>
7326
7327         * completer.c (symbol_completer): New function, based on
7328         make_symbol_completion_list_fn.
7329         * completer.h (symbol_completer): New declaration.
7330         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7331         * python/py-cmd.c (completers): Adjust.
7332         * symtab.c (make_symbol_completion_list_fn): Delete.
7333         * symtab.h (make_symbol_completion_list_fn): Delete.
7334         * cli/cli-decode.c (add_cmd): Adjust.
7335
7336 2017-07-17  Pedro Alves  <palves@redhat.com>
7337
7338         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7339         * dwarf2read.c: Include "filename-seen-cache.h".
7340         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7341         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7342         * filename-seen-cache.c: New file.
7343         * filename-seen-cache.h: New file.
7344         * symtab.c: Include "filename-seen-cache.h".
7345         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7346         (create_filename_seen_cache, clear_filename_seen_cache)
7347         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7348         to filename-seen-cache.h/filename-seen-cache.c.
7349         (output_source_filename, sources_info)
7350         (maybe_add_partial_symtab_filename)
7351         (make_source_files_completion_list): Adjust to use
7352         filename_seen_cache.
7353
7354 2017-07-17  Pedro Alves  <palves@redhat.com>
7355
7356         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7357         fields.
7358         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7359         dwarf2_debug_sections*)): New.
7360         (dwarf2_per_objfile::dwarf2_per_objfile(const
7361         dwarf2_per_objfile&)): Declare as deleted.
7362         (dwarf2_per_objfile::operator=): Declare as deleted.
7363         (dwarf2_per_objfile::dwarf2_per_objfile)
7364         (dwarf2_per_objfile::~dwarf2_per_objfile)
7365         (dwarf2_per_objfile::free_cached_comp_units): New.
7366         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7367         ctor.  Call dwarf2_per_objfile's ctor manually.
7368         (dwarf2_locate_sections): Deleted/refactored as ...
7369         (dwarf2_per_objfile::locate_sections): ... this new method.
7370         (free_cached_comp_units): Defer to
7371         dwarf2_per_objfile::free_cached_comp_units.
7372         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7373
7374 2017-07-14  Tom Tromey  <tom@tromey.com>
7375
7376         PR rust/21764:
7377         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7378         parameter.
7379         <UNOP_SIZEOF>: Split into separate case.
7380         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7381
7382 2017-07-14  Tom Tromey  <tom@tromey.com>
7383
7384         PR rust/21763:
7385         * symtab.c (symbol_matches_domain): Add language_rust to special
7386         case.
7387         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7388         treat LOC_TYPEDEF symbols as variables.
7389
7390 2017-07-14  Pedro Alves  <palves@redhat.com>
7391
7392         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7393         symtabs matching all symtabs with SRCFILE as file name instead of
7394         only considering the first hit, with lookup_symtab.
7395
7396 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7397
7398         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7399         operator_name parameters.
7400         (gen_expr): Update function call.
7401
7402 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7403
7404         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7405         parameter.
7406         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7407         Likewise.
7408         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7409         parameter, use agent_expr::gdbarch instead, update function
7410         calls.
7411         (locexpr_tracepoint_var_ref): Likewise.
7412         (loclist_tracepoint_var_ref): Likewise.
7413         * ax-gdb.c (gen_trace_static_fields): Likewise.
7414         (gen_traced_pop): Likewise.
7415         (gen_frame_args_address): Likewise.
7416         (gen_frame_locals_address): Likewise.
7417         (gen_var_ref): Likewise.
7418         (gen_struct_ref_recursive): Likewise.
7419         (gen_static_field): Likewise.
7420         (gen_maybe_namespace_elt): Likewise.
7421         (gen_expr): Likewise.
7422         (gen_trace_for_var): Likewise.
7423         (gen_trace_for_expr): Likewise.
7424         (gen_trace_for_return_address): Likewise.
7425
7426 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7427
7428         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7429         parameter.
7430         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7431
7432 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7433
7434         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7435         from ax, update calls.
7436         (gen_usual_arithmetic): Likewise.
7437         (gen_integral_promotions): Likewise.
7438         (gen_bitfield_ref): Likewise.
7439         (gen_primitive_field): Likewise.
7440         (gen_struct_ref_recursive): Likewise.
7441         (gen_struct_ref): Likewise.
7442         (gen_maybe_namespace_elt): Likewise.
7443         (gen_struct_elt_for_reference): Likewise.
7444         (gen_namespace_elt): Likewise.
7445         (gen_aggregate_elt_ref): Likewise.
7446         (gen_expr): Get gdbarch from ax, update calls.
7447         (gen_expr_binop_rest): Likewise.
7448
7449 2017-07-13  Pedro Alves  <palves@redhat.com>
7450
7451         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7452         as default tdesc.
7453         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7454         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7455         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7456         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7457         tdep.
7458         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7459         Get final tdesc from the tdep.
7460         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7461         default tdesc.
7462         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7463         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7464         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7465         Use it as default tdesc.
7466         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7467         down to amd_init_abi.  No longer handle fallback tdesc here.
7468         * amd64-tdep.h (tdesc_x32): Declare.
7469         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7470         parameter.
7471         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7472         as default tdesc.
7473
7474 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7475
7476         * s390-linux-tdep.c (s390_process_record): Add support for
7477         instructions new in arch12.
7478
7479 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7480
7481         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7482         PT_GETFSBASE and PT_GETGSBASE.
7483         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7484         PT_SETGSBASE.
7485
7486 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7487
7488         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7489         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7490         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7491         those rules.
7492         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7493         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7494         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7495         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7496         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7497         * features/i386/amd64.xml: Add 64bit-segments.xml.
7498         * features/i386/amd64-avx-avx512.c: Regenerated.
7499         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7500         * features/i386/amd64-avx-mpx.c: Regenerated.
7501         * features/i386/amd64-avx.c: Regenerated.
7502         * features/i386/amd64-mpx.c: Regenerated.
7503         * features/i386/amd64.c: Regenerated.
7504         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7505         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7506         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7507         * regformats/i386/amd64-avx.dat: Regenerated.
7508         * regformats/i386/amd64-mpx.dat: Regenerated.
7509         * regformats/i386/amd64.dat: Regenerated.
7510
7511 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7512
7513         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7514         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7515
7516 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7517
7518         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7519         unsetenv.
7520         * gnulib/aclocal.m4: Regenerate.
7521         * gnulib/config.in: Regenerate.
7522         * gnulib/configure: Regenerate.
7523         * gnulib/import/Makefile.am: Regenerate.
7524         * gnulib/import/Makefile.in: Regenerate.
7525         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7526         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7527         * gnulib/import/m4/environ.m4: New file.
7528         * gnulib/import/m4/setenv.m4: New file.
7529         * gnulib/import/setenv.c: New file.
7530         * gnulib/import/unsetenv.c: New file.
7531
7532 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7533
7534         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7535         address when op is DW_OP_addr.
7536
7537 2017-07-09  Tom Tromey  <tom@tromey.com>
7538
7539         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7540         check and apply to outer type.
7541
7542 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7543
7544         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7545         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7546         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7547         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7548
7549 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7550
7551         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7552
7553 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7554
7555         * corelow.c (get_core_siginfo): Remove.
7556         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7557         instead of get_core_siginfo.
7558         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7559         * gdbarch.h: Re-generate.
7560         * gdbarch.c: Re-generate.
7561         * linux-tdep.c (linux_core_xfer_siginfo): New.
7562         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7563
7564 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7565
7566         * corelow.c (thread_section_name): Move to ...
7567         * gdbcore.h (thread_section_name): ... here.
7568
7569 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7570
7571         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7572         (struct siginfo32): New.
7573         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7574         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7575         via ptrace(PT_LWPINFO).
7576
7577 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7578
7579         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7580         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7581         (fbsd_get_siginfo_type): New.
7582         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7583         (_initialize_fbsd_tdep): New.
7584
7585 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7586
7587         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7588         a singular dwo_unit*) to support multiple CUs in the same way that
7589         multiple TUs are supported.
7590         (create_cus_hash_table): Replace create_dwo_cu with a function for
7591         parsing multiple CUs from a DWO file.
7592         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7593         create_dwo_cu.
7594         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7595         htab_find, rather than comparing the signature to a singleton CU in
7596         the dwo_file.
7597
7598 2017-07-06  Pedro Alves  <palves@redhat.com>
7599
7600         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7601
7602 2017-07-04  Pedro Alves  <palves@redhat.com>
7603
7604         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7605         * gdbtypes.h (TYPE_STATIC): Delete.
7606         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7607         is_synchronized, is_native>: Delete.
7608         <dummy>: Bump.
7609         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7610         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7611         (TYPE_FN_FIELD_ABSTRACT): Delete.
7612
7613 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7614
7615         * buffer.h (buffer_finish): Fix spelling mistakes.
7616
7617 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7618
7619         * .dir-locals.el: Automatically switch to C-style comments in
7620         versions of Emacs that support the feature.
7621
7622 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7623             Pedro Alves  <palves@redhat.com>
7624
7625         PR cli/21688
7626         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7627         (process_next_line): New variable 'inline_cmd'.
7628         Adjust 'if' clauses for "python", "compile" and "guile" to use
7629         'command_name_equals' and check for '!inline_cmd'.
7630
7631 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7632
7633         PR cli/21688
7634         * cli/cli-script.c (command_name_equals_not_inline): New function.
7635         (process_next_line): Adjust 'if' clauses for "python", "compile"
7636         and "guile" to use command_name_equals_not_inline.
7637
7638 2017-06-29  Pedro Alves  <palves@redhat.com>
7639
7640         * completer.c (expression_completer): Call
7641         linespec_location_completer instead of location_completer.
7642
7643 2017-06-29  Pedro Alves  <palves@redhat.com>
7644
7645         * completer.c (expression_completer): Remove code that recomputes
7646         'text' from 'word'.
7647
7648 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7649
7650         * regformats/regdat.sh: Generate code with
7651         "ifndef IN_PROCESS_AGENT".
7652
7653 2017-06-28  Pedro Alves  <palves@redhat.com>
7654
7655         * command.h: Include "common/scoped_restore.h".
7656
7657 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7658
7659         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7660         instead of obstack_grow.
7661
7662 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7663
7664         PR gdb/21337
7665         * symfile.c (reread_symbols): Call objfiles_changed just before
7666         read_symbols.
7667
7668 2017-06-27  Pedro Alves  <palves@redhat.com>
7669
7670         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7671         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7672         (completion_list_add_symbol, completion_list_add_msymbol):
7673         ... these new functions.
7674         (add_symtab_completions)
7675         (default_make_symbol_completion_list_break_on_1): Adjust.
7676
7677 2017-06-27  Pedro Alves  <palves@redhat.com>
7678
7679         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7680         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7681         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7682         dtor.
7683         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7684         'storage_obstack' field an auto_obstack.  In-class initialize all
7685         non-bitfield fields.  Make minsyms_read bool.
7686         * symfile.c (read_symbols): Adjust.
7687
7688 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7689
7690         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7691         (gdbsim_store_register): Likewise.
7692
7693 2017-06-27  Pedro Alves  <palves@redhat.com>
7694
7695         * c-exp.y (name_obstack): Now an auto_obstack.
7696         (yylex): Use auto_obstack::clear.
7697         (c_parse): Use auto_obstack::clear instead of reinitializing and
7698         freeing the obstack.
7699         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7700         * d-exp.y (name_obstack): Now an auto_obstack.
7701         (yylex): Use auto_obstack::clear.
7702         (d_parse): Use auto_obstack::clear instead of reinitializing and
7703         freeing the obstack.
7704         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7705         auto_obstack.
7706         * dwarf2read.c (create_addrmap_from_index)
7707         (dwarf2_build_psymtabs_hard)
7708         (update_enumeration_type_from_children): Likewise.
7709         * gdb_obstack.h (auto_obstack): New type.
7710         * go-exp.y (name_obstack): Now an auto_obstack.
7711         (build_packaged_name): Use auto_obstack::clear.
7712         (go_parse): Use auto_obstack::clear instead of reinitializing and
7713         freeing the obstack.
7714         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7715         auto_obstack.
7716         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7717         * rust-exp.y (work_obstack): Now an auto_obstack.
7718         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7719         reinitializing and freeing the obstack.
7720         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7721         (host_char_to_target): Use auto_obstack.
7722         * utils.h (make_cleanup_obstack_free): Delete declaration.
7723         * valprint.c (generic_emit_char, generic_printstr): Use
7724         auto_obstack.
7725
7726 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7727
7728         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7729         thread.
7730         (darwin_init_thread_list): Don't update dummy thread.
7731         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7732
7733 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7734
7735         * record-full.c (netorder16): Remove.
7736
7737 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7738
7739         * common/diagnostics.h: Define macros for GCC.
7740         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7741         * common/vec.h: Include diagnostics.h.
7742         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7743         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7744         warning.
7745
7746 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7747
7748         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7749         New macro.
7750         * ada-lex.l: Ignore deprecated register warnings.
7751
7752 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7753
7754         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7755         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7756
7757 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7758
7759         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7760         its own line.
7761
7762 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7763
7764         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7765
7766 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7767
7768         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7769         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7770         (xtensa_register_read_masked): Likewise.
7771
7772 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7773
7774         * common/environ.c (gdb_environ::unset): Update comment.
7775
7776 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7777
7778         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7779         registers.
7780
7781 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7782
7783         * record-full.c (record_full_exec_insn): Use byte_vector.
7784
7785 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7786
7787         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7788         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7789
7790 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7791
7792         * remote.c (cached_reg): Move from here...
7793         * regcache.h (cached_reg): ...to here.
7794         * python/py-unwind.c (struct reg_info): Remove.
7795         (cached_frame_info): Use cached_reg_t.
7796         (pyuw_prev_register): Likewise.
7797         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7798         (pyuw_dealloc_cache): Free all registers.
7799
7800 2017-06-22  Pedro Alves  <palves@redhat.com>
7801             Simon Marchi  <simon.marchi@ericsson.com>
7802
7803         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7804         warning.
7805         * common/diagnostics.h: New file.
7806
7807 2017-06-22  Pedro Alves  <palves@redhat.com>
7808
7809         * common/agent.h: Add include guards.
7810
7811 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7812
7813         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7814         talk about addressable units instead of bytes.
7815
7816 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7817
7818         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7819         of '::const_iterator'.
7820
7821 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7822
7823         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7824         'unittests/environ-selftests.c'.
7825         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7826         * charset.c (find_charset_names): Declare object 'iconv_env'.
7827         Update code to use 'iconv_env' object.  Remove call to
7828         'free_environ'.
7829         * common/environ.c: Include <utility>.
7830         (make_environ): Delete function.
7831         (free_environ): Delete function.
7832         (gdb_environ::clear): New function.
7833         (gdb_environ::operator=): New function.
7834         (gdb_environ::get): Likewise.
7835         (environ_vector): Delete function.
7836         (set_in_environ): Delete function.
7837         (gdb_environ::set): New function.
7838         (unset_in_environ): Delete function.
7839         (gdb_environ::unset): New function.
7840         (gdb_environ::envp): Likewise.
7841         * common/environ.h: Include <vector>.
7842         (struct gdb_environ): Delete; transform into...
7843         (class gdb_environ): ... this class.
7844         (free_environ): Delete prototype.
7845         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7846         environ_vector): Likewise.
7847         * infcmd.c (run_command_1): Update code to call
7848         'envp' from 'gdb_environ' class.
7849         (environment_info): Update code to call methods from 'gdb_environ'
7850         class.
7851         (unset_environment_command): Likewise.
7852         (path_info): Likewise.
7853         (path_command): Likewise.
7854         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7855         (inferior::inferior): Initialize 'environment' using the host's
7856         information.
7857         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7858         Include "environ.h".
7859         (class inferior) <environment>: Change type from 'struct
7860         gdb_environ' to 'gdb_environ'.
7861         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7862         methods from 'gdb_environ' class.
7863         * solib.c (solib_find_1): Likewise
7864         * unittests/environ-selftests.c: New file.
7865
7866 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7867
7868         * features/i386/i386-linux.xml: Exchange the order of including
7869         32bit-linux.xml and 32bit-sse.xml.
7870         * features/i386/i386-linux.c: Regenerated.
7871
7872 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7873
7874         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7875         Delete copy ctor and assignment operator.
7876         (tdesc_type): Likewise.
7877         (tdesc_feature): Likewise.
7878         (tdesc_free_reg): Remove.
7879         (tdesc_create_reg): Use new.
7880         (tdesc_free_type): Remove.
7881         (tdesc_create_vector): Use new.
7882         (tdesc_create_union): Likewise.
7883         (tdesc_create_flags): Likewise.
7884         (tdesc_create_enum): Likewise.
7885         (tdesc_free_feature): Delete.
7886         (free_target_description): Use delete.
7887
7888 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7889
7890         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7891         registers.
7892
7893 2017-06-19  Pedro Alves  <palves@redhat.com>
7894
7895         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7896         after gdb::unlinker.
7897
7898 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7899
7900         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7901         gdb_environ to access an environment variable.
7902
7903 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7904
7905         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7906         gdb_byte*.
7907
7908 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7909
7910         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7911
7912 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7913
7914         * configure: Re-generate.
7915         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7916
7917 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7918
7919         * configure: Re-generate.
7920         * warning.m4: Pass -Werror to compiler when checking for
7921         supported warning flags.
7922
7923 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7924
7925         * Makefile.in (COMPILE.pre): Add "-x c++".
7926
7927 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7928             Pedro Alves  <palves@redhat.com>
7929             Yao Qi  <yao.qi@linaro.org>
7930
7931         * defs.h (RequireLongest): New.
7932         (extract_integer): Declare function template.
7933         (extract_signed_integer): Remove the declaration, but define it
7934         static inline.
7935         (extract_unsigned_integer): Likewise.
7936         (store_integer): Declare function template.
7937         (store_signed_integer): Remove the declaration, but define it
7938         static inline.
7939         (store_unsigned_integer): Likewise.
7940         * findvar.c (extract_integer): New function template.
7941         (extract_signed_integer): Remove.
7942         (extract_unsigned_integer): Remove.
7943         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7944         instantiations.
7945         (store_integer): New function template.
7946         (store_signed_integer): Remove.
7947         (store_unsigned_integer): Remove.
7948         (store_integer): Explicit instantiations.
7949         * regcache.c (regcache_raw_read_signed): Update.
7950         (regcache::raw_read): New function.
7951         (regcache::raw_read_signed): Remove.
7952         (regcache::raw_read_unsigned): Remove.
7953         (regcache_raw_read_unsigned): Update.
7954         (regcache_raw_write_unsigned): Update.
7955         (regcache::raw_write_signed): Remove.
7956         (regcache::raw_write): New function.
7957         (regcache_cooked_read_signed): Update.
7958         (regcache::raw_write_unsigned): Remove.
7959         (regcache::cooked_read_signed): Remove.
7960         (regcache_cooked_read_unsigned): Update.
7961         (regcache::cooked_read_unsigned): Remove.
7962         (regcache_cooked_write_signed): Update.
7963         (regcache_cooked_write_unsigned): Update.
7964         * regcache.h (regcache) <raw_read_signed>: Remove.
7965         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7966         <raw_read, raw_write>: New.
7967         <cooked_read_signed, cooked_write_signed>: Remove.
7968         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7969         <cooked_read, cooked_write>: New.
7970         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7971         (sh64_pseudo_register_write): Update.
7972
7973 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7974
7975         * arc-tdep.c (arc_disassembler_options): New variable.
7976         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7977         of default_print_insn.
7978         (arc_delayed_print_insn): Set info->section when needed,
7979         use default_print_insn to retrieve a disassembler.
7980
7981 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7982
7983         PR gdb/21574
7984         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7985         to mention $SHELL and startup-with-shell.
7986
7987 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
7988
7989         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7990
7991 2017-06-14  Yao Qi  <yao.qi@linaro.org>
7992
7993         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7994         default_print_insn instead of print_insn_aarch64.
7995         * arm-tdep.c (gdb_print_insn_arm): Call
7996         default_print_insn instead of print_insn_big_arm
7997         and print_insn_little_arm.
7998         * i386-tdep.c (i386_print_insn): Call default_print_insn
7999         instead of print_insn_i386.
8000         * ia64-tdep.c (ia64_print_insn): Call
8001         default_print_insn instead of print_insn_ia64.
8002         * mips-tdep.c (gdb_print_insn_mips): Call
8003         default_print_insn instead of print_insn_big_mips
8004         and print_insn_little_mips.
8005         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8006         instead of print_insn_spu.
8007
8008 2017-06-14  Pedro Alves  <palves@redhat.com>
8009
8010         * ada-lang.c: Include "common/byte-vector.h".
8011         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8012         * charset.c (wchar_iterator::iterate): Resize the vector instead
8013         of reserving it.
8014         * common/byte-vector.h: Include "common/def-vector.h".
8015         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8016         * cli/cli-dump.c: Include "common/byte-vector.h".
8017         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8018         * common/byte-vector.h: New file.
8019         * common/def-vector.h: New file.
8020         * common/default-init-alloc.h: New file.
8021         * dwarf2loc.c: Include "common/byte-vector.h".
8022         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8023         instead of reserving it.
8024         * dwarf2read.c: Include "common/byte-vector.h".
8025         (data_buf::m_vec): Now a gdb::byte_vector.
8026         * gdb_regex.c: Include "common/def-vector.h".
8027         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8028         * mi/mi-main.c: Include "common/byte-vector.h".
8029         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8030         * printcmd.c: Include "common/byte-vector.h".
8031         (print_scalar_formatted): Use gdb::byte_vector.
8032         * valprint.c: Include "common/byte-vector.h".
8033         (maybe_negate_by_bytes, print_decimal_chars): Use
8034         gdb::byte_vector.
8035
8036 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8037
8038         * darwin-nat.c: Include "nat/fork-inferior.h".
8039
8040 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8041
8042         * configure.nat: Factor out Darwin bits that are not
8043         architecture-specific.  Add fork-inferior.o.
8044
8045 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8046
8047         * configure.nat: Factor out AIX bits that are not
8048         architecture-specific.  Add fork-inferior.o.
8049
8050 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8051
8052         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8053         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8054         wrappers that just call rw_pieced_value.
8055
8056 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8057
8058         * dwarf2loc.c (write_pieced_value): When writing the data for a
8059         memory piece, use write_memory_with_notification instead of
8060         write_memory.
8061
8062 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8063
8064         * valops.c (read_value_memory): Change embedded_offset to
8065         represent a bit offset instead of a byte offset.
8066         * value.h (read_value_memory): Adjust comment.
8067
8068 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8069
8070         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8071         dest_offset_bits and source_offset_bits.
8072         (write_pieced_value): Likewise.
8073
8074 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8075
8076         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8077         given by DW_OP_bit_piece.
8078         (write_pieced_value): Likewise.
8079
8080 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8081
8082         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8083         some other preparations to the places where sufficient information
8084         is available.
8085         (write_pieced_value): Likewise.
8086
8087 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8088
8089         * dwarf2loc.c (bits_to_bytes): New function.
8090         (read_pieced_value): Fix offset calculations for register pieces
8091         on big-endian targets.
8092         (write_pieced_value): Likewise.
8093
8094 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8095
8096         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8097         (write_pieced_value): Likewise.
8098
8099 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8100
8101         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8102         transfer the source value's least significant bits, instead of its
8103         lowest-addressed ones.  Rename type_len to max_offset.
8104         (read_pieced_value): Mirror above changes to write_pieced_value as
8105         applicable.
8106
8107 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8108
8109         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8110         truncate full bytes from dest_offset_bits before using it as an
8111         offset into the buffer.
8112
8113 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8114
8115         * dwarf2loc.c (write_pieced_value): Include transfer size in
8116         byte-wise check.
8117
8118 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8119
8120         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8121         calculation of this_size.
8122
8123 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8124
8125         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8126         when targeting a bit-field.
8127         (write_pieced_value): Likewise.
8128
8129 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8130
8131         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8132         (allocate_piece_closure): Drop addr_size parameter.
8133         (dwarf2_evaluate_loc_desc_full): Adjust call to
8134         allocate_piece_closure.
8135
8136 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8137
8138         PR gdb/21226
8139         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8140         the LSB end, independent of endianness.
8141
8142 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8143
8144         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8145         size capping.
8146
8147 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8148
8149         * mips-linux-nat.c: Move include features/mips*-linux.c to
8150         mips-linux-tdep.c.
8151         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8152         to mips-linux-tdep.c.
8153         * mips-linux-tdep.c: Include features/mips*-linux.c
8154         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8155         functions.
8156         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8157         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8158         (tdesc_mips64_dsp_linux): Declare.
8159
8160 2017-06-12  Tom Tromey  <tom@tromey.com>
8161
8162         * valprint.h (val_print_type_code_int): Remove.
8163         * valprint.c (generic_val_print_int): Always call
8164         val_print_scalar_formatted.
8165         (val_print_type_code_int): Remove.
8166         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8167         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8168         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8169         * ada-valprint.c (ada_val_print_num): Use
8170         val_print_scalar_formatted.
8171
8172 2017-06-12  Tom Tromey  <tom@tromey.com>
8173
8174         * printcmd.c (print_scalar_formatted): Unify the two switches.
8175         Don't convert scalars to LONGEST.
8176
8177 2017-06-12  Tom Tromey  <tom@tromey.com>
8178
8179         PR exp/16225:
8180         * valprint.h (print_decimal_chars): Update.
8181         * valprint.c (maybe_negate_by_bytes): New function.
8182         (print_decimal_chars): Add "is_signed" argument.
8183         * printcmd.c (print_scalar_formatted): Update.
8184
8185 2017-06-12  Tom Tromey  <tom@tromey.com>
8186
8187         PR exp/16225:
8188         * valprint.h (print_binary_chars, print_hex_chars): Update.
8189         * valprint.c (val_print_type_code_int): Update.
8190         (print_binary_chars): Add "zero_pad" argument.
8191         (emit_octal_digit): New function.
8192         (print_octal_chars): Don't zero-pad.
8193         (print_decimal_chars): Likewise.
8194         (print_hex_chars): Add "zero_pad" argument.
8195         * sh64-tdep.c (sh64_do_fp_register): Update.
8196         * regcache.c (regcache::dump): Update.
8197         * printcmd.c (print_scalar_formatted): Update.
8198         * infcmd.c (default_print_one_register_info): Update.
8199
8200 2017-06-12  Pedro Alves  <palves@redhat.com>
8201             Alan Hayward  <alan.hayward@arm.com>
8202
8203         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8204         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8205         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8206         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8207         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8208
8209 2017-06-12  Pedro Alves  <palves@redhat.com>
8210
8211         * dwarf2read.c (mapped_symtab::data): Now a vector of
8212         symtab_index_entry instead of vector of
8213         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8214         whether an element's name is NULL instead of checking whether the
8215         element itself is NULL.
8216         (find_slot): Change return type.  Adjust.
8217         (hash_expand, , add_index_entry, uniquify_cu_indices)
8218         (write_hash_table): Adjust.
8219
8220 2017-06-12  Pedro Alves  <palves@redhat.com>
8221
8222         * dwarf2read.c (recursively_count_psymbols): New function.
8223         (write_psymtabs_to_index): Call it to compute number of psyms and
8224         pass estimate size of psyms_seen to unordered_set's ctor.
8225
8226 2017-06-12  Pedro Alves  <palves@redhat.com>
8227
8228         * dwarf2read.c (write_hash_table): Check if key already exists
8229         before emplacing.
8230
8231 2017-06-12  Pedro Alves  <palves@redhat.com>
8232
8233         * dwarf2read.c (data_buf::append_space): Rename to...
8234         (data_buf::grow): ... this, and make private.  Adjust all callers.
8235         (data_buf::append_uint): New method.
8236         (add_address_entry, write_one_signatured_type)
8237         (write_psymtabs_to_index): Use it.
8238
8239 2017-06-12  Pedro Alves  <palves@redhat.com>
8240
8241         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8242         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8243         (data_buf::file_write): Call ::fwrite directly.
8244
8245 2017-06-12  Pedro Alves  <palves@redhat.com>
8246
8247         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8248         std::vector::erase.
8249
8250 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8251
8252         Code cleanup: C++ify .gdb_index producer.
8253         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8254         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8255         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8256         (create_strtab, add_string): Remove.
8257         (file_write, data_buf): New.
8258         (struct symtab_index_entry): Use std::vector for cu_indices.
8259         (struct mapped_symtab): Use std::vector for data.
8260         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8261         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8262         Remove.
8263         (find_slot): Change return type.  Update it to the new data structures.
8264         (hash_expand, add_index_entry): Update it to the new data structures.
8265         (offset_type_compare): Remove.
8266         (uniquify_cu_indices): Update it to the new data structures.
8267         (c_str_view, c_str_view_hasher, vector_hasher): New.
8268         (add_indices_to_cpool): Remove.
8269         (write_hash_table): Update it to the new data structures.
8270         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8271         (eq_psymtab_cu_index): Remove.
8272         (psym_index_map): New typedef.
8273         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8274         reference and std::unordered_map for cu_index_htab.
8275         (add_address_entry, add_address_entry_worker, write_address_map)
8276         (write_psymbols): Update it to the new data structures.
8277         (write_obstack): Remove.
8278         (struct signatured_type_index_data): Change types_list to a data_buf
8279         reference and psyms_seen to a std::unordered_set reference.
8280         (write_one_signatured_type, recursively_write_psymbols)
8281         (write_psymtabs_to_index): Update it to the new data structures.
8282
8283 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8284
8285         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8286         separate-debug-file commands.
8287         * symfile.h (separate_debug_file_debug): New global.
8288         * symfile.c (separate_debug_file_debug): New global.
8289         (separate_debug_file_exists, find_separate_debug_file): Add
8290         debug output.
8291         (_initialize_symfile): Add "set debug separate-debug-file"
8292         command.
8293         * build-id.c (build_id_to_debug_bfd,
8294         find_separate_debug_file_by_buildid): Add debug output.
8295
8296 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8297
8298         * gdbarch.sh (displaced_step_free_closure): Remove.
8299         * gdbarch.h, gdbarch.c: Re-generate.
8300         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8301         displaced_step_free_closure.
8302         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8303         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8304         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8305         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8306         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8307         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8308         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8309         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8310         * infrun.c (displaced_step_clear): Call xfree instead of
8311         gdbarch_displaced_step_free_closure.
8312
8313 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8314
8315         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8316         NULL".
8317
8318 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8319
8320         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8321         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8322         (mn10300_push_dummy_call): Likewise.
8323
8324 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8325
8326         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8327
8328 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8329
8330         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8331
8332 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8333
8334         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8335         able to start inferiors using a shell.
8336         (New remote packets): Announce new packet "QStartupWithShell".
8337         * remote.c: Add PACKET_QStartupWithShell.
8338         (extended_remote_create_inferior): Handle new
8339         PACKET_QStartupWithShell.
8340         (remote_protocol_features) <QStartupWithShell>: New entry for
8341         PACKET_QStartupWithShell.
8342         (_initialize_remote): Call "add_packet_config_cmd" for
8343         QStartupShell.
8344
8345 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8346             Pedro Alves  <palves@redhat.com>
8347
8348         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8349         and "nat/fork-inferior.h".
8350         * common/common-inferior.h: New file, with contents from
8351         "gdb/inferior.h".
8352         * commom/common-utils.c: Include "common-utils.h".
8353         (stringify_argv): New function.
8354         * common/common-utils.h (stringify_argv): New prototype.
8355         * configure.nat: Add "fork-inferior.o" as a dependency for
8356         "*linux*", "fbsd*" and "nbsd*" hosts.
8357         * corefile.c (get_exec_file): Update comment.
8358         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8359         instead of "startup_inferior".
8360         (darwin_create_inferior): Call "add_thread_silent" after
8361         "fork_inferior".
8362         * fork-child.c: Cleanup unnecessary includes.
8363         (SHELL_FILE): Move to "common/common-fork-child.c".
8364         (environ): Likewise.
8365         (exec_wrapper): Initialize.
8366         (get_exec_wrapper): New function.
8367         (breakup_args): Move to "common/common-fork-child.c"; rename to
8368         "breakup_args_for_exec".
8369         (escape_bang_in_quoted_argument): Move to
8370         "common/common-fork-child.c".
8371         (saved_ui): New variable.
8372         (prefork_hook): New function.
8373         (postfork_hook): Likewise.
8374         (postfork_child_hook): Likewise.
8375         (gdb_startup_inferior): Likewise.
8376         (fork_inferior): Move to "common/common-fork-child.c".  Update
8377         function to support gdbserver.
8378         (startup_inferior): Likewise.
8379         * gdbcore.h (get_exec_file): Remove declaration.
8380         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8381         instead of "startup_inferior".  Call "add_thread_silent" after
8382         "fork_inferior".
8383         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8384         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8385         instead of "startup_inferior".  Call "add_thread_silent" after
8386         "fork_inferior".
8387         * inferior.h: Include "common-inferior.h".
8388         (trace_start_error): Move to "common/common-utils.h".
8389         (trace_start_error_with_name): Likewise.
8390         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8391         (startup_inferior): Likewise.
8392         (gdb_startup_inferior): New prototype.
8393         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8394         * nat/fork-inferior.h: New file.
8395         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8396         instead of "startup_inferior".  Call "add_thread_silent" after
8397         "fork_inferior".
8398         * target.h (target_terminal_init): Move prototype to
8399         "target/target.h".
8400         (target_terminal_inferior): Likewise.
8401         (target_terminal_ours): Likewise.
8402         * target/target.h (target_terminal_init): New prototype, moved
8403         from "target.h".
8404         (target_terminal_inferior): Likewise.
8405         (target_terminal_ours): Likewise.
8406         * utils.c (gdb_flush_out_err): New function.
8407
8408 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8409
8410         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8411         * common/common-gdbthread.h: New file, with parts from
8412         "gdb/gdbthread.h".
8413         * gdbthread.h: Include "common-gdbthread.h".
8414         (switch_to_thread): Moved to "common/common-gdbthread.h".
8415
8416 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8417
8418         * Makefile.in (SFILES): Add "common/job-control.c".
8419         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8420         (COMMON_OBS): Add "job-control.o".
8421         * common/job-control.c: New file, with contents from
8422         "gdb/inflow.c".
8423         * common/job-control.h: New file, with contents from "terminal.h".
8424         * fork-child.c: Include "job-control.h".
8425         * inflow.c: Include "job-control.h".
8426         (gdb_setpgid): Move to "common/common-inflow.c".
8427         (_initialize_inflow): Move setting of "job_control" to
8428         "handle_job_control".
8429         * terminal.h (job_control): Moved to "common/common-terminal.h".
8430         (gdb_setpgid): Likewise.
8431         * top.c: Include "job_control.h".
8432         * utils.c: Likewise.
8433         (job_control): Moved to "job-control.c".
8434
8435 2017-06-07  Pedro Alves  <palves@redhat.com>
8436
8437         * Makefile.in (SFILES): Add gdb_regex.c.
8438         (COMMON_OBS): Add gdb_regex.o.
8439         * ada-lang.c (ada_add_standard_exceptions)
8440         (ada_add_exceptions_from_frame, name_matches_regex)
8441         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8442         parameter type to compiled_regex.  Adjust.
8443         (ada_exceptions_list): Use compiled_regex.
8444         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8445         std::unique_ptr<compiled_regex>.
8446         (exception_catchpoint::~exception_catchpoint): Remove regfree
8447         call.
8448         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8449         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8450         * breakpoint.c (solib_catchpoint::compiled): Now a
8451         std::unique_ptr<compiled_regex>.
8452         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8453         (check_status_catch_solib): Adjust to use compiled_regex.
8454         (add_solib_catchpoint): Adjust to use compiled_regex.
8455         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8456         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8457         compiled_regex reference.  Adjust to use it.
8458         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8459         declaration.  Include "gdb_regex.h".
8460         (apropos_cmd): Change regex parameter to compiled_regex reference.
8461         * gdb_regex.c: New file.
8462         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8463         declarations.
8464         (class compiled_regex): New.
8465         * linux-tdep.c: Include "common/gdb_optional.h".
8466         (struct mapping_regexes): New, factored out from
8467         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8468         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8469         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8470         * probe.c: Include "common/gdb_optional.h".
8471         (collect_probes): Use compiled_regex and gdb::optional and remove
8472         cleanups.
8473         * skip.c: Include "common/gdb_optional.h".
8474         (skiplist_entry::compiled_function_regexp): Now a
8475         gdb::optional<compiled_regex>.
8476         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8477         (free_skiplist_entry): Remove regfree call.
8478         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8479         compiled_regex and gdb::optional.
8480         * symtab.c: Include "common/gdb_optional.h".
8481         (search_symbols): Use compiled_regex and gdb::optional.
8482         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8483         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8484         to gdb_regex.c.
8485
8486 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8487
8488         * regcache.c (regcache::save): Avoid buffer use.
8489         (regcache::dump): Likewise.
8490
8491 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8492
8493         * sh-tdep.c (sh_pseudo_register_read): Remove
8494         MAX_REGISTER_SIZE.
8495         (sh_pseudo_register_write): Likewise.
8496         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8497         (sh64_pseudo_register_write): Likewise
8498
8499 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8500
8501         * aarch64-tdep.c (aarch64_store_return_value): Use
8502         V_REGISTER_SIZE.
8503         (aarch64_pseudo_read_value): Likewise.
8504         (aarch64_pseudo_write): Likewise.
8505
8506 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8507
8508         * regformats/regdef.h (set_register_cache): Remove the
8509         declaration.
8510
8511 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8512
8513         * frame.c (frame_unwind_register_signed): Use
8514         frame_unwind_register_value.
8515
8516 2017-06-06  Pedro Alves  <palves@redhat.com>
8517
8518         PR breakpoints/21553
8519         * breakpoint.c (create_breakpoints_sal_default)
8520         (init_breakpoint_sal, create_breakpoint_sal): Use
8521         gdb::unique_xmalloc_ptr for string parameters.
8522         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8523         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8524         (base_breakpoint_create_breakpoints_sal)
8525         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8526         (strace_marker_create_breakpoints_sal)
8527         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8528         string parameters.
8529         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8530         gdb::unique_xmalloc_ptr for string parameters.
8531         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8532         parameters.
8533
8534 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8535
8536         * alpha-tdep.c (alpha_register_to_value): Use
8537         get_frame_register_value.
8538         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8539
8540 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8541
8542         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8543         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8544         (ia64_value_to_register): Likewise.
8545         (ia64_extract_return_value): Likewise.
8546         (ia64_store_return_value): Likewise.
8547         (ia64_push_dummy_call): Likewise.
8548
8549 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8550
8551         GDB 8.0 released.
8552
8553 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8554
8555         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8556
8557 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8558
8559         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8560         parameter.
8561         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8562
8563 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8564
8565         * event-loop.c (poll_timers): Unallocate timer using delete
8566         instead of xfree.
8567
8568 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8569
8570         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8571         (struct breakpoint) <~breakpoint>: New.
8572         (struct watchpoint): Inherit from breakpoint.
8573         <~watchpoint>: New.
8574         <base>: Remove.
8575         (struct tracepoint): Inherit from breakpoint.
8576         <base>: Remove.
8577         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8578         (struct longjmp_breakpoint): Inherit from breakpoint.
8579         <~longjmp_breakpoint>: New.
8580         <base>: Remove.
8581         (new_breakpoint_from_type): Remove casts.
8582         (watchpoint_in_thread_scope): Remove reference to base field.
8583         (watchpoint_del_at_next_stop): Likewise.
8584         (update_watchpoint): Likewise.
8585         (watchpoint_check): Likewise.
8586         (bpstat_check_watchpoint): Likewise.
8587         (set_longjmp_breakpoint): Likewise.
8588         (struct fork_catchpoint): Inherit from breakpoint.
8589         <base>: Remove.
8590         (struct solib_catchpoint): Inherit from breakpoint.
8591         <~solib_catchpoint>: New.
8592         <base>: Remove.
8593         (dtor_catch_solib): Change to ...
8594         (solib_catchpoint::~solib_catchpoint): ... this.
8595         (breakpoint_hit_catch_solib): Remove reference to base field.
8596         (add_solib_catchpoint): Likewise.
8597         (create_fork_vfork_event_catchpoint): Likewise.
8598         (struct exec_catchpoint): Inherit from breakpoint.
8599         <~exec_catchpoint>: New.
8600         <base>: Remove.
8601         (dtor_catch_exec): Change to ...
8602         (exec_catchpoint::~exec_catchpoint): ... this.
8603         (dtor_watchpoint): Change to ...
8604         (watchpoint::~watchpoint): ... this.
8605         (watch_command_1): Remove reference to base field.
8606         (catch_exec_command_1): Likewise.
8607         (base_breakpoint_dtor): Change to ...
8608         (breakpoint::~breakpoint): ... this.
8609         (base_breakpoint_ops): Remove dtor field value.
8610         (longjmp_bkpt_dtor): Change to ...
8611         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8612         (strace_marker_create_breakpoints_sal): Remove reference to base
8613         field.
8614         (delete_breakpoint): Don't manually call breakpoint destructor.
8615         (create_tracepoint_from_upload): Remove reference to base field.
8616         (trace_pass_set_count): Likewise.
8617         (initialize_breakpoint_ops): Don't initialize
8618         momentary_breakpoint_ops, don't set dtors.
8619         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8620         <~ada_catchpoint>: New.
8621         <base>: Remove.
8622         (create_excep_cond_exprs): Remove reference to base field.
8623         (dtor_exception): Change to ...
8624         (ada_catchpoint::~ada_catchpoint): ... this.
8625         (dtor_catch_exception): Remove.
8626         (dtor_catch_exception_unhandled): Remove.
8627         (dtor_catch_assert): Remove.
8628         (create_ada_exception_catchpoint): Remove reference to base
8629         field.
8630         (initialize_ada_catchpoint_ops): Don't set dtors.
8631         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8632         breakpoint.
8633         <~signal_catchpoint>: New.
8634         <base>: Remove.
8635         (signal_catchpoint_dtor): Change to ...
8636         (signal_catchpoint::~signal_catchpoint): ... this.
8637         (create_signal_catchpoint): Remove reference to base field.
8638         (initialize_signal_catchpoint_ops): Don't set dtor.
8639         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8640         from breakpoint.
8641         <~syscall_catchpoint>: New.
8642         <base>: Remove.
8643         (dtor_catch_syscall): Change to ...
8644         (syscall_catchpoint::~syscall_catchpoint): ... this.
8645         (create_syscall_event_catchpoint): Remove reference to base
8646         field.
8647         (initialize_syscall_catchpoint_ops): Don't set dtor.
8648         * break-catch-throw.c (struct exception_catchpoint): Inherit
8649         from breakpoint.
8650         <~exception_catchpoint>: New.
8651         <base>: Remove.
8652         (dtor_exception_catchpoint): Change to ...
8653         (exception_catchpoint::~exception_catchpoint): ... this.
8654         (handle_gnu_v3_exceptions): Remove reference to base field.
8655         (initialize_throw_catchpoint_ops): Don't set dtor.
8656         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8657         field.
8658         * remote.c (remote_get_tracepoint_status): Likewise.
8659         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8660         * tracefile.c (tracefile_fetch_registers): Likewise.
8661         * tracepoint.c (actions_command): Likewise.
8662         (validate_actionline): Likewise.
8663         (tfind_1): Likewise.
8664         (get_traceframe_location): Likewise.
8665         (find_matching_tracepoint_location): Likewise.
8666         (parse_tracepoint_status): Likewise.
8667         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8668
8669 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8670
8671         * breakpoint.c (struct longjmp_breakpoint): New struct.
8672         (is_tracepoint_type): Change return type to bool.
8673         (is_longjmp_type): New function.
8674         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8675         (set_raw_breakpoint_without_location): Use
8676         new_breakpoint_from_type.
8677         (set_raw_breakpoint): Likewise.
8678
8679 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8680
8681         * breakpoint.c (new_breakpoint_from_type): New function.
8682         (create_breakpoint_sal): Use new_breakpoint_from_type and
8683         unique_ptr.
8684         (create_breakpoint): Likewise.
8685
8686 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8687
8688         * memattr.c (mem_info_command): Rename to ...
8689         (info_mem_command): ... this.
8690         (mem_enable_command): Rename to ...
8691         (enable_mem_command): ... this.
8692         (mem_disable_command): Rename to ...
8693         (disable_mem_command): ... this.
8694         (mem_delete_command): Rename to ...
8695         (delete_mem_command): ... this.
8696         (_initialize_mem): Adjust function names.
8697
8698 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8699
8700         * btrace.c (handle_pt_insn_events): New.
8701         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8702         STATUS.  Split into this and ...
8703         (handle_pt_insn_event_flags): ... this.
8704
8705 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8706
8707         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8708         and struct pt_insn.resynced.
8709         * configure: Regenerated.
8710         * config.in: Regenerated.
8711
8712 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8713
8714         * btrace.c (ftrace_find_call_by_number): New function.
8715         (ftrace_new_function): Store objects, not pointers.
8716         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8717         ftrace_new_gap, ftrace_update_function,
8718         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8719         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8720         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8721         btrace_ends_with_single_insn, btrace_call_get): Account for
8722         btrace_thread_info::functions now storing objects.
8723         * btrace.h (struct btrace_thread_info): Add constructor.
8724         (struct btrace_thread_info) <functions>: Make std::vector.
8725         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8726         Initialize with default values.
8727         * record-btrace.c (record_btrace_frame_sniffer): Account for
8728         btrace_thread_info::functions now storing objects.
8729
8730 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8731
8732         * btrace.c: Remove typedef bfun_s.
8733         (ftrace_new_gap): Directly add gaps to the list of gaps.
8734         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8735         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8736         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8737         instead of gdb VEC.
8738
8739 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8740
8741         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8742         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8743         with btrace_thread_info::next_segment and
8744         btrace_thread_info::prev_segment.
8745         * btrace.h: Remove struct btrace_func_link.
8746         (struct btrace_function): Replace pair of function segment pointers
8747         with pair of indices.
8748         * python/py-record-btrace.c (btpy_call_prev_sibling,
8749         btpy_call_next_sibling): Replace references to
8750         btrace_thread_info::segment with btrace_thread_info::next_segment and
8751         btrace_thread_info::prev_segment.
8752         * record-btrace.c (record_btrace_frame_this_id): Use
8753         btrace_find_call_by_number.
8754
8755 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8756
8757         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8758         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8759         btrace_insn_next, btrace_insn_prev): Remove references to
8760         btrace_thread_info::flow.
8761         * btrace.h (struct btrace_function): Remove FLOW.
8762
8763 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8764
8765         * btrace.c (ftrace_find_call_by_number): New function.
8766         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8767         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8768         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8769         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8770         index.
8771         * btrace.h (struct btrace_function): Turn UP into an index.
8772         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8773         as an index.
8774         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8775         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8776         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8777
8778 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8779
8780         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8781         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8782         ftrace_update_function, ftrace_compute_global_level_offset,
8783         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8784         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8785         btrace_insn_end, btrace_is_empty): Remove references to
8786         btrace_thread_info::begin and btrace_thread_info::end.
8787         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8788         (struct btrace_thread_info) <functions>: Adjust comment.
8789         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8790         btrace_thread_info::begin.
8791
8792 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8793
8794         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8795         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8796         ftrace_update_function): Remove arguments that implicitly were always
8797         BTINFO->END.
8798         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8799         Don't pass BTINFO->END.
8800
8801 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8802
8803         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8804         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8805         btrace_find_insn_by_number): Replace function segment pointer with
8806         index.
8807         (btrace_insn_cmp): Simplify.
8808         * btrace.h: (struct btrace_insn_iterator) Rename index to
8809         insn_index.  Replace function segment pointer with index into function
8810         segment vector.
8811         * record-btrace.c (record_btrace_call_history): Replace function
8812         segment pointer use with index.
8813         (record_btrace_frame_sniffer): Retrieve function call segment through
8814         vector.
8815         (record_btrace_set_replay): Remove defunc't safety check.
8816
8817 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8818
8819         * btrace.c (btrace_ends_with_single_insn): New function.
8820         (btrace_call_get, btrace_call_number, btrace_call_begin,
8821         btrace_call_end, btrace_call_next, btrace_call_prev,
8822         btrace_find_call_by_number): Use index into call segment vector
8823         instead of pointer.
8824         (btrace_call_cmp): Simplify.
8825         * btrace.h (struct btrace_call_iterator): Replace function call segment
8826         pointer with index into vector.
8827         * record-btrace.c (record_btrace_call_history): Use index instead of
8828         pointer.
8829
8830 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8831
8832         * btrace.c (btrace_insn_begin, btrace_insn_end,
8833         btrace_find_insn_by_number): Add btinfo to iterator.
8834         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8835
8836 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8837
8838         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8839         and save pointers directly.
8840         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8841         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8842         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8843         changed signature of functions.
8844         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8845         (btrace_fetch): Remove code that adds btrace_function pointers to
8846         vector of btrace_functions.
8847         (btrace_clear): Simplify freeing vector of btrace_functions.
8848
8849 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8850
8851         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8852         Replace VEC_* with std::vector functions.
8853         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8854         (struct btrace_thread_info)<functions>: Change type to std::vector.
8855
8856 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8857
8858         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8859         "Removed targets and native configurations" up.  Merge duplicate
8860         "New commands" sub-sections.  Add "New options" sub-sections.
8861
8862 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8863
8864         * defs.h (copy_integer_to_size): New declaration.
8865         * findvar.c (copy_integer_to_size): New function.
8866         (do_cint_test): New selftest function.
8867         (copy_integer_to_size_test): Likewise.
8868         (_initialize_findvar): Likewise.
8869         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8870         (mips_fbsd_collect_reg): Use raw_collect_integer.
8871         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8872         (mips64_fill_gregset): Use raw_collect_integer
8873         (mips64_fill_fpregset): Use raw_supply_integer.
8874         * regcache.c (regcache::raw_supply_integer): New function.
8875         (regcache::raw_collect_integer): Likewise.
8876         * regcache.h: (regcache::raw_supply_integer): New declaration.
8877         (regcache::raw_collect_integer): Likewise.
8878
8879 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8880
8881         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8882         (COMMON_OBS): Add gdbarch-selftests.o.
8883         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8884         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8885         * gdbarch-selftests.c: New file.
8886         * regcache.h (regcache) <~regcache>: Mark it virtual if
8887         GDB_SELF_TEST.
8888         <raw_write>: Likewise.
8889
8890 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8891
8892         * regcache.c (current_regcache): Change it to
8893         regcache::current_regcache.
8894         (regcache_observer_target_changed): Update.
8895         (regcache_thread_ptid_changed): Make it a regcache static
8896         method.
8897         (regcache_thread_ptid_changed): Update.
8898         (class regcache_access): New.
8899         (current_regcache_test): Update.
8900         (_initialize_regcache): Update.
8901         * regcache.h: Include forward_list.
8902         (regcache): Declare regcache_thread_ptid_changed and declare
8903         registers_changed_ptid as friend.
8904
8905 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8906
8907         * i387-tdep.c (i387_register_to_value): Use register_size
8908         instead of TYPE_LENGTH.
8909         * m68k-tdep.c (m68k_register_to_value): Likewise.
8910
8911 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8912
8913         * i387-tdep.c (i387_convert_register_p): Return false if type
8914         code isn't TYPE_CODE_FLT.
8915
8916 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8917
8918         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8919         length is 4.
8920         (alpha_register_to_value): Remove type length check.
8921         (alpha_value_to_register): Likewise.
8922
8923 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8924
8925         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8926         TYPE_CODE_FLT.
8927
8928 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8929
8930         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8931         TYPE_CODE_FLT or not.
8932
8933 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8934
8935         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8936         * avr-tdep.c (avr_gdbarch_init): Likewise.
8937         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8938         * cris-tdep.c (cris_gdbarch_init): Likewise.
8939         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8940         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8941         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8942         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8943         * mep-tdep.c (mep_gdbarch_init): Likewise.
8944         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8945         * mips-tdep.c (mips_gdbarch_init): Likewise.
8946         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8947         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8948         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8949         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8950         * v850-tdep.c (v850_gdbarch_init): Likewise.
8951
8952 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8953
8954         * selftest-arch.c (tests_with_arch): Call registers_changed
8955         and reinit_frame_cache.
8956         * selftest.c (run_self_tests): Likewise.
8957
8958 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8959
8960         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8961         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8962
8963 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8964
8965         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8966         set_gdbarch_print_insn.
8967
8968 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8969
8970         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8971         set_gdbarch_print_insn.
8972
8973 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8974
8975         * alpha-tdep.c (alpha_gdbarch_init): Don't call
8976         set_gdbarch_print_insn.
8977         * arc-tdep.c (arc_gdbarch_init): Likewise.
8978         * arch-utils.c: include dis-asm.h.
8979         (default_print_insn): New function.
8980         * arch-utils.h (default_print_insn): Declare.
8981         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8982         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8983         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8984         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8985         * frv-tdep.c (frv_gdbarch_init): Likewise.
8986         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8987         * gdbarch.sh (print_insn): Use default_print_insn.
8988         * gdbarch.c: Regenerated.
8989         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8990         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8991         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8992         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8993         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8994         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8995         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8996         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8997         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8998         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8999         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9000         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9001         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9002         * mt-tdep.c (mt_gdbarch_init): Likewise.
9003         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9004         * nios2-tdep.c (nios2_print_insn): Remove.
9005         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9006         * rx-tdep.c (rx_gdbarch_init): Likewise.
9007         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9008         * score-tdep.c (score_print_insn): Remove.
9009         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9010         * sh-tdep.c (sh_gdbarch_init): Likewise.
9011         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9012         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9013         * tic6x-tdep.c (tic6x_print_insn): Remove.
9014         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9015         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9016         * v850-tdep.c (v850_gdbarch_init): Likewise.
9017         * vax-tdep.c (vax_gdbarch_init): Likewise.
9018         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9019         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9020
9021 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9022
9023         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9024         (MIPS_FP0_REGNUM): Remove.
9025         (MIPS_FSR_REGNUM): Remove.
9026         (mips_fbsd_supply_fpregs): Use mips_regnum.
9027         (mips_fbsd_supply_gregs): Likewise.
9028         (mips_fbsd_collect_fpregs): Likewise.
9029         (mips_fbsd_collect_gregs): Likewise.
9030
9031 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9032
9033         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9034         (getpfpregs_supplies): New function.
9035         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9036         getfpregs_supplies.
9037         (mips_fbsd_store_inferior_registers): Likewise.
9038
9039 2017-05-22  Pedro Alves <palves@redhat.com>
9040
9041         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9042         maintainer.
9043
9044 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9045
9046         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9047         (store_register): Likewise.
9048         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9049         (get_decimal_float_return_value): Likewise.
9050         (do_ppc_sysv_return_value): Likewise.
9051         (ppc64_sysv_abi_push_integer): Likewise.
9052         (ppc64_sysv_abi_push_freg): Likewise.
9053         (ppc64_sysv_abi_return_value_base): Likewise.
9054         (ppc64_sysv_abi_return_value): Likewise.
9055         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9056         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9057         * rs6000-nat.c: Likewise.
9058         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9059         (rs6000_value_to_register): Likewise.
9060         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9061
9062 2017-05-21  Tom Tromey  <tom@tromey.com>
9063
9064         PR rust/21466:
9065         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9066         arrays as "[T]", not "[T; ]".
9067
9068 2017-05-19  Tom Tromey  <tom@tromey.com>
9069
9070         PR rust/21484:
9071         * rust-lang.c (exp_descriptor_rust): New function.
9072         (rust_language_defn): Use it.
9073         * p-lang.c (pascal_language_defn): Update.
9074         * opencl-lang.c (opencl_language_defn): Update.
9075         * objc-lang.c (objc_language_defn): Update.
9076         * m2-lang.c (m2_language_defn): Update.
9077         * language.h (struct language_defn)
9078         <la_watch_location_expression>: New member.
9079         * language.c (unknown_language_defn, auto_language_defn)
9080         (local_language_defn): Update.
9081         * go-lang.c (go_language_defn): Update.
9082         * f-lang.c (f_language_defn): Update.
9083         * d-lang.c (d_language_defn): Update.
9084         * c-lang.h (c_watch_location_expression): Declare.
9085         * c-lang.c (c_watch_location_expression): New function.
9086         (c_language_defn, cplus_language_defn, asm_language_defn)
9087         (minimal_language_defn): Use it.
9088         * breakpoint.c (watch_command_1): Call
9089         la_watch_location_expression.
9090         * ada-lang.c (ada_language_defn): Update.
9091
9092 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9093
9094         PR tui/21482
9095         * gdb_curses.h (NOMACROS): Define.
9096         (NCURSES_NOMACROS): Define.
9097
9098 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9099
9100         PR tui/21482
9101         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9102         arg to char *.
9103         * tui/tui-wingeneral.c (box_win): Likewise.
9104         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9105         (tui_show_source_line): Likewise.
9106         (tui_show_exec_info_content): Likewise.
9107
9108 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9109
9110         * sparc-tdep.c (sparc_structure_return_p)
9111         (sparc_arg_on_registers_p): New functions.
9112         (sparc32_store_arguments): Use them.
9113         * sparc64-tdep.c (sparc64_16_byte_align_p)
9114         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9115         Handle TYPE_CODE_ARRAY.
9116
9117 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9118
9119         * cli/cli-decode.c (add_alias_cmd): New function.
9120         * command.h (add_alias_cmd): Declare.
9121         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9122         instead call add_alias_cmd.
9123
9124 2017-05-17  Pedro Alves  <palves@redhat.com>
9125
9126         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9127         (nat_makefile_frag): ... this.  All references updated.
9128         * configure.ac: Likewise.
9129         * configure.nat: Likewise.  Enhance comments.
9130         * configure: Regenerate.
9131
9132 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9133
9134         * procfs.c (procfs_create_inferior): Change prototype to match
9135         definition.
9136
9137 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9138
9139         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9140         C++ compiler warning.
9141
9142 2017-05-12  Tom Tromey  <tom@tromey.com>
9143
9144         PR rust/21483:
9145         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9146         recurse, just call value_struct_elt directly.
9147
9148 2017-05-12  Tom Tromey  <tom@tromey.com>
9149
9150         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9151         OP_RUST_ARRAY>: Fix.
9152
9153 2017-05-12  Tom Tromey  <tom@tromey.com>
9154
9155         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9156
9157 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9158
9159         * regcache.c: Include <forward_list>.
9160         (struct regcache_list): Remove.
9161         (current_regcache): Update.
9162         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9163         (regcache_thread_ptid_changed): Likewise.
9164         (registers_changed_ptid): Likewise.
9165         (current_regcache_size): Likewise.
9166
9167 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9168
9169         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9170         (current_regcache_size): New function.
9171         (current_regcache_test): New function.
9172         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9173
9174 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9175
9176         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9177         (print_gp_register_row): Use get_frame_register_value.
9178
9179 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9180
9181         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9182         (mips_supply_fpregset): Likewise.
9183         (mips64_supply_gregset): Likewise.
9184
9185 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9186
9187         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9188         regcache->raw_supply_zeroed.
9189
9190 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9191
9192         * configure.nat: Rearrange 'case' statements to match
9193         host before cpu.
9194
9195 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9196
9197         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9198         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9199         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9200         "@nat_extra_makefile_frag@".
9201         (Makefile): Remove dependency on "@frags@".
9202         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9203         (data-directory/Makefile): Likewise.
9204         * config/aarch64/linux.mh: Deleted; moved contents to
9205         "gdb/configure.nat".
9206         * config/alpha/alpha-linux.mh: Likewise.
9207         * config/alpha/nbsd.mh: Likewise.
9208         * config/arm/linux.mh: Likewise.
9209         * config/arm/nbsdelf.mh: Likewise.
9210         * config/i386/cygwin.mh: Likewise.
9211         * config/i386/cygwin64.mh: Likewise.
9212         * config/i386/darwin.mh: Likewise.
9213         * config/i386/fbsd.mh: Likewise.
9214         * config/i386/fbsd64.mh: Likewise.
9215         * config/i386/go32.mh: Likewise.
9216         * config/i386/i386gnu.mh: Likewise.
9217         * config/i386/i386sol2.mh: Likewise.
9218         * config/i386/linux.mh: Likewise.
9219         * config/i386/linux64.mh: Likewise.
9220         * config/i386/mingw.mh: Likewise.
9221         * config/i386/mingw64.mh: Likewise.
9222         * config/i386/nbsd64.mh: Likewise.
9223         * config/i386/nbsdelf.mh: Likewise.
9224         * config/i386/nto.mh: Likewise.
9225         * config/i386/obsd.mh: Likewise.
9226         * config/i386/obsd64.mh: Likewise.
9227         * config/i386/sol2-64.mh: Likewise.
9228         * config/ia64/linux.mh: Likewise.
9229         * config/m32r/linux.mh: Likewise.
9230         * config/m68k/linux.mh: Likewise.
9231         * config/m68k/nbsdelf.mh: Likewise.
9232         * config/m68k/obsd.mh: Likewise.
9233         * config/m88k/obsd.mh: Likewise.
9234         * config/mips/fbsd.mh: Likewise.
9235         * config/mips/linux.mh: Likewise.
9236         * config/mips/nbsd.mh: Likewise.
9237         * config/mips/obsd64.mh: Likewise.
9238         * config/pa/linux.mh: Likewise.
9239         * config/pa/nbsd.mh: Likewise.
9240         * config/pa/obsd.mh: Likewise.
9241         * config/powerpc/aix.mh: Likewise.
9242         * config/powerpc/fbsd.mh: Likewise.
9243         * config/powerpc/linux.mh: Likewise.
9244         * config/powerpc/nbsd.mh: Likewise.
9245         * config/powerpc/obsd.mh: Likewise.
9246         * config/powerpc/ppc64-linux.mh: Likewise.
9247         * config/powerpc/spu-linux.mh: Likewise.
9248         * config/s390/linux.mh: Likewise.
9249         * config/sh/nbsd.mh: Likewise.
9250         * config/sparc/fbsd.mh: Likewise.
9251         * config/sparc/linux.mh: Likewise.
9252         * config/sparc/linux64.mh: Likewise.
9253         * config/sparc/nbsd64.mh: Likewise.
9254         * config/sparc/nbsdelf.mh: Likewise.
9255         * config/sparc/obsd64.mh: Likewise.
9256         * config/sparc/sol2.mh: Likewise.
9257         * config/tilegx/linux.mh: Likewise.
9258         * config/vax/nbsdelf.mh: Likewise.
9259         * config/vax/obsd.mh: Likewise.
9260         * config/xtensa/linux.mh: Likewise.
9261         * config/i386/i386gnu.mn: New file, with excerpts from
9262         "config/i386/i386gnu.mh".
9263         * configure: Regenerate.
9264         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9265         *.mh files under "gdb/config".
9266         * configure.nat: New file, with contents from the
9267         "gdb/config/*/*.mh" files.
9268
9269 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9270
9271         * btrace.c (btrace_clear): Free insn vector.
9272
9273 2017-05-05  Pedro Alves  <palves@redhat.com>
9274
9275         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9276         * configure: Regenerate.
9277
9278 2017-05-04  Pedro Alves  <palves@redhat.com>
9279
9280         * Makefile.in (SFILES): Add progspace-and-thread.c.
9281         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9282         (COMMON_OBS): Add progspace-and-thread.o.
9283         * breakpoint.c: Include "progspace-and-thread.h".
9284         (update_inserted_breakpoint_locations)
9285         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9286         Use scoped_restore_current_pspace_and_thread.
9287         (create_std_terminate_master_breakpoint): Use
9288         scoped_restore_current_program_space.
9289         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9290         (print_breakpoint_location): Use
9291         scoped_restore_current_program_space.
9292         (bp_loc_is_permanent): Use
9293         scoped_restore_current_pspace_and_thread.
9294         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9295         (download_tracepoint_locations): Use
9296         scoped_restore_current_pspace_and_thread.
9297         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9298         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9299         (enum step_over_calls_kind): Moved from inferior.h.
9300         (class scoped_restore_current_thread): New class.
9301         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9302         declaration.
9303         (scoped_restore_current_thread): New class.
9304         * infcmd.c: Include "common/gdb_optional.h".
9305         (continue_1, proceed_after_attach): Use
9306         scoped_restore_current_thread.
9307         (notice_new_inferior): Use scoped_restore_current_thread.
9308         * inferior.c: Include "progspace-and-thread.h".
9309         (restore_inferior, save_current_inferior): Delete.
9310         (add_inferior_command, clone_inferior_command): Use
9311         scoped_restore_current_pspace_and_thread.
9312         * inferior.h (scoped_restore_current_inferior): New class.
9313         * infrun.c: Include "progspace-and-thread.h" and
9314         "common/gdb_optional.h".
9315         (follow_fork_inferior): Use
9316         scoped_restore_current_pspace_and_thread.
9317         (scoped_restore_exited_inferior): New class.
9318         (handle_vfork_child_exec_or_exit): Use
9319         scoped_restore_exited_inferior,
9320         scoped_restore_current_pspace_and_thread,
9321         scoped_restore_current_thread and scoped_restore.
9322         (fetch_inferior_event): Use scoped_restore_current_thread.
9323         * linespec.c (decode_line_full, decode_line_1): Use
9324         scoped_restore_current_program_space.
9325         * mi/mi-main.c: Include "progspace-and-thread.h".
9326         (exec_continue): Use scoped_restore_current_thread.
9327         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9328         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9329         * proc-service.c (ps_pglobal_lookup): Use
9330         scoped_restore_current_program_space.
9331         * progspace-and-thread.c: New file.
9332         * progspace-and-thread.h: New file.
9333         * progspace.c (release_program_space, clone_program_space): Use
9334         scoped_restore_current_program_space.
9335         (restore_program_space, save_current_program_space)
9336         (save_current_space_and_thread): Delete.
9337         (switch_to_program_space_and_thread): Moved to
9338         progspace-and-thread.c.
9339         * progspace.h (save_current_program_space)
9340         (save_current_space_and_thread): Delete declarations.
9341         (scoped_restore_current_program_space): New class.
9342         * remote.c (remote_btrace_maybe_reopen): Use
9343         scoped_restore_current_thread.
9344         * symtab.c: Include "progspace-and-thread.h".
9345         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9346         * thread.c (print_thread_info_1): Use
9347         scoped_restore_current_thread.
9348         (struct current_thread_cleanup): Delete.
9349         (do_restore_current_thread_cleanup)
9350         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9351         (scoped_restore_current_thread::~scoped_restore_current_thread):
9352         ... this new dtor.
9353         (make_cleanup_restore_current_thread): Rename/convert to ...
9354         (scoped_restore_current_thread::scoped_restore_current_thread):
9355         ... this new ctor.
9356         (thread_apply_all_command): Use scoped_restore_current_thread.
9357         (thread_apply_command): Use scoped_restore_current_thread.
9358         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9359         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9360
9361 2017-05-04  Pedro Alves  <palves@redhat.com>
9362
9363         * thread.c (make_cleanup_restore_current_thread): Move
9364         find_thread_ptid call before the is_stopped call.  Assert that the
9365         thread is found.  Replace is_stopped call by checking the thread's
9366         state directly.  Remove unnecessary NULL-thread check.
9367
9368 2017-05-04  Pedro Alves  <palves@redhat.com>
9369
9370         * corelow.c (thread_section_name): New class.
9371         (get_core_register_section, get_core_siginfo): Use it.
9372
9373 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9374
9375         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9376         (get_core_register_section): Remove xfree of NULL pointer.
9377
9378 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9379
9380         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9381         * regcache.c (regcache::raw_supply_zeroed): New function.
9382         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9383
9384 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9385
9386         * gdbarch.sh: Remove commented out definition of
9387         TARGET_CHAR_BIT.
9388         * gdbarch.h: Re-generate.
9389
9390 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9391
9392         * configure: Regenerate.
9393
9394 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9395
9396         * solib-target.c (solib_target_relocate_section_addresses):
9397         Remove num_section_bases, num_bases, segment_bases variables.
9398
9399 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9400
9401         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9402
9403 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9404
9405         * solib-target.c: Include <vector>
9406         (struct lm_info_target) <~lm_info_target>: Remove.
9407         <segment_bases, section_bases>: Change type to
9408         std::vector<CORE_ADDR>.
9409         (library_list_start_segment, library_list_start_section,
9410         library_list_end_library,
9411         solib_target_relocate_section_addresses): Adjust.
9412
9413 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9414
9415         * gdbarch.sh (software_single_step): Change return type to
9416         std::vector<CORE_ADDR>.
9417         * gdbarch.c, gdbarch.h: Re-generate.
9418         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9419         Adjust.
9420         (arm_deal_with_atomic_sequence_raw): Adjust.
9421         (thumb_get_next_pcs_raw): Adjust.
9422         (arm_get_next_pcs_raw): Adjust.
9423         (arm_get_next_pcs): Adjust.
9424         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9425         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9426         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9427         (alpha_software_single_step): Adjust.
9428         * alpha-tdep.h (alpha_software_single_step): Adjust.
9429         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9430         * arm-tdep.c (arm_software_single_step): Adjust.
9431         (arm_breakpoint_kind_from_current_state): Adjust.
9432         * arm-tdep.h (arm_software_single_step): Adjust.
9433         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9434         * cris-tdep.c (cris_software_single_step): Adjust.
9435         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9436         (micromips_deal_with_atomic_sequence): Adjust.
9437         (deal_with_atomic_sequence): Adjust.
9438         (mips_software_single_step): Adjust.
9439         * mips-tdep.h (mips_software_single_step): Adjust.
9440         * moxie-tdep.c (moxie_software_single_step): Adjust.
9441         * nios2-tdep.c (nios2_software_single_step): Adjust.
9442         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9443         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9444         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9445         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9446         * sparc-tdep.c (sparc_software_single_step): Adjust.
9447         * spu-tdep.c (spu_software_single_step): Adjust.
9448         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9449
9450 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9451
9452         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9453         * gdbarch.h: Re-generate.
9454
9455 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9456
9457         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9458         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9459         * python/py-instruction.c, python/py-instruction.h: New file.
9460         * python/py-record.c: Add py-instruction.h include.
9461         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9462         gdb.RecordInstruction.
9463         * python/python-internal.h: Add gdbpy_initialize_instruction
9464         declaration.
9465         * python/python.c (do_start_initialization): Add
9466         gdbpy_initialize_instruction.
9467
9468 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9469
9470         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9471         Remove.
9472         (btrace_func_from_recpy_func): New function.
9473         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9474         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9475         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9476         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9477         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9478         Also, use new helper functions.
9479         (btpy_list_item): Use new helper functions.
9480         (recpy_bt_function_call_history): Use new type name.
9481         (btpy_call_getset): Remove.
9482         (gdbpy_initialize_btrace): Remove code to initialize
9483         gdb.BtraceFunctionCall.
9484         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9485         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9486         recpy_bt_func_prev, recpy_bt_func_next): New export.
9487         * python/py-record.c (recpy_func_type): New static object.
9488         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9489         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9490         recpy_func_next): New function.
9491         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9492         (recpy_func_getset): New static object.
9493         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9494         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9495
9496 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9497
9498         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9499         (btpy_object, btpy_insn_type, btpy_new): Remove.
9500         (btpy_list_object): Use gdb.RecordInstruction type instead of
9501         gdb.BtraceInstruction type.
9502         (btrace_insn_from_recpy_insn): New function.
9503         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9504         btpy_new.
9505         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9506         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9507         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9508         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9509         instead of btpy_object.
9510         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9511         btpy_insn_data, btpy_insn_decode): Rename to ...
9512         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9513         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9514         recpy_bt_insn_decode): This.  Also, use new helper functions.
9515         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9516         recpy_insn_type.
9517         (btpy_insn_getset): Remove.
9518         (gdbpy_initialize_btrace): Remove code to initialize
9519         gdb.BtraceInstruction.  Use recpy_element_object.
9520         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9521         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9522         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9523         * python/py-record.c (recpy_insn_type): New static object.
9524         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9525         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9526         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9527         New function.
9528         (recpy_insn_getset): New static object.
9529         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9530         * python/py-record.h (recpy_element_object): New typedef.
9531         (recpy_insn_type, recpy_insn_new): New export.
9532
9533 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9534
9535         * py-record-btrace.c (btpy_insn_new): Removed.
9536         (btpy_insn_or_gap_new): New function.
9537         (btpy_insn_error): Removed.
9538         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9539         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9540         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9541         btpy_insn_or_gap_new instead of btpy_insn_new.
9542         (btpy_insn_getset): Remove btpy_insn_error.
9543         * py-record.c (recpy_gap_type): New static object.
9544         (recpy_gap_object): New typedef.
9545         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9546         recpy_gap_reason_string): New function.
9547         (recpy_gap_getset): New static object.
9548         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9549         * py-record.h (recpy_gap_new): New export.
9550
9551 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9552
9553         * python/py-record.c (recpy_ptid): Remove.
9554         (recpy_record_getset): Remove recpy_ptid.
9555
9556 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9557
9558         * btrace.c (btrace_fetch): Set inferior_ptid.
9559         * python/py-record-btrace.c: Add "py-record.h" include.
9560         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9561         recpy_bt_end, recpy_bt_instruction_history,
9562         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9563         in gdb.Record object instead of current ptid.
9564         * python/py-record.c: Include new "py-record.h" file.
9565         (recpy_record_object): Moved to py-record.h.
9566         * python/py-record.h: New file.
9567
9568 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9569
9570         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9571         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9572         indentation.
9573
9574 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9575
9576         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9577         the past maintainers section.
9578
9579 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9580
9581         * infcmd.c (get_return_value): Use regcache ctor, and remove
9582         cleanup.
9583
9584 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9585             Pedro Alves  <palves@redhat.com>
9586
9587         * regcache.c (regcache::regcache): New tag dispatch ctor.
9588         (do_cooked_read): Moved above.
9589         (regcache_dup): Use the tag dispatch ctor..
9590         * regcache.h (regcache): Declare ctor, delete copy ctor and
9591         assignment operator, remove friend regcache_dup.
9592
9593 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9594
9595         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9596         call method save instead of regcache_cpy.
9597         * regcache.h (struct regcache): Make regcache_dup a friend.
9598
9599 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9600
9601         * regcache.c (struct regcache): Move to regcache.h
9602         (regcache::arch): New method.
9603         (regcache_get_ptid): Update.
9604         (get_regcache_arch): Call arch method.
9605         (get_regcache_aspace): Call method aspace.
9606         (register_buffer): Change it to method.
9607         (regcache_save): Change it to regcache::save.
9608         (regcache_restore): Likewise.
9609         (regcache_cpy_no_passthrough): Remove the declaration.
9610         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9611         (regcache_cpy_no_passthrough): Change it to method
9612         cpy_no_passthrough.
9613         (regcache_register_status): Change it to method
9614         get_register_status.
9615         (regcache_invalidate): Change it to method invalidate.
9616         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9617         (regcache_raw_update): Change it to method raw_update.
9618         (regcache_raw_read): Likewise.
9619         (regcache_raw_read_signed): Likewise.
9620         (regcache_raw_read_unsigned): Likewise.
9621         (regcache_raw_write_signed): Likewise.
9622         (regcache_raw_write_unsigned): Likewise.
9623         (regcache_cooked_read): Likewise.
9624         (regcache_cooked_read_value): Likewise.
9625         (regcache_cooked_read_signed): Likewise.
9626         (regcache_cooked_read_unsigned): Likewise.
9627         (regcache_cooked_write_signed): Likewise.
9628         (regcache_cooked_write_unsigned): Likewise.
9629         (regcache_raw_set_cached_value): Likewise.
9630         (regcache_raw_write): Likewise.
9631         (regcache_cooked_write): Likewise.
9632         (regcache_xfer_part): Likewise.
9633         (regcache_raw_read_part): Likewise.
9634         (regcache_raw_write_part): Likewise.
9635         (regcache_cooked_read_part): Likewise.
9636         (regcache_cooked_write_part): Likewise.
9637         (regcache_raw_supply): Likewise.
9638         (regcache_raw_collect): Likewise.
9639         (regcache_transfer_regset): Likewise.
9640         (regcache_supply_regset): Likewise.
9641         (regcache_collect_regset): Likewise.
9642         (regcache_debug_print_register): Likewise.
9643         (enum regcache_dump_what): Move it to regcache.h.
9644         (regcache_dump): Change it to method dump.
9645         * regcache.h (enum regcache_dump_what): New.
9646         (class regcache): New.
9647         * target.c (target_fetch_registers): Call method
9648         debug_print_register.
9649         (target_store_registers): Likewise.
9650
9651 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9652
9653         * windows-nat.c (struct lm_info_windows): Initialize field.
9654         (windows_make_so): Allocate lm_info_windows with new.
9655         (windows_free_so): Free lm_info_windows with delete.
9656
9657 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9658
9659         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9660         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9661         cleanup.
9662         (darwin_free_so): Free lm_info_darwin with delete.
9663
9664 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9665
9666         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9667         <l_addr_p>: Change type to bool.
9668         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9669         (svr4_free_so): Free lm_info_svr4 with delete.
9670         (svr4_copy_library_list): Replace memcpy with call to copy
9671         constructor.
9672         (library_list_start_library, svr4_default_sos): Allocate
9673         lm_info_svr4 with new.
9674
9675 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9676
9677         * solib-target.c (struct lm_info_target): Add destructor,
9678         initialize fields.
9679         <name>: Change type to std::string.
9680         (library_list_start_library): Allocate lm_info_target with new.
9681         (solib_target_free_library_list): Free lm_info_target with
9682         delete.
9683         (solib_target_current_sos): Adapt to std::string.
9684         (solib_target_free_so): Free lm_info_target with delete.
9685
9686 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9687
9688         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9689         fields.
9690         (frv_current_sos): Allocate lm_info_frv with new.
9691         (frv_relocate_main_executable): Free lm_info_frv with delete,
9692         allocate with new.
9693         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9694
9695 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9696
9697         * solib-frv.c (struct lm_info_frv): Fix indentation.
9698
9699 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9700
9701         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9702         map field.
9703         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9704         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9705         and allocate with new.
9706         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9707
9708 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9709
9710         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9711         <filename, member_name>: Change type to std::string.
9712         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9713         (library_list_start_library): Allocate lm_info_aix with new.
9714         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9715         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9716         with copy constructor.
9717
9718 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9719
9720         * solist.h (struct lm_info): Remove.
9721         (struct lm_info_base): New class.
9722         (struct so_list) <lm_info>: Change type to lm_info_base *.
9723         * nto-tdep.c (struct lm_info): Remove.
9724         (lm_addr): Adjust.
9725         * solib-aix.c (struct lm_info): Rename to ...
9726         (struct lm_info_aix): ... this.  Extend lm_info_base.
9727         (lm_info_p): Rename to ...
9728         (lm_info_aix_p): ... this, and adjust.
9729         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9730         solib_aix_parse_libraries, library_list_start_library,
9731         solib_aix_free_library_list, solib_aix_parse_libraries,
9732         solib_aix_get_library_list,
9733         solib_aix_relocate_section_addresses, solib_aix_free_so,
9734         solib_aix_get_section_offsets,
9735         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9736         Adjust.
9737         (struct solib_aix_inferior_data) <library_list>: Adjust.
9738         * solib-darwin.c (struct lm_info): Rename to ...
9739         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9740         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9741         * solib-dsbt.c (struct lm_info): Rename to ...
9742         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9743         (struct dsbt_info) <main_executable_lm_info): Adjust.
9744         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9745         dsbt_relocate_section_addresses): Adjust.
9746         * solib-frv.c (struct lm_info): Rename to ...
9747         (struct lm_info_frv): ... this.  Extend lm_info_base.
9748         (main_executable_lm_info): Adjust.
9749         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9750         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9751         find_canonical_descriptor_in_load_object,
9752         frv_fdpic_find_canonical_descriptor): Adjust.
9753         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9754         to lm_info_svr4.
9755         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9756         svr4_clear_so, svr4_copy_library_list,
9757         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9758         svr4_current_sos, svr4_fetch_objfile_link_map,
9759         solist_update_incremental): Adjust.
9760         * solib-svr4.h (struct lm_info_svr4): Move here from
9761         solib-svr4.c.
9762         * solib-target.c (struct lm_info): Rename to ...
9763         (struct lm_info_target): ... this.  Extend lm_info_base.
9764         (lm_info_p): Rename to ...
9765         (lm_info_target_p): ... this.
9766         (solib_target_parse_libraries, library_list_start_segment,
9767         library_list_start_section, library_list_start_library,
9768         library_list_end_library, solib_target_free_library_list,
9769         solib_target_current_sos, solib_target_free_so,
9770         solib_target_relocate_section_addresses): Adjust.
9771         * windows-nat.c (struct lm_info): Rename to ...
9772         (struct lm_info_windows): ... this.  Extend lm_info_base.
9773         (windows_make_so, handle_load_dll, handle_unload_dll,
9774         windows_xfer_shared_libraries): Adjust.
9775
9776 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9777
9778         * solib-darwin.c (struct darwin_so_list): Remove.
9779         (darwin_current_sos): Allocate an so_list object instead of a
9780         darwin_so_list, separately allocate an lm_info object.
9781         (darwin_free_so): Free lm_info.
9782
9783 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9784
9785         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9786         with fprintf_filtered.
9787
9788 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9789
9790         * regcache.c (regcache::regcache): New function.
9791         (regcache::~regcache): New function.
9792         (regcache_xmalloc_1): Remove.
9793         (regcache_xmalloc): Call new regcache.
9794         (regcache_xfree): Call delete regcache.
9795         (get_thread_arch_aspace_regcache): Call new regcache.
9796
9797 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9798
9799         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9800         lwp instead of ptid_get_lwp.
9801
9802 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9803
9804         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9805         lwp_info instead of getting from inferior_ptid.
9806
9807 2017-04-27  Keith Seitz  <keiths@redhat.com>
9808
9809         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9810         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9811         (CV_CONVERSION_BADNESS): Define.
9812         (rank_one_type): Remove overly restrictive rvalue reference
9813         rank checks.
9814         Add cv-qualifier checks and subranks for type equality.
9815         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9816         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9817         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9818
9819 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9820
9821         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9822         count when creating the object.
9823
9824 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9825             Ulrich Weigand  <uweigand@de.ibm.com>
9826
9827         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9828         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9829         is used in AIX.
9830         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9831         (process_xcoff_symbol): Likewise.
9832         (scan_xcoff_symtab): Likewise.
9833
9834 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9835
9836         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9837         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9838         (ia64_access_reg): Use get_frame_register_unsigned.
9839         (ia64_access_rse_reg): Likewise.
9840         (ia64_libunwind_frame_prev_register): Likewise.
9841
9842 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9843
9844         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9845         * gdbarch.c: Regenerated.
9846         * gdbarch.h: Regenerated.
9847         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9848         visibility external.
9849         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9850         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9851         (enum cfa_how_kind): Move to ...
9852         (struct dwarf2_frame_state_reg_info): Likewise.
9853         (struct dwarf2_frame_state): Likewise.
9854         * dwarf2-frame.h: ... here.
9855         (dwarf2_frame_state_alloc_regs): New declaration.
9856         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9857         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9858
9859 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9860
9861         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9862         regcache_raw_read_unsigned.
9863         (xtensa_pseudo_register_write): Likewise.
9864
9865 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9866
9867         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9868         (nds32_pseudo_register_write): Likewise.
9869
9870 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9871
9872         * regcache.c (struct regcache) <readonly_p>: Change its type
9873         to bool.
9874         (regcache_xmalloc_1): Update parameter type and callers update.
9875
9876 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9877
9878         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9879         set_gdbarch_wchar_bit.
9880         * arm-tdep.c (arm_gdbarch_init): Likewise.
9881
9882 2017-04-25  Pedro Alves  <palves@redhat.com>
9883
9884         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9885         (BothAreRelocatable, memcopy, memmove): Don't define.
9886         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9887         macros.
9888
9889 2017-04-25  Pedro Alves  <palves@redhat.com>
9890
9891         * common/common-defs.h: Include "common/poison.h".
9892         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9893         and adjust.
9894         * common/poison.h: New file.
9895         * common/traits.h: Include <type_traits>.
9896         (Not, Or, Requires): New, moved from common/function-view.h.
9897
9898 2017-04-25  Pedro Alves  <palves@redhat.com>
9899
9900         * breakpoint.h (struct breakpoint): In-class initialize all
9901         fields.  Make boolean fields "bool".
9902         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9903         memset call and initializations no longer necessary.
9904
9905 2017-04-25  Pedro Alves  <palves@redhat.com>
9906
9907         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9908         reference.
9909         (pt_btrace_insn): New function.
9910         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9911
9912 2017-04-25  Pedro Alves  <palves@redhat.com>
9913
9914         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9915         "base" field and inherit from "bp_location" instead.  Add
9916         non-default ctor.
9917         (allocate_location_exception): Use new non-default ctor.
9918         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9919         (init_bp_location): Convert to ...
9920         (bp_location::bp_location): ... this new ctor, and remove memset
9921         call.
9922         (base_breakpoint_allocate_location): Use the new non-default ctor.
9923         * breakpoint.h (bp_location): Now a class.  Declare default and
9924         non-default ctors.  In-class initialize all members.
9925         (init_bp_location): Remove declaration.
9926
9927 2017-04-25  Pedro Alves  <palves@redhat.com>
9928
9929         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9930         assignment operator.
9931
9932 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9933
9934         * doublest.c (convert_doublest_to_floatformat): Call
9935         floatformat_totalsize_bytes.
9936
9937 2017-04-22  Tom Tromey  <tom@tromey.com>
9938
9939         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9940         ui_out_emit_list.
9941         * stack.c (print_frame): Use ui_out_emit_list.
9942         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9943         ui_out_emit_list.
9944         * mi/mi-main.c (print_one_inferior)
9945         (mi_cmd_data_list_register_names)
9946         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9947         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9948         ui_out_emit_list.
9949         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9950         (mi_output_solib_attribs): Use ui_out_emit_list,
9951         ui_out_emit_tuple.
9952         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9953         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9954         (mi_cmd_stack_list_args, list_args_or_locals): Use
9955         ui_out_emit_list.
9956         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9957         * breakpoint.c (print_solib_event, output_thread_groups): Use
9958         ui_out_emit_list.
9959
9960 2017-04-22  Tom Tromey  <tom@tromey.com>
9961
9962         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9963         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9964         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9965
9966 2017-04-22  Tom Tromey  <tom@tromey.com>
9967
9968         * tracepoint.c (tvariables_info_1)
9969         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9970
9971 2017-04-22  Tom Tromey  <tom@tromey.com>
9972
9973         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9974         annotate_arg_emitter.
9975         * breakpoint.c (print_mention_watchpoint)
9976         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9977         * annotate.h (struct annotate_arg_emitter): New.
9978
9979 2017-04-22  Tom Tromey  <tom@tromey.com>
9980
9981         * record-btrace.c (record_btrace_insn_history)
9982         (record_btrace_insn_history_range, record_btrace_call_history)
9983         (record_btrace_call_history_range): Use ui_out_emit_tuple.
9984         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9985         ui_out_emit_tuple.
9986         * stack.c (print_frame_info): Use ui_out_emit_tuple.
9987         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9988         * skip.c (skip_info): Use ui_out_emit_tuple.
9989         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9990         * progspace.c (print_program_space): Use ui_out_emit_tuple.
9991         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9992         * osdata.c (info_osdata): Use ui_out_emit_tuple.
9993         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9994         ui_out_emit_tuple.
9995         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9996         (output_register, mi_cmd_data_read_memory)
9997         (mi_cmd_data_read_memory_bytes, mi_load_progress)
9998         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9999         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10000         Use ui_out_emit_tuple.
10001         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10002         ui_out_emit_tuple.
10003         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10004         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10005         * linux-thread-db.c (info_auto_load_libthread_db): Use
10006         ui_out_emit_tuple.
10007         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10008         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10009         * disasm.c (do_mixed_source_and_assembly_deprecated)
10010         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10011         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10012         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10013         * breakpoint.c (print_one_breakpoint_location)
10014         (print_one_breakpoint): Use ui_out_emit_tuple.
10015         * auto-load.c (print_script, info_auto_load_cmd): Use
10016         ui_out_emit_tuple.
10017         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10018
10019 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10020
10021         * thread.c (print_thread_info_1): Remove dead code.
10022
10023 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10024
10025         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10026         GDB_SELF_TEST.
10027         * arm-tdep.c (selftests::arm_record_test): Likewise.
10028
10029 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10030
10031         * regcache.c (regcache_restore): Remove argument 2.  Replace
10032         argument 3 with regcache.  Get register status from
10033         src->register_status and get register contents from
10034         register_buffer (src, regnum).
10035         (regcache_cpy): Update.
10036
10037 2017-04-19  Pedro Alves  <palves@redhat.com>
10038
10039         * gdbthread.h (thread): Add missing closing parenthesis in
10040         comment.
10041
10042 2017-04-19  Pedro Alves  <palves@redhat.com>
10043
10044         * common/refcounted-object.h: New file.
10045         * gdbthread.h: Include "common/refcounted-object.h".
10046         (thread_info): Inherit from refcounted_object and add comments.
10047         (thread_info::incref, thread_info::decref)
10048         (thread_info::m_refcount): Delete.
10049         (thread_info::deletable): Use the refcounted_object::refcount()
10050         method.
10051         * inferior.c (current_inferior_): Add comment.
10052         (set_current_inferior): Increment/decrement refcounts.
10053         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10054         not-deletable instead of comparing with the current inferior.
10055         (initialize_inferiors): Increment the initial inferior's refcount.
10056         * inferior.h (struct inferior): Forward declare.
10057         Include "common/refcounted-object.h".
10058         (current_inferior, set_current_inferior): Move declaration to
10059         before struct inferior's definition, and fix comment.
10060         (inferior): Inherit from refcounted_object.  Add comments.
10061         * thread.c (switch_to_thread_no_regs): Reference the thread's
10062         inferior pointer directly instead of doing a ptid lookup.
10063         (switch_to_no_thread): New function.
10064         (switch_to_thread(thread_info *)): New function, factored out
10065         from ...
10066         (switch_to_thread(ptid_t)): ... this.
10067         (restore_current_thread): Delete.
10068         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10069         fields, and add 'inf' field.
10070         (do_restore_current_thread_cleanup): Check whether old->inf is
10071         alive instead of looking up an inferior by ptid.  Use
10072         switch_to_thread and switch_to_no_thread.
10073         (restore_current_thread_cleanup_dtor): Use old->inf directly
10074         instead of lookup up an inferior by id.  Decref the inferior.
10075         Don't restore 'removable'.
10076         (make_cleanup_restore_current_thread): Same the inferior pointer
10077         in old, instead of the inferior number.  Incref the inferior.
10078         Don't save/clear 'removable'.
10079
10080 2017-04-19  Pedro Alves  <palves@redhat.com>
10081
10082         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10083         unittests/scoped_restore-selftests.c.
10084         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10085         * common/scoped_restore.h (scoped_restore_base): Make "class".
10086         (scoped_restore_base::release): New public method.
10087         (scoped_restore_base::scoped_restore_base): New protected ctor.
10088         (scoped_restore_base::m_saved_var): New protected field.
10089         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10090         scoped_restore_base base class instead of m_saved_var directly.
10091         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10092         (scoped_restore_tmpl::scoped_restore_tmpl(const
10093         scoped_restore_tmpl<T>&)): Likewise.
10094         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10095         method.
10096         (scoped_restore_tmpl::saved_var): New method.
10097         (scoped_restore_tmpl::m_saved_var): Delete.
10098         * inferior.h (inferior::detaching): Now a bool.
10099         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10100         cleanup.
10101         * unittests/scoped_restore-selftests.c: New file.
10102
10103 2017-04-19  Pedro Alves  <palves@redhat.com>
10104
10105         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10106         Re-sort in alphabetic order.
10107
10108 2017-04-18  Pedro Alves  <palves@redhat.com>
10109
10110         * xml-support.c (obstack_xml_printf): Delete.
10111         * xml-support.h (obstack_xml_printf): Delete.
10112
10113 2017-04-18  Pedro Alves  <palves@redhat.com>
10114
10115         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10116         vdebug, verror, body_text, start_element, end_element, name,
10117         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10118         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10119         is_xinclude>: Make private and add m_ prefix.
10120         (gdb_xml_parser::body_text): New method, based on ...
10121         (gdb_xml_body_text): ... this.  Adjust.
10122         (gdb_xml_parser::vdebug): New method, based on ...
10123         (gdb_xml_debug): ... this.  Adjust.
10124         (gdb_xml_parser::verror): New method, based on ...
10125         (gdb_xml_error): ... this.  Adjust.
10126         (gdb_xml_parser::start_element): New method, based on ...
10127         (gdb_xml_start_element): ... this.  Adjust.
10128         (gdb_xml_start_element_wrapper): Defer to
10129         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10130         (gdb_xml_parser::end_element): New method, based on ...
10131         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10132         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10133         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10134         (gdb_xml_parser::use_dtd): New method, based on ...
10135         (gdb_xml_use_dtd): ... this.  Adjust.
10136         (gdb_xml_parser::parse): New method, based on ...
10137         (gdb_xml_parse): ... this.  Adjust.
10138         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10139         (xinclude_start_include): Adjust to call the parser's name method.
10140         (xml_xinclude_default, xml_xinclude_start_doctype)
10141         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10142         method.
10143         (xml_process_xincludes): Adjust to call parser methods.
10144         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10145         declarations.
10146
10147 2017-04-18  Pedro Alves  <palves@redhat.com>
10148
10149         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10150         gdb::optional<std::string>.
10151         * xml-support.c: Include <string>.
10152         (scope_level::scope_level(scope_level &&))
10153         (scope_level::~scope_level): Delete.
10154         (scope_level::body): Now a std::string.
10155         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10156         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10157         parameter.
10158         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10159         (xinclude_parsing_data::output): Now a std::string reference.
10160         (xinclude_start_include): Adjust.
10161         (xml_xinclude_default): Adjust.
10162         (xml_process_xincludes): Add 'output' parameter, and return bool.
10163         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10164         and return bool.
10165         * xml-tdesc.c: Include <unordered_map> and <string>.
10166         (tdesc_xml_cache): Delete.
10167         (tdesc_xml_cache_s): Delete.
10168         (xml_cache): Now an std::unordered_map.
10169         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10170         (target_fetch_description_xml): Change return type to
10171         gdb::optional<std::string>, and adjust.
10172         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10173         (target_fetch_description_xml): Change return type to
10174         gdb::optional<std::string>.
10175
10176 2017-04-18  Pedro Alves  <palves@redhat.com>
10177
10178         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10179         unittests/optional-selftests.c.
10180         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10181         * unittests/optional-selftests.c: New file.
10182         * unittests/optional/assignment/1.cc: New file.
10183         * unittests/optional/assignment/2.cc: New file.
10184         * unittests/optional/assignment/3.cc: New file.
10185         * unittests/optional/assignment/4.cc: New file.
10186         * unittests/optional/assignment/5.cc: New file.
10187         * unittests/optional/assignment/6.cc: New file.
10188         * unittests/optional/assignment/7.cc: New file.
10189         * unittests/optional/cons/copy.cc: New file.
10190         * unittests/optional/cons/default.cc: New file.
10191         * unittests/optional/cons/move.cc: New file.
10192         * unittests/optional/cons/value.cc: New file.
10193         * unittests/optional/in_place.cc: New file.
10194         * unittests/optional/observers/1.cc: New file.
10195         * unittests/optional/observers/2.cc: New file.
10196
10197 2017-04-18  Pedro Alves  <palves@redhat.com>
10198
10199         * common/gdb_optional.h: Include common/traits.h.
10200         (in_place_t): New type.
10201         (in_place): New constexpr variable.
10202         (optional::optional): Remove member initialization of
10203         m_instantiated.
10204         (optional::optional(in_place_t...)): New constructor.
10205         (optional::~optional): Use reset.
10206         (optional::optional(const optional&)): New.
10207         (optional::optional(const optional&&)): New.
10208         (optional::optional(T &)): New.
10209         (optional::optional(T &&)): New.
10210         (operator::operator=(const optional &)): New.
10211         (operator::operator=(optional &&)): New.
10212         (operator::operator= (const T &))
10213         (operator::operator= (T &&))
10214         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10215         (operator::reset): New.
10216         (operator::m_instantiated):: Add in-class initializer.
10217         * common/traits.h: Include <type_traits>.
10218         (struct And): New types.
10219
10220 2017-04-18  Pedro Alves  <palves@redhat.com>
10221
10222         * xml-support.c: Include <vector>.
10223         (scope_level::scope_level(const gdb_xml_element *))
10224         (scope_level::scope_level(scope_level&&)): New.
10225         (scope_level::~scope_level): New.
10226         (scope_level_s): Delete.
10227         (gdb_xml_parser::scopes): Now a std::vector.
10228         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10229         Use std::vector.
10230         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10231         scope cleanup code.
10232         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10233         of the scopes member.  Use std::vector::emplace_back.
10234
10235 2017-04-18  Pedro Alves  <palves@redhat.com>
10236
10237         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10238         a bool.
10239         (gdb_xml_end_element): Change type of first parameter.
10240         (gdb_xml_cleanup): Rename to ...
10241         (gdb_xml_parser::~gdb_xml_parser): ... this.
10242         (gdb_xml_create_parser_and_cleanup): Delete with ...
10243         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10244         to this new ctor.
10245         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10246         using gdb_xml_create_parser_and_cleanup.
10247         (xinclude_parsing_data): Add ctor/dtor.
10248         (xml_xinclude_cleanup): Delete.
10249         (xml_process_xincludes): Create a local xinclude_parsing_data
10250         instead of heap-allocating one.  Create a local gdb_xml_parser
10251         instead of heap-allocating one with
10252         gdb_xml_create_parser_and_cleanup.
10253
10254 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10255
10256         PR threads/20743
10257         * fbsd-nat.c (resume_one_thread_cb): Remove.
10258         (resume_all_threads_cb): Remove.
10259         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10260         iterate_over_threads.
10261
10262 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10263
10264         * NEWS: Create a new section for the next release branch.
10265         Rename the section of the current branch, now that it has
10266         been cut.
10267
10268 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10269
10270         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10271         * version.in: Bump version to 8.0.50.DATE-git.
10272
10273 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10274
10275         PR gdb/21385
10276         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10277         independently of the host, and fix build breakage on Cygwin.
10278
10279 2017-04-13  Pedro Alves  <palves@redhat.com>
10280
10281         * inferior.c (free_inferior): Convert to ...
10282         (inferior::~inferior): ... this dtor.
10283         (inferior::inferior): New ctor, factored out from ...
10284         (add_inferior_silent): ... here.  Allocate the inferior with a new
10285         expression.
10286         (delete_inferior): Call delete instead of free_inferior.
10287         * inferior.h (gdb_environ, continuation): Forward declare.
10288         (inferior): Now a class.  Add in-class initialization to all
10289         members.  Make boolean fields bool, except 'detaching'.
10290         (inferior::inferior): New explicit ctor.
10291         (inferior::~inferior): New.
10292
10293 2017-04-13  Pedro Alves  <palves@redhat.com>
10294
10295         * inferior.c (init_inferior_list): Delete.
10296         * inferior.h (init_inferior_list): Delete.
10297
10298 2017-04-13  Pedro Alves  <palves@redhat.com>
10299
10300         PR threads/13217
10301         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10302         (top level): Call it twice, with different thread sets.
10303
10304 2017-04-13  Pedro Alves  <palves@redhat.com>
10305
10306         * thread.c: Include <algorithm>.
10307         (thread_array_cleanup): Delete.
10308         (scoped_inc_dec_ref): New class.
10309         (live_threads_count): New function.
10310         (set_thread_refcount): Delete.
10311         (tp_array_compar_ascending): Now a bool.
10312         (tp_array_compar): Convert to a std::sort comparison function.
10313         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10314         and live_threads_count.
10315
10316 2017-04-13  Pedro Alves  <palves@redhat.com>
10317
10318         * infrun.c (follow_fork_inferior): Also switch the current
10319         inferior.
10320
10321 2017-04-13  Pedro Alves  <palves@redhat.com>
10322
10323         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10324         before calling create_internal_breakpoint.
10325
10326 2017-04-13  Pedro Alves  <palves@redhat.com>
10327
10328         * fork-child.c (execv_argv): New class.
10329         (breakup_args): Refactored as ...
10330         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10331         Copy arguments to storage and replace separators with NULL
10332         terminators in place.
10333         (escape_bang_in_quoted_argument): Adjust to return bool.
10334         (execv_argv::execv_argv): New ctor.
10335         (execv_argv::init_for_shell): New method, factored out from
10336         fork_inferior.  Don't strdup strings into the vector.
10337         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10338         Remove free_vector_argv call.
10339
10340 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10341
10342         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10343         tdep->rx_psw_type.
10344
10345 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10346
10347         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10348         * rx-tdep.c (rx_gdbarch_init): Likewise.
10349
10350 2017-04-13  Pedro Alves  <palves@redhat.com>
10351
10352         * breakpoint.h (struct breakpoint): Reindent.
10353
10354 2017-04-13  Pedro Alves  <palves@redhat.com>
10355
10356         * breakpoint.c (bp_location): Rename to ...
10357         (bp_locations): ... this.  All references updated.
10358         (bp_location_count): Rename to ...
10359         (bp_locations_count): ... this.  All references updated.
10360         (bp_location_placed_address_before_address_max): Rename to ...
10361         (bp_locations_placed_address_before_address_max): ... this.  All
10362         references updated.
10363         (bp_location_shadow_len_after_address_max): Rename to ...
10364         (bp_locations_shadow_len_after_address_max): ... this.  All
10365         references updated.
10366         (bp_location_compare_addrs): Rename to ...
10367         (bp_locations_compare_addrs): ... this.  All references updated.
10368         (bp_location_compare):Rename to ...
10369         (bp_locations_compare): ... this.  All references updated.
10370         (bp_location_target_extensions_update): Rename to ...
10371         (bp_locations_target_extensions_update): ... this.  All references
10372         updated.
10373
10374 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10375
10376         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10377         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10378         'sgtty.h'.
10379         * common/gdb_termios.h: New file, with parts of "terminal.h".
10380         * inflow.c: Include "gdb_termios.h".
10381         * ser-unix.c: Include "gdb_termios.h".
10382         * terminal.h: Move terminal-related defines to
10383         "common/gdb_termios.h".
10384
10385 2017-04-12  Tom Tromey  <tom@tromey.com>
10386
10387         * probe.c (parse_probes): Update.
10388         * location.h (delete_event_location): Don't declare.
10389         (event_location_deleter::operator()): Update.
10390         * location.c (event_location_deleter::operator()): Rename from
10391         delete_event_location.
10392         * linespec.h (linespec_result) <location>: Change type to
10393         event_location_up.
10394         * linespec.c (canonicalize_linespec, event_location_to_sals)
10395         (decode_objc): Update.
10396         (linespec_result): Don't call delete_event_location.
10397         * breakpoint.c (create_breakpoints_sal)
10398         (bkpt_probe_create_sals_from_location)
10399         (strace_marker_create_sals_from_location): Update.
10400
10401 2017-04-12  Tom Tromey  <tom@tromey.com>
10402
10403         * linespec.h (struct linespec_result): Add constructor and
10404         destructor.
10405         (init_linespec_result, destroy_linespec_result)
10406         (make_cleanup_destroy_linespec_result): Don't declare.
10407         * linespec.c (init_linespec_result): Remove.
10408         (linespec_result::~linespec_result): Rename from
10409         destroy_linespec_result.  Update.
10410         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10411         Remove.
10412         * breakpoint.c (create_breakpoint, break_range_command)
10413         (decode_location_default): Update.
10414         * ax-gdb.c (agent_command_1): Update.
10415
10416 2017-04-12  Tom Tromey  <tom@tromey.com>
10417
10418         * remote.c (remote_download_tracepoint): Update.
10419         * python/py-breakpoint.c (bppy_get_location): Update.
10420         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10421         (gdbscm_breakpoint_location): Update.
10422         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10423         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10424         Change type to event_location_up.
10425         * breakpoint.c (create_overlay_event_breakpoint)
10426         (create_longjmp_master_breakpoint)
10427         (create_std_terminate_master_breakpoint)
10428         (create_exception_master_breakpoint)
10429         (breakpoint_event_location_empty_p, print_breakpoint_location)
10430         (print_one_breakpoint_location, create_thread_event_breakpoint)
10431         (init_breakpoint_sal, create_breakpoint)
10432         (print_recreate_ranged_breakpoint, break_range_command)
10433         (init_ada_exception_breakpoint, say_where): Update.
10434         (base_breakpoint_dtor): Don't call delete_event_location.
10435         (bkpt_print_recreate, tracepoint_print_recreate)
10436         (dprintf_print_recreate, update_static_tracepoint)
10437         (breakpoint_re_set_default): Update.
10438
10439 2017-04-12  Tom Tromey  <tom@tromey.com>
10440
10441         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10442         type of "to_do".  Update.
10443         (compute_stack_depth): Use std::vector.
10444
10445 2017-04-12  Tom Tromey  <tom@tromey.com>
10446
10447         * printcmd.c (find_instruction_backward): Use std::vector.
10448
10449 2017-04-12  Tom Tromey  <tom@tromey.com>
10450
10451         * symfile.c (objfilep): Remove typedef.
10452         (reread_symbols): Use a std::vector.
10453
10454 2017-04-12  Tom Tromey  <tom@tromey.com>
10455
10456         * mi/mi-main.c (exec_direction_forward): Remove.
10457         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10458         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10459         scoped_restore.
10460         * guile/guile.c (guile_repl_command, guile_command)
10461         (gdbscm_execute_gdb_command): Use scoped_restore.
10462         * go-exp.y (go_parse): Use scoped_restore.
10463         * d-exp.y (d_parse): Use scoped_restore.
10464         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10465         * c-exp.y (c_parse): Use scoped_restore.
10466
10467 2017-04-12  Tom Tromey  <tom@tromey.com>
10468
10469         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10470         (mi_parse): Update return type.
10471         (mi_parse_free): Remove.
10472         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10473         (mi_parse::~mi_parse): Rename from mi_parse_free.
10474         (mi_parse_cleanup): Remove.
10475         (mi_parse): Return a unique_ptr.  Use new.
10476         * mi/mi-main.c (mi_execute_command): Update.
10477
10478 2017-04-12  Tom Tromey  <tom@tromey.com>
10479
10480         * location.c (explicit_location_lex_one): Return a
10481         unique_xmalloc_ptr.
10482         (string_to_explicit_location): Update.  Remove cleanups.
10483
10484 2017-04-12  Tom Tromey  <tom@tromey.com>
10485
10486         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10487         (compare_value_and_voffset): Change type.  Update.
10488         (compute_vtable_size): Change type of "offset_vec".
10489         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10490         (gnuv3_get_typeid): Remove extraneous declaration.
10491
10492 2017-04-12  Tom Tromey  <tom@tromey.com>
10493
10494         * charset.h (wchar_iterator): Fix comment.
10495
10496 2017-04-12  Tom Tromey  <tom@tromey.com>
10497
10498         * charset.c (iconv_wrapper): New class.
10499         (cleanup_iconv): Remove.
10500         (convert_between_encodings): Use it.
10501
10502 2017-04-12  Tom Tromey  <tom@tromey.com>
10503
10504         * symfile.h (increment_reading_symtab): Update type.
10505         * symfile.c (decrement_reading_symtab): Remove.
10506         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10507         * psymtab.c (psymtab_to_symtab): Update.
10508         * dwarf2read.c (dw2_instantiate_symtab): Update.
10509
10510 2017-04-12  Tom Tromey  <tom@tromey.com>
10511
10512         * jit.c (struct jit_reader): Declare separately.  Add constructor
10513         and destructor.  Change type of "handle".
10514         (loaded_jit_reader): Define separately.
10515         (jit_reader_load): Update.  New "new".
10516         (jit_reader_unload_command): Use "delete".
10517         * gdb-dlfcn.h (struct dlclose_deleter): New.
10518         (gdb_dlhandle_up): New typedef.
10519         (gdb_dlopen, gdb_dlsym): Update types.
10520         (gdb_dlclose): Remove.
10521         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10522         (gdb_dlsym): Change type of "handle".
10523         (make_cleanup_dlclose): Remove.
10524         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10525         * compile/compile-c-support.c (load_libcc): Update.
10526
10527 2017-04-12  Tom Tromey  <tom@tromey.com>
10528
10529         * symtab.h (find_pcs_for_symtab_line): Change return type.
10530         * symtab.c (find_pcs_for_symtab_line): Change return type.
10531         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10532         type of "vec".  Update.
10533         (ltpy_get_pcs_for_line): Update.
10534         * linespec.c (decode_digits_ordinary): Update.
10535
10536 2017-04-12  Tom Tromey  <tom@tromey.com>
10537
10538         * tracepoint.c (actions_command): Update.
10539         * python/python.c (python_command, python_interactive_command):
10540         Update.
10541         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10542         * guile/guile.c (guile_command): Update.
10543         * defs.h (read_command_lines, read_command_lines_1): Return
10544         command_line_up.
10545         (command_lines_deleter): New struct.
10546         (command_line_up): New typedef.
10547         * compile/compile.c (compile_code_command)
10548         (compile_print_command): Update.
10549         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10550         command_line_up.
10551         (make_cleanup_free_command_lines): Remove.
10552         * cli/cli-script.c (get_command_line, read_command_lines_1)
10553         (copy_command_lines): Return command_line_up.
10554         (while_command, if_command, read_command_lines, define_command)
10555         (document_command): Update.
10556         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10557         Remove.
10558         * breakpoint.h (breakpoint_set_commands): Change type of
10559         "commands".
10560         * breakpoint.c (breakpoint_set_commands): Change type of
10561         "commands".  Update.
10562         (do_map_commands_command, update_dprintf_command_list)
10563         (create_tracepoint_from_upload): Update.
10564
10565 2017-04-12  Tom Tromey  <tom@tromey.com>
10566
10567         * tracepoint.c (scope_info): Update.
10568         * spu-tdep.c (spu_catch_start): Update.
10569         * python/python.c (gdbpy_decode_line): Update.
10570         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10571         * python/py-breakpoint.c (bppy_init): Update.
10572         * probe.c (parse_probes): Update.
10573         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10574         * location.h (event_location_deleter): New struct.
10575         (event_location_up): New typedef.
10576         (new_linespec_location, new_address_location, new_probe_location)
10577         (new_explicit_location, copy_event_location)
10578         (string_to_event_location, string_to_event_location_basic)
10579         (string_to_explicit_location): Update return type.
10580         (make_cleanup_delete_event_location): Remove.
10581         * location.c (new_linespec_location, new_address_location)
10582         (new_probe_location, new_explicit_location, copy_event_location):
10583         Return event_location_up.
10584         (delete_event_location_cleanup)
10585         (make_cleanup_delete_event_location): Remove.
10586         (string_to_explicit_location, string_to_event_location_basic)
10587         (string_to_event_location): Return event_location_up.
10588         * linespec.c (canonicalize_linespec, event_location_to_sals)
10589         (decode_line_with_current_source)
10590         (decode_line_with_last_displayed, decode_objc): Update.
10591         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10592         * completer.c (location_completer): Update.
10593         * cli/cli-cmds.c (edit_command, list_command): Update.
10594         * breakpoint.c (create_overlay_event_breakpoint)
10595         (create_longjmp_master_breakpoint)
10596         (create_std_terminate_master_breakpoint)
10597         (create_exception_master_breakpoint)
10598         (create_thread_event_breakpoint): Update.
10599         (init_breakpoint_sal): Update.  Remove some dead code.
10600         (create_breakpoint_sal): Change type of "location".  Update.
10601         (create_breakpoints_sal, create_breakpoint, break_command_1)
10602         (dprintf_command, break_range_command, until_break_command)
10603         (init_ada_exception_breakpoint)
10604         (strace_marker_create_sals_from_location)
10605         (update_static_tracepoint, trace_command, ftrace_command)
10606         (strace_command, create_tracepoint_from_upload): Update.
10607         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10608         * ax-gdb.c (agent_command_1): Update.
10609
10610 2017-04-12  Pedro Alves  <palves@redhat.com>
10611
10612         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10613         * configure.tgt: Handle i[34567]86-*-go32* and
10614         i[34567]86-*-msdosdjgpp*.
10615         * i386-tdep.c (i386_svr4_reg_to_regnum):
10616         Make extern.
10617         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10618         i386-go32-tdep.c.
10619         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10620         * i386-go32-tdep.c: New file.
10621         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10622         declarations.
10623
10624 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10625
10626         * aix-thread.c (pd_status2str): Change return type to const char *.
10627
10628 2017-04-12  Pedro Alves  <palves@redhat.com>
10629
10630         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10631         calls to set_gdbarch_gnu_triplet_regexp.
10632
10633 2017-04-12  Pedro Alves  <palves@redhat.com>
10634
10635         PR gdb/21323
10636         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10637         New enum value.
10638         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10639         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10640         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10641         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10642         * gdbarch.h, gdbarch.c: Regenerate.
10643         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10644         gdbarch_wchar_bit and gdbarch_wchar_signed.
10645         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10646         * arm-tdep.c (arm_gdbarch_init): Likewise.
10647         * avr-tdep.c (avr_gdbarch_init): Likewise.
10648         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10649         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10650         * i386-tdep.c (i386_go32_init_abi): Likewise.
10651         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10652         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10653         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10654         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10655         * sh-tdep.c (sh_gdbarch_init): Likewise.
10656         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10657         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10658         * windows-tdep.c (windows_init_abi): Likewise.
10659         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10660
10661 2017-04-12  Pedro Alves  <palves@redhat.com>
10662
10663         PR c++/21323
10664         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10665         cplus_primitive_type_char32_t>: New enum values.
10666         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10667         and cplus_primitive_type_char32_t.
10668         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10669         32, use the archtecture's built-in type for char16_t and char32_t,
10670         respectively.  Otherwise, fallback to init_integer_type as before,
10671         but make the type unsigned, and issue a complaint.
10672         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10673
10674 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10675
10676         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10677         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10678
10679 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10680
10681         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10682         'const char *'.
10683
10684 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10685
10686         * common/common-utils.c (free_vector_argv): New function.
10687         * common/common-utils.h: Include <vector>.
10688         (free_vector_argv): New prototype.
10689         * darwin-nat.c (darwin_create_inferior): Rewrite function
10690         prototype in order to constify "exec_file" and accept a
10691         "std::string" for "allargs".
10692         * fork-child.c: Include <vector>.
10693         (breakup_args): Rewrite function, using C++.
10694         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10695         and accept "std::string" for "allargs".  Update the code to
10696         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10697         and "execvp".
10698         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10699         order to constify "exec_file" and accept a "std::string" for
10700         "allargs".
10701         * go32-nat.c (go32_create_inferior): Likewise.
10702         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10703         * infcmd.c (run_command_1): Constify "exec_file".  Use
10704         "std::string" for inferior arguments.
10705         * inferior.h (fork_inferior): Update prototype.
10706         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10707         prototype in order to constify "exec_file" and accept a
10708         "std::string" for "allargs".
10709         * nto-procfs.c (procfs_create_inferior): Likewise.
10710         * procfs.c (procfs_create_inferior): Likewise.
10711         * remote-sim.c (gdbsim_create_inferior): Likewise.
10712         * remote.c (extended_remote_run): Update code to accept
10713         "std::string" as argument.
10714         (extended_remote_create_inferior): Rewrite function prototype in
10715         order to constify "exec_file" and accept a "std::string" for
10716         "allargs".
10717         * rs6000-nat.c (super_create_inferior): Likewise.
10718         (rs6000_create_inferior): Likewise.
10719         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10720         * windows-nat.c (windows_create_inferior): Likewise.
10721
10722 2017-04-11  Pedro Alves  <palves@redhat.com>
10723
10724         * thread.c: Fix whitespace throughout.
10725
10726 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10727
10728         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10729
10730 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10731
10732         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10733
10734 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10735
10736         PR gdb/21364
10737         * osdata.c (info_osdata): Check if 'type' is an empty string
10738         instead of NULL.
10739
10740 2017-04-10  Pedro Alves  <palves@redhat.com>
10741
10742         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10743         (ptid_to_global_thread_id, in_thread_list)
10744         (do_captured_list_thread_ids, set_resumed, set_running)
10745         (set_executing, set_stop_requested, finish_thread_state)
10746         (validate_registers_access, can_access_registers_ptid)
10747         (print_thread_info_1, switch_to_thread)
10748         (do_restore_current_thread_cleanup)
10749         (make_cleanup_restore_current_thread, thread_command)
10750         (thread_name_command): Use operator== instead of ptid_equal.
10751
10752 2017-04-10  Pedro Alves  <palves@redhat.com>
10753
10754         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10755         (current_thread_cleanup_chain): Delete.
10756         (restore_current_thread_cleanup_dtor)
10757         (make_cleanup_restore_current_thread): Remove references to
10758         current_thread_cleanup_chain.
10759
10760 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10761
10762         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10763         REG_UNKNOWN.
10764
10765 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10766
10767         PR gdb/19942
10768         * gdbthread.h (thread_info::deletable): New method.
10769         (thread_info::incref): New method.
10770         (thread_info::decref): New method.
10771         (thread_info::refcount): Move it to private.
10772         * infrun.c (save_stop_context): Call inc_refcount.
10773         (release_stop_context_cleanup): Likewise.
10774         * thread.c (set_thread_exited): New function.
10775         (init_thread_list): Delete "tp" only it is deletable, otherwise
10776         call set_thread_exited.
10777         (delete_thread_1): Call set_thread_exited.
10778         (current_thread_cleanup) <inferior_pid>: Remove.
10779         <thread>: New field.
10780         (restore_current_thread_ptid_changed): Removed.
10781         (do_restore_current_thread_cleanup): Adjust.
10782         (restore_current_thread_cleanup_dtor): Don't call
10783         find_thread_ptid.
10784         (set_thread_refcount): Use dec_refcount.
10785         (make_cleanup_restore_current_thread): Adjust.
10786         (thread_apply_all_command): Call inc_refcount.
10787         (_initialize_thread): Don't call
10788         observer_attach_thread_ptid_changed.
10789
10790 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10791
10792         * thread.c (delete_thread_1): Hoist code on marking thread as
10793         exited.
10794
10795 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10796
10797         * windows-nat.c (windows_detach): Initialize ptid with
10798         minus_one_ptid.
10799
10800 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10801
10802         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10803
10804 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10805
10806         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10807         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10808         (bfin_pseudo_register_write): Likewise
10809
10810 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10811
10812         * common/ptid.h (struct ptid): Change to...
10813         (class ptid_t): ... this.
10814         <ptid_t>: New constructors.
10815         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10816         matches>: New methods.
10817         <make_null, make_minus_one>: New static methods.
10818         <pid>: Rename to...
10819         <m_pid>: ...this.
10820         <lwp>: Rename to...
10821         <m_lwp>: ...this.
10822         <tid>: Rename to...
10823         <m_tid>: ...this.
10824         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10825         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10826         as references, move comment to class ptid_t.
10827         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10828         ptid_t static methods.
10829         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10830         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10831         Take ptid arguments as references, implement using ptid_t methods.
10832         * unittests/ptid-selftests.c: New file.
10833         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10834         unittests/ptid-selftests.c.
10835         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10836
10837 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10838
10839         * python/python.c (python_run_simple_file): Cast mode literal to
10840         non-const char pointer as expected by PyFile_FromString.
10841
10842 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10843
10844         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10845         minus_one_ptid and null_ptid.
10846
10847 2017-04-05  Pedro Alves  <palves@redhat.com>
10848
10849         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10850         * configure: Regenerate.
10851
10852 2017-04-05  Pedro Alves  <palves@redhat.com>
10853
10854         * ada-exp.y (yyerror): Constify.
10855         * ada-lang.c (bound_name, get_selections)
10856         (ada_variant_discrim_type)
10857         (ada_variant_discrim_name, ada_value_struct_elt)
10858         (ada_lookup_struct_elt_type, is_unchecked_variant)
10859         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10860         (catch_ada_exception_command_split)
10861         (catch_ada_assert_command_split, catch_assert_command)
10862         (ada_op_name): Constify.
10863         * ada-lang.h (ada_yyerror, get_selections)
10864         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10865         * arc-tdep.c (arc_print_frame_cache): Constify.
10866         * arm-tdep.c (arm_skip_stub): Constify.
10867         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10868         (gen_aggregate_elt_ref): Constify.
10869         * bcache.c (print_bcache_statistics): Constify.
10870         * bcache.h (print_bcache_statistics): Constify.
10871         * break-catch-throw.c (catch_exception_command_1):
10872         * breakpoint.c (struct ep_type_description::description):
10873         Constify.
10874         (add_solib_catchpoint): Constify.
10875         (catch_fork_command_1): Add cast.
10876         (add_catch_command): Constify.
10877         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10878         Constify.
10879         * bsd-uthread.c (bsd_uthread_state): Constify.
10880         * buildsym.c (patch_subfile_names): Constify.
10881         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10882         Constify.
10883         * c-exp.y (yyerror): Constify.
10884         (token::oper): Constify.
10885         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10886         * c-varobj.c (cplus_describe_child): Constify.
10887         * charset.c (find_charset_names): Add cast.
10888         (find_charset_names): Constify array and add const_cast.
10889         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10890         (edit_command): Constify.
10891         * cli/cli-decode.c (lookup_cmd): Constify.
10892         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10893         Constify.
10894         (struct dump_context): Constify.
10895         (add_dump_command, restore_command): Constify.
10896         * cli/cli-script.c (get_command_line): Constify.
10897         * cli/cli-script.h (get_command_line): Constify.
10898         * cli/cli-utils.c (check_for_argument): Constify.
10899         * cli/cli-utils.h (check_for_argument): Constify.
10900         * coff-pe-read.c (struct read_pe_section_data): Constify.
10901         * command.h (lookup_cmd): Constify.
10902         * common/print-utils.c (decimal2str): Constify.
10903         * completer.c (gdb_print_filename): Constify.
10904         * corefile.c (set_gnutarget): Constify.
10905         * cp-name-parser.y (yyerror): Constify.
10906         * cp-valprint.c (cp_print_class_member): Constify.
10907         * cris-tdep.c (cris_register_name, crisv32_register_name):
10908         Constify.
10909         * d-exp.y (yyerror): Constify.
10910         (struct token::oper): Constify.
10911         * d-lang.h (d_yyerror): Constify.
10912         * dbxread.c (struct header_file_location::name): Constify.
10913         (add_old_header_file, add_new_header_file, last_function_name)
10914         (dbx_next_symbol_text, add_bincl_to_list)
10915         (find_corresponding_bincl_psymtab, set_namestring)
10916         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10917         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10918         * defs.h (command_line_input, print_address_symbolic)
10919         (deprecated_readline_begin_hook): Constify.
10920         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10921         Constify.
10922         * event-top.c (handle_line_of_input): Constify and add cast.
10923         * exceptions.c (catch_errors): Constify.
10924         * exceptions.h (catch_errors): Constify.
10925         * expprint.c (print_subexp_standard, op_string, op_name)
10926         (op_name_standard, dump_raw_expression, dump_raw_expression):
10927         * expression.h (op_name, op_string, dump_raw_expression):
10928         Constify.
10929         * f-exp.y (yyerror): Constify.
10930         (struct token::oper): Constify.
10931         (struct f77_boolean_val::name): Constify.
10932         * f-lang.c (f_word_break_characters): Constify.
10933         * f-lang.h (f_yyerror): Constify.
10934         * fork-child.c (fork_inferior): Add cast.
10935         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10936         (new_variant): Constify.
10937         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10938         * gdbarch.c: Regenerate.
10939         * gdbcore.h (set_gnutarget): Constify.
10940         * go-exp.y (yyerror): Constify.
10941         (token::oper): Constify.
10942         * go-lang.h (go_yyerror): Constify.
10943         * go32-nat.c (go32_sysinfo): Constify.
10944         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10945         * guile/scm-cmd.c (cmdscm_function): Constify.
10946         * guile/scm-param.c (pascm_param_value): Constify.
10947         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10948         (h8300sx_register_name): Constify.
10949         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10950         Constify.
10951         * ia64-tdep.c (ia64_register_names): Constify.
10952         * infcmd.c (construct_inferior_arguments): Constify.
10953         (path_command, attach_post_wait): Constify.
10954         * language.c (show_range_command, show_case_command)
10955         (unk_lang_error): Constify.
10956         * language.h (language_defn::la_error)
10957         (language_defn::la_name_of_this): Constify.
10958         * linespec.c (decode_line_2): Constify.
10959         * linux-thread-db.c (thread_db_err_str): Constify.
10960         * lm32-tdep.c (lm32_register_name): Constify.
10961         * m2-exp.y (yyerror): Constify.
10962         * m2-lang.h (m2_yyerror): Constify.
10963         * m32r-tdep.c (m32r_register_names): Constify and make static.
10964         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10965         * m88k-tdep.c (m88k_register_name): Constify.
10966         * macroexp.c (appendmem): Constify.
10967         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10968         (upgrade_type, parse_external, parse_partial_symbols)
10969         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10970         (new_symbol): Constify.
10971         * memattr.c (mem_info_command): Constify.
10972         * mep-tdep.c (register_name_from_keyword): Constify.
10973         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10974         Constify.
10975         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10976         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10977         * mi/mi-main.c (captured_mi_execute_command): Constify and add
10978         cast.
10979         (mi_execute_async_cli_command): Constify.
10980         * mips-tdep.c (mips_register_name): Constify.
10981         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10982         (am33_register_name, am33_2_register_name)
10983         * moxie-tdep.c (moxie_register_names): Constify.
10984         * nat/linux-osdata.c (osdata_type): Constify fields.
10985         * nto-tdep.c (nto_parse_redirection): Constify.
10986         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10987         (lookup_child_selector): Constify.
10988         (objc_methcall::name): Constify.
10989         * objc-lang.h (lookup_objc_class, lookup_child_selector)
10990         (lookup_struct_typedef): Constify.
10991         * objfiles.c (pc_in_section): Constify.
10992         * objfiles.h (pc_in_section): Constify.
10993         * p-exp.y (struct token::oper): Constify.
10994         (yyerror): Constify.
10995         * p-lang.h (pascal_yyerror): Constify.
10996         * parser-defs.h (op_name_standard): Constify.
10997         (op_print::string): Constify.
10998         (exp_descriptor::op_name): Constify.
10999         * printcmd.c (print_address_symbolic): Constify.
11000         * psymtab.c (print_partial_symbols): Constify.
11001         * python/py-breakpoint.c (stop_func): Constify.
11002         (bppy_get_expression): Constify.
11003         * python/py-cmd.c (cmdpy_completer::name): Constify.
11004         (cmdpy_function): Constify.
11005         * python/py-event.c (evpy_add_attribute)
11006         (gdbpy_initialize_event_generic): Constify.
11007         * python/py-event.h (evpy_add_attribute)
11008         (gdbpy_initialize_event_generic): Constify.
11009         * python/py-evts.c (add_new_registry): Constify.
11010         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11011         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11012         * python/py-inferior.c (get_buffer): Add cast.
11013         * python/py-param.c (parm_constant::name): Constify.
11014         * python/py-unwind.c (fprint_frame_id): Constify.
11015         * python/python.c (gdbpy_parameter_value): Constify.
11016         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11017         * remote.c (memory_packet_config::name): Constify.
11018         (show_packet_config_cmd, remote_write_bytes)
11019         (remote_buffer_add_string):
11020         * reverse.c (exec_reverse_once): Constify.
11021         * rs6000-tdep.c (variant::name, variant::description): Constify.
11022         * rust-exp.y (rustyyerror): Constify.
11023         * rust-lang.c (rust_op_name): Constify.
11024         * rust-lang.h (rustyyerror): Constify.
11025         * serial.h (serial_ops::name): Constify.
11026         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11027         (sh_sh3e_register_name, sh_sh2e_register_name)
11028         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11029         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11030         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11031         (sh_sh4al_dsp_register_name): Constify.
11032         * sh64-tdep.c (sh64_register_name): Constify.
11033         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11034         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11035         * stabsread.c (patch_block_stabs, read_type_number)
11036         (ref_map::stabs, ref_add, process_reference)
11037         (symbol_reference_defined, define_symbol, define_symbol)
11038         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11039         (read_one_struct_field, read_struct_fields, read_baseclasses)
11040         (read_tilde_fields, read_struct_type, read_array_type)
11041         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11042         (read_huge_number, read_range_type, read_args, common_block_start)
11043         (find_name_end): Constify.
11044         * stabsread.h (common_block_start, define_symbol)
11045         (process_one_symbol, symbol_reference_defined, ref_add):
11046         * symfile.c (get_section_index, add_symbol_file_command):
11047         * symfile.h (get_section_index): Constify.
11048         * target-descriptions.c (tdesc_type::name): Constify.
11049         (tdesc_free_type): Add cast.
11050         * target.c (find_default_run_target):
11051         (add_deprecated_target_alias, find_default_run_target)
11052         (target_announce_detach): Constify.
11053         (do_option): Constify.
11054         * target.h (add_deprecated_target_alias): Constify.
11055         * thread.c (print_thread_info_1): Constify.
11056         * top.c (deprecated_readline_begin_hook, command_line_input):
11057         Constify.
11058         (init_main): Add casts.
11059         * top.h (handle_line_of_input): Constify.
11060         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11061         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11062         (tfind_command): Rename to ...
11063         (tfind_command_1): ... this and constify.
11064         (tfind_command): New function.
11065         (tfind_end_command, tfind_start_command): Adjust.
11066         (encode_source_string): Constify.
11067         * tracepoint.h (encode_source_string): Constify.
11068         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11069         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11070         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11071         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11072         * tui/tui-win.c (parse_scrolling_args): Constify.
11073         * tui/tui-windata.c (tui_erase_data_content): Constify.
11074         * tui/tui-windata.h (tui_erase_data_content): Constify.
11075         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11076         * tui/tui.c (tui_enable): Add cast.
11077         * utils.c (defaulted_query): Constify.
11078         (init_page_info): Add cast.
11079         (puts_debug, subset_compare): Constify.
11080         * utils.h (subset_compare): Constify.
11081         * varobj.c (varobj_format_string): Constify.
11082         * varobj.h (varobj_format_string): Constify.
11083         * vax-tdep.c (vax_register_name): Constify.
11084         * windows-nat.c (windows_detach): Constify.
11085         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11086         * xml-support.c (gdb_xml_end_element): Constify.
11087         * xml-tdesc.c (tdesc_start_reg): Constify.
11088         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11089         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11090         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11091
11092 2017-04-05  Pedro Alves  <palves@redhat.com>
11093
11094         * proc-api.c (struct trans): Constify.
11095         (procfs_note): Constify.
11096         * proc-events.c (struct trans, syscall_table):
11097         * proc-flags.c (struct trans): Constify.
11098         * proc-utils.h (procfs_note): Constify.
11099         * proc-why.c (struct trans): Constify.
11100         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11101         (procfs_detach): Constify.
11102         * sol-thread.c (struct string_map): Constify.
11103         (td_err_string, td_state_string): Constify.
11104
11105 2017-04-05  Pedro Alves  <palves@redhat.com>
11106
11107         * proc-api.c (procfs_filename): Don't initialize
11108         procfs_filename.
11109         (prepare_to_trace): Assume procfs_filename is non-NULL.
11110         (_initialize_proc_api): Give procfs_filename a default value here.
11111
11112 2017-04-05  Pedro Alves  <palves@redhat.com>
11113
11114         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11115         'cond_string' parameter.
11116         (extract_exception_regexp): Constify 'string' parameter.
11117         (catch_exception_command_1): Constify.
11118         * breakpoint.c (init_catchpoint)
11119         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11120         parameter.
11121         (ep_parse_optional_if_clause, catch_fork_command_1)
11122         (catch_exec_command_1): Constify.
11123         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11124         parameter.
11125         (ep_parse_optional_if_clause): Constify.
11126         * cli/cli-utils.c (remove_trailing_whitespace)
11127         (check_for_argument): Constify.
11128         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11129         non-const overload.
11130         (check_for_argument): Likewise.
11131
11132 2017-04-05  Pedro Alves  <palves@redhat.com>
11133
11134         * event-top.c (command_line_handler): Add cast to execute_command
11135         call.
11136         * record-btrace.c (cmd_record_btrace_bts_start)
11137         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11138         (cmd_record_btrace_start): Add cast to execute_command call.
11139         * record-full.c (record_full_goto_insn):
11140         * record.c (record_start, record_stop): Add cast to
11141         execute_command_to_string calls.
11142         (cmd_record_start): Add cast to execute_command calls.
11143
11144 2017-04-05  Pedro Alves  <palves@redhat.com>
11145
11146         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11147         static inline function.
11148         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11149         array and use gdb_PyArg_ParseTupleAndKeywords.
11150         * python/py-cmd.c (cmdpy_init): Likewise.
11151         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11152         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11153         (infpy_search_memory): Likewise.
11154         * python/py-objfile.c (objfpy_add_separate_debug_file)
11155         (gdbpy_lookup_objfile): Likewise.
11156         * python/py-symbol.c (gdbpy_lookup_symbol)
11157         (gdbpy_lookup_global_symbol): Likewise.
11158         * python/py-type.c (gdbpy_lookup_type): Likewise.
11159         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11160         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11161         Likewise.
11162
11163 2017-04-05  Pedro Alves  <palves@redhat.com>
11164
11165         * python/python-internal.h (gdb_PyGetSetDef): New type.
11166         * python/py-block.c (block_object_getset)
11167         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11168         * python/py-event.c (event_object_getset)
11169         (finish_breakpoint_object_getset): Likewise.
11170         * python/py-inferior.c (inferior_object_getset): Likewise.
11171         * python/py-infthread.c (thread_object_getset): Likewise.
11172         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11173         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11174         * python/py-objfile.c (objfile_getset): Likewise.
11175         * python/py-progspace.c (pspace_getset): Likewise.
11176         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11177         Likewise.
11178         * python/py-record.c (recpy_record_getset): Likewise.
11179         * python/py-symbol.c (symbol_object_getset): Likewise.
11180         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11181         Likewise.
11182         * python/py-type.c (type_object_getset, field_object_getset):
11183         Likewise.
11184         * python/py-value.c (value_object_getset): Likewise.
11185
11186 2017-04-05  Pedro Alves  <palves@redhat.com>
11187
11188         * python/python-internal.h (gdb_PyObject_CallMethod)
11189         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11190         New functions.
11191         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11192         (PySys_GetObject, PySys_SetPath): New macros.
11193
11194 2017-04-05  Pedro Alves  <palves@redhat.com>
11195
11196         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11197         info_osdata_command.
11198         * osdata.c (info_osdata_command): Rename to ...
11199         (info_osdata): ... this.  Constify 'type' parameter, and remove
11200         the 'from_tty' parameter.  Accept NULL TYPE.
11201         (info_osdata_command): New function.
11202         * osdata.h (info_osdata_command): Remove declaration.
11203         (info_osdata): New declaration.
11204
11205 2017-04-05  Pedro Alves  <palves@redhat.com>
11206
11207         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11208         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11209         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11210         parameter.
11211         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11212         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11213         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11214         parameter.
11215         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11216         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11217         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11218         (mi_cmd_file_list_exec_source_files)
11219         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11220         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11221         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11222         parameter.
11223         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11224         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11225         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11226         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11227         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11228         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11229         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11230         'command' parameter.
11231         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11232         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11233         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11234         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11235         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11236         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11237         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11238         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11239         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11240         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11241         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11242         parameter.
11243         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11244         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11245         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11246         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11247         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11248         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11249         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11250         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11251         (mi_cmd_data_list_changed_registers)
11252         (mi_cmd_data_write_register_values)
11253         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11254         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11255         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11256         (mi_cmd_list_features, mi_cmd_list_target_features)
11257         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11258         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11259         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11260         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11261         (mi_cmd_trace_frame_collected): Constify 'command'
11262         parameter.
11263         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11264         'command' parameter.
11265
11266 2017-04-05  Pedro Alves  <palves@redhat.com>
11267
11268         * ada-lang.c (ada_completer_word_break_characters): Now a const
11269         array.
11270         (ada_get_gdb_completer_word_break_characters): Constify.
11271         * completer.c (gdb_completer_command_word_break_characters)
11272         (gdb_completer_file_name_break_characters)
11273         (gdb_completer_quote_characters): Now const arrays.
11274         (get_gdb_completer_quote_characters): Constify.
11275         (set_rl_completer_word_break_characters): New function.
11276         (set_gdb_completion_word_break_characters)
11277         (complete_line_internal): Use it.
11278         * completer.h (get_gdb_completer_quote_characters): Constify.
11279         (set_rl_completer_word_break_characters): Declare.
11280         * f-lang.c (f_word_break_characters): Constify.
11281         * language.c (default_word_break_characters): Constify.
11282         * language.h (language_defn::la_word_break_characters): Constify.
11283         (default_word_break_characters): Constify.
11284         * top.c (init_main): Use set_rl_completer_word_break_characters.
11285
11286 2017-04-05  Pedro Alves  <palves@redhat.com>
11287
11288         * aix-thread.c (aix_thread_pid_to_str)
11289         (aix_thread_extra_thread_info): Constify.
11290         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11291         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11292         (bsd_uthread_pid_to_str): Constify.
11293         * corelow.c (core_pid_to_str): Constify.
11294         * darwin-nat.c (darwin_pid_to_str): Constify.
11295         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11296         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11297         Constify.
11298         * gnu-nat.c (gnu_pid_to_str): Constify.
11299         * go32-nat.c (go32_pid_to_str): Constify.
11300         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11301         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11302         * inferior.c (inferior_pid_to_str): Constify.
11303         * linux-nat.c (linux_nat_pid_to_str): Constify.
11304         * linux-tdep.c (linux_core_pid_to_str): Constify.
11305         * linux-thread-db.c (thread_db_pid_to_str)
11306         (thread_db_extra_thread_info): Constify.
11307         * nto-tdep.c (nto_extra_thread_info): Constify.
11308         * nto-tdep.h (nto_extra_thread_info): Constify.
11309         * obsd-nat.c (obsd_pid_to_str): Constify.
11310         * procfs.c (procfs_pid_to_str): Constify.
11311         * ravenscar-thread.c (ravenscar_extra_thread_info)
11312         (ravenscar_pid_to_str): Constify.
11313         * remote-sim.c (gdbsim_pid_to_str): Constify.
11314         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11315         Constify.
11316         * sol-thread.c (solaris_pid_to_str): Constify.
11317         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11318         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11319         * target.c (default_pid_to_str, target_pid_to_str)
11320         (normal_pid_to_str, default_pid_to_str): Constify.
11321         * target.h (target_ops::to_pid_to_str)
11322         (target_ops::to_extra_thread_info): Constify.
11323         (target_pid_to_str, normal_pid_to_str): Constify.
11324         * windows-nat.c (windows_pid_to_str): Constify.
11325         * gdbarch.sh (core_pid_to_str): Constify.
11326         * target-delegates.c: Regenerate.
11327         * gdbarch.h, gdbarch.c: Regenerate.
11328
11329 2017-04-05  Pedro Alves  <palves@redhat.com>
11330
11331         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11332         the memory of the temporary warning_pre_print override.
11333         * utils.c (warning_pre_print): Constify.
11334         * utils.h (warning_pre_print): Constify.
11335
11336 2017-04-05  Pedro Alves  <palves@redhat.com>
11337
11338         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11339         (shell_command): New function.
11340         (make_command): Use std::string.
11341         (init_cli_cmds): Register shell_command instead of shell_escape.
11342
11343 2017-04-05  Pedro Alves  <palves@redhat.com>
11344
11345         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11346         * tracepoint.c (default_collect): Don't initialize.
11347
11348 2017-04-05  Pedro Alves  <palves@redhat.com>
11349
11350         * macroexp.c (macro_buffer::shared): Now a bool.
11351         (init_buffer): Update.
11352         (init_shared_buffer): Constify 'addr' parameter.
11353         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11354         casts.
11355
11356 2017-04-05  Pedro Alves  <palves@redhat.com>
11357
11358         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11359         * disasm.c (set_disassembler_options): Constify local.
11360         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11361
11362 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11363
11364         PR gdb/21352
11365         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11366         option.
11367
11368 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11369
11370         * frame.c (frame_unwind_register_unsigned): Call
11371         frame_unwind_register_value.
11372
11373 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11374
11375         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11376         Use gdb_test_multiple, and don't match anchor.
11377
11378 2017-04-05  Pedro Alves  <palves@redhat.com>
11379
11380         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11381         (Write After Approval): Remove Simon Marchi.
11382
11383 2017-04-05  Pedro Alves  <palves@redhat.com>
11384
11385         * common/gdb_optional.h (optional::optional): Make constexpr and
11386         initialize m_dummy.
11387
11388 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11389
11390         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11391         (amd64fbsd_jmp_buf_reg_offset): Remove.
11392         (amd64fbsd_supply_uthread): Remove function.
11393         (amd64fbsd_collect_uthread): Remove function.
11394         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11395         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11396         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11397         (fbsd-nat.c): Update comment.
11398         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11399         (i386fbsd_jmp_buf_reg_offset): Remove.
11400         (i386fbsd_supply_uthread): Remove function.
11401         (i386fbsd_collect_uthread): Remove function.
11402         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11403
11404 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11405
11406         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11407         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11408         * NEWS: Mention that support for FreeBSD/alpha was removed.
11409         * alpha-fbsd-tdep.c: Delete file.
11410         * config/alpha/fbsd.mh: Delete file.
11411         * configure.host: Delete alpha*-*-freebsd* and
11412         alpha*-*-kfreebsd*-gnu.
11413         * configure.tgt: Delete alpha*-*-freebsd* and
11414         alpha*-*-kfreebsd*-gnu.
11415
11416 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11417
11418         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11419         amd64bsd_store_inferior_registers): Use ptid from regcache.
11420
11421 2017-04-04  Pedro Alves  <palves@redhat.com>
11422
11423         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11424         data fields, make them private and add "m_" prefixes.
11425         (lnp_state_machine::lnp_state_machine): New ctor.
11426         (record_line, check_line_address, handle_set_discriminator)
11427         (handle_set_address, handle_advance_pc, handle_special_opcode)
11428         (handle_advance_line, handle_set_file, handle_negate_stmt)
11429         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11430         (end_sequence, advance_line): New methods.
11431         (m_gdbarch, m_record_lines_p): New fields.
11432         (lnp_reader_state): Delete.
11433         (dwarf_record_line): Rename to ...
11434         (lnp_state_machine::record_line): ... adjust.
11435         (init_lnp_state_machine): Delete.
11436         (lnp_state_machine::lnp_state_machine): New.
11437         (check_line_address): Rename to ...
11438         (lnp_state_machine::check_line_address): This.
11439         (dwarf_decode_lines_1): Remove reference to "reader_state".
11440         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11441         State machine internal state manipulation moved to
11442         lnp_state_machine methods.
11443
11444 2017-04-04  Pedro Alves  <palves@redhat.com>
11445
11446         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11447         unittests/offset-type-selftests.c.
11448         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11449         * common/offset-type.h: New file.
11450         * common/preprocessor.h: New file.
11451         * common/traits.h: New file.
11452         * common/valid-expr.h: New file.
11453         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11454         sect_offset and cu_offset strong typedefs throughout.
11455         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11456         typedefs throughout.
11457         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11458         sect_offset and cu_offset strong typedefs throughout.
11459         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11460         typedefs throughout.
11461         * gdbtypes.h: Include "common/offset-type.h".
11462         (cu_offset): Now an offset type (strong typedef) instead of a
11463         struct.
11464         (sect_offset): Likewise.
11465         (union call_site_parameter_u): Rename "param_offset" field to
11466         "param_cu_off".
11467         * unittests/offset-type-selftests.c: New file.
11468
11469 2017-04-04  Pedro Alves  <palves@redhat.com>
11470
11471         * common/underlying.h: New file.
11472         * dwarf2read.c: Include "common/gdb_optional.h" and
11473         "common/underlying.h".
11474         (dir_index, file_name_index): New types.
11475         (file_entry): Use them.
11476         (file_entry::include): Use to_underlying.
11477         (line_header::add_file_name): Use dir_index.
11478         (read_formatted_entries): Use gdb::optional.  Read form before
11479         writting to file_entry.
11480         (dwarf_decode_line_header): Use dir_index.
11481         (lnp_state_machine::current_file): Use to_underlying.
11482         (lnp_state_machine::file): Change type to file_name_index.
11483         (dwarf_record_line): Use to_underlying.
11484         (init_lnp_state_machine): Use file_name_index.
11485         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11486
11487 2017-04-04  Pedro Alves  <palves@redhat.com>
11488
11489         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11490         operator bool, has_value and get methods.
11491
11492 2017-04-04  Pedro Alves  <palves@redhat.com>
11493
11494         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11495         fields.
11496         (line_header): Initialize all data fields.  Change type of
11497         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11498         Change type of include_dirs to std::vector<const char *>.  Remove
11499         num_include_dirs, include_dirs_size.  Change type of file_names to
11500         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11501         (line_header::line_header): New.
11502         (line_header::add_include_dir, line_header::add_file_name): New
11503         methods.
11504         (line_header::include_dir_at): Remove NULL check.
11505         (line_header::file_name_at): Add const overload.
11506         (line_header_up): New unique_ptr typedef.
11507         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11508         std::vector.  Remove free_line_header call.
11509         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11510         free_line_header call.
11511         (free_cu_line_header): Delete.
11512         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11513         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11514         Adjust to use std::vector.
11515         (free_line_header): Delete.
11516         (free_line_header_voidp): Use delete.
11517         (add_include_dir): Replace with ...
11518         (line_header::add_include_dir): ... this method.  Use std::vector.
11519         (add_file_name): Replace with ...
11520         (line_header::add_file_name): ... this method.  Use std::vector.
11521         (add_include_dir_stub): Delete.
11522         (read_formatted_entries): Remove memset.
11523         (dwarf_decode_line_header): Return a line_header_up instead of a
11524         raw pointer.  Remove cleanup handling.  Pass lambdas to
11525         read_formatted_entries.  Adjust to use line_header methods.
11526         (dwarf_decode_lines_1): Adjust to use line_header methods.
11527         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11528         use std::vector.
11529
11530 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11531
11532         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11533         instead of struct ptid.
11534
11535 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11536
11537         * frame.c (get_frame_register_bytes): Unwind using value.
11538         (put_frame_register_bytes): Likewise.
11539
11540 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11541
11542         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11543         aggregate-like.
11544
11545 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11546
11547         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11548
11549 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11550
11551         * gdbthread.h (struct thread_info): Declare constructor and
11552         destructor.  Add some in-class member initializers.
11553         * thread.c (free_thread): Remove.
11554         (init_thread_list): Call delete instead of free_thread.
11555         (new_thread): Call thread_info constructor.
11556         (thread_info::thread_info): New function.
11557         (thread_info::~thread_info): New function.
11558         (delete_thread_1): Call delete instead of free_thread.
11559         (make_cleanup_restore_current_thread): Move tp and frame to
11560         inner block.
11561
11562 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11563
11564         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11565         (arc_skip_prologue): Likewise.
11566         (arc_make_frame_cache): Likewise.
11567         (arc_pv_get_operand): New function.
11568         (arc_is_in_prologue): Likewise.
11569         (arc_analyze_prologue): Likewise.
11570         (arc_print_frame_cache): Likewise.
11571         (MAX_PROLOGUE_LENGTH): New constant.
11572
11573 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11574
11575         * configure.tgt: Add arc-insn.o.
11576         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11577         (dump_arc_instruction_command): New function.
11578         (arc_fprintf_disasm): Likewise.
11579         (arc_disassemble_info): Likewise.
11580         (arc_insn_get_operand_value): Likewise.
11581         (arc_insn_get_operand_value_signed): Likewise.
11582         (arc_insn_get_memory_base_reg): Likewise.
11583         (arc_insn_get_memory_offset): Likewise.
11584         (arc_insn_get_branch_target): Likewise.
11585         (arc_insn_dump): Likewise.
11586         (arc_insn_get_linear_next_pc): Likewise.
11587         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11588         (arc_disassemble_info): Likewise.
11589         (arc_insn_get_branch_target): Likewise.
11590         (arc_insn_get_linear_next_pc): Likewise.
11591         * NEWS: Mention new "maint print arc arc-instruction".
11592
11593 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11594
11595         * arc-tdep (maintenance_print_arc_list): New variable.
11596         (maintenance_print_arc_command): New function.
11597
11598 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11599
11600         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11601         Add "limm" and "reserved".
11602         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11603         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11604         * arc-tdep.h (arc_regnum): Likewise.
11605
11606 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11607
11608         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11609         for THREADPTR register.
11610         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11611         register.
11612         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11613         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11614         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11615
11616 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11617
11618         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11619         registers above gdbarch_num_regs (gdbarch) as privileged in
11620         call0 ABI.
11621
11622 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11623
11624         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11625         for a single specified register or for all registers in
11626         a0_base..a0_base + C0_NREGS range.
11627         (supply_gregset_reg): Call regcache_raw_supply for a single
11628         specified register or for all registers in a0_base..a0_base +
11629         C0_NREGS range.
11630
11631 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11632
11633         * arch/xtensa.h (C0_NREGS): Add definition.
11634         * xtensa-tdep.c (C0_NREGS): Remove definition.
11635
11636 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11637
11638         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11639         Drop xtensa_default_isa initialization.
11640         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11641
11642 2017-03-27  Pedro Alves  <palves@redhat.com>
11643
11644         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11645         (file_entry::include_dir): New method.
11646         (line_header::include_dir_at, line_header::file_name_at): New
11647         methods.
11648         (setup_type_unit_groups, setup_type_unit_groups)
11649         (psymtab_include_file_name): Simplify using the new methods.
11650         (lnp_state_machine) <the_line_header>: New field.
11651         <file>: Add comment.
11652         (lnp_state_machine::current_file): New method.
11653         (dwarf_record_line): Simplify using the new methods.
11654         (init_lnp_state_machine): Initialize the "the_line_header" field.
11655         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11656         Simplify using the new methods.
11657
11658 2017-03-27  Pedro Alves  <palves@redhat.com>
11659
11660         * cp-name-parser.y (make_empty): Delete.
11661         (demangler_special, nested_name, ptr_operator, array_indicator)
11662         (direct_declarator, declarator_1): Use fill_comp instead of
11663         make_empty.
11664
11665 2017-03-27  Pedro Alves  <palves@redhat.com>
11666
11667         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11668         to ATTRIBUTE_PRINTF.
11669         * solib-target.c (library_list_start_list): Print "string" not
11670         "version".
11671         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11672         gdb_xml_error call.
11673
11674 2017-03-27  Pedro Alves  <palves@redhat.com>
11675
11676         * dwarf2read.c (struct file_and_directory): New.
11677         (dwarf2_get_dwz_file): Adjust to use std::string.
11678         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11679         (find_file_and_directory): Adjust to return a file_and_directory
11680         object.
11681         (read_file_scope): Adjust to use file_and_directory.  Remove
11682         make_cleanup/do_cleanups calls.
11683         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11684         make_cleanup/do_cleanups calls.
11685         * python/python.c (do_start_initialization): Adjust to ldirname
11686         returning a std::string.
11687         * utils.c (ldirname): Now returns a std::string.
11688         * utils.h (ldirname): Change return type to std::string.
11689         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11690         returning a std::string.
11691         * xml-tdesc.c (file_read_description_xml): Likewise.
11692
11693 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11694
11695         * regcache.c (regcache_debug_print_register): New function.
11696         * regcache.h (regcache_debug_print_register): New declaration.
11697         * target.c (debug_print_register): Remove.
11698         (target_fetch_registers): Call regcache_debug_print_register.
11699         (target_store_registers): Likewise.
11700
11701 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11702
11703         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11704         reference beyond the 'lh->include_dirs' array before accessing to
11705         it.
11706         (psymtab_include_file_name): Likewise.
11707         (dwarf_decode_lines_1): Likewise.
11708         (dwarf_decode_lines): Likewise.
11709         (file_file_name): Likewise.
11710
11711 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11712
11713         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11714         inferior_ptid.
11715         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11716         ps_lsetfpregs): Likewise.
11717         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11718         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11719         ps_lsetfpregs): Likewise.
11720         * target.c (target_fetch_registers, target_store_registers):
11721         Remove asserts.
11722
11723 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11724
11725         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11726
11727 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11728
11729         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11730         (_initialize_aarch64_tdep): Register it.
11731         (aarch64_record_load_store): Handle PRFM instruction.
11732         (aarch64_process_record_test): New function.
11733
11734 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11735
11736         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11737         indentation.
11738
11739 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11740
11741         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11742
11743 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11744
11745         python/python.c (do_start_initialization): Fix memory leak.
11746
11747 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11748
11749         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11750         using get_ptrace_pid.
11751         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11752         inferior_ptid.
11753         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11754         inferior_ptid instead of pid.
11755
11756 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11757
11758         * aarch64-tdep.c: Wrap locally used classes in anonymous
11759         namespace.
11760         * arm-tdep.c: Likewise.
11761         * linespec.c: Likewise.
11762         * ui-out.c: Likewise.
11763
11764 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11765
11766         PR gdb/19637
11767         * python/lib/gdb/printer/bound_registers.py: Import sys.
11768
11769 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11770
11771         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11772         windows_thread_info parameter and use it instead of
11773         current_thread.
11774         (windows_fetch_inferior_registers): Don't set current_thread,
11775         pass the thread to do_windows_fetch_inferior_registers.  Use
11776         ptid from regcache instead of inferior_ptid.
11777         (do_windows_store_inferior_registers): Add windows_thread_info
11778         parameter and use it instead of current_thread.
11779         (windows_store_inferior_registers): Don't set current_thread,
11780         pass the thread to do_windows_store_inferior_registers.  Use
11781         ptid from regcache instead of inferior_ptid.
11782
11783 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11784
11785         * ser-mingw.c (ser_windows_raw): Remove reference to
11786         struct serial::current_timeout.
11787
11788 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11789
11790         PR tdep/20928
11791         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11792         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11793         (sparc64_fsr_type): Fix %fsr decoding.
11794
11795 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11796
11797         * python/py-record-btrace.c (btpy_insn_data): Change return type
11798         for Python 2.
11799
11800 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11801
11802         * spu-linux-nat.c (spu_fetch_inferior_registers,
11803         spu_store_inferior_registers): Use ptid from regcache, set and
11804         restore inferior_ptid.
11805         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11806         Likewise.
11807
11808 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11809
11810         * i386-linux-nat.c (fetch_register, store_register,
11811         i386_linux_fetch_inferior_registers,
11812         i386_linux_store_inferior_registers): Use ptid from regcache.
11813         * ia64-linux-nat.c (ia64_linux_fetch_register,
11814         ia64_linux_store_register): Likewise.
11815         * inf-ptrace.c (inf_ptrace_fetch_register,
11816         inf_ptrace_store_register): Likewise.
11817         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11818         m32r_linux_store_inferior_registers): Likewise.
11819         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11820         m68kbsd_store_inferior_registers): Likewise.
11821         * m68k-linux-nat.c (fetch_register, store_register,
11822         m68k_linux_fetch_inferior_registers,
11823         m68k_linux_store_inferior_registers): Likewise.
11824         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11825         m88kbsd_store_inferior_registers): Likewise.
11826         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11827         mips_fbsd_store_inferior_registers): Likewise.
11828         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11829         mips64_linux_regsets_store_registers): Likewise.
11830         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11831         mipsnbsd_store_inferior_registers): Likewise.
11832         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11833         mips64obsd_store_inferior_registers): Likewise.
11834         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11835         Likewise.
11836         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11837         ppcfbsd_store_inferior_registers): Likewise.
11838         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11839         ppc_linux_store_inferior_registers): Likewise.
11840         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11841         ppcnbsd_store_inferior_registers): Likewise.
11842         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11843         ppcobsd_store_registers): Likewise.
11844         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11845         Likewise.
11846         * ravenscar-thread.c (ravenscar_fetch_registers,
11847         ravenscar_store_registers, ravenscar_prepare_to_store):
11848         Likewise.
11849         * record-btrace.c (record_btrace_fetch_registers,
11850         record_btrace_store_registers, record_btrace_prepare_to_store):
11851         Likewise.
11852         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11853         Lookup inferior using ptid from regcache, instead of
11854         current_inferior.
11855         * remote.c (remote_fetch_registers, remote_store_registers): Use
11856         ptid from regcache.
11857         * rs6000-nat.c (fetch_register, store_register): Likewise.
11858         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11859         s390_linux_store_inferior_registers): Likewise.
11860         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11861         shnbsd_store_inferior_registers): Likewise.
11862         * sol-thread.c (sol_thread_fetch_registers,
11863         sol_thread_store_registers): Likewise.
11864         * sparc-nat.c (sparc_fetch_inferior_registers,
11865         sparc_store_inferior_registers): Likewise.
11866         * tilegx-linux-nat.c (fetch_inferior_registers,
11867         store_inferior_registers): Likewise.
11868         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11869         vaxbsd_store_inferior_registers): Likewise.
11870         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11871         store_xtregs): Likewise.
11872
11873 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11874
11875         PR gdb/14441
11876         * NEWS: Mention support for rvalue references in GDB and python.
11877         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11878         supports both lvalue and rvalue references.
11879
11880 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11881
11882         PR gdb/14441
11883         * gdbtypes.c (rank_one_type): Implement overloading
11884         resolution rules regarding rvalue references.
11885
11886 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11887
11888         PR gdb/14441
11889         * aarch64-tdep.c (aarch64_type_align)
11890         (aarch64_extract_return_value, aarch64_store_return_value): Change
11891         lvalue reference type checks to general reference type checks.
11892         * amd64-tdep.c (amd64_classify): Likewise.
11893         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11894         Likewise.
11895         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11896         (arm_store_return_value): Likewise.
11897         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11898         * c-typeprint.c (c_print_type): Likewise.
11899         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11900         (cplus_number_of_children, cplus_describe_child): Likewise.
11901         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11902         * completer.c (expression_completer): Likewise.
11903         * cp-support.c (make_symbol_overload_list_adl_namespace):
11904         Likewise.
11905         * darwin-nat-info.c (info_mach_region_command): Likewise.
11906         * dwarf2loc.c (entry_data_value_coerce_ref)
11907         (value_of_dwarf_reg_entry): Likewise.
11908         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11909         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11910         Likewise.
11911         * findvar.c (extract_typed_address, store_typed_address):
11912         Likewise.
11913         * gdbtypes.c (rank_one_type): Likewise.
11914         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11915         * infcall.c (value_arg_coerce): Likewise.
11916         * language.c (pointer_type): Likewise.
11917         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11918         Likewise.
11919         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11920         * mn10300-tdep.c (mn10300_type_align): Likewise.
11921         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11922         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11923         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11924         Likewise.
11925         * printcmd.c (print_formatted, x_command): Likewise.
11926         * python/py-type.c (typy_get_composite, typy_template_argument):
11927         Likewise.
11928         * python/py-value.c (valpy_referenced_value)
11929         (valpy_get_dynamic_type, value_has_field): Likewise.
11930         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11931         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11932         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11933         * spu-tdep.c (spu_scalar_value_p): Likewise.
11934         * symtab.c (lookup_symbol_aux): Likewise.
11935         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11936         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11937         Likewise.
11938         * valops.c (value_cast_pointers, value_cast)
11939         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11940         (value_struct_elt, value_struct_elt_bitpos)
11941         (value_find_oload_method_list, find_overload_match)
11942         (value_rtti_indirect_type): Likewise.
11943         * valprint.c (val_print_scalar_type_p, generic_val_print):
11944         Likewise.
11945         * value.c (value_actual_type, value_as_address, unpack_long)
11946         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11947         (coerce_ref): Likewise.
11948         * varobj.c (varobj_get_value_type): Likewise.
11949
11950 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11951
11952         PR gdb/14441
11953         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11954         table of constants.
11955         * python/lib/gdb/command/explore.py: Support exploring values
11956         of rvalue reference types.
11957         * python/lib/gdb/types.py: Implement get_basic_type() for
11958         rvalue reference types.
11959         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11960         constant.
11961         * python/py-value.c (valpy_getitem): Add an rvalue reference
11962         check.
11963         (valpy_reference_value): Add new parameter "refcode".
11964         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11965         New wrappers for valpy_reference_value().
11966         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11967         (gdbpy_invoke_xmethod): Likewise.
11968
11969 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11970
11971         PR gdb/14441
11972         * dwarf2read.c (process_die, read_type_die_1): Handle the
11973         DW_TAG_rvalue_reference_type DIE.
11974         (read_tag_reference_type): Add new parameter "refcode".
11975
11976 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11977
11978         PR gdb/14441
11979         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11980         (c_type_print_modifier, c_type_print_varspec_suffix)
11981         (c_type_print_base): Support printing rvalue reference types.
11982         * c-valprint.c (c_val_print, c_value_print): Support printing
11983         rvalue reference values.
11984
11985 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11986
11987         PR gdb/14441
11988         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11989         typename.
11990         * cp-support.c (replace_typedefs): Handle
11991         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11992         * python/py-type.c (typy_lookup_type): Likewise.
11993
11994 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11995
11996         PR gdb/14441
11997         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11998         * parse.c (insert_type): Change assert statement.
11999         (follow_types): Handle rvalue reference types.
12000         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12001         constant.
12002
12003 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12004
12005         PR gdb/14441
12006         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12007         value_ref() interface.
12008         * c-valprint.c (c_value_print): Likewise.
12009         * infcall.c (value_arg_coerce): Likewise.
12010         * python/py-value.c (valpy_reference_value): Likewise.
12011         * valops.c (value_cast, value_reinterpret_cast)
12012         (value_dynamic_cast, typecmp): Likewise.
12013         (value_ref): Parameterize by kind of return value reference type.
12014         * value.h (value_ref): Add new parameter "refcode".
12015
12016 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12017
12018         PR gdb/14441
12019         * dwarf2read.c (read_tag_reference_type): Use
12020         lookup_lvalue_reference_type() instead of lookup_reference_type().
12021         * eval.c (evaluate_subexp_standard): Likewise.
12022         * f-exp.y: Likewise.
12023         * gdbtypes.c (make_reference_type, lookup_reference_type):
12024         Generalize with rvalue reference types.
12025         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12026         convenience wrappers for lookup_reference_type().
12027         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12028         reference kind parameter.
12029         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12030         wrappers for lookup_reference_type().
12031         * guile/scm-type.c (gdbscm_type_reference): Use
12032         lookup_lvalue_reference_type() instead of lookup_reference_type().
12033         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12034         * parse.c (follow_types): Likewise.
12035         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12036         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12037         Likewise.
12038         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12039         (gdbpy_invoke_xmethod): Likewise.
12040         * stabsread.c: Provide extra argument to make_reference_type()
12041         call.
12042         * valops.c (value_ref, value_rtti_indirect_type): Use
12043         lookup_lvalue_reference_type() instead of lookup_reference_type().
12044
12045 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12046
12047         PR gdb/14441
12048         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12049         (TYPE_IS_REFERENCE): New macro.
12050         (struct type): Add rvalue_reference_type field.
12051         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12052
12053 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12054
12055         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12056         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12057         New function definition.
12058         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12059         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12060         New function declaration.
12061         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12062         * mi/mi-interp.h: New file.
12063         * solib.c (info_sharedlibrary_command): Replace for loop with
12064         ALL_SO_LIBS macro
12065         * solib.h (update_solib_list): New function declaration.
12066         (so_list_head): Move macro.
12067         * solist.h (ALL_SO_LIBS): New macro.
12068
12069 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12070
12071         * infcmd.c (post_create_inferior): Remove unused argument in
12072         call to solib_add.
12073         * remote.c (remote_start_remote): Likewise.
12074         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12075         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12076         (enable_break): Likewise.
12077         * solib.c (update_solib_list): Remove unused target argument
12078         and its documentation.
12079         (solib_add): Remove unused target argument.  Remove unused
12080         argument in call to update_solib_list.
12081         (info_sharedlibrary_command): Remove unused argument in call
12082         to update_solib_list.
12083         (sharedlibrary_command): Remove unused argument in call to
12084         solib_add.
12085         (handle_solib_event): Likewise.
12086         (reload_shared_libraries): Likewise.
12087         * solib.h (solib_add): Remove unused target argument.
12088
12089 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12090
12091         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12092         (s390_displaced_step_fixup): Cover relative branches with the
12093         default fixup handling.  This fixes lack of support for some
12094         relative branch instructions.
12095
12096 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12097
12098         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12099         ptid from regcache.
12100
12101 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12102
12103         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12104         i386_darwin_store_inferior_registers): Use ptid from regcache.
12105
12106 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12107
12108         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12109         i386bsd_store_inferior_registers): Use ptid from regcache.
12110
12111 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12112
12113         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12114         hppaobsd_store_registers): Use ptid from regcache.
12115
12116 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12117
12118         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12119         hppanbsd_store_registers): Use ptid from regcache.
12120
12121 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12122
12123         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12124         from regcache.  Use get_ptrace_pid.
12125
12126 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12127
12128         * corelow.c (get_core_register_section): Use ptid from regcache,
12129         update doc.
12130
12131 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12132
12133         * bsd-uthread.c (bsd_uthread_fetch_registers,
12134         bsd_uthread_store_registers): Use ptid from regcache, set and
12135         restore inferior_ptid.
12136
12137 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12138
12139         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12140         fetch_fp_regs, store_register, store_regs, store_fp_register,
12141         store_fp_regs): Use ptid from regcache.
12142
12143 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12144
12145         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12146         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12147         store_vfp_regs): Use ptid from regcache.
12148
12149 2017-03-17  Pedro Alves  <palves@redhat.com>
12150
12151         PR remote/21188
12152         * ser-base.c (ser_base_wait_for): Add comment.
12153         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12154         version.
12155         * ser-unix.c (hardwire_raw): Remove reference to
12156         scb->current_timeout.
12157         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12158         (hardwire_ops): Install ser_base_readchar instead of
12159         hardwire_readchar.
12160         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12161         Remove fields.
12162
12163 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12164
12165         PR gdb/19637
12166         * python/lib/gdb/printer/bound_registers.py: Add support for
12167         Python 3.
12168
12169 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12170
12171         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12172         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12173         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12174         byte_offset to subobj_byte_offset.  Fix the handling of
12175         DWARF_VALUE_STACK on big-endian targets when coming via an
12176         implicit pointer.
12177         (dwarf2_evaluate_loc_desc): Adjust call to
12178         dwarf2_evaluate_loc_desc_full.
12179         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12180         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12181
12182 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12183
12184         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12185         and REVSH instructions.
12186
12187 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12188
12189         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12190         (arm_record_test): Declare.
12191         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12192         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12193         align with the manual.
12194         (thumb_record_misc): Adjust the code order to align with the
12195         manual.
12196         (thumb2_record_decode_insn_handler): Fix instruction matching.
12197         (instruction_reader_thumb): New class.
12198         (arm_record_test): New function.
12199
12200 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12201
12202         * arm-tdep.c (abstract_memory_reader): New class.
12203         (instruction_reader): New class.
12204         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12205         (decode_insn): Likewise.
12206
12207 2017-03-16  Doug Evans  <dje@google.com>
12208
12209         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12210         member.  Change type of TYPE member to SCM.  All uses updated.
12211         (lsscm_make_lazy_string_smob): Add assert.
12212         (lsscm_make_lazy_string): Flag bad length values.
12213         (lsscm_elt_type): New function.
12214         (gdbscm_lazy_string_to_value): Rewrite to use
12215         lsscm_safe_lazy_string_to_value.
12216         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12217         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12218         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12219         in incoming type.
12220         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12221         * guile/scm-type.c (tyscm_scm_to_type): New function.
12222
12223 2017-03-15  Doug Evans  <dje@google.com>
12224
12225         PR python/17728, python/18439, python/18779
12226         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12227         member.  Change type of TYPE member to PyObject *.  All uses updated.
12228         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12229         (gdbpy_create_lazy_string_object): Flag bad length values.
12230         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12231         Handle typedefs in incoming type.
12232         (stpy_lazy_string_elt_type): New function.
12233         (gdbpy_extract_lazy_string): Call it.
12234         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12235         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12236         typedefs in incoming type.
12237
12238 2017-03-16  Doug Evans  <dje@google.com>
12239
12240         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12241         * guile/scm-type.c (tyscm_scm_to_type): New function.
12242
12243 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12244
12245         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12246         "ULONGEST" for "skip".
12247
12248 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12249
12250         PR gdb/21220
12251         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12252         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12253         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12254         over ptrace peek/poke until end of buffer or error.
12255
12256 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12257
12258         * parse.c (length_of_subexp): Make static.
12259         * parser-defs.h (length_of_subexp): Remove.
12260
12261 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12262
12263         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12264         as well.
12265
12266 2017-03-14  Pedro Alves  <palves@redhat.com>
12267
12268         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12269         (main): Use std::unique_ptr.  Remove calls to
12270         cp_demangled_name_parse_free.
12271
12272 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12273
12274         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12275         alphabsd_store_inferior_registers): Use regcache->ptid instead
12276         of inferior_ptid.
12277
12278 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12279
12280         * aix-thread.c (aix_thread_fetch_registers,
12281         aix_thread_store_registers): Use regcache->ptid instead of
12282         inferior_ptid.
12283
12284 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12285
12286         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12287         store_gregs_to_thread, fetch_fpregs_from_thread,
12288         store_fpregs_to_thread): Use regcache->ptid instead of
12289         inferior_ptid.
12290
12291 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12292
12293         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12294         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12295         instead of inferior_ptid.
12296
12297 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12298
12299         * target.c (target_fetch_registers, target_store_registers): Add
12300         assert.
12301
12302 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12303
12304         * regcache.h (regcache_get_ptid): New function.
12305         * regcache.c (regcache_get_ptid): New function.
12306
12307 2017-03-13  Mark Wielaard  <mark@klomp.org>
12308
12309         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12310
12311 2017-03-10  Keith Seitz  <keiths@redhat.com>
12312
12313         PR c++/8218
12314         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12315
12316 2017-03-08  Pedro Alves  <palves@redhat.com>
12317
12318         PR gdb/18360
12319         * infrun.c (start_step_over, do_target_resume, resume)
12320         (restart_threads): Assert we're not resuming a thread that is
12321         meant to be stopped.
12322         (infrun_thread_stop_requested_callback): Delete.
12323         (infrun_thread_stop_requested): If the thread is internally
12324         stopped, queue a pending stop event and clear the thread's
12325         inline-frame state.
12326         (handle_stop_requested): New function.
12327         (handle_syscall_event, handle_inferior_event_1): Use
12328         handle_stop_requested.
12329         (handle_stop_requested): New function.
12330         (handle_signal_stop): Set the thread's stop_signal here instead of
12331         at caller.
12332         (finish_step_over): Clear step over info unconditionally.
12333         (handle_signal_stop): If the user had interrupted the event
12334         thread, consider the stop a random signal.
12335         (handle_signal_stop) <signal arrived while stepping over
12336         breakpoint>: Don't restart threads here.
12337         (stop_waiting): Don't clear step-over info here.
12338
12339 2017-03-08  Pedro Alves  <palves@redhat.com>
12340
12341         PR 21206
12342         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12343         goes to argument 2, not 1.
12344
12345 2017-03-08  Pedro Alves  <palves@redhat.com>
12346
12347         PR cli/21218
12348         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12349         display_gdb_prompt.
12350         (command_line_input): Add comment.
12351
12352 2017-03-08  Pedro Alves  <palves@redhat.com>
12353
12354         PR tui/21216
12355         * tui/tui-file.c (tui_file::write): New.
12356         * tui/tui-file.h (tui_file): Override "write".
12357         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12358         factored out from ...
12359         (tui_puts): ... here.
12360         (tui_putc): Use them.
12361         (tui_write): New function.
12362         * tui/tui-io.h (tui_write): Declare.
12363
12364 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12365
12366         * Makefile.in (SFILES): Replace "environ.c" with
12367         "common/environ.c".
12368         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12369         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12370         to...
12371         * common/environ.c: ... here.
12372         * environ.h: Moved to...
12373         * common/environ.h: ... here.
12374
12375 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12376
12377         * gdbarch.sh (pstring_ptr): New static function.
12378         (gdbarch_disassembler_options): Use it.
12379         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12380         not valid_disassembler_option->name.
12381         * gdbarch.c: Regenerate.
12382
12383 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12384
12385         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12386
12387 2017-03-07  Pedro Alves  <palves@redhat.com>
12388
12389         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12390
12391 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12392
12393         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12394         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12395         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12396         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12397
12398 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12399
12400         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12401
12402 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12403
12404         * remote.c (remote_add_target_side_commands): Use range-based
12405         for loop.
12406
12407 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12408
12409         PR gdb/21165
12410         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12411         value is lazy.
12412         * valprint.c (common_val_print): Likewise.
12413
12414 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12415
12416         * NEWS: Mention new set/show disassembler-options commands.
12417         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12418         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12419         (prospective_options): New static variable.
12420         (gdb_disassembler::gdb_disassembler): Initialize
12421         m_di.disassembler_options.
12422         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12423         (get_disassembler_options): New function.
12424         (set_disassembler_options): Likewise.
12425         (set_disassembler_options_sfunc): Likewise.
12426         (show_disassembler_options_sfunc): Likewise.
12427         (disassembler_options_completer): Likewise.
12428         (_initialize_disasm): Likewise.
12429         * disasm.h (get_disassembler_options): New prototype.
12430         (set_disassembler_options): Likewise.
12431         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12432         (gdbarch_verify_disassembler_options): Likewise.
12433         * gdbarch.c: Regenerate.
12434         * gdbarch.h: Likewise.
12435         * arm-tdep.c (num_disassembly_options): Delete.
12436         (set_disassembly_style): Likewise.
12437         (arm_disassembler_options): New static variable.
12438         (set_disassembly_style_sfunc): Convert short style name into long
12439         option name.  Call set_disassembler_options.
12440         (show_disassembly_style_sfunc): New function.
12441         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12442         set_gdbarch_verify_disassembler_options.
12443         (_initialize_arm_tdep): Delete regnames variable and update callers.
12444         (arm_disassembler_options): Initialize.
12445         (disasm_options): New variable.
12446         (num_disassembly_options): Rename from this...
12447         (num_disassembly_styles): ...to this.  Compute by scanning through
12448         disasm_options.
12449         (valid_disassembly_styles): Initialize using disasm_options.
12450         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12451         set_arm_regname_option.
12452         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12453         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12454         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12455         set_gdbarch_verify_disassembler_options.
12456         * s390-tdep.c (s390_disassembler_options): New static variable.
12457         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12458         set_gdbarch_verify_disassembler_options.
12459
12460 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12461
12462         * remote.c (remote_add_target_side_condition): Remove "struct"
12463         keyword from range-based for loop.
12464
12465 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12466
12467         * remote.c (remote_add_target_side_condition): Use range-based
12468         for loop.  Update comment.
12469
12470 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12471
12472         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12473
12474 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12475
12476         * regcache.c (regcache_raw_update): New function.
12477         (regcache_raw_read): Move code to regcache_raw_update.
12478         * regcache.h (regcache_raw_update): New declaration.
12479         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12480
12481 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12482
12483         * dwarf2read.c (create_debug_type_hash_table): Initialize
12484         header.signature and header.type_offset_in_tu.
12485
12486 2017-02-24  Pedro Alves  <palves@redhat.com>
12487
12488         * symtab.c (make_file_symbol_completion_list_1): Use
12489         add_symtab_completions.
12490
12491 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12492
12493         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12494
12495 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12496
12497         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12498         I386_MAX_REGISTER_SIZE.
12499         (i386_pseudo_register_write): Likewise.
12500         (i386_process_record): Likewise.
12501         * i387-tdep.c (i387_supply_xsave): Likewise.
12502         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12503         (store_register): Likewise.
12504
12505 2017-02-23  Pedro Alves  <palves@redhat.com>
12506
12507         * ada-lang.c: Include "common/function-view.h".
12508         (ada_iterate_over_symbols): Adjust to use function_view as
12509         callback type.
12510         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12511         (ada_make_symbol_completion_list): Use a lambda.
12512         (ada_exc_search_name_matches): Delete.
12513         (name_matches_regex): New.
12514         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12515         * compile/compile-c-support.c: Include "common/function-view.h".
12516         (print_one_macro): Change prototype to accept a ui_file pointer.
12517         (write_macro_definitions): Use a lambda.
12518         * dwarf2read.c: Include "common/function-view.h".
12519         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12520         (dw2_expand_symtabs_matching): Adjust to use function_view as
12521         callback type.
12522         * language.h: Include "common/function-view.h".
12523         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12524         function_view as callback type.
12525         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12526         * linespec.c: Include "common/function-view.h".
12527         (collect_info::add_symbol): New method.
12528         (struct symbol_and_data_callback, iterate_inline_only, struct
12529         symbol_matcher_data, iterate_name_matcher): Delete.
12530         (iterate_over_all_matching_symtabs): Adjust to use function_view
12531         as callback type and lambdas.
12532         (iterate_over_file_blocks): Adjust to use function_view as
12533         callback type.
12534         (decode_compound_collector): Now a class with private fields.
12535         (decode_compound_collector::release_symbols): New method.
12536         (collect_one_symbol): Rename to...
12537         (decode_compound_collector::operator()): ... this and adjust.
12538         (lookup_prefix_sym): decode_compound_collector construction bits
12539         move to decode_compound_collector ctor.  Pass the
12540         decode_compound_collector object directly as callback.  Remove
12541         cleanups and use decode_compound_collector::release_symbols
12542         instead.
12543         (symtab_collector): Now a class with private fields.
12544         (symtab_collector::release_symtabs): New method.
12545         (add_symtabs_to_list): Rename to...
12546         (symtab_collector::operator()): ... this and adjust.
12547         (collect_symtabs_from_filename): symtab_collector construction
12548         bits move to symtab_collector ctor.  Pass the symtab_collector
12549         object directly as callback.  Remove cleanups and use
12550         symtab_collector::release_symtabs instead.
12551         (collect_symbols): Delete.
12552         (add_matching_symbols_to_info): Use lambdas.
12553         * macrocmd.c (print_macro_callback): Delete.
12554         (info_macro_command): Use a lambda.
12555         (info_macros_command): Pass print_macro_definition as callable
12556         directly.
12557         (print_one_macro): Remove 'ignore' parameter.
12558         (macro_list_command): Adjust.
12559         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12560         (macro_for_each_data::user_data): Delete field.
12561         (foreach_macro): Adjust to call the function_view.
12562         (macro_for_each): Adjust to use function_view as callback type.
12563         (foreach_macro_in_scope): Adjust to call the function_view.
12564         (macro_for_each_in_scope): Adjust to use function_view as callback
12565         type.
12566         * macrotab.h: Include "common/function-view.h".
12567         (macro_callback_fn): Declare a prototype instead of a pointer.
12568         Remove "user_data" parameter.
12569         (macro_for_each, macro_for_each_in_scope): Adjust to use
12570         function_view as callback type.
12571         * psymtab.c (partial_map_expand_apply)
12572         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12573         Adjust to use function_view as callback type and to return bool.
12574         (psym_expand_symtabs_matching): Adjust to use function_view as
12575         callback types.
12576         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12577         to use function_view as callback type and to return bool.
12578         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12579         callback types.
12580         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12581         as callback types.
12582         * symfile.h: Include "common/function-view.h".
12583         (expand_symtabs_file_matcher_ftype)
12584         (expand_symtabs_symbol_matcher_ftype)
12585         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12586         return bool.
12587         (quick_symbol_functions::map_symtabs_matching_filename)
12588         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12589         function_view as callback type and return bool.
12590         (expand_symtabs_matching): Adjust to use function_view as callback
12591         type.
12592         (maintenance_expand_name_matcher)
12593         (maintenance_expand_file_matcher): Delete.
12594         (maintenance_expand_symtabs): Use lambdas.
12595         * symtab.c (iterate_over_some_symtabs): Adjust to use
12596         function_view as callback types and return bool.
12597         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12598         of a cleanup.
12599         (lookup_symtab_callback): Delete.
12600         (lookup_symtab): Use a lambda.
12601         (iterate_over_symbols): Adjust to use function_view as callback
12602         type.
12603         (struct search_symbols_data, search_symbols_file_matches)
12604         (search_symbols_name_matches): Delete.
12605         (search_symbols): Use a pair of lambdas.
12606         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12607         (symtab_expansion_callback): Delete.
12608         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12609         * symtab.h: Include "common/function-view.h".
12610         (iterate_over_some_symtabs): Adjust to use function_view as
12611         callback type and return bool.
12612         (iterate_over_symtabs): Adjust to use function_view as callback
12613         type.
12614         (symbol_found_callback_ftype): Remove 'data' parameter and return
12615         bool.
12616         (iterate_over_symbols): Adjust to use function_view as callback
12617         type.
12618
12619 2017-02-23  Pedro Alves  <palves@redhat.com>
12620
12621         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12622         (%.o) <unittests/%.c>: New pattern.
12623         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12624         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12625         * common/function-view.h: New file.
12626         * unittests/function-view-selftests.c: New file.
12627         * configure: Regenerate.
12628
12629 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12630
12631         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12632         inferior_ptid.
12633         * go32-nat.c (go32_thread_alive): Likewise.
12634
12635 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12636
12637         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12638         delete.
12639
12640 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12641
12642         * varobj.c (varobj_clear_saved_item): Use delete instead of
12643         xfree.
12644         (update_dynamic_varobj_children): Likewise.
12645
12646 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12647
12648         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12649
12650 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12651
12652         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12653         m_enum_value to 0 in default constructor.
12654
12655 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12656
12657         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12658         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12659         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12660         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12661         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12662         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12663         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12664         IS_STORE_CONDITIONAL_INSN.
12665
12666 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12667
12668         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12669
12670 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12671
12672         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12673
12674 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12675
12676         * dwarf2read.c (skip_one_die, read_attribute_value)
12677         (dwarf2_const_value_attr, dump_die_shallow)
12678         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12679         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12680
12681 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12682
12683         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12684         (dwarf_parse_macro_header): Accept DWARF version 5.
12685         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12686
12687 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12688
12689         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12690         DW_AT_GNU_*.
12691         * common/common-exceptions.h (enum errors): Likewise.
12692         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12693         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12694         (dwarf_expr_context::execute_stack_op): Likewise.
12695         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12696         Likewise.
12697         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12698         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12699         (show_entry_values_debug, call_site_to_target_addr)
12700         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12701         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12702         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12703         (value_of_dwarf_block_entry, indirect_pieced_value)
12704         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12705         (disassemble_dwarf_expression): Likewise.
12706         * dwarf2read.c (process_die, inherit_abstract_dies)
12707         (read_call_site_scope): Likewise.
12708         * gdbtypes.h (struct func_type, struct call_site_parameter)
12709         (struct call_site): Likewise.
12710         * stack.c (read_frame_arg): Likewise.
12711         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12712
12713 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12714
12715         * defs.h (read_unsigned_leb128): New declaration.
12716         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12717         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12718         (dwarf2_find_location_expression): Call also
12719         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12720         * dwarf2loc.h (dwarf2_version): New declaration.
12721         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12722         rnglists.
12723         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12724         .debug_rnglists.
12725         (struct dwop_section_names): Add loclists_dwo.
12726         (dwop_section_names): Add .debug_loclists.dwo.
12727         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12728         (struct dwarf2_per_cu_data): Add dwarf_version.
12729         (struct dwo_sections): Add loclists.
12730         (struct attr_abbrev): Add implicit_const.
12731         (read_indirect_line_string): New declaration.
12732         (read_unsigned_leb128): Delete declaration.
12733         (rcuh_kind): New definition.
12734         (read_and_check_comp_unit_head): Change parameter
12735         is_debug_types_section to section_kind.
12736         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12737         (read_comp_unit_head): Change parameter abfd to section, add parameter
12738         section_kind.  Handle DWARF-5.
12739         (error_check_comp_unit_head): Accept also DWARF version 5.
12740         (read_and_check_comp_unit_head): Change parameter
12741         is_debug_types_section to section_kind.
12742         (read_and_check_type_unit_head): Delete function.
12743         (read_abbrev_offset): Handle DWARF-5.
12744         (create_debug_type_hash_table): Add parameter section_kind.  Process
12745         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12746         comp_unit_head.
12747         (create_debug_types_hash_table): Update create_debug_type_hash_table
12748         caller.
12749         (create_all_type_units): Call create_debug_type_hash_table.
12750         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12751         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12752         caller.
12753         (skip_one_die): Handle DW_FORM_implicit_const.
12754         (dwarf2_rnglists_process): New function.
12755         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12756         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12757         (read_attribute_value): Handle DW_FORM_implicit_const,
12758         DW_FORM_line_strp.
12759         (read_attribute): Handle DW_FORM_implicit_const.
12760         (read_indirect_string_at_offset_from): New function from
12761         read_indirect_string_at_offset.
12762         (read_indirect_string_at_offset): Call
12763         read_indirect_string_at_offset_from.
12764         (read_indirect_line_string_at_offset): New function.
12765         (read_indirect_string): New function comment.
12766         (read_indirect_line_string): New function.
12767         (read_unsigned_leb128): Make it global.
12768         (dwarf2_string_attr): Handle DWARF-5.
12769         (add_include_dir_stub, read_formatted_entries): New functions.
12770         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12771         Handle DWARF-5.
12772         (per_cu_header_read_in): Update read_comp_unit_head caller.
12773         (dwarf2_version): New function.
12774         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12775         rnglists.
12776         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12777         fields.
12778
12779 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12780
12781         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12782
12783 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12784
12785         * dwarf2read.c (dwarf2_ranges_process): New function from
12786         dwarf2_ranges_read.
12787         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12788         dwarf2_ranges_process.
12789
12790 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12791
12792         * dwarf2read.c (create_debug_type_hash_table): New function from
12793         create_debug_types_hash_table.
12794         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12795         (create_all_type_units, open_and_init_dwo_file): Update
12796         create_debug_types_hash_table callers.
12797
12798 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12799
12800         PR gdb/16188
12801         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12802         refer to 'ap', not 'args'.
12803
12804 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12805             Pedro Alves  <palves@redhat.com>
12806
12807         PR gdb/16188
12808         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12809         calls succeeded.
12810         * fork-child.c (trace_start_error): New function.
12811         (trace_start_error_with_name): Likewise.
12812         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12813         * inf-ptrace.c (inf_ptrace_me): Likewise.
12814         * inferior.h (trace_start_error): New prototype.
12815         (trace_start_error_with_name): Likewise.
12816
12817 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12818
12819         PR gdb/21164
12820         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12821         NULL before using it.
12822         * symmisc.c (maintenance_print_symbols): Likewise.
12823         (maintenance_print_msymbols): Likewise.
12824
12825 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12826
12827         * NEWS: Add record Python bindings entry.
12828
12829 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12830
12831         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12832         py-record-full.o.
12833         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12834         * python/py-record-btrace.c, python/py-record-btrace.h,
12835         python/py-record-full.c, python/py-record-full.h: New file.
12836         * python/py-record.c: Add include for py-record-btrace.h and
12837         py-record-full.h.
12838         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12839         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12840         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12841         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12842         New definition.
12843         (gdbpy_initialize_btrace): New export.
12844         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12845
12846 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12847
12848         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12849         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12850         * python/py-record.c: New file.
12851         * python/python-internal.h (gdbpy_start_recording,
12852         gdbpy_current_recording, gdpy_stop_recording,
12853         gdbpy_initialize_record): New export.
12854         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12855         (python_GdbMethods): Add gdbpy_start_recording,
12856         gdbpy_current_recording and gdbpy_stop_recording.
12857
12858 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12859
12860         * record-btrace.c (record_btrace_record_method): New function.
12861         (init_record_btrace_ops): Initialize to_record_method.
12862         * record-full.c (record_full_record_method): New function.
12863         (init_record_full_ops, init_record_full_core_ops): Add
12864         record_full_record_method.
12865         * record.h (enum record_method): New enum.
12866         * target-debug.h (target_debug_print_enum_record_method: New define.
12867         * target-delegates.c: Regenerate.
12868         * target.c (target_record_method): New function.
12869         * target.h: Include record.h.
12870         (struct target_ops) <to_record_method>: New field.
12871         (target_record_method): New export.
12872
12873 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12874
12875         * record.h (record_start, record_stop): New export.
12876         * record.c (record_start, record_stop): New function.
12877
12878 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12879
12880         * btrace.c (btrace_fetch): Copy function call segments pointer
12881         into a vector.
12882         (btrace_clear): Clear the vector.
12883         (btrace_find_insn_by_number): Use binary search to find the correct
12884         function call segment.
12885         * btrace.h (brace_fun_p): New typedef.
12886         (struct btrace_thread_info) <functions>: New field.
12887
12888 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12889
12890         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12891         * btrace.c (btrace_decode_error): ... here.  New function.
12892         * btrace.h (btrace_decode_error): New export.
12893
12894 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12895
12896         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12897         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12898         btrace_find_insn_by_number): Remove special case for gaps.
12899         * btrace.h (btrace_insn_get_error): New export.
12900         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12901         * record-btrace.c (btrace_insn_history): Print number for gaps.
12902         (record_btrace_info, record_btrace_goto): Handle gaps.
12903
12904 2017-02-14  Tom Tromey  <tom@tromey.com>
12905
12906         PR python/13598:
12907         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12908         event.
12909         * python/py-evts.c (gdbpy_initialize_py_events): Add
12910         before_prompt registry.
12911         * python/py-events.h (events_object) <before_prompt>: New field.
12912
12913 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12914
12915         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12916
12917 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12918
12919         * symfile (_initialize_symfile): Add usage text to the load command's
12920         help text.
12921
12922 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12923
12924         * utils.c (defaulted_query): Don't query on secondary UIs.
12925
12926 2017-02-10  Tom Tromey  <tom@tromey.com>
12927
12928         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12929
12930 2017-02-10  Tom Tromey  <tom@tromey.com>
12931
12932         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12933         "cleanup" local.
12934         * python/py-type.c (typy_legacy_template_argument): Remove
12935         unnecessary "cleanup" local.
12936
12937 2017-02-10  Tom Tromey  <tom@tromey.com>
12938
12939         * python/python.c (do_start_initialization): New function, from
12940         _initialize_python.
12941         (_initialize_python): Call do_start_initialization.
12942         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12943         goto.
12944
12945 2017-02-10  Tom Tromey  <tom@tromey.com>
12946
12947         * python/py-prettyprint.c (pretty_print_one_value): Use
12948         gdbpy_ref.
12949
12950 2017-02-10  Tom Tromey  <tom@tromey.com>
12951
12952         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12953         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12954         gdbpy_ref.
12955         * python/py-type.c (field_new): Use gdbpy_ref.
12956         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12957         gdbpy_ref.
12958         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12959         (py_free_pspace): Likewise.
12960         (pspace_to_pspace_object): Likewise.
12961         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12962         (py_free_objfile): Likewise.
12963         (objfile_to_objfile_object): Likewise.
12964         * python/py-inferior.c (delete_thread_object): Use
12965         gdbpy_ref.
12966         (infpy_read_memory): Likewise.
12967         (py_free_inferior): Likewise.
12968         * python/py-evtregistry.c (create_eventregistry_object): Use
12969         gdbpy_ref.
12970         * python/py-event.c (create_event_object): Use gdbpy_ref.
12971
12972 2017-02-10  Tom Tromey  <tom@tromey.com>
12973
12974         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12975         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12976         used.
12977         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12978         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12979         python/py-exitedevent.c, python/py-finishbreakpoint.c,
12980         python/py-framefilter.c, python/py-function.c,
12981         python/py-inferior.c, python/py-infevents.c,
12982         python/py-linetable.c, python/py-newobjfileevent.c,
12983         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12984         python/py-signalevent.c, python/py-stopevent.c,
12985         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12986         python/py-unwind.c, python/py-utils.c, python/py-value.c,
12987         python/py-varobj.c, python/py-xmethods.c, python/python.c,
12988         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12989
12990 2017-02-10  Tom Tromey  <tom@tromey.com>
12991
12992         * ui-out.h (ui_out_emit_type): New class.
12993         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12994         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12995         and ui_out_emit_tuple.
12996         (enumerate_locals): Likewise.
12997         (py_mi_print_variables, py_print_locals, py_print_args): Use
12998         ui_out_emit_list.
12999         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13000         ui_out_emit_list.
13001         * common/gdb_optional.h: New file.
13002
13003 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13004
13005         * MAINTAINERS (Write After Approval): Update my e-mail address.
13006
13007 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13008
13009         PR gdb/21122
13010         * breakpoint.c (_initialize_breakpoint): Update the help description
13011         of the 'commands' command to indicate that it takes a list argument.
13012
13013 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13014
13015         * interps.c (current_interp_set_logging): Remove "return".
13016
13017 2017-02-09  Gary Benson  <gbenson@redhat.com>
13018
13019         * symtab.c (add_symtab_completions): Prevent NULL pointer
13020         dereference.
13021
13022 2017-02-08  Pedro Alves  <palves@redhat.com>
13023
13024         * interps.c (interp::interp): Remove reference to quiet_p.
13025         (interp_set): Make static.  Remove dead "Switching to" output
13026         code.
13027         (interp_quiet_p, interp_set_quiet): Delete.
13028         (interpreter_exec_cmd): Don't set the interpreter quiet.
13029         * interps.h (interp_quiet_p): Make static.
13030         (class interp) <quiet_p>: Remove field
13031
13032 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13033
13034         * cli/cli-decode.c (find_command_name_length): Make it extern.
13035         * cli/cli-decode.h (find_command_name_length): Declare.
13036         * cli/cli-script.c (command_name_equals, line_first_arg):
13037         New functions.
13038         (process_next_line): Use cli-decode to parse command names.
13039         (build_command_line): Make args a constant pointer.
13040
13041 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13042
13043         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13044         Remove case-insensitive search.
13045
13046 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13047
13048         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13049         at the end of the line.  Avoids an ARI warning.
13050
13051 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13052
13053         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13054         rdseed instructions.
13055         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13056
13057 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13058
13059         PR tdep/20936
13060         Provide and use sparc32 and sparc64 target description XML files.
13061         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13062         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13063         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13064         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13065         * features/sparc/sparc32-solaris.xml: New file.
13066         * features/sparc/sparc64-solaris.xml: New file.
13067         * features/sparc/sparc32-solaris.c: Generated.
13068         * features/sparc/sparc64-solaris.c: Generated.
13069         * sparc-tdep.h: Account for differences in target descriptions.
13070         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13071         (sparc32_register_type): Use target provided registers.
13072         (validate_tdesc_registers): New function.
13073         (sparc32_gdbarch_init): Use tdesc_has_registers.
13074         Set pseudoregister functions.
13075         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13076         (sparc64_register_type): Use target provided registers.
13077         (sparc64_init_abi): Set pseudoregister functions.
13078
13079 2017-02-03  Tom Tromey  <tom@tromey.com>
13080
13081         PR rust/21097:
13082         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13083         with a single member.
13084
13085 2017-02-03  Pedro Alves  <palves@redhat.com>
13086
13087         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13088         (cli_interp_base::~cli_interp_base): New.
13089         (cli_interp): New struct.
13090         (as_cli_interp): Cast the interp itself to cli_interp.
13091         (cli_interpreter_pre_command_loop): Rename to ...
13092         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13093         parameter.
13094         (cli_interpreter_init): Rename to ...
13095         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13096         boolean.  Make extern.
13097         (cli_interpreter_resume): Rename to ...
13098         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13099         extern.
13100         (cli_interpreter_suspend): Rename to ...
13101         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13102         extern.
13103         (cli_interpreter_exec): Rename to ...
13104         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13105         extern.
13106         (cli_interpreter_supports_command_editing): Rename to ...
13107         (cli_interp_base::supports_command_editing): ... this.  Remove
13108         'interp' parameter.  Make extern.
13109         (cli_ui_out): Rename to ...
13110         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13111         Make extern.
13112         (cli_set_logging): Rename to ...
13113         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13114         parameter.  Make extern.
13115         (cli_interp_procs): Delete.
13116         (cli_interp_factory): Adjust to use "new".
13117         * cli/cli-interp.h: Include "interps.h".
13118         (struct cli_interp_base): New struct.
13119         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13120         (interp_new): Delete.
13121         (interp::interp, interp::~interp): New.
13122         (interp_set): Use bool, and return void.  Assume the interpreter
13123         has suspend, init and resume methods, and that the all return
13124         void.
13125         (set_top_level_interpreter): interp_set returns void.
13126         (interp_ui_out): Adapt.
13127         (current_interp_set_logging): Adapt.
13128         (interp_data): Delete.
13129         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13130         (interp_exec): Adapt.
13131         (top_level_interpreter_data): Delete.
13132         * interps.h (interp_init_ftype, interp_resume_ftype)
13133         (interp_suspend_ftype, interp_exec_ftype)
13134         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13135         (class interp): New.
13136         (interp_new): Delete.
13137         (interp_set): Now returns void.  Use bool.
13138         (interp_data, top_level_interpreter_data): Delete.
13139         * mi/mi-common.h: Include interps.h.
13140         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13141         init, resume, suspect, exec, interp_ui_out, set_logging and
13142         pre_command_loop methods.
13143         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13144         (mi_interpreter_init): Rename to ...
13145         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13146         bool, return void and make extern.  Adjust.
13147         (mi_interpreter_resume): ... Rename to ...
13148         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13149         return void and make extern.  Adjust.
13150         (mi_interpreter_suspend): ... Rename to ...
13151         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13152         return void and make extern.  Adjust.
13153         (mi_interpreter_exec): ... Rename to ...
13154         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13155         extern.  Adjust.
13156         (mi_interpreter_pre_command_loop): ... Rename to ...
13157         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13158         parameter and make extern.
13159         (mi_on_normal_stop_1): Adjust.
13160         (mi_ui_out): Rename to ...
13161         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13162         parameter and make extern.  Adjust.
13163         (mi_set_logging): Rename to ...
13164         (mi_interp::set_logging): ... this.  Remove the 'interp'
13165         parameter and make extern.  Adjust.
13166         (mi_interp_procs): Delete.
13167         (mi_interp_factory): Adjust to use 'new'.
13168         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13169         (mi_print_exception, mi_execute_command, mi_load_progress):
13170         Adjust.
13171         * tui/tui-interp.c (tui_interp): New class.
13172         (as_tui_interp): Return a tui_interp pointer.
13173         (tui_on_normal_stop, tui_on_signal_received)
13174         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13175         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13176         to use interp::interp_ui_out.
13177         (tui_init): Rename to ...
13178         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13179         bool, return void and make extern.  Adjust.
13180         (tui_resume): Rename to ...
13181         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13182         return void and make extern.  Adjust.
13183         (tui_suspend): Rename to ...
13184         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13185         return void and make extern.  Adjust.
13186         (tui_ui_out): Rename to ...
13187         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13188         parameter, and make extern.  Adjust.
13189         (tui_exec): Rename to ...
13190         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13191         make extern.
13192         (tui_interp_procs): Delete.
13193         (tui_interp_factory): Use "new".
13194
13195 2017-02-02  Tom Tromey  <tom@tromey.com>
13196
13197         * rust-exp.y (ends_raw_string, space_then_number)
13198         (rust_identifier_start_p): Return bool.
13199         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13200         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13201         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13202         (rust_chartype_p): Return bool.
13203         (val_print_struct, rust_print_struct_def, rust_print_type):
13204         Update.
13205         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13206         Return bool.
13207
13208 2017-02-02  Tom Tromey  <tom@tromey.com>
13209
13210         * rust-lang.c: Reindent.
13211
13212 2017-02-02  Tom Tromey  <tom@tromey.com>
13213
13214         * rust-lang.h (rust_crate_for_block): Update.
13215         * rust-lang.c (rust_crate_for_block): Return std::string.
13216         (rust_get_disr_info): Use std:;string, not
13217         gdb::unique_xmalloc_ptr.
13218         * rust-exp.y (crate_name): Update.
13219
13220 2017-02-02  Pedro Alves  <palves@redhat.com>
13221
13222         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13223         field out of gdb_disassembler_test and make it static.
13224
13225 2017-02-02  Pedro Alves  <palves@redhat.com>
13226
13227         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13228         mi1_interp and mi_interp fields.
13229
13230 2017-02-02  Pedro Alves  <palves@redhat.com>
13231
13232         * cli/cli-interp.c (struct saved_output_files, saved_output):
13233         Moved from cli/cli-logging.c.
13234         (cli_set_logging): New function.
13235         (cli_interp_procs): Install cli_set_logging.
13236         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13237         Declare.
13238         * cli/cli-logging.c (struct saved_output_files, saved_output):
13239         Moved to cli/cli-interp.c.
13240         (pop_output_files): Don't save outputs here.
13241         (make_logging_output): New function.
13242         (handle_redirections): Don't build tee nor save previous outputs
13243         here.
13244         * interps.c (current_interp_set_logging): Change prototype.
13245         Assume there's always a set_logging_proc method installed.
13246         * interps.h (interp_set_logging_ftype): Change prototype.
13247         (current_interp_set_logging): Change prototype and adjust comment.
13248         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13249         use make_logging_output.
13250         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13251 2017-02-02  Pedro Alves  <palves@redhat.com>
13252
13253         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13254         from ...
13255         (set_logging_overwrite): ... here.
13256         (logging_no_redirect_file): Delete.
13257         (set_logging_redirect): Don't handle redirection on the fly.
13258         Instead warn that "logging off" / "logging on" is necessary.
13259         (pop_output_files): Delete references to logging_no_redirect_file.
13260         (show_logging_command): Always speak in terms of what will happen
13261         once logging is reenabled.
13262
13263 2017-02-02  Pedro Alves  <palves@redhat.com>
13264
13265         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13266
13267 2017-02-02  Pedro Alves  <palves@redhat.com>
13268
13269         * disasm.c (gdb_pretty_print_insn): Rename to ...
13270         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13271         Remove gdbarch parameter.  Adapt to clear the object's buffers
13272         instead of allocating new buffers, and to print using the object's
13273         gdb_disassembler instead of calling gdb_print_insn.
13274         (dump_insns): Use gdb_pretty_print_disassembler.
13275         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13276         (gdb_pretty_print_disassembler): New class.
13277         * record-btrace.c (btrace_insn_history): Use
13278         gdb_pretty_print_disassembler.
13279
13280 2017-02-02  Pedro Alves  <palves@redhat.com>
13281
13282         * ada-lang.c (type_as_string): Use string_file.
13283         * ada-valprint.c (ada_print_floating): Use string_file.
13284         * ada-varobj.c (ada_varobj_scalar_image)
13285         (ada_varobj_get_value_image): Use string_file.
13286         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13287         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13288         * breakpoint.c (update_inserted_breakpoint_locations)
13289         (insert_breakpoint_locations, reattach_breakpoints)
13290         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13291         (print_it_watchpoint): Use string_file.
13292         (save_breakpoints): Use stdio_file.
13293         * c-exp.y (oper): Use string_file.
13294         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13295         tee_file.
13296         (pop_output_files): Use delete.
13297         (handle_redirections): Use stdio_file and tee_file.
13298         * cli/cli-setshow.c (do_show_command): Use string_file.
13299         * compile/compile-c-support.c (c_compute_program): Use
13300         string_file.
13301         * compile/compile-c-symbols.c (generate_vla_size): Take a
13302         'string_file &' instead of a 'ui_file *'.
13303         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13304         of a 'ui_file *'.  Use string_file.
13305         (generate_c_for_variable_locations): Take a 'string_file &'
13306         instead of a 'ui_file *'.
13307         * compile/compile-internal.h (generate_c_for_for_one_variable):
13308         Take a 'string_file &' instead of a 'ui_file *'.
13309         * compile/compile-loc2c.c (push, pushf, unary, binary)
13310         (print_label, pushf_register_address, pushf_register)
13311         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13312         'ui_file *'.  Adjust.
13313         * compile/compile.c (compile_to_object): Use string_file.
13314         * compile/compile.h (compile_dwarf_expr_to_c)
13315         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13316         'ui_file *'.
13317         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13318         (replace_typedefs_qualified_name): Use string_file and
13319         obstack_copy0.
13320         * disasm.c (gdb_pretty_print_insn): Use string_file.
13321         (gdb_disassembly): Adjust reference the null_stream global.
13322         (do_ui_file_delete): Delete.
13323         (gdb_insn_length): Use null_stream.
13324         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13325         * dwarf2loc.c (dwarf2_compile_property_to_c)
13326         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13327         'string_file &' instead of a 'ui_file *'.
13328         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13329         * dwarf2read.c (do_ui_file_peek_last): Delete.
13330         (dwarf2_compute_name): Use string_file.
13331         * event-top.c (gdb_setup_readline): Use stdio_file.
13332         * gdbarch.sh (verify_gdbarch): Use string_file.
13333         * gdbtypes.c (safe_parse_type): Use null_stream.
13334         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13335         string_file.
13336         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13337         'string_file *' instead of a 'ui_file *'.
13338         (gdbscm_arch_disassemble): Use string_file.
13339         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13340         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13341         inherits from ui_file.
13342         (ioscm_file_port_delete, ioscm_file_port_rewind)
13343         (ioscm_file_port_put): Delete.
13344         (ioscm_file_port_write): Rename to ...
13345         (ioscm_file_port::write): ... this.  Remove file_port_magic
13346         checks.
13347         (ioscm_file_port_new): Delete.
13348         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13349         ui_file_up.
13350         * guile/scm-type.c (tyscm_type_name): Use string_file.
13351         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13352         Use string_file.
13353         * infcmd.c (print_return_value_1): Use string_file.
13354         * infrun.c (print_target_wait_results): Use string_file.
13355         * language.c (add_language): Use string_file.
13356         * location.c (explicit_to_string_internal): Use string_file.
13357         * main.c (captured_main_1): Use null_file.
13358         * maint.c (maintenance_print_architecture): Use stdio_file.
13359         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13360         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13361         event_channel>: Change type to mi_console_file pointer.
13362         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13363         (mi_console_file_delete): Delete.
13364         (struct mi_console_file): Delete.
13365         (mi_console_file_magic): Delete.
13366         (mi_console_file_new): Delete.
13367         (mi_console_file::mi_console_file): New.
13368         (mi_console_file_delete): Delete.
13369         (mi_console_file_fputs): Delete.
13370         (mi_console_file::write): New.
13371         (mi_console_raw_packet): Delete.
13372         (mi_console_file::flush): New.
13373         (mi_console_file_flush): Delete.
13374         (mi_console_set_raw): Rename to ...
13375         (mi_console_file::set_raw): ... this.
13376         * mi/mi-console.h (class mi_console_file): New class.
13377         (mi_console_file_new, mi_console_set_raw): Delete.
13378         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13379         (mi_set_logging): Use delete and tee_file.  Adjust.
13380         * mi/mi-main.c (output_register): Use string_file.
13381         (mi_cmd_data_evaluate_expression): Use string_file.
13382         (mi_cmd_data_read_memory): Use string_file.
13383         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13384         * mi/mi-out.c (mi_ui_out::main_stream): New.
13385         (mi_ui_out::rewind): Use main_stream and
13386         string_file.
13387         (mi_ui_out::put): Use main_stream and string_file.
13388         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13389         Allocate a 'string_file' instead.
13390         (mi_out_new): Don't allocate a mem_fileopen stream here.
13391         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13392         (mi_ui_out::main_stream): Declare method.
13393         * printcmd.c (eval_command): Use string_file.
13394         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13395         * python/py-arch.c (archpy_disassemble): Use string_file.
13396         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13397         * python/py-frame.c (frapy_str): Use string_file.
13398         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13399         Use string_file.
13400         * python/py-type.c (typy_str): Use string_file.
13401         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13402         * python/py-value.c (valpy_str): Use string_file.
13403         * record-btrace.c (btrace_insn_history): Use string_file.
13404         * regcache.c (regcache_print): Use stdio_file.
13405         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13406         * remote.c (escape_buffer): Use string_file.
13407         * rust-lang.c (rust_get_disr_info): Use string_file.
13408         * serial.c (serial_open_ops_1): Use stdio_file.
13409         (do_serial_close): Use delete.
13410         * stack.c (print_frame_arg): Use string_file.
13411         (print_frame_args): Remove local mem_fileopen stream, not used.
13412         (print_frame): Use string_file.
13413         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13414         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13415         Take a 'string_file *' instead of a 'ui_file *'.
13416         * top.c (new_ui): Use stdio_file and stderr_file.
13417         (free_ui): Use delete.
13418         (execute_command_to_string): Use string_file.
13419         (quit_confirm): Use string_file.
13420         * tracepoint.c (collection_list::append_exp): Use string_file.
13421         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13422         * tui/tui-file.c: Don't include "ui-file.h".
13423         (enum streamtype, struct tui_stream): Delete.
13424         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13425         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13426         (tui_file::tui_file): New method.
13427         (tui_file_fputs): Delete.
13428         (tui_file_get_strbuf): Delete.
13429         (tui_file::puts): New method.
13430         (tui_file_adjust_strbuf): Delete.
13431         (tui_file_flush): Delete.
13432         (tui_file::flush): New method.
13433         * tui/tui-file.h: Tweak intro comment.
13434         Include ui-file.h.
13435         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13436         (tui_file_adjust_strbuf): Delete declarations.
13437         (class tui_file): New class.
13438         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13439         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13440         (tui_register_format): Use string_stream.
13441         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13442         (tui_get_function_from_frame): Use string_file.
13443         * typeprint.c (type_to_string): Use string_file.
13444         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13445         (null_stream): New global.
13446         (ui_file_delete): Delete.
13447         (ui_file::ui_file): New.
13448         (null_file_isatty): Delete.
13449         (ui_file::~ui_file): New.
13450         (null_file_rewind): Delete.
13451         (ui_file::printf): New.
13452         (null_file_put): Delete.
13453         (null_file_flush): Delete.
13454         (ui_file::putstr): New.
13455         (null_file_write): Delete.
13456         (ui_file::putstrn): New.
13457         (null_file_read): Delete.
13458         (ui_file::putc): New.
13459         (null_file_fputs): Delete.
13460         (null_file_write_async_safe): Delete.
13461         (ui_file::vprintf): New.
13462         (null_file_delete): Delete.
13463         (null_file::write): New.
13464         (null_file_fseek): Delete.
13465         (null_file::puts): New.
13466         (ui_file_data): Delete.
13467         (null_file::write_async_safe): New.
13468         (gdb_flush, ui_file_isatty): Adjust.
13469         (ui_file_put, ui_file_rewind): Delete.
13470         (ui_file_write): Adjust.
13471         (ui_file_write_for_put): Delete.
13472         (ui_file_write_async_safe, ui_file_read): Adjust.
13473         (ui_file_fseek): Delete.
13474         (fputs_unfiltered): Adjust.
13475         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13476         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13477         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13478         (set_ui_file_data): Delete.
13479         (string_file::~string_file, string_file::write)
13480         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13481         (do_ui_file_as_string, ui_file_as_string): Delete.
13482         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13483         (struct mem_file): Delete.
13484         (mem_file_new): Delete.
13485         (stdio_file::stdio_file): New.
13486         (mem_file_delete): Delete.
13487         (stdio_file::stdio_file): New.
13488         (mem_fileopen): Delete.
13489         (stdio_file::~stdio_file): New.
13490         (mem_file_rewind): Delete.
13491         (stdio_file::set_stream): New.
13492         (mem_file_put): Delete.
13493         (stdio_file::open): New.
13494         (mem_file_write): Delete.
13495         (stdio_file_magic, struct stdio_file): Delete.
13496         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13497         (stdio_file::flush): New.
13498         (stdio_file_read): Rename to ...
13499         (stdio_file::read): ... this.  Adjust.
13500         (stdio_file_write): Rename to ...
13501         (stdio_file::write): ... this.  Adjust.
13502         (stdio_file_write_async_safe): Rename to ...
13503         (stdio_file::write_async_safe) ... this.  Adjust.
13504         (stdio_file_fputs): Rename to ...
13505         (stdio_file::puts) ... this.  Adjust.
13506         (stdio_file_isatty): Delete.
13507         (stdio_file_fseek): Delete.
13508         (stdio_file::isatty): New.
13509         (stderr_file_write): Rename to ...
13510         (stderr_file::write) ... this.  Adjust.
13511         (stderr_file_fputs): Rename to ...
13512         (stderr_file::puts) ... this.  Adjust.
13513         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13514         (stderr_file::stderr_file): New.
13515         (tee_file_magic): Delete.
13516         (struct tee_file): Delete.
13517         (tee_file::tee_file): New.
13518         (tee_file_new): Delete.
13519         (tee_file::~tee_file): New.
13520         (tee_file_delete): Delete.
13521         (tee_file_flush): Rename to ...
13522         (tee_file::flush): ... this.  Adjust.
13523         (tee_file_write): Rename to ...
13524         (tee_file::write): ... this.  Adjust.
13525         (tee_file::write_async_safe): New.
13526         (tee_file_fputs): Rename to ...
13527         (tee_file::puts): ... this.  Adjust.
13528         (tee_file_isatty): Rename to ...
13529         (tee_file::isatty): ... this.  Adjust.
13530         * ui-file.h (struct obstack, struct ui_file): Don't
13531         forward-declare.
13532         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13533         (ui_file_write_ftype)
13534         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13535         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13536         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13537         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13538         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13539         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13540         (set_ui_file_fseek): Delete.
13541         (ui_file_data, ui_file_delete, ui_file_rewind)
13542         (struct ui_file): New.
13543         (ui_file_up): New.
13544         (class null_file): New.
13545         (null_stream): Declare.
13546         (ui_file_write_for_put, ui_file_put): Delete.
13547         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13548         Delete.
13549         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13550         (gdb_fopen, tee_file_new): Delete.
13551         (struct string_file): New.
13552         (struct stdio_file): New.
13553         (stdio_file_up): New.
13554         (struct stderr_file): New.
13555         (class tee_file): New.
13556         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13557         of a 'ui_file *'.  Adjust.
13558         * ui-out.h (class ui_out) <field_stream>: Likewise.
13559         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13560         (null_stream): Delete.
13561         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13562         Adjust.
13563         * utils.h (struct ui_file): Delete forward declaration..
13564         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13565         (error_stream): Take a 'string_file &' instead of a
13566         'ui_file *'.
13567         * varobj.c (varobj_value_get_print_value): Use string_file.
13568         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13569         * gdbarch.c: Regenerate.
13570
13571 2017-02-02  Pedro Alves  <palves@redhat.com>
13572
13573         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13574         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13575         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13576         Adjust to call gdb_print_insn instead of
13577         gdb_disassembler::print_insn.
13578         (dump_insns, do_mixed_source_and_assembly_deprecated)
13579         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13580         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13581         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13582         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13583         declaration.
13584         (gdb_pretty_print_insn): Re-add declaration.
13585         * record-btrace.c (btrace_insn_history): Don't allocate a
13586         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13587
13588 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13589
13590         * disasm.h (gdb_disassembly): Remove file_string parameter.
13591         * disasm.c (gdb_disassembly): Likewise.
13592         * cli/cli-cmds.c (print_disassembly): Adapt.
13593         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13594         * stack.c (do_gdb_disassembly): Likewise.
13595
13596 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13597
13598         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13599         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13600         targets.  And if the implicit value is longer than needed, extract
13601         the first bytes instead of the "least significant" ones.
13602
13603 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13604
13605         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13606         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13607         (btrace_fetch): Assert can_access_registers_ptid.
13608         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13609         validate_registers_access.
13610
13611 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13612
13613         * gdbthread.h (can_access_registers_ptid): New.
13614         * thread.c (can_access_registers_ptid): New.
13615
13616 2017-02-01  Pedro Alves  <palves@redhat.com>
13617
13618         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13619
13620 2017-01-31  Pedro Alves  <palves@redhat.com>
13621
13622         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13623         Fix typos.
13624
13625 2017-01-31  Pedro Alves  <palves@redhat.com>
13626
13627         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13628         not used.
13629
13630 2017-01-31  Pedro Alves  <palves@redhat.com>
13631
13632         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13633
13634 2017-01-31  Pedro Alves  <palves@redhat.com>
13635
13636         * common/scoped_restore.h
13637         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13638         change the value's parameter type to T2.
13639         (make_scoped_restore): Likewise.
13640
13641 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13642             Richard Henderson  <rth@redhat.com>
13643
13644         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13645         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13646         GS_BASE for older kernels.
13647         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13648         GS_BASE for older kernels.
13649         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13650         and GS_BASE to the offset table.
13651         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13652         system register group.
13653         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13654         for older kernels.
13655         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13656         amd64 ABI.
13657         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13658         AMD64_GSBASE_REGNUM.
13659         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13660         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13661         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13662         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13663         i386/64bit-segments.xml in those rules.
13664         * features/i386/64bit-segments.xml: New file.
13665         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13666         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13667         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13668         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13669         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13670         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13671         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13672         * features/i386/amd64-avx-linux.c: Regenerated.
13673         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13674         * features/i386/amd64-avx-mpx.c: Regenerated.
13675         * features/i386/amd64-avx512-linux.c: Regenerated.
13676         * features/i386/amd64-linux.c: Regenerated.
13677         * features/i386/amd64-mpx-linux.c: Regenerated.
13678         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13679         * features/i386/i386-avx-mpx.c: Regenerated.
13680         * features/i386/x32-avx-linux.c: Regenerated.
13681         * features/i386/x32-avx512-linux.c: Regenerated.
13682         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13683         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13684         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13685         * regformats/i386/amd64-linux.dat: Regenerated.
13686         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13687         * regformats/i386/x32-avx-linux.dat: Regenerated.
13688         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13689         * regformats/i386/x32-linux.dat: Regenerated.
13690
13691 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13692
13693         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13694         Set to AMD64_NUM_REGS.
13695
13696 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13697
13698         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13699         that checks validity of a register number.
13700
13701 2017-01-27  Kees Cook  <keescook@google.com>
13702
13703         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13704         fetch_fpregs if target has fpa registers.
13705         (arm_linux_store_inferior_registers): Call store_fpregs if target
13706         has fpa registers.
13707
13708 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13709
13710         * cris-tdep.c (cris_gdbarch_init): Remove check for
13711         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13712
13713 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13714
13715         * corelow.c (get_core_register_section): Check for regset
13716         existence before checking for REGSET_VARIABLE_SIZE.
13717
13718 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13719             Pedro Alves  <palves@redhat.com>
13720
13721         PR gdb/20939
13722         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13723         call memory_error, save memaddr instead.
13724         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13725         negative, cal memory_error.
13726         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13727
13728 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13729
13730         * disasm-selftests.c (memory_error_test): New function.
13731         (_initialize_disasm_selftests): Register memory_error_test.
13732
13733 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13734
13735         * Makefile.in (SFILES): Add disasm-selftests.c and
13736         selftest-arch.c.
13737         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13738         * disasm-selftests.c: New file.
13739         * selftest-arch.c: New file.
13740         * selftest-arch.h: New file.
13741
13742 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13743
13744         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13745         to bfd_arch_mep.  Don't return 0 if section is not
13746         found.  Call print_insn_mep.
13747
13748 2017-01-26  Pedro Alves  <palves@redhat.com>
13749             Yao Qi  <yao.qi@linaro.org>
13750
13751         * arm-tdep.c: Include "disasm.h".
13752         (gdb_print_insn_arm): Update code to get gdbarch.
13753         * disasm.c (dis_asm_read_memory): Change it to
13754         gdb_disassembler::dis_asm_read_memory.
13755         (dis_asm_memory_error): Likewise.
13756         (dis_asm_print_address): Likewise.
13757         (gdb_pretty_print_insn): Change it to
13758         gdb_disassembler::pretty_print_insn.
13759         (dump_insns): Add one argument gdb_disassemlber.  All
13760         callers updated.
13761         (do_mixed_source_and_assembly_deprecated): Likewise.
13762         (do_mixed_source_and_assembly): Likewise.
13763         (do_assembly_only): Likewise.
13764         (gdb_disassembler::gdb_disassembler): New.
13765         (gdb_disassembler::print_insn): New.
13766         * disasm.h (class gdb_disassembler): New.
13767         (gdb_pretty_print_insn): Remove declaration.
13768         (gdb_disassemble_info): Likewise.
13769         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13770         (gdbscm_disasm_read_memory_worker): Update.
13771         (gdbscm_disasm_read_memory): Update.
13772         (gdbscm_disasm_memory_error): Remove.
13773         (gdbscm_disasm_print_address): Remove.
13774         (gdbscm_disassembler::gdbscm_disassembler): New.
13775         (gdbscm_print_insn_from_port): Update.
13776         * mips-tdep.c: Include disasm.h.
13777         (gdb_print_insn_mips): Update code to get gdbarch.
13778         * record-btrace.c (btrace_insn_history): Update.
13779         * spu-tdep.c: Include disasm.h.
13780         (struct spu_dis_asm_data): Remove.
13781         (struct spu_dis_asm_info): New.
13782         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13783         SPU id.
13784         (gdb_print_insn_spu): Cast disassemble_info to
13785         spu_dis_asm_info.
13786
13787 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13788
13789         * disasm.c (do_ui_file_delete): Delete.
13790         (gdb_insn_length): Move code creating stream to ...
13791         * utils.c (null_stream): ... here.  New function.
13792         * utils.h (null_stream): Declare.
13793
13794 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13795
13796         * python/py-inferior.c (find_thread_object): Return directly
13797         from the loop.  Remove "found" variable.
13798
13799 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13800
13801         GDB 7.12.1 released.
13802
13803 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13804
13805         * python/py-function.c (fnpy_call): Reorder declarations to have
13806         the gdbpy_enter object declared first.
13807         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13808
13809 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13810
13811         PR python/21068
13812         * python/python-internal.h (PyMem_RawMalloc): Define for
13813         Python < 3.4.
13814         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13815         PyMem_RawMalloc instead of PyMem_Malloc.
13816
13817 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13818             Luis Machado  <lgustavo@codesourcery.com>
13819
13820         * NEWS (New commands): Mention flash-erase.
13821         (New MI commands): Mention target-flash-erase.
13822         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13823         command.
13824         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13825         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13826         * target.c (flash_erase_command): New function.
13827         (initialize_targets): Add new flash-erase command.
13828         * target.h (flash_erase_command): New declaration.
13829
13830 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13831
13832         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13833         HAVE_SYS_PROCFS_H is defined.
13834
13835 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13836
13837         * remote.c (struct cached_reg): Change data into a pointer.
13838         * (stop_reply_dtr): Free data pointers before deleting vector.
13839         (process_stop_reply): Likewise.
13840         (remote_parse_stop_reply): Allocate space for data
13841
13842 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13843
13844         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13845         MAX_REGISTER_SIZE.
13846         (amd64_pseudo_register_read_value): Likewise.
13847         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13848         (store_register_using_P): Likewise.
13849         * regcache.c (regcache_xfer_part): Likewise.
13850
13851 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13852
13853         Split real and pseudo registers.
13854         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13855         (sparc32_pseudo_regnum): New enum.
13856         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13857         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13858         (SPARC32_CP0_REGISTERS): New macro.
13859         (sparc32_pseudo_register_name): New function.
13860         (sparc32_register_name): Use sparc32_pseudo_register_name.
13861         (sparc32_pseudo_register_type): New function.
13862         (sparc32_register_type): Use sparc32_pseudo_register_type.
13863         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13864         pseudo register numbers.
13865         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13866         (SPARC64_CP0_REGISTERS): New macro.
13867         (sparc64_pseudo_register_name): New function.
13868         (sparc64_register_name): Use sparc64_pseudo_register_name.
13869         (sparc64_pseudo_register_type): New function.
13870         (sparc64_register_type): Use sparc64_pseudo_register_type.
13871         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13872         pseudo register numbers.
13873         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13874         sparc64_store_arguments): Handle pseudo register numbers.
13875
13876 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13877
13878         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13879         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13880         output.
13881         (getpkt_or_notif_sane_1): Likewise.
13882
13883 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13884
13885         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13886         of CC.  Pass "-x c++-header" instead of "-x c".
13887
13888 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13889
13890         * remote.c (remote_can_async_p): Update comment.
13891
13892 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13893
13894         * linux-nat.c (linux_nat_can_async_p): Update comment.
13895
13896 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13897
13898         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13899
13900 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13901
13902         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13903
13904 2017-01-10  Tom Tromey  <tom@tromey.com>
13905
13906         * python/py-type.c (typy_legacy_template_argument): Update.
13907         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13908         ~demangle_parse_info): Declare new members.
13909         (cp_demangled_name_to_comp): Return unique_ptr.
13910         (cp_demangled_name_parse_free)
13911         (make_cleanup_cp_demangled_name_parse_free)
13912         (cp_new_demangle_parse_info): Remove.
13913         * cp-support.c (do_demangled_name_parse_free_cleanup)
13914         (make_cleanup_cp_demangled_name_parse_free): Remove.
13915         (inspect_type, cp_canonicalize_string_full)
13916         (cp_canonicalize_string): Update.
13917         (mangled_name_to_comp): Change return type.
13918         (cp_class_name_from_physname, method_name_from_physname)
13919         (cp_func_name, cp_remove_params): Update.
13920         * cp-name-parser.y (demangle_parse_info): New constructor, from
13921         cp_new_demangle_parse_info.
13922         (~demangle_parse_info): New destructor, from
13923         cp_demangled_name_parse_free.
13924         (cp_merge_demangle_parse_infos): Update.
13925         (cp_demangled_name_to_comp): Change return type.
13926
13927 2017-01-10  Tom Tromey  <tom@tromey.com>
13928
13929         * top.c (prevent_dont_repeat): Change return type.
13930         * python/python.c (execute_gdb_command): Use std::string.
13931         Update.
13932         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13933         * command.h (prevent_dont_repeat): Change return type.
13934         * breakpoint.c (bpstat_do_actions_1): Update.
13935
13936 2017-01-10  Tom Tromey  <tom@tromey.com>
13937
13938         * value.h (scoped_value_mark::~scoped_value_mark): Call
13939         free_to_mark.
13940         (scoped_value_mark::free_to_mark): New method.
13941         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13942         scoped_value_mark.
13943
13944 2017-01-10  Tom Tromey  <tom@tromey.com>
13945
13946         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13947         (valpy_reference_value, valpy_const_value, valpy_get_address)
13948         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13949         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13950         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13951         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13952         scoped_value_mark.
13953         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13954         * value.h (scoped_value_mark): New class.
13955
13956 2017-01-10  Tom Tromey  <tom@tromey.com>
13957
13958         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13959         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13960         * psymtab.c (discard_psymtabs_upto): Remove.
13961         (make_cleanup_discard_psymtabs): Remove.
13962         (struct psymtab_state): Remove.
13963
13964 2017-01-10  Tom Tromey  <tom@tromey.com>
13965
13966         * record-full.c (record_full_save_cleanups): Remove.
13967         (record_full_save): Use gdb::unlinker.
13968         * gcore.c (do_bfd_delete_cleanup): Remove.
13969         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13970         cleanups.
13971         * dwarf2read.c (unlink_if_set): Remove.
13972         (write_psymtabs_to_index): Use gdb::unlinker.
13973         * common/gdb_unlinker.h: New file.
13974
13975 2017-01-10  Tom Tromey  <tom@tromey.com>
13976
13977         * windows-tdep.c (windows_xfer_shared_library): Update.
13978         * windows-nat.c (windows_make_so): Update.
13979         * utils.h (make_cleanup_bfd_unref): Remove.
13980         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13981         * symfile.h (symfile_bfd_open)
13982         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13983         * symfile.c (read_symbols, symbol_file_add)
13984         (separate_debug_file_exists): Update.
13985         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13986         (generic_load, reread_symbols): Update.
13987         * symfile-mem.c (symbol_file_add_from_memory): Update.
13988         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13989         (spu_symbol_file_add_from_memory): Update.
13990         * solist.h (struct target_so_ops) <bfd_open>: Return
13991         gdb_bfd_ref_ptr.
13992         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13993         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13994         gdb_bfd_ref_ptr.
13995         (solib_map_sections, reload_shared_libraries_1): Update.
13996         * solib-svr4.c (enable_break): Update.
13997         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13998         * solib-frv.c (enable_break2): Update.
13999         * solib-dsbt.c (enable_break): Update.
14000         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14001         gdb_bfd_ref_ptr.
14002         (darwin_solib_get_all_image_info_addr_at_init): Update.
14003         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14004         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14005         * record-full.c (record_full_save): Update.
14006         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14007         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14008         * minidebug.c (find_separate_debug_file_in_section): Return
14009         gdb_bfd_ref_ptr.
14010         * machoread.c (macho_add_oso_symfile): Change abfd to
14011         gdb_bfd_ref_ptr.
14012         (macho_symfile_read_all_oso): Update.
14013         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14014         (macho_symfile_read): Update.
14015         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14016         (jit_bfd_try_read_symtab): Update.
14017         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14018         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14019         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14020         gdb_bfd_ref_ptr.
14021         (gdb_bfd_ref_policy): New struct.
14022         (gdb_bfd_ref_ptr): New typedef.
14023         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14024         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14025         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14026         gdb_bfd_ref_ptr.
14027         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14028         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14029         (gcore_command): Update.
14030         * exec.c (exec_file_attach): Update.
14031         * elfread.c (elf_symfile_read): Update.
14032         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14033         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14034         (open_and_init_dwo_file): Update.
14035         (open_dwp_file): Return gdb_bfd_ref_ptr.
14036         (open_and_init_dwp_file): Update.
14037         * corelow.c (core_open): Update.
14038         * compile/compile-object-load.c (compile_object_load): Update.
14039         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14040         * coffread.c (coff_symfile_read): Update.
14041         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14042         gdb_bfd_ref_ptr.  Rename.
14043         (dump_bfd_file, restore_command): Update.
14044         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14045         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14046         (find_separate_debug_file_by_buildid): Update.
14047
14048 2017-01-10  Tom Tromey  <tom@tromey.com>
14049
14050         * common/gdb_ref_ptr.h: New file.
14051         * python/py-ref.h (struct gdbpy_ref_policy): New.
14052         (gdbpy_ref): Now a typedef.
14053
14054 2017-01-10  Tom Tromey  <tom@tromey.com>
14055
14056         * utils.h (make_cleanup_htab_delete): Don't declare.
14057         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14058         Remove.
14059         * linespec.c (decode_compound_collector): Add constructor,
14060         destructor.
14061         (lookup_prefix_sym): Remove cleanup.
14062         (symtab_collector): Add constructor, destructor.
14063         (collect_symtabs_from_filename): Remove cleanup.
14064         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14065         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14066         Use htab_up.
14067         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14068         * dwarf2read.c (dw2_expand_symtabs_matching)
14069         (dw2_map_symbol_filenames, dwarf_decode_macros)
14070         (write_psymtabs_to_index): Use htab_up.
14071         * dwarf2loc.c (func_verify_no_selftailcall)
14072         (call_site_find_chain_1, func_verify_no_selftailcall)
14073         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14074         std::vector, gdb::unique_xmalloc_ptr.
14075         (call_sitep): Remove typedef.
14076         (dwarf2_locexpr_baton_eval): Remove unused variable.
14077
14078 2017-01-10  Tom Tromey  <tom@tromey.com>
14079
14080         * python/python-internal.h (make_cleanup_py_decref)
14081         (make_cleanup_py_xdecref): Don't declare.
14082         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14083         (py_xdecref, make_cleanup_py_xdecref): Remove.
14084
14085 2017-01-10  Tom Tromey  <tom@tromey.com>
14086
14087         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14088         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14089
14090 2017-01-10  Tom Tromey  <tom@tromey.com>
14091
14092         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14093
14094 2017-01-10  Tom Tromey  <tom@tromey.com>
14095
14096         * python/py-utils.c (unicode_to_encoded_string)
14097         (python_string_to_target_string)
14098         (python_string_to_target_python_string)
14099         (python_string_to_host_string, gdbpy_obj_to_string)
14100         (get_addr_from_python): Use gdbpy_ref.
14101
14102 2017-01-10  Tom Tromey  <tom@tromey.com>
14103
14104         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14105         gdbpy_ref.
14106
14107 2017-01-10  Tom Tromey  <tom@tromey.com>
14108
14109         * python/python.c (eval_python_command, gdbpy_decode_line)
14110         (gdbpy_run_events, gdbpy_start_type_printers)
14111         (gdbpy_apply_type_printers): Use gdbpy_ref.
14112
14113 2017-01-10  Tom Tromey  <tom@tromey.com>
14114
14115         * python/py-param.c (get_doc_string, compute_enum_values): Use
14116         gdbpy_ref.
14117
14118 2017-01-10  Tom Tromey  <tom@tromey.com>
14119
14120         * python/py-inferior.c (find_thread_object, build_inferior_list):
14121         Use gdbpy_ref.
14122
14123 2017-01-10  Tom Tromey  <tom@tromey.com>
14124
14125         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14126
14127 2017-01-10  Tom Tromey  <tom@tromey.com>
14128
14129         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14130         gdbpy_ref.
14131
14132 2017-01-10  Tom Tromey  <tom@tromey.com>
14133
14134         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14135         extra incref.
14136         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14137         Use gdbpy_ref.
14138
14139 2017-01-10  Tom Tromey  <tom@tromey.com>
14140
14141         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14142         gdbpy_ref.
14143
14144 2017-01-10  Tom Tromey  <tom@tromey.com>
14145
14146         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14147         decref results of PyArg_ParseTupleAndKeywords.
14148
14149 2017-01-10  Tom Tromey  <tom@tromey.com>
14150
14151         * python/python.c (python_run_simple_file): Use
14152         unique_xmalloc_ptr, gdbpy_ref.
14153
14154 2017-01-10  Tom Tromey  <tom@tromey.com>
14155
14156         * python/py-prettyprint.c (print_stack_unless_memory_error)
14157         (print_string_repr, print_children): Use gdbpy_ref.
14158         (dummy_python_frame): New class.
14159         (dummy_python_frame::dummy_python_frame): Rename from
14160         push_dummy_python_frame.
14161         (py_restore_tstate): Remove.
14162
14163 2017-01-10  Tom Tromey  <tom@tromey.com>
14164
14165         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14166
14167 2017-01-10  Tom Tromey  <tom@tromey.com>
14168
14169         * python/python.c (ensure_python_env, restore_python_env):
14170         Remove.
14171         * python/python-internal.h (ensure_python_env): Don't declare.
14172         * varobj.h (varobj_ensure_python_env): Don't declare.
14173         * varobj.c (varobj_ensure_python_env): Remove.
14174
14175 2017-01-10  Tom Tromey  <tom@tromey.com>
14176
14177         * varobj.c (varobj_value_get_print_value): Use
14178         gdbpy_enter_varobj.
14179
14180 2017-01-10  Tom Tromey  <tom@tromey.com>
14181
14182         * python/py-prettyprint.c (print_string_repr, print_children):
14183         Update.
14184         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14185         of "encoding".
14186         * varobj.c (varobj_value_get_print_value): Update.
14187         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14188
14189 2017-01-10  Tom Tromey  <tom@tromey.com>
14190
14191         * varobj.c (varobj_get_display_hint)
14192         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14193         (varobj_set_visualizer, free_variable): Use
14194         gdbpy_enter_varobj.
14195
14196 2017-01-10  Tom Tromey  <tom@tromey.com>
14197
14198         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14199         (do_finish_initialization): New function.  Use gdbpy_ref.
14200         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14201         do_finish_initialization.
14202
14203 2017-01-10  Tom Tromey  <tom@tromey.com>
14204
14205         * python/py-param.c (get_set_value, get_show_value): Use
14206         gdbpy_enter, gdbpy_ref.
14207
14208 2017-01-10  Tom Tromey  <tom@tromey.com>
14209
14210         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14211
14212 2017-01-10  Tom Tromey  <tom@tromey.com>
14213
14214         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14215
14216 2017-01-10  Tom Tromey  <tom@tromey.com>
14217
14218         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14219         Use gdbpy_enter_varobj.
14220
14221 2017-01-10  Tom Tromey  <tom@tromey.com>
14222
14223         * varobj.c (gdbpy_enter_varobj): New constructor.
14224         * python/python-internal.h (gdbpy_enter_varobj): New class.
14225         * python/py-varobj.c (py_varobj_get_iterator): Use
14226         gdbpy_enter_varobj.
14227
14228 2017-01-10  Tom Tromey  <tom@tromey.com>
14229
14230         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14231         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14232         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14233         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14234         unique_xmalloc_ptr.
14235         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14236
14237 2017-01-10  Tom Tromey  <tom@tromey.com>
14238
14239         * python/py-xmethods.c (invoke_match_method): Use
14240         gdbpy_ref.
14241
14242 2017-01-10  Tom Tromey  <tom@tromey.com>
14243
14244         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14245         gdbpy_enter, gdbpy_ref.
14246
14247 2017-01-10  Tom Tromey  <tom@tromey.com>
14248
14249         * python/python.c (python_interactive_command): Use gdbpy_enter.
14250
14251 2017-01-10  Tom Tromey  <tom@tromey.com>
14252
14253         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14254         gdbpy_ref.
14255
14256 2017-01-10  Tom Tromey  <tom@tromey.com>
14257
14258         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14259         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14260
14261 2017-01-10  Tom Tromey  <tom@tromey.com>
14262
14263         * utils.h (htab_deleter): New struct.
14264         (htab_up): New typedef.
14265         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14266         gdbpy_enter, gdbpy_ref, htab_up.
14267
14268 2017-01-10  Tom Tromey  <tom@tromey.com>
14269
14270         * python/py-unwind.c (pending_frame_invalidate): Remove.
14271         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14272
14273 2017-01-10  Tom Tromey  <tom@tromey.com>
14274
14275         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14276         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14277
14278 2017-01-10  Tom Tromey  <tom@tromey.com>
14279
14280         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14281
14282 2017-01-10  Tom Tromey  <tom@tromey.com>
14283
14284         * python/python.c (gdbpy_eval_from_control_command)
14285         (gdbpy_source_script, gdbpy_run_events)
14286         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14287         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14288         gdbpy_enter.
14289
14290 2017-01-10  Tom Tromey  <tom@tromey.com>
14291
14292         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14293
14294 2017-01-10  Tom Tromey  <tom@tromey.com>
14295
14296         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14297
14298 2017-01-10  Tom Tromey  <tom@tromey.com>
14299
14300         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14301         (python_on_inferior_call_pre, python_on_inferior_call_post)
14302         (python_on_memory_change, python_on_register_change)
14303         (python_inferior_exit, python_new_objfile, add_thread_object)
14304         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14305
14306 2017-01-10  Tom Tromey  <tom@tromey.com>
14307
14308         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14309         (bpfinishpy_handle_exit): Use gdbpy_enter.
14310
14311 2017-01-10  Tom Tromey  <tom@tromey.com>
14312
14313         * python/py-cmd.c (cmdpy_destroyer)
14314         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14315         gdbpy_enter.
14316
14317 2017-01-10  Tom Tromey  <tom@tromey.com>
14318
14319         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14320         gdbpy_enter.
14321         (gdbpy_breakpoint_has_cond): Likewise.
14322
14323 2017-01-10  Tom Tromey  <tom@tromey.com>
14324
14325         * python/python.c (gdbpy_enter): New constructor.
14326         (~gdbpy_enter): New destructor.
14327         (restore_python_env, ensure_python_env): Rewrite.
14328         * python/python-internal.h (gdbpy_enter): New class.
14329
14330 2017-01-10  Tom Tromey  <tom@tromey.com>
14331
14332         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14333
14334 2017-01-10  Tom Tromey  <tom@tromey.com>
14335
14336         * python/py-value.c (value_has_field, get_field_flag)
14337         (get_field_type, valpy_getitem, convert_value_from_python): Use
14338         gdbpy_ref.
14339
14340 2017-01-10  Tom Tromey  <tom@tromey.com>
14341
14342         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14343         gdbpy_ref.
14344
14345 2017-01-10  Tom Tromey  <tom@tromey.com>
14346
14347         * python/py-prettyprint.c (search_pp_list)
14348         (find_pretty_printer_from_objfiles)
14349         (find_pretty_printer_from_progspace)
14350         (find_pretty_printer_from_gdb, find_pretty_printer)
14351         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14352         gdbpy_ref.
14353
14354 2017-01-10  Tom Tromey  <tom@tromey.com>
14355
14356         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14357
14358 2017-01-10  Tom Tromey  <tom@tromey.com>
14359
14360         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14361         (ltpy_get_all_source_lines): Use gdbpy_ref.
14362
14363 2017-01-10  Tom Tromey  <tom@tromey.com>
14364
14365         * python/py-framefilter.c (extract_sym, extract_value)
14366         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14367         gdbpy_ref.
14368
14369 2017-01-10  Tom Tromey  <tom@tromey.com>
14370
14371         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14372
14373 2017-01-10  Tom Tromey  <tom@tromey.com>
14374
14375         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14376
14377 2017-01-10  Tom Tromey  <tom@tromey.com>
14378
14379         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14380         gdbpy_ref.
14381
14382 2017-01-10  Tom Tromey  <tom@tromey.com>
14383
14384         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14385
14386 2017-01-10  Tom Tromey  <tom@tromey.com>
14387
14388         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14389         (typy_range): Use gdbpy_ref.
14390
14391 2017-01-10  Tom Tromey  <tom@tromey.com>
14392
14393         * python/py-threadevent.c (create_thread_event_object): Use
14394         gdbpy_ref.
14395         * python/py-stopevent.c (create_stop_event_object): Simplify.
14396         (emit_stop_event): Use gdbpy_ref.
14397         * python/py-signalevent.c (create_signal_event_object): Use
14398         gdbpy_ref.
14399         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14400         (emit_new_objfile_event, create_clear_objfiles_event_object)
14401         (emit_clear_objfiles_event): Use gdbpy_ref.
14402         * python/py-infevents.c (create_inferior_call_event_object)
14403         (create_register_changed_event_object)
14404         (create_memory_changed_event_object, emit_inferior_call_event)
14405         (emit_memory_changed_event, emit_register_changed_event): Use
14406         gdbpy_ref.
14407         * python/py-exitedevent.c (create_exited_event_object)
14408         (emit_exited_event): Use gdbpy_ref.
14409         * python/py-event.h (evpy_emit_event): Remove
14410         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14411         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14412         * python/py-continueevent.c (emit_continue_event): Use
14413         gdbpy_ref.
14414         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14415         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14416         gdbpy_ref.
14417         * python/py-bpevent.c (create_breakpoint_event_object): Use
14418         gdbpy_ref.
14419
14420 2017-01-10  Tom Tromey  <tom@tromey.com>
14421
14422         * python/py-ref.h: New file.
14423
14424 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14425
14426         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14427         void.
14428         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14429         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14430         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14431         * ui-out.c (ui_out::redirect): Likewise.
14432         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14433         * cli/cli-logging.c (set_logging_redirect): Update call site of
14434         ui_out::redirect.
14435         (handle_redirections): Likewise.
14436         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14437         * top.c (execute_command_to_string): Likewise.
14438         * utils.c (do_ui_out_redirect_pop): Likewise.
14439
14440 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14441
14442         * stack.c (_initialize_stack): Update "frame" command help message.
14443
14444 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14445
14446         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14447
14448 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14449
14450         * x86-linux-nat.h: Include gdb_proc_service.h.
14451
14452 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14453
14454         * ser-base.h: Include serial.h.
14455
14456 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14457
14458         * ppc-linux-tdep.h: Include ppc-tdep.h.
14459
14460 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14461
14462         * nat/amd64-linux-siginfo.h: Include signal.h.
14463
14464 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14465
14466         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14467
14468 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14469
14470         * mi/mi-parse.h: Include mi-cmds.h.
14471
14472 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14473
14474         * inf-loop.c: Don't include "target.h".
14475         * inf-loop.h: Include it here.
14476
14477 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14478
14479         * dfp.h: Include "dboulest.h" and "expression.h".
14480
14481 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14482
14483         * ax-gdb.h: Include "ax.h".
14484
14485 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14486
14487         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14488         with nat/gdb_ptrace.h.
14489
14490 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14491
14492         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14493         new line.
14494         (mips64_fbsd_sigframe_init): Likewise.
14495
14496 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14497
14498         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14499         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14500
14501 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14502
14503         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14504         * NEWS: Mention new FreeBSD/mips native configuration.
14505         * config/mips/fbsd.mh: New file.
14506         * configure.host: Add mips*-*-freebsd*.
14507         * mips-fbsd-nat.c: New file.
14508
14509 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14510
14511         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14512         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14513         * NEWS: Mention new FreeBSD/mips target.
14514         * configure.tgt: Add mips*-*-freebsd*.
14515         * mips-fbsd-tdep.c: New file.
14516         * mips-fbsd-tdep.h: New file.
14517
14518 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14519
14520         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14521         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14522
14523 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14524
14525         Update copyright year range in all GDB files.
14526
14527 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14528
14529         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14530
14531 For older changes see ChangeLog-2016.
14532 \f
14533 Local Variables:
14534 mode: change-log
14535 left-margin: 8
14536 fill-column: 74
14537 version-control: never
14538 coding: utf-8
14539 End: