Target FP: Perform Ada fixed-point scaling in target format
[external/binutils.git] / gdb / ChangeLog
1 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
4         (cast_from_fixed): Likewise.
5         (ada_scaling_type): New function.
6         (ada_delta): Return value instead of DOUBLEST.  Perform target
7         arithmetic instead of host arithmetic.
8         (scaling_factor): Rename to ...
9         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
10         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
11         (ada_fixed_to_float): Remove.
12         (ada_float_to_fixed): Remove.
13         * ada-lang.h (ada_fixed_to_float): Remove.
14         (ada_float_to_fixed): Remove.
15         (ada_delta): Return value instead of DOUBLEST.
16         (ada_scaling_factor): Add prototype.
17
18         * ada-typeprint.c: Include "target-float.h".
19         (print_fixed_point_type): Perform target arithmetic instead of
20         host arithmetic.
21         * ada-valprint.c: Include "target-float.h".
22         (ada_val_print_num): Perform target arithmetic instead of
23         host arithmetic for fixed-point types.
24
25 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
26
27         * target-float.c: Include <math.h>.
28         (floatformat_binop): New function.
29         (floatformat_compare): Likewise.
30         (target_float_binop): Likewise.
31         (target_float_compare): Likewise.
32         * target-float.h: Include "expression.h".
33         (target_float_binop): Add prototype.
34         (target_float_compare): Likewise.
35
36         * valarith.c: Do not include "doublest.h" and "dfp.h".
37         Include "common/byte-vector.h".
38         (value_args_as_decimal): Remove, replace by ...
39         (value_args_as_target_float): ... this function.  Handle both
40         binary and decimal target floating-point formats.
41         (scalar_binop): Handle both binary and decimal FP using
42         value_args_as_target_float and target_float_binop.
43         (value_equal): Handle both binary and decimal FP using
44         value_args_as_target_float and target_float_compare.
45         (value_less): Likewise.
46         (value_pos): Handle all scalar types as simple copy.
47         (value_neg): Handle all scalar types via BINOP_SUB from 0.
48         * dfp.c (decimal_binop): Throw error instead of internal_error
49         when called with an unsupported operation code.
50
51 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
52
53         * target-float.c (target_float_to_string): New function.
54         (target_float_from_string): New function.
55         * target-float.h (target_float_to_string): Add prototype.
56         (target_float_from_string): Add prototype.
57
58         * valprint.c: Include "target-float.h".  Do not include
59         "doublest.h" and "dfp.h".
60         (print_floating): Use target_float_to_string.
61         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
62         (printf_floating): Use target_float_to_string.
63         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
64         (print_i387_value): Use target_float_to_string.
65         * mips-tdep.c: Include "target-float.h".
66         (mips_print_fp_register): Use target_float_to_string.
67         * sh64-tdep.c: Include "target-float.h".
68         (sh64_do_fp_register): Use target_float_to_string.
69
70         * parse.c: Include "target-float.h".  Do not include
71         "doublest.h" and "dfp.h".
72         (parse_float): Use target_float_from_string.
73         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
74         (define_symbol): Use target_float_from_string.
75         * gdbarch-selftests.c: Include "target-float.h".
76         (register_to_value_test): Use target_float_from_string.
77
78 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
79
80         * Makefile.c (SFILES): Add target-float.c.
81         (HFILES_NO_SRCDIR): Add target-float.h.
82         (COMMON_OBS): Add target-float.o.
83         * target-float.h: New file.
84         * target-float.c: New file.
85
86         * doublest.c (floatformat_classify): Fix detection of float_zero.
87
88         * gdbtypes.c (is_floating_type): New function.
89         * gdbtypes.h (is_floating_type): Add prototype.
90
91         * value.c: Do not include "floatformat.h".
92         (unpack_double): Use target_float_is_valid.
93         (is_floating_value): New function.
94         * value.h (is_floating_value): Add prototype-
95
96         * valarith.c: Include "target-float.h".
97         (value_logical_not): Use target_float_is_zero.
98
99         * python/py-value.c: Include "target-float.h".
100         (valpy_nonzero): Use target_float_is_zero.
101
102 2017-11-04  Tom Tromey  <tom@tromey.com>
103
104         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
105
106 2017-11-04  Tom Tromey  <tom@tromey.com>
107
108         * breakpoint.c (set_momentary_breakpoint): Return
109         breakpoint_up.
110         (until_break_command): Update.
111         (new_until_break_fsm): Change argument types to
112         breakpoint_up.
113         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
114         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
115         Remove.
116         * infcmd.c (finish_forward): Update.
117         * breakpoint.h (set_momentary_breakpoint)
118         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
119         (make_cleanup_delete_breakpoint): Remove.
120         (struct breakpoint_deleter): New.
121         (breakpoint_up): New typedef.
122         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
123         (insert_exception_resume_breakpoint): Update.
124         (insert_exception_resume_from_probe): Update.
125         (insert_longjmp_resume_breakpoint): Update.
126         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
127         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
128         * infcall.c (call_function_by_hand_dummy): Update
129
130 2017-11-04  Tom Tromey  <tom@tromey.com>
131
132         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
133
134 2017-11-04  Tom Tromey  <tom@tromey.com>
135
136         * linux-tdep.c (linux_core_info_proc_mappings): Use
137         gdb::def_vector.
138         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
139         "size" argument.
140         (linux_corefile_thread): Update.
141         (linux_make_corefile_notes): Remove unused variable.
142
143 2017-11-04  Tom Tromey  <tom@tromey.com>
144
145         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
146         gdb::byte_vector.
147
148 2017-11-04  Tom Tromey  <tom@tromey.com>
149
150         * objfiles.c (do_free_objfile_cleanup): Remove.
151         * compile/compile-object-load.c (compile_object_load): Update.
152         * objfiles.h (make_cleanup_free_objfile): Remove.
153
154 2017-11-04  Tom Tromey  <tom@tromey.com>
155
156         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
157         (adi_read_versions): Change "tags" to "gdb_byte *".
158         (adi_print_versions): Likewise.
159
160 2017-11-04  Tom Tromey  <tom@tromey.com>
161
162         * breakpoint.c
163         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
164         from start_rbreak_breakpoints.
165         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
166         * breakpoint.h (class scoped_rbreak_breakpoints): New.
167         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
168         * symtab.c (do_end_rbreak_breakpoints): Remove.
169         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
170
171 2017-11-04  Tom Tromey  <tom@tromey.com>
172
173         * cp-namespace.c (reset_directive_searched): Remove.
174         (cp_lookup_symbol_via_imports): Use scoped_restore.
175         * cp-support.c (reset_directive_searched): Remove.
176         (make_symbol_overload_list_using): Use scoped_restore.
177         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
178         (reset_directive_searched): Remove.
179
180 2017-11-04  Tom Tromey  <tom@tromey.com>
181
182         * symfile.c (find_separate_debug_file_by_debuglink): Use
183         unique_xmalloc_ptr.
184
185 2017-11-04  Tom Tromey  <tom@tromey.com>
186
187         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
188         type of "info".
189         (compute_stack_depth): Likewise.
190         (do_compile_dwarf_expr_to_c): Use std::vector.
191
192 2017-11-04  Tom Tromey  <tom@tromey.com>
193
194         * compile/compile-object-load.c (link_callbacks_einfo): Use
195         std::string.
196
197 2017-11-04  Tom Tromey  <tom@tromey.com>
198
199         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
200         Use scoped_free_pendings.
201         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
202         scoped_free_pendings.
203         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
204         (xcoff_initial_scan): Likewise.
205         * buildsym.c (reset_symtab_globals): Update comment.
206         (scoped_free_pendings): Rename from really_free_pendings.
207         (prepare_for_building): Update comment.
208         (buildsym_init): Likewise.
209         * buildsym.h (class scoped_free_pendings): New class.
210         (really_free_pendings): Don't declare.
211
212 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
213
214         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
215         output when converting a zero value to a special byteorder format.
216
217 2017-11-02  Yao Qi  <yao.qi@linaro.org>
218
219         * frame.c (do_frame_register_read): Remove aspace.
220         * jit.c (jit_frame_sniffer): Likwise.
221         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
222         * regcache.c (regcache::regcache): Pass nullptr.
223         (regcache_print): Caller updated.
224         * regcache.h (regcache::regcache): Remove one constructor
225         parameter aspace.
226
227 2017-11-02  Yao Qi  <yao.qi@linaro.org>
228
229         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
230
231 2017-11-02  Yao Qi  <yao.qi@linaro.org>
232
233         * breakpoint.c (insert_single_step_breakpoints): Update.
234         * frame.c (struct frame_info) <aspace>: Add const.
235         (frame_save_as_regcache): Add const.
236         (get_frame_address_space): Return const address_space *.
237         * frame.h (get_frame_address_space): Update declaration.
238         * infrun.c (struct step_over_info) <aspace>: Add const.
239         (set_step_over_info): Make aspace const.
240         (displaced_step_prepare_throw): Change variable const.
241         (resume): Likewise.
242         (proceed): Likewise.
243         (adjust_pc_after_break): Likewise.
244         (save_waitstatus): Likewise.
245         (handle_signal_stop): Likewise.
246         (keep_going_pass_signal): Likewise.
247         * jit.c (jit_frame_sniffer): Add const.
248         * mips-tdep.c (mips_single_step_through_delay): Likewise.
249         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
250         * record-full.c (record_full_wait_1): Likewise.
251         * regcache.c (regcache::regcache): Change parameter to const.
252         * regcache.h (regcache::regcache): Likewise.
253         (regcache::aspace): Return const address_space *.
254         (regcache) <m_aspace>: Add const.
255
256 2017-11-02  Yao Qi  <yao.qi@linaro.org>
257
258         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
259         * frame.c (create_sentinel_frame): Likewise.
260         * infrun.c (displaced_step_prepare_throw): Likewise.
261         (resume): Likewise.
262         (thread_still_needs_step_over_bp): Likewise.
263         (proceed): Likewise.
264         (do_target_wait): Likewise.
265         (adjust_pc_after_break): Likewise.
266         (handle_syscall_event): Likewise.
267         (save_waitstatus): Likewise.
268         (handle_inferior_event_1): Likewise.
269         (handle_signal_stop): Likewise.
270         (keep_going_pass_signal): Likewise.
271         * linux-nat.c (status_callback): Likewise.
272         (save_stop_reason): Likewise.
273         (resume_stopped_resumed_lwps): Likewise.
274         * record-full.c (record_full_exec_insn): Likewise.
275         (record_full_wait_1): Likewise.
276         * regcache.c (get_regcache_aspace): Remove.
277         * regcache.h (get_regcache_aspace): Remove.
278
279 2017-11-02  Yao Qi  <yao.qi@linaro.org>
280
281         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
282         (init_regcache_descr): Use gdbarch_num_regs.
283         (regcache::regcache): Likewise.
284         (regcache::get_register_status): Likewise.
285         (regcache::assert_raw_regnum): Likewise.
286         (regcache::cooked_read): Likewise.
287         (regcache::cooked_read_value): Likewise.
288         (regcache::cooked_write): Likewise.
289         (regcache::dump): Likewise.
290         (regcache::num_raw_registers): New method.
291         * regcache.h (class regcache) <num_raw_registers>: New.
292
293 2017-11-02  Yao Qi  <yao.qi@linaro.org>
294
295         * regcache.c (regcache::assert_regnum): New method.
296         (regcache::invalidate): Call assert_regnum.
297         (regcache::raw_update): Likewise.
298         (regcache::raw_write): Likewise.
299         (regcache::raw_read_part): Likewise.
300         (regcache::raw_write_part): Likewise.
301         (regcache::raw_supply): Likewise.
302         (regcache::raw_supply_integer): Likewise.
303         (regcache::raw_supply_zeroed): Likewise.
304         (regcache::raw_collect): Likewise.
305         (regcache::raw_collect_integer): Likewise.
306         * regcache.h (regcache::assert_regnum): Declare.
307
308 2017-11-02  Yao Qi  <yao.qi@linaro.org>
309
310         * regcache.c (regcache::dump): Remove code.
311
312 2017-11-02  Yao Qi  <yao.qi@linaro.org>
313
314         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
315         Remove.
316         <sizeof_cooked_register_status>: Remove.
317         (init_regcache_descr): Update.
318         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
319         (regcache::save): Likewise.
320         (regcache::dump): Likewise.
321
322 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
323
324         * ft32-tdep.c (ft32_fetch_instruction): New function.
325         (ft32_analyze_prologue): Use ft32_fetch_instruction().
326
327 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
328
329         * cli/cli-script.c (execute_control_command): Rename to ...
330         (execute_control_command_1): ... this.
331         (execute_control_command): New function.
332
333 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
334
335         * tracepoint.c (tfind_command): Remove const_cast.
336
337 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
338
339         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
340
341 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
342
343         * common/common-utils.h (in_inclusive_range): New function.
344         * arm-tdep.c (arm_record_extension_space): Use
345         in_inclusive_range.
346         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
347         * cris-tdep.c (cris_spec_reg_applicable): Use
348         in_inclusive_range.
349
350 2017-10-30  Pedro Alves  <palves@redhat.com>
351             Simon Marchi <simon.marchi@ericsson.com>
352
353         * remote.c (remote_set_syscall_catchpoint): Build a std::string
354         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
355
356 2017-10-30  Pedro Alves  <palves@redhat.com>
357
358         * common/common-utils.c (string_appendf, string_vappendf): New
359         functions.
360         * common/common-utils.h (string_appendf, string_vappendf): New
361         declarations.
362         * unittests/common-utils-selftests.c (string_appendf_func)
363         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
364         (string_vappendf_tests): New functions.
365         (_initialize_common_utils_selftests): Register "string_appendf" and
366         "string_vappendf tests".
367
368 2017-10-30  Pedro Alves  <palves@redhat.com>
369
370         * unittests/common-utils-selftests.c (format_func): New typedef.
371         (string_printf_tests, string_vprintf_tests): Tests factored out
372         and merged to ...
373         (test_format_func): ... this new function.
374         (string_printf_tests, string_vprintf_tests): Reimplement on top of
375         test_format_func.
376
377 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
378
379         * darwin-nat.c: Remove include of gdb.h.
380
381 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
382
383         * xtensa-xtregs.c: Fix formatting issues.
384
385 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
386
387         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
388
389 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
390
391         PR python/21213
392         * python/py-infthread.c (thpy_get_inferior): Increment reference
393         of inferior before returning it.
394
395 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
396
397         * unittests/common-utils-selftests.c (format): Add
398         ATTRIBUTE_PRINTF.
399
400 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
401
402         * xml-syscall.c (struct syscall_desc): Add constructor.
403         <name>: Change type to std::string.
404         (syscall_desc_up): New typedef.
405         (syscall_desc_p): Remove typeder.
406         (DEF_VEC_P(syscall_desc_p)): Remove.
407         (struct syscall_group_desc): Add constructor.
408         <name>: Change type to std::string.
409         <syscalls>: Change type to std::vector.
410         (syscall_group_desc_up): New typedef.
411         (syscall_group_desc_p): Remove typedef.
412         (DEF_VEC_P(syscall_group_desc_p)): Remove.
413         (struct syscalls_info) <syscalls>: Change type to std::vector of
414         unique_ptr.
415         <groups>: Likewise.
416         <my_gdb_datadir>: Change type to std::string.
417         (syscalls_info_up): New typedef.
418         (allocate_syscalls_info): Remove.
419         (syscalls_info_free_syscalls_desc): Remove.
420         (syscalls_info_free_syscall_group_desc): Remove.
421         (free_syscalls_info): Remove.
422         (make_cleanup_free_syscalls_info): Remove.
423         (syscall_group_create_syscall_group_desc): Adjust.
424         (syscall_group_add_syscall): Adjust.
425         (syscall_create_syscall_desc): Adjust.
426         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
427         (init_syscalls_info): Adjust.
428         (syscall_group_get_group_by_name): Adjust.
429         (xml_get_syscall_number): Adjust.
430         (xml_get_syscall_name): Adjust.
431         (xml_list_of_syscalls): Adjust.
432         (xml_list_syscalls_by_group): Adjust.
433         (xml_list_of_groups): Adjust.
434
435 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
436
437         * probe.h: Don't include gdb_vecs.h.
438         (DEF_VEC_P (probe_p)): Remove.
439         (find_probes_in_objfile): Return an std::vector.
440         * probe.c (find_probes_in_objfile): Likewise.
441         * breakpoint.c (breakpoint_objfile_data)
442         <longjmp_probes>: Change type to std::vector.
443         <exception_probes>: Likewise.
444         (free_breakpoint_probes): Don't manually free vectors.
445         (create_longjmp_master_breakpoint): Adjust.
446         (create_exception_master_breakpoint): Adjust.
447         * solib-svr4.c (svr4_create_probe_breakpoints): Change
448         parameter type, adjust.
449         (svr4_create_solib_event_breakpoints): Adjust.
450
451 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
452
453         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
454         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
455         with new.
456         (free_breakpoint_probes): Rename to ...
457         (free_breakpoint_objfile_data): ... this, and call delete on
458         bp_objfile_data..
459
460 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
461
462         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
463         (loaded_script_ptr): Remove typedef.
464         (DEF_VEC_P (loaded_script_ptr)): Remove.
465         (struct collect_matching_scripts_data): Add constructor.
466         <scripts_p>: Change type to (pointer to) std::vector.
467         (collect_matching_scripts_data): Adjust.
468         (sort_scripts_by_name): Make suitable for std::sort.
469         (print_scripts): Don't sort vector, adjust to std::vector.
470         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
471
472 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
473
474         * symfile.c (filename_language): Make struct, not typedef.  Add
475         constructor.
476         <ext>: Change type to std::string.
477         (DEF_VEC_O (filename_language)): Remove.
478         (filename_language_table): Change type to std::vector.
479         (add_filename_language): Adjust.
480         (set_ext_lang_command): Adjust.
481         (info_ext_lang_command): Adjust.
482         (deduce_language_from_filename): Adjust.
483         (class scoped_restore_filename_language_table): Remove.
484         (test_filename_language): Use scoped_restore.
485         (test_set_ext_lang_command): Use scoped_restore, adjust to
486         std::vector change.
487
488 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
489
490         * symfile.c: Include selftest.h.
491         (class scoped_restore_filename_language_table): New.
492         (test_filename_language): New test.
493         (test_set_ext_lang_command): New test.
494         (_initialize_symfile): Register tests.
495
496 2017-10-27  Keith Seitz  <keiths@redhat.com>
497
498         * breakpoint.c (print_breakpoint_location): Use the symbol saved
499         in the bp_location, falling back to find_pc_sect_function when
500         needed.
501         (add_location_to_breakpoint): Save sal->symbol.
502         * breakpoint.h (struct bp_location) <symbol>: New field.
503         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
504         * symtab.h (struct symtab_and_line) <symbol>: New field.
505
506 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
507
508         PR gdb/13669
509         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
510         to rewind obstack.
511
512 2017-10-26  Pedro Alves  <palves@redhat.com>
513
514         * remote.c (remote_async_terminal_ours_p): Delete.
515         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
516         Remove references to 'remote_async_terminal_ours_p'.
517
518 2017-10-26  Yao Qi  <yao.qi@linaro.org>
519
520         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
521
522 2017-10-26  Yao Qi  <yao.qi@linaro.org>
523
524         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
525         aspace const.
526         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
527         Likewise.
528         * breakpoint.c (bpstat_check_location): Remove cast.
529         (breakpoint_hit_catch_fork): Make aspce const.
530         (breakpoint_hit_catch_solib): Likewise.
531         (breakpoint_hit_catch_exec): Likewise.
532         (breakpoint_hit_ranged_breakpoint): Likewise.
533         (breakpoint_hit_watchpoint): Likewise.
534         (base_breakpoint_breakpoint_hit): Likewise.
535         (bkpt_breakpoint_hit): Likewise.
536         (dprintf_breakpoint_hit): Likewise.
537         (tracepoint_breakpoint_hit): Likewise.
538         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
539
540 2017-10-26  Yao Qi  <yao.qi@linaro.org>
541
542         * breakpoint.c (breakpoint_location_address_match): Change
543         "struct address_space *" to "const address_space".
544         (breakpoint_location_address_range_overlap): Likewise.
545         (breakpoint_here_p): Likewise.
546         (breakpoint_in_range_p): Likewise.
547         (moribund_breakpoint_here_p): Likewise.
548         (bp_location_inserted_here_p): Likewise.
549         (software_breakpoint_inserted_here_p): Likewise.
550         (hardware_breakpoint_inserted_here_p): Likewise.
551         (hardware_watchpoint_inserted_in_range): Likewise.
552         (bpstat_check_location): Likewise.
553         (bpstat_stop_status): Likewise.
554         (breakpoint_address_match): Likewise.
555         (breakpoint_address_match_range): Likewise.
556         (breakpoint_location_address_match): Likewise.
557         (breakpoint_location_address_range_overlap): Likewise.
558         (insert_single_step_breakpoint): Likewise.
559         (breakpoint_has_location_inserted_here): Likewise.
560         (single_step_breakpoint_inserted_here_p): Likewise.
561         (pc_at_non_inline_function): Likewise.
562         * breakpoint.h (bpstat_stop_status): Update declaration.
563         (breakpoint_here_p): Likewise.
564         (breakpoint_in_range_p): Likewise.
565         (moribund_breakpoint_here_p): Likewise.
566         (breakpoint_inserted_here_p): Likewise.
567         (software_breakpoint_inserted_here_p): Likewise.
568         (hardware_breakpoint_inserted_here_p): Likewise.
569         (breakpoint_has_location_inserted_here): Likewise.
570         (single_step_breakpoint_inserted_here_p): Likewise.
571         (hardware_watchpoint_inserted_in_range): Likewise.
572         (breakpoint_address_match): Likewise.
573         (insert_single_step_breakpoint): Likewise.
574         (pc_at_non_inline_function): Likewise.
575         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
576         * record.c (record_check_stopped_by_breakpoint): Likewise.
577         * record.h (record_check_stopped_by_breakpoint): Likewise.
578         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
579
580 2017-10-25  Yao Qi  <yao.qi@linaro.org>
581
582         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
583         regcache->arch () instead get_regcache_arch.
584         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
585         Likewise.
586         (aarch64_fbsd_store_inferior_registers): Likewise.
587         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
588         (store_gregs_to_thread): Likewise.
589         (fetch_fpregs_from_thread): Likewise.
590         (store_fpregs_to_thread): Likewise.
591         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
592         (aarch64_store_return_value): Likewise.
593         (aarch64_software_single_step): Likewise.
594         * aix-thread.c (aix_thread_wait): Likewise.
595         (supply_reg32): Likewise.
596         (supply_sprs64): Likewise.
597         (supply_sprs32): Likewise.
598         (fill_gprs64): Likewise.
599         (fill_gprs32): Likewise.
600         (fill_sprs64): Likewise.
601         (fill_sprs32): Likewise.
602         (store_regs_user_thread): Likewise.
603         (store_regs_kernel_thread): Likewise.
604         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
605         (alphabsd_store_inferior_registers): Likewise.
606         * alpha-tdep.c (alpha_extract_return_value): Likewise.
607         (alpha_store_return_value): Likewise.
608         (alpha_deal_with_atomic_sequence): Likewise.
609         (alpha_next_pc): Likewise.
610         (alpha_software_single_step): Likewise.
611         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
612         (amd64bsd_store_inferior_registers): Likewise.
613         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
614         Likewise.
615         (amd64_linux_store_inferior_registers): Likewise.
616         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
617         (amd64_collect_native_gregset): Likewise.
618         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
619         (amd64obsd_collect_uthread): Likewise.
620         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
621         (amd64_collect_fpregset): Likewise.
622         (amd64_supply_fxsave): Likewise.
623         (amd64_supply_xsave): Likewise.
624         (amd64_collect_fxsave): Likewise.
625         (amd64_collect_xsave): Likewise.
626         * arc-tdep.c (arc_write_pc): Likewise.
627         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
628         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
629         (arm_fbsd_store_inferior_registers): Likewise.
630         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
631         (store_vfp_regs): Likewise.
632         (arm_linux_fetch_inferior_registers): Likewise.
633         (arm_linux_store_inferior_registers): Likewise.
634         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
635         (arm_linux_sigreturn_next_pc): Likewise.
636         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
637         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
638         (fetch_register): Likewise.
639         (store_register): Likewise.
640         * arm-tdep.c (arm_is_thumb): Likewise.
641         (displaced_in_arm_mode): Likewise.
642         (bx_write_pc): Likewise.
643         (arm_get_next_pcs_addr_bits_remove): Likewise.
644         (arm_software_single_step): Likewise.
645         (arm_extract_return_value): Likewise.
646         (arm_store_return_value): Likewise.
647         (arm_write_pc): Likewise.
648         * bfin-tdep.c (bfin_extract_return_value): Likewise.
649         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
650         (bsd_uthread_store_registers): Likewise.
651         * core-regset.c (fetch_core_registers): Likewise.
652         * corelow.c (get_core_registers): Likewise.
653         * cris-tdep.c (cris_store_return_value): Likewise.
654         (cris_extract_return_value): Likewise.
655         (find_step_target): Likewise.
656         (find_step_target): Likewise.
657         (cris_software_single_step): Likewise.
658         * ctf.c (ctf_fetch_registers): Likewise.
659         * darwin-nat.c (cancel_breakpoint): Likewise.
660         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
661         * frv-tdep.c (frv_extract_return_value): Likewise.
662         * ft32-tdep.c (ft32_store_return_value): Likewise.
663         (ft32_extract_return_value): Likewise.
664         * go32-nat.c (fetch_register): Likewise.
665         (go32_fetch_registers): Likewise.
666         (go32_store_registers): Likewise.
667         (store_register): Likewise.
668         * h8300-tdep.c (h8300_extract_return_value): Likewise.
669         (h8300_store_return_value): Likewise.
670         * hppa-linux-nat.c (fetch_register): Likewise.
671         (store_register): Likewise.
672         (hppa_linux_fetch_inferior_registers): Likewise.
673         (hppa_linux_store_inferior_registers): Likewise.
674         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
675         (i386_darwin_store_inferior_registers): Likewise.
676         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
677         (gnu_store_registers): Likewise.
678         * i386-linux-nat.c (fetch_register): Likewise.
679         (store_register): Likewise.
680         (supply_gregset): Likewise.
681         (fill_gregset): Likewise.
682         (i386_linux_fetch_inferior_registers): Likewise.
683         (i386_linux_store_inferior_registers): Likewise.
684         (i386_linux_resume): Likewise.
685         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
686         Likewise.
687         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
688         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
689         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
690         (i386obsd_collect_uthread): Likewise.
691         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
692         (i386_supply_gregset): Likewise.
693         (i386_collect_gregset): Likewise.
694         (i386_supply_fpregset): Likewise.
695         (i386_collect_fpregset): Likewise.
696         (i386_mpx_bd_base): Likewise.
697         * i386-v4-nat.c (supply_fpregset): Likewise.
698         (fill_fpregset): Likewise.
699         * i387-tdep.c (i387_supply_fsave): Likewise.
700         (i387_collect_fsave): Likewise.
701         (i387_supply_fxsave): Likewise.
702         (i387_collect_fxsave): Likewise.
703         (i387_supply_xsave): Likewise.
704         (i387_collect_xsave): Likewise.
705         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
706         (ia64_linux_store_registers): Likewise.
707         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
708         (ia64_extract_return_value): Likewise.
709         (ia64_store_return_value): Likewise.
710         (find_func_descr): Likewise.
711         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
712         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
713         (inf_ptrace_store_registers): Likewise.
714         * infrun.c (use_displaced_stepping): Likewise.
715         (displaced_step_prepare_throw): Likewise.
716         (resume): Likewise.
717         (proceed): Likewise.
718         (do_target_wait): Likewise.
719         (adjust_pc_after_break): Likewise.
720         (handle_inferior_event_1): Likewise.
721         (handle_signal_stop): Likewise.
722         (save_infcall_suspend_state): Likewise.
723         (restore_infcall_suspend_state): Likewise.
724         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
725         * jit.c (jit_frame_prev_register): Likewise.
726         * linux-nat.c (save_stop_reason): Likewise.
727         (linux_nat_wait_1): Likewise.
728         (resume_stopped_resumed_lwps): Likewise.
729         * linux-record.c (record_linux_sockaddr): Likewise.
730         (record_linux_msghdr): Likewise.
731         (record_linux_system_call): Likewise.
732         * linux-tdep.c (linux_collect_thread_registers): Likewise.
733         * lm32-tdep.c (lm32_extract_return_value): Likewise.
734         (lm32_store_return_value): Likewise.
735         * m32c-tdep.c (m32c_read_flg): Likewise.
736         (m32c_pseudo_register_read): Likewise.
737         (m32c_pseudo_register_write): Likewise.
738         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
739         (m32r_linux_collect_gregset): Likewise.
740         * m32r-tdep.c (m32r_store_return_value): Likewise.
741         (m32r_extract_return_value): Likewise.
742         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
743         (m68kbsd_collect_fpregset): Likewise.
744         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
745         * m68k-linux-nat.c (fetch_register): Likewise.
746         (old_fetch_inferior_registers): Likewise.
747         (old_store_inferior_registers): Likewise.
748         (store_regs): Likewise.
749         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
750         (m68k_svr4_store_return_value): Likewise.
751         * m88k-tdep.c (m88k_store_arguments): Likewise.
752         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
753         (mi_cmd_data_write_register_values): Likewise.
754         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
755         (mips_fbsd_store_inferior_registers): Likewise.
756         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
757         (mips_fbsd_supply_gregs): Likewise.
758         (mips_fbsd_collect_fpregs): Likewise.
759         (mips_fbsd_collect_gregs): Likewise.
760         (mips_fbsd_supply_fpregset): Likewise.
761         (mips_fbsd_collect_fpregset): Likewise.
762         (mips_fbsd_supply_gregset): Likewise.
763         (mips_fbsd_collect_gregset): Likewise.
764         * mips-linux-nat.c (supply_gregset): Likewise.
765         (fill_gregset): Likewise.
766         (supply_fpregset): Likewise.
767         (fill_fpregset): Likewise.
768         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
769         (mips_fill_gregset): Likewise.
770         (mips_supply_fpregset): Likewise.
771         (mips_fill_fpregset): Likewise.
772         (mips64_supply_gregset): Likewise.
773         (micromips_linux_sigframe_validate): Likewise.
774         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
775         (mipsnbsd_fetch_inferior_registers): Likewise.
776         (mipsnbsd_store_inferior_registers): Likewise.
777         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
778         (mipsnbsd_supply_gregset): Likewise.
779         (mipsnbsd_iterate_over_regset_sections): Likewise.
780         (mipsnbsd_supply_reg): Likewise.
781         (mipsnbsd_supply_fpreg): Likewise.
782         * mips-tdep.c (mips_in_frame_stub): Likewise.
783         (mips_dummy_id): Likewise.
784         (is_octeon_bbit_op): Likewise.
785         (micromips_bc1_pc): Likewise.
786         (extended_mips16_next_pc): Likewise.
787         (mips16_next_pc): Likewise.
788         (deal_with_atomic_sequence): Likewise.
789         * moxie-tdep.c (moxie_process_readu): Likewise.
790         * nios2-tdep.c (nios2_get_next_pc): Likewise.
791         * nto-procfs.c (procfs_store_registers): Likewise.
792         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
793         (ppcfbsd_store_inferior_registers): Likewise.
794         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
795         (fetch_altivec_register): Likewise.
796         (get_spe_registers): Likewise.
797         (fetch_spe_register): Likewise.
798         (fetch_altivec_registers): Likewise.
799         (fetch_all_gp_regs): Likewise.
800         (fetch_all_fp_regs): Likewise.
801         (store_vsx_register): Likewise.
802         (store_altivec_register): Likewise.
803         (set_spe_registers): Likewise.
804         (store_spe_register): Likewise.
805         (store_altivec_registers): Likewise.
806         (store_all_gp_regs): Likewise.
807         (store_all_fp_regs): Likewise.
808         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
809         (ppc_linux_collect_gregset): Likewise.
810         (ppc_canonicalize_syscall): Likewise.
811         (ppc_linux_record_signal): Likewise.
812         (ppu2spu_prev_register): Likewise.
813         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
814         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
815         (ppcobsd_store_registers): Likewise.
816         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
817         Likewise.
818         (ppc_ravenscar_generic_store_registers): Likewise.
819         * procfs.c (procfs_fetch_registers): Likewise.
820         (procfs_store_registers): Likewise.
821         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
822         (ravenscar_store_registers): Likewise.
823         (ravenscar_prepare_to_store): Likewise.
824         * record-btrace.c (record_btrace_fetch_registers): Likewise.
825         * record-full.c (record_full_wait_1): Likewise.
826         (record_full_registers_change): Likewise.
827         (record_full_store_registers): Likewise.
828         (record_full_core_fetch_registers): Likewise.
829         (record_full_save): Likewise.
830         (record_full_goto_insn): Likewise.
831         * regcache.c (regcache_register_size): Likewise.
832         (get_regcache_arch): Remove.
833         (regcache_read_pc): Likewise.
834         * regcache.h (get_regcache_arch): Remove.
835         * remote-sim.c (gdbsim_fetch_register): Likewise.
836         (gdbsim_store_register): Likewise.
837         * remote.c (fetch_register_using_p): Likewise.
838         (send_g_packet): Likewise.
839         (remote_prepare_to_store): Likewise.
840         (store_registers_using_G): Likewise.
841         * reverse.c (save_bookmark_command): Likewise.
842         (goto_bookmark_command): Likewise.
843         * rs6000-aix-tdep.c (branch_dest): Likewise.
844         * rs6000-nat.c (rs6000_ptrace64): Likewise.
845         (fetch_register): Likewise.
846         * rs6000-tdep.c (ppc_supply_reg): Likewise.
847         (ppc_collect_reg): Likewise.
848         (ppc_collect_gregset): Likewise.
849         (ppc_collect_fpregset): Likewise.
850         (ppc_collect_vsxregset): Likewise.
851         (ppc_collect_vrregset): Likewise.
852         (ppc_displaced_step_hw_singlestep): Likewise.
853         (rs6000_pseudo_register_read): Likewise.
854         (rs6000_pseudo_register_write): Likewise.
855         * s390-linux-nat.c (supply_gregset): Likewise.
856         (fill_gregset): Likewise.
857         (s390_linux_fetch_inferior_registers): Likewise.
858         * s390-linux-tdep.c (s390_write_pc): Likewise.
859         (s390_software_single_step): Likewise.
860         (s390_all_but_pc_registers_record): Likewise.
861         (s390_linux_syscall_record): Likewise.
862         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
863         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
864         (shnbsd_store_inferior_registers): Likewise.
865         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
866         (sh_extract_return_value_fpu): Likewise.
867         (sh_store_return_value_nofpu): Likewise.
868         (sh_corefile_supply_regset): Likewise.
869         (sh_corefile_collect_regset): Likewise.
870         * sh64-tdep.c (sh64_extract_return_value): Likewise.
871         (sh64_store_return_value): Likewise.
872         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
873         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
874         (sparc_store_inferior_registers): Likewise.
875         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
876         (sparc_ravenscar_prepare_to_store): Likewise.
877         * sparc-tdep.c (sparc32_store_arguments): Likewise.
878         (sparc_analyze_control_transfer): Likewise.
879         (sparc_step_trap): Likewise.
880         (sparc_software_single_step): Likewise.
881         (sparc32_gdbarch_init): Likewise.
882         (sparc_supply_rwindow): Likewise.
883         (sparc_collect_rwindow): Likewise.
884         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
885         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
886         (sparc64nbsd_collect_gregset): Likewise.
887         (sparc64nbsd_supply_fpregset): Likewise.
888         (sparc64nbsd_collect_fpregset): Likewise.
889         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
890         (sparc64_supply_gregset): Likewise.
891         (sparc64_collect_gregset): Likewise.
892         (sparc64_supply_fpregset): Likewise.
893         (sparc64_collect_fpregset): Likewise.
894         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
895         * spu-tdep.c (spu_unwind_sp): Likewise.
896         (spu2ppu_prev_register): Likewise.
897         (spu_memory_remove_breakpoint): Likewise.
898         * stack.c (return_command): Likewise.
899         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
900         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
901         * tracefile.c (trace_save_ctf): Likewise.
902         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
903         (do_windows_store_inferior_registers): Likewise.
904         (windows_resume): Likewise.
905         * xtensa-linux-nat.c (fill_gregset): Likewise.
906         (supply_gregset_reg): Likewise.
907         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
908         (xtensa_register_read_masked): Likewise.
909         (xtensa_supply_gregset): Likewise.
910         (xtensa_extract_return_value): Likewise.
911         (xtensa_store_return_value): Likewise.
912
913 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
914
915         * doublest.c (floatformat_from_string): New function.
916         * doublest.h (floatformat_from_string): Add prototype.
917
918         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
919         (OP_FLOAT): ... this.
920         * expression.h: Do not include "doublest.h".
921         (union exp_element): Replace doubleconst and decfloatconst by
922         new element floatconst.
923         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
924         (ada_evaluate_subexp): Likewise.
925         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
926         OP_DOUBLE and OP_DECFLOAT.
927         * expprint.c (print_subexp_standard): Likewise.
928         (dump_subexp_body_standard): Likewise.
929         * breakpoint.c (watchpoint_exp_is_const): Likewise.
930
931         * parse.c: Include "dfp.h".
932         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
933         (write_exp_elt_floatcst): New function.
934         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
935         and OP_DECFLOAT.
936         (operator_check_standard): Likewise.
937         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
938         Return target format buffer instead of host DOUBLEST.
939         Use floatformat_from_string and decimal_from_string to parse
940         either binary or decimal floating-point types.
941         (parse_c_float): Remove.
942         * parser-defs.h: Do not include "doublest.h".
943         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
944         (write_exp_elt_floatcst): Add prototype.
945         (parse_float): Update prototype.
946         (parse_c_float): Remove.
947
948         * c-exp.y: Do not include "dfp.h".
949         (typed_val_float): Use byte buffer instead of DOUBLEST.
950         (typed_val_decfloat): Remove.
951         (DECFLOAT): Remove.
952         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
953         (parse_number): Update to new parse_float interface.
954         Parse suffixes and determine type before calling parse_float.
955         Handle decimal and binary FP types the same way.
956
957         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
958         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
959         (parse_number): Update to new parse_float interface.
960         Parse suffixes and determine type before calling parse_float.
961
962         * f-exp.y: Replace dval by typed_val_float.
963         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
964         (parse_number): Use parse_float instead of atof.
965
966         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
967         (parse_go_float): Remove.
968         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
969         (parse_number): Call parse_float instead of parse_go_float.
970         Parse suffixes and determine type before calling parse_float.
971
972         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
973         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
974         (parse_number): Update to new parse_float interface.
975         Parse suffixes and determine type before calling parse_float.
976
977         * m2-exp.y: Replace dval by byte buffer val.
978         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
979         (parse_number): Call parse_float instead of atof.
980
981         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
982         (lex_number): Call parse_float instead of strtod.
983         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
984         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
985         Use write_exp_elt_floatcst.
986         (unit_testing): Remove static variable.
987         (rust_type): Do not check unit_testing.
988         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
989
990         * ada-exp.y (type_float, type_double): Remove.
991         (typed_val_float): Use byte buffer instead of DOUBLEST.
992         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
993         * ada-lex.l (processReal): Use parse_float instead of sscanf.
994
995 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
996
997         * aarch64-tdep.h (enum aarch64_regnum): Remove.
998         * arch/aarch64.h: New file.
999
1000 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1001
1002         * dfp.h (decimal_from_string): Use const reference for argument.
1003         * dfp.c (decimal_from_string): Likewise.
1004
1005 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1006
1007         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1008         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1009         * mips-tdep.c (mips_print_fp_register): Likewise.
1010
1011 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1012
1013         * common/format.h (enum argclass): Replace decfloat_arg by
1014         dec32float_arg, dec64float_arg, and dec128float_arg.
1015         * common/format.c (parse_format_string): Update to return
1016         new decimal float argument classes.
1017
1018         * printcmd.c (printf_decfloat): Rename to ...
1019         (printf_floating): ... this.  Add argclass argument, and use it
1020         instead of parsing the format string again.  Add support for
1021         binary floating-point values, using floatformat_to_string.
1022         Convert value to the target format if it doesn't already match.
1023         (ui_printf): Call printf_floating instead of printf_decfloat,
1024         also for double_arg / long_double_arg.  Pass argclass.
1025
1026         * dfp.c (decimal_to_string): Add format string argument.
1027         * dfp.h (decimal_to_string): Likewise.
1028
1029         * doublest.c (floatformat_to_string): Add format string argument.
1030         * doublest.h (floatformat_to_string): Likewise.
1031
1032 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1033
1034         * doublest.c (floatformat_precision): New routine.
1035         (floatformat_to_string): Likewise.
1036         * doublest.c (floatformat_to_string): Add prototype.
1037
1038         * printcmd.c (print_scalar_formatted): Only call print_floating
1039         on floating-point types.
1040         * valprint.c: Do not include "floatformat.h".
1041         (generic_val_print_decfloat): Remove.
1042         (generic_val_print): Call generic_val_print_float for both
1043         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1044         (print_floating): Use floatformat_to_string.  Handle decimal float.
1045         (print_decimal_floating): Remove, merge into floatformat_to_string.
1046         * value.h (print_decimal_floating): Remove.
1047
1048         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1049
1050 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1051
1052         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1053
1054 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1055
1056         * memattr.h: Don't include vec.h.
1057         (struct mem_attrib): Initialize fields.
1058         <unknown>: New static method.
1059         (struct mem_region): Add constructors, operator<, initialize
1060         fields.
1061         * memattr.c: Include algorithm.
1062         (default_mem_attrib, unknown_mem_attrib): Remove.
1063         (user_mem_region_list): New global.
1064         (target_mem_region_list, mem_region_list): Change type to
1065         std::vector<mem_region>.
1066         (mem_use_target): Now a function.
1067         (target_mem_regions_valid): Change type to bool.
1068         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1069         (require_user_regions): Adjust.
1070         (require_target_regions): Adjust.
1071         (create_mem_region): Adjust.
1072         (lookup_mem_region): Adjust.
1073         (invalidate_target_mem_regions): Adjust.
1074         (mem_clear): Rename to...
1075         (user_mem_clear): ... this, and adjust.
1076         (mem_command): Adjust.
1077         (info_mem_command): Adjust.
1078         (mem_enable, enable_mem_command, mem_disable,
1079         disable_mem_command): Adjust.
1080         (mem_delete): Adjust.
1081         (delete_mem_command): Adjust.
1082         * memory-map.h (parse_memory_map): Return an std::vector.
1083         * memory-map.c (parse_memory_map): Likewise.
1084         (struct memory_map_parsing_data): Add constructor.
1085         <memory_map>: Point to std::vector.
1086         (memory_map_start_memory): Adjust.
1087         (memory_map_end_memory): Adjust.
1088         (memory_map_end_property): Adjust.
1089         (clear_result): Remove.
1090         * remote.c (remote_memory_map): Return an std::vector.
1091         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1092         Remove.
1093         (target_debug_print_mem_region_vector): New.
1094         * target-delegates.c: Regenerate.
1095         * target.h (mem_region_vector): New typedef.
1096         (to_memory_map): Return mem_region_vector.
1097         (target_memory_map): Return an std::vector.
1098         * target.c (target_memory_map): Return an std::vector.
1099         (flash_erase_command): Adjust.
1100
1101 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1102
1103         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1104         Change type to std::string.
1105         (memory_map_start_property): Adjust.
1106         (memory_map_end_property): Adjust.
1107
1108 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1109
1110         * infrun.h: Include common/byte-vector.h.
1111         (struct displaced_step_closure): New struct.
1112         (struct buf_displaced_step_closure): New struct.
1113         * infrun.c (displaced_step_closure::~displaced_step_closure):
1114         Provide default implementation.
1115         (displaced_step_clear): Deallocate step closure with delete.
1116         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1117         (aarch64_displaced_step_closure): ... this, extend
1118         displaced_step_closure.
1119         (aarch64_displaced_step_data) <dsc>: Change type to
1120         aarch64_displaced_step_closure.
1121         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1122         unique_ptr.
1123         (aarch64_displaced_step_fixup): Add cast for displaced step
1124         closure.
1125         * amd64-tdep.c (displaced_step_closure): Rename to ...
1126         (amd64_displaced_step_closure): ... this, extend
1127         displaced_step_closure.
1128         <insn_buf>: Change type to std::vector<gdb_byte>.
1129         <max_len>: Remove.
1130         (fixup_riprel): Change type of DSC parameter, adjust to type
1131         change of insn_buf.
1132         (fixup_displaced_copy): Change type of DSC parameter.
1133         (amd64_displaced_step_copy_insn): Instantiate
1134         amd64_displaced_step_closure.
1135         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1136         to type change of insn_buf.
1137         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1138         parameter DSC.
1139         (arm_linux_copy_svc): Likewise.
1140         (cleanup_kernel_helper_return): Likewise.
1141         (arm_catch_kernel_helper_return): Likewise.
1142         (arm_linux_displaced_step_copy_insn): Instantiate
1143         arm_displaced_step_closure.
1144         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1145         (displaced_read_reg): Change type of parameter DSC.
1146         (branch_write_pc): Likewise.
1147         (load_write_pc): Likewise.
1148         (alu_write_pc): Likewise.
1149         (displaced_write_reg): Likewise.
1150         (arm_copy_unmodified): Likewise.
1151         (thumb_copy_unmodified_32bit): Likewise.
1152         (thumb_copy_unmodified_16bit): Likewise.
1153         (cleanup_preload): Likewise.
1154         (install_preload): Likewise.
1155         (arm_copy_preload): Likewise.
1156         (thumb2_copy_preload): Likewise.
1157         (install_preload_reg): Likewise.
1158         (arm_copy_preload_reg): Likewise.
1159         (cleanup_copro_load_store): Likewise.
1160         (install_copro_load_store): Likewise.
1161         (arm_copy_copro_load_store) Likewise.
1162         (thumb2_copy_copro_load_store): Likewise.
1163         (cleanup_branch): Likewise.
1164         (install_b_bl_blx): Likewise.
1165         (arm_copy_b_bl_blx): Likewise.
1166         (thumb2_copy_b_bl_blx): Likewise.
1167         (thumb_copy_b): Likewise.
1168         (install_bx_blx_reg): Likewise.
1169         (arm_copy_bx_blx_reg): Likewise.
1170         (thumb_copy_bx_blx_reg): Likewise.
1171         (cleanup_alu_imm): Likewise.
1172         (arm_copy_alu_imm): Likewise.
1173         (thumb2_copy_alu_imm): Likewise.
1174         (cleanup_alu_reg): Likewise.
1175         (install_alu_reg): Likewise.
1176         (arm_copy_alu_reg): Likewise.
1177         (thumb_copy_alu_reg): Likewise.
1178         (cleanup_alu_shifted_reg): Likewise.
1179         (install_alu_shifted_reg): Likewise.
1180         (arm_copy_alu_shifted_reg): Likewise.
1181         (cleanup_load): Likewise.
1182         (cleanup_store): Likewise.
1183         (arm_copy_extra_ld_st): Likewise.
1184         (install_load_store): Likewise.
1185         (thumb2_copy_load_literal): Likewise.
1186         (thumb2_copy_load_reg_imm): Likewise.
1187         (arm_copy_ldr_str_ldrb_strb): Likewise.
1188         (cleanup_block_load_all): Likewise.
1189         (cleanup_block_store_pc): Likewise.
1190         (cleanup_block_load_pc): Likewise.
1191         (arm_copy_block_xfer): Likewise.
1192         (thumb2_copy_block_xfer): Likewise.
1193         (cleanup_svc): Likewise.
1194         (install_svc): Likewise.
1195         (arm_copy_svc): Likewise.
1196         (thumb_copy_svc): Likewise.
1197         (arm_copy_undef): Likewise.
1198         (thumb_32bit_copy_undef): Likewise.
1199         (arm_copy_unpred): Likewise.
1200         (arm_decode_misc_memhint_neon): Likewise.
1201         (arm_decode_unconditional): Likewise.
1202         (arm_decode_miscellaneous): Likewise.
1203         (arm_decode_dp_misc): Likewise.
1204         (arm_decode_ld_st_word_ubyte): Likewise.
1205         (arm_decode_media): Likewise.
1206         (arm_decode_b_bl_ldmstm): Likewise.
1207         (arm_decode_ext_reg_ld_st): Likewise.
1208         (thumb2_decode_dp_shift_reg): Likewise.
1209         (thumb2_decode_ext_reg_ld_st): Likewise.
1210         (arm_decode_svc_copro): Likewise.
1211         (thumb2_decode_svc_copro): Likewise.
1212         (install_pc_relative): Likewise.
1213         (thumb_copy_pc_relative_16bit): Likewise.
1214         (thumb_decode_pc_relative_16bit): Likewise.
1215         (thumb_copy_pc_relative_32bit): Likewise.
1216         (thumb_copy_16bit_ldr_literal): Likewise.
1217         (thumb_copy_cbnz_cbz): Likewise.
1218         (thumb2_copy_table_branch): Likewise.
1219         (cleanup_pop_pc_16bit_all): Likewise.
1220         (thumb_copy_pop_pc_16bit): Likewise.
1221         (thumb_process_displaced_16bit_insn): Likewise.
1222         (decode_thumb_32bit_ld_mem_hints): Likewise.
1223         (thumb_process_displaced_32bit_insn): Likewise.
1224         (thumb_process_displaced_insn): Likewise.
1225         (arm_process_displaced_insn): Likewise.
1226         (arm_displaced_init_closure): Likewise.
1227         (arm_displaced_step_fixup): Add cast for closure.
1228         * arm-tdep.h: Include infrun.h.
1229         (displaced_step_closure): Rename to ...
1230         (arm_displaced_step_closure): ... this, extend
1231         displaced_step_closure.
1232         <u::svc::copy_svc_os>: Change type of parameter DSC.
1233         <cleanup>: Likewise.
1234         (arm_process_displaced_insn): Likewise.
1235         (arm_displaced_init_closure): Likewise.
1236         (displaced_read_reg): Likewise.
1237         (displaced_write_reg): Likewise.
1238         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1239         Adjust.
1240         * i386-tdep.h: Include infrun.h.
1241         (i386_displaced_step_closure): New typedef.
1242         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1243         i386_displaced_step_closure.
1244         (i386_displaced_step_fixup): Adjust.
1245         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1246         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1247         and unique_ptr.
1248         (ppc_displaced_step_fixup): Adjust.
1249         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1250         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1251         and unique_ptr.
1252         (s390_displaced_step_fixup): Adjust.
1253
1254 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1255
1256         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1257         Remove declarations.
1258
1259 2017-10-20  Tom Tromey  <tom@tromey.com>
1260
1261         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1262         std::vector.
1263         (gdb_bfd_record_inclusion): Update.
1264         (bfdp): Remove typedef.
1265
1266 2017-10-20  Tom Tromey  <tom@tromey.com>
1267
1268         * gdb_bfd.c (gdb_bfd_ref): Use new.
1269         (struct gdb_bfd_data): Add constructor, destructor, and member
1270         initializers.
1271         (gdb_bfd_unref): Use delete.
1272
1273 2017-10-20  Tom Tromey  <tom@tromey.com>
1274
1275         * exec.c (exec_file_attach): Use new_bfd_ref.
1276         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1277         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1278         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1279         new_bfd_ref.
1280         * gdb_bfd.h (new_bfd_ref): New function.
1281
1282 2017-10-20  Pedro Alves  <palves@redhat.com>
1283
1284         * main.c (captured_command_loop): Add attribute noinline.
1285
1286 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1287
1288         * interps.c (struct interp_factory): Add constructor.
1289         (interp_factory_p): Remove typedef.
1290         (DEF_VEC_P(interp_factory_p)): Remove.
1291         (interpreter_factories): Change type to std::vector.
1292         (interp_factory_register): Adjust.
1293         (interp_lookup): Adjust.
1294         (interpreter_completer): Adjust.
1295
1296 2017-10-19  Tom Tromey  <tom@tromey.com>
1297
1298         * break-catch-syscall.c (catch_syscall_completer): Use
1299         std::string, gdb::unique_xmalloc_ptr.
1300
1301 2017-10-19  Tom Tromey  <tom@tromey.com>
1302
1303         * infcall.c (call_function_by_hand_dummy): Use std::string.
1304
1305 2017-10-19  Tom Tromey  <tom@tromey.com>
1306
1307         * mi/mi-main.c (mi_cmd_execute): Update.
1308         * top.h (prepare_execute_command): Return scoped_value_mark.
1309         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1310         Add move constructor.
1311         * top.c (prepare_execute_command): Return scoped_value_mark.
1312         (execute_command): Update.
1313
1314 2017-10-19  Pedro Alves  <palves@redhat.com>
1315
1316         * xml-support.c (xml_fetch_content_from_file): Check fread's
1317         return.
1318
1319 2017-10-19  Pedro Alves  <palves@redhat.com>
1320
1321         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1322         async.
1323         (handle_error_fd): New function.
1324         (ser_base_async): Add/delete an event loop file handler for
1325         error_fd.
1326
1327 2017-10-19  Pedro Alves  <palves@redhat.com>
1328
1329         * xml-support.c (xml_fetch_content_from_file): Don't read in
1330         chunks.  Instead use fseek to determine the file's size, and read
1331         it in one go.
1332
1333 2017-11-18  Keith Seitz  <keiths@redhat.com>
1334
1335         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1336         types.
1337         Add whitespace to front of type name.
1338
1339 2017-10-18  Keith Seitz  <keiths@redhat.com>
1340
1341         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1342         DW_AT_accessibility.
1343
1344 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1345
1346         * features/tic6x-c62x-linux.c: Remove.
1347
1348 2017-10-17  Tom Tromey  <tom@tromey.com>
1349
1350         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1351         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1352         (do_mixed_source_and_assembly): Likewise.
1353
1354 2017-10-17  Tom Tromey  <tom@tromey.com>
1355
1356         * regcache.c (regcache::xfer_part): Remove assertion.
1357
1358 2017-10-17  Pedro Alves  <palves@redhat.com>
1359
1360         * xml-support.c (xml_fetch_content_from_file): Call
1361         unique_ptr::release() instead unique_ptr::get() when passing
1362         through xrealloc.
1363
1364 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1365
1366         * regcache.c (regcache::xfer_part): Remove parameters read and
1367         write, add parameter is_raw.  All callers are updated.
1368
1369 2017-10-16  Keith Seitz  <keiths@redhat.com>
1370
1371         * c-typeprint.c (enum access_specifier): Moved here from
1372         c_type_print_base.
1373         (output_access_specifier): New function.
1374         (c_type_print_base): Consider typedefs when assessing
1375         whether access labels are needed.
1376         Use output_access_specifier as needed.
1377         Output access specifier for typedefs, if needed.
1378         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1379         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1380         fields.
1381         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1382         accessor macros.
1383
1384 2017-10-16  Tom Tromey  <tom@tromey.com>
1385
1386         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1387         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1388         * target.c (target_fileio_read_stralloc): Update.
1389         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1390         * target.h (target_fileio_read_stralloc): Return
1391         unique_xmalloc_ptr.
1392
1393 2017-10-16  Tom Tromey  <tom@tromey.com>
1394
1395         * xml-syscall.c (xml_init_syscalls_info): Update.
1396         * xml-support.c (xinclude_start_include): Update.
1397         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1398         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1399         (xml_fetch_content_from_file): Likewise.
1400         * osdata.c (get_osdata): Update.
1401         * target.h (target_read_stralloc, target_get_osdata): Return
1402         unique_xmalloc_ptr.
1403         * solib-aix.c (solib_aix_get_library_list): Update.
1404         * solib-target.c (solib_target_current_sos): Update.
1405         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1406         * xml-tdesc.c (fetch_available_features_from_target): Update.
1407         (target_fetch_description_xml): Update.
1408         (file_read_description_xml): Update.
1409         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1410         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1411         (remote_pid_to_exec_file): Update.
1412         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1413         (target_get_osdata): Likewise.
1414
1415 2017-10-16  Tom Tromey  <tom@tromey.com>
1416
1417         * remote.c (remote_register_number_and_offset): Use std::vector.
1418         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1419         (putpkt_binary): Use gdb::def_vector.
1420         (compare_sections_command): Use gdb::byte_vector.
1421
1422 2017-10-16  Tom Tromey  <tom@tromey.com>
1423
1424         * ppc-linux-nat.c (hwdebug_insert_point): Use
1425         gdb::unique_xmalloc_ptr, XDUP.
1426
1427 2017-10-16  Tom Tromey  <tom@tromey.com>
1428
1429         * probe.c (parse_probes): Use std::string.
1430         (info_probes_for_ops, enable_probes_command)
1431         (disable_probes_command): Remove cleanups.
1432
1433 2017-10-16  Tom Tromey  <tom@tromey.com>
1434
1435         * buildsym.c (block_compar): Remove.
1436         (end_symtab_get_static_block): Use std::vector.
1437
1438 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1439
1440         * memrange.h (struct mem_range): Define operator< and operator==.
1441         (mem_range_s): Remove.
1442         (DEF_VEC_O (mem_range_s)): Remove.
1443         (normalize_mem_ranges): Change parameter type to std::vector.
1444         * memrange.c (compare_mem_ranges): Remove.
1445         (normalize_mem_ranges): Change parameter type to std::vector,
1446         adjust to vector change.
1447         * exec.c (section_table_available_memory): Return vector, remove
1448         parameter.
1449         (section_table_read_available_memory): Adjust to std::vector
1450         change.
1451         * remote.c (remote_read_bytes): Adjust to std::vector
1452         change.
1453         * tracepoint.h (traceframe_available_memory): Change parameter
1454         type to std::vector.
1455         * tracepoint.c (traceframe_available_memory): Change parameter
1456         type to std::vector, adjust.
1457         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1458         std::vector change.
1459         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1460         unittests/memrange-selftests.c.
1461         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1462         * gdb/unittests/memrange-selftests.c: New file.
1463
1464 2017-10-16  Pedro Alves  <palves@redhat.com>
1465
1466         * elfread.c (probe_key_free): Rename range-for variable.
1467         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1468         (find_probe_by_pc, collect_probes): Rename range-for variable.
1469
1470 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1471
1472         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1473         * features/tic6x-c62x.c: Remove.
1474         * features/tic6x-c64x-linux.c: Remove.
1475         * features/tic6x-c64x.c: Remove.
1476         * features/tic6x-c64xp-linux.c: Remove.
1477         * features/tic6x-c64xp.c: Remove.
1478         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1479         initialize_tdesc_tic6x_*_linux functions.
1480         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1481         initialize_tdesc_tic6x_* functions.
1482
1483 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1484
1485         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1486         tic6x-c62x.
1487         * regformats/tic6x-c62x.dat: Remove.
1488         * regformats/tic6x-c64x.dat: Remove.
1489         * regformats/tic6x-c64xp.dat: Remove.
1490
1491 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1492
1493         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1494         (the !HAVE_LIBEXPAT version).
1495
1496 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1497
1498         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1499         const.
1500
1501 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1502
1503         * target.h: Include tracepoint.h.
1504         (enum trace_find_type): Move to tracepoint.h.
1505         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1506         * tracepoint.h: Don't include target.h
1507         (enum trace_find_type): Move from target.h.
1508         (parse_traceframe_info): Return a unique ptr.
1509         * tracepoint.c (current_traceframe_info): Change type to unique
1510         ptr.
1511         (free_traceframe_info): Remove.
1512         (clear_traceframe_info): Don't manually free
1513         current_traceframe_info.
1514         (free_result): Remove.
1515         (parse_traceframe_info): Return a unique ptr.
1516         (get_traceframe_info): Adjust to unique ptr.
1517         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1518         * remote.c (remote_traceframe_info): Return a unique ptr.
1519         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1520         ptr.
1521         * target-debug.h (target_debug_print_traceframe_info_up): New
1522         macro.
1523         * target-delegates.c: Regenerate.
1524
1525 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1526
1527         * memrange.h (struct mem_range): Add constructors.
1528         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1529         std::vector<mem_range>.
1530         * tracepoint.c (free_traceframe_info): Don't manually free
1531         vector.
1532         (traceframe_info_start_memory): Adjust to vector change.
1533         (traceframe_available_memory): Likewise.
1534         * tracefile-tfile.c (build_traceframe_info): Likewise.
1535         * ctf.c (ctf_traceframe_info): Likewise.
1536
1537 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1538
1539         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1540         std::vector<int>.
1541         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1542         (traceframe_info_start_tvar): Adjust to vector change.
1543         (parse_traceframe_info): Allocate with new.
1544         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1545         vector change.
1546         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1547         change.
1548         tfile_traceframe_info): Allocate with new.
1549         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1550         change.
1551
1552 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1553
1554         * tracepoint.c (traceframe_info): Rename to...
1555         (current_traceframe_info): ...this.
1556         (clear_traceframe_info): Adjust.
1557         (get_traceframe_info): Adjust.
1558
1559 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1560
1561         * nat/linux-osdata.c: Include algorithm.
1562         (compare_processes): Remove.
1563         (struct pid_pgid_entry): New struct.
1564         (linux_xfer_osdata_processgroups): Use std::vector instead of
1565         XNEWVEC.
1566
1567 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1568
1569         * objfiles.h: Don't include symfile.h.
1570         (struct partial_symbol): Remove forward-declaration.
1571         (struct objfile) <global_psymbols, static_psymbols>: Change type
1572         to std::vector<partial_symbol *>.
1573         * objfiles.c (objfile::objfile): Don't memset those fields.
1574         (objfile::~objfile): Don't free those fields.
1575         * psympriv.h (struct psymbol_allocation_list): Remove
1576         forward-declaration.
1577         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1578         to std::vector.
1579         (start_psymtab_common): Change parameters to std::vector.
1580         * psymtab.c: Include algorithm.
1581         (require_partial_symbols): Call shrink_to_fit.
1582         (find_pc_sect_psymbol): Adjust to vector change.
1583         (match_partial_symbol): Likewise.
1584         (lookup_partial_symbol): Likewise.
1585         (psym_relocate): Likewise.
1586         (dump_psymtab): Likewise.
1587         (recursively_search_psymtabs): Likewise.
1588         (compare_psymbols): Remove.
1589         (sort_pst_symbols): Adjust to vector change.
1590         (start_psymtab_common): Likewise.
1591         (end_psymtab_common): Likewise.
1592         (psymbol_bcache_full): De-constify return value.
1593         (add_psymbol_to_bcache): Likewise.
1594         (extend_psymbol_list): Remove.
1595         (append_psymbol_to_list): Adjust to vector change.
1596         (add_psymbol_to_list): Likewise.
1597         (init_psymbol_list): Likewise.
1598         (maintenance_info_psymtabs): Likewise.
1599         (maintenance_check_psymtabs): Likewise.
1600         * symfile.h (struct psymbol_allocation_list): Remove.
1601         * symfile.c (reread_symbols): Adjust to vector change.
1602         * dbxread.c (start_psymtab): Change type of parameters.
1603         (dbx_symfile_read): Adjust to vector change.
1604         (read_dbx_symtab): Likewise.
1605         (start_psymtab): Change type of parameters.
1606         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1607         (create_partial_symtab): Likewise.
1608         (add_partial_symbol): Likewise.
1609         (write_one_signatured_type): Likewise.
1610         (recursively_write_psymbols): Likewise.
1611         * mdebugread.c (parse_partial_symbols): Likewise.
1612         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1613         (scan_xcoff_symtab): Adjust to vector change.
1614         (xcoff_initial_scan): Likewise.
1615
1616 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1617
1618         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1619
1620 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1621
1622         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1623         Remove s390x-*-expedite, add s390x-expedite.
1624
1625 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1626
1627         * features/s390-gs-linux64.c: Regenerated.
1628         * features/s390x-gs-linux64.c: Regenerated.
1629
1630 2017-10-13  Tom Tromey  <tom@tromey.com>
1631
1632         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1633         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1634         delete.
1635         * symfile.c (symbol_file_add_with_addrs): Use new.
1636         (symbol_file_add_separate): Update comment.
1637         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1638         * jit.c (jit_object_close_impl): Use new.
1639         (jit_unregister_code): Use delete.
1640         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1641         (~objfile): Rename from free_objfile.
1642         (free_objfile_separate_debug, do_free_objfile_cleanup)
1643         (free_all_objfiles, objfile_purge_solibs): Use delete.
1644         * objfiles.h (struct objfile): Add constructor and destructor.
1645         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1646         (allocate_objfile, free_objfile): Don't declare.
1647         (struct objstats): Add initializers.
1648
1649 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1650
1651         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1652         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1653         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1654         * gdbarch.h: Regenerate.
1655         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1656         Adjust comment.
1657         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1658         (i386_displaced_step_fixup): Adjust comment.
1659         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1660
1661 2017-10-12  Tom Tromey  <tom@tromey.com>
1662
1663         * prologue-value.h (pv_area::store_would_trash): Return bool.
1664         (pv_area::find_reg): Likewise.
1665         * prologue-value.c (pv_area::store_would_trash): Return bool.
1666         (pv_area::find_reg): Likewise.
1667
1668 2017-10-12  Tom Tromey  <tom@tromey.com>
1669
1670         * s390-linux-tdep.c (s390_store, s390_load)
1671         (s390_check_for_saved, s390_analyze_prologue): Update.
1672         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1673         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1674         * prologue-value.h (class pv_area): Move from prologue-value.c.
1675         Change names of members.  Add constructor, destructor, member
1676         functions.
1677         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1678         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1679         (pv_area_fetch, pv_area_scan): Don't declare.
1680         * prologue-value.c (struct pv_area::area_entry): Now member of
1681         pv_area.
1682         (struct pv_area): Move to prologue-value.h.
1683         (pv_area::pv_area): Rename from make_pv_area.
1684         (pv_area::~pv_area): Rename from free_pv_area.
1685         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1686         (clear_entries, find_entry, overlaps, store_would_trash, store)
1687         (fetch, find_reg, scan): Now member of pv_area.
1688         Remove "area" argument.  Update.
1689         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1690         Update.
1691         * mn10300-tdep.c (push_reg, check_for_saved)
1692         (mn10300_analyze_prologue): Update.
1693         * mep-tdep.c (is_arg_spill, check_for_saved)
1694         (mep_analyze_prologue): Update.
1695         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1696         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1697         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1698         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1699         Update.
1700         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1701         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1702
1703 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1704
1705         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1706         * linux-nat.c (linux_nat_delete_thread): New variable.
1707         (lwp_free): Invoke linux_nat_delete_thread if set.
1708         (linux_nat_set_delete_thread): New function.
1709         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1710         thread delete callback.
1711         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1712         (_initialize_arm_linux_nat): Assign thread delete callback.
1713         * s390-linux-nat.c (s390_delete_thread): New function.
1714         (_initialize_s390_nat): Assign thread delete callback.
1715         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1716         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1717         function.
1718         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1719         declaration.
1720         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1721         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1722
1723 2017-10-09  Tom Tromey  <tom@tromey.com>
1724
1725         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1726         std::string.
1727         * tui/tui-layout.c (enum tui_status): Use std::string.
1728
1729 2017-10-11  Tom Tromey  <tom@tromey.com>
1730
1731         * gdbthread.h (thread_command): Constify.
1732         * inferior.h (detach_command): Constify.
1733         * top.h (set_history, show_history): Constify.
1734         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1735         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1736         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1737         * printcmd.c (set_command): Constify.
1738         (non_const_set_command): New function.
1739         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1740         * breakpoint.c (enable_command, disable_command, delete_command)
1741         (catch_command, tcatch_command, set_breakpoint_cmd)
1742         (show_breakpoint_cmd): Constify.
1743         * macrocmd.c (macro_command): Constify.
1744         * infcmd.c (unset_command, kill_command, detach_command)
1745         (info_proc_cmd): Constify.
1746         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1747         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1748         (info_auto_load_cmd): Constify.
1749         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1750         (unset_tdesc_cmd): Constify.
1751         * ada-lang.c (set_ada_command, show_ada_command)
1752         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1753         * guile/guile.c (set_guile_command, show_guile_command)
1754         (info_guile_command): Constify.
1755         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1756         Constify.
1757         * skip.c (skip_command): Constify.
1758         * compile/compile.c (_initialize_compile): Constify.
1759         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1760         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1761         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1762         (maint_btrace_pt_show_cmd): Constify.
1763         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1764         Constify.
1765         * python/python.c (user_show_python, user_set_python): Constify.
1766         * mips-tdep.c (set_mips_command, show_mips_command)
1767         (set_mipsfpu_command): Constify.
1768         * record-btrace.c (cmd_record_btrace_start)
1769         (cmd_set_record_btrace, cmd_show_record_btrace)
1770         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1771         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1772         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1773         Constify.
1774         * symfile.c (overlay_command): Constify.
1775         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1776         * cli/cli-logging.c (set_logging_command, show_logging_command):
1777         Constify.
1778         * cli/cli-dump.c (dump_command, append_command)
1779         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1780         (tekhex_dump_command, binary_dump_command)
1781         (binary_append_command): Constify.
1782         * cli/cli-decode.c (struct cmd_list_element): Change type of
1783         "fun".
1784         * cli/cli-cmds.c (info_command, show_command, set_debug)
1785         (show_debug): Constify.
1786         (show_command): Add non-const overload.
1787         * top.c (set_history, show_history): Constify.
1788         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1789         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1790         * target.c (target_command): Constify.
1791         * sparc64-tdep.c (info_adi_command): Constify.
1792         * record-full.c (cmd_record_full_start): Constify.
1793         (set_record_full_command): Constify.  Fix typo.
1794         (show_record_full_command): Constify.
1795         * thread.c (thread_command, thread_apply_command): Constify.
1796         * memattr.c (dummy_cmd): Constify.
1797         * value.c (function_command): Constify.
1798         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1799         * probe.c (info_probes_command): Constify.
1800         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1801         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1802         (show_thread_cmd, set_thread_default_cmd)
1803         (show_thread_default_cmd): Constify.
1804         (check_empty): Constify.
1805         * tracepoint.c (tfind_command): Constify.
1806         * cp-support.c (maint_cplus_command): Constify.
1807         * windows-tdep.c (info_w32_command): Constify.
1808         * record.c (cmd_record_start, set_record_command)
1809         (show_record_command, info_record_command, cmd_record_goto):
1810         Constify.
1811         * ravenscar-thread.c (set_ravenscar_command)
1812         (show_ravenscar_command): Constify.
1813         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1814         Constify.
1815         (add_internal_problem_command): Remove casts.
1816         * arc-tdep.c (maintenance_print_arc_command): Constify.
1817         * valprint.c (set_print, show_print, set_print_raw)
1818         (show_print_raw): Constify.
1819         * maint.c (maintenance_command, maintenance_info_command)
1820         (maintenance_print_command, maintenance_set_cmd)
1821         (maintenance_show_cmd, set_per_command_cmd)
1822         (show_per_command_cmd, maintenance_check_command): Constify.
1823         * language.c (set_check, show_check): Constify.
1824         * typeprint.c (show_print_type, set_print_type): Constify.
1825         * go32-nat.c (go32_info_dos_command): Constify.
1826
1827 2017-10-11  Tom Tromey  <tom@tromey.com>
1828
1829         * breakpoint.c (prepare_re_set_context): Remove.
1830         (breakpoint_re_set_one): Update.  Don't use cleanups.
1831         (breakpoint_re_set): Use scoped_restore, std::string, and
1832         scoped_restore_current_language.
1833
1834 2017-10-11  Tom Tromey  <tom@tromey.com>
1835
1836         * breakpoint.c (commands_command_1): Use std::string.
1837         (cleanup_executing_breakpoints): Remove.
1838         (bpstat_do_actions_1): Use scoped_restore.
1839         (bpstat_check_watchpoint): Use std::string.
1840         (decode_static_tracepoint_spec): Likewise.
1841         (break_range_command): Likewise.
1842         (watch_command_1): Likewise.
1843         (compare_breakpoints): Change argument types.
1844         (clear_command): Use std::vector.
1845         (cleanup_executing_breakpoints): Remove.
1846         (update_global_location_list): Use unique_xmalloc_ptr.
1847         (strace_command): Remove unused declaration.
1848
1849 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1850
1851         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1852         * NEWS: Mention new FreeBSD/arm native configuration.
1853         * configure.host: Add arm*-*-freebsd*.
1854         * configure.nat: Likewise.
1855         * arm-fbsd-nat.c: New file.
1856
1857 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1858
1859         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1860         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1861         * NEWS: Mention new FreeBSD/arm target.
1862         * configure.tgt: Add arm*-*-freebsd*.
1863         * arm-fbsd-tdep.c: New file.
1864         * arm-fbsd-tdep.h: New file.
1865
1866 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1867
1868         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1869         `gdbarch_elfcore_write_linux_prpsinfo'.
1870         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1871         method.
1872         (elf_internal_linux_prpsinfo): Remove declaration.
1873         * gdbarch.h: Regenerate.
1874         * gdbarch.c: Regenerate.
1875
1876 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1877
1878         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1879         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1880
1881 2017-10-11  Pedro Alves  <palves@redhat.com>
1882
1883         * breakpoint.c (reattach_breakpoints): Delete.
1884         * breakpoint.h (reattach_breakpoints): Delete.
1885
1886 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1887
1888         * symfile.c (registered_sym_fns): Make struct, not typedef.
1889         (DEF_VEC_O (registered_sym_fns)): Remove.
1890         (symtab_fns): Change type to std::vector.
1891         (add_symtab_fns): Adjust.
1892         (find_sym_fns): Adjust.
1893
1894 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1895
1896         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1897         * arc-tdep.h (arc_arch_is_em): New function.
1898         (arc_arch_is_hs): Likewise.
1899
1900 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1901
1902         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1903         parentheses in the declaration.
1904         (macro_lookup_inclusion): Likewise.
1905         (macro_lookup_definition): Likewise.
1906         * p-lang.h (pascal_builtin_types): Likewise.
1907         * tui/tui-data.c (tui_win_list): Likewise.
1908         * tui/tui-data.h (tui_win_list): Likewise.
1909         * utils.h (make_cleanup_free_section_addr_info): Likewise.
1910
1911 2017-10-11  Mark Rages  <markrages@gmail.com>
1912
1913         * target-memory.c (block_boundaries): Fix for block address not
1914         aligned on block size.
1915
1916 2017-10-10  Pedro Alves <palves@redhat.com>
1917             Tom Tromey  <tom@tromey.com>
1918
1919         * breakpoint.c (struct captured_breakpoint_query_args)
1920         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1921         (print_breakpoint): New.
1922         * breakpoint.h (print_breakpoint): Declare.
1923         * common/common-exceptions.h (enum return_reason): Remove
1924         references to catch_exceptions.
1925         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1926         Delete.
1927         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1928         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1929         * gdb.h: Delete.
1930         * gdbthread.h (thread_select): Declare.
1931         * mi/mi-cmd-break.c: Don't include gdb.h.
1932         (breakpoint_notify): Use print_breakpoint.
1933         * mi/mi-cmd-catch.c: Don't include gdb.h.
1934         * mi/mi-interp.c: Don't include gdb.h.
1935         (mi_print_breakpoint_for_event): New.
1936         (mi_breakpoint_created, mi_breakpoint_modified): Use
1937         mi_print_breakpoint_for_event.
1938         * mi/mi-main.c: Don't include gdb.h.
1939         (mi_cmd_thread_select): Parse the global thread ID here.  Use
1940         thread_select instead of gdb_thread_select.
1941         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1942         of using gdb_list_thread_ids.
1943         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
1944         FILEIO_ENOSYS here.
1945         (remote_fileio_request): Use TRY/CATCH instead of
1946         catch_exceptions.
1947         * symfile-mem.c (struct symbol_file_add_from_memory_args)
1948         (symbol_file_add_from_memory_wrapper): Delete.
1949         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1950         * thread.c: Don't include gdb.h.
1951         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1952         (thread_alive): Use thread_select.
1953         (do_captured_thread_select): Delete, parts salvaged as ...
1954         (thread_select): ... this new function.
1955         (gdb_thread_select): Delete.
1956
1957 2017-10-10  Pedro Alves  <palves@redhat.com>
1958             Tom Tromey  <tom@tromey.com>
1959
1960         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1961         and reverse logic.
1962         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1963         No longer macros.  Instead ...
1964         (enum wp_check_result): They're now values of this new
1965         enumeration.
1966         (watchpoint_check): Change return type to wp_check_result and
1967         parameter type to bpstat.
1968         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1969         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1970         catch_errors.  Reverse logic of watchpoint_check call.
1971         (breakpoint_re_set_one): Now returns void and takes a breakpoint
1972         pointer as parameter.
1973         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1974         * common/common-exceptions.c (throw_exception_sjlj): Update
1975         comments to avoid mentioning catch_errors.
1976         * exceptions.c (catch_errors): Delete.
1977         * exceptions.h: Update comments to avoid mentioning catch_errors.
1978         (catch_errors_ftype, catch_errors): Delete.
1979         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1980         (hook_stop_stub): Delete.
1981         (restore_selected_frame): Change return type to void, and
1982         parameter type to const frame_id &.
1983         (restore_infcall_control_state): Use TRY/CATCH instead of
1984         catch_errors.
1985         * main.c (captured_command_loop): Return void and remove
1986         parameter.  Remove references to catch_errors.
1987         (captured_main): Use TRY/CATCH instead of catch_errors.
1988         * objc-lang.c (objc_submethod_helper_data)
1989         (find_objc_msgcall_submethod_helper): Delete.
1990         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1991         catch_errors.
1992         * record-full.c (record_full_message): Return void.
1993         (record_full_message_args, record_full_message_wrapper): Delete.
1994         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1995         instead of catch_errors.
1996         * solib-aix.c (solib_aix_open_symbol_file_object): Change
1997         parameter type to int.
1998         * solib-darwin.c (open_symbol_file_object): Ditto.
1999         * solib-dsbt.c (open_symbol_file_object): Ditto.
2000         * solib-frv.c (open_symbol_file_object): Ditto.
2001         * solib-svr4.c (open_symbol_file_object): Ditto.
2002         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2003         * solib.c (update_solib_list): Use TRY/CATCH instead of
2004         catch_errors.
2005         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2006         Change type.
2007         * symmisc.c (struct print_symbol_args): Remove.
2008         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2009         (print_symbol): Change type.
2010         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2011         and remove parameters.
2012         (catch_errors): New.
2013         (get_windows_debug_event): Adjust.
2014
2015 2017-10-09  Tom Tromey  <tom@tromey.com>
2016
2017         * mi/mi-main.c (free_splay_tree): Remove.
2018         (list_available_thread_groups): Use splay_tree_up.
2019         * common/gdb_splay_tree.h: New file.
2020
2021 2017-10-09  Tom Tromey  <tom@tromey.com>
2022
2023         * mi/mi-main.c (do_nothing): Remove.
2024         (list_available_thread_groups): Update.
2025
2026 2017-10-09  Pedro Alves  <palves@redhat.com>
2027
2028         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2029         reading registers when switching context.
2030
2031 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2032
2033         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2034         (fbsd_convert_siginfo): Likewise.
2035         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2036
2037 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2038
2039         * configure.ac (try_guile_versions): Remove guile-2.2.
2040         * configure: Regenerate.
2041
2042 2017-10-09  Tom Tromey  <tom@tromey.com>
2043
2044         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2045         (COMPILE.pre): Use $(CXX).
2046
2047 2017-10-09  Pedro Alves  <palves@redhat.com>
2048
2049         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2050         Use bool.
2051         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2052         * cp-support.h (cp_remove_params): Now returns a
2053         gdb::unique_xmalloc_ptr.
2054         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2055         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2056         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2057         returning a gdb::unique_xmalloc_ptr.
2058         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2059         * stack.c (find_frame_funname): Adjust to cp_remove_params
2060         returning a gdb::unique_xmalloc_ptr.
2061
2062 2017-10-08  Tom Tromey  <tom@tromey.com>
2063
2064         * dwarf2read.c (dwarf2_get_dwz_file): Use
2065         gdb::unique_xmalloc_ptr.
2066         (find_slot_in_mapped_hash): Likewise.
2067         (dwarf2_physname): Likewise.
2068         (create_dwo_unit_in_dwp_v1): Use std::string.
2069         (create_dwo_unit_in_dwp_v2): Likewise.
2070         (lookup_dwo_cutu): Likewise.
2071         (inherit_abstract_dies): Use std::vector.
2072         (read_array_type): Likewise.
2073         (dwarf_decode_macros): Remove unused declaration.
2074         (unsigned_int_compar): Remove.
2075         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2076         (psymtabs_addrmap_cleanup): Remove.
2077
2078 2017-10-08  Tom Tromey  <tom@tromey.com>
2079
2080         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2081         * frame.h (frame_cleanup_after_sniffer): Declare.
2082         (frame_prepare_for_sniffer): Return void.
2083         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2084         type of argument.
2085         (frame_prepare_for_sniffer): Return void.
2086
2087 2017-10-08  Tom Tromey  <tom@tromey.com>
2088
2089         * utils.h (make_cleanup_value_free): Remove.
2090         * utils.c (do_value_free, struct cleanup): Remove.
2091         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2092         Use gdb_value_up.
2093         * value.h (struct value_deleter): New.
2094         (gdb_value_up): New typedef.
2095
2096 2017-10-08  Tom Tromey  <tom@tromey.com>
2097
2098         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2099         (make_cleanup_free_search_symbols): Remove.
2100         (search_symbols): Return std::vector.
2101         (symbol_search::compare_search_syms): Now member of
2102         symbol_search.  Change arguments.
2103         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2104         (symtab_symbol_info, rbreak_command): Update.
2105         * symtab.h (struct symbol_search) <next>: Remove.
2106         Add constructors.
2107         (symbol_search::operator<): New function.
2108         (symbol_search::operator==): New function.
2109         (search_symbols): Remove std::vector.
2110         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2111         (symbol_search::compare_search_syms): Declare.
2112
2113 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2114
2115         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2116         arch/aarch64-insn.o.
2117         Remove one rule.
2118         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2119
2120 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2121
2122         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2123         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2124         arch/arm-linux.o respectively.
2125         * configure.tgt: Likewise.
2126
2127 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2128
2129         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2130         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2131
2132 2017-10-06  Pedro Alves  <palves@redhat.com>
2133
2134         * windows-nat.c: Include <algorithm>.
2135
2136 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2137
2138         * configure.tgt (i386_tobjs): New variable.
2139         (amd64_tobjs): New variable.
2140         Set $cpu_obs and $os_obs.
2141
2142 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2143
2144         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2145         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2146         (clean): Remove object files and dependency files.
2147         (distclean): Remove the directory.
2148         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2149         * configure: Re-generated.
2150         * configure.tgt: Replace amd64.o with arch/amd64.o.
2151
2152 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2153
2154         PR build/22188
2155         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2156         and SETEND.
2157
2158 2017-10-05  Pedro Alves  <palves@redhat.com>
2159
2160         * linux-nat.c (linux_child_follow_fork): When following the parent
2161         and detaching the child, consult the parent thread's architecture
2162         instead of the child's.
2163
2164 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2165
2166         * ax.h: Do not include "doublest.h".
2167         (union agent_val): Remove.
2168
2169 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2170
2171         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2172         (decimal_to_string): Return std::string object.
2173         (decimal_from_string): Accept std::string object.  Return bool.
2174         (decimal_from_integral, decimal_from_doublest): Remove.
2175         (decimal_from_longest): Add prototype.
2176         (decimal_from_ulongest): Likewise.
2177         (decimal_to_longest): Likewise.
2178         (decimal_from_doublest): Likewise.
2179         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2180         (MAX_DECIMAL_STRING): Move here.
2181         (decimal_to_string): Return std::string object.
2182         (decimal_from_string): Accept std::string object.  Return bool.
2183         (decimal_from_integral): Remove, replace by ...
2184         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2185         (decimal_to_longest): New function.
2186         (decimal_from_floating): Remove, replace by ...
2187         (decimal_from_doublest): ... this new function.
2188         (decimal_to_doublest): Update to new decimal_to_string interface.
2189
2190         * value.c (unpack_long): Use decimal_to_longest.
2191         * valops.c (value_cast): Use decimal_from_doublest instead of
2192         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2193         decimal_from_integral.
2194         * valarith.c (value_args_as_decimal): Likewise.
2195         * valprint.c (print_decimal_floating): Update to new
2196         decimal_to_string interface.
2197         * printcmd.c (printf_decfloat): Likewise.
2198         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2199
2200 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2201
2202         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2203         * gdbtypes.c: Include "floatformat.h".
2204         * value.c: Likewise.
2205         * m68k-tdep.c: Likewise.
2206
2207         * findvar.c: Do not include "floatformat.h".
2208         * amd64-darwin-tdep.c: Likewise.
2209         * arm-linux-tdep.c: Likewise.
2210         * i386-darwin-tdep.c: Likewise.
2211         * i387-tdep.c: Likewise.
2212         * m68k-linux-tdep.c: Likewise.
2213         * mep-tdep.c: Likewise.
2214         * mips-tdep.c: Likewise.
2215         * nios2-tdep.c: Likewise.
2216         * s390-linux-tdep.c: Likewise.
2217         * sparc-obsd-tdep.c: Likewise.
2218         * sparc-tdep.c: Likewise.
2219         * sparc64-tdep.c: Likewise.
2220         * spu-tdep.c: Likewise.
2221         * tic6x-tdep.c: Likewise.
2222         * tilegx-tdep.c: Likewise.
2223         * vax-tdep.c: Likewise.
2224         * xstormy16-tdep.c: Likewise.
2225         * xtensa-tdep.c: Likewise.
2226
2227         * top.c: Do not include "doublest.h".
2228         * aarch64-tdep.c: Likewise.
2229         * alpha-tdep.c: Likewise.
2230         * arm-linux-tdep.c: Likewise.
2231         * m68k-linux-tdep.c: Likewise.
2232         * tilegx-tdep.c: Likewise.
2233         * xstormy16-tdep.c: Likewise.
2234
2235 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2236
2237         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2238         (mipsn32_fbsd_sigframe): Define.
2239         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2240         for FreeBSD/mipsn32.
2241
2242 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2243
2244         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2245         AT_HWCAP.
2246
2247 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2248
2249         * MAINTAINERS (Misc): Update my email address.
2250
2251 2017-10-04  Pedro Alves  <palves@redhat.com>
2252
2253         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2254         it instead of target_gdbarch.
2255         (get_remote_state, get_remote_packet_size): Adjust
2256         get_remote_arch_state calls, passing down target_gdbarch
2257         explicitly.
2258         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2259         'gdbarch' and use it instead of target_gdbarch.
2260         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2261         passing down target_gdbarch explicitly.
2262         (struct stop_reply) <arch>: New field.
2263         (remote_parse_stop_reply): Use the stopped thread's architecture,
2264         not the current inferior's.  Save the architecture in the
2265         stop_reply.
2266         (process_stop_reply): Use the stop reply's architecture.
2267         (process_g_packet, remote_fetch_registers)
2268         (remote_prepare_to_store, store_registers_using_G)
2269         (remote_store_registers): Adjust get_remote_arch_state calls,
2270         using the regcache's architecture.
2271         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2272         passing down target_gdbarch explicitly.
2273         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2274         beneath instead of calling target_gdbarch.
2275         * target.c (default_thread_architecture): Use the specified
2276         inferior's architecture, instead of the current inferior's
2277         architecture (via target_gdbarch).
2278
2279 2017-10-04  Pedro Alves  <palves@redhat.com>
2280
2281         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2282         case.
2283         (regcache_print): Handle !target_has_registers here instead.
2284
2285 2017-10-04  Pedro Alves  <palves@redhat.com>
2286
2287         * frame.c (create_test_frame): Delete.
2288         * frame.h (create_test_frame): Delete.
2289         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2290         (class regcache_test): Delete.
2291         (test_target_has_registers, test_target_has_stack)
2292         (test_target_has_memory, test_target_prepare_to_store)
2293         (test_target_store_registers): New functions.
2294         (test_target_ops): New class.
2295         (register_to_value_test): Error out if there's already a
2296         process_stratum (or higher) target pushed.  Create a fuller mock
2297         environment, with mock target_ops, inferior, address space, thread
2298         and inferior_ptid.
2299         * progspace.c (struct address_space): Move to ...
2300         * progspace.h (struct address_space): ... here.
2301         * regcache.h (regcache::~regcache, regcache::raw_write)
2302         [GDB_SELF_TEST]: No longer virtual.
2303
2304 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2305
2306         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2307
2308 2017-10-04  Pedro Alves  <palves@redhat.com>
2309
2310         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2311         out of 'between TRY and CATCH'.
2312
2313 2017-10-04  Pedro Alves  <palves@redhat.com>
2314
2315         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2316         * common/common-exceptions.h (TRY): Open an outermost scope.
2317         Expand intro comment.
2318         (CATCH): Reindent.
2319         (END_CATCH): Close the outermost scope.
2320         * completer.c (complete_line_internal): Add missing END_CATCH.
2321
2322 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2323
2324         * NEWS (Changes since GDB 8.0): Add entry about new
2325         'set-cwd-on-gdbserver' feature.
2326         (New remote packets): Add entry for QSetWorkingDir.
2327         * common/common-inferior.h (set_inferior_cwd): New prototype.
2328         * infcmd.c (set_inferior_cwd): Remove "static".
2329         (show_cwd_command): Expand text to include remote debugging.
2330         * remote.c: Add PACKET_QSetWorkingDir.
2331         (remote_protocol_features) <QSetWorkingDir>: New entry for
2332         PACKET_QSetWorkingDir.
2333         (extended_remote_set_inferior_cwd): New function.
2334         (extended_remote_create_inferior): Call
2335         "extended_remote_set_inferior_cwd".
2336         (_initialize_remote): Call "add_packet_config_cmd" for
2337         QSetWorkingDir.
2338
2339 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2340
2341         * NEWS (New commands): Mention "set/show cwd".
2342         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2343         "cd" command's help text.
2344         * common/common-inferior.h (get_inferior_cwd): New prototype.
2345         * infcmd.c (inferior_cwd_scratch): New global variable.
2346         (set_inferior_cwd): New function.
2347         (get_inferior_cwd): Likewise.
2348         (set_cwd_command): Likewise.
2349         (show_cwd_command): Likewise.
2350         (_initialize_infcmd): Add "set/show cwd" commands.
2351         * inferior.h (class inferior) <cwd>: New field.
2352         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2353         (fork_inferior): Change inferior's cwd before its execution.
2354         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2355         to CreateProcess.
2356
2357 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2358
2359         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2360         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2361         (COMMON_OBS): Add gdb_tilde_expand.o.
2362         * common/gdb_tilde_expand.c: New file.
2363         * common/gdb_tilde_expand.h: Likewise.
2364
2365 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2366
2367         * gdbarch.sh (objfile): Remove duplicate declaration.
2368         * gdbarch.h: Regenerate.
2369
2370 2017-10-03  Tom Tromey  <tom@tromey.com>
2371
2372         * utils.c (internal_vproblem): Use string_vprintf.
2373
2374 2017-10-03  Tom Tromey  <tom@tromey.com>
2375
2376         * printcmd.c (info_symbol_command): Use std::string.
2377
2378 2017-10-03  Tom Tromey  <tom@tromey.com>
2379
2380         * top.c (gdb_safe_append_history): Use std::string.
2381
2382 2017-10-03  Tom Tromey  <tom@tromey.com>
2383
2384         * event-top.c (stdin_event_handler): Update.
2385         * main.c (captured_main_1): Update.
2386         * top.h (make_delete_ui_cleanup): Remove.
2387         (struct ui): Add constructor and destructor.
2388         (new_ui, delete_ui): Remove.
2389         * top.c (make_delete_ui_cleanup): Remove.
2390         (new_ui_command): Use std::unique_ptr.
2391         (delete_ui_cleanup): Remove.
2392         (ui::ui): Rename from new_ui.  Update.
2393         (free_ui): Remove.
2394         (ui::~ui): Rename from delete_ui.  Update.
2395
2396 2017-10-03  Tom Tromey  <tom@tromey.com>
2397
2398         * symfile.c (load_progress): Use gdb::byte_vector.
2399
2400 2017-10-03  Tom Tromey  <tom@tromey.com>
2401
2402         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2403         declaration.
2404         * printcmd.c (x_command): Remove unused declaration.
2405         * symfile.c (symbol_file_command): Remove unused declaration.
2406
2407 2017-10-03  Tom Tromey  <tom@tromey.com>
2408
2409         * utils.c (internal_vproblem): Use std::string.
2410         (defaulted_query): Likewise.
2411
2412 2017-10-03  Tom Tromey  <tom@tromey.com>
2413
2414         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2415         * top.c (execute_command_to_string): Update.
2416         * utils.c (make_cleanup_restore_page_info): Remove.
2417         (do_restore_page_info_cleanup): Remove.
2418         (set_batch_flag_and_restore_page_info):
2419         New.
2420         (make_cleanup_restore_page_info): Remove.
2421         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2422         (~set_batch_flag_and_restore_page_info): New
2423         (make_cleanup_restore_uinteger): Remove.
2424         (make_cleanup_restore_integer): Remove.
2425         (struct restore_integer_closure): Remove.
2426         (restore_integer): Remove.
2427         * utils.h (struct set_batch_flag_and_restore_page_info): New
2428         class.
2429         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2430         (make_cleanup_restore_page_info): Remove.
2431         (make_cleanup_restore_uinteger) Remove.
2432         (make_cleanup_restore_integer) Remove.
2433
2434 2017-10-03  Tom Tromey  <tom@tromey.com>
2435
2436         * record-full.h (record_full_gdb_operation_disable_set): Return
2437         scoped_restore_tmpl<int>.
2438         * infrun.c (adjust_pc_after_break): Update.
2439         (handle_signal_stop): Update.
2440         * record-full.c (record_full_gdb_operation_disable_set): Return
2441         scoped_restore_tmpl<int>.
2442         (record_full_wait_1, record_full_insert_breakpoint)
2443         (record_full_remove_breakpoint, record_full_save)
2444         (record_full_goto_insn): Update.
2445
2446 2017-10-02  Tom Tromey  <tom@tromey.com>
2447
2448         PR rust/22236:
2449         * rust-lang.c (rust_val_print_str): New function.
2450         (val_print_struct): Call it.
2451         (rust_subscript): Preserve name of slice type.
2452
2453 2017-10-02  Tom Tromey  <tom@tromey.com>
2454
2455         * rust-lang.c (rust_subscript): Handle slices in
2456         EVAL_AVOID_SIDE_EFFECTS case.
2457
2458 2017-10-02  Tom Tromey  <tom@tromey.com>
2459
2460         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2461
2462 2017-10-02  Tom Tromey  <tom@tromey.com>
2463
2464         * rust-lang.h (rust_slice_type): Add "extern".
2465
2466 2017-10-02  Tom Tromey  <tom@tromey.com>
2467             Pedro Alves  <palves@redhat.com>
2468
2469         * ada-lang.h (ada_exc_info::operator<): Make const.
2470         (ada_exc_info::operator==): Make const.
2471         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2472         Make const.
2473
2474 2017-09-29  Tom Tromey  <tom@tromey.com>
2475
2476         * target.c (read_whatever_is_readable): Change type of "result".
2477         Update.
2478         (free_memory_read_result_vector): Remove.
2479         (read_memory_robust): Change return type.  Update.
2480         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2481         bin2hex, std::string.
2482         * target.h (memory_read_result_s): Remove typedef.
2483         (free_memory_read_result_vector): Remove.
2484         (read_memory_robust): Return std::vector.
2485
2486 2017-09-29  Tom Tromey  <tom@tromey.com>
2487
2488         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2489
2490 2017-09-29  Tom Tromey  <tom@tromey.com>
2491
2492         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2493         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2494         operator< and operator==.
2495         (ada_exceptions_list): Return a std::vector.
2496         * ada-lang.c (ada_exc_info::operator<): Rename from
2497         compare_ada_exception_info.
2498         (ada_exc_info::operator==): New.
2499         (sort_remove_dups_ada_exceptions_list): Change type of
2500         "exceptions".
2501         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2502         (ada_add_global_exceptions): Likewise.
2503         (ada_exceptions_list_1): Return a std::vector.
2504         (ada_exceptions_list): Likewise.
2505
2506 2017-09-29  Tom Tromey  <tom@tromey.com>
2507
2508         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2509         'std::set *'.
2510         (print_one_inferior): Update.
2511         (free_vector_of_ints): Remove.
2512         (list_available_thread_groups): Change "ids" to std::set.
2513         (mi_cmd_list_thread_groups): Update.
2514         (struct collect_cores_data) <core>: Now a std::set.
2515         (collect_cores): Update.
2516         (unique): Remove.
2517         (print_one_inferior): Update.
2518
2519 2017-09-29  Tom Tromey  <tom@tromey.com>
2520
2521         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2522         (mi_execute_async_cli_command): Likewise.
2523         (mi_cmd_trace_frame_collected): Use field_fmt.
2524
2525 2017-09-29  Tom Tromey  <tom@tromey.com>
2526
2527         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2528         gdb::byte_vector.
2529
2530 2017-09-29  Tom Tromey  <tom@tromey.com>
2531
2532         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2533
2534 2017-09-29  Tom Tromey  <tom@tromey.com>
2535
2536         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2537
2538 2017-09-29  Tom Tromey  <tom@tromey.com>
2539
2540         * varobj.h (varobj_gen_name): Return std::string.
2541         * varobj.c (varobj_gen_name): Return std::string.
2542         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2543         (mi_cmd_var_delete): Don't copy "name".
2544
2545 2017-09-29  Tom Tromey  <tom@tromey.com>
2546
2547         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2548         (mi_cmd_break_insert_1): Update.
2549
2550 2017-09-29  Tom Tromey  <tom@tromey.com>
2551
2552         * target.h (make_scoped_defer_target_commit_resume): Update.
2553         * target.c (make_scoped_defer_target_commit_resume): Rename from
2554         make_cleanup_defer_target_commit_resume.  Return a
2555         scoped_restore.
2556         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2557
2558 2017-09-29  Tom Tromey  <tom@tromey.com>
2559
2560         * main.c (captured_main_1): Remove unused declaration.
2561         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2562
2563 2017-09-29  Tom Tromey  <tom@tromey.com>
2564
2565         * symtab.c (search_symbols): Remove unused outer cleanup.
2566         (make_source_files_completion_list): Remove unused declaration.
2567
2568 2017-09-29  Tom Tromey  <tom@tromey.com>
2569
2570         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2571
2572 2017-09-29  Tom Tromey  <tom@tromey.com>
2573
2574         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2575         gdb::byte_vector.
2576
2577 2017-09-29  Tom Tromey  <tom@tromey.com>
2578
2579         * complaints.c (vcomplaint): Use std::string.
2580
2581 2017-09-29  Tom Tromey  <tom@tromey.com>
2582
2583         * tracepoint.c (trace_variable_command): Use std::string.
2584         (encode_actions_1): Remove unused declarations.
2585         (create_tsv_from_upload): Use std::string.
2586
2587 2017-09-29  Tom Tromey  <tom@tromey.com>
2588
2589         * cp-support.c (gdb_demangle): Use std::string.
2590
2591 2017-09-29  Tom Tromey  <tom@tromey.com>
2592
2593         * stack.c (parse_frame_specification): Use std::string
2594         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2595
2596 2017-09-29  Tom Tromey  <tom@tromey.com>
2597
2598         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2599
2600 2017-09-29  Tom Tromey  <tom@tromey.com>
2601
2602         * utils.c (vfprintf_maybe_filtered): Use std::string.
2603         (vfprintf_unfiltered): Likewise.
2604
2605 2017-09-29  Tom Tromey  <tom@tromey.com>
2606
2607         * event-top.c (top_level_prompt): Return std::string.
2608         (display_gdb_prompt): Update.
2609
2610 2017-09-29  Tom Tromey  <tom@tromey.com>
2611
2612         * unittests/common-utils-selftests.c (format): New function.
2613         (string_vprintf_tests): New function.
2614         (_initialize_common_utils_selftests): Register new tests.
2615         * common/common-utils.c (string_vprintf): New function.
2616         * common/common-utils.h (string_vprintf): Declare.
2617
2618 2017-09-29  Pedro Alves  <palves@redhat.com>
2619
2620         * common/rsp-low.c (unpack_varlen_hex): Constify.
2621         * common/rsp-low.h (unpack_varlen_hex): Constify.
2622         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2623         Constify.
2624         * remote.c (remote_set_permissions, read_ptid)
2625         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2626         (remote_static_tracepoint_marker_at)
2627         (remote_static_tracepoint_markers_by_strid)
2628         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2629         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2630         (parse_tracepoint_definition, parse_tsv_definition)
2631         (parse_static_tracepoint_marker_definition): Constify.
2632         * tracepoint.h (parse_static_tracepoint_marker_definition)
2633         (parse_trace_status, parse_tracepoint_status)
2634         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2635
2636 2017-09-29  Pedro Alves  <palves@redhat.com>
2637
2638         * remote.c (target_buf, target_buf_size): Delete.
2639         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2640         Use the connection's packet buffer instead.
2641         All callers adjusted.
2642         (_initialize_remote): Remove references to target_buf and
2643         target_buf_size.
2644
2645 2017-09-28  Pedro Alves  <palves@redhat.com>
2646
2647         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2648         unittests/common-utils-selftests.c.
2649         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2650         (COMMON_OBS): Remove utils-selftests.o.
2651         * utils-selftests.c: Move to ...
2652         * unittests/common-utils-selftests.c: ... here and rename self
2653         test to "string_printf".
2654
2655 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2656
2657         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2658         having NULL cus or tus.
2659
2660 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2661
2662         * arm-tdep.c: (convert_from_extended): Remove.
2663         (convert_to_extended): Likewise.
2664         (arm_extract_return_value): Use convert_typed_floating.
2665         (arm_store_return_value): Likewise.
2666
2667         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2668         * sh-tdep.c: Do not include "floatformat.h".
2669         (sh_littlebyte_bigword_type): New function.
2670         (sh_register_convert_to_virtual): Use convert_typed_floating.
2671         (sh_register_convert_to_raw): Likewise.
2672         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2673         (sh64_littlebyte_bigword_type): New function.
2674         (sh64_extract_return_value): Use convert_typed_floating.
2675         (sh64_register_convert_to_virtual): Likewise.
2676         (sh64_register_convert_to_raw): Likewise.
2677
2678 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2679
2680         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2681         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2682
2683         * gdbtypes.h (union type_specific): Make field floatformat hold
2684         just a single struct floatformat, not an array.
2685         (floatformat_from_type): Move here.
2686         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2687         changed TYPE_FLOATFORMAT definition.
2688         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2689         (recursive_dump_type): Likewise.
2690         (init_float_type): Install correct floatformat for byte order.
2691         (arch_float_type): Likewise.
2692
2693 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2694
2695         * gdbtypes.c (init_type): Change incoming argument from
2696         length-in-bytes to length-in-bits.  Assert length is a
2697         multiple of TARGET_CHAR_BITS.
2698         (arch_type, arch_flags_type): Likewise.
2699         (init_integer_type): Update call to init_type.
2700         (init_character_type): Likewise.
2701         (init_boolean_type): Likewise.
2702         (init_float_type): Likewise.
2703         (init_decfloat_type): Likewise.
2704         (init_complex_type): Likewise.
2705         (init_pointer_type): Likewise.
2706         (objfile_type): Likewise.
2707         (arch_integer_type): Update call to arch_type.
2708         (arch_character_type): Likewise.
2709         (arch_boolean_type): Likewise.
2710         (arch_float_type): Likewise.
2711         (arch_decfloat_type): Likewise.
2712         (arch_complex_type): Likewise.
2713         (arch_pointer_type): Likewise.
2714         (gdbtypes_post_init): Likewise.
2715
2716         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2717         (read_base_type): Likewise.
2718         * mdebugread.c (basic_type): Likewise.
2719         * stabsread.c (dbx_init_float_type): Likewise.
2720         (rs6000_builtin_type): Likewise.
2721         (read_range_type): Likewise.  Also, fix call to init_integer_type
2722         with erroneous length argument.
2723
2724         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2725         * d-lang.c (build_d_types): Likewise.
2726         * f-lang.c (build_fortran_types): Likewise.
2727         * go-lang.c (build_go_types): Likewise.
2728         * opencl-lang.c (build_opencl_types): Likewise.
2729         * jit.c (finalize_symtab): Likewise.
2730         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2731         (build_std_type_info_type): Likewise.
2732         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2733         update call to arch_flags_type.
2734
2735         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2736         arch_type.
2737         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2738         * windows-tdep.c (windows_get_tlb_type): Likewise.
2739
2740         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2741         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2742         * m32c-tdep.c (make_types): Likewise.
2743         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2744         (rl78_psw_type): Update call to arch_flags_type.
2745         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2746         * rx-tdep.c (rx_psw_type): Likewise.
2747         (rx_fpsw_type): Likewise.
2748         * sparc-tdep.c (sparc_psr_type): Likewise.
2749         (sparc_fsr_type): Likewise.
2750         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2751         (sparc64_ccr_type): Likewise.
2752         (sparc64_fsr_type): Likewise.
2753         (sparc64_fprs_type): Likewise.
2754
2755 2017-09-27  Tom Tromey  <tom@tromey.com>
2756
2757         * findcmd.c (find_command): Constify.
2758
2759 2017-09-27  Tom Tromey  <tom@tromey.com>
2760
2761         * ada-tasks.c (task_command_1, task_command): Constify.
2762
2763 2017-09-27  Tom Tromey  <tom@tromey.com>
2764
2765         * symtab.c (maintenance_print_symbol_cache)
2766         (maintenance_flush_symbol_cache)
2767         (maintenance_print_symbol_cache_statistics): Constify.
2768
2769 2017-09-27  Tom Tromey  <tom@tromey.com>
2770
2771         * inferior.c (detach_inferior_command, kill_inferior_command)
2772         (inferior_command): Constify.
2773
2774 2017-09-27  Tom Tromey  <tom@tromey.com>
2775
2776         * regcache.c (regcache_print, maintenance_print_registers)
2777         (maintenance_print_raw_registers)
2778         (maintenance_print_cooked_registers)
2779         (maintenance_print_register_groups)
2780         (maintenance_print_remote_registers): Constify.
2781
2782 2017-09-27  Tom Tromey  <tom@tromey.com>
2783
2784         * printcmd.c (map_display_numbers, undisplay_command)
2785         (enable_disable_display_command, enable_display_command)
2786         (disable_display_command): Constify.
2787
2788 2017-09-27  Tom Tromey  <tom@tromey.com>
2789
2790         * breakpoint.h (delete_command): Don't declare.
2791         * breakpoint.c (delete_command, enable_once_command)
2792         (enable_count_command, enable_delete_command, breakpoint_1)
2793         (maintenance_info_breakpoints, stopin_command, stopat_command)
2794         (delete_command, delete_trace_command, save_breakpoints)
2795         (save_breakpoints_command, save_tracepoints_command): Constify.
2796
2797 2017-09-27  Tom Tromey  <tom@tromey.com>
2798
2799         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2800         (skip_ws, extract_identifier, macro_define_command)
2801         (macro_undef_command, macro_list_command): Constify.
2802
2803 2017-09-27  Tom Tromey  <tom@tromey.com>
2804
2805         * infcmd.c (environment_info, set_environment_command)
2806         (unset_environment_command, path_info, info_proc_cmd_1)
2807         (info_proc_cmd_mappings, info_proc_cmd_stat)
2808         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2809         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2810
2811 2017-09-27  Tom Tromey  <tom@tromey.com>
2812
2813         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2814         Constify.
2815
2816 2017-09-27  Tom Tromey  <tom@tromey.com>
2817
2818         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2819
2820 2017-09-27  Tom Tromey  <tom@tromey.com>
2821
2822         * demangle.c (demangle_command): Constify.
2823
2824 2017-09-27  Tom Tromey  <tom@tromey.com>
2825
2826         * progspace.c (maintenance_info_program_spaces_command):
2827         Constify.
2828
2829 2017-09-27  Tom Tromey  <tom@tromey.com>
2830
2831         * compile/compile.c (check_raw_argument, compile_file_command)
2832         (compile_code_command, compile_print_command): Constify.
2833
2834 2017-09-27  Tom Tromey  <tom@tromey.com>
2835
2836         * reggroups.c (maintenance_print_reggroups): Constify.
2837
2838 2017-09-27  Tom Tromey  <tom@tromey.com>
2839
2840         * dwarf2read.c (save_gdb_index_command): Constify.
2841
2842 2017-09-27  Tom Tromey  <tom@tromey.com>
2843
2844         * stap-probe.c (info_probes_stap_command): Constify.
2845
2846 2017-09-27  Tom Tromey  <tom@tromey.com>
2847
2848         * fork-child.c (unset_exec_wrapper_command): Constify.
2849
2850 2017-09-27  Tom Tromey  <tom@tromey.com>
2851
2852         * btrace.c (get_uint, get_context_size, no_chunk)
2853         (maint_btrace_packet_history_cmd)
2854         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2855         (maint_info_btrace_cmd): Constify.
2856
2857 2017-09-27  Tom Tromey  <tom@tromey.com>
2858
2859         * reverse.c (delete_bookmark_command): Constify.
2860
2861 2017-09-27  Tom Tromey  <tom@tromey.com>
2862
2863         * remote.c (set_memory_packet_size)
2864         (set_memory_write_packet_size, show_memory_write_packet_size)
2865         (set_memory_read_packet_size, show_memory_read_packet_size)
2866         (compare_sections_command, packet_command, remote_put_command)
2867         (remote_get_command, remote_delete_command): Constify.
2868
2869 2017-09-27  Tom Tromey  <tom@tromey.com>
2870
2871         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2872         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2873         (set_mipsfpu_auto_command): Constify.
2874
2875 2017-09-27  Tom Tromey  <tom@tromey.com>
2876
2877         * cli/cli-cmds.h (cd_command): Constify.
2878         * cli/cli-cmds.c (cd_command): Constify.
2879
2880 2017-09-27  Tom Tromey  <tom@tromey.com>
2881
2882         * thread.c (thread_name_command, thread_find_command): Constify.
2883
2884 2017-09-27  Tom Tromey  <tom@tromey.com>
2885
2886         * probe.c (enable_probes_command, disable_probes_command):
2887         Constify.
2888
2889 2017-09-27  Tom Tromey  <tom@tromey.com>
2890
2891         * symfile.c (symbol_file_command): Constify.
2892         * gdbcore.h (deprecated_file_changed_hook): Constify.
2893         * exec.c (deprecated_file_changed_hook, exec_file_command)
2894         (file_command): Constify.
2895         * defs.h (symbol_file_command): Constify.
2896
2897 2017-09-27  Tom Tromey  <tom@tromey.com>
2898
2899         * remote-fileio.c (set_system_call_allowed)
2900         (show_system_call_allowed): Constify.
2901
2902 2017-09-27  Tom Tromey  <tom@tromey.com>
2903
2904         * tracepoint.c (delete_trace_variable_command)
2905         (tfind_end_command, tfind_start_command, tfind_pc_command)
2906         (tfind_tracepoint_command, tfind_line_command)
2907         (tfind_range_command, tfind_outside_command): Constify.
2908
2909 2017-09-27  Tom Tromey  <tom@tromey.com>
2910
2911         * ax-gdb.c (maint_agent_printf_command, agent_command)
2912         (agent_eval_command): Constify.
2913
2914 2017-09-27  Tom Tromey  <tom@tromey.com>
2915
2916         * tracepoint.c (info_scope_command): Constify.
2917         * python/python.c (gdbpy_decode_line): Constify.
2918         * python/py-breakpoint.c (bppy_init): Constify.
2919         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2920         * location.h: (new_linespec_location)
2921         (string_to_event_location_basic, string_to_event_location):
2922         Constify.
2923         * location.c (new_linespec_location)
2924         (string_to_event_location_basic, string_to_event_location):
2925         Constify.
2926         * linespec.h (decode_line_with_current_source)
2927         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2928         * linespec.c (linespec_lex_to_end)
2929         (decode_line_with_current_source)
2930         (decode_line_with_last_displayed): Constify.
2931         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2932         Constify.
2933         * cli/cli-cmds.c (edit_command, list_command): Constify.
2934         * breakpoint.h (until_break_command, watch_command_wrapper)
2935         (awatch_command_wrapper, rwatch_command_wrapper)
2936         (init_ada_exception_breakpoint): Constify.
2937         * breakpoint.c (break_command_1, dprintf_command)
2938         (break_range_command, watch_command_wrapper)
2939         (rwatch_command_wrapper, awatch_command_wrapper)
2940         (until_break_command, init_ada_exception_breakpoint)
2941         (strace_marker_create_sals_from_location, trace_command)
2942         (ftrace_command, strace_command, struct tracepoint): Constify.
2943         * ax-gdb.c (agent_command_1): Constify.
2944         * ada-lang.c (ada_exception_sal): Constify.
2945
2946 2017-09-27  Tom Tromey  <tom@tromey.com>
2947
2948         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2949         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2950         (get_context_size, no_chunk, get_insn_history_modifiers)
2951         (cmd_record_insn_history, get_call_history_modifiers)
2952         (cmd_record_call_history): Constify.
2953
2954 2017-09-27  Tom Tromey  <tom@tromey.com>
2955
2956         * source.c (show_substitute_path_command)
2957         (unset_substitute_path_command, set_substitute_path_command):
2958         Constify.
2959
2960 2017-09-27  Tom Tromey  <tom@tromey.com>
2961
2962         * typeprint.c (maintenance_print_type): Constify.
2963         * maint.c (maintenance_dump_me, maintenance_demangle)
2964         (maintenance_time_display, maintenance_info_sections)
2965         (maintenance_print_statistics, maintenance_deprecate)
2966         (maintenance_undeprecate): Constify.
2967         (maintenance_do_deprecate): Constify.  Use std::string.
2968         (maintenance_selftest): Constify.
2969         * gdbtypes.h (maintenance_print_type): Constify.
2970
2971 2017-09-27  Tom Tromey  <tom@tromey.com>
2972
2973         * hppa-tdep.c (unwind_command): Constify.
2974
2975 2017-09-27  Tom Tromey  <tom@tromey.com>
2976
2977         * target-descriptions.c (unset_tdesc_filename_cmd)
2978         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2979         Constify.
2980
2981 2017-09-27  Tom Tromey  <tom@tromey.com>
2982
2983         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2984
2985 2017-09-27  Tom Tromey  <tom@tromey.com>
2986
2987         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2988
2989 2017-09-27  Tom Tromey  <tom@tromey.com>
2990
2991         * tui/tui-regs.c (tui_reg_command): Constify.
2992
2993 2017-09-27  Tom Tromey  <tom@tromey.com>
2994
2995         * skip.c (skip_file_command, skip_function_command)
2996         (skip_enable_command, skip_disable_command, skip_delete_command):
2997         Constify.
2998
2999 2017-09-27  Tom Tromey  <tom@tromey.com>
3000
3001         * record-btrace.c (cmd_record_btrace_bts_start)
3002         (cmd_record_btrace_pt_start): Constify.
3003
3004 2017-09-27  Tom Tromey  <tom@tromey.com>
3005
3006         * symmisc.c (maintenance_print_symbols)
3007         (maintenance_print_msymbols, maintenance_print_objfiles)
3008         (maintenance_info_symtabs, maintenance_check_symtabs)
3009         (maintenance_expand_symtabs, maintenance_info_line_tables):
3010         Constify.
3011
3012 2017-09-27  Tom Tromey  <tom@tromey.com>
3013
3014         * top.c (new_ui_command): Constify.
3015
3016 2017-09-27  Tom Tromey  <tom@tromey.com>
3017
3018         * symfile.c (add_symbol_file_command)
3019         (remove_symbol_file_command, list_overlays_command)
3020         (map_overlay_command, unmap_overlay_command)
3021         (overlay_auto_command, overlay_manual_command)
3022         (overlay_off_command, overlay_load_command): Constify.
3023
3024 2017-09-27  Tom Tromey  <tom@tromey.com>
3025
3026         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3027         (info_spu_mailbox_command, info_spu_dma_command)
3028         (info_spu_proxydma_command): Constify.
3029
3030 2017-09-27  Tom Tromey  <tom@tromey.com>
3031
3032         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3033
3034 2017-09-27  Tom Tromey  <tom@tromey.com>
3035
3036         * cli/cli-script.c (user_defined_command): Constify.
3037
3038 2017-09-27  Tom Tromey  <tom@tromey.com>
3039
3040         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3041         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3042         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3043         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3044         (dump_binary_value, append_binary_memory, append_binary_value):
3045         Constify.
3046         (struct dump_context) <func>: Constify.
3047         (add_dump_command): Update.
3048
3049 2017-09-27  Tom Tromey  <tom@tromey.com>
3050
3051         * cli/cli-cmds.c (show_version, show_configuration)
3052         (source_command, show_user): Constify.
3053
3054 2017-09-27  Tom Tromey  <tom@tromey.com>
3055
3056         * target.c (maintenance_print_target_stack): Constify.
3057
3058 2017-09-27  Tom Tromey  <tom@tromey.com>
3059
3060         * interps.c (interpreter_exec_cmd): Constify.
3061
3062 2017-09-27  Tom Tromey  <tom@tromey.com>
3063
3064         * record-full.c (cmd_record_full_restore): Constify.
3065
3066 2017-09-27  Tom Tromey  <tom@tromey.com>
3067
3068         * memattr.c (enable_mem_command, disable_mem_command)
3069         (delete_mem_command): Constify.
3070
3071 2017-09-27  Tom Tromey  <tom@tromey.com>
3072
3073         * value.c (show_convenience): Constify.
3074
3075 2017-09-27  Tom Tromey  <tom@tromey.com>
3076
3077         * gdbcore.h (core_file_command): Update.
3078         * corefile.c (core_file_command): Constify.
3079
3080 2017-09-27  Tom Tromey  <tom@tromey.com>
3081
3082         * user-regs.c (maintenance_print_user_registers): Constify.
3083
3084 2017-09-27  Tom Tromey  <tom@tromey.com>
3085
3086         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3087
3088 2017-09-27  Tom Tromey  <tom@tromey.com>
3089
3090         * cp-support.c (first_component_command): Constify.
3091
3092 2017-09-27  Tom Tromey  <tom@tromey.com>
3093
3094         * psymtab.c (maintenance_print_psymbols)
3095         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3096         Constify.
3097
3098 2017-09-27  Tom Tromey  <tom@tromey.com>
3099
3100         * windows-tdep.c (display_tib): Constify.
3101
3102 2017-09-27  Tom Tromey  <tom@tromey.com>
3103
3104         * linux-fork.c (delete_checkpoint_command)
3105         (detach_checkpoint_command): Constify.
3106
3107 2017-09-27  Tom Tromey  <tom@tromey.com>
3108
3109         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3110
3111 2017-09-27  Tom Tromey  <tom@tromey.com>
3112
3113         * arc-tdep.c (dump_arc_instruction_command): Constify.
3114
3115 2017-09-27  Tom Tromey  <tom@tromey.com>
3116
3117         * valprint.c (set_radix, show_radix): Constify.
3118
3119 2017-09-27  Tom Tromey  <tom@tromey.com>
3120
3121         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3122
3123 2017-09-27  Tom Tromey  <tom@tromey.com>
3124
3125         * command.h (not_just_help_class_command): Update.
3126         * cli/cli-decode.h (not_just_help_class_command): Update.
3127         * cli/cli-decode.c (not_just_help_class_command): Constify.
3128
3129 2017-09-27  Tom Tromey  <tom@tromey.com>
3130
3131         * gdb_bfd.c (maintenance_info_bfds): Constify.
3132
3133 2017-09-27  Tom Tromey  <tom@tromey.com>
3134
3135         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3136         overloads.
3137         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3138         (do_const_cfunc): New function.
3139         (cmd_cfunc_eq): New overload.
3140         (cli_user_command_p): Check do_const_cfunc.
3141         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3142         const_cfunc.
3143         * command.h (add_cmd): Add const overload and no-function
3144         overload.
3145         (set_cmd_cfunc): Add const overload.
3146         (cmd_const_cfunc_ftype): Declare.
3147         (cmd_cfunc_eq): Add const overload.
3148         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3149         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3150         overload.
3151
3152 2017-09-27  Tom Tromey  <tom@tromey.com>
3153
3154         * macroexp.c (get_next_token_for_substitution): New function.
3155         (substitute_args): Call it.  Check for __VA_OPT__.
3156
3157 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3158             Pedro Alves <palves@redhat.com>
3159
3160         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3161         producer_is_icc_lt_14.
3162         (producer_is_icc_lt_14): New function.
3163         (check_producer): Add code for checking version of ICC.
3164         (producer_is_icc): Move to producer.c.
3165         (read_structure_type): Restrict ICC workaround to ICC<14.
3166         * producer.c: Include selftest.h.
3167         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3168         New functions.
3169         * producer.h (producer_is_icc): New declaration.
3170
3171 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3172
3173         * Makefile.in (SFILES): Add producer.c.
3174         (COMMON_OBS): Add producer.o
3175         * amd64-tdep.c (producer.h): Add new include.
3176         * dwarf2read.c (producer.h): Add new include.
3177         * producer.c: New file.
3178         * producer.h: New file.
3179         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3180         producer.c.
3181         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3182         producer.h.
3183
3184 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3185
3186         * configure.ac: Search ncursesw before ncurses.
3187         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3188         * gdb_curses.h: Include <ncursesw/ncurses.h>
3189         * config.in, configure: Regenerate.
3190
3191 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3192
3193         PR gdb/22185
3194         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3195         obsolete.
3196         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3197         Remove i386sol2 support.
3198         * configure.nat <i386sol2>: Remove.
3199         <sol2-64>: Fold into ...
3200         <sol2>: ... this.
3201         Move common settings to default section.
3202         Add sol-thread.o.
3203         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3204         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3205         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3206         <i[34567]86-*-solaris*>: Remove.
3207         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3208
3209         * configure.ac: Remove wctype in libw check.
3210         (_MSE_INT_H): Don't define on Solaris 7-9.
3211         <solaris*>: Remove libthread_db.so.1 check.
3212         * configure: Regenerate.
3213         * config.in: Regenerate.
3214
3215         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3216         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3217         (gdb_ps_size_t): Remove.
3218         Use base types in users.
3219         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3220
3221         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3222
3223 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3224
3225         PR build/22206
3226         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3227         (adi_is_addr_mapped): Likewise.
3228         (PSR_ICC): Don't redefine.
3229         (PSR_IMPL): Likewise.
3230
3231 2017-09-25  Tom Tromey  <tom@tromey.com>
3232
3233         * regcache.c (regcache::dump): Use string_printf.
3234
3235 2017-09-25  Tom Tromey  <tom@tromey.com>
3236
3237         * regcache.c (class regcache_invalidator): New.
3238         (struct register_to_invalidate): Remove.
3239         (make_cleanup_regcache_invalidate): Remove.
3240         (regcache::raw_write): Use regcache_invalidator.
3241
3242 2017-09-25  Tom Tromey  <tom@tromey.com>
3243
3244         * spu-tdep.c (spu2ppu_sniffer): Update.
3245         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3246         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3247         Remove.
3248         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3249         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3250         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3251         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3252         (frame_pop): Update.
3253
3254 2017-09-25  Tom Tromey  <tom@tromey.com>
3255
3256         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3257         * regcache.h (regcache_xfree): Don't declare.
3258         * regcache.c (regcache_xfree): Remove.
3259         (do_regcache_xfree): Use delete.
3260         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3261         * linux-fork.c (free_fork): Use delete.
3262         (fork_save_infrun_state): Likewise.
3263         * jit.c (jit_dealloc_cache): Use delete.
3264         * infrun.c (discard_infcall_suspend_state): Use delete.
3265
3266 2017-09-25  Tom Tromey  <tom@tromey.com>
3267
3268         * regcache.h (regcache_xmalloc): Don't declare.
3269         (regcache_raw_set_cached_value): Update comment.
3270         * regcache.c (regcache_xmalloc): Remove.
3271         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3272         * jit.c (jit_frame_sniffer): Use new.
3273         * frame.c (frame_save_as_regcache): Use new.
3274
3275 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3276
3277         * NEWS: Advertise support for guarded-storage registers on IBM z.
3278
3279 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3280
3281         * s390-linux-nat.c (have_regset_gs): New static variable.
3282         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3283         control block and guarded-storage broadcast control regsets.
3284         (s390_read_description): Detect whether the target has
3285         guarded-storage support, return appropriate tdesc.
3286         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3287         (features/s390x-gs-linux64.c): Likewise.
3288         (struct gdbarch_tdep) <have_gs>: New field.
3289         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3290         (s390_gsbc_regset): New variables.
3291         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3292         and s390_gsbc_regset, if applicable.
3293         (s390_core_read_description): Check whether core file was from a
3294         target with guarded-storage support; include appropriate regsets.
3295         (s390_gdbarch_init): Add registers for guarded-storage support.
3296         (_initialize_s390_tdep): Initialize new target descriptions that
3297         include registers for guarded-storage support.
3298         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3299         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3300         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3301         (S390_NUM_REGS): Adjust macro definition.
3302         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3303         (tdesc_s390x_gs_linux64): New declarations.
3304
3305 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3306
3307         * features/s390-gs-linux64.xml: New file.
3308         * features/s390-gs.xml: New file.
3309         * features/s390-gsbc.xml: New file.
3310         * features/s390x-gs-linux64.xml: New file.
3311         * features/Makefile (WHICH): Add s390-gs-linux64 and
3312         s390x-gs-linux64.
3313         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3314         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3315         * features/s390-gs-linux64.c: New generated file.
3316         * features/s390x-gs-linux64.c: New file.
3317         * regformats/s390-gs-linux64.dat: New file.
3318         * regformats/s390x-gs-linux64.dat: New file.
3319
3320 2017-09-23  Tom Tromey  <tom@tromey.com>
3321
3322         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3323
3324 2017-09-22  Tom Tromey  <tom@tromey.com>
3325
3326         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3327         type to scoped_restore_tmpl.
3328         <scoped_input_handler>: Initialize m_quit_handler directly.
3329
3330 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3331
3332         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3333         (cd_command): Likewise.  Free "current_directory" before
3334         assigning to it.
3335         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3336         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3337         * top.c (gdb_dirbuf): Remove global declaration.
3338         * top.h (gdb_dirbuf): Likewise.
3339
3340 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3341
3342         * gnulib/aclocal.m4: Regenerate.
3343         * gnulib/config.in: Regenerate.
3344         * gnulib/configure: Regenerate.
3345         * gnulib/import/Makefile.am: Regenerate.
3346         * gnulib/import/Makefile.in: Regenerate.
3347         * gnulib/import/assure.h: New file.
3348         * gnulib/import/at-func.c: Likewise
3349         * gnulib/import/chdir-long.c: New file.
3350         * gnulib/import/chdir-long.h: New file.
3351         * gnulib/import/cloexec.c: New file.
3352         * gnulib/import/cloexec.h: New file.
3353         * gnulib/import/close.c: New file.
3354         * gnulib/import/closedir.c: New file.
3355         * gnulib/import/dirent-private.h: New file.
3356         * gnulib/import/dup-safer.c: New file.
3357         * gnulib/import/dup.c: New file.
3358         * gnulib/import/dup2.c: New file.
3359         * gnulib/import/error.c: New file.
3360         * gnulib/import/error.h: New file.
3361         * gnulib/import/exitfail.c: New file.
3362         * gnulib/import/exitfail.h: New file.
3363         * gnulib/import/fchdir.c: New file.
3364         * gnulib/import/fcntl.c: New file.
3365         * gnulib/import/fcntl.in.h: New file.
3366         * gnulib/import/fd-hook.c: New file.
3367         * gnulib/import/fd-hook.h: New file.
3368         * gnulib/import/fd-safer.c: New file.
3369         * gnulib/import/fdopendir.c: New file.
3370         * gnulib/import/filename.h: New file.
3371         * gnulib/import/filenamecat-lgpl.c: New file.
3372         * gnulib/import/filenamecat.h: New file.
3373         * gnulib/import/fstat.c: New file.
3374         * gnulib/import/fstatat.c: New file.
3375         * gnulib/import/getcwd-lgpl.c: New file.
3376         * gnulib/import/getcwd.c: New file.
3377         * gnulib/import/getdtablesize.c: New file.
3378         * gnulib/import/getlogin_r.c: New file.
3379         * gnulib/import/getprogname.c: New file.
3380         * gnulib/import/getprogname.h: New file.
3381         * gnulib/import/gettext.h: New file.
3382         * gnulib/import/glob-libc.h: New file.
3383         * gnulib/import/glob.c: New file.
3384         * gnulib/import/glob.in.h: New file.
3385         * gnulib/import/intprops.h: New file.
3386         * gnulib/import/m4/chdir-long.m4: New file.
3387         * gnulib/import/m4/close.m4: New file.
3388         * gnulib/import/m4/closedir.m4: New file.
3389         * gnulib/import/m4/d-ino.m4: New file.
3390         * gnulib/import/m4/d-type.m4: New file.
3391         * gnulib/import/m4/dup.m4: New file.
3392         * gnulib/import/m4/dup2.m4: New file.
3393         * gnulib/import/m4/error.m4: New file.
3394         * gnulib/import/m4/fchdir.m4: New file.
3395         * gnulib/import/m4/fcntl.m4: New file.
3396         * gnulib/import/m4/fcntl_h.m4: New file.
3397         * gnulib/import/m4/fdopendir.m4: New file.
3398         * gnulib/import/m4/filenamecat.m4: New file.
3399         * gnulib/import/m4/fstat.m4: New file.
3400         * gnulib/import/m4/fstatat.m4: New file.
3401         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3402         * gnulib/import/m4/getcwd-path-max.m4: New file.
3403         * gnulib/import/m4/getcwd.m4: New file.
3404         * gnulib/import/m4/getdtablesize.m4: New file.
3405         * gnulib/import/m4/getlogin_r.m4: New file.
3406         * gnulib/import/m4/getprogname.m4: New file.
3407         * gnulib/import/m4/glob.m4: New file.
3408         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3409         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3410         * gnulib/import/m4/mempcpy.m4: New file.
3411         * gnulib/import/m4/memrchr.m4: New file.
3412         * gnulib/import/m4/mode_t.m4: New file.
3413         * gnulib/import/m4/msvc-inval.m4: New file.
3414         * gnulib/import/m4/msvc-nothrow.m4: New file.
3415         * gnulib/import/m4/open.m4: New file.
3416         * gnulib/import/m4/openat.m4: New file.
3417         * gnulib/import/m4/opendir.m4: New file.
3418         * gnulib/import/m4/readdir.m4: New file.
3419         * gnulib/import/m4/realloc.m4: New file.
3420         * gnulib/import/m4/rewinddir.m4: New file.
3421         * gnulib/import/m4/save-cwd.m4: New file.
3422         * gnulib/import/m4/strdup.m4: New file.
3423         * gnulib/import/m4/strerror.m4: New file.
3424         * gnulib/import/m4/unistd-safer.m4: New file.
3425         * gnulib/import/mempcpy.c: New file.
3426         * gnulib/import/memrchr.c: New file.
3427         * gnulib/import/msvc-inval.c: New file.
3428         * gnulib/import/msvc-inval.h: New file.
3429         * gnulib/import/msvc-nothrow.c: New file.
3430         * gnulib/import/msvc-nothrow.h: New file.
3431         * gnulib/import/open.c: New file.
3432         * gnulib/import/openat-die.c: New file.
3433         * gnulib/import/openat-priv.h: New file.
3434         * gnulib/import/openat-proc.c: New file.
3435         * gnulib/import/openat.c: New file.
3436         * gnulib/import/openat.h: New file.
3437         * gnulib/import/opendir.c: New file.
3438         * gnulib/import/pipe-safer.c: New file.
3439         * gnulib/import/readdir.c: New file.
3440         * gnulib/import/realloc.c: New file.
3441         * gnulib/import/rewinddir.c: New file.
3442         * gnulib/import/save-cwd.c: New file.
3443         * gnulib/import/save-cwd.h: New file.
3444         * gnulib/import/strdup.c: New file.
3445         * gnulib/import/strerror-override.c: New file.
3446         * gnulib/import/strerror-override.h: New file.
3447         * gnulib/import/strerror.c: New file.
3448         * gnulib/import/unistd--.h: New file.
3449         * gnulib/import/unistd-safer.h: New file.
3450         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3451         "getcwd" and "glob".
3452         * ser-tcp.c: Undefine "close" before redefining it.
3453
3454 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3455
3456         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3457         get rid of res_val.
3458
3459 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3460
3461         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3462         <sol2,sparc>: Likewise.
3463         <sol2-64,i386>: Likewise.
3464
3465         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3466         -Wdeprecated-declarations on *-*-solaris*.
3467         * configure: Regenerate.
3468
3469         * procfs.c: Include "nat/inferior.h".
3470         (procfs_info_proc): Fix typo.
3471
3472 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3473
3474         * remote.c (vector): Include.
3475         (struct private_thread_info): Add field, thread_handle.
3476         (free_private_thread_info): Deallocate storage associated with
3477         thread handle.
3478         (get_private_info_thread): Initialize `thread_handle' field.
3479         (struct thread_item): Add field, thread_handle.
3480         (clear_threads_listing_context): Deallocate storage associated
3481         with thread handle.
3482         (start_thread): Add support for "handle" attribute.
3483         (thread_attributes): Add "handle".
3484         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3485         field.
3486         (remote_update_thread_list): Update thread_handle.
3487         (remote_thread_handle_to_thread_info): New function.
3488         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3489
3490 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3491
3492         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3493         function.
3494         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3495         * python/python-internal.h (thread_object_type): Declare.
3496
3497 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3498
3499         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3500         (target_thread_handle_to_thread_info): Declare.
3501         * target.c (target_thread_handle_to_thread_info): New function.
3502         * target-delegates.c: Regenerate.
3503         * gdbthread.h (find_thread_by_handle): Declare.
3504         * thread.c (find_thread_by_handle): New function.
3505         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3506         function.
3507         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3508
3509 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3510
3511         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3512
3513 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3514
3515         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3516
3517 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3518
3519         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3520         to gdb_target_obs.
3521
3522 2017-09-20  Tom Tromey  <tom@tromey.com>
3523
3524         * breakpoint.c (struct counted_command_line): Remove.
3525         (breakpoint_commands): Update.
3526         (alloc_counted_command_line, incref_counted_command_line)
3527         (decref_counted_command_line, do_cleanup_counted_command_line)
3528         (make_cleanup_decref_counted_command_line): Remove.
3529         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3530         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3531         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3532         (save_breakpoints): Update.
3533         * breakpoint.h (counted_command_line): Now a typedef to
3534         shared_ptr.
3535         (struct breakpoint) <commands>: Now a counted_command_line.
3536         (struct bpstats) <command>: Likewise.
3537
3538 2017-09-20  Tom Tromey  <tom@tromey.com>
3539
3540         * breakpoint.c (struct commands_info, do_map_commands_command):
3541         Remove.
3542         (commands_command_1): Update.
3543         (iterate_over_related_breakpoints): Take a function_view.
3544         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3545         (delete_command): Update.
3546         (map_breakpoint_numbers): Take a function_view.
3547         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3548         (disable_command): Update.
3549         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3550         (enable_command): Update.
3551         (struct disp_data, do_enable_breakpoint_disp)
3552         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3553         (do_map_enable_delete_breakpoint): Remove.
3554         (enable_once_command, enable_count_command, enable_delete_command)
3555         (delete_trace_variable_command): Update.
3556
3557 2017-09-20  Tom Tromey  <tom@tromey.com>
3558
3559         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3560         (bpstat_clear): Use delete.
3561         (bpstats): New constructors.
3562         (bpstat_copy, bpstat_stop_status): Use new.
3563         (dprintf_after_condition_true): Update.
3564         * breakpoint.h (bpstats::bpstats): Add constructors.
3565         (bpstats::~bpstats): Add destructor.
3566
3567 2017-09-20  Pedro Alves  <palves@redhat.com>
3568
3569         * eval.c (make_params): Delete, refactored as ...
3570         (class fake_method): ... this new type's ctor.
3571         (fake_method::~fake_method): New.
3572         (evaluate_subexp_standard): Use 'fake_method'.
3573
3574 2017-09-20  Tom Tromey  <tom@tromey.com>
3575
3576         * windows-nat.c (get_windows_debug_event, windows_wait)
3577         (do_initial_windows_stuff, windows_attach): Update.
3578         * utils.c (vwarning, internal_vproblem): Update.
3579         (ui_unregister_input_event_handler_cleanup)
3580         (prepare_to_handle_input): Remove.
3581         (class scoped_input_handler): New.
3582         (defaulted_query, prompt_for_continue): Update.
3583         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3584         Update.
3585         * top.c (undo_terminal_modifications_before_exit): Update.
3586         * target/target.h (target_terminal_init, target_terminal_inferior)
3587         (target_terminal_ours): Don't declare.
3588         (class target_terminal): New.
3589         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3590         (target_terminal_ours_for_output)
3591         (make_cleanup_restore_target_terminal): Don't declare.
3592         (target_terminal_info): Remove.
3593         * target.c (enum terminal_state, terminal_state): Remove.
3594         (target_terminal::terminal_state): Define.
3595         (target_terminal::init): Rename from target_terminal_init.
3596         (target_terminal::inferior): Rename from
3597         target_terminal_inferior.
3598         (target_terminal::ours): Rename from target_terminal_ours.
3599         (target_terminal::ours_for_output): Rename from
3600         target_terminal_ours_for_output.
3601         (target_terminal::info): New method.
3602         (cleanup_restore_target_terminal)
3603         (make_cleanup_restore_target_terminal): Remove.
3604         * solib.c (handle_solib_event): Update.
3605         * remote.c (remote_serial_quit_handler): Update.
3606         (remote_terminal_inferior, remote_wait_as): Update.
3607         * record-full.c (record_full_wait_1): Update.
3608         * nto-procfs.c (procfs_create_inferior): Update.
3609         * nat/fork-inferior.c (startup_inferior): Update.
3610         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3611         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3612         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3613         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3614         (mi_breakpoint_created, mi_breakpoint_deleted)
3615         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3616         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3617         (mi_user_selected_context_changed, report_initial_inferior):
3618         Update.
3619         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3620         (linux_nat_terminal_inferior): Update.
3621         * infrun.c (follow_fork_inferior)
3622         (handle_vfork_child_exec_or_exit, do_target_resume)
3623         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3624         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3625         Update.
3626         * inflow.c (child_terminal_init, info_terminal_command): Update.
3627         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3628         (attach_command): Update.
3629         * infcall.c (call_thread_fsm_should_stop): Update.
3630         * gnu-nat.c (gnu_attach): Update.
3631         * extension.c (struct active_ext_lang_state)
3632         (restore_active_ext_lang): Update.
3633         * exceptions.c (print_flush): Update.
3634         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3635         (struct quit_handler_cleanup_data, restore_quit_handler)
3636         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3637         Remove.
3638         * cp-support.c (gdb_demangle): Update.
3639         * breakpoint.c (update_inserted_breakpoint_locations)
3640         (insert_breakpoint_locations, handle_jit_event)
3641         (disable_breakpoints_in_unloaded_shlib): Update.
3642         * annotate.c (annotate_breakpoints_invalid)
3643         (annotate_frames_invalid): Update.
3644
3645 2017-09-20  Tom Tromey  <tom@tromey.com>
3646
3647         * main.c (catch_command_errors): Rename from
3648         catch_command_errors_const.
3649         (captured_main_1): Update.
3650
3651 2017-09-20  Pedro Alves  <palves@redhat.com>
3652
3653         * cli/cli-cmds.c (list_command): Use print_sal_location.
3654         (print_sal_location): New function.
3655         (ambiguous_line_spec): Use print_sal_location.
3656         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3657         * symtab.c (find_function_start_sal): Likewise.
3658         * symtab.h (symtab_and_line::symbol): New field.
3659
3660 2017-09-20  Pedro Alves  <palves@redhat.com>
3661
3662         * linespec.c (minsym_found): Handle non-text minsyms.
3663         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3664
3665 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3666
3667         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3668         backslash.
3669
3670 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3671
3672         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3673         vmovups instead vmovaps.
3674         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3675
3676 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3677
3678         * NEWS (Changes since GDB 8.0): Add starti.
3679         * infcmd.c (enum run_break): New.
3680         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3681         case.
3682         (run_command): Use enum run_how.
3683         (start_command): Likewise.
3684         (starti_command): New function.
3685         (RUN_ARGS_HELP): New macro.
3686         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3687         commands.  Add starti command.
3688
3689 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3690
3691         * Makefile.in (monitor.o): Remove the rule.
3692
3693 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3694
3695         * annotate.h (struct annotate_arg_emitter): Use
3696         DISABLE_COPY_AND_ASSIGN.
3697         * common/refcounted-object.h (refcounted_object): Likewise.
3698         * completer.h (struct completion_result): Likewise.
3699         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3700         * filename-seen-cache.h (filename_seen_cache): Likewise.
3701         * gdbcore.h (thread_section_name): Likewise.
3702         * gdb_regex.h (compiled_regex): Likewise.
3703         * gdbthread.h (scoped_restore_current_thread): Likewise.
3704         * inferior.h (scoped_restore_current_inferior): Likewise.
3705         * jit.c (jit_reader): Likewise.
3706         * linespec.h (struct linespec_result): Likewise.
3707         * mi/mi-parse.h (struct mi_parse): Likewise.
3708         * nat/fork-inferior.c (execv_argv): Likewise.
3709         * progspace.h (scoped_restore_current_program_space): Likewise.
3710         * python/python-internal.h (class gdbpy_enter): Likewise.
3711         * regcache.h (regcache): Likewise.
3712         * target-descriptions.c (struct tdesc_reg): Likewise.
3713         (struct tdesc_type): Likewise.
3714         (struct tdesc_feature): Likewise.
3715         * ui-out.h (ui_out_emit_type): Likewise.
3716
3717 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3718
3719         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3720         label abort_expression.
3721
3722 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3723
3724         * common/buffer.c (buffer_xml_printf): Adjust.
3725         * common/xml-utils.c (xml_escape_text): Change return type to
3726         std::string, update code accordingly.
3727         * common/xml-utils.h (xml_escape_text): Change return type to
3728         std::string.
3729         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3730         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3731         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3732         Adjust.
3733
3734 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3735
3736         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3737         (SUBDIR_UNITTESTS_OBS): Add new object file.
3738         * unittests/xml-utils-selftests.c: New file.
3739
3740 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3741
3742         * common/selftest.h (selftest): New struct/interface.
3743         (register_test): Add name parameter, add new overload.
3744         (run_tests): Add filter parameter.
3745         (for_each_selftest_ftype): New typedef.
3746         (for_each_selftest): New declaration.
3747         * common/selftest.c (tests): Change type to
3748         map<string, unique_ptr<selftest>>.
3749         (simple_selftest): New struct.
3750         (register_test): New function.
3751         (register_test): Add name parameter and use it.
3752         (run_tests): Add filter parameter and use it.  Add prints.
3753         Adjust to vector -> map change.
3754         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3755         registering selftests.
3756         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3757         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3758         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3759         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3760         * findvar.c (_initialize_findvar): Likewise.
3761         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3762         * maint.c (maintenance_selftest): Update call to run_tests.
3763         (maintenance_info_selftests): New function.
3764         (_initialize_maint_cmds): Register "maintenance info selftests"
3765         command.  Update "maintenance selftest" doc.
3766         * regcache.c (_initialize_regcache): Add names when registering
3767         selftests.
3768         * rust-exp.y (_initialize_rust_exp): Likewise.
3769         * selftest-arch.c (gdbarch_selftest): New struct.
3770         (gdbarch_tests): Remove.
3771         (register_test_foreach_arch): Add name parameter.  Call
3772         register_test.
3773         (tests_with_arch): Remove, move most content to
3774         gdbarch_selftest::operator().
3775         (_initialize_selftests_foreach_arch): Remove.
3776         * selftest-arch.h (register_test_foreach_arch): Add name
3777         parameter.
3778         (run_tests_with_arch): New declaration.
3779         * utils-selftests.c (_initialize_utils_selftests): Add names
3780         when registering selftests.
3781         * utils.c (_initialize_utils): Likewise.
3782         * unittests/array-view-selftests.c
3783         (_initialize_array_view_selftests): Likewise.
3784         * unittests/environ-selftests.c (_initialize_environ_selftests):
3785         Likewise.
3786         * unittests/function-view-selftests.c
3787         (_initialize_function_view_selftests): Likewise.
3788         * unittests/offset-type-selftests.c
3789         (_initialize_offset_type_selftests): Likewise.
3790         * unittests/optional-selftests.c
3791         (_initialize_optional_selftests): Likewise.
3792         * unittests/scoped_restore-selftests.c
3793         (_initialize_scoped_restore_selftests): Likewise.
3794         * NEWS: Document "maintenance selftest" and "maint info
3795         selftests".
3796
3797 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3798
3799         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3800         scoped_restore.
3801
3802 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3803
3804         * mi/mi-main.c (mi_load_progress): Make uiout variable
3805         a unique_ptr.
3806
3807 2017-09-15  Pedro Alves  <palves@redhat.com>
3808
3809         * compile/compile-c-types.c (convert_enum, convert_int)
3810         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3811
3812 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3813
3814         * dwarf2read.c (copy_string): Remove.
3815         (parse_macro_definition): Replace copy_string with savestring.
3816
3817 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3818
3819         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3820         gdb_target_obs.
3821         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3822         Likewise.
3823         (i[34567]86-*-linux*): Likewise.
3824
3825 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3826
3827         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3828         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3829         <stack>: Change type to std::vector.
3830         <stack_len, stack_allocated>: Remove.
3831         <grow_stack>: Remove.
3832         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3833         (dwarf_expr_context::~dwarf_expr_context): Remove.
3834         (dwarf_expr_context::grow_stack): Remove.
3835         (dwarf_expr_context::push): Adjust.
3836         (dwarf_expr_context::pop): Adjust.
3837         (dwarf_expr_context::fetch): Adjust.
3838         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3839         (dwarf_expr_context::stack_empty_p): Adjust.
3840         (dwarf_expr_context::execute_stack_op): Adjust.
3841
3842 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3843
3844         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3845         return type to bool.
3846         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3847
3848 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3849
3850         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3851         Change type to bool.
3852         (dwarf_stack_value) <in_stack_memory>: Likewise.
3853         (dwarf_expr_context) <push_address>: Change parameter type to
3854         bool.
3855         <fetch_in_stack_memory>: Change return type to bool.
3856         <push>: Change parameter type to bool.
3857         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3858         to bool.
3859         (dwarf_expr_context::push_address): Likewise.
3860         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3861         to bool.
3862         (dwarf_expr_context::execute_stack_op): Adjust.
3863         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3864
3865 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3866
3867         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3868         (struct dwarf_expr_context) <n_pieces>: Remove.
3869         <pieces>: Change type to std::vector.
3870         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3871         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3872         pieces.
3873         (dwarf_expr_context::add_piece): Adjust.
3874         * dwarf2loc.c (struct piece_closure): Initialize fields.
3875         <n_pieces>: Remove.
3876         <pieces>: Change type to std::vector.
3877         (allocate_piece_closure): Adjust, change parameter to
3878         std::vector rvalue and std::move it to piece_closure.
3879         (rw_pieced_value): Adjust.
3880         (check_pieced_synthetic_pointer): Adjust.
3881         (indirect_synthetic_pointer): Adjust.
3882         (coerce_pieced_ref): Adjust.
3883         (free_pieced_value_closure):  Adjust.  Use delete to free
3884         piece_closure.
3885         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3886         to allocate_piece_closure.
3887         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3888
3889 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3890
3891         * probe.h (probe_ops_cp): Remove typedef.
3892         (DEF_VEC_P (probe_ops_cp)): Remove.
3893         (all_probe_ops): Change type to std::vector.
3894         * probe.c (info_probes_for_ops): Adjust to vector change.
3895         (probe_linespec_to_ops): Likewise.
3896         (all_probe_ops): Change type to std::vector.
3897         (_initialize_probe): Adjust to vector change.
3898         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3899         * elfread.c (elf_get_probes): Likewise.
3900         * stap-probe.c (_initialize_stap_probe): Likewise.
3901
3902 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3903
3904         * probe.h (struct bound_probe): Define constructors.
3905         * probe.c (bound_probe_s): Remove typedef.
3906         (DEF_VEC_O (bound_probe_s)): Remove VEC.
3907         (collect_probes): Change return type to std::vector, remove
3908         cleanup.
3909         (compare_probes): Return bool, change parameter type.  Change
3910         semantic to "less than".
3911         (gen_ui_out_table_header_info): Change parameter to std::vector
3912         and update.
3913         (exists_probe_with_pops): Likewise.
3914         (info_probes_for_ops): Update to std::vector change.
3915         (enable_probes_command): Likewise.
3916         (disable_probes_command): Likewise.
3917
3918 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3919
3920         * probe.h (struct probe_ops) <get_probes>: Change parameter from
3921         vec to std::vector.
3922         * probe.c (parse_probes_in_pspace): Update.
3923         (find_probes_in_objfile): Update.
3924         (find_probe_by_pc): Update.
3925         (collect_probes): Update.
3926         (probe_any_get_probes): Update.
3927         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3928         return type to reference to std::vector.
3929         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3930         std::vector and update.
3931         (dtrace_process_dof): Likewise.
3932         (dtrace_get_probes): Likewise.
3933         * elfread.c (elf_get_probes): Change return type to std::vector,
3934         store an std::vector in bfd_data.
3935         (probe_key_free): Update to std::vector.
3936         * stap-probe.c (handle_stap_probe): Change parameter to
3937         std::vector and update.
3938         (stap_get_probes): Likewise.
3939         * symfile-debug.c (debug_sym_get_probes): Change return type to
3940         std::vector and update.
3941
3942 2017-09-11  Tom Tromey  <tom@tromey.com>
3943
3944         * breakpoint.c (program_breakpoint_here_p): Update.
3945         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3946         from make_show_memory_breakpoints_cleanup.  Return a
3947         scoped_restore_tmpl<int>.
3948         (restore_show_memory_breakpoints): Remove.
3949         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3950         * mem-break.c (memory_validate_breakpoint): Update.
3951         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3952         (ia64_memory_remove_breakpoint): Update.
3953         (ia64_breakpoint_from_pc): Update.
3954         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3955         from make_show_memory_breakpoints_cleanup.
3956
3957 2017-09-11  Tom Tromey  <tom@tromey.com>
3958
3959         * d-namespace.c (d_lookup_symbol): Use std::string.
3960         (find_symbol_in_baseclass): Likewise.
3961
3962 2017-09-11  Tom Tromey  <tom@tromey.com>
3963
3964         * ctf.c (ctf_start): Use std::string.
3965
3966 2017-09-11  Tom Tromey  <tom@tromey.com>
3967
3968         * ada-lang.c (is_known_support_routine): Update.
3969         (ada_unhandled_exception_name_addr_from_raise): Update.
3970         * guile/scm-frame.c (gdbscm_frame_name): Update.
3971         * python/py-frame.c (frapy_name): Update.
3972         (frapy_function): Update.
3973         * stack.h (find_frame_funname): Update.
3974         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3975         (print_frame): Update.
3976
3977 2017-09-11  Tom Tromey  <tom@tromey.com>
3978
3979         * findcmd.c (put_bits): Take a gdb::byte_vector.
3980         (parse_find_args): Return gdb::byte_vector.  "args" now const.
3981         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
3982         cleanups.
3983         (find_command): Update.
3984
3985 2017-09-11  Tom Tromey  <tom@tromey.com>
3986
3987         * cli/cli-script.c (class scoped_restore_hook_in): New.
3988         (clear_hook_in_cleanup): Remove.
3989         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3990         scoped_restore_hook_in.
3991
3992 2017-09-11  Tom Tromey  <tom@tromey.com>
3993
3994         * cli/cli-script.c (restore_interp): Remove.
3995         (read_command_lines): Use scoped_restore_interp.
3996         * interps.c (scoped_restore_interp::set_temp): Rename from
3997         interp_set_temp.
3998         * interps.h (class scoped_restore_interp): New.
3999         (interp_set_temp): Remove.
4000
4001 2017-09-11  Tom Tromey  <tom@tromey.com>
4002
4003         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4004         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4005         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4006         scoped_restore.
4007         (mi_cmd_break_insert_1): Update.
4008         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4009         scoped_restore.
4010
4011 2017-09-11  Tom Tromey  <tom@tromey.com>
4012
4013         * demangle.c (demangle_command): Update.
4014         * breakpoint.c (disable_command): Update.
4015         (enable_command): Update.
4016         (find_location_by_number): Make "number" const.  Use
4017         get_number_trailer.
4018         * cli/cli-utils.c (extract_arg): Return std::string.
4019         * probe.c (parse_probe_linespec): Update.  Change types.
4020         (collect_probes): Take string arguments.
4021         (parse_probe_linespec): Likewise.
4022         (info_probes_for_ops): Update.
4023         (enable_probes_command): Update.
4024         (disable_probes_command): Update.
4025         * break-catch-sig.c (catch_signal_split_args): Update.
4026         * mi/mi-parse.c (mi_parse): Update.
4027
4028 2017-09-11  Tom Tromey  <tom@tromey.com>
4029
4030         * language.h (language_enum): Make argument const.
4031         * language.c (language_enum): Make argument const.
4032
4033 2017-09-11  Tom Tromey  <tom@tromey.com>
4034
4035         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4036         as function.
4037         (skip_to_space): Rename from skip_to_space_const.
4038         * common/common-utils.c (skip_to_space): New function.
4039         (skip_to_space): Rename from skip_to_space_const.
4040         * cli/cli-utils.h (get_number): Rename from get_number_const.
4041         (extract_arg): Rename from extract_arg_const.
4042         * cli/cli-utils.c (get_number): Rename from get_number_const.
4043         (extract_arg): Rename from extract_arg_const.
4044         (number_or_range_parser::get_number): Use ::get_number.
4045         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4046         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4047         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4048         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4049         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4050         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4051         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4052         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4053
4054 2017-09-11  Tom Tromey  <tom@tromey.com>
4055
4056         * python/python.c (do_start_initialization): Use
4057         py-event-types.def to initialize types.
4058         Define all object type structures.
4059         * python/python-internal.h: Don't declare event initialization
4060         functions.
4061         * python/py-threadevent.c (thread_event_object_type): Don't
4062         define.
4063         * python/py-stopevent.c (stop_event_object_type): Don't define.
4064         * python/py-signalevent.c (signal_event_object_type): Don't
4065         declare or define.
4066         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4067         (clear_objfiles_event_object_type): Don't declare or define.
4068         * python/py-infevents.c (inferior_call_pre_event_object_type)
4069         (inferior_call_post_event_object_type)
4070         (register_changed_event_object_type)
4071         (memory_changed_event_object_type): Don't declare or define.
4072         * python/py-inferior.c (new_thread_event_object_type)
4073         (new_inferior_event_object_type)
4074         (inferior_deleted_event_object_type): Don't declare or define.
4075         * python/py-exitedevent.c (exited_event_object_type): Don't
4076         declare or define.
4077         * python/py-evts.c (gdbpy_initialize_py_events): Use
4078         py-all-events.def.
4079         * python/py-events.h (thread_event_object_type): Don't declare.
4080         (events_object): Use py-all-events.def.
4081         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4082         py-event-types.def.
4083         * python/py-event-types.def: New file.
4084         * python/py-continueevent.c (create_continue_event_object): Don't
4085         declare or define.
4086         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4087         declare or define.
4088         * python/py-all-events.def: New file.
4089
4090 2017-09-11  Tom Tromey  <tom@tromey.com>
4091
4092         * python/py-threadevent.c (create_thread_event_object): Return
4093         gdbpy_ref.
4094         * python/py-stopevent.h (create_stop_event_object)
4095         (create_breakpoint_event_object, create_signal_event_object):
4096         Update.
4097         * python/py-stopevent.c (create_stop_event_object): Return
4098         gdbpy_ref.
4099         (emit_stop_event): Update.
4100         * python/py-signalevent.c (create_signal_event_object): Return
4101         gdbpy_ref.
4102         * python/py-infevents.c (create_inferior_call_event_object):
4103         Update.
4104         * python/py-event.h (create_event_object)
4105         (create_thread_event_object): Update.
4106         * python/py-event.c (create_event_object): Return gdbpy_ref.
4107         * python/py-continueevent.c: Return gdbpy_ref.
4108         * python/py-bpevent.c (create_breakpoint_event_object): Return
4109         gdbpy_ref.
4110
4111 2017-09-11  Tom Tromey  <tom@tromey.com>
4112
4113         PR python/15622:
4114         * NEWS: Add entry.
4115         * python/python.c (do_start_initialization): Initialize new event
4116         types.
4117         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4118         (gdbpy_initialize_inferior_deleted_event)
4119         (gdbpy_initialize_new_thread_event): Declare.
4120         * python/py-threadevent.c (create_thread_event_object): Add option
4121         "thread" parameter.
4122         * python/py-inferior.c (new_thread_event_object_type)
4123         (new_inferior_event_object_type)
4124         (inferior_deleted_event_object_type): Declare.
4125         (python_new_inferior, python_inferior_deleted): New functions.
4126         (add_thread_object): Emit new_thread event.
4127         (gdbpy_initialize_inferior): Attach new functions to corresponding
4128         observers.
4129         (new_thread, new_inferior, inferior_deleted): Define new event
4130         types.
4131         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4132         registries.
4133         * python/py-events.h (events_object) <new_inferior,
4134         inferior_deleted, new_thread>: New fields.
4135         * python/py-event.h (create_thread_event_breakpoint): Add optional
4136         "thread" parameter.
4137
4138 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4139
4140         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4141         check current_ui instead.
4142         (internal_vproblem): Likewise.
4143
4144 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4145
4146         * thread.c (print_thread_info_1): Remove unnecessary calls to
4147         uiout->is_mi_like_p.
4148
4149 2017-09-09  Tom Tromey  <tom@tromey.com>
4150
4151         * namespace.h (add_using_directive): Update.
4152         * namespace.c (add_using_directive): Change type of excludes to
4153         std::vector.
4154         * dwarf2read.c (read_import_statement): Use std::vector.
4155         (read_namespace): Update.
4156         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4157
4158 2017-09-09  Tom Tromey  <tom@tromey.com>
4159
4160         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4161
4162 2017-09-09  Tom Tromey  <tom@tromey.com>
4163
4164         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4165
4166 2017-09-09  Tom Tromey  <tom@tromey.com>
4167
4168         * stack.c (func_command): Use gdb::def_vector.
4169
4170 2017-09-09  Tom Tromey  <tom@tromey.com>
4171
4172         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4173         ui_out_emit_list, ui_out_emit_tuple.
4174         (mi_cmd_var_update): Likewise.
4175
4176 2017-09-09  Tom Tromey  <tom@tromey.com>
4177
4178         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4179         ui_out_redirect_pop.
4180         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4181         ui_out_redirect_pop.
4182         * utils.c (do_ui_out_redirect_pop)
4183         (make_cleanup_ui_out_redirect_pop): Remove.
4184         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4185         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4186         * ui-out.h (ui_out_redirect_pop): New class.
4187
4188 2017-09-09  Tom Tromey  <tom@tromey.com>
4189
4190         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4191         (list_available_thread_groups, mi_cmd_list_thread_groups)
4192         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4193         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4194         Likewise.
4195
4196 2017-09-09  Tom Tromey  <tom@tromey.com>
4197
4198         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4199         ui_out_emit_tuple.
4200
4201 2017-09-09  Tom Tromey  <tom@tromey.com>
4202
4203         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4204         * stack.c (print_frame): Use ui_out_emit_tuple.
4205         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4206         (info_spu_mailbox_command, info_spu_dma_command)
4207         (info_spu_proxydma_command): Likewise.
4208         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4209         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4210         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4211         ui_out_emit_tuple.
4212         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4213
4214 2017-09-09  Tom Tromey  <tom@tromey.com>
4215
4216         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4217         (class ui_out_emit_table): Update comment.
4218         * ui-out.c (do_cleanup_table_end)
4219         (make_cleanup_ui_out_table_begin_end): Remove.
4220         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4221         (info_spu_dma_cmdlist): Likewise.
4222         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4223         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4224         ui_out_emit_table.
4225
4226 2017-09-09  Tom Tromey  <tom@tromey.com>
4227
4228         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4229         ui_out_emit_list, gdb::optional.
4230
4231 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4232
4233         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4234         prototype.
4235         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4236         prototype.
4237         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4238         prototype.
4239         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4240         * ada-exp.y: Remove _initialize_ada_exp prototype.
4241         * ada-lang.c: Remove _initialize_ada_language prototype.
4242         * ada-tasks.c: Remove _initialize_tasks prototype.
4243         * addrmap.c: Remove _initialize_addrmap prototype.
4244         * agent.c: Remove _initialize_agent prototype.
4245         * aix-thread.c: Remove _initialize_aix_thread prototype.
4246         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4247         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4248         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4249         prototype.
4250         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4251         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4252         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4253         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4254         prototype.
4255         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4256         prototype.
4257         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4258         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4259         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4260         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4261         prototype.
4262         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4263         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4264         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4265         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4266         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4267         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4268         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4269         prototype.
4270         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4271         prototype.
4272         * annotate.c: Remove _initialize_annotate prototype.
4273         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4274         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4275         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4276         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4277         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4278         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4279         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4280         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4281         prototype.
4282         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4283         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4284         * auto-load.c: Remove _initialize_auto_load prototype.
4285         * auxv.c: Remove _initialize_auxv prototype.
4286         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4287         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4288         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4289         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4290         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4291         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4292         prototype.
4293         * break-catch-throw.c: Remove _initialize_break_catch_throw
4294         prototype.
4295         * breakpoint.c: Remove _initialize_breakpoint prototype.
4296         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4297         * btrace.c: Remove _initialize_btrace prototype.
4298         * charset.c: Remove _initialize_charset prototype.
4299         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4300         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4301         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4302         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4303         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4304         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4305         * coffread.c: Remove _initialize_coffread prototype.
4306         * compile/compile.c: Remove _initialize_compile prototype.
4307         * complaints.c: Remove _initialize_complaints prototype.
4308         * completer.c: Remove _initialize_completer prototype.
4309         * copying.awk: Remove _initialize_copying prototype.
4310         * copying.c: Regenerate.
4311         * core-regset.c: Remove _initialize_core_regset prototype.
4312         * corefile.c: Remove _initialize_core prototype.
4313         * corelow.c: Remove _initialize_corelow prototype.
4314         * cp-abi.c: Remove _initialize_cp_abi prototype.
4315         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4316         * cp-support.c: Remove _initialize_cp_support prototype.
4317         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4318         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4319         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4320         * ctf.c: Remove _initialize_ctf prototype.
4321         * d-lang.c: Remove _initialize_d_language prototype.
4322         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4323         prototype.
4324         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4325         * dbxread.c: Remove _initialize_dbxread prototype.
4326         * dcache.c: Remove _initialize_dcache prototype.
4327         * demangle.c: Remove _initialize_demangler prototype.
4328         * disasm-selftests.c: Remove _initialize_disasm_selftests
4329         prototype.
4330         * disasm.c: Remove _initialize_disasm prototype.
4331         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4332         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4333         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4334         prototype.
4335         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4336         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4337         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4338         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4339         * elfread.c: Remove _initialize_elfread prototype.
4340         * exec.c: Remove _initialize_exec prototype.
4341         * extension.c: Remove _initialize_extension prototype.
4342         * f-lang.c: Remove _initialize_f_language prototype.
4343         * f-valprint.c: Remove _initialize_f_valprint prototype.
4344         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4345         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4346         * filesystem.c: Remove _initialize_filesystem prototype.
4347         * findcmd.c: Remove _initialize_mem_search prototype.
4348         * fork-child.c: Remove _initialize_fork_child prototype.
4349         * frame-base.c: Remove _initialize_frame_base prototype.
4350         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4351         * frame.c: Remove _initialize_frame prototype.
4352         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4353         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4354         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4355         * gcore.c: Remove _initialize_gcore prototype.
4356         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4357         * gdbarch.c: Regenerate.
4358         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4359         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4360         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4361         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4362         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4363         * go-lang.c: Remove _initialize_go_language prototype.
4364         * go32-nat.c: Remove _initialize_go32_nat prototype.
4365         * guile/guile.c: Remove _initialize_guile prototype.
4366         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4367         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4368         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4369         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4370         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4371         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4372         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4373         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4374         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4375         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4376         prototype.
4377         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4378         prototype.
4379         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4380         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4381         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4382         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4383         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4384         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4385         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4386         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4387         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4388         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4389         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4390         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4391         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4392         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4393         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4394         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4395         prototype.
4396         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4397         prototype.
4398         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4399         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4400         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4401         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4402         * infcall.c: Remove _initialize_infcall prototype.
4403         * infcmd.c: Remove _initialize_infcmd prototype.
4404         * inferior.c: Remove _initialize_inferiors prototype.
4405         * inflow.c: Remove _initialize_inflow prototype.
4406         * infrun.c: Remove _initialize_infrun prototype.
4407         * interps.c: Remove _initialize_interpreter prototype.
4408         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4409         * jit.c: Remove _initialize_jit prototype.
4410         * language.c: Remove _initialize_language prototype.
4411         * linux-fork.c: Remove _initialize_linux_fork prototype.
4412         * linux-nat.c: Remove _initialize_linux_nat prototype.
4413         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4414         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4415         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4416         * m2-lang.c: Remove _initialize_m2_language prototype.
4417         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4418         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4419         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4420         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4421         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4422         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4423         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4424         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4425         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4426         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4427         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4428         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4429         * machoread.c: Remove _initialize_machoread prototype.
4430         * macrocmd.c: Remove _initialize_macrocmd prototype.
4431         * macroscope.c: Remove _initialize_macroscope prototype.
4432         * maint.c: Remove _initialize_maint_cmds prototype.
4433         * mdebugread.c: Remove _initialize_mdebugread prototype.
4434         * memattr.c: Remove _initialize_mem prototype.
4435         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4436         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4437         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4438         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4439         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4440         * microblaze-linux-tdep.c: Remove
4441         _initialize_microblaze_linux_tdep prototype.
4442         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4443         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4444         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4445         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4446         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4447         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4448         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4449         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4450         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4451         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4452         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4453         prototype.
4454         * mipsread.c: Remove _initialize_mipsread prototype.
4455         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4456         prototype.
4457         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4458         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4459         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4460         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4461         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4462         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4463         prototype.
4464         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4465         * nto-procfs.c: Remove _initialize_procfs prototype.
4466         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4467         * objc-lang.c: Remove _initialize_objc_language prototype.
4468         * objfiles.c: Remove _initialize_objfiles prototype.
4469         * observer.c: Remove observer_test_first_notification_function,
4470         observer_test_second_notification_function,
4471         observer_test_third_notification_function, and
4472         _initialize_observer prototypes.
4473         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4474         * osabi.c: Remove _initialize_gdb_osabi prototype.
4475         * osdata.c: Remove _initialize_osdata prototype.
4476         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4477         * parse.c: Remove _initialize_parse prototype.
4478         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4479         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4480         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4481         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4482         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4483         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4484         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4485         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4486         * printcmd.c: Remove _initialize_printcmd prototype.
4487         * probe.c: Remove _initialize_probe prototype.
4488         * proc-api.c: Remove _initialize_proc_api prototype.
4489         * proc-events.c: Remove _initialize_proc_events prototype.
4490         * proc-service.c: Remove _initialize_proc_service prototype.
4491         * procfs.c: Remove _initialize_procfs prototype.
4492         * psymtab.c: Remove _initialize_psymtab prototype.
4493         * python/python.c: Remove _initialize_python prototype.
4494         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4495         * record-btrace.c: Remove _initialize_record_btrace prototype.
4496         * record-full.c: Remove _initialize_record_full prototype.
4497         * record.c: Remove _initialize_record prototype.
4498         * regcache.c: Remove _initialize_regcache prototype.
4499         * reggroups.c: Remove _initialize_reggroup prototype.
4500         * remote-notif.c: Remove _initialize_notif prototype.
4501         * remote-sim.c: Remove _initialize_remote_sim prototype.
4502         * remote.c: Remove _initialize_remote prototype.
4503         * reverse.c: Remove _initialize_reverse prototype.
4504         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4505         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4506         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4507         prototype.
4508         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4509         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4510         * rust-exp.y: Remove _initialize_rust_exp prototype.
4511         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4512         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4513         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4514         * score-tdep.c: Remove _initialize_score_tdep prototype.
4515         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4516         prototype.
4517         * ser-go32.c: Remove _initialize_ser_dos prototype.
4518         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4519         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4520         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4521         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4522         * serial.c: Remove _initialize_serial prototype.
4523         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4524         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4525         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4526         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4527         * skip.c: Remove _initialize_step_skip prototype.
4528         * sol-thread.c: Remove _initialize_sol_thread prototype.
4529         * solib-aix.c: Remove _initialize_solib_aix prototype.
4530         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4531         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4532         * solib-frv.c: Remove _initialize_frv_solib prototype.
4533         * solib-spu.c: Remove _initialize_spu_solib prototype.
4534         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4535         * solib-target.c: Remove _initialize_solib_target prototype.
4536         * solib.c: Remove _initialize_solib prototype.
4537         * source.c: Remove _initialize_source prototype.
4538         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4539         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4540         prototype.
4541         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4542         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4543         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4544         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4545         prototype.
4546         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4547         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4548         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4549         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4550         prototype.
4551         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4552         prototype.
4553         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4554         prototype.
4555         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4556         prototype.
4557         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4558         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4559         prototype.
4560         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4561         prototype.
4562         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4563         prototype.
4564         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4565         prototype.
4566         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4567         prototype.
4568         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4569         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4570         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4571         * stabsread.c: Remove _initialize_stabsread prototype.
4572         * stack.c: Remove _initialize_stack prototype.
4573         * stap-probe.c: Remove _initialize_stap_probe prototype.
4574         * std-regs.c: Remove _initialize_frame_reg prototype.
4575         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4576         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4577         * symfile.c: Remove _initialize_symfile prototype.
4578         * symmisc.c: Remove _initialize_symmisc prototype.
4579         * symtab.c: Remove _initialize_symtab prototype.
4580         * target-dcache.c: Remove _initialize_target_dcache prototype.
4581         * target-descriptions.c: Remove _initialize_target_descriptions
4582         prototype.
4583         * thread.c: Remove _initialize_thread prototype.
4584         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4585         prototype.
4586         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4587         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4588         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4589         prototype.
4590         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4591         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4592         * tracefile.c: Remove _initialize_tracefile prototype.
4593         * tracepoint.c: Remove _initialize_tracepoint prototype.
4594         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4595         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4596         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4597         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4598         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4599         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4600         * tui/tui.c: Remove _initialize_tui prototype.
4601         * typeprint.c: Remove _initialize_typeprint prototype.
4602         * user-regs.c: Remove _initialize_user_regs prototype.
4603         * utils.c: Remove _initialize_utils prototype.
4604         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4605         * valarith.c: Remove _initialize_valarith prototype.
4606         * valops.c: Remove _initialize_valops prototype.
4607         * valprint.c: Remove _initialize_valprint prototype.
4608         * value.c: Remove _initialize_values prototype.
4609         * varobj.c: Remove _initialize_varobj prototype.
4610         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4611         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4612         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4613         * windows-nat.c: Remove _initialize_windows_nat,
4614         _initialize_check_for_gdb_ini, and _initialize_loadable
4615         prototypes.
4616         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4617         * xcoffread.c: Remove _initialize_xcoffread prototype.
4618         * xml-support.c: Remove _initialize_xml_support prototype.
4619         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4620         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4621         prototype.
4622         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4623         prototype.
4624         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4625
4626 2017-09-08  Keith Seitz  <keiths@redhat.com>
4627
4628         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4629         field.
4630
4631 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4632
4633         * f-valprint.c (f_val_print): Remove check for one byte
4634         sized integers. Remove printing of character type.
4635
4636 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4637             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4638             Bernhard Heckel  <bernhard.heckel@intel.com>
4639
4640         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4641         to maintain proper indentation when printing pointers/refs.
4642
4643 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4644
4645         GDB 8.0.1 released.
4646
4647 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4648
4649         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4650
4651 2017-09-05  Tom Tromey  <tom@tromey.com>
4652
4653         * parse.c (funcall_chain): Now a std::vector.
4654         (start_arglist, end_arglist): Simplify.
4655         (free_funcalls): Remove.
4656         (parse_exp_in_context_1): Remove cleanup.
4657
4658 2017-09-05  Tom Tromey  <tom@tromey.com>
4659
4660         * go-exp.y (go_parse): Don't create a cleanup.
4661
4662 2017-09-05  Tom Tromey  <tom@tromey.com>
4663
4664         * d-exp.y (PrimaryExpression): Use std::string.
4665         (d_parse): Don't create a cleanup.
4666
4667 2017-09-05  Tom Tromey  <tom@tromey.com>
4668
4669         * utils.c (do_clear_parser_state): Remove.
4670         (make_cleanup_clear_parser_state): Remove.
4671         * p-exp.y (pascal_parse): Use scoped_restore.
4672         * m2-exp.y (m2_parse): Use scoped_restore.
4673         * f-exp.y (f_parse): Use scoped_restore.
4674         * d-exp.y (d_parse): Use scoped_restore.
4675         * c-exp.y (c_parse): Use scoped_restore.
4676         * ada-exp.y (ada_parse): Use scoped_restore.
4677         * utils.h (make_cleanup_clear_parser_state): Remove.
4678
4679 2017-09-06  Keith Seitz  <keiths@redhat.com>
4680
4681         * dwarf2read.c (dw2_linkage_name_attr): New function.
4682         (dw2_linkage_name): New function.
4683         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4684         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4685         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4686
4687 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4688
4689         * config/djgpp/djconfig.sh: Correct shell portability issue.
4690
4691 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4692
4693         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4694
4695 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4696
4697         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4698         * NEWS: Mention new FreeBSD/mips native configuration.
4699         * configure.host: Add aarch64*-*-freebsd*.
4700         * configure.nat: Likewise.
4701         * aarch64-fbsd-nat.c: New file.
4702
4703 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4704
4705         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4706         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4707         * NEWS: Mention new FreeBSD/aarch64 target.
4708         * configure.tgt: Add aarch64*-*-freebsd*.
4709         * aarch64-fbsd-tdep.c: New file.
4710         * aarch64-fbsd-tdep.h: New file.
4711
4712 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4713
4714         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4715
4716 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4717
4718         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4719         of TLS symbols.
4720
4721 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4722
4723         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4724         call.
4725
4726 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4727
4728         * infrun.c (follow_exec): Call add_thread after
4729         target_find_description.
4730
4731 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4732
4733         * infrun.c (handle_inferior_event_1): When exec'ing, read
4734         stop_pc after follow_exec.
4735
4736 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4737
4738         * remote.c (process_g_packet): Update error message.
4739
4740 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4741
4742         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4743         targets.
4744
4745 2017-09-05  Pedro Alves  <palves@redhat.com>
4746
4747         * eval.c (eval_call, evaluate_funcall): New functions, factored
4748         out from ...
4749         (evaluate_subexp_standard): ... this.
4750
4751 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4752
4753         * amd64-tdep.c (amd64_target_description): Create target
4754         descriptions.
4755         (_initialize_amd64_tdep): Don't call functions
4756         initialize_tdesc_amd64_*.  Add self tests.
4757         * arch/amd64.c (amd64_create_target_description): Add parameter
4758         is_linux.  Call set_tdesc_osabi if is_linux is true.
4759         * arch/amd64.h (amd64_create_target_description): Update the
4760         declaration.
4761         * arch/i386.c (i386_create_target_description): Add parameter
4762         is_linux.  Call set_tdesc_osabi if is_linux is true.
4763         * arch/i386.h (i386_create_target_description): Update
4764         declaration.
4765         * configure.tgt: Add i386.o to gdb_target_obs.
4766         * features/Makefile (XMLTOC): Remove i386/*.xml.
4767         * features/i386/amd64-avx-avx512.c: Remove.
4768         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4769         * features/i386/amd64-avx-mpx.c: Remove.
4770         * features/i386/amd64-avx.c: Remove.
4771         * features/i386/amd64-mpx.c: Remove.
4772         * features/i386/amd64.c: Remove.
4773         * features/i386/i386-avx-avx512.c: Remove.
4774         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4775         * features/i386/i386-avx-mpx.c: Remove.
4776         * features/i386/i386-avx.c: Remove.
4777         * features/i386/i386-mmx.c: Remove.
4778         * features/i386/i386-mpx.c: Remove.
4779         * features/i386/i386.c: Remove.
4780         * i386-tdep.c: Don't include features/i386/i386*.c., include
4781         target-descriptions.h and arch/i386.h.
4782         (i386_target_description): Create target descriptions.
4783         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4784         functions.  Do self tests.
4785
4786 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4787
4788         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4789         * features/i386/amd64-avx-avx512-linux.c: Removed.
4790         * features/i386/amd64-avx-linux.c: Removed.
4791         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4792         * features/i386/amd64-avx-mpx-linux.c: Removed.
4793         * features/i386/amd64-linux.c: Removed.
4794         * features/i386/amd64-mpx-linux.c: Removed.
4795         * features/i386/x32-avx-avx512-linux.c: Removed.
4796         * features/i386/x32-avx-linux.c: Removed.
4797         * features/i386/x32-linux.c: Removed.
4798
4799 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4800
4801         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4802         features/i386/*.c.
4803         (amd64_linux_read_description): Call
4804         amd64_create_target_description.
4805         * arch/amd64.c: New file.
4806         * arch/amd64.h: New file.
4807         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4808         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4809
4810 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4811
4812         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4813         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4814         (amd64_linux_read_description): Create target descriptions.
4815         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4816         functions.  Add unit tests.
4817         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4818         x32-core.xml.
4819         * features/i386/64bit-avx.c: Generated.
4820         * features/i386/64bit-avx512.c: Generated.
4821         * features/i386/64bit-core.c: Generated.
4822         * features/i386/64bit-linux.c: Generated.
4823         * features/i386/64bit-mpx.c: Generated.
4824         * features/i386/64bit-pkeys.c: Generated.
4825         * features/i386/64bit-segments.c: Generated.
4826         * features/i386/64bit-sse.c: Generated.
4827         * features/i386/x32-core.c: Generated.
4828         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4829         c files for amd64-linux and x32-linux.
4830
4831 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4832
4833         * amd64-linux-tdep.c (amd64_linux_read_description): New
4834         function.
4835         (amd64_linux_core_read_description): Call
4836         amd64_linux_read_description.
4837         (amd64_linux_init_abi): Likewise.
4838         (amd64_x32_linux_init_abi): Likewise.
4839         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4840         * x86-linux-nat.c (x86_linux_read_description): Call
4841         amd64_linux_read_description.
4842
4843 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4844
4845         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4846         comments.
4847
4848 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4849
4850         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4851         * features/i386/i386-avx-avx512-linux.c: Remove.
4852         * features/i386/i386-avx-linux.c: Remove.
4853         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4854         * features/i386/i386-avx-mpx-linux.c: Remove.
4855         * features/i386/i386-linux.c: Remove.
4856         * features/i386/i386-mmx-linux.c: Remove.
4857         * features/i386/i386-mpx-linux.c: Remove.
4858
4859 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4860
4861         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4862         (SFILES): Add arch/i386.c.
4863         (HFILES_NO_SRCDIR): Add arch/i386.h.
4864         * arch/i386.c: New file.
4865         * arch/i386.h: New file.
4866         * arch/tdesc.h (allocate_target_description): Declare.
4867         (set_tdesc_architecture): Declare.
4868         (set_tdesc_osabi): Declare.
4869         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4870         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4871         include arch/i386.h.
4872         (i386_linux_read_description): Remove code and call
4873         i386_create_target_description.
4874         (set_tdesc_architecture): New function.
4875         (set_tdesc_osabi): New function.
4876         * target-descriptions.h (allocate_target_description): Remove.
4877
4878 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4879
4880         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4881         * target-descriptions.c (tdesc_create_feature): Likewise, and
4882         adjust code.
4883         * features/i386/32bit-avx.c: Re-generated.
4884         * features/i386/32bit-avx512.c: Re-generated.
4885         * features/i386/32bit-core.c: Re-generated.
4886         * features/i386/32bit-linux.c: Re-generated.
4887         * features/i386/32bit-mpx.c: Re-generated.
4888         * features/i386/32bit-pkeys.c: Re-generated.
4889         * features/i386/32bit-sse.c: Re-generated.
4890
4891 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4892
4893         * regformats/regdef.h (struct reg): Override operator == and !=.
4894
4895 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4896
4897         * arch/tdesc.h: New file.
4898         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4899         * target-descriptions.c: Update comments.
4900         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4901         declarations.
4902         * features/i386/32bit-avx.c: Re-generated.
4903         * features/i386/32bit-avx512.c: Re-generated.
4904         * features/i386/32bit-core.c: Re-generated.
4905         * features/i386/32bit-linux.c: Re-generated.
4906         * features/i386/32bit-mpx.c: Re-generated.
4907         * features/i386/32bit-pkeys.c: Re-generated.
4908         * features/i386/32bit-sse.c: Re-generated.
4909
4910 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4911
4912         * regformats/regdat.sh: Update generated code.
4913
4914 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4915
4916         * regformats/regdat.sh: Adjust code order.
4917
4918 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4919
4920         * expprint.c (dump_subexp_body_standard): Use constant format
4921         string in fprintf_filtered call.
4922
4923 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4924
4925         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4926         NetBSD/i386.
4927         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4928
4929 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4930
4931         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4932
4933 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4934
4935         * bsd-kvm.o: Define _KMEMUSER.
4936         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4937         * configure: Regenerate.
4938
4939 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4940
4941         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4942         * i386-fbsd-nat.c: Likewise.
4943
4944 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4945
4946         * unittests/array-view-selftests.c: Add include of <array>.
4947
4948 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
4949
4950         * spu-tdep.c (flush_ea_cache): Add missing argument to
4951         call_function_by_hand.
4952
4953 2017-09-04  Pedro Alves  <palves@redhat.com>
4954
4955         * NEWS (Safer support for debugging with no debug info): New.
4956
4957 2017-09-04  Pedro Alves  <palves@redhat.com>
4958
4959         * c-exp.y (function_method, function_method_void): Add current
4960         instance flags to TYPE_INSTANCE.
4961         * dwarf2read.c (check_modifier): New.
4962         (compute_delayed_physnames): Assert that only C++ adds delayed
4963         physnames.  Mark fn_fields as const/volatile depending on
4964         physname.
4965         * eval.c (make_params): New type_instance_flags parameter.  Use
4966         it as the new type's instance flags.
4967         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4968         flags element and pass it to make_params.
4969         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4970         instance flags element.
4971         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4972         * gdbtypes.h: Include "enum-flags.h".
4973         (type_instance_flags): New enum-flags type.
4974         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4975         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4976         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4977         (follow_type_instance_flags): New function.
4978         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4979         * parser-defs.h (follow_type_instance_flags): Declare.
4980         * valops.c (value_struct_elt_for_reference): const/volatile must
4981         match too.
4982
4983 2017-09-04  Pedro Alves  <palves@redhat.com>
4984
4985         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4986         function/method scopes; lookup the nested name as a function local
4987         static variable.
4988
4989 2017-09-04  Pedro Alves  <palves@redhat.com>
4990
4991         (%type <voidval>): Add function_method.
4992         * c-exp.y (exp): New production for calls with no arguments.
4993         (function_method, function_method_void_or_typelist): New
4994         productions.
4995         (exp): New production for "method()::static_var".
4996         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4997         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4998         Handle OP_FUNC_STATIC_VAR.
4999         * parse.c (operator_length_standard):
5000         Handle OP_FUNC_STATIC_VAR.
5001
5002 2017-09-04  Pedro Alves  <palves@redhat.com>
5003
5004         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5005         handling.
5006         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5007         Ditto.
5008         * parse.c (operator_length_standard, operator_check_standard):
5009         Ditto.
5010         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5011
5012 2017-09-04  Pedro Alves  <palves@redhat.com>
5013
5014         * ax-gdb.c: Include "typeprint.h".
5015         (gen_expr_for_cast): New function.
5016         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5017         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5018         type is unknown.
5019         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5020         nodebug_data_symbol.
5021         * eval.c: Include "typeprint.h".
5022         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5023         Error out if symbol has unknown type.
5024         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5025         evaluate_subexp_for_cast.
5026         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5027         OP_VAR_MSYM_VALUE.
5028         (evaluate_subexp_for_cast): New function.
5029         * gdbtypes.c (init_nodebug_var_type): New function.
5030         (objfile_type): Use it to initialize types of variables with no
5031         debug info.
5032         * typeprint.c (error_unknown_type): New.
5033         * typeprint.h (error_unknown_type): New declaration.
5034         * compile/compile-c-types.c (convert_type_basic): Handle
5035         TYPE_CODE_ERROR; warn and fallback to int for variables with
5036         unknown type.
5037
5038 2017-09-04  Pedro Alves  <palves@redhat.com>
5039
5040         * eval.c (evaluate_var_value): New function, factored out from ...
5041         (evaluate_subexp_standard): ... here.
5042
5043 2017-09-04  Pedro Alves  <palves@redhat.com>
5044
5045         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5046         Remove useless assignments to 'op'.
5047
5048 2017-09-04  Pedro Alves  <palves@redhat.com>
5049
5050         * eval.c (eval_skip_value): New function.
5051         (evaluate_subexp_standard): Use it.
5052
5053 2017-09-04  Pedro Alves  <palves@redhat.com>
5054
5055         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5056         function name from symbol/minsym and pass it to
5057         error_call_unknown_return_type.
5058
5059 2017-09-04  Pedro Alves  <palves@redhat.com>
5060
5061         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5062         * ax-gdb.c (gen_msym_var_ref): New function.
5063         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5064         * eval.c (evaluate_var_msym_value): New function.
5065         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5066         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5067         to call_function_by_hand.
5068         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5069         Handle OP_VAR_MSYM_VALUE.
5070         (union exp_element) <msymbol>: New field.
5071         * minsyms.h (struct type): Forward declare.
5072         (find_minsym_type_and_address): Declare.
5073         * parse.c (write_exp_elt_msym): New function.
5074         (write_exp_msymbol): Delete, refactored as ...
5075         (find_minsym_type_and_address): ... this new function.
5076         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5077         (operator_length_standard, operator_check_standard): Handle
5078         OP_VAR_MSYM_VALUE.
5079         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5080
5081 2017-09-04  Pedro Alves  <palves@redhat.com>
5082
5083         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5084         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5085         unknown.
5086         * ada-typeprint.c (print_func_type): Handle functions with unknown
5087         return type.
5088         * c-typeprint.c (c_type_print_base): Handle functions and methods
5089         with unknown return type.
5090         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5091         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5092         * compile/compile-c-types.c: Include "objfiles.h".
5093         (convert_func): For functions with unknown return type, warn and
5094         default to int.
5095         * compile/compile-object-run.c (compile_object_run): Adjust call
5096         to call_function_by_hand_dummy.
5097         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5098         call_function_by_hand.
5099         * eval.c (evaluate_subexp_standard): Adjust calls to
5100         call_function_by_hand.  Handle functions and methods with unknown
5101         return type.  Pass expect_type to call_function_by_hand.
5102         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5103         return type.
5104         * gcore.c (call_target_sbrk): Adjust call to
5105         call_function_by_hand.
5106         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5107         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5108         an integer address type instead of nodebug.
5109         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5110         call_function_by_hand.
5111         * infcall.c (error_call_unknown_return_type): New function.
5112         (call_function_by_hand): New "default_return_type" parameter.
5113         Pass it down.
5114         (call_function_by_hand_dummy): New "default_return_type"
5115         parameter.  Use it instead of defaulting to int.  If there's no
5116         default and the return type is unknown, throw an error.  If
5117         there's a default return type, and the called function has no
5118         debug info, then assume the function is prototyped.
5119         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5120         New "default_return_type" parameter.
5121         (error_call_unknown_return_type): New declaration.
5122         * linux-fork.c (call_lseek): Cast return type of lseek.
5123         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5124         call_function_by_hand.
5125         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5126         calls to call_function_by_hand.
5127         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5128         return type.
5129         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5130         (value_nsstring, print_object_command): Adjust calls to
5131         call_function_by_hand.
5132         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5133         functions with unknown return type.
5134         (pascal_type_print_func_varspec_suffix): New function.
5135         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5136         TYPE_CODE_METHOD>: Use it.
5137         * python/py-value.c (valpy_call): Adjust call to
5138         call_function_by_hand.
5139         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5140         call_function_by_hand.
5141         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5142         call_function_by_hand.
5143         * valops.c (value_allocate_space_in_inferior): Adjust call to
5144         call_function_by_hand.
5145         * typeprint.c (type_print_unknown_return_type): New function.
5146         * typeprint.h (type_print_unknown_return_type): New declaration.
5147
5148 2017-09-04  Pedro Alves  <palves@redhat.com>
5149
5150         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5151         types with more than one parameter as prototyped.
5152
5153 2017-09-04  Pedro Alves  <palves@redhat.com>
5154
5155         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5156         (disassemble_command): Use gdb_disassembly_flags instead of bare
5157         int.
5158         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5159         (dump_insns, do_mixed_source_and_assembly_deprecated)
5160         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5161         Use gdb_disassembly_flags instead of bare int.
5162         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5163         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5164         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5165         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5166         (enum gdb_disassembly_flag): ... values of this new enumeration.
5167         (gdb_disassembly_flags): Define.
5168         (gdb_disassembly)
5169         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5170         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5171         gdb_disassembly_flags instead of bare int.
5172         * record-btrace.c (btrace_insn_history)
5173         (record_btrace_insn_history, record_btrace_insn_history_range)
5174         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5175         instead of bare int.
5176         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5177         Use gdb_disassembly_flags instead of bare int.
5178         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5179         Define.
5180         * target-delegates.c: Regenerate.
5181         * target.c (target_insn_history, target_insn_history_from)
5182         (target_insn_history_range): Use gdb_disassembly_flags instead of
5183         bare int.
5184         * target.h: Include "disasm.h".
5185         (struct target_ops) <to_insn_history, to_insn_history_from,
5186         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5187         int.
5188         (target_insn_history, target_insn_history_from)
5189         (target_insn_history_range): Use gdb_disassembly_flags instead of
5190         bare int.
5191
5192 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5193
5194         * cli/cli-script.c (build_command_line): For if/while commands,
5195         check whether args is empty.
5196
5197 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5198
5199         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5200         (enum command_control_type): Likewise.
5201         (struct command_line): Likewise.
5202         (free_command_lines): Likewise.
5203         (struct command_lines_deleter): Likewise.
5204         (command_line_up): Likewise.
5205         (read_command_lines): Likewise.
5206         (read_command_lines_1): Likewise.
5207         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5208         (enum command_control_type): Likewise.
5209         (struct command_line): Likewise.
5210         (free_command_lines): Likewise.
5211         (struct command_lines_deleter): Likewise.
5212         (command_line_up): Likewise.
5213         (read_command_lines): Likewise.
5214         (read_command_lines_1): Likewise.
5215         * breakpoint.h: Include cli/cli-script.h.
5216         * extension-priv.h: Likewise.
5217         * gdbcmd.h: Likewise.
5218
5219 2017-09-04  Pedro Alves  <palves@redhat.com>
5220
5221         * ada-lang.c (is_known_support_routine): Move sal declaration to
5222         where it is initialized.
5223         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5224         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5225         (clear_command, update_static_tracepoint): Remove init_sal
5226         references.  Move declarations closer to initializations.
5227         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5228         initializations.
5229         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5230         references.  Move sal declarations closer to initializations.
5231         * frame.c (find_frame_sal): Return a symtab_and_line via function
5232         return instead of output parameter.  Remove init_sal references.
5233         * frame.h (find_frame_sal): Return a symtab_and_line via function
5234         return instead of output parameter.
5235         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5236         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5237         instead of memset.
5238         (gdbscm_find_pc_line): Remove init_sal reference.
5239         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5240         references.  Move declarations closer to initializations.
5241         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5242         initializations.
5243         (finish_backward): Remove init_sal references.  Move declarations
5244         closer to initializations.
5245         * infrun.c (process_event_stop_test, handle_step_into_function)
5246         (insert_hp_step_resume_breakpoint_at_frame)
5247         (insert_step_resume_breakpoint_at_caller): Likewise.
5248         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5249         (symbol_to_sal): Likewise.
5250         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5251         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5252         to its initialization.
5253         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5254         init_sal references.  Move declarations closer to initializations.
5255         * source.c (get_current_source_symtab_and_line): Remove brace
5256         initialization.
5257         (set_current_source_symtab_and_line): Now takes the sal by const
5258         reference.  Remove brace initialization.
5259         (line_info): Remove init_sal reference.
5260         * source.h (set_current_source_symtab_and_line): Now takes a
5261         symtab_and_line via const reference.
5262         * stack.c (set_current_sal_from_frame): Adjust.
5263         (print_frame_info): Adjust.
5264         (get_last_displayed_sal): Return the sal via function return
5265         instead of via output parameter.  Simplify.
5266         (frame_info): Adjust.
5267         * stack.h (get_last_displayed_sal): Return the sal via function
5268         return instead of via output parameter.
5269         * symtab.c (init_sal): Delete.
5270         (find_pc_sect_line): Remove init_sal references.  Move
5271         declarations closer to initializations.
5272         (find_function_start_sal): Remove init_sal references.  Move
5273         declarations closer to initializations.
5274         * symtab.h (struct symtab_and_line): In-class initialize all
5275         fields.
5276         * tracepoint.c (set_traceframe_context)
5277         (print_one_static_tracepoint_marker): Remove init_sal references.
5278         Move declarations closer to initializations.
5279         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5280         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5281         declarations closer to initializations.
5282         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5283         init_sal references.  Adjust.
5284
5285 2017-09-04  Pedro Alves  <palves@redhat.com>
5286
5287         * ax-gdb.c (agent_command_1): Use range-for.
5288         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5289         * breakpoint.c: Include "common/array-view.h".
5290         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5291         parameter from struct symtabs_and_lines to
5292         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5293         (breakpoint_sals_to_pc): Change sals parameter from struct
5294         symtabs_and_lines to std::vector reference.
5295         (check_fast_tracepoint_sals): Change sals parameter from struct
5296         symtabs_and_lines to std::array_view.  Use range-for.
5297         (decode_static_tracepoint_spec): Return a std::vector instead of
5298         symtabs_and_lines.  Update.
5299         (create_breakpoint): Update.
5300         (break_range_command, until_break_command, clear_command): Update.
5301         (base_breakpoint_decode_location, bkpt_decode_location)
5302         (bkpt_probe_create_sals_from_location)
5303         (bkpt_probe_decode_location, tracepoint_decode_location)
5304         (tracepoint_probe_decode_location)
5305         (strace_marker_create_sals_from_location): Return a std::vector
5306         instead of symtabs_and_lines.
5307         (strace_marker_create_breakpoints_sal): Update.
5308         (strace_marker_decode_location): Return a std::vector instead of
5309         symtabs_and_lines.  Update.
5310         (update_breakpoint_locations): Change struct symtabs_and_lines
5311         parameters to gdb::array_view.  Adjust.
5312         (location_to_sals): Return a std::vector instead of
5313         symtabs_and_lines.  Update.
5314         (breakpoint_re_set_default): Use std::vector instead of struct
5315         symtabs_and_lines.
5316         (decode_location_default): Return a std::vector instead of
5317         symtabs_and_lines.  Update.
5318         * breakpoint.h: Include "common/array-view.h".
5319         (struct breakpoint_ops) <decode_location>: Now returns a
5320         std::vector instead of returning a symtabs_and_lines via output
5321         parameter.
5322         (update_breakpoint_locations): Change sals parameters to use
5323         gdb::array_view.
5324         * cli/cli-cmds.c (edit_command, list_command): Update to use
5325         std::vector and gdb::array_view.
5326         (ambiguous_line_spec): Adjust to use gdb::array_view and
5327         range-for.
5328         (compare_symtabs): Rename to ...
5329         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5330         const reference and adjust.
5331         (filter_sals): Rewrite using std::vector and standard algorithms.
5332         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5333         (jump_command): Update to use std::vector.
5334         * linespec.c (struct linespec_state) <canonical_names>: Update
5335         comment.
5336         (add_sal_to_sals_basic): Delete.
5337         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5338         (decode_line_2, create_sals_line_offset)
5339         (convert_address_location_to_sals, convert_linespec_to_sals)
5340         (convert_explicit_location_to_sals, parse_linespec)
5341         (event_location_to_sals, decode_line_full, decode_line_1)
5342         (decode_line_with_current_source)
5343         (decode_line_with_last_displayed, decode_objc)
5344         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5345         (linespec_result::~linespec_result): Adjust to use std::vector
5346         instead of symtabs_and_lines.
5347         * linespec.h (linespec_sals::sals): Now a std::vector.
5348         (struct linespec_result): Use std::vector, bool, and in-class
5349         initialization.
5350         (decode_line_1, decode_line_with_current_source)
5351         (decode_line_with_last_displayed): Return std::vector.
5352         * macrocmd.c (info_macros_command): Use std::vector.
5353         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5354         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5355         std::vector.
5356         * probe.h (parse_probes): Return a std::vector.
5357         * python/python.c (gdbpy_decode_line): Use std::vector and
5358         gdb::array_view.
5359         * source.c (select_source_symtab, line_info): Use std::vector.
5360         * stack.c (func_command): Use std::vector.
5361         * symtab.h (struct symtabs_and_lines): Delete.
5362         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5363
5364 2017-09-04  Pedro Alves  <palves@redhat.com>
5365
5366         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5367         unittests/array-view-selftests.c.
5368         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5369         * common/array-view.h: New file.
5370         * unittests/array-view-selftests.c: New file.
5371
5372 2017-09-04  Pedro Alves  <palves@redhat.com>
5373
5374         * cli/cli-cmds.c (edit_command): Pass message to
5375         ambiguous_line_spec.
5376         (list_command): Pass message to ambiguous_line_spec.  Say
5377         "first"/"last" instead of "start" and "end" to be consistent with
5378         the manual.
5379         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5380         them to print formatted message.
5381
5382 2017-09-04  Pedro Alves  <palves@redhat.com>
5383
5384         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5385         ftrace_update_insns by reference instead of pointer.
5386
5387 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5388
5389         * i386-go32-tdep.c: Include x86-xstate.h.
5390         (i386_go32_init_abi): Call i386_target_description.
5391         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5392         if xcr0 is X86_XSTATE_X87_MASK.
5393         * i386-tdep.h (tdesc_i386): Remove the declaration.
5394         (tdesc_i386_mmx): Likewise.
5395
5396 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5397
5398         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5399         X86_XSTATE_SSE_MASK instead of 0.
5400
5401 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5402
5403         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5404         i386_target_description.
5405         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5406         i386_target_description.
5407         * i386-tdep.c (i386_gdbarch_init): Likewise.
5408
5409 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5410
5411         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5412         (x86_darwin_init_abi_64): Call amd64_target_description.
5413         * amd64-dicos-tdep.c: Likewise.
5414         * amd64-fbsd-nat.c: Likewise.
5415         * amd64-fbsd-tdep.c: Likewise.
5416         * amd64-nbsd-tdep.c: Likewise.
5417         * amd64-obsd-tdep.c: Likewise.
5418         * amd64-sol2-tdep.c: Likewise.
5419         * amd64-windows-tdep.c: Likewise.
5420         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5421
5422 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5423
5424         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5425         (btrace_function) <insn>: Change type to use std::vector.
5426         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5427         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5428         ftrace_update_insns, ftrace_compute_global_level_offset,
5429         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5430         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5431         change to std::vector.
5432         (ftrace_update_insns): Adjust to change to std::vector, change
5433         type of INSN parameter.
5434         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5435         * record-btrace.c (btrace_call_history_insn_range,
5436         btrace_compute_src_line_range,
5437         record_btrace_frame_prev_register): Adjust to change to
5438         std::vector.
5439         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5440         to change to std::vector.
5441
5442 2017-09-03  Tom Tromey  <tom@tromey.com>
5443
5444         * corefile.c (reopen_exec_file): Use std::string.
5445
5446 2017-09-03  Tom Tromey  <tom@tromey.com>
5447
5448         * compile/compile.c (compile_register_name_mangled): Return
5449         std::string.
5450         * compile/compile-loc2c.c (pushf_register_address): Update.
5451         (pushf_register): Update.
5452         * compile/compile-c-types.c (convert_array): Update.
5453         * compile/compile-c-symbols.c (generate_vla_size): Update.
5454         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5455         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5456         (convert_one_symbol): Update.
5457         (generate_c_for_for_one_variable): Update.
5458         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5459         std::string.
5460         (generate_register_struct): Update.
5461         * compile/compile-internal.h (c_get_range_decl_name): Return a
5462         std::string.
5463         (compile_register_name_mangled): Return std::string.
5464
5465 2017-09-03  Tom Tromey  <tom@tromey.com>
5466
5467         * utils.c (perror_string): Return a std::string.
5468         (throw_perror_with_name, perror_warning_with_name): Update.
5469
5470 2017-09-03  Tom Tromey  <tom@tromey.com>
5471
5472         * demangle.c (demangle_command): Use std::string,
5473         unique_xmalloc_ptr.
5474
5475 2017-09-03  Tom Tromey  <tom@tromey.com>
5476
5477         * cli/cli-setshow.c (do_set_command): Use std::string.
5478
5479 2017-09-03  Tom Tromey  <tom@tromey.com>
5480
5481         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5482
5483 2017-09-03  Tom Tromey  <tom@tromey.com>
5484
5485         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5486
5487 2017-09-03  Tom Tromey  <tom@tromey.com>
5488
5489         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5490         gdb::unique_xmalloc_ptr.
5491
5492 2017-09-03  Tom Tromey  <tom@tromey.com>
5493
5494         * thread.c (print_thread_info_1): Use string_printf.
5495         (thread_apply_command, thread_apply_all_command): Use
5496         std::string.
5497
5498 2017-09-03  Tom Tromey  <tom@tromey.com>
5499
5500         * valprint.c (val_print_string): Update.
5501         * gdbcore.h (memory_error_message): Return std::string.
5502         * corefile.c (memory_error_message): Return std::string.
5503         (memory_error): Update.
5504         * breakpoint.c (insert_bp_location): Update.
5505
5506 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5507
5508         * target/waitstatus.h (target_waitstatus_to_string): Change
5509         return type to std::string.
5510         * target/waitstatus.c (target_waitstatus_to_string): Return
5511         std::string.
5512         * target.h (target_waitstatus_to_string): Remove declaration.
5513         * infrun.c (resume, clear_proceed_status_thread,
5514         print_target_wait_results, do_target_wait, save_waitstatus,
5515         stop_all_threads): Adjust.
5516         * record-btrace.c (record_btrace_wait): Adjust.
5517         * target-debug.h
5518         (target_debug_print_struct_target_waitstatus_p): Adjust.
5519
5520 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5521
5522         PR gdb/22046
5523         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5524         detection.
5525
5526 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5527
5528         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5529         for setting/unsetting environment variables on the remote target.
5530         (New remote packets): Add entries for QEnvironmentHexEncoded,
5531         QEnvironmentUnset and QEnvironmentReset.
5532         * common/environ.c (gdb_environ::operator=): Extend method to
5533         handle m_user_set_env_list and m_user_unset_env_list.
5534         (gdb_environ::clear): Likewise.
5535         (match_var_in_string): Change type of first parameter from 'char
5536         *' to 'const char *'.
5537         (gdb_environ::set): Extend method to handle
5538         m_user_set_env_list and m_user_unset_env_list.
5539         (gdb_environ::unset): Likewise.
5540         (gdb_environ::clear_user_set_env): New method.
5541         (gdb_environ::user_set_envp): Likewise.
5542         (gdb_environ::user_unset_envp): Likewise.
5543         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5544         m_user_unset_env_list on move constructor/assignment.
5545         (unset): Add new default parameter 'update_unset_list = true'.
5546         (clear_user_set_env): New method.
5547         (user_set_envp): Likewise.
5548         (user_unset_envp): Likewise.
5549         (m_user_set_env_list): New std::set.
5550         (m_user_unset_env_list): Likewise.
5551         * common/rsp-low.c (hex2str): New function.
5552         (bin2hex): New overload for bin2hex function.
5553         * common/rsp-low.c (hex2str): New prototype.
5554         (str2hex): New overload prototype.
5555         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5556         QEnvironmentUnset and QEnvironmentReset.
5557         (remote_protocol_features): Add QEnvironmentHexEncoded,
5558         QEnvironmentUnset and QEnvironmentReset packets.
5559         (send_environment_packet): New function.
5560         (extended_remote_environment_support): Likewise.
5561         (extended_remote_create_inferior): Call
5562         extended_remote_environment_support.
5563         (_initialize_remote): Add QEnvironmentHexEncoded,
5564         QEnvironmentUnset and QEnvironmentReset packet configs.
5565         * unittests/environ-selftests.c (gdb_selftest_env_var):
5566         New variable.
5567         (test_vector_initialization): New function.
5568         (test_init_from_host_environ): Likewise.
5569         (test_reinit_from_host_environ): Likewise.
5570         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5571         Likewise.
5572         (test_unset_set_empty_vector): Likewise.
5573         (test_vector_clear): Likewise.
5574         (test_std_move): Likewise.
5575         (test_move_constructor):
5576         (test_self_move): Likewise.
5577         (test_set_unset_reset): Likewise.
5578         (run_tests): Rewrite in terms of the functions above.
5579
5580 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5581
5582         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5583         (adi_available): Use a temp variable of type CORE_ADDR as argument
5584         3 when calling target_auxv_search.
5585         (adi_normalize_address): Use masks and xor operators to calculate
5586         normalized address.
5587         (adi_read_versions, adi_write_versions, adi_print_versions)
5588         (do_examine, do_assign): Use paddress.
5589
5590 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5591
5592         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5593         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5594         out of loop and add supply of FIR.
5595         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5596         add collect of FIR.
5597
5598 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5599
5600         PR gdb/21827
5601         * cli/cli-script.c (define_command): Don't convert command name
5602         to lower case.
5603
5604 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5605
5606         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5607         Update all callers accordingly. Remove all code blocks handling
5608         the case where DISPP is not NULL.
5609
5610 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5611
5612         PR symtab/22003
5613         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5614         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5615         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5616
5617 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5618
5619         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5620         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5621         (read_comp_units_from_section): New parameter abbrev_section, use
5622         read_and_check_comp_unit_head, allocate signatured_type if needed.
5623         (create_all_comp_units): Update read_comp_units_from_section caller.
5624
5625 2017-08-23  Pedro Alves  <palves@redhat.com>
5626
5627         PR remote/21852
5628         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5629         to null_ptid and switch to thread without reading the registers
5630         after adding the inferior.
5631
5632 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5633
5634         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5635         compile-gcc.
5636         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5637         (compile_to_object): Implement compile_gcc.
5638         (_initialize_compile): Install "set compile-gcc".  Initialize
5639         compile_gcc.
5640
5641 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5642
5643         * compile/compile.c (compile_to_object): Conditionally call
5644         set_verbose.  Conditionally call compile or compile_v0.
5645
5646 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5647
5648         * sparc64-tdep.h: (adi_normalize_address): New export.
5649         * sparc-nat.h: (open_adi_tag_fd): New export.
5650         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5651         * sparc64-linux-tdep.c:
5652         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5653         (sparc64_linux_handle_segmentation_fault): New function.
5654         (sparc64_linux_init_abi): Register
5655         sparc64_linux_handle_segmentation_fault
5656         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5657         (sparc64_addr_bits_remove): New function.
5658         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5659         (MAX_PROC_NAME_SIZE): New macro.
5660         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5661         (sparc64adilist): New variable.
5662         (adi_proc_list): New variable.
5663         (find_adi_info): New function.
5664         (add_adi_info): New function.
5665         (get_adi_info_proc): New function.
5666         (get_adi_info): New function.
5667         (info_adi_command): New function.
5668         (read_maps_entry): New function.
5669         (adi_available): New function.
5670         (adi_normalize_address): New function.
5671         (adi_align_address): New function.
5672         (adi_convert_byte_count): New function.
5673         (adi_tag_fd): New function.
5674         (adi_is_addr_mapped): New function.
5675         (adi_read_versions): New function.
5676         (adi_write_versions): New function.
5677         (adi_print_versions): New function.
5678         (do_examine): New function.
5679         (do_assign): New function.
5680         (adi_examine_command): New function.
5681         (adi_assign_command): New function.
5682         (_initialize_sparc64_adi_tdep): New function.
5683
5684 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5685
5686         * breakpoint.c (breakpoints_info): Rename to ...
5687         (info_breakpoints_command): ... this.
5688         (watchpoints_info): Rename to ...
5689         (info_watchpoints_command): ... this.
5690         (tracepoints_info): Rename to ...
5691         (info_tracepoints_command): ... this.
5692         (_initialize_breakpoint): Adjust.
5693         * dcache.c (dcache_info): Rename to ...
5694         (info_display_command): ... this.
5695         (_initialize_dcache): Adjust.
5696         * frame.h (args_info): Rename to ...
5697         (info_args_command): ... this.
5698         (locals_info): Rename to ...
5699         (info_locals_command): ... this.
5700         * infcmd.c (nofp_registers_info): Rename to ...
5701         (info_registers_command): ... this.
5702         (float_info): Rename to ...
5703         (info_float_command): ... this.
5704         (program_info): Rename to ...
5705         (info_program_command): ... this.
5706         (all_registers_info): Rename to ...
5707         (info_all_registers_command): ... this.
5708         (vector_info): Rename to ...
5709         (info_vector_command): ... this.
5710         (float_info): Rename to ...
5711         (info_float_command): ... this.
5712         (_initialize_infcmd): Adjust.
5713         * inferior.h (term_info): Rename to ...
5714         (info_terminal_command): ... this.
5715         * inflow.c (term_info): Rename to ...
5716         (info_terminal_command): ... this.
5717         (_initialize_inflow): Adjust.
5718         * infrun.c (signals_info): Rename to ...
5719         (info_signals_command): ... this.
5720         (_initialize_infrun): Adjust.
5721         * objc-lang.c (classes_info): Rename to ...
5722         (info_classes_command): ... this.
5723         (selectors_info): Rename to ...
5724         (info_selectors_command): ... this.
5725         (_initialize_objc_language): Adjust.
5726         * printcmd.c (sym_info): Rename to ...
5727         (info_symbol_command): ... this.
5728         (address_info): Rename to ...
5729         (info_address_command): ... this.
5730         (display_info): Rename to ...
5731         (info_display_command): ... this.
5732         (_initialize_printcmd): Adjust.
5733         * reverse.c (bookmarks_info): Rename to ...
5734         (info_breakpoints_command): ... this.
5735         (_initialize_reverse): Adjust.
5736         * ser-go32.c (dos_info): Rename to ...
5737         (info_serial_command): ... this.
5738         (_initialize_ser_dos): Adjust.
5739         * skip.c (skip_info): Rename to ...
5740         (info_skip_command): ... this.
5741         (_initialize_step_skip): Adjust.
5742         * source.c (line_info): Rename to ...
5743         (info_line_command): ... this.
5744         (source_info): Rename to ...
5745         (info_source_command)
5746         * stack.c (frame_info): Rename to ...
5747         (info_frame_command): ... this.
5748         (locals_info): Rename to ...
5749         (info_locals_command): ... this.
5750         (args_info): Rename to ...
5751         (info_args_command): ... this.
5752         (_initialize_stack): Adjust.
5753         * symtab.c (sources_info): Rename to ...
5754         (info_sources_command): ... this.
5755         (variables_info): Rename to ...
5756         (info_variables_command): ... this.
5757         (functions_info): Rename to ...
5758         (info_functions_command): ... this.
5759         (types_info): Rename to ...
5760         (info_types_command): ... this.
5761         (_initialize_symtab): Adjust.
5762         * target.c (target_info): Rename to ...
5763         (info_target_command): ... this.
5764         (initialize_targets): Adjust.
5765         * tracepoint.c (tvariables_info): Rename to ...
5766         (info_tvariables_command): ... this.
5767         (scope_info): Rename to ...
5768         (info_scope_command): ... this.
5769         (trace_dump_actions): Adjust.
5770         (_initialize_tracepoint): Adjust.
5771
5772 2017-08-22  Tom Tromey  <tom@tromey.com>
5773
5774         * breakpoint.h (install_breakpoint): Update.
5775         * breakpoint.c (add_solib_catchpoint): Update.
5776         (install_breakpoint): Change argument to a std::unique_ptr.
5777         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5778         (create_breakpoint_sal, create_breakpoint): Update.
5779         (watch_command_1, catch_exec_command_1)
5780         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5781         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5782         Return the breakpoint.
5783         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5784         (new_single_step_breakpoint): Update.
5785         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5786         std::unique_ptr.
5787         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5788         std::unique_ptr.
5789         * break-catch-sig.c (create_signal_catchpoint): Use
5790         std::unique_ptr.
5791         * ada-lang.c (create_ada_exception_catchpoint): Use
5792         std::unique_ptr.
5793
5794 2017-08-22  Tom Tromey  <tom@tromey.com>
5795
5796         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5797
5798 2017-08-22  Tom Tromey  <tom@tromey.com>
5799
5800         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5801         (lookup_partial_symbol): Update.
5802
5803 2017-08-22  Tom Tromey  <tom@tromey.com>
5804
5805         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5806         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5807         (find_and_open_source, symtab_to_fullname): Update.
5808         * psymtab.c (psymtab_to_fullname): Update.
5809
5810 2017-08-22  Tom Tromey  <tom@tromey.com>
5811
5812         * exec.c (exec_file_attach): Update.
5813         * linux-thread-db.c (try_thread_db_load): Update.
5814         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5815         * utils.c (gdb_realpath): Change return type.
5816         (gdb_realpath_keepfile): Update.
5817         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5818         (_initialize_utils): Register the new self test.
5819         * source.c (openp): Update.
5820         (find_and_open_source): Update.
5821         * nto-tdep.c (nto_find_and_open_solib): Update.
5822         * main.c (set_gdb_data_directory): Update.
5823         (captured_main_1): Update.
5824         * dwarf2read.c (dwarf2_get_dwz_file): Update
5825         (dw2_map_symbol_filenames): Update.
5826         * auto-load.c (auto_load_safe_path_vec_update): Update.
5827         (filename_is_in_auto_load_safe_path_vec): Change type of
5828         "filename_realp".
5829         (auto_load_objfile_script): Update.
5830         (file_is_auto_load_safe): Update.  Use std::string.
5831         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5832
5833 2017-08-22  Tom Tromey  <tom@tromey.com>
5834
5835         * utils.c (gdb_realpath_keepfile): Return a
5836         gdb::unique_xmalloc_ptr.
5837         * exec.c (exec_file_attach): Update.
5838         * utils.h (gdb_realpath_keepfile): Return a
5839         gdb::unique_xmalloc_ptr.
5840
5841 2017-08-22  Tom Tromey  <tom@tromey.com>
5842
5843         * compile/compile.c (compile_file_command): Use
5844         gdb::unique_xmalloc_ptr, std::string.
5845         * utils.c (gdb_abspath): Change return type.
5846         * source.c (openp): Update.
5847         * objfiles.c (allocate_objfile): Update.
5848         * main.c (set_gdb_data_directory): Update.
5849         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5850
5851 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5852
5853         * cli-cmds.c (list_commands): List actual code around more than
5854         one location.
5855
5856 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5857
5858         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5859
5860 2017-08-21  Pedro Alves  <palves@redhat.com>
5861
5862         PR gdb/19487
5863         * c-exp.y (variable production): Handle function aliases.
5864         * minsyms.c (msymbol_is_text): New function.
5865         * minsyms.h (msymbol_is_text): Declare.
5866         * symtab.c (find_function_alias_target): New function.
5867         * symtab.h (find_function_alias_target): Declare.
5868
5869 2017-08-21  Pedro Alves  <palves@redhat.com>
5870
5871         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5872         typedefs.
5873         * typeprint.c (whatis_exp): If handling "whatis", and expression
5874         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5875         typedefs here.
5876         * valops.c (value_cast): Save "to" type before resolving
5877         stubs/typedefs.  Use that type as resulting value's type.
5878
5879 2017-08-18  Tom Tromey  <tom@tromey.com>
5880             Pedro Alves  <palves@redhat.com>
5881
5882         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5883         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5884         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5885         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5886         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5887         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5888         (linux_get_siginfo_data): Add "thread" argument.  Use
5889         scoped_restore.
5890         * linux-nat.c (linux_child_follow_fork)
5891         (check_stopped_by_watchpoint): Use scoped_restore.
5892         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5893         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5894         (restore_inferior_ptid, save_inferior_ptid): Remove.
5895         * btrace.c (btrace_fetch): Use scoped_restore.
5896         * bsd-uthread.c (bsd_uthread_fetch_registers)
5897         (bsd_uthread_store_registers): Use scoped_restore.
5898         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5899         scoped_restore.
5900         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5901         (aix_thread_xfer_partial): Use scoped_restore.
5902         * inferior.h (save_inferior_ptid): Remove.
5903
5904 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5905
5906         PR tdep/21818
5907         * arm-tdep.c (gdb_print_insn_arm): Mark
5908         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5909
5910 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5911
5912         * NEWS: Mention GDBserver's new option "--selftest".
5913         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5914         * selftest.c: Move it to common/selftest.c.
5915         * selftest.h: Move it to common/selftest.h.
5916         * selftest-arch.c (reset): New function.
5917         (tests_with_arch): Call reset.
5918
5919 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5920
5921         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
5922         instead of exception_fprintf and printf_filtered.
5923
5924 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5925
5926         * selftest.c (register_self_test): Rename it to
5927         selftests::register_test.
5928         (run_self_tests): selftest::run_tests.
5929         * selftest.h: Update declarations.
5930         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5931         selftests::register_test_foreach_arch.
5932         * selftest-arch.h: Update declaration.
5933         * aarch64-tdep.c: Update.
5934         * arm-tdep.c: Likewise.
5935         * disasm-selftests.c: Likewise.
5936         * dwarf2loc.c: Likewise.
5937         * dwarf2-frame.c: Likewise.
5938         * findvar.c: Likewise.
5939         * gdbarch-selftests.c: Likewise.
5940         * maint.c (maintenance_selftest): Likewise.
5941         * regcache.c: Likewise.
5942         * rust-exp.y: Likewise.
5943         * selftest-arch.c: Likewise.
5944         * unittests/environ-selftests.c: Likewise.
5945         * unittests/function-view-selftests.c: Likewise.
5946         * unittests/offset-type-selftests.c: Likewise.
5947         * unittests/optional-selftests.c: Likewise.
5948         * unittests/scoped_restore-selftests.c: Likewise.
5949         * utils-selftests.c: Likewise.
5950
5951 2017-08-17  Pedro Alves  <palves@redhat.com>
5952
5953         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5954         local.
5955
5956 2017-08-17  Pedro Alves  <palves@redhat.com>
5957
5958         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5959         field.
5960         (reset_die_in_process): Delete, replaced by ...
5961         (process_die_scope): ... this new class.  Make it responsible for
5962         freeing cu->line_header too.
5963         (process_die): Use process_die_scope.
5964         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5965         cu->line_header_die_owner.  Don't release the line header if it's
5966         owned by the CU.
5967         (setup_type_unit_groups): Make the CU/DIE own the line header.
5968         Don't release the line header here.
5969
5970 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
5971
5972         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5973
5974 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5975
5976         * NEWS: Mention new shortcuts for nexti and stepi in TUI
5977         Single-Key mode
5978
5979 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
5980
5981         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5982         mode command list.
5983
5984 2017-08-15  Stafford Horne  <shorne@gmail.com>
5985
5986         * MAINTAINERS (Write After Approval): Add Stafford Horne.
5987
5988 2017-08-15  Stafford Horne  <shorne@gmail.com>
5989
5990         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5991
5992 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
5993
5994         PR gdb/21954
5995         * infcmd.c (unset_environment_command): Use the 'clear' method on
5996         the environment instead of resetting it.
5997
5998 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
5999
6000         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6001         platforms.
6002
6003 2017-08-14  Tom Tromey  <tom@tromey.com>
6004
6005         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6006         (print_binary_chars): Likewise.
6007         (BITS_IN_BYTES): Remove.
6008
6009 2017-08-14  Tom Tromey  <tom@tromey.com>
6010
6011         PR gdb/21675
6012         * valprint.c (LOW_ZERO): Change value to 034.
6013         (print_octal_chars): Add static_asserts for octal constants.
6014         * printcmd.c (print_scalar_formatted): Add 'd' case.
6015
6016 2017-08-11  Tom Tromey  <tom@tromey.com>
6017
6018         * symfile.c (add_symbol_file_command): Use std::vector.
6019
6020 2017-08-14  Tom Tromey  <tom@tromey.com>
6021
6022         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6023         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6024         std::move.
6025         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6026
6027 2017-08-11  Pedro Alves  <palves@redhat.com>
6028
6029         * infrun.c (process_event_stop_test): Adjust
6030         function_name_is_marked_for_skip call.
6031         * skip.c: Include <list>.
6032         (skiplist_entry): Make it a class with private fields, and
6033         getters/setters.
6034         (skiplist_entry_chain): Delete.
6035         (skiplist_entries): New.
6036         (skiplist_entry_count): Delete.
6037         (highest_skiplist_entry_num): New.
6038         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6039         (add_skiplist_entry): Delete.
6040         (skiplist_entry::skiplist_entry): New.
6041         (skiplist_entry::add_entry): New.
6042         (skip_file_command, skip_function): Adjust.
6043         (compile_skip_regexp): Delete.
6044         (skip_command): Don't compile regexp here.  Adjust to use
6045         skiplist_entry::add_entry.
6046         (skip_info): Adjust to use range-for and getters.
6047         (skip_enable_command, skip_disable_command): Adjust to use
6048         range-for and setters.
6049         (skip_delete_command): Adjust to use std::list.
6050         (add_skiplist_entry): Delete.
6051         (skip_file_p): Delete, refactored as ...
6052         (skiplist_entry::do_skip_file_p): ... this new method.
6053         (skip_gfile_p): Delete, refactored as ...
6054         (skiplist_entry::do_gskip_file_p): ... this new method.
6055         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6056         (skiplist_entry::skip_function_p): ... this new method.
6057         (function_name_is_marked_for_skip): Now returns bool, and takes
6058         the function sal by const reference.  Adjust to use range-for and
6059         skiplist_entry methods.
6060         (_initialize_step_skip): Remove references to
6061         skiplist_entry_chain, skiplist_entry_count.
6062         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6063         takes the function sal by const reference.
6064
6065 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6066
6067         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6068         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6069         (dwarf2_frame_cache):
6070         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6071         RETURN_MASK_ALL and set *this_case to NULL.
6072         * frame-unwind.h: Update comments.
6073
6074 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6075
6076         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6077         (dwarf2_frame_state_copy_regs): Remove.
6078         (dwarf2_frame_state_free_regs): Remove.
6079         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6080         (dwarf2_restore_rule): Call method .alloc_regs instead of
6081         dwarf2_frame_state_alloc_regs.
6082         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6083         constructor.  Call std::move.
6084         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6085         (dwarf2_frame_cache): Likewise.
6086
6087         [GDB_SELF_TEST]: Include selftest.h and
6088         selftest-arch.h.
6089         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6090         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6091         execute_cfa_program_test.
6092
6093         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6094         copy ctor, assignment operator, move assignment.
6095         <alloc_regs>: New method.
6096         <swap>: New method.
6097         (struct dwarf2_frame_state): Delete dtor.
6098         (dwarf2_frame_state_alloc_regs): Remove declaration.
6099         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6100         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6101
6102 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6103
6104         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6105         (dwarf2_frame_state::dwarf2_frame_state): New.
6106         (dwarf2_frame_state::~dwarf2_frame_state): New.
6107         (dwarf2_fetch_cfa_info): Update.
6108         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6109         rather than a pointer.  Update code.
6110         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6111         dtor.
6112         <data_align, code_align, retaddr_column>: Change them to const.
6113         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6114         to bool.
6115
6116 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6117
6118         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6119         <loc.exp>: New field.
6120         * dwarf2-frame.c (execute_cfa_program): Update.
6121         (dwarf2_frame_prev_register): Update.
6122
6123 2017-08-10  Pedro Alves  <palves@redhat.com>
6124
6125         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6126
6127 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6128
6129         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6130         (fbsd_pending_children): Use std::list.
6131         (fbsd_remember_child): Likewise.
6132         (fbsd_is_child_pending): Likewise.
6133         (fbsd_pending_vfork_done): Use std::forward_list.
6134         (fbsd_add_vfork_done): Likewise.
6135         (fbsd_is_vfork_done_pending): Likewise.
6136         (fbsd_next_vfork_done): Likewise.
6137
6138 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6139
6140         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6141         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6142         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6143         for `mapfilename'.
6144         (fbsd_xfer_partial): Use gdb::byte_vector.
6145         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6146
6147 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6148
6149         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6150         "filestuff.h".
6151         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6152
6153 2017-08-09  Tom Tromey  <tom@tromey.com>
6154
6155         * skip.c (skiplist_entry): New constructor.
6156         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6157         (skiplist_entry::file_is_glob): Now bool.
6158         (skiplist_entry::file, skiplist_entry::function): Now
6159         std::string.
6160         (make_skip_entry): Return a unique_ptr.  Use new.
6161         (free_skiplist_entry, free_skiplist_entry_cleanup)
6162         (make_free_skiplist_entry_cleanup): Remove.
6163         (skip_command, skip_disable_command, add_skiplist_entry)
6164         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6165         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6166         (function_name_is_marked_for_skip): Update.
6167         (skip_delete_command): Update.  Use delete.
6168
6169 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6170
6171         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6172         (aarch64_linux_core_read_description): New function.
6173         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6174
6175 2017-08-09  Pedro Alves  <palves@redhat.com>
6176
6177         * cp-name-parser.y (cp_comp_to_string): Return a
6178         gdb::unique_xmalloc_ptr<char>.
6179         * cp-support.c (replace_typedefs_qualified_name)
6180         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6181         (cp_canonicalize_string_full): Use op= instead of explicit
6182         convertion.
6183         (cp_class_name_from_physname, method_name_from_physname)
6184         (cp_func_name, cp_remove_params): Adjust to use
6185         gdb::unique_xmalloc_ptr<char>.
6186         * cp-support.h (cp_comp_to_string): Return a
6187         gdb::unique_xmalloc_ptr<char>.
6188         * python/py-type.c (typy_lookup_type): Adjust to use
6189         gdb::unique_xmalloc_ptr<char>.
6190
6191 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6192
6193         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6194
6195 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6196             Yao Qi  <yao.qi@linaro.org>
6197
6198         * cp-support.c (cp_canonicalize_string_full): Use
6199         gdb::unique_xmalloc_ptr<char>.
6200         (cp_canonicalize_string): Likewise.
6201
6202 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6203
6204         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6205         * regformats/i386/amd64-avx-avx512.dat: Remove.
6206         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6207         * regformats/i386/amd64-avx-mpx.dat:Remove.
6208         * regformats/i386/amd64-avx.dat: Remove.
6209         * regformats/i386/amd64-mpx.dat: Remove.
6210         * regformats/i386/i386-avx-avx512.dat: Remove.
6211         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6212         * regformats/i386/i386-avx-mpx.dat: Remove.
6213         * regformats/i386/i386-mmx.dat: Remove.
6214         * regformats/i386/i386-mpx.dat: Remove.
6215
6216 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6217
6218         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6219         * amd64-tdep.c: Don't include features/i386/x32*.c.
6220         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6221         functions.
6222         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6223         and i386/x32-avx-avx512.
6224         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6225         and i386/x32.xml.
6226         * features/i386/x32-avx-avx512.c: Removed.
6227         * features/i386/x32-avx-avx512.xml: Removed.
6228         * features/i386/x32-avx.c: Removed.
6229         * features/i386/x32-avx.xml: Removed.
6230         * features/i386/x32.c: Removed.
6231         * features/i386/x32.xml: Removed.
6232         * regformats/i386/x32-avx-avx512.dat: Removed.
6233         * regformats/i386/x32-avx.dat: Removed.
6234         * regformats/i386/x32.dat: Removed.
6235
6236 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6237
6238         PR breakpoints/21886
6239         * mem-break.c (default_memory_insert_breakpoint): Use
6240         `->placed_address' rather than `->reqstd_address' for the
6241         breakpoint location.
6242
6243 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6244
6245         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6246         assertions.
6247
6248 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6249
6250         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6251         a union of `tdep_info', `tdesc_data' and `id'.
6252         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6253         rather than `info.tdep_info'.
6254         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6255         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6256         * i386-tdep.c (i386_gdbarch_init): Likewise.
6257         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6258         * mips-tdep.c (mips_gdbarch_init): Likewise.
6259         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6260         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6261         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6262         `info.tdep_info'.
6263         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6264         `info.tdep_info'.
6265         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6266         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6267         `info.tdep_info'.
6268         * spu-tdep.c (spu_gdbarch_init): Likewise.
6269         * gdbarch.h: Regenerate.
6270
6271 2017-08-07  Leszek Swirski  <leszeks@google.com>
6272
6273         PR symtab/20899
6274         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6275
6276 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6277
6278         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6279         (gdbsim_open): Rename gdb_argv args object to argv.
6280
6281 2017-08-05  Tom Tromey  <tom@tromey.com>
6282
6283         * compile/compile-object-load.c (compile_object_load): Use
6284         gdb::unique_xmalloc_ptr.
6285         * cli/cli-dump.c (scan_filename): Rename from
6286         scan_filename_with_cleanup.  Change return type.
6287         (scan_expression): Rename from scan_expression_with_cleanup.
6288         Change return type.
6289         (dump_memory_to_file, dump_value_to_file, restore_command):
6290         Use gdb::unique_xmalloc_ptr.  Update.
6291         * cli/cli-cmds.c (find_and_open_script): Use
6292         gdb::unique_xmalloc_ptr.
6293         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6294         * symmisc.c (maintenance_print_symbols)
6295         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6296         * symfile.c (symfile_bfd_open, generic_load)
6297         (add_symbol_file_command, remove_symbol_file_command): Use
6298         gdb::unique_xmalloc_ptr.
6299         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6300         * psymtab.c (maintenance_print_psymbols): Use
6301         gdb::unique_xmalloc_ptr.
6302         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6303         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6304         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6305         (reload_shared_libraries_1): Likewise.
6306
6307 2017-08-05  Tom Tromey  <tom@tromey.com>
6308
6309         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6310         (rust_op_vector, rust_set_vector): New typedefs.
6311         (current_parser): New global.
6312         (work_obstack): Change to pointer type.  Update all users.
6313         (rust_ast, pstate): Remove globals.
6314         (struct rust_parser): New.
6315         (%union) <params, field_inits>: Change type.
6316         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6317         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6318         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6319         (convert_params_to_types, convert_params_to_expression): Change
6320         type of "params".
6321         (ast_string): Change type of "fields".
6322         (rust_parse): Make a rust_parser.  Remove cleanups.
6323         (rust_lex_tests): Make and install an auto_obstack.
6324
6325 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6326
6327         * configure.srv (ipa_x32_linux_regobj): New.
6328         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6329         instead of X86_TDESC_AVX512.
6330         (initialize_low_tracepoint): Call
6331         init_registers_x32_avx_avx512_linux.
6332
6333 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6334
6335         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6336
6337 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6338
6339         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6340
6341 2017-08-03  Tom Tromey  <tom@tromey.com>
6342
6343         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6344         Remove.
6345         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6346
6347 2017-08-03  Tom Tromey  <tom@tromey.com>
6348
6349         * python/py-param.c (compute_enum_values): Use gdb_argv.
6350
6351 2017-08-03  Tom Tromey  <tom@tromey.com>
6352
6353         * utils.h (struct gdb_argv_deleter): New.
6354         (gdb_argv): New class.
6355         * utils.c (gdb_argv::reset): New method.
6356         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6357         * tracefile.c (tsave_command): Use gdb_argv.
6358         * top.c (new_ui_command): Use gdb_argv.
6359         * symmisc.c (maintenance_print_symbols)
6360         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6361         * symfile.c (symbol_file_command, generic_load)
6362         (remove_symbol_file_command): Use gdb_argv.
6363         * stack.c (backtrace_command): Use gdb_argv.
6364         * source.c (add_path, show_substitute_path_command)
6365         (unset_substitute_path_command, set_substitute_path_command):
6366         Use gdb_argv.
6367         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6368         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6369         * remote.c (extended_remote_run, remote_put_command)
6370         (remote_get_command, remote_delete_command): Use gdb_argv.
6371         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6372         (gdbsim_open): Use gdb_argv.
6373         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6374         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6375         * procfs.c (procfs_info_proc): Use gdb_argv.
6376         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6377         * infrun.c (handle_command): Use gdb_argv.
6378         * inferior.c (add_inferior_command, clone_inferior_command):
6379         Use gdb_argv.
6380         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6381         * exec.c (exec_file_command): Use gdb_argv.
6382         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6383         * compile/compile.c (build_argc_argv): Use gdb_argv.
6384
6385 2017-08-03  Tom Tromey  <tom@tromey.com>
6386
6387         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6388
6389 2017-08-03  Tom Tromey  <tom@tromey.com>
6390
6391         * python/python.c (compute_python_string): Return std::string.
6392         (gdbpy_eval_from_control_command): Update.
6393         (do_start_initialization): Use std::string.
6394         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6395         xstrprintf.
6396         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6397         xstrprintf.
6398
6399 2017-08-03  Tom Tromey  <tom@tromey.com>
6400
6401         * top.h (do_restore_instream_cleanup): Remove.
6402         * top.c (do_restore_instream_cleanup): Remove.
6403         (read_command_file): Use scoped_restore.
6404         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6405
6406 2017-08-03  Tom Tromey  <tom@tromey.com>
6407
6408         * cli/cli-script.c (execute_user_command)
6409         (execute_control_command): Use scoped_restore.
6410
6411 2017-08-03  Tom Tromey  <tom@tromey.com>
6412
6413         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6414         (execute_user_command): Remove user_call_depth; use
6415         user_args_stack's size instead.
6416
6417 2017-08-03  Tom Tromey  <tom@tromey.com>
6418
6419         * top.h (in_user_command): Remove.
6420         * top.c (in_user_command): Remove.
6421         * cli/cli-script.c (do_restore_user_call_depth)
6422         (execute_user_command): Update.
6423
6424 2017-08-03  Tom Tromey  <tom@tromey.com>
6425
6426         * valops.c (search_struct_method): Use gdb::byte_vector.
6427         * valarith.c (value_concat): Use std::vector.
6428         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6429         (simple_search_memory): Likewise.
6430         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6431         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6432         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6433         * elfread.c (elf_rel_plt_read): Use std::string.
6434         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6435         * cli/cli-dump.c (restore_section_callback): Use
6436         gdb::byte_vector.
6437
6438 2017-08-03  Tom Tromey  <tom@tromey.com>
6439
6440         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6441
6442 2017-08-03  Tom Tromey  <tom@tromey.com>
6443
6444         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6445         (tui_register_format): Use scoped_restore.
6446
6447 2017-08-03  Tom Tromey  <tom@tromey.com>
6448
6449         * reverse.c (exec_direction_default): Remove.
6450         (exec_reverse_once): Use scoped_restore.
6451         * remote.c (restore_remote_timeout): Remove.
6452         (remote_flash_erase, remote_flash_write, remote_flash_done)
6453         (readchar, remote_serial_write): Use scoped_restore.
6454         * cli/cli-script.c (struct source_cleanup_lines_args)
6455         (source_cleanup_lines): Remove.
6456         (script_from_file): Use scoped_restore.
6457         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6458         (source_command): Use scoped_restore.
6459
6460 2017-08-03  Tom Tromey  <tom@tromey.com>
6461
6462         * utils.h (make_cleanup_free_so): Remove.
6463         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6464         * solist.h (struct so_deleter): New.
6465         (so_list_up): New typedef.
6466         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6467
6468 2017-08-03  Tom Tromey  <tom@tromey.com>
6469
6470         * utils.h (make_cleanup_restore_current_language): Remove.
6471         * utils.c (do_restore_current_language)
6472         (make_cleanup_restore_current_language): Remove.
6473         * parse.c (parse_exp_in_context_1)
6474         (parse_expression_with_language): Use
6475         scoped_restore_current_language.
6476         * mi/mi-main.c (mi_cmd_execute): Use
6477         scoped_restore_current_language.
6478         * language.h (scoped_restore_current_language): New class.
6479
6480 2017-08-03  Tom Tromey  <tom@tromey.com>
6481
6482         * compile/compile.c (cleanup_unlink_file): Remove.
6483         (compile_to_object): Use gdb::unlinker.
6484         (eval_compile_command): Likewise.
6485
6486 2017-08-03  Tom Tromey  <tom@tromey.com>
6487
6488         * utils.h (make_cleanup_fclose): Remove.
6489         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6490
6491 2017-08-03  Tom Tromey  <tom@tromey.com>
6492
6493         * top.c (open_terminal_stream): Return gdb_file_up.
6494         (new_ui_command): Update.
6495
6496 2017-08-03  Tom Tromey  <tom@tromey.com>
6497
6498         * source.c (print_source_lines_base, forward_search_command)
6499         (reverse_search_command): Use gdb_file_up.
6500
6501 2017-08-03  Tom Tromey  <tom@tromey.com>
6502
6503         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6504
6505 2017-08-03  Tom Tromey  <tom@tromey.com>
6506
6507         * cli/cli-cmds.c (find_and_open_script): Change return type.
6508         Remove "streamp" and "full_path" parameters.
6509         (source_script_with_search): Update.
6510         * auto-load.c (source_script_file): Update.
6511         * cli/cli-cmds.h (find_and_open_script): Change type.
6512         (open_script): New struct.
6513
6514 2017-08-03  Tom Tromey  <tom@tromey.com>
6515
6516         * xml-support.c (xml_fetch_content_from_file): Update.
6517         * ui-file.c (stdio_file::open): Update.
6518         * tracefile-tfile.c (tfile_start): Update.
6519         * remote.c (remote_file_put, remote_file_get): Update.
6520         * nat/linux-procfs.c (linux_proc_get_int)
6521         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6522         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6523         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6524         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6525         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6526         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6527         * linux-nat.c (linux_proc_pending_signals): Update.
6528         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6529         (file_closer): Remove.
6530         * compile/compile.c (compile_to_object): Update.
6531         * common/filestuff.h (struct gdb_file_deleter): New.
6532         (gdb_file_up): New typedef.
6533         (gdb_fopen_cloexec): Change return type.
6534         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6535         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6536         (dump_binary_file, restore_binary_file): Update.
6537         * auto-load.c (auto_load_objfile_script_1): Update.
6538
6539 2017-08-03  Tom Tromey  <tom@tromey.com>
6540
6541         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6542         (info_static_tracepoint_markers_command): Likewise.
6543         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6544         * skip.c (skip_info): Use ui_out_emit_table.
6545         * progspace.c (print_program_space): Use ui_out_emit_table.
6546         * osdata.c (info_osdata): Use ui_out_emit_table.
6547         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6548         ui_out_emit_table.
6549         * linux-thread-db.c (info_auto_load_libthread_db): Use
6550         ui_out_emit_table.
6551         * inferior.c (print_inferior): Use ui_out_emit_table.
6552         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6553         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6554         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6555         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6556         * ui-out.h (class ui_out_emit_table): New.
6557
6558 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6559
6560         * mips-tdep.c (mips_fpu_type_str): New function.
6561         (mips_dump_tdep): Call it.
6562
6563 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6564
6565         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6566         `->mips_fpu_type'.
6567
6568 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6569
6570         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6571
6572 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6573
6574         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6575
6576 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6577
6578         * cli/cli-cmds.c (maintenancechecklist): New variable.
6579         * gdbcmd.h (maintenancechecklist): Declare it.
6580         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6581         Call i386_linux_read_description with different masks.
6582         * maint.c (maintenance_check_command): New function.
6583         (_initialize_maint_cmds): Call add_prefix_cmd.
6584         * target-descriptions.c (tdesc_reg): override operator != and ==.
6585         (tdesc_type): Likewise.
6586         (tdesc_feature): Likewise.
6587         (target_desc): Likewise.
6588         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6589         (maintenance_check_xml_descriptions): New function.
6590         (_initialize_target_descriptions) Add command "xml-descriptions".
6591         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6592
6593 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6594
6595         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6596         Include features/i386/32bit-*.c.
6597         (i386_linux_read_description): Generate target description if it
6598         doesn't exist.
6599         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6600         functions.
6601         * features/i386/32bit-linux.c: Re-generated.
6602         * features/i386/32bit-sse.c: Likewise.
6603         * target-descriptions.c (print_c_feature::visit): Print code to
6604         set register number if needed.
6605         (print_c_feature) <m_next_regnum>: New field.
6606
6607 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6608
6609         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6610         (FEATURE_XMLFILES): New.
6611         (FEATURE_CFILES): New.
6612         New rules.
6613         (clean-cfiles): Remove generated c files.
6614         * features/i386/32bit-avx.c: Generated.
6615         * features/i386/32bit-avx512.c: Generated.
6616         * features/i386/32bit-core.c: Generated.
6617         * features/i386/32bit-linux.c: Generated.
6618         * features/i386/32bit-mpx.c: Generated.
6619         * features/i386/32bit-pkeys.c: Generated.
6620         * features/i386/32bit-sse.c: Generated.
6621         * target-descriptions.c: Include algorithm.
6622         (tdesc_element_visitor): Add method visit_end.
6623         (print_c_tdesc): Implement visit_end.
6624         (print_c_tdesc:: m_filename_after_features): Move it to
6625         protected.
6626         (print_c_feature): New class.
6627         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6628         name starts with "i386/32bit-".
6629
6630 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6631
6632         * target-descriptions.c (tdesc_element_visitor): New class.
6633         (tdesc_element): New class.
6634         (tdesc_reg): Inherit from tdesc_element.
6635         (tdesc_reg::accept): New function.
6636         (tdesc_type): Inherit from tdesc_element.
6637         (tdesc_type::accept): New function.
6638         (tdesc_feature): Inherit from tdesc_element.
6639         (tdesc_feature::accept): New function.
6640         (target_desc): Inherit from tdesc_element.
6641         (target_desc::target_desc): New.
6642         (target_desc::~target_desc): New.
6643         (target_desc::accept): New.
6644         (allocate_target_description): Use new.
6645         (free_target_description): Use delete.
6646         (print_c_tdesc): New class.
6647         (maint_print_c_tdesc_cmd): Adjust.
6648
6649         * features/aarch64.c: Re-generated.
6650         * features/arc-arcompact.c: Re-generated.
6651         * features/arc-v2.c: Re-generated.
6652         * features/arm/arm-with-iwmmxt.c: Re-generated.
6653         * features/arm/arm-with-m.c: Re-generated.
6654         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6655         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6656         * features/arm/arm-with-neon.c: Re-generated.
6657         * features/arm/arm-with-vfpv2.c: Re-generated.
6658         * features/arm/arm-with-vfpv3.c: Re-generated.
6659         * features/i386/amd64-avx-avx512.c: Re-generated.
6660         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6661         * features/i386/amd64-avx.c: Re-generated.
6662         * features/i386/amd64-avx-linux.c: Re-generated.
6663         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6664         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6665         * features/i386/amd64-avx-mpx.c: Re-generated.
6666         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6667         * features/i386/amd64.c: Re-generated.
6668         * features/i386/amd64-linux.c: Re-generated.
6669         * features/i386/amd64-mpx.c: Re-generated.
6670         * features/i386/amd64-mpx-linux.c: Re-generated.
6671         * features/i386/i386-avx-avx512.c: Re-generated.
6672         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6673         * features/i386/i386-avx.c: Re-generated.
6674         * features/i386/i386-avx-linux.c: Re-generated.
6675         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6676         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6677         * features/i386/i386-avx-mpx.c: Re-generated.
6678         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6679         * features/i386/i386.c: Re-generated.
6680         * features/i386/i386-linux.c: Re-generated.
6681         * features/i386/i386-mmx.c: Re-generated.
6682         * features/i386/i386-mmx-linux.c: Re-generated.
6683         * features/i386/i386-mpx.c: Re-generated.
6684         * features/i386/i386-mpx-linux.c: Re-generated.
6685         * features/i386/x32-avx-avx512.c: Re-generated.
6686         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6687         * features/i386/x32-avx.c: Re-generated.
6688         * features/i386/x32-avx-linux.c: Re-generated.
6689         * features/i386/x32.c: Re-generated.
6690         * features/i386/x32-linux.c: Re-generated.
6691         * features/microblaze.c: Re-generated.
6692         * features/microblaze-with-stack-protect.c: Re-generated.
6693         * features/mips64-dsp-linux.c: Re-generated.
6694         * features/mips64-linux.c: Re-generated.
6695         * features/mips-dsp-linux.c: Re-generated.
6696         * features/mips-linux.c: Re-generated.
6697         * features/nds32.c: Re-generated.
6698         * features/nios2.c: Re-generated.
6699         * features/nios2-linux.c: Re-generated.
6700         * features/rs6000/powerpc-32.c: Re-generated.
6701         * features/rs6000/powerpc-32l.c: Re-generated.
6702         * features/rs6000/powerpc-403.c: Re-generated.
6703         * features/rs6000/powerpc-403gc.c : Re-generated.
6704         * features/rs6000/powerpc-405.c: Re-generated.
6705         * features/rs6000/powerpc-505.c: Re-generated.
6706         * features/rs6000/powerpc-601.c: Re-generated.
6707         * features/rs6000/powerpc-602.c: Re-generated.
6708         * features/rs6000/powerpc-603.c: Re-generated.
6709         * features/rs6000/powerpc-604.c: Re-generated.
6710         * features/rs6000/powerpc-64.c: Re-generated.
6711         * features/rs6000/powerpc-64l.c: Re-generated.
6712         * features/rs6000/powerpc-7400.c: Re-generated.
6713         * features/rs6000/powerpc-750.c: Re-generated.
6714         * features/rs6000/powerpc-860.c: Re-generated.
6715         * features/rs6000/powerpc-altivec32.c: Re-generated.
6716         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6717         * features/rs6000/powerpc-altivec64.c: Re-generated.
6718         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6719         * features/rs6000/powerpc-cell32l.c: Re-generated.
6720         * features/rs6000/powerpc-cell64l.c: Re-generated.
6721         * features/rs6000/powerpc-e500.c: Re-generated.
6722         * features/rs6000/powerpc-e500l.c: Re-generated.
6723         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6724         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6725         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6726         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6727         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6728         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6729         * features/rs6000/powerpc-vsx32.c: Re-generated.
6730         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6731         * features/rs6000/powerpc-vsx64.c: Re-generated.
6732         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6733         * features/rs6000/rs6000.c: Re-generated.
6734         * features/s390-linux32.c: Re-generated.
6735         * features/s390-linux32v1.c: Re-generated.
6736         * features/s390-linux32v2.c: Re-generated.
6737         * features/s390-linux64.c: Re-generated.
6738         * features/s390-linux64v1.c: Re-generated.
6739         * features/s390-linux64v2.c: Re-generated.
6740         * features/s390-te-linux64.c: Re-generated.
6741         * features/s390-tevx-linux64.c: Re-generated.
6742         * features/s390-vx-linux64.c: Re-generated.
6743         * features/s390x-linux64.c: Re-generated.
6744         * features/s390x-linux64v1.c: Re-generated.
6745         * features/s390x-linux64v2.c: Re-generated.
6746         * features/s390x-te-linux64.c: Re-generated.
6747         * features/s390x-tevx-linux64.c: Re-generated.
6748         * features/s390x-vx-linux64.c: Re-generated.
6749         * features/sparc/sparc32-solaris.c: Re-generated.
6750         * features/sparc/sparc64-solaris.c: Re-generated.
6751         * features/tic6x-c62x.c: Re-generated.
6752         * features/tic6x-c62x-linux.c: Re-generated.
6753         * features/tic6x-c64x.c: Re-generated.
6754         * features/tic6x-c64x-linux.c: Re-generated.
6755         * features/tic6x-c64xp.c: Re-generated.
6756         * features/tic6x-c64xp-linux.c: Re-generated.
6757
6758 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6759
6760         * i386-linux-tdep.c (i386_linux_read_description): New function.
6761         (i386_linux_core_read_description): Call
6762         i386_linux_read_description.
6763         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6764         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6765         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6766         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6767         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6768         * x86-linux-nat.c (x86_linux_read_description): Call
6769         i386_linux_read_description.
6770
6771 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6772
6773         * NEWS: Mention it.
6774         * features/Makefile (%.c: %.xml): Pass the xml file name to
6775         command "maint print c-tdesc".
6776         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6777         name from 'arg'.
6778
6779 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6780
6781         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6782         in-class initialization.
6783         (tdesc_create_feature): Call new instead of XCNEW.
6784         (free_target_description): Ue delete.
6785
6786 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6787
6788         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6789
6790 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6791
6792         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6793         constant.
6794         (amd64_x32_init_abi): Likewise.
6795         * amd64-tdep.h (amd64_init_abi): Update declaration.
6796         (amd64_x32_init_abi): Likewise.
6797
6798 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6799
6800         PR tdep/21717
6801         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6802         condition for FPSCR.
6803         (arm_linux_store_inferior_registers): Likewise.
6804
6805 2017-07-22  Tom Tromey  <tom@tromey.com>
6806
6807         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6808         <syscalls_counts>: Now a std::vector.
6809         (get_catch_syscall_inferior_data): Use "new".
6810         (catch_syscall_inferior_data_cleanup): Use "delete".
6811         (insert_catch_syscall, remove_catch_syscall)
6812         (clear_syscall_counts): Update.
6813
6814 2017-07-22  Tom Tromey  <tom@tromey.com>
6815
6816         * break-catch-syscall.c (syscall_catchpoint)
6817         <syscalls_to_be_caught>: Now a std::vector<int>
6818         (~syscall_catchpoint): Remove.
6819         (insert_catch_syscall, remove_catch_syscall)
6820         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6821         (print_mention_catch_syscall, print_recreate_catch_syscall):
6822         Update.
6823         (create_syscall_event_catchpoint): Change type of "filter"
6824         parameter.
6825         (catch_syscall_split_args): Return a std::vector.
6826         (catch_syscall_command_1, catching_syscall_number_1): Update.
6827
6828 2017-07-22  Tom Tromey  <tom@tromey.com>
6829
6830         * break-catch-throw.c (struct exception_catchpoint)
6831         <exception_rx>: Now a std::string.
6832         (~exception_catchpoint): Remove.
6833         (print_one_detail_exception_catchpoint): Update.
6834         (handle_gnu_v3_exceptions): Change type of except_rx.
6835         (extract_exception_regexp): Return a std::string.
6836         (catch_exception_command_1): Update.
6837
6838 2017-07-22  Tom Tromey  <tom@tromey.com>
6839
6840         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6841         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6842         std::vector.
6843         <catch_all>: Now a bool.
6844         (~signal_catchpoint): Remove.
6845         (signal_catchpoint_insert_location)
6846         (signal_catchpoint_remove_location)
6847         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6848         (signal_catchpoint_print_mention)
6849         (signal_catchpoint_print_recreate)
6850         (signal_catchpoint_explains_signal): Update.
6851         (create_signal_catchpoint): Change type of "filter" and
6852         "catch_all".
6853         (catch_signal_split_args): Return a std::vector.  Change type of
6854         "catch_all".
6855         (catch_signal_command): Update.
6856
6857 2017-07-20  Pedro Alves  <palves@redhat.com>
6858
6859         * ada-lang.c (ada_language_defn): Make extern.
6860         (_initialize_ada_language): Remove add_language call.
6861         * c-lang.c (c_language_defn, cplus_language_defn)
6862         (asm_language_defn, minimal_language_defn): Make extern.
6863         (_initialize_c_language): Delete.
6864         * completer.c (compare_cstrings): Delete, moved to utils.h.
6865         * d-lang.c (d_language_defn): Make extern.
6866         (_initialize_d_language): Remove add_language calls.
6867         * defs.h (enum language): Add comment.
6868         * f-lang.c (f_language_defn): Make extern.
6869         (_initialize_f_language): Remove add_language call.
6870         * go-lang.c (go_language_defn): Make extern.
6871         (_initialize_go_language): Remove add_language call.
6872         * language.c: Include <algorithm>.
6873         (languages): Redefine as const array.
6874         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6875         (set_language_command): Handle "local".  Use for-range loop.
6876         (set_language): Remove loop.
6877         (language_enum): Rewrite.
6878         (language_def, language_str): Remove loops.
6879         (add_language): Delete.
6880         (add_set_language_command): New, based on add_languages.
6881         (skip_language_trampoline): Adjust.
6882         (local_language_defn): Delete.
6883         (language_gdbarch_post_init): Adjust.
6884         (_initialize_language): Remove add_language calls.  Call
6885         add_set_language_command.
6886         * language.h (add_language): Delete.
6887         (auto_language_defn)
6888         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6889         (asm_language_defn, c_language_defn, cplus_language_defn)
6890         (d_language_defn, f_language_defn, go_language_defn)
6891         (m2_language_defn, objc_language_defn, opencl_language_defn)
6892         (pascal_language_defn, rust_language_defn): Declare.
6893         * m2-lang.c (m2_language_defn): Make extern.
6894         (_initialize_m2_language): Remove add_language call.
6895         * objc-lang.c (objc_language_defn): Make extern.
6896         (_initialize_objc_language): Remove add_language call.
6897         * opencl-lang.c (opencl_language_defn): Make extern.
6898         (_initialize_opencl_language): Remove add_language call.
6899         * p-lang.c (pascal_language_defn): Make extern.
6900         (_initialize_pascal_language): Delete.
6901         * rust-lang.c (rust_language_defn): Make extern.
6902         (_initialize_rust_language): Delete.
6903         * utils.h (compare_cstrings): New static inline function.
6904
6905 2017-07-20  Pedro Alves  <palves@redhat.com>
6906
6907         * ada-lang.c (ada_to_fixed_type_1): Adjust.
6908         (get_var_value): Constify parameters.
6909         (get_int_var_value): Change prototype.
6910         (to_fixed_range_type): Adjust.
6911         * ada-lang.h (get_int_var_value): Change prototype.
6912
6913 2017-07-20  Pedro Alves  <palves@redhat.com>
6914
6915         * dwarf2read.c (dw2_lookup_symbol): Use
6916         SYMBOL_MATCHES_SEARCH_NAME.
6917         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6918
6919 2017-07-20  Pedro Alves  <palves@redhat.com>
6920
6921         * block.c (block_iter_name_step, block_iter_name_first)
6922         (block_iter_name_next): Delete.
6923         (block_lookup_symbol_primary): Adjust to use
6924         dict_iter_match_first/dict_iter_match_next.
6925         * block.h (block_iter_name_first, block_iter_name_next): Delete
6926         declarations.
6927         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6928         dict_iter_match_first/dict_iter_match_next.
6929
6930 2017-07-20  Pedro Alves  <palves@redhat.com>
6931
6932         * cp-support.c (cp_find_first_component_aux): Add missing case for
6933         end of string.
6934
6935 2017-07-18  David Blaikie  <dblaikie@gmail.com>
6936
6937         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6938         of dwo_cu's dwo_file.
6939
6940 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6941
6942         * remote.c (store_registers_using_G): Remove one line comment.
6943
6944 2017-07-18  Yao Qi  <yao.qi@linaro.org>
6945
6946         * regcache.c (regcache_cpy): Simplify it.
6947         (regcache::cpy_no_passthrough): Remove it.
6948         * regcache.h (cpy_no_passthrough): Remove it.
6949         (regcache_dup, regcache_cpy): Update comments.
6950
6951 2017-07-18  Pedro Alves  <palves@redhat.com>
6952
6953         * remote-sim.c (sim_command_completer): Adjust to work with a
6954         completion_tracker instead of a VEC.
6955
6956 2017-07-17  Pedro Alves  <palves@redhat.com>
6957
6958         * completer.c (complete_source_filenames): New function.
6959         (complete_address_and_linespec_locations): New function.
6960         (location_completer): Use complete_address_and_linespec_locations.
6961         (completion_tracker::build_completion_result): Honor the tracker's
6962         request to suppress append.
6963         * completer.h (completion_tracker::suppress_append_ws)
6964         (completion_tracker::set_suppress_append_ws): New methods.
6965         (completion_tracker::m_suppress_append_ws): New field.
6966         (complete_source_filenames): New declaration.
6967         * linespec.c (linespec_complete_what): New.
6968         (struct ls_parser) <complete_what, completion_word,
6969         completion_quote_char, completion_quote_end, completion_tracker>:
6970         New fields.
6971         (string_find_incomplete_keyword_at_end): New.
6972         (linespec_lexer_lex_string): Record quote char.  If in completion
6973         mode, don't throw.
6974         (linespec_lexer_consume_token): Advance the completion word point.
6975         (linespec_lexer_peek_token): Save/restore completion info.
6976         (save_stream_and_consume_token): New.
6977         (set_completion_after_number): New.
6978         (linespec_parse_basic): Set what to complete next depending on
6979         token.  Handle function and label completions specially.
6980         (parse_linespec): Disable objc shortcut in completion mode.  Set
6981         what to complete next depending on token type.  Skip keyword if in
6982         completion mode.
6983         (complete_linespec_component, linespec_complete): New.
6984         * linespec.h (linespec_complete): Declare.
6985
6986 2017-07-17  Pedro Alves  <palves@redhat.com>
6987
6988         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6989         Handle 'operator<' / 'operator<<'.
6990
6991 2017-07-17  Pedro Alves  <palves@redhat.com>
6992
6993         * completer.c (collect_explicit_location_matches): Handle
6994         MATCH_LABEL.
6995         (convert_explicit_location_to_linespec): New, factored out from
6996         ...
6997         (convert_explicit_location_to_sals): ... this.
6998         (complete_label): New.
6999         (linespec_complete_label, find_label_symbols_in_block): New.
7000         (find_label_symbols): Add completion_mode parameter and adjust to
7001         call find_label_symbols_in_block.
7002         * linespec.h (linespec_complete_label): Declare.
7003
7004 2017-07-17  Pedro Alves  <palves@redhat.com>
7005
7006         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7007         complete_symbol_mode parameter.
7008         * cli/cli-cmds.c (complete_command): Get the completion result out
7009         of the handle_brkchars tracker if used a custom word point.
7010         * completer.c: Include "linespec.h".
7011         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7012         (advance_to_expression_complete_word_point): New.
7013         (completion_tracker::completes_to_completion_word): New.
7014         (complete_files_symbols): Pass down
7015         complete_symbol_mode::EXPRESSION.
7016         (explicit_options, probe_options): New.
7017         (collect_explicit_location_matches): Complete on the
7018         explictit_loc->foo instead of word.  Use
7019         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7020         keyword and options completions.
7021         (backup_text_ptr): Delete.
7022         (skip_keyword): New.
7023         (complete_explicit_location): Remove 'word' parameter.  Add
7024         language, quoted_arg_start and quoted_arg_end parameters.
7025         Rewrite, parsing left to right.
7026         (location_completer): Rewrite.
7027         (location_completer_handle_brkchars): New function.
7028         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7029         (enum complete_line_internal_reason): Adjust comments.
7030         (completion_tracker::discard_completions): New.
7031         (completer_handle_brkchars_func_for_completer): Handle
7032         location_completer.
7033         (gdb_custom_word_point_brkchars)
7034         (gdb_org_rl_basic_quote_characters): New.
7035         (gdb_completion_word_break_characters_throw)
7036         (completion_find_completion_word): Handle trackers that use a
7037         custom word point.
7038         (completion_tracker::advance_custom_word_point_by): New.
7039         (completion_tracker::build_completion_result): Don't rely on
7040         readline appending the quote char.
7041         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7042         use a custom word point.
7043         (gdb_rl_attempted_completion_function): Restore
7044         rl_basic_quote_characters.
7045         * completer.h (class completion_tracker): Extend intro comment.
7046         (completion_tracker::set_quote_char)
7047         (completion_tracker::quote_char)
7048         (completion_tracker::set_use_custom_word_point)
7049         (completion_tracker::use_custom_word_point)
7050         (completion_tracker::custom_word_point)
7051         (completion_tracker::set_custom_word_point)
7052         (completion_tracker::advance_custom_word_point_by)
7053         (completion_tracker::completes_to_completion_word)
7054         (completion_tracker::discard_completions): New methods.
7055         (completion_tracker::m_quote_char)
7056         (completion_tracker::m_use_custom_word_point)
7057         (completion_tracker::m_custom_word_point): New fields.
7058         (advance_to_expression_complete_word_point): Declare.
7059         * f-lang.c (f_collect_symbol_completion_matches): Add
7060         complete_symbol_mode parameter.
7061         * language.h (struct language_defn)
7062         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7063         parameter.
7064         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7065         (linespec_complete_function): New function.
7066         (linespec_lexer_lex_keyword): Adjust.
7067         * linespec.h (linespec_keywords, linespec_complete_function): New
7068         declarations.
7069         * location.c (find_end_quote): New function.
7070         (explicit_location_lex_one): Add explicit_completion_info
7071         parameter.  Save quoting info.  Don't throw if being called for
7072         completion.  Don't handle Ada operators here.
7073         (is_cp_operator, skip_op_false_positives, first_of)
7074         (explicit_location_lex_one_function): New function.
7075         (string_to_explicit_location): Replace 'dont_throw' parameter with
7076         an explicit_completion_info pointer parameter.  Handle it.  Don't
7077         use explicit_location_lex_one to lex function names.  Use
7078         explicit_location_lex_one_function instead.
7079         * location.h (struct explicit_completion_info): New.
7080         (string_to_explicit_location): Replace 'dont_throw' parameter with
7081         an explicit_completion_info pointer parameter.
7082         * symtab.c (default_collect_symbol_completion_matches_break_on):
7083         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7084         (default_collect_symbol_completion_matches)
7085         (collect_symbol_completion_matches): Add complete_symbol_mode
7086         parameter.
7087         (collect_symbol_completion_matches_type): Pass down
7088         complete_symbol_mode::EXPRESSION.
7089         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7090         parameter.  Handle LINESPEC mode.
7091         * symtab.h (complete_symbol_mode): New.
7092         (default_collect_symbol_completion_matches_break_on)
7093         (default_collect_symbol_completion_matches)
7094         (collect_symbol_completion_matches)
7095         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7096         parameter.
7097
7098 2017-07-17  Pedro Alves  <palves@redhat.com>
7099
7100         * utils.c (enum class strncmp_iw_mode): New.
7101         (strcmp_iw): Rename to ...
7102         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7103         parameters.  Handle them.
7104         (strncmp_iw): New.
7105         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7106         * utils.h (strncmp_iw): Declare.
7107         (strcmp_iw): Move describing comments here.
7108
7109 2017-07-17  Pedro Alves  <palves@redhat.com>
7110
7111         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7112         CP_OPERATOR_STR.
7113         * c-typeprint.c (is_type_conversion_operator): Use
7114         CP_OPERATOR_STR.
7115         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7116         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7117         CP_OPERATOR_LEN.
7118         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7119         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7120         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7121         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7122         CP_OPERATOR_STR.
7123         * location.c: Include "cp-support.h".
7124         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7125         CP_OPERATOR_STR.
7126         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7127         CP_OPERATOR_LEN.
7128
7129 2017-07-17  Pedro Alves  <palves@redhat.com>
7130
7131         * cli/cli-cmds.c (complete_command): Use a completion tracker
7132         along with completion_find_completion_word for handle_brkchars
7133         phase.
7134         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7135         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7136         (struct gdb_rl_completion_word_info): New.
7137         (gdb_rl_find_completion_word): New.
7138         (completion_find_completion_word): New.
7139         * completer.h (completion_find_completion_word): Declare.
7140
7141 2017-07-17  Pedro Alves  <palves@redhat.com>
7142
7143         * ada-lang.c (symbol_completion_match): Adjust comments.
7144         (symbol_completion_add): Replace vector parameter with
7145         completion_tracker parameter.  Use it.
7146         (ada_make_symbol_completion_list): Rename to...
7147         (ada_collect_symbol_completion_matches): ... this.  Add
7148         completion_tracker parameter and use it.
7149         (ada_language_defn): Adjust.
7150         * break-catch-syscall.c (catch_syscall_completer): Adjust
7151         prototype and work with completion_tracker instead of VEC.
7152         * breakpoint.c (condition_completer): Adjust prototype and work
7153         with completion_tracker instead of VEC.
7154         * c-lang.c (c_language_defn, cplus_language_defn)
7155         (asm_language_defn, minimal_language_defn): Adjust to renames.
7156         * cli/cli-cmds.c (complete_command): Rework using
7157         completion_tracker.  Catch exceptions when completing.
7158         * cli/cli-decode.c (integer_unlimited_completer)
7159         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7160         with completion_tracker instead of VEC.
7161         * command.h (struct completion_tracker): Forward declare.
7162         (completer_ftype, completer_handle_brkchars_ftype): Change
7163         types.
7164         (complete_on_cmdlist, complete_on_enum): Adjust.
7165         * completer.c: Include <algorithm>.
7166         (struct gdb_completer_state): New.
7167         (current_completion): New global.
7168         (readline_line_completion_function): Delete.
7169         (noop_completer, filename_completer)
7170         (filename_completer_handle_brkchars, complete_files_symbols)
7171         (linespec_location_completer): Adjust to work with a
7172         completion_tracker instead of a VEC.
7173         (string_or_empty): New.
7174         (collect_explicit_location_matches): Adjust to work with a
7175         completion_tracker instead of a VEC.
7176         (explicit_location_completer): Rename to ...
7177         (complete_explicit_location): ... this and adjust to work with a
7178         completion_tracker instead of a VEC.
7179         (location_completer): Adjust to work with a completion_tracker
7180         instead of a VEC.
7181         (add_struct_fields): Adjust to work with a completion_list instead
7182         of VEC.
7183         (expression_completer): Rename to ...
7184         (complete_expression): ... this and adjust to work with a
7185         completion_tracker instead of a VEC.  Use complete_files_symbols.
7186         (expression_completer): Reimplement on top of complete_expression.
7187         (symbol_completer): Adjust to work with a completion_tracker
7188         instead of a VEC.
7189         (enum complete_line_internal_reason): Add describing comments.
7190         (complete_line_internal_normal_command): Adjust to work with a
7191         completion_tracker instead of a VEC.
7192         (complete_line_internal): Rename to ...
7193         (complete_line_internal_1): ... this and adjust to work with a
7194         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7195         handle_brkchars phase.
7196         (new_completion_tracker): Delete.
7197         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7198         complete_line_internal_1.
7199         (free_completion_tracker): Delete.
7200         (INITIAL_COMPLETION_HTAB_SIZE): New.
7201         (completion_tracker::completion_tracker)
7202         (completion_tracker::~completion_tracker): New.
7203         (maybe_add_completion): Delete.
7204         (completion_tracker::maybe_add_completion)
7205         (completion_tracker::add_completion)
7206         (completion_tracker::add_completions): New.
7207         (throw_max_completions_reached_error): Delete.
7208         (complete_line): Adjust to work with a completion_tracker instead
7209         of a VEC.  Don't create a completion_tracker_t or check for max
7210         completions here.
7211         (command_completer, command_completer_handle_brkchars)
7212         (signal_completer, reg_or_group_completer_1)
7213         (reg_or_group_completer, default_completer_handle_brkchars):
7214         Adjust to work with a completion_tracker.
7215         (gdb_completion_word_break_characters_throw): New.
7216         (gdb_completion_word_break_characters): Reimplement.
7217         (line_completion_function): Delete.
7218         (completion_tracker::recompute_lowest_common_denominator)
7219         (expand_preserving_ws)
7220         (completion_tracker::build_completion_result)
7221         (completion_result::completion_result)
7222         (completion_result::completion_result)
7223         (completion_result::~completion_result)
7224         (completion_result::completion_result)
7225         (completion_result::release_match_list, compare_cstrings)
7226         (completion_result::sort_match_list)
7227         (completion_result::reset_match_list)
7228         (gdb_rl_attempted_completion_function_throw)
7229         (gdb_rl_attempted_completion_function): New.
7230         * completer.h (completion_list, struct completion_result)
7231         (class completion_tracker): New.
7232         (complete_line): Add completion_tracker parameter.
7233         (readline_line_completion_function): Delete.
7234         (gdb_rl_attempted_completion_function): New.
7235         (noop_completer, filename_completer, expression_completer)
7236         (location_completer, symbol_completer, command_completer)
7237         (signal_completer, reg_or_group_completer): Update prototypes.
7238         (completion_tracker_t, new_completion_tracker)
7239         (make_cleanup_free_completion_tracker): Delete.
7240         (enum maybe_add_completion_enum): Delete.
7241         (maybe_add_completion): Delete.
7242         (throw_max_completions_reached_error): Delete.
7243         * corefile.c (complete_set_gnutarget): Adjust to work with a
7244         completion_tracker instead of a VEC.
7245         * cp-abi.c (cp_abi_completer): Adjust to work with a
7246         completion_tracker instead of a VEC.
7247         * d-lang.c (d_language_defn): Adjust.
7248         * disasm.c (disassembler_options_completer): Adjust to work with a
7249         completion_tracker instead of a VEC.
7250         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7251         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7252         with a completion_tracker instead of a VEC.
7253         (f_language_defn): Adjust.
7254         * go-lang.c (go_language_defn): Adjust.
7255         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7256         Adjust to work with a completion_tracker instead of a VEC.
7257         * infrun.c (handle_completer): Likewise.
7258         * interps.c (interpreter_completer): Likewise.
7259         * interps.h (interpreter_completer): Likewise.
7260         * language.c (unknown_language_defn, auto_language_defn)
7261         (local_language_defn): Adjust.
7262         * language.h (language_defn::la_make_symbol_completion_list):
7263         Rename to ...
7264         (language_defn::la_collect_symbol_completion_matches): ... this
7265         and adjust to work with a completion_tracker instead of a VEC.
7266         * m2-lang.c (m2_language_defn): Adjust.
7267         * objc-lang.c (objc_language_defn): Adjust.
7268         * opencl-lang.c (opencl_language_defn): Adjust.
7269         * p-lang.c (pascal_language_defn): Adjust.
7270         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7271         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7272         with a completion_tracker.
7273         * rust-lang.c (rust_language_defn): Adjust.
7274         * symtab.c (free_completion_list, do_free_completion_list)
7275         (return_val, completion_tracker): Delete.
7276         (completion_list_add_name, completion_list_add_symbol)
7277         (completion_list_add_msymbol, completion_list_objc_symbol)
7278         (completion_list_add_fields, add_symtab_completions): Add
7279         completion_tracker parameter and use it.
7280         (default_make_symbol_completion_list_break_on_1): Rename to...
7281         (default_collect_symbol_completion_matches_break_on): ... this.
7282         Add completion_tracker parameter and use it instead of allocating
7283         a completion tracker here.
7284         (default_make_symbol_completion_list_break_on): Delete old
7285         implementation.
7286         (default_make_symbol_completion_list): Delete.
7287         (default_collect_symbol_completion_matches): New.
7288         (make_symbol_completion_list): Delete.
7289         (collect_symbol_completion_matches): New.
7290         (make_symbol_completion_type): Rename to ...
7291         (collect_symbol_completion_matches_type): ... this.  Add
7292         completion_tracker parameter and use it instead of VEC.
7293         (make_file_symbol_completion_list_1): Rename to...
7294         (collect_file_symbol_completion_matches): ... this.  Add
7295         completion_tracker parameter and use it instead of VEC.
7296         (make_file_symbol_completion_list): Delete.
7297         (add_filename_to_list): Use completion_list instead of a VEC.
7298         (add_partial_filename_data::list): Now a completion_list.
7299         (make_source_files_completion_list): Work with a completion_list
7300         instead of a VEC.
7301         * symtab.h: Include "completer.h".
7302         (default_make_symbol_completion_list_break_on)
7303         (default_make_symbol_completion_list, make_symbol_completion_list)
7304         (make_symbol_completion_type, make_file_symbol_completion_list)
7305         (make_source_files_completion_list): Delete.
7306         (default_collect_symbol_completion_matches_break_on)
7307         (default_collect_symbol_completion_matches)
7308         (collect_symbol_completion_matches)
7309         (collect_symbol_completion_matches_type)
7310         (collect_file_symbol_completion_matches)
7311         (make_source_files_completion_list): New.
7312         * top.c (init_main): Don't install a rl_completion_entry_function
7313         hook.  Install a rl_attempted_completion_function hook instead.
7314         * tui/tui-layout.c (layout_completer): Adjust to work with a
7315         completion_tracker.
7316         * tui/tui-regs.c (tui_reggroup_completer):
7317         * tui/tui-win.c (window_name_completer, focus_completer)
7318         (winheight_completer): Adjust to work with a completion_tracker.
7319         * value.c: Include "completer.h".
7320         (complete_internalvar): Adjust to work with a completion_tracker.
7321         * value.h (complete_internalvar): Likewise.
7322
7323 2017-07-17  Pedro Alves  <palves@redhat.com>
7324
7325         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7326         renames.
7327         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7328         comments to completer_ftype's declaration.
7329         <completer_handle_brkchars>: Change type to
7330         completer_handle_brkchars_ftype.
7331         * command.h (completer_ftype): Add describing comment and give
7332         names to parameters.
7333         (completer_ftype_void): Rename to ...
7334         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7335         (set_cmd_completer_handle_brkchars): Adjust.
7336         * completer.c (filename_completer_handle_brkchars): New function.
7337         (complete_line_internal_normal_command): New function, factored
7338         out from ...
7339         (complete_line_internal): ... here.
7340         (command_completer_handle_brkchars)
7341         (default_completer_handle_brkchars)
7342         (completer_handle_brkchars_func_for_completer): New functions.
7343         * completer.h (set_gdb_completion_word_break_characters): Delete
7344         declaration.
7345         (completer_handle_brkchars_func_for_completer): New declaration.
7346         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7347         completer_handle_brkchars_func_for_completer.
7348
7349 2017-07-17  Pedro Alves  <palves@redhat.com>
7350
7351         * completer.c (symbol_completer): New function, based on
7352         make_symbol_completion_list_fn.
7353         * completer.h (symbol_completer): New declaration.
7354         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7355         * python/py-cmd.c (completers): Adjust.
7356         * symtab.c (make_symbol_completion_list_fn): Delete.
7357         * symtab.h (make_symbol_completion_list_fn): Delete.
7358         * cli/cli-decode.c (add_cmd): Adjust.
7359
7360 2017-07-17  Pedro Alves  <palves@redhat.com>
7361
7362         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7363         * dwarf2read.c: Include "filename-seen-cache.h".
7364         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7365         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7366         * filename-seen-cache.c: New file.
7367         * filename-seen-cache.h: New file.
7368         * symtab.c: Include "filename-seen-cache.h".
7369         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7370         (create_filename_seen_cache, clear_filename_seen_cache)
7371         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7372         to filename-seen-cache.h/filename-seen-cache.c.
7373         (output_source_filename, sources_info)
7374         (maybe_add_partial_symtab_filename)
7375         (make_source_files_completion_list): Adjust to use
7376         filename_seen_cache.
7377
7378 2017-07-17  Pedro Alves  <palves@redhat.com>
7379
7380         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7381         fields.
7382         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7383         dwarf2_debug_sections*)): New.
7384         (dwarf2_per_objfile::dwarf2_per_objfile(const
7385         dwarf2_per_objfile&)): Declare as deleted.
7386         (dwarf2_per_objfile::operator=): Declare as deleted.
7387         (dwarf2_per_objfile::dwarf2_per_objfile)
7388         (dwarf2_per_objfile::~dwarf2_per_objfile)
7389         (dwarf2_per_objfile::free_cached_comp_units): New.
7390         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7391         ctor.  Call dwarf2_per_objfile's ctor manually.
7392         (dwarf2_locate_sections): Deleted/refactored as ...
7393         (dwarf2_per_objfile::locate_sections): ... this new method.
7394         (free_cached_comp_units): Defer to
7395         dwarf2_per_objfile::free_cached_comp_units.
7396         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7397
7398 2017-07-14  Tom Tromey  <tom@tromey.com>
7399
7400         PR rust/21764:
7401         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7402         parameter.
7403         <UNOP_SIZEOF>: Split into separate case.
7404         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7405
7406 2017-07-14  Tom Tromey  <tom@tromey.com>
7407
7408         PR rust/21763:
7409         * symtab.c (symbol_matches_domain): Add language_rust to special
7410         case.
7411         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7412         treat LOC_TYPEDEF symbols as variables.
7413
7414 2017-07-14  Pedro Alves  <palves@redhat.com>
7415
7416         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7417         symtabs matching all symtabs with SRCFILE as file name instead of
7418         only considering the first hit, with lookup_symtab.
7419
7420 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7421
7422         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7423         operator_name parameters.
7424         (gen_expr): Update function call.
7425
7426 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7427
7428         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7429         parameter.
7430         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7431         Likewise.
7432         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7433         parameter, use agent_expr::gdbarch instead, update function
7434         calls.
7435         (locexpr_tracepoint_var_ref): Likewise.
7436         (loclist_tracepoint_var_ref): Likewise.
7437         * ax-gdb.c (gen_trace_static_fields): Likewise.
7438         (gen_traced_pop): Likewise.
7439         (gen_frame_args_address): Likewise.
7440         (gen_frame_locals_address): Likewise.
7441         (gen_var_ref): Likewise.
7442         (gen_struct_ref_recursive): Likewise.
7443         (gen_static_field): Likewise.
7444         (gen_maybe_namespace_elt): Likewise.
7445         (gen_expr): Likewise.
7446         (gen_trace_for_var): Likewise.
7447         (gen_trace_for_expr): Likewise.
7448         (gen_trace_for_return_address): Likewise.
7449
7450 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7451
7452         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7453         parameter.
7454         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7455
7456 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7457
7458         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7459         from ax, update calls.
7460         (gen_usual_arithmetic): Likewise.
7461         (gen_integral_promotions): Likewise.
7462         (gen_bitfield_ref): Likewise.
7463         (gen_primitive_field): Likewise.
7464         (gen_struct_ref_recursive): Likewise.
7465         (gen_struct_ref): Likewise.
7466         (gen_maybe_namespace_elt): Likewise.
7467         (gen_struct_elt_for_reference): Likewise.
7468         (gen_namespace_elt): Likewise.
7469         (gen_aggregate_elt_ref): Likewise.
7470         (gen_expr): Get gdbarch from ax, update calls.
7471         (gen_expr_binop_rest): Likewise.
7472
7473 2017-07-13  Pedro Alves  <palves@redhat.com>
7474
7475         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7476         as default tdesc.
7477         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7478         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7479         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7480         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7481         tdep.
7482         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7483         Get final tdesc from the tdep.
7484         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7485         default tdesc.
7486         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7487         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7488         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7489         Use it as default tdesc.
7490         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7491         down to amd_init_abi.  No longer handle fallback tdesc here.
7492         * amd64-tdep.h (tdesc_x32): Declare.
7493         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7494         parameter.
7495         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7496         as default tdesc.
7497
7498 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7499
7500         * s390-linux-tdep.c (s390_process_record): Add support for
7501         instructions new in arch12.
7502
7503 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7504
7505         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7506         PT_GETFSBASE and PT_GETGSBASE.
7507         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7508         PT_SETGSBASE.
7509
7510 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7511
7512         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7513         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7514         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7515         those rules.
7516         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7517         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7518         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7519         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7520         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7521         * features/i386/amd64.xml: Add 64bit-segments.xml.
7522         * features/i386/amd64-avx-avx512.c: Regenerated.
7523         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7524         * features/i386/amd64-avx-mpx.c: Regenerated.
7525         * features/i386/amd64-avx.c: Regenerated.
7526         * features/i386/amd64-mpx.c: Regenerated.
7527         * features/i386/amd64.c: Regenerated.
7528         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7529         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7530         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7531         * regformats/i386/amd64-avx.dat: Regenerated.
7532         * regformats/i386/amd64-mpx.dat: Regenerated.
7533         * regformats/i386/amd64.dat: Regenerated.
7534
7535 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7536
7537         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7538         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7539
7540 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7541
7542         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7543         unsetenv.
7544         * gnulib/aclocal.m4: Regenerate.
7545         * gnulib/config.in: Regenerate.
7546         * gnulib/configure: Regenerate.
7547         * gnulib/import/Makefile.am: Regenerate.
7548         * gnulib/import/Makefile.in: Regenerate.
7549         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7550         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7551         * gnulib/import/m4/environ.m4: New file.
7552         * gnulib/import/m4/setenv.m4: New file.
7553         * gnulib/import/setenv.c: New file.
7554         * gnulib/import/unsetenv.c: New file.
7555
7556 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7557
7558         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7559         address when op is DW_OP_addr.
7560
7561 2017-07-09  Tom Tromey  <tom@tromey.com>
7562
7563         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7564         check and apply to outer type.
7565
7566 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7567
7568         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7569         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7570         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7571         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7572
7573 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7574
7575         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7576
7577 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7578
7579         * corelow.c (get_core_siginfo): Remove.
7580         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7581         instead of get_core_siginfo.
7582         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7583         * gdbarch.h: Re-generate.
7584         * gdbarch.c: Re-generate.
7585         * linux-tdep.c (linux_core_xfer_siginfo): New.
7586         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7587
7588 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7589
7590         * corelow.c (thread_section_name): Move to ...
7591         * gdbcore.h (thread_section_name): ... here.
7592
7593 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7594
7595         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7596         (struct siginfo32): New.
7597         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7598         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7599         via ptrace(PT_LWPINFO).
7600
7601 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7602
7603         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7604         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7605         (fbsd_get_siginfo_type): New.
7606         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7607         (_initialize_fbsd_tdep): New.
7608
7609 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7610
7611         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7612         a singular dwo_unit*) to support multiple CUs in the same way that
7613         multiple TUs are supported.
7614         (create_cus_hash_table): Replace create_dwo_cu with a function for
7615         parsing multiple CUs from a DWO file.
7616         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7617         create_dwo_cu.
7618         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7619         htab_find, rather than comparing the signature to a singleton CU in
7620         the dwo_file.
7621
7622 2017-07-06  Pedro Alves  <palves@redhat.com>
7623
7624         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7625
7626 2017-07-04  Pedro Alves  <palves@redhat.com>
7627
7628         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7629         * gdbtypes.h (TYPE_STATIC): Delete.
7630         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7631         is_synchronized, is_native>: Delete.
7632         <dummy>: Bump.
7633         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7634         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7635         (TYPE_FN_FIELD_ABSTRACT): Delete.
7636
7637 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7638
7639         * buffer.h (buffer_finish): Fix spelling mistakes.
7640
7641 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7642
7643         * .dir-locals.el: Automatically switch to C-style comments in
7644         versions of Emacs that support the feature.
7645
7646 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7647             Pedro Alves  <palves@redhat.com>
7648
7649         PR cli/21688
7650         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7651         (process_next_line): New variable 'inline_cmd'.
7652         Adjust 'if' clauses for "python", "compile" and "guile" to use
7653         'command_name_equals' and check for '!inline_cmd'.
7654
7655 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7656
7657         PR cli/21688
7658         * cli/cli-script.c (command_name_equals_not_inline): New function.
7659         (process_next_line): Adjust 'if' clauses for "python", "compile"
7660         and "guile" to use command_name_equals_not_inline.
7661
7662 2017-06-29  Pedro Alves  <palves@redhat.com>
7663
7664         * completer.c (expression_completer): Call
7665         linespec_location_completer instead of location_completer.
7666
7667 2017-06-29  Pedro Alves  <palves@redhat.com>
7668
7669         * completer.c (expression_completer): Remove code that recomputes
7670         'text' from 'word'.
7671
7672 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7673
7674         * regformats/regdat.sh: Generate code with
7675         "ifndef IN_PROCESS_AGENT".
7676
7677 2017-06-28  Pedro Alves  <palves@redhat.com>
7678
7679         * command.h: Include "common/scoped_restore.h".
7680
7681 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7682
7683         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7684         instead of obstack_grow.
7685
7686 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7687
7688         PR gdb/21337
7689         * symfile.c (reread_symbols): Call objfiles_changed just before
7690         read_symbols.
7691
7692 2017-06-27  Pedro Alves  <palves@redhat.com>
7693
7694         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7695         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7696         (completion_list_add_symbol, completion_list_add_msymbol):
7697         ... these new functions.
7698         (add_symtab_completions)
7699         (default_make_symbol_completion_list_break_on_1): Adjust.
7700
7701 2017-06-27  Pedro Alves  <palves@redhat.com>
7702
7703         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7704         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7705         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7706         dtor.
7707         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7708         'storage_obstack' field an auto_obstack.  In-class initialize all
7709         non-bitfield fields.  Make minsyms_read bool.
7710         * symfile.c (read_symbols): Adjust.
7711
7712 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7713
7714         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7715         (gdbsim_store_register): Likewise.
7716
7717 2017-06-27  Pedro Alves  <palves@redhat.com>
7718
7719         * c-exp.y (name_obstack): Now an auto_obstack.
7720         (yylex): Use auto_obstack::clear.
7721         (c_parse): Use auto_obstack::clear instead of reinitializing and
7722         freeing the obstack.
7723         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7724         * d-exp.y (name_obstack): Now an auto_obstack.
7725         (yylex): Use auto_obstack::clear.
7726         (d_parse): Use auto_obstack::clear instead of reinitializing and
7727         freeing the obstack.
7728         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7729         auto_obstack.
7730         * dwarf2read.c (create_addrmap_from_index)
7731         (dwarf2_build_psymtabs_hard)
7732         (update_enumeration_type_from_children): Likewise.
7733         * gdb_obstack.h (auto_obstack): New type.
7734         * go-exp.y (name_obstack): Now an auto_obstack.
7735         (build_packaged_name): Use auto_obstack::clear.
7736         (go_parse): Use auto_obstack::clear instead of reinitializing and
7737         freeing the obstack.
7738         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7739         auto_obstack.
7740         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7741         * rust-exp.y (work_obstack): Now an auto_obstack.
7742         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7743         reinitializing and freeing the obstack.
7744         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7745         (host_char_to_target): Use auto_obstack.
7746         * utils.h (make_cleanup_obstack_free): Delete declaration.
7747         * valprint.c (generic_emit_char, generic_printstr): Use
7748         auto_obstack.
7749
7750 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7751
7752         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7753         thread.
7754         (darwin_init_thread_list): Don't update dummy thread.
7755         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7756
7757 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7758
7759         * record-full.c (netorder16): Remove.
7760
7761 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7762
7763         * common/diagnostics.h: Define macros for GCC.
7764         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7765         * common/vec.h: Include diagnostics.h.
7766         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7767         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7768         warning.
7769
7770 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7771
7772         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7773         New macro.
7774         * ada-lex.l: Ignore deprecated register warnings.
7775
7776 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7777
7778         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7779         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7780
7781 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7782
7783         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7784         its own line.
7785
7786 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7787
7788         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7789
7790 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7791
7792         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7793         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7794         (xtensa_register_read_masked): Likewise.
7795
7796 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7797
7798         * common/environ.c (gdb_environ::unset): Update comment.
7799
7800 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7801
7802         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7803         registers.
7804
7805 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7806
7807         * record-full.c (record_full_exec_insn): Use byte_vector.
7808
7809 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7810
7811         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7812         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7813
7814 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7815
7816         * remote.c (cached_reg): Move from here...
7817         * regcache.h (cached_reg): ...to here.
7818         * python/py-unwind.c (struct reg_info): Remove.
7819         (cached_frame_info): Use cached_reg_t.
7820         (pyuw_prev_register): Likewise.
7821         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7822         (pyuw_dealloc_cache): Free all registers.
7823
7824 2017-06-22  Pedro Alves  <palves@redhat.com>
7825             Simon Marchi  <simon.marchi@ericsson.com>
7826
7827         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7828         warning.
7829         * common/diagnostics.h: New file.
7830
7831 2017-06-22  Pedro Alves  <palves@redhat.com>
7832
7833         * common/agent.h: Add include guards.
7834
7835 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7836
7837         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7838         talk about addressable units instead of bytes.
7839
7840 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7841
7842         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7843         of '::const_iterator'.
7844
7845 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7846
7847         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7848         'unittests/environ-selftests.c'.
7849         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7850         * charset.c (find_charset_names): Declare object 'iconv_env'.
7851         Update code to use 'iconv_env' object.  Remove call to
7852         'free_environ'.
7853         * common/environ.c: Include <utility>.
7854         (make_environ): Delete function.
7855         (free_environ): Delete function.
7856         (gdb_environ::clear): New function.
7857         (gdb_environ::operator=): New function.
7858         (gdb_environ::get): Likewise.
7859         (environ_vector): Delete function.
7860         (set_in_environ): Delete function.
7861         (gdb_environ::set): New function.
7862         (unset_in_environ): Delete function.
7863         (gdb_environ::unset): New function.
7864         (gdb_environ::envp): Likewise.
7865         * common/environ.h: Include <vector>.
7866         (struct gdb_environ): Delete; transform into...
7867         (class gdb_environ): ... this class.
7868         (free_environ): Delete prototype.
7869         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7870         environ_vector): Likewise.
7871         * infcmd.c (run_command_1): Update code to call
7872         'envp' from 'gdb_environ' class.
7873         (environment_info): Update code to call methods from 'gdb_environ'
7874         class.
7875         (unset_environment_command): Likewise.
7876         (path_info): Likewise.
7877         (path_command): Likewise.
7878         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7879         (inferior::inferior): Initialize 'environment' using the host's
7880         information.
7881         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7882         Include "environ.h".
7883         (class inferior) <environment>: Change type from 'struct
7884         gdb_environ' to 'gdb_environ'.
7885         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7886         methods from 'gdb_environ' class.
7887         * solib.c (solib_find_1): Likewise
7888         * unittests/environ-selftests.c: New file.
7889
7890 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7891
7892         * features/i386/i386-linux.xml: Exchange the order of including
7893         32bit-linux.xml and 32bit-sse.xml.
7894         * features/i386/i386-linux.c: Regenerated.
7895
7896 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7897
7898         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7899         Delete copy ctor and assignment operator.
7900         (tdesc_type): Likewise.
7901         (tdesc_feature): Likewise.
7902         (tdesc_free_reg): Remove.
7903         (tdesc_create_reg): Use new.
7904         (tdesc_free_type): Remove.
7905         (tdesc_create_vector): Use new.
7906         (tdesc_create_union): Likewise.
7907         (tdesc_create_flags): Likewise.
7908         (tdesc_create_enum): Likewise.
7909         (tdesc_free_feature): Delete.
7910         (free_target_description): Use delete.
7911
7912 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
7913
7914         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7915         registers.
7916
7917 2017-06-19  Pedro Alves  <palves@redhat.com>
7918
7919         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7920         after gdb::unlinker.
7921
7922 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
7923
7924         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7925         gdb_environ to access an environment variable.
7926
7927 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
7928
7929         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7930         gdb_byte*.
7931
7932 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7933
7934         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7935
7936 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7937
7938         * configure: Re-generate.
7939         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7940
7941 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7942
7943         * configure: Re-generate.
7944         * warning.m4: Pass -Werror to compiler when checking for
7945         supported warning flags.
7946
7947 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
7948
7949         * Makefile.in (COMPILE.pre): Add "-x c++".
7950
7951 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
7952             Pedro Alves  <palves@redhat.com>
7953             Yao Qi  <yao.qi@linaro.org>
7954
7955         * defs.h (RequireLongest): New.
7956         (extract_integer): Declare function template.
7957         (extract_signed_integer): Remove the declaration, but define it
7958         static inline.
7959         (extract_unsigned_integer): Likewise.
7960         (store_integer): Declare function template.
7961         (store_signed_integer): Remove the declaration, but define it
7962         static inline.
7963         (store_unsigned_integer): Likewise.
7964         * findvar.c (extract_integer): New function template.
7965         (extract_signed_integer): Remove.
7966         (extract_unsigned_integer): Remove.
7967         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7968         instantiations.
7969         (store_integer): New function template.
7970         (store_signed_integer): Remove.
7971         (store_unsigned_integer): Remove.
7972         (store_integer): Explicit instantiations.
7973         * regcache.c (regcache_raw_read_signed): Update.
7974         (regcache::raw_read): New function.
7975         (regcache::raw_read_signed): Remove.
7976         (regcache::raw_read_unsigned): Remove.
7977         (regcache_raw_read_unsigned): Update.
7978         (regcache_raw_write_unsigned): Update.
7979         (regcache::raw_write_signed): Remove.
7980         (regcache::raw_write): New function.
7981         (regcache_cooked_read_signed): Update.
7982         (regcache::raw_write_unsigned): Remove.
7983         (regcache::cooked_read_signed): Remove.
7984         (regcache_cooked_read_unsigned): Update.
7985         (regcache::cooked_read_unsigned): Remove.
7986         (regcache_cooked_write_signed): Update.
7987         (regcache_cooked_write_unsigned): Update.
7988         * regcache.h (regcache) <raw_read_signed>: Remove.
7989         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7990         <raw_read, raw_write>: New.
7991         <cooked_read_signed, cooked_write_signed>: Remove.
7992         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7993         <cooked_read, cooked_write>: New.
7994         * sh64-tdep.c (sh64_pseudo_register_read): Update.
7995         (sh64_pseudo_register_write): Update.
7996
7997 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
7998
7999         * arc-tdep.c (arc_disassembler_options): New variable.
8000         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8001         of default_print_insn.
8002         (arc_delayed_print_insn): Set info->section when needed,
8003         use default_print_insn to retrieve a disassembler.
8004
8005 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8006
8007         PR gdb/21574
8008         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8009         to mention $SHELL and startup-with-shell.
8010
8011 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8012
8013         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8014
8015 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8016
8017         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8018         default_print_insn instead of print_insn_aarch64.
8019         * arm-tdep.c (gdb_print_insn_arm): Call
8020         default_print_insn instead of print_insn_big_arm
8021         and print_insn_little_arm.
8022         * i386-tdep.c (i386_print_insn): Call default_print_insn
8023         instead of print_insn_i386.
8024         * ia64-tdep.c (ia64_print_insn): Call
8025         default_print_insn instead of print_insn_ia64.
8026         * mips-tdep.c (gdb_print_insn_mips): Call
8027         default_print_insn instead of print_insn_big_mips
8028         and print_insn_little_mips.
8029         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8030         instead of print_insn_spu.
8031
8032 2017-06-14  Pedro Alves  <palves@redhat.com>
8033
8034         * ada-lang.c: Include "common/byte-vector.h".
8035         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8036         * charset.c (wchar_iterator::iterate): Resize the vector instead
8037         of reserving it.
8038         * common/byte-vector.h: Include "common/def-vector.h".
8039         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8040         * cli/cli-dump.c: Include "common/byte-vector.h".
8041         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8042         * common/byte-vector.h: New file.
8043         * common/def-vector.h: New file.
8044         * common/default-init-alloc.h: New file.
8045         * dwarf2loc.c: Include "common/byte-vector.h".
8046         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8047         instead of reserving it.
8048         * dwarf2read.c: Include "common/byte-vector.h".
8049         (data_buf::m_vec): Now a gdb::byte_vector.
8050         * gdb_regex.c: Include "common/def-vector.h".
8051         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8052         * mi/mi-main.c: Include "common/byte-vector.h".
8053         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8054         * printcmd.c: Include "common/byte-vector.h".
8055         (print_scalar_formatted): Use gdb::byte_vector.
8056         * valprint.c: Include "common/byte-vector.h".
8057         (maybe_negate_by_bytes, print_decimal_chars): Use
8058         gdb::byte_vector.
8059
8060 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8061
8062         * darwin-nat.c: Include "nat/fork-inferior.h".
8063
8064 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8065
8066         * configure.nat: Factor out Darwin bits that are not
8067         architecture-specific.  Add fork-inferior.o.
8068
8069 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8070
8071         * configure.nat: Factor out AIX bits that are not
8072         architecture-specific.  Add fork-inferior.o.
8073
8074 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8075
8076         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8077         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8078         wrappers that just call rw_pieced_value.
8079
8080 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8081
8082         * dwarf2loc.c (write_pieced_value): When writing the data for a
8083         memory piece, use write_memory_with_notification instead of
8084         write_memory.
8085
8086 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8087
8088         * valops.c (read_value_memory): Change embedded_offset to
8089         represent a bit offset instead of a byte offset.
8090         * value.h (read_value_memory): Adjust comment.
8091
8092 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8093
8094         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8095         dest_offset_bits and source_offset_bits.
8096         (write_pieced_value): Likewise.
8097
8098 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8099
8100         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8101         given by DW_OP_bit_piece.
8102         (write_pieced_value): Likewise.
8103
8104 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8105
8106         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8107         some other preparations to the places where sufficient information
8108         is available.
8109         (write_pieced_value): Likewise.
8110
8111 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8112
8113         * dwarf2loc.c (bits_to_bytes): New function.
8114         (read_pieced_value): Fix offset calculations for register pieces
8115         on big-endian targets.
8116         (write_pieced_value): Likewise.
8117
8118 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8119
8120         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8121         (write_pieced_value): Likewise.
8122
8123 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8124
8125         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8126         transfer the source value's least significant bits, instead of its
8127         lowest-addressed ones.  Rename type_len to max_offset.
8128         (read_pieced_value): Mirror above changes to write_pieced_value as
8129         applicable.
8130
8131 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8132
8133         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8134         truncate full bytes from dest_offset_bits before using it as an
8135         offset into the buffer.
8136
8137 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8138
8139         * dwarf2loc.c (write_pieced_value): Include transfer size in
8140         byte-wise check.
8141
8142 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8143
8144         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8145         calculation of this_size.
8146
8147 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8148
8149         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8150         when targeting a bit-field.
8151         (write_pieced_value): Likewise.
8152
8153 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8154
8155         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8156         (allocate_piece_closure): Drop addr_size parameter.
8157         (dwarf2_evaluate_loc_desc_full): Adjust call to
8158         allocate_piece_closure.
8159
8160 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8161
8162         PR gdb/21226
8163         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8164         the LSB end, independent of endianness.
8165
8166 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8167
8168         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8169         size capping.
8170
8171 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8172
8173         * mips-linux-nat.c: Move include features/mips*-linux.c to
8174         mips-linux-tdep.c.
8175         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8176         to mips-linux-tdep.c.
8177         * mips-linux-tdep.c: Include features/mips*-linux.c
8178         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8179         functions.
8180         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8181         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8182         (tdesc_mips64_dsp_linux): Declare.
8183
8184 2017-06-12  Tom Tromey  <tom@tromey.com>
8185
8186         * valprint.h (val_print_type_code_int): Remove.
8187         * valprint.c (generic_val_print_int): Always call
8188         val_print_scalar_formatted.
8189         (val_print_type_code_int): Remove.
8190         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8191         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8192         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8193         * ada-valprint.c (ada_val_print_num): Use
8194         val_print_scalar_formatted.
8195
8196 2017-06-12  Tom Tromey  <tom@tromey.com>
8197
8198         * printcmd.c (print_scalar_formatted): Unify the two switches.
8199         Don't convert scalars to LONGEST.
8200
8201 2017-06-12  Tom Tromey  <tom@tromey.com>
8202
8203         PR exp/16225:
8204         * valprint.h (print_decimal_chars): Update.
8205         * valprint.c (maybe_negate_by_bytes): New function.
8206         (print_decimal_chars): Add "is_signed" argument.
8207         * printcmd.c (print_scalar_formatted): Update.
8208
8209 2017-06-12  Tom Tromey  <tom@tromey.com>
8210
8211         PR exp/16225:
8212         * valprint.h (print_binary_chars, print_hex_chars): Update.
8213         * valprint.c (val_print_type_code_int): Update.
8214         (print_binary_chars): Add "zero_pad" argument.
8215         (emit_octal_digit): New function.
8216         (print_octal_chars): Don't zero-pad.
8217         (print_decimal_chars): Likewise.
8218         (print_hex_chars): Add "zero_pad" argument.
8219         * sh64-tdep.c (sh64_do_fp_register): Update.
8220         * regcache.c (regcache::dump): Update.
8221         * printcmd.c (print_scalar_formatted): Update.
8222         * infcmd.c (default_print_one_register_info): Update.
8223
8224 2017-06-12  Pedro Alves  <palves@redhat.com>
8225             Alan Hayward  <alan.hayward@arm.com>
8226
8227         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8228         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8229         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8230         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8231         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8232
8233 2017-06-12  Pedro Alves  <palves@redhat.com>
8234
8235         * dwarf2read.c (mapped_symtab::data): Now a vector of
8236         symtab_index_entry instead of vector of
8237         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8238         whether an element's name is NULL instead of checking whether the
8239         element itself is NULL.
8240         (find_slot): Change return type.  Adjust.
8241         (hash_expand, , add_index_entry, uniquify_cu_indices)
8242         (write_hash_table): Adjust.
8243
8244 2017-06-12  Pedro Alves  <palves@redhat.com>
8245
8246         * dwarf2read.c (recursively_count_psymbols): New function.
8247         (write_psymtabs_to_index): Call it to compute number of psyms and
8248         pass estimate size of psyms_seen to unordered_set's ctor.
8249
8250 2017-06-12  Pedro Alves  <palves@redhat.com>
8251
8252         * dwarf2read.c (write_hash_table): Check if key already exists
8253         before emplacing.
8254
8255 2017-06-12  Pedro Alves  <palves@redhat.com>
8256
8257         * dwarf2read.c (data_buf::append_space): Rename to...
8258         (data_buf::grow): ... this, and make private.  Adjust all callers.
8259         (data_buf::append_uint): New method.
8260         (add_address_entry, write_one_signatured_type)
8261         (write_psymtabs_to_index): Use it.
8262
8263 2017-06-12  Pedro Alves  <palves@redhat.com>
8264
8265         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8266         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8267         (data_buf::file_write): Call ::fwrite directly.
8268
8269 2017-06-12  Pedro Alves  <palves@redhat.com>
8270
8271         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8272         std::vector::erase.
8273
8274 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8275
8276         Code cleanup: C++ify .gdb_index producer.
8277         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8278         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8279         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8280         (create_strtab, add_string): Remove.
8281         (file_write, data_buf): New.
8282         (struct symtab_index_entry): Use std::vector for cu_indices.
8283         (struct mapped_symtab): Use std::vector for data.
8284         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8285         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8286         Remove.
8287         (find_slot): Change return type.  Update it to the new data structures.
8288         (hash_expand, add_index_entry): Update it to the new data structures.
8289         (offset_type_compare): Remove.
8290         (uniquify_cu_indices): Update it to the new data structures.
8291         (c_str_view, c_str_view_hasher, vector_hasher): New.
8292         (add_indices_to_cpool): Remove.
8293         (write_hash_table): Update it to the new data structures.
8294         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8295         (eq_psymtab_cu_index): Remove.
8296         (psym_index_map): New typedef.
8297         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8298         reference and std::unordered_map for cu_index_htab.
8299         (add_address_entry, add_address_entry_worker, write_address_map)
8300         (write_psymbols): Update it to the new data structures.
8301         (write_obstack): Remove.
8302         (struct signatured_type_index_data): Change types_list to a data_buf
8303         reference and psyms_seen to a std::unordered_set reference.
8304         (write_one_signatured_type, recursively_write_psymbols)
8305         (write_psymtabs_to_index): Update it to the new data structures.
8306
8307 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8308
8309         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8310         separate-debug-file commands.
8311         * symfile.h (separate_debug_file_debug): New global.
8312         * symfile.c (separate_debug_file_debug): New global.
8313         (separate_debug_file_exists, find_separate_debug_file): Add
8314         debug output.
8315         (_initialize_symfile): Add "set debug separate-debug-file"
8316         command.
8317         * build-id.c (build_id_to_debug_bfd,
8318         find_separate_debug_file_by_buildid): Add debug output.
8319
8320 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8321
8322         * gdbarch.sh (displaced_step_free_closure): Remove.
8323         * gdbarch.h, gdbarch.c: Re-generate.
8324         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8325         displaced_step_free_closure.
8326         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8327         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8328         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8329         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8330         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8331         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8332         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8333         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8334         * infrun.c (displaced_step_clear): Call xfree instead of
8335         gdbarch_displaced_step_free_closure.
8336
8337 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8338
8339         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8340         NULL".
8341
8342 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8343
8344         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8345         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8346         (mn10300_push_dummy_call): Likewise.
8347
8348 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8349
8350         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8351
8352 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8353
8354         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8355
8356 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8357
8358         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8359         able to start inferiors using a shell.
8360         (New remote packets): Announce new packet "QStartupWithShell".
8361         * remote.c: Add PACKET_QStartupWithShell.
8362         (extended_remote_create_inferior): Handle new
8363         PACKET_QStartupWithShell.
8364         (remote_protocol_features) <QStartupWithShell>: New entry for
8365         PACKET_QStartupWithShell.
8366         (_initialize_remote): Call "add_packet_config_cmd" for
8367         QStartupShell.
8368
8369 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8370             Pedro Alves  <palves@redhat.com>
8371
8372         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8373         and "nat/fork-inferior.h".
8374         * common/common-inferior.h: New file, with contents from
8375         "gdb/inferior.h".
8376         * commom/common-utils.c: Include "common-utils.h".
8377         (stringify_argv): New function.
8378         * common/common-utils.h (stringify_argv): New prototype.
8379         * configure.nat: Add "fork-inferior.o" as a dependency for
8380         "*linux*", "fbsd*" and "nbsd*" hosts.
8381         * corefile.c (get_exec_file): Update comment.
8382         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8383         instead of "startup_inferior".
8384         (darwin_create_inferior): Call "add_thread_silent" after
8385         "fork_inferior".
8386         * fork-child.c: Cleanup unnecessary includes.
8387         (SHELL_FILE): Move to "common/common-fork-child.c".
8388         (environ): Likewise.
8389         (exec_wrapper): Initialize.
8390         (get_exec_wrapper): New function.
8391         (breakup_args): Move to "common/common-fork-child.c"; rename to
8392         "breakup_args_for_exec".
8393         (escape_bang_in_quoted_argument): Move to
8394         "common/common-fork-child.c".
8395         (saved_ui): New variable.
8396         (prefork_hook): New function.
8397         (postfork_hook): Likewise.
8398         (postfork_child_hook): Likewise.
8399         (gdb_startup_inferior): Likewise.
8400         (fork_inferior): Move to "common/common-fork-child.c".  Update
8401         function to support gdbserver.
8402         (startup_inferior): Likewise.
8403         * gdbcore.h (get_exec_file): Remove declaration.
8404         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8405         instead of "startup_inferior".  Call "add_thread_silent" after
8406         "fork_inferior".
8407         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8408         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8409         instead of "startup_inferior".  Call "add_thread_silent" after
8410         "fork_inferior".
8411         * inferior.h: Include "common-inferior.h".
8412         (trace_start_error): Move to "common/common-utils.h".
8413         (trace_start_error_with_name): Likewise.
8414         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8415         (startup_inferior): Likewise.
8416         (gdb_startup_inferior): New prototype.
8417         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8418         * nat/fork-inferior.h: New file.
8419         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8420         instead of "startup_inferior".  Call "add_thread_silent" after
8421         "fork_inferior".
8422         * target.h (target_terminal_init): Move prototype to
8423         "target/target.h".
8424         (target_terminal_inferior): Likewise.
8425         (target_terminal_ours): Likewise.
8426         * target/target.h (target_terminal_init): New prototype, moved
8427         from "target.h".
8428         (target_terminal_inferior): Likewise.
8429         (target_terminal_ours): Likewise.
8430         * utils.c (gdb_flush_out_err): New function.
8431
8432 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8433
8434         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8435         * common/common-gdbthread.h: New file, with parts from
8436         "gdb/gdbthread.h".
8437         * gdbthread.h: Include "common-gdbthread.h".
8438         (switch_to_thread): Moved to "common/common-gdbthread.h".
8439
8440 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8441
8442         * Makefile.in (SFILES): Add "common/job-control.c".
8443         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8444         (COMMON_OBS): Add "job-control.o".
8445         * common/job-control.c: New file, with contents from
8446         "gdb/inflow.c".
8447         * common/job-control.h: New file, with contents from "terminal.h".
8448         * fork-child.c: Include "job-control.h".
8449         * inflow.c: Include "job-control.h".
8450         (gdb_setpgid): Move to "common/common-inflow.c".
8451         (_initialize_inflow): Move setting of "job_control" to
8452         "handle_job_control".
8453         * terminal.h (job_control): Moved to "common/common-terminal.h".
8454         (gdb_setpgid): Likewise.
8455         * top.c: Include "job_control.h".
8456         * utils.c: Likewise.
8457         (job_control): Moved to "job-control.c".
8458
8459 2017-06-07  Pedro Alves  <palves@redhat.com>
8460
8461         * Makefile.in (SFILES): Add gdb_regex.c.
8462         (COMMON_OBS): Add gdb_regex.o.
8463         * ada-lang.c (ada_add_standard_exceptions)
8464         (ada_add_exceptions_from_frame, name_matches_regex)
8465         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8466         parameter type to compiled_regex.  Adjust.
8467         (ada_exceptions_list): Use compiled_regex.
8468         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8469         std::unique_ptr<compiled_regex>.
8470         (exception_catchpoint::~exception_catchpoint): Remove regfree
8471         call.
8472         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8473         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8474         * breakpoint.c (solib_catchpoint::compiled): Now a
8475         std::unique_ptr<compiled_regex>.
8476         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8477         (check_status_catch_solib): Adjust to use compiled_regex.
8478         (add_solib_catchpoint): Adjust to use compiled_regex.
8479         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8480         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8481         compiled_regex reference.  Adjust to use it.
8482         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8483         declaration.  Include "gdb_regex.h".
8484         (apropos_cmd): Change regex parameter to compiled_regex reference.
8485         * gdb_regex.c: New file.
8486         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8487         declarations.
8488         (class compiled_regex): New.
8489         * linux-tdep.c: Include "common/gdb_optional.h".
8490         (struct mapping_regexes): New, factored out from
8491         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8492         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8493         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8494         * probe.c: Include "common/gdb_optional.h".
8495         (collect_probes): Use compiled_regex and gdb::optional and remove
8496         cleanups.
8497         * skip.c: Include "common/gdb_optional.h".
8498         (skiplist_entry::compiled_function_regexp): Now a
8499         gdb::optional<compiled_regex>.
8500         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8501         (free_skiplist_entry): Remove regfree call.
8502         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8503         compiled_regex and gdb::optional.
8504         * symtab.c: Include "common/gdb_optional.h".
8505         (search_symbols): Use compiled_regex and gdb::optional.
8506         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8507         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8508         to gdb_regex.c.
8509
8510 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8511
8512         * regcache.c (regcache::save): Avoid buffer use.
8513         (regcache::dump): Likewise.
8514
8515 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8516
8517         * sh-tdep.c (sh_pseudo_register_read): Remove
8518         MAX_REGISTER_SIZE.
8519         (sh_pseudo_register_write): Likewise.
8520         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8521         (sh64_pseudo_register_write): Likewise
8522
8523 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8524
8525         * aarch64-tdep.c (aarch64_store_return_value): Use
8526         V_REGISTER_SIZE.
8527         (aarch64_pseudo_read_value): Likewise.
8528         (aarch64_pseudo_write): Likewise.
8529
8530 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8531
8532         * regformats/regdef.h (set_register_cache): Remove the
8533         declaration.
8534
8535 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8536
8537         * frame.c (frame_unwind_register_signed): Use
8538         frame_unwind_register_value.
8539
8540 2017-06-06  Pedro Alves  <palves@redhat.com>
8541
8542         PR breakpoints/21553
8543         * breakpoint.c (create_breakpoints_sal_default)
8544         (init_breakpoint_sal, create_breakpoint_sal): Use
8545         gdb::unique_xmalloc_ptr for string parameters.
8546         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8547         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8548         (base_breakpoint_create_breakpoints_sal)
8549         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8550         (strace_marker_create_breakpoints_sal)
8551         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8552         string parameters.
8553         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8554         gdb::unique_xmalloc_ptr for string parameters.
8555         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8556         parameters.
8557
8558 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8559
8560         * alpha-tdep.c (alpha_register_to_value): Use
8561         get_frame_register_value.
8562         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8563
8564 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8565
8566         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8567         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8568         (ia64_value_to_register): Likewise.
8569         (ia64_extract_return_value): Likewise.
8570         (ia64_store_return_value): Likewise.
8571         (ia64_push_dummy_call): Likewise.
8572
8573 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8574
8575         GDB 8.0 released.
8576
8577 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8578
8579         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8580
8581 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8582
8583         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8584         parameter.
8585         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8586
8587 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8588
8589         * event-loop.c (poll_timers): Unallocate timer using delete
8590         instead of xfree.
8591
8592 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8593
8594         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8595         (struct breakpoint) <~breakpoint>: New.
8596         (struct watchpoint): Inherit from breakpoint.
8597         <~watchpoint>: New.
8598         <base>: Remove.
8599         (struct tracepoint): Inherit from breakpoint.
8600         <base>: Remove.
8601         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8602         (struct longjmp_breakpoint): Inherit from breakpoint.
8603         <~longjmp_breakpoint>: New.
8604         <base>: Remove.
8605         (new_breakpoint_from_type): Remove casts.
8606         (watchpoint_in_thread_scope): Remove reference to base field.
8607         (watchpoint_del_at_next_stop): Likewise.
8608         (update_watchpoint): Likewise.
8609         (watchpoint_check): Likewise.
8610         (bpstat_check_watchpoint): Likewise.
8611         (set_longjmp_breakpoint): Likewise.
8612         (struct fork_catchpoint): Inherit from breakpoint.
8613         <base>: Remove.
8614         (struct solib_catchpoint): Inherit from breakpoint.
8615         <~solib_catchpoint>: New.
8616         <base>: Remove.
8617         (dtor_catch_solib): Change to ...
8618         (solib_catchpoint::~solib_catchpoint): ... this.
8619         (breakpoint_hit_catch_solib): Remove reference to base field.
8620         (add_solib_catchpoint): Likewise.
8621         (create_fork_vfork_event_catchpoint): Likewise.
8622         (struct exec_catchpoint): Inherit from breakpoint.
8623         <~exec_catchpoint>: New.
8624         <base>: Remove.
8625         (dtor_catch_exec): Change to ...
8626         (exec_catchpoint::~exec_catchpoint): ... this.
8627         (dtor_watchpoint): Change to ...
8628         (watchpoint::~watchpoint): ... this.
8629         (watch_command_1): Remove reference to base field.
8630         (catch_exec_command_1): Likewise.
8631         (base_breakpoint_dtor): Change to ...
8632         (breakpoint::~breakpoint): ... this.
8633         (base_breakpoint_ops): Remove dtor field value.
8634         (longjmp_bkpt_dtor): Change to ...
8635         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8636         (strace_marker_create_breakpoints_sal): Remove reference to base
8637         field.
8638         (delete_breakpoint): Don't manually call breakpoint destructor.
8639         (create_tracepoint_from_upload): Remove reference to base field.
8640         (trace_pass_set_count): Likewise.
8641         (initialize_breakpoint_ops): Don't initialize
8642         momentary_breakpoint_ops, don't set dtors.
8643         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8644         <~ada_catchpoint>: New.
8645         <base>: Remove.
8646         (create_excep_cond_exprs): Remove reference to base field.
8647         (dtor_exception): Change to ...
8648         (ada_catchpoint::~ada_catchpoint): ... this.
8649         (dtor_catch_exception): Remove.
8650         (dtor_catch_exception_unhandled): Remove.
8651         (dtor_catch_assert): Remove.
8652         (create_ada_exception_catchpoint): Remove reference to base
8653         field.
8654         (initialize_ada_catchpoint_ops): Don't set dtors.
8655         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8656         breakpoint.
8657         <~signal_catchpoint>: New.
8658         <base>: Remove.
8659         (signal_catchpoint_dtor): Change to ...
8660         (signal_catchpoint::~signal_catchpoint): ... this.
8661         (create_signal_catchpoint): Remove reference to base field.
8662         (initialize_signal_catchpoint_ops): Don't set dtor.
8663         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8664         from breakpoint.
8665         <~syscall_catchpoint>: New.
8666         <base>: Remove.
8667         (dtor_catch_syscall): Change to ...
8668         (syscall_catchpoint::~syscall_catchpoint): ... this.
8669         (create_syscall_event_catchpoint): Remove reference to base
8670         field.
8671         (initialize_syscall_catchpoint_ops): Don't set dtor.
8672         * break-catch-throw.c (struct exception_catchpoint): Inherit
8673         from breakpoint.
8674         <~exception_catchpoint>: New.
8675         <base>: Remove.
8676         (dtor_exception_catchpoint): Change to ...
8677         (exception_catchpoint::~exception_catchpoint): ... this.
8678         (handle_gnu_v3_exceptions): Remove reference to base field.
8679         (initialize_throw_catchpoint_ops): Don't set dtor.
8680         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8681         field.
8682         * remote.c (remote_get_tracepoint_status): Likewise.
8683         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8684         * tracefile.c (tracefile_fetch_registers): Likewise.
8685         * tracepoint.c (actions_command): Likewise.
8686         (validate_actionline): Likewise.
8687         (tfind_1): Likewise.
8688         (get_traceframe_location): Likewise.
8689         (find_matching_tracepoint_location): Likewise.
8690         (parse_tracepoint_status): Likewise.
8691         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8692
8693 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8694
8695         * breakpoint.c (struct longjmp_breakpoint): New struct.
8696         (is_tracepoint_type): Change return type to bool.
8697         (is_longjmp_type): New function.
8698         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8699         (set_raw_breakpoint_without_location): Use
8700         new_breakpoint_from_type.
8701         (set_raw_breakpoint): Likewise.
8702
8703 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8704
8705         * breakpoint.c (new_breakpoint_from_type): New function.
8706         (create_breakpoint_sal): Use new_breakpoint_from_type and
8707         unique_ptr.
8708         (create_breakpoint): Likewise.
8709
8710 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8711
8712         * memattr.c (mem_info_command): Rename to ...
8713         (info_mem_command): ... this.
8714         (mem_enable_command): Rename to ...
8715         (enable_mem_command): ... this.
8716         (mem_disable_command): Rename to ...
8717         (disable_mem_command): ... this.
8718         (mem_delete_command): Rename to ...
8719         (delete_mem_command): ... this.
8720         (_initialize_mem): Adjust function names.
8721
8722 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8723
8724         * btrace.c (handle_pt_insn_events): New.
8725         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8726         STATUS.  Split into this and ...
8727         (handle_pt_insn_event_flags): ... this.
8728
8729 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8730
8731         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8732         and struct pt_insn.resynced.
8733         * configure: Regenerated.
8734         * config.in: Regenerated.
8735
8736 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8737
8738         * btrace.c (ftrace_find_call_by_number): New function.
8739         (ftrace_new_function): Store objects, not pointers.
8740         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8741         ftrace_new_gap, ftrace_update_function,
8742         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8743         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8744         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8745         btrace_ends_with_single_insn, btrace_call_get): Account for
8746         btrace_thread_info::functions now storing objects.
8747         * btrace.h (struct btrace_thread_info): Add constructor.
8748         (struct btrace_thread_info) <functions>: Make std::vector.
8749         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8750         Initialize with default values.
8751         * record-btrace.c (record_btrace_frame_sniffer): Account for
8752         btrace_thread_info::functions now storing objects.
8753
8754 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8755
8756         * btrace.c: Remove typedef bfun_s.
8757         (ftrace_new_gap): Directly add gaps to the list of gaps.
8758         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8759         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8760         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8761         instead of gdb VEC.
8762
8763 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8764
8765         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8766         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8767         with btrace_thread_info::next_segment and
8768         btrace_thread_info::prev_segment.
8769         * btrace.h: Remove struct btrace_func_link.
8770         (struct btrace_function): Replace pair of function segment pointers
8771         with pair of indices.
8772         * python/py-record-btrace.c (btpy_call_prev_sibling,
8773         btpy_call_next_sibling): Replace references to
8774         btrace_thread_info::segment with btrace_thread_info::next_segment and
8775         btrace_thread_info::prev_segment.
8776         * record-btrace.c (record_btrace_frame_this_id): Use
8777         btrace_find_call_by_number.
8778
8779 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8780
8781         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8782         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8783         btrace_insn_next, btrace_insn_prev): Remove references to
8784         btrace_thread_info::flow.
8785         * btrace.h (struct btrace_function): Remove FLOW.
8786
8787 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8788
8789         * btrace.c (ftrace_find_call_by_number): New function.
8790         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8791         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8792         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8793         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8794         index.
8795         * btrace.h (struct btrace_function): Turn UP into an index.
8796         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8797         as an index.
8798         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8799         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8800         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8801
8802 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8803
8804         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8805         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8806         ftrace_update_function, ftrace_compute_global_level_offset,
8807         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8808         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8809         btrace_insn_end, btrace_is_empty): Remove references to
8810         btrace_thread_info::begin and btrace_thread_info::end.
8811         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8812         (struct btrace_thread_info) <functions>: Adjust comment.
8813         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8814         btrace_thread_info::begin.
8815
8816 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8817
8818         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8819         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8820         ftrace_update_function): Remove arguments that implicitly were always
8821         BTINFO->END.
8822         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8823         Don't pass BTINFO->END.
8824
8825 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8826
8827         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8828         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8829         btrace_find_insn_by_number): Replace function segment pointer with
8830         index.
8831         (btrace_insn_cmp): Simplify.
8832         * btrace.h: (struct btrace_insn_iterator) Rename index to
8833         insn_index.  Replace function segment pointer with index into function
8834         segment vector.
8835         * record-btrace.c (record_btrace_call_history): Replace function
8836         segment pointer use with index.
8837         (record_btrace_frame_sniffer): Retrieve function call segment through
8838         vector.
8839         (record_btrace_set_replay): Remove defunc't safety check.
8840
8841 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8842
8843         * btrace.c (btrace_ends_with_single_insn): New function.
8844         (btrace_call_get, btrace_call_number, btrace_call_begin,
8845         btrace_call_end, btrace_call_next, btrace_call_prev,
8846         btrace_find_call_by_number): Use index into call segment vector
8847         instead of pointer.
8848         (btrace_call_cmp): Simplify.
8849         * btrace.h (struct btrace_call_iterator): Replace function call segment
8850         pointer with index into vector.
8851         * record-btrace.c (record_btrace_call_history): Use index instead of
8852         pointer.
8853
8854 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8855
8856         * btrace.c (btrace_insn_begin, btrace_insn_end,
8857         btrace_find_insn_by_number): Add btinfo to iterator.
8858         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8859
8860 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8861
8862         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8863         and save pointers directly.
8864         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8865         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8866         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8867         changed signature of functions.
8868         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8869         (btrace_fetch): Remove code that adds btrace_function pointers to
8870         vector of btrace_functions.
8871         (btrace_clear): Simplify freeing vector of btrace_functions.
8872
8873 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8874
8875         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8876         Replace VEC_* with std::vector functions.
8877         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8878         (struct btrace_thread_info)<functions>: Change type to std::vector.
8879
8880 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8881
8882         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8883         "Removed targets and native configurations" up.  Merge duplicate
8884         "New commands" sub-sections.  Add "New options" sub-sections.
8885
8886 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8887
8888         * defs.h (copy_integer_to_size): New declaration.
8889         * findvar.c (copy_integer_to_size): New function.
8890         (do_cint_test): New selftest function.
8891         (copy_integer_to_size_test): Likewise.
8892         (_initialize_findvar): Likewise.
8893         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8894         (mips_fbsd_collect_reg): Use raw_collect_integer.
8895         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8896         (mips64_fill_gregset): Use raw_collect_integer
8897         (mips64_fill_fpregset): Use raw_supply_integer.
8898         * regcache.c (regcache::raw_supply_integer): New function.
8899         (regcache::raw_collect_integer): Likewise.
8900         * regcache.h: (regcache::raw_supply_integer): New declaration.
8901         (regcache::raw_collect_integer): Likewise.
8902
8903 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8904
8905         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8906         (COMMON_OBS): Add gdbarch-selftests.o.
8907         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8908         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8909         * gdbarch-selftests.c: New file.
8910         * regcache.h (regcache) <~regcache>: Mark it virtual if
8911         GDB_SELF_TEST.
8912         <raw_write>: Likewise.
8913
8914 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8915
8916         * regcache.c (current_regcache): Change it to
8917         regcache::current_regcache.
8918         (regcache_observer_target_changed): Update.
8919         (regcache_thread_ptid_changed): Make it a regcache static
8920         method.
8921         (regcache_thread_ptid_changed): Update.
8922         (class regcache_access): New.
8923         (current_regcache_test): Update.
8924         (_initialize_regcache): Update.
8925         * regcache.h: Include forward_list.
8926         (regcache): Declare regcache_thread_ptid_changed and declare
8927         registers_changed_ptid as friend.
8928
8929 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8930
8931         * i387-tdep.c (i387_register_to_value): Use register_size
8932         instead of TYPE_LENGTH.
8933         * m68k-tdep.c (m68k_register_to_value): Likewise.
8934
8935 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8936
8937         * i387-tdep.c (i387_convert_register_p): Return false if type
8938         code isn't TYPE_CODE_FLT.
8939
8940 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8941
8942         * alpha-tdep.c (alpha_convert_register_p): Return true if type
8943         length is 4.
8944         (alpha_register_to_value): Remove type length check.
8945         (alpha_value_to_register): Likewise.
8946
8947 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8948
8949         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8950         TYPE_CODE_FLT.
8951
8952 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8953
8954         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8955         TYPE_CODE_FLT or not.
8956
8957 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8958
8959         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8960         * avr-tdep.c (avr_gdbarch_init): Likewise.
8961         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8962         * cris-tdep.c (cris_gdbarch_init): Likewise.
8963         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8964         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8965         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8966         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8967         * mep-tdep.c (mep_gdbarch_init): Likewise.
8968         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8969         * mips-tdep.c (mips_gdbarch_init): Likewise.
8970         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8971         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8972         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8973         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8974         * v850-tdep.c (v850_gdbarch_init): Likewise.
8975
8976 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8977
8978         * selftest-arch.c (tests_with_arch): Call registers_changed
8979         and reinit_frame_cache.
8980         * selftest.c (run_self_tests): Likewise.
8981
8982 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8983
8984         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8985         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8986
8987 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8988
8989         * rl78-tdep.c (rl78_gdbarch_init): Don't call
8990         set_gdbarch_print_insn.
8991
8992 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8993
8994         * h8300-tdep.c (h8300_gdbarch_init): Don't call
8995         set_gdbarch_print_insn.
8996
8997 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8998
8999         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9000         set_gdbarch_print_insn.
9001         * arc-tdep.c (arc_gdbarch_init): Likewise.
9002         * arch-utils.c: include dis-asm.h.
9003         (default_print_insn): New function.
9004         * arch-utils.h (default_print_insn): Declare.
9005         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9006         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9007         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9008         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9009         * frv-tdep.c (frv_gdbarch_init): Likewise.
9010         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9011         * gdbarch.sh (print_insn): Use default_print_insn.
9012         * gdbarch.c: Regenerated.
9013         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9014         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9015         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9016         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9017         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9018         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9019         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9020         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9021         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9022         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9023         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9024         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9025         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9026         * mt-tdep.c (mt_gdbarch_init): Likewise.
9027         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9028         * nios2-tdep.c (nios2_print_insn): Remove.
9029         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9030         * rx-tdep.c (rx_gdbarch_init): Likewise.
9031         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9032         * score-tdep.c (score_print_insn): Remove.
9033         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9034         * sh-tdep.c (sh_gdbarch_init): Likewise.
9035         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9036         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9037         * tic6x-tdep.c (tic6x_print_insn): Remove.
9038         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9039         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9040         * v850-tdep.c (v850_gdbarch_init): Likewise.
9041         * vax-tdep.c (vax_gdbarch_init): Likewise.
9042         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9043         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9044
9045 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9046
9047         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9048         (MIPS_FP0_REGNUM): Remove.
9049         (MIPS_FSR_REGNUM): Remove.
9050         (mips_fbsd_supply_fpregs): Use mips_regnum.
9051         (mips_fbsd_supply_gregs): Likewise.
9052         (mips_fbsd_collect_fpregs): Likewise.
9053         (mips_fbsd_collect_gregs): Likewise.
9054
9055 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9056
9057         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9058         (getpfpregs_supplies): New function.
9059         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9060         getfpregs_supplies.
9061         (mips_fbsd_store_inferior_registers): Likewise.
9062
9063 2017-05-22  Pedro Alves <palves@redhat.com>
9064
9065         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9066         maintainer.
9067
9068 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9069
9070         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9071         (store_register): Likewise.
9072         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9073         (get_decimal_float_return_value): Likewise.
9074         (do_ppc_sysv_return_value): Likewise.
9075         (ppc64_sysv_abi_push_integer): Likewise.
9076         (ppc64_sysv_abi_push_freg): Likewise.
9077         (ppc64_sysv_abi_return_value_base): Likewise.
9078         (ppc64_sysv_abi_return_value): Likewise.
9079         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9080         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9081         * rs6000-nat.c: Likewise.
9082         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9083         (rs6000_value_to_register): Likewise.
9084         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9085
9086 2017-05-21  Tom Tromey  <tom@tromey.com>
9087
9088         PR rust/21466:
9089         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9090         arrays as "[T]", not "[T; ]".
9091
9092 2017-05-19  Tom Tromey  <tom@tromey.com>
9093
9094         PR rust/21484:
9095         * rust-lang.c (exp_descriptor_rust): New function.
9096         (rust_language_defn): Use it.
9097         * p-lang.c (pascal_language_defn): Update.
9098         * opencl-lang.c (opencl_language_defn): Update.
9099         * objc-lang.c (objc_language_defn): Update.
9100         * m2-lang.c (m2_language_defn): Update.
9101         * language.h (struct language_defn)
9102         <la_watch_location_expression>: New member.
9103         * language.c (unknown_language_defn, auto_language_defn)
9104         (local_language_defn): Update.
9105         * go-lang.c (go_language_defn): Update.
9106         * f-lang.c (f_language_defn): Update.
9107         * d-lang.c (d_language_defn): Update.
9108         * c-lang.h (c_watch_location_expression): Declare.
9109         * c-lang.c (c_watch_location_expression): New function.
9110         (c_language_defn, cplus_language_defn, asm_language_defn)
9111         (minimal_language_defn): Use it.
9112         * breakpoint.c (watch_command_1): Call
9113         la_watch_location_expression.
9114         * ada-lang.c (ada_language_defn): Update.
9115
9116 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9117
9118         PR tui/21482
9119         * gdb_curses.h (NOMACROS): Define.
9120         (NCURSES_NOMACROS): Define.
9121
9122 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9123
9124         PR tui/21482
9125         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9126         arg to char *.
9127         * tui/tui-wingeneral.c (box_win): Likewise.
9128         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9129         (tui_show_source_line): Likewise.
9130         (tui_show_exec_info_content): Likewise.
9131
9132 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9133
9134         * sparc-tdep.c (sparc_structure_return_p)
9135         (sparc_arg_on_registers_p): New functions.
9136         (sparc32_store_arguments): Use them.
9137         * sparc64-tdep.c (sparc64_16_byte_align_p)
9138         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9139         Handle TYPE_CODE_ARRAY.
9140
9141 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9142
9143         * cli/cli-decode.c (add_alias_cmd): New function.
9144         * command.h (add_alias_cmd): Declare.
9145         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9146         instead call add_alias_cmd.
9147
9148 2017-05-17  Pedro Alves  <palves@redhat.com>
9149
9150         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9151         (nat_makefile_frag): ... this.  All references updated.
9152         * configure.ac: Likewise.
9153         * configure.nat: Likewise.  Enhance comments.
9154         * configure: Regenerate.
9155
9156 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9157
9158         * procfs.c (procfs_create_inferior): Change prototype to match
9159         definition.
9160
9161 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9162
9163         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9164         C++ compiler warning.
9165
9166 2017-05-12  Tom Tromey  <tom@tromey.com>
9167
9168         PR rust/21483:
9169         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9170         recurse, just call value_struct_elt directly.
9171
9172 2017-05-12  Tom Tromey  <tom@tromey.com>
9173
9174         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9175         OP_RUST_ARRAY>: Fix.
9176
9177 2017-05-12  Tom Tromey  <tom@tromey.com>
9178
9179         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9180
9181 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9182
9183         * regcache.c: Include <forward_list>.
9184         (struct regcache_list): Remove.
9185         (current_regcache): Update.
9186         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9187         (regcache_thread_ptid_changed): Likewise.
9188         (registers_changed_ptid): Likewise.
9189         (current_regcache_size): Likewise.
9190
9191 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9192
9193         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9194         (current_regcache_size): New function.
9195         (current_regcache_test): New function.
9196         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9197
9198 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9199
9200         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9201         (print_gp_register_row): Use get_frame_register_value.
9202
9203 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9204
9205         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9206         (mips_supply_fpregset): Likewise.
9207         (mips64_supply_gregset): Likewise.
9208
9209 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9210
9211         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9212         regcache->raw_supply_zeroed.
9213
9214 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9215
9216         * configure.nat: Rearrange 'case' statements to match
9217         host before cpu.
9218
9219 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9220
9221         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9222         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9223         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9224         "@nat_extra_makefile_frag@".
9225         (Makefile): Remove dependency on "@frags@".
9226         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9227         (data-directory/Makefile): Likewise.
9228         * config/aarch64/linux.mh: Deleted; moved contents to
9229         "gdb/configure.nat".
9230         * config/alpha/alpha-linux.mh: Likewise.
9231         * config/alpha/nbsd.mh: Likewise.
9232         * config/arm/linux.mh: Likewise.
9233         * config/arm/nbsdelf.mh: Likewise.
9234         * config/i386/cygwin.mh: Likewise.
9235         * config/i386/cygwin64.mh: Likewise.
9236         * config/i386/darwin.mh: Likewise.
9237         * config/i386/fbsd.mh: Likewise.
9238         * config/i386/fbsd64.mh: Likewise.
9239         * config/i386/go32.mh: Likewise.
9240         * config/i386/i386gnu.mh: Likewise.
9241         * config/i386/i386sol2.mh: Likewise.
9242         * config/i386/linux.mh: Likewise.
9243         * config/i386/linux64.mh: Likewise.
9244         * config/i386/mingw.mh: Likewise.
9245         * config/i386/mingw64.mh: Likewise.
9246         * config/i386/nbsd64.mh: Likewise.
9247         * config/i386/nbsdelf.mh: Likewise.
9248         * config/i386/nto.mh: Likewise.
9249         * config/i386/obsd.mh: Likewise.
9250         * config/i386/obsd64.mh: Likewise.
9251         * config/i386/sol2-64.mh: Likewise.
9252         * config/ia64/linux.mh: Likewise.
9253         * config/m32r/linux.mh: Likewise.
9254         * config/m68k/linux.mh: Likewise.
9255         * config/m68k/nbsdelf.mh: Likewise.
9256         * config/m68k/obsd.mh: Likewise.
9257         * config/m88k/obsd.mh: Likewise.
9258         * config/mips/fbsd.mh: Likewise.
9259         * config/mips/linux.mh: Likewise.
9260         * config/mips/nbsd.mh: Likewise.
9261         * config/mips/obsd64.mh: Likewise.
9262         * config/pa/linux.mh: Likewise.
9263         * config/pa/nbsd.mh: Likewise.
9264         * config/pa/obsd.mh: Likewise.
9265         * config/powerpc/aix.mh: Likewise.
9266         * config/powerpc/fbsd.mh: Likewise.
9267         * config/powerpc/linux.mh: Likewise.
9268         * config/powerpc/nbsd.mh: Likewise.
9269         * config/powerpc/obsd.mh: Likewise.
9270         * config/powerpc/ppc64-linux.mh: Likewise.
9271         * config/powerpc/spu-linux.mh: Likewise.
9272         * config/s390/linux.mh: Likewise.
9273         * config/sh/nbsd.mh: Likewise.
9274         * config/sparc/fbsd.mh: Likewise.
9275         * config/sparc/linux.mh: Likewise.
9276         * config/sparc/linux64.mh: Likewise.
9277         * config/sparc/nbsd64.mh: Likewise.
9278         * config/sparc/nbsdelf.mh: Likewise.
9279         * config/sparc/obsd64.mh: Likewise.
9280         * config/sparc/sol2.mh: Likewise.
9281         * config/tilegx/linux.mh: Likewise.
9282         * config/vax/nbsdelf.mh: Likewise.
9283         * config/vax/obsd.mh: Likewise.
9284         * config/xtensa/linux.mh: Likewise.
9285         * config/i386/i386gnu.mn: New file, with excerpts from
9286         "config/i386/i386gnu.mh".
9287         * configure: Regenerate.
9288         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9289         *.mh files under "gdb/config".
9290         * configure.nat: New file, with contents from the
9291         "gdb/config/*/*.mh" files.
9292
9293 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9294
9295         * btrace.c (btrace_clear): Free insn vector.
9296
9297 2017-05-05  Pedro Alves  <palves@redhat.com>
9298
9299         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9300         * configure: Regenerate.
9301
9302 2017-05-04  Pedro Alves  <palves@redhat.com>
9303
9304         * Makefile.in (SFILES): Add progspace-and-thread.c.
9305         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9306         (COMMON_OBS): Add progspace-and-thread.o.
9307         * breakpoint.c: Include "progspace-and-thread.h".
9308         (update_inserted_breakpoint_locations)
9309         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9310         Use scoped_restore_current_pspace_and_thread.
9311         (create_std_terminate_master_breakpoint): Use
9312         scoped_restore_current_program_space.
9313         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9314         (print_breakpoint_location): Use
9315         scoped_restore_current_program_space.
9316         (bp_loc_is_permanent): Use
9317         scoped_restore_current_pspace_and_thread.
9318         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9319         (download_tracepoint_locations): Use
9320         scoped_restore_current_pspace_and_thread.
9321         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9322         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9323         (enum step_over_calls_kind): Moved from inferior.h.
9324         (class scoped_restore_current_thread): New class.
9325         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9326         declaration.
9327         (scoped_restore_current_thread): New class.
9328         * infcmd.c: Include "common/gdb_optional.h".
9329         (continue_1, proceed_after_attach): Use
9330         scoped_restore_current_thread.
9331         (notice_new_inferior): Use scoped_restore_current_thread.
9332         * inferior.c: Include "progspace-and-thread.h".
9333         (restore_inferior, save_current_inferior): Delete.
9334         (add_inferior_command, clone_inferior_command): Use
9335         scoped_restore_current_pspace_and_thread.
9336         * inferior.h (scoped_restore_current_inferior): New class.
9337         * infrun.c: Include "progspace-and-thread.h" and
9338         "common/gdb_optional.h".
9339         (follow_fork_inferior): Use
9340         scoped_restore_current_pspace_and_thread.
9341         (scoped_restore_exited_inferior): New class.
9342         (handle_vfork_child_exec_or_exit): Use
9343         scoped_restore_exited_inferior,
9344         scoped_restore_current_pspace_and_thread,
9345         scoped_restore_current_thread and scoped_restore.
9346         (fetch_inferior_event): Use scoped_restore_current_thread.
9347         * linespec.c (decode_line_full, decode_line_1): Use
9348         scoped_restore_current_program_space.
9349         * mi/mi-main.c: Include "progspace-and-thread.h".
9350         (exec_continue): Use scoped_restore_current_thread.
9351         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9352         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9353         * proc-service.c (ps_pglobal_lookup): Use
9354         scoped_restore_current_program_space.
9355         * progspace-and-thread.c: New file.
9356         * progspace-and-thread.h: New file.
9357         * progspace.c (release_program_space, clone_program_space): Use
9358         scoped_restore_current_program_space.
9359         (restore_program_space, save_current_program_space)
9360         (save_current_space_and_thread): Delete.
9361         (switch_to_program_space_and_thread): Moved to
9362         progspace-and-thread.c.
9363         * progspace.h (save_current_program_space)
9364         (save_current_space_and_thread): Delete declarations.
9365         (scoped_restore_current_program_space): New class.
9366         * remote.c (remote_btrace_maybe_reopen): Use
9367         scoped_restore_current_thread.
9368         * symtab.c: Include "progspace-and-thread.h".
9369         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9370         * thread.c (print_thread_info_1): Use
9371         scoped_restore_current_thread.
9372         (struct current_thread_cleanup): Delete.
9373         (do_restore_current_thread_cleanup)
9374         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9375         (scoped_restore_current_thread::~scoped_restore_current_thread):
9376         ... this new dtor.
9377         (make_cleanup_restore_current_thread): Rename/convert to ...
9378         (scoped_restore_current_thread::scoped_restore_current_thread):
9379         ... this new ctor.
9380         (thread_apply_all_command): Use scoped_restore_current_thread.
9381         (thread_apply_command): Use scoped_restore_current_thread.
9382         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9383         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9384
9385 2017-05-04  Pedro Alves  <palves@redhat.com>
9386
9387         * thread.c (make_cleanup_restore_current_thread): Move
9388         find_thread_ptid call before the is_stopped call.  Assert that the
9389         thread is found.  Replace is_stopped call by checking the thread's
9390         state directly.  Remove unnecessary NULL-thread check.
9391
9392 2017-05-04  Pedro Alves  <palves@redhat.com>
9393
9394         * corelow.c (thread_section_name): New class.
9395         (get_core_register_section, get_core_siginfo): Use it.
9396
9397 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9398
9399         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9400         (get_core_register_section): Remove xfree of NULL pointer.
9401
9402 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9403
9404         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9405         * regcache.c (regcache::raw_supply_zeroed): New function.
9406         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9407
9408 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9409
9410         * gdbarch.sh: Remove commented out definition of
9411         TARGET_CHAR_BIT.
9412         * gdbarch.h: Re-generate.
9413
9414 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9415
9416         * configure: Regenerate.
9417
9418 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9419
9420         * solib-target.c (solib_target_relocate_section_addresses):
9421         Remove num_section_bases, num_bases, segment_bases variables.
9422
9423 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9424
9425         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9426
9427 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9428
9429         * solib-target.c: Include <vector>
9430         (struct lm_info_target) <~lm_info_target>: Remove.
9431         <segment_bases, section_bases>: Change type to
9432         std::vector<CORE_ADDR>.
9433         (library_list_start_segment, library_list_start_section,
9434         library_list_end_library,
9435         solib_target_relocate_section_addresses): Adjust.
9436
9437 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9438
9439         * gdbarch.sh (software_single_step): Change return type to
9440         std::vector<CORE_ADDR>.
9441         * gdbarch.c, gdbarch.h: Re-generate.
9442         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9443         Adjust.
9444         (arm_deal_with_atomic_sequence_raw): Adjust.
9445         (thumb_get_next_pcs_raw): Adjust.
9446         (arm_get_next_pcs_raw): Adjust.
9447         (arm_get_next_pcs): Adjust.
9448         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9449         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9450         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9451         (alpha_software_single_step): Adjust.
9452         * alpha-tdep.h (alpha_software_single_step): Adjust.
9453         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9454         * arm-tdep.c (arm_software_single_step): Adjust.
9455         (arm_breakpoint_kind_from_current_state): Adjust.
9456         * arm-tdep.h (arm_software_single_step): Adjust.
9457         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9458         * cris-tdep.c (cris_software_single_step): Adjust.
9459         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9460         (micromips_deal_with_atomic_sequence): Adjust.
9461         (deal_with_atomic_sequence): Adjust.
9462         (mips_software_single_step): Adjust.
9463         * mips-tdep.h (mips_software_single_step): Adjust.
9464         * moxie-tdep.c (moxie_software_single_step): Adjust.
9465         * nios2-tdep.c (nios2_software_single_step): Adjust.
9466         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9467         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9468         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9469         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9470         * sparc-tdep.c (sparc_software_single_step): Adjust.
9471         * spu-tdep.c (spu_software_single_step): Adjust.
9472         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9473
9474 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9475
9476         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9477         * gdbarch.h: Re-generate.
9478
9479 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9480
9481         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9482         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9483         * python/py-instruction.c, python/py-instruction.h: New file.
9484         * python/py-record.c: Add py-instruction.h include.
9485         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9486         gdb.RecordInstruction.
9487         * python/python-internal.h: Add gdbpy_initialize_instruction
9488         declaration.
9489         * python/python.c (do_start_initialization): Add
9490         gdbpy_initialize_instruction.
9491
9492 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9493
9494         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9495         Remove.
9496         (btrace_func_from_recpy_func): New function.
9497         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9498         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9499         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9500         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9501         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9502         Also, use new helper functions.
9503         (btpy_list_item): Use new helper functions.
9504         (recpy_bt_function_call_history): Use new type name.
9505         (btpy_call_getset): Remove.
9506         (gdbpy_initialize_btrace): Remove code to initialize
9507         gdb.BtraceFunctionCall.
9508         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9509         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9510         recpy_bt_func_prev, recpy_bt_func_next): New export.
9511         * python/py-record.c (recpy_func_type): New static object.
9512         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9513         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9514         recpy_func_next): New function.
9515         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9516         (recpy_func_getset): New static object.
9517         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9518         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9519
9520 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9521
9522         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9523         (btpy_object, btpy_insn_type, btpy_new): Remove.
9524         (btpy_list_object): Use gdb.RecordInstruction type instead of
9525         gdb.BtraceInstruction type.
9526         (btrace_insn_from_recpy_insn): New function.
9527         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9528         btpy_new.
9529         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9530         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9531         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9532         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9533         instead of btpy_object.
9534         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9535         btpy_insn_data, btpy_insn_decode): Rename to ...
9536         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9537         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9538         recpy_bt_insn_decode): This.  Also, use new helper functions.
9539         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9540         recpy_insn_type.
9541         (btpy_insn_getset): Remove.
9542         (gdbpy_initialize_btrace): Remove code to initialize
9543         gdb.BtraceInstruction.  Use recpy_element_object.
9544         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9545         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9546         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9547         * python/py-record.c (recpy_insn_type): New static object.
9548         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9549         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9550         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9551         New function.
9552         (recpy_insn_getset): New static object.
9553         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9554         * python/py-record.h (recpy_element_object): New typedef.
9555         (recpy_insn_type, recpy_insn_new): New export.
9556
9557 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9558
9559         * py-record-btrace.c (btpy_insn_new): Removed.
9560         (btpy_insn_or_gap_new): New function.
9561         (btpy_insn_error): Removed.
9562         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9563         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9564         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9565         btpy_insn_or_gap_new instead of btpy_insn_new.
9566         (btpy_insn_getset): Remove btpy_insn_error.
9567         * py-record.c (recpy_gap_type): New static object.
9568         (recpy_gap_object): New typedef.
9569         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9570         recpy_gap_reason_string): New function.
9571         (recpy_gap_getset): New static object.
9572         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9573         * py-record.h (recpy_gap_new): New export.
9574
9575 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9576
9577         * python/py-record.c (recpy_ptid): Remove.
9578         (recpy_record_getset): Remove recpy_ptid.
9579
9580 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9581
9582         * btrace.c (btrace_fetch): Set inferior_ptid.
9583         * python/py-record-btrace.c: Add "py-record.h" include.
9584         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9585         recpy_bt_end, recpy_bt_instruction_history,
9586         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9587         in gdb.Record object instead of current ptid.
9588         * python/py-record.c: Include new "py-record.h" file.
9589         (recpy_record_object): Moved to py-record.h.
9590         * python/py-record.h: New file.
9591
9592 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9593
9594         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9595         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9596         indentation.
9597
9598 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9599
9600         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9601         the past maintainers section.
9602
9603 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9604
9605         * infcmd.c (get_return_value): Use regcache ctor, and remove
9606         cleanup.
9607
9608 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9609             Pedro Alves  <palves@redhat.com>
9610
9611         * regcache.c (regcache::regcache): New tag dispatch ctor.
9612         (do_cooked_read): Moved above.
9613         (regcache_dup): Use the tag dispatch ctor..
9614         * regcache.h (regcache): Declare ctor, delete copy ctor and
9615         assignment operator, remove friend regcache_dup.
9616
9617 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9618
9619         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9620         call method save instead of regcache_cpy.
9621         * regcache.h (struct regcache): Make regcache_dup a friend.
9622
9623 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9624
9625         * regcache.c (struct regcache): Move to regcache.h
9626         (regcache::arch): New method.
9627         (regcache_get_ptid): Update.
9628         (get_regcache_arch): Call arch method.
9629         (get_regcache_aspace): Call method aspace.
9630         (register_buffer): Change it to method.
9631         (regcache_save): Change it to regcache::save.
9632         (regcache_restore): Likewise.
9633         (regcache_cpy_no_passthrough): Remove the declaration.
9634         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9635         (regcache_cpy_no_passthrough): Change it to method
9636         cpy_no_passthrough.
9637         (regcache_register_status): Change it to method
9638         get_register_status.
9639         (regcache_invalidate): Change it to method invalidate.
9640         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9641         (regcache_raw_update): Change it to method raw_update.
9642         (regcache_raw_read): Likewise.
9643         (regcache_raw_read_signed): Likewise.
9644         (regcache_raw_read_unsigned): Likewise.
9645         (regcache_raw_write_signed): Likewise.
9646         (regcache_raw_write_unsigned): Likewise.
9647         (regcache_cooked_read): Likewise.
9648         (regcache_cooked_read_value): Likewise.
9649         (regcache_cooked_read_signed): Likewise.
9650         (regcache_cooked_read_unsigned): Likewise.
9651         (regcache_cooked_write_signed): Likewise.
9652         (regcache_cooked_write_unsigned): Likewise.
9653         (regcache_raw_set_cached_value): Likewise.
9654         (regcache_raw_write): Likewise.
9655         (regcache_cooked_write): Likewise.
9656         (regcache_xfer_part): Likewise.
9657         (regcache_raw_read_part): Likewise.
9658         (regcache_raw_write_part): Likewise.
9659         (regcache_cooked_read_part): Likewise.
9660         (regcache_cooked_write_part): Likewise.
9661         (regcache_raw_supply): Likewise.
9662         (regcache_raw_collect): Likewise.
9663         (regcache_transfer_regset): Likewise.
9664         (regcache_supply_regset): Likewise.
9665         (regcache_collect_regset): Likewise.
9666         (regcache_debug_print_register): Likewise.
9667         (enum regcache_dump_what): Move it to regcache.h.
9668         (regcache_dump): Change it to method dump.
9669         * regcache.h (enum regcache_dump_what): New.
9670         (class regcache): New.
9671         * target.c (target_fetch_registers): Call method
9672         debug_print_register.
9673         (target_store_registers): Likewise.
9674
9675 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9676
9677         * windows-nat.c (struct lm_info_windows): Initialize field.
9678         (windows_make_so): Allocate lm_info_windows with new.
9679         (windows_free_so): Free lm_info_windows with delete.
9680
9681 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9682
9683         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9684         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9685         cleanup.
9686         (darwin_free_so): Free lm_info_darwin with delete.
9687
9688 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9689
9690         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9691         <l_addr_p>: Change type to bool.
9692         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9693         (svr4_free_so): Free lm_info_svr4 with delete.
9694         (svr4_copy_library_list): Replace memcpy with call to copy
9695         constructor.
9696         (library_list_start_library, svr4_default_sos): Allocate
9697         lm_info_svr4 with new.
9698
9699 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9700
9701         * solib-target.c (struct lm_info_target): Add destructor,
9702         initialize fields.
9703         <name>: Change type to std::string.
9704         (library_list_start_library): Allocate lm_info_target with new.
9705         (solib_target_free_library_list): Free lm_info_target with
9706         delete.
9707         (solib_target_current_sos): Adapt to std::string.
9708         (solib_target_free_so): Free lm_info_target with delete.
9709
9710 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9711
9712         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9713         fields.
9714         (frv_current_sos): Allocate lm_info_frv with new.
9715         (frv_relocate_main_executable): Free lm_info_frv with delete,
9716         allocate with new.
9717         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9718
9719 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9720
9721         * solib-frv.c (struct lm_info_frv): Fix indentation.
9722
9723 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9724
9725         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9726         map field.
9727         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9728         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9729         and allocate with new.
9730         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9731
9732 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9733
9734         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9735         <filename, member_name>: Change type to std::string.
9736         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9737         (library_list_start_library): Allocate lm_info_aix with new.
9738         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9739         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9740         with copy constructor.
9741
9742 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9743
9744         * solist.h (struct lm_info): Remove.
9745         (struct lm_info_base): New class.
9746         (struct so_list) <lm_info>: Change type to lm_info_base *.
9747         * nto-tdep.c (struct lm_info): Remove.
9748         (lm_addr): Adjust.
9749         * solib-aix.c (struct lm_info): Rename to ...
9750         (struct lm_info_aix): ... this.  Extend lm_info_base.
9751         (lm_info_p): Rename to ...
9752         (lm_info_aix_p): ... this, and adjust.
9753         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9754         solib_aix_parse_libraries, library_list_start_library,
9755         solib_aix_free_library_list, solib_aix_parse_libraries,
9756         solib_aix_get_library_list,
9757         solib_aix_relocate_section_addresses, solib_aix_free_so,
9758         solib_aix_get_section_offsets,
9759         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9760         Adjust.
9761         (struct solib_aix_inferior_data) <library_list>: Adjust.
9762         * solib-darwin.c (struct lm_info): Rename to ...
9763         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9764         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9765         * solib-dsbt.c (struct lm_info): Rename to ...
9766         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9767         (struct dsbt_info) <main_executable_lm_info): Adjust.
9768         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9769         dsbt_relocate_section_addresses): Adjust.
9770         * solib-frv.c (struct lm_info): Rename to ...
9771         (struct lm_info_frv): ... this.  Extend lm_info_base.
9772         (main_executable_lm_info): Adjust.
9773         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9774         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9775         find_canonical_descriptor_in_load_object,
9776         frv_fdpic_find_canonical_descriptor): Adjust.
9777         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9778         to lm_info_svr4.
9779         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9780         svr4_clear_so, svr4_copy_library_list,
9781         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9782         svr4_current_sos, svr4_fetch_objfile_link_map,
9783         solist_update_incremental): Adjust.
9784         * solib-svr4.h (struct lm_info_svr4): Move here from
9785         solib-svr4.c.
9786         * solib-target.c (struct lm_info): Rename to ...
9787         (struct lm_info_target): ... this.  Extend lm_info_base.
9788         (lm_info_p): Rename to ...
9789         (lm_info_target_p): ... this.
9790         (solib_target_parse_libraries, library_list_start_segment,
9791         library_list_start_section, library_list_start_library,
9792         library_list_end_library, solib_target_free_library_list,
9793         solib_target_current_sos, solib_target_free_so,
9794         solib_target_relocate_section_addresses): Adjust.
9795         * windows-nat.c (struct lm_info): Rename to ...
9796         (struct lm_info_windows): ... this.  Extend lm_info_base.
9797         (windows_make_so, handle_load_dll, handle_unload_dll,
9798         windows_xfer_shared_libraries): Adjust.
9799
9800 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9801
9802         * solib-darwin.c (struct darwin_so_list): Remove.
9803         (darwin_current_sos): Allocate an so_list object instead of a
9804         darwin_so_list, separately allocate an lm_info object.
9805         (darwin_free_so): Free lm_info.
9806
9807 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9808
9809         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9810         with fprintf_filtered.
9811
9812 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9813
9814         * regcache.c (regcache::regcache): New function.
9815         (regcache::~regcache): New function.
9816         (regcache_xmalloc_1): Remove.
9817         (regcache_xmalloc): Call new regcache.
9818         (regcache_xfree): Call delete regcache.
9819         (get_thread_arch_aspace_regcache): Call new regcache.
9820
9821 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9822
9823         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9824         lwp instead of ptid_get_lwp.
9825
9826 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9827
9828         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9829         lwp_info instead of getting from inferior_ptid.
9830
9831 2017-04-27  Keith Seitz  <keiths@redhat.com>
9832
9833         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9834         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9835         (CV_CONVERSION_BADNESS): Define.
9836         (rank_one_type): Remove overly restrictive rvalue reference
9837         rank checks.
9838         Add cv-qualifier checks and subranks for type equality.
9839         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9840         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9841         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9842
9843 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9844
9845         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9846         count when creating the object.
9847
9848 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9849             Ulrich Weigand  <uweigand@de.ibm.com>
9850
9851         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9852         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9853         is used in AIX.
9854         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9855         (process_xcoff_symbol): Likewise.
9856         (scan_xcoff_symtab): Likewise.
9857
9858 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9859
9860         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9861         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9862         (ia64_access_reg): Use get_frame_register_unsigned.
9863         (ia64_access_rse_reg): Likewise.
9864         (ia64_libunwind_frame_prev_register): Likewise.
9865
9866 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9867
9868         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9869         * gdbarch.c: Regenerated.
9870         * gdbarch.h: Regenerated.
9871         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9872         visibility external.
9873         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9874         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9875         (enum cfa_how_kind): Move to ...
9876         (struct dwarf2_frame_state_reg_info): Likewise.
9877         (struct dwarf2_frame_state): Likewise.
9878         * dwarf2-frame.h: ... here.
9879         (dwarf2_frame_state_alloc_regs): New declaration.
9880         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9881         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9882
9883 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9884
9885         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9886         regcache_raw_read_unsigned.
9887         (xtensa_pseudo_register_write): Likewise.
9888
9889 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9890
9891         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9892         (nds32_pseudo_register_write): Likewise.
9893
9894 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9895
9896         * regcache.c (struct regcache) <readonly_p>: Change its type
9897         to bool.
9898         (regcache_xmalloc_1): Update parameter type and callers update.
9899
9900 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9901
9902         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9903         set_gdbarch_wchar_bit.
9904         * arm-tdep.c (arm_gdbarch_init): Likewise.
9905
9906 2017-04-25  Pedro Alves  <palves@redhat.com>
9907
9908         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9909         (BothAreRelocatable, memcopy, memmove): Don't define.
9910         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9911         macros.
9912
9913 2017-04-25  Pedro Alves  <palves@redhat.com>
9914
9915         * common/common-defs.h: Include "common/poison.h".
9916         * common/function-view.h: (Not, Or, Requires): Move to traits.h
9917         and adjust.
9918         * common/poison.h: New file.
9919         * common/traits.h: Include <type_traits>.
9920         (Not, Or, Requires): New, moved from common/function-view.h.
9921
9922 2017-04-25  Pedro Alves  <palves@redhat.com>
9923
9924         * breakpoint.h (struct breakpoint): In-class initialize all
9925         fields.  Make boolean fields "bool".
9926         * breakpoint.c (init_raw_breakpoint_without_location): Remove
9927         memset call and initializations no longer necessary.
9928
9929 2017-04-25  Pedro Alves  <palves@redhat.com>
9930
9931         * btrace.c (pt_btrace_insn_flags): Change parameter type to
9932         reference.
9933         (pt_btrace_insn): New function.
9934         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9935
9936 2017-04-25  Pedro Alves  <palves@redhat.com>
9937
9938         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
9939         "base" field and inherit from "bp_location" instead.  Add
9940         non-default ctor.
9941         (allocate_location_exception): Use new non-default ctor.
9942         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9943         (init_bp_location): Convert to ...
9944         (bp_location::bp_location): ... this new ctor, and remove memset
9945         call.
9946         (base_breakpoint_allocate_location): Use the new non-default ctor.
9947         * breakpoint.h (bp_location): Now a class.  Declare default and
9948         non-default ctors.  In-class initialize all members.
9949         (init_bp_location): Remove declaration.
9950
9951 2017-04-25  Pedro Alves  <palves@redhat.com>
9952
9953         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9954         assignment operator.
9955
9956 2017-04-24  Yao Qi  <yao.qi@linaro.org>
9957
9958         * doublest.c (convert_doublest_to_floatformat): Call
9959         floatformat_totalsize_bytes.
9960
9961 2017-04-22  Tom Tromey  <tom@tromey.com>
9962
9963         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9964         ui_out_emit_list.
9965         * stack.c (print_frame): Use ui_out_emit_list.
9966         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9967         ui_out_emit_list.
9968         * mi/mi-main.c (print_one_inferior)
9969         (mi_cmd_data_list_register_names)
9970         (mi_cmd_data_list_register_values, mi_cmd_list_features)
9971         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9972         ui_out_emit_list.
9973         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9974         (mi_output_solib_attribs): Use ui_out_emit_list,
9975         ui_out_emit_tuple.
9976         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9977         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9978         (mi_cmd_stack_list_args, list_args_or_locals): Use
9979         ui_out_emit_list.
9980         * disasm.c (do_assembly_only): Use ui_out_emit_list.
9981         * breakpoint.c (print_solib_event, output_thread_groups): Use
9982         ui_out_emit_list.
9983
9984 2017-04-22  Tom Tromey  <tom@tromey.com>
9985
9986         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9987         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9988         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9989
9990 2017-04-22  Tom Tromey  <tom@tromey.com>
9991
9992         * tracepoint.c (tvariables_info_1)
9993         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9994
9995 2017-04-22  Tom Tromey  <tom@tromey.com>
9996
9997         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9998         annotate_arg_emitter.
9999         * breakpoint.c (print_mention_watchpoint)
10000         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10001         * annotate.h (struct annotate_arg_emitter): New.
10002
10003 2017-04-22  Tom Tromey  <tom@tromey.com>
10004
10005         * record-btrace.c (record_btrace_insn_history)
10006         (record_btrace_insn_history_range, record_btrace_call_history)
10007         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10008         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10009         ui_out_emit_tuple.
10010         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10011         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10012         * skip.c (skip_info): Use ui_out_emit_tuple.
10013         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10014         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10015         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10016         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10017         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10018         ui_out_emit_tuple.
10019         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10020         (output_register, mi_cmd_data_read_memory)
10021         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10022         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10023         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10024         Use ui_out_emit_tuple.
10025         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10026         ui_out_emit_tuple.
10027         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10028         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10029         * linux-thread-db.c (info_auto_load_libthread_db): Use
10030         ui_out_emit_tuple.
10031         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10032         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10033         * disasm.c (do_mixed_source_and_assembly_deprecated)
10034         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10035         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10036         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10037         * breakpoint.c (print_one_breakpoint_location)
10038         (print_one_breakpoint): Use ui_out_emit_tuple.
10039         * auto-load.c (print_script, info_auto_load_cmd): Use
10040         ui_out_emit_tuple.
10041         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10042
10043 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10044
10045         * thread.c (print_thread_info_1): Remove dead code.
10046
10047 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10048
10049         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10050         GDB_SELF_TEST.
10051         * arm-tdep.c (selftests::arm_record_test): Likewise.
10052
10053 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10054
10055         * regcache.c (regcache_restore): Remove argument 2.  Replace
10056         argument 3 with regcache.  Get register status from
10057         src->register_status and get register contents from
10058         register_buffer (src, regnum).
10059         (regcache_cpy): Update.
10060
10061 2017-04-19  Pedro Alves  <palves@redhat.com>
10062
10063         * gdbthread.h (thread): Add missing closing parenthesis in
10064         comment.
10065
10066 2017-04-19  Pedro Alves  <palves@redhat.com>
10067
10068         * common/refcounted-object.h: New file.
10069         * gdbthread.h: Include "common/refcounted-object.h".
10070         (thread_info): Inherit from refcounted_object and add comments.
10071         (thread_info::incref, thread_info::decref)
10072         (thread_info::m_refcount): Delete.
10073         (thread_info::deletable): Use the refcounted_object::refcount()
10074         method.
10075         * inferior.c (current_inferior_): Add comment.
10076         (set_current_inferior): Increment/decrement refcounts.
10077         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10078         not-deletable instead of comparing with the current inferior.
10079         (initialize_inferiors): Increment the initial inferior's refcount.
10080         * inferior.h (struct inferior): Forward declare.
10081         Include "common/refcounted-object.h".
10082         (current_inferior, set_current_inferior): Move declaration to
10083         before struct inferior's definition, and fix comment.
10084         (inferior): Inherit from refcounted_object.  Add comments.
10085         * thread.c (switch_to_thread_no_regs): Reference the thread's
10086         inferior pointer directly instead of doing a ptid lookup.
10087         (switch_to_no_thread): New function.
10088         (switch_to_thread(thread_info *)): New function, factored out
10089         from ...
10090         (switch_to_thread(ptid_t)): ... this.
10091         (restore_current_thread): Delete.
10092         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10093         fields, and add 'inf' field.
10094         (do_restore_current_thread_cleanup): Check whether old->inf is
10095         alive instead of looking up an inferior by ptid.  Use
10096         switch_to_thread and switch_to_no_thread.
10097         (restore_current_thread_cleanup_dtor): Use old->inf directly
10098         instead of lookup up an inferior by id.  Decref the inferior.
10099         Don't restore 'removable'.
10100         (make_cleanup_restore_current_thread): Same the inferior pointer
10101         in old, instead of the inferior number.  Incref the inferior.
10102         Don't save/clear 'removable'.
10103
10104 2017-04-19  Pedro Alves  <palves@redhat.com>
10105
10106         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10107         unittests/scoped_restore-selftests.c.
10108         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10109         * common/scoped_restore.h (scoped_restore_base): Make "class".
10110         (scoped_restore_base::release): New public method.
10111         (scoped_restore_base::scoped_restore_base): New protected ctor.
10112         (scoped_restore_base::m_saved_var): New protected field.
10113         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10114         scoped_restore_base base class instead of m_saved_var directly.
10115         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10116         (scoped_restore_tmpl::scoped_restore_tmpl(const
10117         scoped_restore_tmpl<T>&)): Likewise.
10118         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10119         method.
10120         (scoped_restore_tmpl::saved_var): New method.
10121         (scoped_restore_tmpl::m_saved_var): Delete.
10122         * inferior.h (inferior::detaching): Now a bool.
10123         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10124         cleanup.
10125         * unittests/scoped_restore-selftests.c: New file.
10126
10127 2017-04-19  Pedro Alves  <palves@redhat.com>
10128
10129         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10130         Re-sort in alphabetic order.
10131
10132 2017-04-18  Pedro Alves  <palves@redhat.com>
10133
10134         * xml-support.c (obstack_xml_printf): Delete.
10135         * xml-support.h (obstack_xml_printf): Delete.
10136
10137 2017-04-18  Pedro Alves  <palves@redhat.com>
10138
10139         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10140         vdebug, verror, body_text, start_element, end_element, name,
10141         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10142         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10143         is_xinclude>: Make private and add m_ prefix.
10144         (gdb_xml_parser::body_text): New method, based on ...
10145         (gdb_xml_body_text): ... this.  Adjust.
10146         (gdb_xml_parser::vdebug): New method, based on ...
10147         (gdb_xml_debug): ... this.  Adjust.
10148         (gdb_xml_parser::verror): New method, based on ...
10149         (gdb_xml_error): ... this.  Adjust.
10150         (gdb_xml_parser::start_element): New method, based on ...
10151         (gdb_xml_start_element): ... this.  Adjust.
10152         (gdb_xml_start_element_wrapper): Defer to
10153         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10154         (gdb_xml_parser::end_element): New method, based on ...
10155         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10156         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10157         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10158         (gdb_xml_parser::use_dtd): New method, based on ...
10159         (gdb_xml_use_dtd): ... this.  Adjust.
10160         (gdb_xml_parser::parse): New method, based on ...
10161         (gdb_xml_parse): ... this.  Adjust.
10162         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10163         (xinclude_start_include): Adjust to call the parser's name method.
10164         (xml_xinclude_default, xml_xinclude_start_doctype)
10165         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10166         method.
10167         (xml_process_xincludes): Adjust to call parser methods.
10168         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10169         declarations.
10170
10171 2017-04-18  Pedro Alves  <palves@redhat.com>
10172
10173         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10174         gdb::optional<std::string>.
10175         * xml-support.c: Include <string>.
10176         (scope_level::scope_level(scope_level &&))
10177         (scope_level::~scope_level): Delete.
10178         (scope_level::body): Now a std::string.
10179         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10180         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10181         parameter.
10182         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10183         (xinclude_parsing_data::output): Now a std::string reference.
10184         (xinclude_start_include): Adjust.
10185         (xml_xinclude_default): Adjust.
10186         (xml_process_xincludes): Add 'output' parameter, and return bool.
10187         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10188         and return bool.
10189         * xml-tdesc.c: Include <unordered_map> and <string>.
10190         (tdesc_xml_cache): Delete.
10191         (tdesc_xml_cache_s): Delete.
10192         (xml_cache): Now an std::unordered_map.
10193         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10194         (target_fetch_description_xml): Change return type to
10195         gdb::optional<std::string>, and adjust.
10196         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10197         (target_fetch_description_xml): Change return type to
10198         gdb::optional<std::string>.
10199
10200 2017-04-18  Pedro Alves  <palves@redhat.com>
10201
10202         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10203         unittests/optional-selftests.c.
10204         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10205         * unittests/optional-selftests.c: New file.
10206         * unittests/optional/assignment/1.cc: New file.
10207         * unittests/optional/assignment/2.cc: New file.
10208         * unittests/optional/assignment/3.cc: New file.
10209         * unittests/optional/assignment/4.cc: New file.
10210         * unittests/optional/assignment/5.cc: New file.
10211         * unittests/optional/assignment/6.cc: New file.
10212         * unittests/optional/assignment/7.cc: New file.
10213         * unittests/optional/cons/copy.cc: New file.
10214         * unittests/optional/cons/default.cc: New file.
10215         * unittests/optional/cons/move.cc: New file.
10216         * unittests/optional/cons/value.cc: New file.
10217         * unittests/optional/in_place.cc: New file.
10218         * unittests/optional/observers/1.cc: New file.
10219         * unittests/optional/observers/2.cc: New file.
10220
10221 2017-04-18  Pedro Alves  <palves@redhat.com>
10222
10223         * common/gdb_optional.h: Include common/traits.h.
10224         (in_place_t): New type.
10225         (in_place): New constexpr variable.
10226         (optional::optional): Remove member initialization of
10227         m_instantiated.
10228         (optional::optional(in_place_t...)): New constructor.
10229         (optional::~optional): Use reset.
10230         (optional::optional(const optional&)): New.
10231         (optional::optional(const optional&&)): New.
10232         (optional::optional(T &)): New.
10233         (optional::optional(T &&)): New.
10234         (operator::operator=(const optional &)): New.
10235         (operator::operator=(optional &&)): New.
10236         (operator::operator= (const T &))
10237         (operator::operator= (T &&))
10238         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10239         (operator::reset): New.
10240         (operator::m_instantiated):: Add in-class initializer.
10241         * common/traits.h: Include <type_traits>.
10242         (struct And): New types.
10243
10244 2017-04-18  Pedro Alves  <palves@redhat.com>
10245
10246         * xml-support.c: Include <vector>.
10247         (scope_level::scope_level(const gdb_xml_element *))
10248         (scope_level::scope_level(scope_level&&)): New.
10249         (scope_level::~scope_level): New.
10250         (scope_level_s): Delete.
10251         (gdb_xml_parser::scopes): Now a std::vector.
10252         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10253         Use std::vector.
10254         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10255         scope cleanup code.
10256         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10257         of the scopes member.  Use std::vector::emplace_back.
10258
10259 2017-04-18  Pedro Alves  <palves@redhat.com>
10260
10261         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10262         a bool.
10263         (gdb_xml_end_element): Change type of first parameter.
10264         (gdb_xml_cleanup): Rename to ...
10265         (gdb_xml_parser::~gdb_xml_parser): ... this.
10266         (gdb_xml_create_parser_and_cleanup): Delete with ...
10267         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10268         to this new ctor.
10269         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10270         using gdb_xml_create_parser_and_cleanup.
10271         (xinclude_parsing_data): Add ctor/dtor.
10272         (xml_xinclude_cleanup): Delete.
10273         (xml_process_xincludes): Create a local xinclude_parsing_data
10274         instead of heap-allocating one.  Create a local gdb_xml_parser
10275         instead of heap-allocating one with
10276         gdb_xml_create_parser_and_cleanup.
10277
10278 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10279
10280         PR threads/20743
10281         * fbsd-nat.c (resume_one_thread_cb): Remove.
10282         (resume_all_threads_cb): Remove.
10283         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10284         iterate_over_threads.
10285
10286 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10287
10288         * NEWS: Create a new section for the next release branch.
10289         Rename the section of the current branch, now that it has
10290         been cut.
10291
10292 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10293
10294         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10295         * version.in: Bump version to 8.0.50.DATE-git.
10296
10297 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10298
10299         PR gdb/21385
10300         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10301         independently of the host, and fix build breakage on Cygwin.
10302
10303 2017-04-13  Pedro Alves  <palves@redhat.com>
10304
10305         * inferior.c (free_inferior): Convert to ...
10306         (inferior::~inferior): ... this dtor.
10307         (inferior::inferior): New ctor, factored out from ...
10308         (add_inferior_silent): ... here.  Allocate the inferior with a new
10309         expression.
10310         (delete_inferior): Call delete instead of free_inferior.
10311         * inferior.h (gdb_environ, continuation): Forward declare.
10312         (inferior): Now a class.  Add in-class initialization to all
10313         members.  Make boolean fields bool, except 'detaching'.
10314         (inferior::inferior): New explicit ctor.
10315         (inferior::~inferior): New.
10316
10317 2017-04-13  Pedro Alves  <palves@redhat.com>
10318
10319         * inferior.c (init_inferior_list): Delete.
10320         * inferior.h (init_inferior_list): Delete.
10321
10322 2017-04-13  Pedro Alves  <palves@redhat.com>
10323
10324         PR threads/13217
10325         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10326         (top level): Call it twice, with different thread sets.
10327
10328 2017-04-13  Pedro Alves  <palves@redhat.com>
10329
10330         * thread.c: Include <algorithm>.
10331         (thread_array_cleanup): Delete.
10332         (scoped_inc_dec_ref): New class.
10333         (live_threads_count): New function.
10334         (set_thread_refcount): Delete.
10335         (tp_array_compar_ascending): Now a bool.
10336         (tp_array_compar): Convert to a std::sort comparison function.
10337         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10338         and live_threads_count.
10339
10340 2017-04-13  Pedro Alves  <palves@redhat.com>
10341
10342         * infrun.c (follow_fork_inferior): Also switch the current
10343         inferior.
10344
10345 2017-04-13  Pedro Alves  <palves@redhat.com>
10346
10347         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10348         before calling create_internal_breakpoint.
10349
10350 2017-04-13  Pedro Alves  <palves@redhat.com>
10351
10352         * fork-child.c (execv_argv): New class.
10353         (breakup_args): Refactored as ...
10354         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10355         Copy arguments to storage and replace separators with NULL
10356         terminators in place.
10357         (escape_bang_in_quoted_argument): Adjust to return bool.
10358         (execv_argv::execv_argv): New ctor.
10359         (execv_argv::init_for_shell): New method, factored out from
10360         fork_inferior.  Don't strdup strings into the vector.
10361         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10362         Remove free_vector_argv call.
10363
10364 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10365
10366         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10367         tdep->rx_psw_type.
10368
10369 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10370
10371         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10372         * rx-tdep.c (rx_gdbarch_init): Likewise.
10373
10374 2017-04-13  Pedro Alves  <palves@redhat.com>
10375
10376         * breakpoint.h (struct breakpoint): Reindent.
10377
10378 2017-04-13  Pedro Alves  <palves@redhat.com>
10379
10380         * breakpoint.c (bp_location): Rename to ...
10381         (bp_locations): ... this.  All references updated.
10382         (bp_location_count): Rename to ...
10383         (bp_locations_count): ... this.  All references updated.
10384         (bp_location_placed_address_before_address_max): Rename to ...
10385         (bp_locations_placed_address_before_address_max): ... this.  All
10386         references updated.
10387         (bp_location_shadow_len_after_address_max): Rename to ...
10388         (bp_locations_shadow_len_after_address_max): ... this.  All
10389         references updated.
10390         (bp_location_compare_addrs): Rename to ...
10391         (bp_locations_compare_addrs): ... this.  All references updated.
10392         (bp_location_compare):Rename to ...
10393         (bp_locations_compare): ... this.  All references updated.
10394         (bp_location_target_extensions_update): Rename to ...
10395         (bp_locations_target_extensions_update): ... this.  All references
10396         updated.
10397
10398 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10399
10400         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10401         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10402         'sgtty.h'.
10403         * common/gdb_termios.h: New file, with parts of "terminal.h".
10404         * inflow.c: Include "gdb_termios.h".
10405         * ser-unix.c: Include "gdb_termios.h".
10406         * terminal.h: Move terminal-related defines to
10407         "common/gdb_termios.h".
10408
10409 2017-04-12  Tom Tromey  <tom@tromey.com>
10410
10411         * probe.c (parse_probes): Update.
10412         * location.h (delete_event_location): Don't declare.
10413         (event_location_deleter::operator()): Update.
10414         * location.c (event_location_deleter::operator()): Rename from
10415         delete_event_location.
10416         * linespec.h (linespec_result) <location>: Change type to
10417         event_location_up.
10418         * linespec.c (canonicalize_linespec, event_location_to_sals)
10419         (decode_objc): Update.
10420         (linespec_result): Don't call delete_event_location.
10421         * breakpoint.c (create_breakpoints_sal)
10422         (bkpt_probe_create_sals_from_location)
10423         (strace_marker_create_sals_from_location): Update.
10424
10425 2017-04-12  Tom Tromey  <tom@tromey.com>
10426
10427         * linespec.h (struct linespec_result): Add constructor and
10428         destructor.
10429         (init_linespec_result, destroy_linespec_result)
10430         (make_cleanup_destroy_linespec_result): Don't declare.
10431         * linespec.c (init_linespec_result): Remove.
10432         (linespec_result::~linespec_result): Rename from
10433         destroy_linespec_result.  Update.
10434         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10435         Remove.
10436         * breakpoint.c (create_breakpoint, break_range_command)
10437         (decode_location_default): Update.
10438         * ax-gdb.c (agent_command_1): Update.
10439
10440 2017-04-12  Tom Tromey  <tom@tromey.com>
10441
10442         * remote.c (remote_download_tracepoint): Update.
10443         * python/py-breakpoint.c (bppy_get_location): Update.
10444         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10445         (gdbscm_breakpoint_location): Update.
10446         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10447         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10448         Change type to event_location_up.
10449         * breakpoint.c (create_overlay_event_breakpoint)
10450         (create_longjmp_master_breakpoint)
10451         (create_std_terminate_master_breakpoint)
10452         (create_exception_master_breakpoint)
10453         (breakpoint_event_location_empty_p, print_breakpoint_location)
10454         (print_one_breakpoint_location, create_thread_event_breakpoint)
10455         (init_breakpoint_sal, create_breakpoint)
10456         (print_recreate_ranged_breakpoint, break_range_command)
10457         (init_ada_exception_breakpoint, say_where): Update.
10458         (base_breakpoint_dtor): Don't call delete_event_location.
10459         (bkpt_print_recreate, tracepoint_print_recreate)
10460         (dprintf_print_recreate, update_static_tracepoint)
10461         (breakpoint_re_set_default): Update.
10462
10463 2017-04-12  Tom Tromey  <tom@tromey.com>
10464
10465         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10466         type of "to_do".  Update.
10467         (compute_stack_depth): Use std::vector.
10468
10469 2017-04-12  Tom Tromey  <tom@tromey.com>
10470
10471         * printcmd.c (find_instruction_backward): Use std::vector.
10472
10473 2017-04-12  Tom Tromey  <tom@tromey.com>
10474
10475         * symfile.c (objfilep): Remove typedef.
10476         (reread_symbols): Use a std::vector.
10477
10478 2017-04-12  Tom Tromey  <tom@tromey.com>
10479
10480         * mi/mi-main.c (exec_direction_forward): Remove.
10481         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10482         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10483         scoped_restore.
10484         * guile/guile.c (guile_repl_command, guile_command)
10485         (gdbscm_execute_gdb_command): Use scoped_restore.
10486         * go-exp.y (go_parse): Use scoped_restore.
10487         * d-exp.y (d_parse): Use scoped_restore.
10488         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10489         * c-exp.y (c_parse): Use scoped_restore.
10490
10491 2017-04-12  Tom Tromey  <tom@tromey.com>
10492
10493         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10494         (mi_parse): Update return type.
10495         (mi_parse_free): Remove.
10496         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10497         (mi_parse::~mi_parse): Rename from mi_parse_free.
10498         (mi_parse_cleanup): Remove.
10499         (mi_parse): Return a unique_ptr.  Use new.
10500         * mi/mi-main.c (mi_execute_command): Update.
10501
10502 2017-04-12  Tom Tromey  <tom@tromey.com>
10503
10504         * location.c (explicit_location_lex_one): Return a
10505         unique_xmalloc_ptr.
10506         (string_to_explicit_location): Update.  Remove cleanups.
10507
10508 2017-04-12  Tom Tromey  <tom@tromey.com>
10509
10510         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10511         (compare_value_and_voffset): Change type.  Update.
10512         (compute_vtable_size): Change type of "offset_vec".
10513         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10514         (gnuv3_get_typeid): Remove extraneous declaration.
10515
10516 2017-04-12  Tom Tromey  <tom@tromey.com>
10517
10518         * charset.h (wchar_iterator): Fix comment.
10519
10520 2017-04-12  Tom Tromey  <tom@tromey.com>
10521
10522         * charset.c (iconv_wrapper): New class.
10523         (cleanup_iconv): Remove.
10524         (convert_between_encodings): Use it.
10525
10526 2017-04-12  Tom Tromey  <tom@tromey.com>
10527
10528         * symfile.h (increment_reading_symtab): Update type.
10529         * symfile.c (decrement_reading_symtab): Remove.
10530         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10531         * psymtab.c (psymtab_to_symtab): Update.
10532         * dwarf2read.c (dw2_instantiate_symtab): Update.
10533
10534 2017-04-12  Tom Tromey  <tom@tromey.com>
10535
10536         * jit.c (struct jit_reader): Declare separately.  Add constructor
10537         and destructor.  Change type of "handle".
10538         (loaded_jit_reader): Define separately.
10539         (jit_reader_load): Update.  New "new".
10540         (jit_reader_unload_command): Use "delete".
10541         * gdb-dlfcn.h (struct dlclose_deleter): New.
10542         (gdb_dlhandle_up): New typedef.
10543         (gdb_dlopen, gdb_dlsym): Update types.
10544         (gdb_dlclose): Remove.
10545         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10546         (gdb_dlsym): Change type of "handle".
10547         (make_cleanup_dlclose): Remove.
10548         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10549         * compile/compile-c-support.c (load_libcc): Update.
10550
10551 2017-04-12  Tom Tromey  <tom@tromey.com>
10552
10553         * symtab.h (find_pcs_for_symtab_line): Change return type.
10554         * symtab.c (find_pcs_for_symtab_line): Change return type.
10555         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10556         type of "vec".  Update.
10557         (ltpy_get_pcs_for_line): Update.
10558         * linespec.c (decode_digits_ordinary): Update.
10559
10560 2017-04-12  Tom Tromey  <tom@tromey.com>
10561
10562         * tracepoint.c (actions_command): Update.
10563         * python/python.c (python_command, python_interactive_command):
10564         Update.
10565         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10566         * guile/guile.c (guile_command): Update.
10567         * defs.h (read_command_lines, read_command_lines_1): Return
10568         command_line_up.
10569         (command_lines_deleter): New struct.
10570         (command_line_up): New typedef.
10571         * compile/compile.c (compile_code_command)
10572         (compile_print_command): Update.
10573         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10574         command_line_up.
10575         (make_cleanup_free_command_lines): Remove.
10576         * cli/cli-script.c (get_command_line, read_command_lines_1)
10577         (copy_command_lines): Return command_line_up.
10578         (while_command, if_command, read_command_lines, define_command)
10579         (document_command): Update.
10580         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10581         Remove.
10582         * breakpoint.h (breakpoint_set_commands): Change type of
10583         "commands".
10584         * breakpoint.c (breakpoint_set_commands): Change type of
10585         "commands".  Update.
10586         (do_map_commands_command, update_dprintf_command_list)
10587         (create_tracepoint_from_upload): Update.
10588
10589 2017-04-12  Tom Tromey  <tom@tromey.com>
10590
10591         * tracepoint.c (scope_info): Update.
10592         * spu-tdep.c (spu_catch_start): Update.
10593         * python/python.c (gdbpy_decode_line): Update.
10594         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10595         * python/py-breakpoint.c (bppy_init): Update.
10596         * probe.c (parse_probes): Update.
10597         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10598         * location.h (event_location_deleter): New struct.
10599         (event_location_up): New typedef.
10600         (new_linespec_location, new_address_location, new_probe_location)
10601         (new_explicit_location, copy_event_location)
10602         (string_to_event_location, string_to_event_location_basic)
10603         (string_to_explicit_location): Update return type.
10604         (make_cleanup_delete_event_location): Remove.
10605         * location.c (new_linespec_location, new_address_location)
10606         (new_probe_location, new_explicit_location, copy_event_location):
10607         Return event_location_up.
10608         (delete_event_location_cleanup)
10609         (make_cleanup_delete_event_location): Remove.
10610         (string_to_explicit_location, string_to_event_location_basic)
10611         (string_to_event_location): Return event_location_up.
10612         * linespec.c (canonicalize_linespec, event_location_to_sals)
10613         (decode_line_with_current_source)
10614         (decode_line_with_last_displayed, decode_objc): Update.
10615         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10616         * completer.c (location_completer): Update.
10617         * cli/cli-cmds.c (edit_command, list_command): Update.
10618         * breakpoint.c (create_overlay_event_breakpoint)
10619         (create_longjmp_master_breakpoint)
10620         (create_std_terminate_master_breakpoint)
10621         (create_exception_master_breakpoint)
10622         (create_thread_event_breakpoint): Update.
10623         (init_breakpoint_sal): Update.  Remove some dead code.
10624         (create_breakpoint_sal): Change type of "location".  Update.
10625         (create_breakpoints_sal, create_breakpoint, break_command_1)
10626         (dprintf_command, break_range_command, until_break_command)
10627         (init_ada_exception_breakpoint)
10628         (strace_marker_create_sals_from_location)
10629         (update_static_tracepoint, trace_command, ftrace_command)
10630         (strace_command, create_tracepoint_from_upload): Update.
10631         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10632         * ax-gdb.c (agent_command_1): Update.
10633
10634 2017-04-12  Pedro Alves  <palves@redhat.com>
10635
10636         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10637         * configure.tgt: Handle i[34567]86-*-go32* and
10638         i[34567]86-*-msdosdjgpp*.
10639         * i386-tdep.c (i386_svr4_reg_to_regnum):
10640         Make extern.
10641         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10642         i386-go32-tdep.c.
10643         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10644         * i386-go32-tdep.c: New file.
10645         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10646         declarations.
10647
10648 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10649
10650         * aix-thread.c (pd_status2str): Change return type to const char *.
10651
10652 2017-04-12  Pedro Alves  <palves@redhat.com>
10653
10654         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10655         calls to set_gdbarch_gnu_triplet_regexp.
10656
10657 2017-04-12  Pedro Alves  <palves@redhat.com>
10658
10659         PR gdb/21323
10660         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10661         New enum value.
10662         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10663         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10664         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10665         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10666         * gdbarch.h, gdbarch.c: Regenerate.
10667         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10668         gdbarch_wchar_bit and gdbarch_wchar_signed.
10669         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10670         * arm-tdep.c (arm_gdbarch_init): Likewise.
10671         * avr-tdep.c (avr_gdbarch_init): Likewise.
10672         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10673         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10674         * i386-tdep.c (i386_go32_init_abi): Likewise.
10675         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10676         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10677         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10678         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10679         * sh-tdep.c (sh_gdbarch_init): Likewise.
10680         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10681         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10682         * windows-tdep.c (windows_init_abi): Likewise.
10683         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10684
10685 2017-04-12  Pedro Alves  <palves@redhat.com>
10686
10687         PR c++/21323
10688         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10689         cplus_primitive_type_char32_t>: New enum values.
10690         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10691         and cplus_primitive_type_char32_t.
10692         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10693         32, use the archtecture's built-in type for char16_t and char32_t,
10694         respectively.  Otherwise, fallback to init_integer_type as before,
10695         but make the type unsigned, and issue a complaint.
10696         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10697
10698 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10699
10700         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10701         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10702
10703 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10704
10705         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10706         'const char *'.
10707
10708 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10709
10710         * common/common-utils.c (free_vector_argv): New function.
10711         * common/common-utils.h: Include <vector>.
10712         (free_vector_argv): New prototype.
10713         * darwin-nat.c (darwin_create_inferior): Rewrite function
10714         prototype in order to constify "exec_file" and accept a
10715         "std::string" for "allargs".
10716         * fork-child.c: Include <vector>.
10717         (breakup_args): Rewrite function, using C++.
10718         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10719         and accept "std::string" for "allargs".  Update the code to
10720         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10721         and "execvp".
10722         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10723         order to constify "exec_file" and accept a "std::string" for
10724         "allargs".
10725         * go32-nat.c (go32_create_inferior): Likewise.
10726         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10727         * infcmd.c (run_command_1): Constify "exec_file".  Use
10728         "std::string" for inferior arguments.
10729         * inferior.h (fork_inferior): Update prototype.
10730         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10731         prototype in order to constify "exec_file" and accept a
10732         "std::string" for "allargs".
10733         * nto-procfs.c (procfs_create_inferior): Likewise.
10734         * procfs.c (procfs_create_inferior): Likewise.
10735         * remote-sim.c (gdbsim_create_inferior): Likewise.
10736         * remote.c (extended_remote_run): Update code to accept
10737         "std::string" as argument.
10738         (extended_remote_create_inferior): Rewrite function prototype in
10739         order to constify "exec_file" and accept a "std::string" for
10740         "allargs".
10741         * rs6000-nat.c (super_create_inferior): Likewise.
10742         (rs6000_create_inferior): Likewise.
10743         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10744         * windows-nat.c (windows_create_inferior): Likewise.
10745
10746 2017-04-11  Pedro Alves  <palves@redhat.com>
10747
10748         * thread.c: Fix whitespace throughout.
10749
10750 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10751
10752         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10753
10754 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10755
10756         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10757
10758 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10759
10760         PR gdb/21364
10761         * osdata.c (info_osdata): Check if 'type' is an empty string
10762         instead of NULL.
10763
10764 2017-04-10  Pedro Alves  <palves@redhat.com>
10765
10766         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10767         (ptid_to_global_thread_id, in_thread_list)
10768         (do_captured_list_thread_ids, set_resumed, set_running)
10769         (set_executing, set_stop_requested, finish_thread_state)
10770         (validate_registers_access, can_access_registers_ptid)
10771         (print_thread_info_1, switch_to_thread)
10772         (do_restore_current_thread_cleanup)
10773         (make_cleanup_restore_current_thread, thread_command)
10774         (thread_name_command): Use operator== instead of ptid_equal.
10775
10776 2017-04-10  Pedro Alves  <palves@redhat.com>
10777
10778         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10779         (current_thread_cleanup_chain): Delete.
10780         (restore_current_thread_cleanup_dtor)
10781         (make_cleanup_restore_current_thread): Remove references to
10782         current_thread_cleanup_chain.
10783
10784 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10785
10786         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10787         REG_UNKNOWN.
10788
10789 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10790
10791         PR gdb/19942
10792         * gdbthread.h (thread_info::deletable): New method.
10793         (thread_info::incref): New method.
10794         (thread_info::decref): New method.
10795         (thread_info::refcount): Move it to private.
10796         * infrun.c (save_stop_context): Call inc_refcount.
10797         (release_stop_context_cleanup): Likewise.
10798         * thread.c (set_thread_exited): New function.
10799         (init_thread_list): Delete "tp" only it is deletable, otherwise
10800         call set_thread_exited.
10801         (delete_thread_1): Call set_thread_exited.
10802         (current_thread_cleanup) <inferior_pid>: Remove.
10803         <thread>: New field.
10804         (restore_current_thread_ptid_changed): Removed.
10805         (do_restore_current_thread_cleanup): Adjust.
10806         (restore_current_thread_cleanup_dtor): Don't call
10807         find_thread_ptid.
10808         (set_thread_refcount): Use dec_refcount.
10809         (make_cleanup_restore_current_thread): Adjust.
10810         (thread_apply_all_command): Call inc_refcount.
10811         (_initialize_thread): Don't call
10812         observer_attach_thread_ptid_changed.
10813
10814 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10815
10816         * thread.c (delete_thread_1): Hoist code on marking thread as
10817         exited.
10818
10819 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10820
10821         * windows-nat.c (windows_detach): Initialize ptid with
10822         minus_one_ptid.
10823
10824 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10825
10826         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10827
10828 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10829
10830         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10831         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10832         (bfin_pseudo_register_write): Likewise
10833
10834 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10835
10836         * common/ptid.h (struct ptid): Change to...
10837         (class ptid_t): ... this.
10838         <ptid_t>: New constructors.
10839         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10840         matches>: New methods.
10841         <make_null, make_minus_one>: New static methods.
10842         <pid>: Rename to...
10843         <m_pid>: ...this.
10844         <lwp>: Rename to...
10845         <m_lwp>: ...this.
10846         <tid>: Rename to...
10847         <m_tid>: ...this.
10848         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10849         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10850         as references, move comment to class ptid_t.
10851         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10852         ptid_t static methods.
10853         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10854         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10855         Take ptid arguments as references, implement using ptid_t methods.
10856         * unittests/ptid-selftests.c: New file.
10857         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10858         unittests/ptid-selftests.c.
10859         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10860
10861 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10862
10863         * python/python.c (python_run_simple_file): Cast mode literal to
10864         non-const char pointer as expected by PyFile_FromString.
10865
10866 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10867
10868         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10869         minus_one_ptid and null_ptid.
10870
10871 2017-04-05  Pedro Alves  <palves@redhat.com>
10872
10873         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10874         * configure: Regenerate.
10875
10876 2017-04-05  Pedro Alves  <palves@redhat.com>
10877
10878         * ada-exp.y (yyerror): Constify.
10879         * ada-lang.c (bound_name, get_selections)
10880         (ada_variant_discrim_type)
10881         (ada_variant_discrim_name, ada_value_struct_elt)
10882         (ada_lookup_struct_elt_type, is_unchecked_variant)
10883         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10884         (catch_ada_exception_command_split)
10885         (catch_ada_assert_command_split, catch_assert_command)
10886         (ada_op_name): Constify.
10887         * ada-lang.h (ada_yyerror, get_selections)
10888         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10889         * arc-tdep.c (arc_print_frame_cache): Constify.
10890         * arm-tdep.c (arm_skip_stub): Constify.
10891         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10892         (gen_aggregate_elt_ref): Constify.
10893         * bcache.c (print_bcache_statistics): Constify.
10894         * bcache.h (print_bcache_statistics): Constify.
10895         * break-catch-throw.c (catch_exception_command_1):
10896         * breakpoint.c (struct ep_type_description::description):
10897         Constify.
10898         (add_solib_catchpoint): Constify.
10899         (catch_fork_command_1): Add cast.
10900         (add_catch_command): Constify.
10901         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10902         Constify.
10903         * bsd-uthread.c (bsd_uthread_state): Constify.
10904         * buildsym.c (patch_subfile_names): Constify.
10905         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10906         Constify.
10907         * c-exp.y (yyerror): Constify.
10908         (token::oper): Constify.
10909         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10910         * c-varobj.c (cplus_describe_child): Constify.
10911         * charset.c (find_charset_names): Add cast.
10912         (find_charset_names): Constify array and add const_cast.
10913         * cli/cli-cmds.c (complete_command, cd_command): Constify.
10914         (edit_command): Constify.
10915         * cli/cli-decode.c (lookup_cmd): Constify.
10916         * cli/cli-dump.c (dump_memory_command, dump_value_command):
10917         Constify.
10918         (struct dump_context): Constify.
10919         (add_dump_command, restore_command): Constify.
10920         * cli/cli-script.c (get_command_line): Constify.
10921         * cli/cli-script.h (get_command_line): Constify.
10922         * cli/cli-utils.c (check_for_argument): Constify.
10923         * cli/cli-utils.h (check_for_argument): Constify.
10924         * coff-pe-read.c (struct read_pe_section_data): Constify.
10925         * command.h (lookup_cmd): Constify.
10926         * common/print-utils.c (decimal2str): Constify.
10927         * completer.c (gdb_print_filename): Constify.
10928         * corefile.c (set_gnutarget): Constify.
10929         * cp-name-parser.y (yyerror): Constify.
10930         * cp-valprint.c (cp_print_class_member): Constify.
10931         * cris-tdep.c (cris_register_name, crisv32_register_name):
10932         Constify.
10933         * d-exp.y (yyerror): Constify.
10934         (struct token::oper): Constify.
10935         * d-lang.h (d_yyerror): Constify.
10936         * dbxread.c (struct header_file_location::name): Constify.
10937         (add_old_header_file, add_new_header_file, last_function_name)
10938         (dbx_next_symbol_text, add_bincl_to_list)
10939         (find_corresponding_bincl_psymtab, set_namestring)
10940         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10941         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10942         * defs.h (command_line_input, print_address_symbolic)
10943         (deprecated_readline_begin_hook): Constify.
10944         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10945         Constify.
10946         * event-top.c (handle_line_of_input): Constify and add cast.
10947         * exceptions.c (catch_errors): Constify.
10948         * exceptions.h (catch_errors): Constify.
10949         * expprint.c (print_subexp_standard, op_string, op_name)
10950         (op_name_standard, dump_raw_expression, dump_raw_expression):
10951         * expression.h (op_name, op_string, dump_raw_expression):
10952         Constify.
10953         * f-exp.y (yyerror): Constify.
10954         (struct token::oper): Constify.
10955         (struct f77_boolean_val::name): Constify.
10956         * f-lang.c (f_word_break_characters): Constify.
10957         * f-lang.h (f_yyerror): Constify.
10958         * fork-child.c (fork_inferior): Add cast.
10959         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10960         (new_variant): Constify.
10961         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10962         * gdbarch.c: Regenerate.
10963         * gdbcore.h (set_gnutarget): Constify.
10964         * go-exp.y (yyerror): Constify.
10965         (token::oper): Constify.
10966         * go-lang.h (go_yyerror): Constify.
10967         * go32-nat.c (go32_sysinfo): Constify.
10968         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10969         * guile/scm-cmd.c (cmdscm_function): Constify.
10970         * guile/scm-param.c (pascm_param_value): Constify.
10971         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10972         (h8300sx_register_name): Constify.
10973         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10974         Constify.
10975         * ia64-tdep.c (ia64_register_names): Constify.
10976         * infcmd.c (construct_inferior_arguments): Constify.
10977         (path_command, attach_post_wait): Constify.
10978         * language.c (show_range_command, show_case_command)
10979         (unk_lang_error): Constify.
10980         * language.h (language_defn::la_error)
10981         (language_defn::la_name_of_this): Constify.
10982         * linespec.c (decode_line_2): Constify.
10983         * linux-thread-db.c (thread_db_err_str): Constify.
10984         * lm32-tdep.c (lm32_register_name): Constify.
10985         * m2-exp.y (yyerror): Constify.
10986         * m2-lang.h (m2_yyerror): Constify.
10987         * m32r-tdep.c (m32r_register_names): Constify and make static.
10988         * m68hc11-tdep.c (m68hc11_register_names): Constify.
10989         * m88k-tdep.c (m88k_register_name): Constify.
10990         * macroexp.c (appendmem): Constify.
10991         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10992         (upgrade_type, parse_external, parse_partial_symbols)
10993         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10994         (new_symbol): Constify.
10995         * memattr.c (mem_info_command): Constify.
10996         * mep-tdep.c (register_name_from_keyword): Constify.
10997         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10998         Constify.
10999         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11000         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11001         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11002         cast.
11003         (mi_execute_async_cli_command): Constify.
11004         * mips-tdep.c (mips_register_name): Constify.
11005         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11006         (am33_register_name, am33_2_register_name)
11007         * moxie-tdep.c (moxie_register_names): Constify.
11008         * nat/linux-osdata.c (osdata_type): Constify fields.
11009         * nto-tdep.c (nto_parse_redirection): Constify.
11010         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11011         (lookup_child_selector): Constify.
11012         (objc_methcall::name): Constify.
11013         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11014         (lookup_struct_typedef): Constify.
11015         * objfiles.c (pc_in_section): Constify.
11016         * objfiles.h (pc_in_section): Constify.
11017         * p-exp.y (struct token::oper): Constify.
11018         (yyerror): Constify.
11019         * p-lang.h (pascal_yyerror): Constify.
11020         * parser-defs.h (op_name_standard): Constify.
11021         (op_print::string): Constify.
11022         (exp_descriptor::op_name): Constify.
11023         * printcmd.c (print_address_symbolic): Constify.
11024         * psymtab.c (print_partial_symbols): Constify.
11025         * python/py-breakpoint.c (stop_func): Constify.
11026         (bppy_get_expression): Constify.
11027         * python/py-cmd.c (cmdpy_completer::name): Constify.
11028         (cmdpy_function): Constify.
11029         * python/py-event.c (evpy_add_attribute)
11030         (gdbpy_initialize_event_generic): Constify.
11031         * python/py-event.h (evpy_add_attribute)
11032         (gdbpy_initialize_event_generic): Constify.
11033         * python/py-evts.c (add_new_registry): Constify.
11034         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11035         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11036         * python/py-inferior.c (get_buffer): Add cast.
11037         * python/py-param.c (parm_constant::name): Constify.
11038         * python/py-unwind.c (fprint_frame_id): Constify.
11039         * python/python.c (gdbpy_parameter_value): Constify.
11040         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11041         * remote.c (memory_packet_config::name): Constify.
11042         (show_packet_config_cmd, remote_write_bytes)
11043         (remote_buffer_add_string):
11044         * reverse.c (exec_reverse_once): Constify.
11045         * rs6000-tdep.c (variant::name, variant::description): Constify.
11046         * rust-exp.y (rustyyerror): Constify.
11047         * rust-lang.c (rust_op_name): Constify.
11048         * rust-lang.h (rustyyerror): Constify.
11049         * serial.h (serial_ops::name): Constify.
11050         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11051         (sh_sh3e_register_name, sh_sh2e_register_name)
11052         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11053         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11054         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11055         (sh_sh4al_dsp_register_name): Constify.
11056         * sh64-tdep.c (sh64_register_name): Constify.
11057         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11058         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11059         * stabsread.c (patch_block_stabs, read_type_number)
11060         (ref_map::stabs, ref_add, process_reference)
11061         (symbol_reference_defined, define_symbol, define_symbol)
11062         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11063         (read_one_struct_field, read_struct_fields, read_baseclasses)
11064         (read_tilde_fields, read_struct_type, read_array_type)
11065         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11066         (read_huge_number, read_range_type, read_args, common_block_start)
11067         (find_name_end): Constify.
11068         * stabsread.h (common_block_start, define_symbol)
11069         (process_one_symbol, symbol_reference_defined, ref_add):
11070         * symfile.c (get_section_index, add_symbol_file_command):
11071         * symfile.h (get_section_index): Constify.
11072         * target-descriptions.c (tdesc_type::name): Constify.
11073         (tdesc_free_type): Add cast.
11074         * target.c (find_default_run_target):
11075         (add_deprecated_target_alias, find_default_run_target)
11076         (target_announce_detach): Constify.
11077         (do_option): Constify.
11078         * target.h (add_deprecated_target_alias): Constify.
11079         * thread.c (print_thread_info_1): Constify.
11080         * top.c (deprecated_readline_begin_hook, command_line_input):
11081         Constify.
11082         (init_main): Add casts.
11083         * top.h (handle_line_of_input): Constify.
11084         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11085         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11086         (tfind_command): Rename to ...
11087         (tfind_command_1): ... this and constify.
11088         (tfind_command): New function.
11089         (tfind_end_command, tfind_start_command): Adjust.
11090         (encode_source_string): Constify.
11091         * tracepoint.h (encode_source_string): Constify.
11092         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11093         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11094         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11095         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11096         * tui/tui-win.c (parse_scrolling_args): Constify.
11097         * tui/tui-windata.c (tui_erase_data_content): Constify.
11098         * tui/tui-windata.h (tui_erase_data_content): Constify.
11099         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11100         * tui/tui.c (tui_enable): Add cast.
11101         * utils.c (defaulted_query): Constify.
11102         (init_page_info): Add cast.
11103         (puts_debug, subset_compare): Constify.
11104         * utils.h (subset_compare): Constify.
11105         * varobj.c (varobj_format_string): Constify.
11106         * varobj.h (varobj_format_string): Constify.
11107         * vax-tdep.c (vax_register_name): Constify.
11108         * windows-nat.c (windows_detach): Constify.
11109         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11110         * xml-support.c (gdb_xml_end_element): Constify.
11111         * xml-tdesc.c (tdesc_start_reg): Constify.
11112         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11113         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11114         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11115
11116 2017-04-05  Pedro Alves  <palves@redhat.com>
11117
11118         * proc-api.c (struct trans): Constify.
11119         (procfs_note): Constify.
11120         * proc-events.c (struct trans, syscall_table):
11121         * proc-flags.c (struct trans): Constify.
11122         * proc-utils.h (procfs_note): Constify.
11123         * proc-why.c (struct trans): Constify.
11124         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11125         (procfs_detach): Constify.
11126         * sol-thread.c (struct string_map): Constify.
11127         (td_err_string, td_state_string): Constify.
11128
11129 2017-04-05  Pedro Alves  <palves@redhat.com>
11130
11131         * proc-api.c (procfs_filename): Don't initialize
11132         procfs_filename.
11133         (prepare_to_trace): Assume procfs_filename is non-NULL.
11134         (_initialize_proc_api): Give procfs_filename a default value here.
11135
11136 2017-04-05  Pedro Alves  <palves@redhat.com>
11137
11138         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11139         'cond_string' parameter.
11140         (extract_exception_regexp): Constify 'string' parameter.
11141         (catch_exception_command_1): Constify.
11142         * breakpoint.c (init_catchpoint)
11143         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11144         parameter.
11145         (ep_parse_optional_if_clause, catch_fork_command_1)
11146         (catch_exec_command_1): Constify.
11147         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11148         parameter.
11149         (ep_parse_optional_if_clause): Constify.
11150         * cli/cli-utils.c (remove_trailing_whitespace)
11151         (check_for_argument): Constify.
11152         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11153         non-const overload.
11154         (check_for_argument): Likewise.
11155
11156 2017-04-05  Pedro Alves  <palves@redhat.com>
11157
11158         * event-top.c (command_line_handler): Add cast to execute_command
11159         call.
11160         * record-btrace.c (cmd_record_btrace_bts_start)
11161         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11162         (cmd_record_btrace_start): Add cast to execute_command call.
11163         * record-full.c (record_full_goto_insn):
11164         * record.c (record_start, record_stop): Add cast to
11165         execute_command_to_string calls.
11166         (cmd_record_start): Add cast to execute_command calls.
11167
11168 2017-04-05  Pedro Alves  <palves@redhat.com>
11169
11170         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11171         static inline function.
11172         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11173         array and use gdb_PyArg_ParseTupleAndKeywords.
11174         * python/py-cmd.c (cmdpy_init): Likewise.
11175         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11176         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11177         (infpy_search_memory): Likewise.
11178         * python/py-objfile.c (objfpy_add_separate_debug_file)
11179         (gdbpy_lookup_objfile): Likewise.
11180         * python/py-symbol.c (gdbpy_lookup_symbol)
11181         (gdbpy_lookup_global_symbol): Likewise.
11182         * python/py-type.c (gdbpy_lookup_type): Likewise.
11183         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11184         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11185         Likewise.
11186
11187 2017-04-05  Pedro Alves  <palves@redhat.com>
11188
11189         * python/python-internal.h (gdb_PyGetSetDef): New type.
11190         * python/py-block.c (block_object_getset)
11191         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11192         * python/py-event.c (event_object_getset)
11193         (finish_breakpoint_object_getset): Likewise.
11194         * python/py-inferior.c (inferior_object_getset): Likewise.
11195         * python/py-infthread.c (thread_object_getset): Likewise.
11196         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11197         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11198         * python/py-objfile.c (objfile_getset): Likewise.
11199         * python/py-progspace.c (pspace_getset): Likewise.
11200         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11201         Likewise.
11202         * python/py-record.c (recpy_record_getset): Likewise.
11203         * python/py-symbol.c (symbol_object_getset): Likewise.
11204         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11205         Likewise.
11206         * python/py-type.c (type_object_getset, field_object_getset):
11207         Likewise.
11208         * python/py-value.c (value_object_getset): Likewise.
11209
11210 2017-04-05  Pedro Alves  <palves@redhat.com>
11211
11212         * python/python-internal.h (gdb_PyObject_CallMethod)
11213         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11214         New functions.
11215         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11216         (PySys_GetObject, PySys_SetPath): New macros.
11217
11218 2017-04-05  Pedro Alves  <palves@redhat.com>
11219
11220         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11221         info_osdata_command.
11222         * osdata.c (info_osdata_command): Rename to ...
11223         (info_osdata): ... this.  Constify 'type' parameter, and remove
11224         the 'from_tty' parameter.  Accept NULL TYPE.
11225         (info_osdata_command): New function.
11226         * osdata.h (info_osdata_command): Remove declaration.
11227         (info_osdata): New declaration.
11228
11229 2017-04-05  Pedro Alves  <palves@redhat.com>
11230
11231         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11232         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11233         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11234         parameter.
11235         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11236         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11237         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11238         parameter.
11239         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11240         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11241         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11242         (mi_cmd_file_list_exec_source_files)
11243         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11244         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11245         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11246         parameter.
11247         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11248         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11249         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11250         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11251         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11252         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11253         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11254         'command' parameter.
11255         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11256         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11257         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11258         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11259         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11260         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11261         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11262         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11263         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11264         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11265         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11266         parameter.
11267         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11268         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11269         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11270         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11271         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11272         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11273         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11274         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11275         (mi_cmd_data_list_changed_registers)
11276         (mi_cmd_data_write_register_values)
11277         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11278         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11279         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11280         (mi_cmd_list_features, mi_cmd_list_target_features)
11281         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11282         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11283         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11284         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11285         (mi_cmd_trace_frame_collected): Constify 'command'
11286         parameter.
11287         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11288         'command' parameter.
11289
11290 2017-04-05  Pedro Alves  <palves@redhat.com>
11291
11292         * ada-lang.c (ada_completer_word_break_characters): Now a const
11293         array.
11294         (ada_get_gdb_completer_word_break_characters): Constify.
11295         * completer.c (gdb_completer_command_word_break_characters)
11296         (gdb_completer_file_name_break_characters)
11297         (gdb_completer_quote_characters): Now const arrays.
11298         (get_gdb_completer_quote_characters): Constify.
11299         (set_rl_completer_word_break_characters): New function.
11300         (set_gdb_completion_word_break_characters)
11301         (complete_line_internal): Use it.
11302         * completer.h (get_gdb_completer_quote_characters): Constify.
11303         (set_rl_completer_word_break_characters): Declare.
11304         * f-lang.c (f_word_break_characters): Constify.
11305         * language.c (default_word_break_characters): Constify.
11306         * language.h (language_defn::la_word_break_characters): Constify.
11307         (default_word_break_characters): Constify.
11308         * top.c (init_main): Use set_rl_completer_word_break_characters.
11309
11310 2017-04-05  Pedro Alves  <palves@redhat.com>
11311
11312         * aix-thread.c (aix_thread_pid_to_str)
11313         (aix_thread_extra_thread_info): Constify.
11314         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11315         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11316         (bsd_uthread_pid_to_str): Constify.
11317         * corelow.c (core_pid_to_str): Constify.
11318         * darwin-nat.c (darwin_pid_to_str): Constify.
11319         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11320         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11321         Constify.
11322         * gnu-nat.c (gnu_pid_to_str): Constify.
11323         * go32-nat.c (go32_pid_to_str): Constify.
11324         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11325         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11326         * inferior.c (inferior_pid_to_str): Constify.
11327         * linux-nat.c (linux_nat_pid_to_str): Constify.
11328         * linux-tdep.c (linux_core_pid_to_str): Constify.
11329         * linux-thread-db.c (thread_db_pid_to_str)
11330         (thread_db_extra_thread_info): Constify.
11331         * nto-tdep.c (nto_extra_thread_info): Constify.
11332         * nto-tdep.h (nto_extra_thread_info): Constify.
11333         * obsd-nat.c (obsd_pid_to_str): Constify.
11334         * procfs.c (procfs_pid_to_str): Constify.
11335         * ravenscar-thread.c (ravenscar_extra_thread_info)
11336         (ravenscar_pid_to_str): Constify.
11337         * remote-sim.c (gdbsim_pid_to_str): Constify.
11338         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11339         Constify.
11340         * sol-thread.c (solaris_pid_to_str): Constify.
11341         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11342         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11343         * target.c (default_pid_to_str, target_pid_to_str)
11344         (normal_pid_to_str, default_pid_to_str): Constify.
11345         * target.h (target_ops::to_pid_to_str)
11346         (target_ops::to_extra_thread_info): Constify.
11347         (target_pid_to_str, normal_pid_to_str): Constify.
11348         * windows-nat.c (windows_pid_to_str): Constify.
11349         * gdbarch.sh (core_pid_to_str): Constify.
11350         * target-delegates.c: Regenerate.
11351         * gdbarch.h, gdbarch.c: Regenerate.
11352
11353 2017-04-05  Pedro Alves  <palves@redhat.com>
11354
11355         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11356         the memory of the temporary warning_pre_print override.
11357         * utils.c (warning_pre_print): Constify.
11358         * utils.h (warning_pre_print): Constify.
11359
11360 2017-04-05  Pedro Alves  <palves@redhat.com>
11361
11362         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11363         (shell_command): New function.
11364         (make_command): Use std::string.
11365         (init_cli_cmds): Register shell_command instead of shell_escape.
11366
11367 2017-04-05  Pedro Alves  <palves@redhat.com>
11368
11369         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11370         * tracepoint.c (default_collect): Don't initialize.
11371
11372 2017-04-05  Pedro Alves  <palves@redhat.com>
11373
11374         * macroexp.c (macro_buffer::shared): Now a bool.
11375         (init_buffer): Update.
11376         (init_shared_buffer): Constify 'addr' parameter.
11377         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11378         casts.
11379
11380 2017-04-05  Pedro Alves  <palves@redhat.com>
11381
11382         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11383         * disasm.c (set_disassembler_options): Constify local.
11384         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11385
11386 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11387
11388         PR gdb/21352
11389         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11390         option.
11391
11392 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11393
11394         * frame.c (frame_unwind_register_unsigned): Call
11395         frame_unwind_register_value.
11396
11397 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11398
11399         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11400         Use gdb_test_multiple, and don't match anchor.
11401
11402 2017-04-05  Pedro Alves  <palves@redhat.com>
11403
11404         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11405         (Write After Approval): Remove Simon Marchi.
11406
11407 2017-04-05  Pedro Alves  <palves@redhat.com>
11408
11409         * common/gdb_optional.h (optional::optional): Make constexpr and
11410         initialize m_dummy.
11411
11412 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11413
11414         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11415         (amd64fbsd_jmp_buf_reg_offset): Remove.
11416         (amd64fbsd_supply_uthread): Remove function.
11417         (amd64fbsd_collect_uthread): Remove function.
11418         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11419         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11420         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11421         (fbsd-nat.c): Update comment.
11422         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11423         (i386fbsd_jmp_buf_reg_offset): Remove.
11424         (i386fbsd_supply_uthread): Remove function.
11425         (i386fbsd_collect_uthread): Remove function.
11426         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11427
11428 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11429
11430         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11431         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11432         * NEWS: Mention that support for FreeBSD/alpha was removed.
11433         * alpha-fbsd-tdep.c: Delete file.
11434         * config/alpha/fbsd.mh: Delete file.
11435         * configure.host: Delete alpha*-*-freebsd* and
11436         alpha*-*-kfreebsd*-gnu.
11437         * configure.tgt: Delete alpha*-*-freebsd* and
11438         alpha*-*-kfreebsd*-gnu.
11439
11440 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11441
11442         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11443         amd64bsd_store_inferior_registers): Use ptid from regcache.
11444
11445 2017-04-04  Pedro Alves  <palves@redhat.com>
11446
11447         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11448         data fields, make them private and add "m_" prefixes.
11449         (lnp_state_machine::lnp_state_machine): New ctor.
11450         (record_line, check_line_address, handle_set_discriminator)
11451         (handle_set_address, handle_advance_pc, handle_special_opcode)
11452         (handle_advance_line, handle_set_file, handle_negate_stmt)
11453         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11454         (end_sequence, advance_line): New methods.
11455         (m_gdbarch, m_record_lines_p): New fields.
11456         (lnp_reader_state): Delete.
11457         (dwarf_record_line): Rename to ...
11458         (lnp_state_machine::record_line): ... adjust.
11459         (init_lnp_state_machine): Delete.
11460         (lnp_state_machine::lnp_state_machine): New.
11461         (check_line_address): Rename to ...
11462         (lnp_state_machine::check_line_address): This.
11463         (dwarf_decode_lines_1): Remove reference to "reader_state".
11464         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11465         State machine internal state manipulation moved to
11466         lnp_state_machine methods.
11467
11468 2017-04-04  Pedro Alves  <palves@redhat.com>
11469
11470         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11471         unittests/offset-type-selftests.c.
11472         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11473         * common/offset-type.h: New file.
11474         * common/preprocessor.h: New file.
11475         * common/traits.h: New file.
11476         * common/valid-expr.h: New file.
11477         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11478         sect_offset and cu_offset strong typedefs throughout.
11479         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11480         typedefs throughout.
11481         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11482         sect_offset and cu_offset strong typedefs throughout.
11483         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11484         typedefs throughout.
11485         * gdbtypes.h: Include "common/offset-type.h".
11486         (cu_offset): Now an offset type (strong typedef) instead of a
11487         struct.
11488         (sect_offset): Likewise.
11489         (union call_site_parameter_u): Rename "param_offset" field to
11490         "param_cu_off".
11491         * unittests/offset-type-selftests.c: New file.
11492
11493 2017-04-04  Pedro Alves  <palves@redhat.com>
11494
11495         * common/underlying.h: New file.
11496         * dwarf2read.c: Include "common/gdb_optional.h" and
11497         "common/underlying.h".
11498         (dir_index, file_name_index): New types.
11499         (file_entry): Use them.
11500         (file_entry::include): Use to_underlying.
11501         (line_header::add_file_name): Use dir_index.
11502         (read_formatted_entries): Use gdb::optional.  Read form before
11503         writting to file_entry.
11504         (dwarf_decode_line_header): Use dir_index.
11505         (lnp_state_machine::current_file): Use to_underlying.
11506         (lnp_state_machine::file): Change type to file_name_index.
11507         (dwarf_record_line): Use to_underlying.
11508         (init_lnp_state_machine): Use file_name_index.
11509         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11510
11511 2017-04-04  Pedro Alves  <palves@redhat.com>
11512
11513         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11514         operator bool, has_value and get methods.
11515
11516 2017-04-04  Pedro Alves  <palves@redhat.com>
11517
11518         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11519         fields.
11520         (line_header): Initialize all data fields.  Change type of
11521         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11522         Change type of include_dirs to std::vector<const char *>.  Remove
11523         num_include_dirs, include_dirs_size.  Change type of file_names to
11524         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11525         (line_header::line_header): New.
11526         (line_header::add_include_dir, line_header::add_file_name): New
11527         methods.
11528         (line_header::include_dir_at): Remove NULL check.
11529         (line_header::file_name_at): Add const overload.
11530         (line_header_up): New unique_ptr typedef.
11531         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11532         std::vector.  Remove free_line_header call.
11533         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11534         free_line_header call.
11535         (free_cu_line_header): Delete.
11536         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11537         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11538         Adjust to use std::vector.
11539         (free_line_header): Delete.
11540         (free_line_header_voidp): Use delete.
11541         (add_include_dir): Replace with ...
11542         (line_header::add_include_dir): ... this method.  Use std::vector.
11543         (add_file_name): Replace with ...
11544         (line_header::add_file_name): ... this method.  Use std::vector.
11545         (add_include_dir_stub): Delete.
11546         (read_formatted_entries): Remove memset.
11547         (dwarf_decode_line_header): Return a line_header_up instead of a
11548         raw pointer.  Remove cleanup handling.  Pass lambdas to
11549         read_formatted_entries.  Adjust to use line_header methods.
11550         (dwarf_decode_lines_1): Adjust to use line_header methods.
11551         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11552         use std::vector.
11553
11554 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11555
11556         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11557         instead of struct ptid.
11558
11559 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11560
11561         * frame.c (get_frame_register_bytes): Unwind using value.
11562         (put_frame_register_bytes): Likewise.
11563
11564 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11565
11566         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11567         aggregate-like.
11568
11569 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11570
11571         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11572
11573 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11574
11575         * gdbthread.h (struct thread_info): Declare constructor and
11576         destructor.  Add some in-class member initializers.
11577         * thread.c (free_thread): Remove.
11578         (init_thread_list): Call delete instead of free_thread.
11579         (new_thread): Call thread_info constructor.
11580         (thread_info::thread_info): New function.
11581         (thread_info::~thread_info): New function.
11582         (delete_thread_1): Call delete instead of free_thread.
11583         (make_cleanup_restore_current_thread): Move tp and frame to
11584         inner block.
11585
11586 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11587
11588         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11589         (arc_skip_prologue): Likewise.
11590         (arc_make_frame_cache): Likewise.
11591         (arc_pv_get_operand): New function.
11592         (arc_is_in_prologue): Likewise.
11593         (arc_analyze_prologue): Likewise.
11594         (arc_print_frame_cache): Likewise.
11595         (MAX_PROLOGUE_LENGTH): New constant.
11596
11597 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11598
11599         * configure.tgt: Add arc-insn.o.
11600         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11601         (dump_arc_instruction_command): New function.
11602         (arc_fprintf_disasm): Likewise.
11603         (arc_disassemble_info): Likewise.
11604         (arc_insn_get_operand_value): Likewise.
11605         (arc_insn_get_operand_value_signed): Likewise.
11606         (arc_insn_get_memory_base_reg): Likewise.
11607         (arc_insn_get_memory_offset): Likewise.
11608         (arc_insn_get_branch_target): Likewise.
11609         (arc_insn_dump): Likewise.
11610         (arc_insn_get_linear_next_pc): Likewise.
11611         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11612         (arc_disassemble_info): Likewise.
11613         (arc_insn_get_branch_target): Likewise.
11614         (arc_insn_get_linear_next_pc): Likewise.
11615         * NEWS: Mention new "maint print arc arc-instruction".
11616
11617 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11618
11619         * arc-tdep (maintenance_print_arc_list): New variable.
11620         (maintenance_print_arc_command): New function.
11621
11622 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11623
11624         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11625         Add "limm" and "reserved".
11626         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11627         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11628         * arc-tdep.h (arc_regnum): Likewise.
11629
11630 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11631
11632         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11633         for THREADPTR register.
11634         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11635         register.
11636         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11637         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11638         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11639
11640 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11641
11642         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11643         registers above gdbarch_num_regs (gdbarch) as privileged in
11644         call0 ABI.
11645
11646 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11647
11648         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11649         for a single specified register or for all registers in
11650         a0_base..a0_base + C0_NREGS range.
11651         (supply_gregset_reg): Call regcache_raw_supply for a single
11652         specified register or for all registers in a0_base..a0_base +
11653         C0_NREGS range.
11654
11655 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11656
11657         * arch/xtensa.h (C0_NREGS): Add definition.
11658         * xtensa-tdep.c (C0_NREGS): Remove definition.
11659
11660 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11661
11662         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11663         Drop xtensa_default_isa initialization.
11664         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11665
11666 2017-03-27  Pedro Alves  <palves@redhat.com>
11667
11668         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11669         (file_entry::include_dir): New method.
11670         (line_header::include_dir_at, line_header::file_name_at): New
11671         methods.
11672         (setup_type_unit_groups, setup_type_unit_groups)
11673         (psymtab_include_file_name): Simplify using the new methods.
11674         (lnp_state_machine) <the_line_header>: New field.
11675         <file>: Add comment.
11676         (lnp_state_machine::current_file): New method.
11677         (dwarf_record_line): Simplify using the new methods.
11678         (init_lnp_state_machine): Initialize the "the_line_header" field.
11679         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11680         Simplify using the new methods.
11681
11682 2017-03-27  Pedro Alves  <palves@redhat.com>
11683
11684         * cp-name-parser.y (make_empty): Delete.
11685         (demangler_special, nested_name, ptr_operator, array_indicator)
11686         (direct_declarator, declarator_1): Use fill_comp instead of
11687         make_empty.
11688
11689 2017-03-27  Pedro Alves  <palves@redhat.com>
11690
11691         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11692         to ATTRIBUTE_PRINTF.
11693         * solib-target.c (library_list_start_list): Print "string" not
11694         "version".
11695         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11696         gdb_xml_error call.
11697
11698 2017-03-27  Pedro Alves  <palves@redhat.com>
11699
11700         * dwarf2read.c (struct file_and_directory): New.
11701         (dwarf2_get_dwz_file): Adjust to use std::string.
11702         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11703         (find_file_and_directory): Adjust to return a file_and_directory
11704         object.
11705         (read_file_scope): Adjust to use file_and_directory.  Remove
11706         make_cleanup/do_cleanups calls.
11707         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11708         make_cleanup/do_cleanups calls.
11709         * python/python.c (do_start_initialization): Adjust to ldirname
11710         returning a std::string.
11711         * utils.c (ldirname): Now returns a std::string.
11712         * utils.h (ldirname): Change return type to std::string.
11713         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11714         returning a std::string.
11715         * xml-tdesc.c (file_read_description_xml): Likewise.
11716
11717 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11718
11719         * regcache.c (regcache_debug_print_register): New function.
11720         * regcache.h (regcache_debug_print_register): New declaration.
11721         * target.c (debug_print_register): Remove.
11722         (target_fetch_registers): Call regcache_debug_print_register.
11723         (target_store_registers): Likewise.
11724
11725 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11726
11727         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11728         reference beyond the 'lh->include_dirs' array before accessing to
11729         it.
11730         (psymtab_include_file_name): Likewise.
11731         (dwarf_decode_lines_1): Likewise.
11732         (dwarf_decode_lines): Likewise.
11733         (file_file_name): Likewise.
11734
11735 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11736
11737         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11738         inferior_ptid.
11739         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11740         ps_lsetfpregs): Likewise.
11741         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11742         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11743         ps_lsetfpregs): Likewise.
11744         * target.c (target_fetch_registers, target_store_registers):
11745         Remove asserts.
11746
11747 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11748
11749         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11750
11751 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11752
11753         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11754         (_initialize_aarch64_tdep): Register it.
11755         (aarch64_record_load_store): Handle PRFM instruction.
11756         (aarch64_process_record_test): New function.
11757
11758 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11759
11760         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11761         indentation.
11762
11763 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11764
11765         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11766
11767 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11768
11769         python/python.c (do_start_initialization): Fix memory leak.
11770
11771 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11772
11773         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11774         using get_ptrace_pid.
11775         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11776         inferior_ptid.
11777         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11778         inferior_ptid instead of pid.
11779
11780 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11781
11782         * aarch64-tdep.c: Wrap locally used classes in anonymous
11783         namespace.
11784         * arm-tdep.c: Likewise.
11785         * linespec.c: Likewise.
11786         * ui-out.c: Likewise.
11787
11788 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11789
11790         PR gdb/19637
11791         * python/lib/gdb/printer/bound_registers.py: Import sys.
11792
11793 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11794
11795         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11796         windows_thread_info parameter and use it instead of
11797         current_thread.
11798         (windows_fetch_inferior_registers): Don't set current_thread,
11799         pass the thread to do_windows_fetch_inferior_registers.  Use
11800         ptid from regcache instead of inferior_ptid.
11801         (do_windows_store_inferior_registers): Add windows_thread_info
11802         parameter and use it instead of current_thread.
11803         (windows_store_inferior_registers): Don't set current_thread,
11804         pass the thread to do_windows_store_inferior_registers.  Use
11805         ptid from regcache instead of inferior_ptid.
11806
11807 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11808
11809         * ser-mingw.c (ser_windows_raw): Remove reference to
11810         struct serial::current_timeout.
11811
11812 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11813
11814         PR tdep/20928
11815         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11816         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11817         (sparc64_fsr_type): Fix %fsr decoding.
11818
11819 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11820
11821         * python/py-record-btrace.c (btpy_insn_data): Change return type
11822         for Python 2.
11823
11824 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11825
11826         * spu-linux-nat.c (spu_fetch_inferior_registers,
11827         spu_store_inferior_registers): Use ptid from regcache, set and
11828         restore inferior_ptid.
11829         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11830         Likewise.
11831
11832 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11833
11834         * i386-linux-nat.c (fetch_register, store_register,
11835         i386_linux_fetch_inferior_registers,
11836         i386_linux_store_inferior_registers): Use ptid from regcache.
11837         * ia64-linux-nat.c (ia64_linux_fetch_register,
11838         ia64_linux_store_register): Likewise.
11839         * inf-ptrace.c (inf_ptrace_fetch_register,
11840         inf_ptrace_store_register): Likewise.
11841         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11842         m32r_linux_store_inferior_registers): Likewise.
11843         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11844         m68kbsd_store_inferior_registers): Likewise.
11845         * m68k-linux-nat.c (fetch_register, store_register,
11846         m68k_linux_fetch_inferior_registers,
11847         m68k_linux_store_inferior_registers): Likewise.
11848         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11849         m88kbsd_store_inferior_registers): Likewise.
11850         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11851         mips_fbsd_store_inferior_registers): Likewise.
11852         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11853         mips64_linux_regsets_store_registers): Likewise.
11854         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11855         mipsnbsd_store_inferior_registers): Likewise.
11856         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11857         mips64obsd_store_inferior_registers): Likewise.
11858         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11859         Likewise.
11860         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11861         ppcfbsd_store_inferior_registers): Likewise.
11862         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11863         ppc_linux_store_inferior_registers): Likewise.
11864         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11865         ppcnbsd_store_inferior_registers): Likewise.
11866         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11867         ppcobsd_store_registers): Likewise.
11868         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11869         Likewise.
11870         * ravenscar-thread.c (ravenscar_fetch_registers,
11871         ravenscar_store_registers, ravenscar_prepare_to_store):
11872         Likewise.
11873         * record-btrace.c (record_btrace_fetch_registers,
11874         record_btrace_store_registers, record_btrace_prepare_to_store):
11875         Likewise.
11876         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11877         Lookup inferior using ptid from regcache, instead of
11878         current_inferior.
11879         * remote.c (remote_fetch_registers, remote_store_registers): Use
11880         ptid from regcache.
11881         * rs6000-nat.c (fetch_register, store_register): Likewise.
11882         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11883         s390_linux_store_inferior_registers): Likewise.
11884         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11885         shnbsd_store_inferior_registers): Likewise.
11886         * sol-thread.c (sol_thread_fetch_registers,
11887         sol_thread_store_registers): Likewise.
11888         * sparc-nat.c (sparc_fetch_inferior_registers,
11889         sparc_store_inferior_registers): Likewise.
11890         * tilegx-linux-nat.c (fetch_inferior_registers,
11891         store_inferior_registers): Likewise.
11892         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11893         vaxbsd_store_inferior_registers): Likewise.
11894         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11895         store_xtregs): Likewise.
11896
11897 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11898
11899         PR gdb/14441
11900         * NEWS: Mention support for rvalue references in GDB and python.
11901         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11902         supports both lvalue and rvalue references.
11903
11904 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11905
11906         PR gdb/14441
11907         * gdbtypes.c (rank_one_type): Implement overloading
11908         resolution rules regarding rvalue references.
11909
11910 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11911
11912         PR gdb/14441
11913         * aarch64-tdep.c (aarch64_type_align)
11914         (aarch64_extract_return_value, aarch64_store_return_value): Change
11915         lvalue reference type checks to general reference type checks.
11916         * amd64-tdep.c (amd64_classify): Likewise.
11917         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11918         Likewise.
11919         * arm-tdep.c (arm_type_align, arm_extract_return_value)
11920         (arm_store_return_value): Likewise.
11921         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11922         * c-typeprint.c (c_print_type): Likewise.
11923         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11924         (cplus_number_of_children, cplus_describe_child): Likewise.
11925         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11926         * completer.c (expression_completer): Likewise.
11927         * cp-support.c (make_symbol_overload_list_adl_namespace):
11928         Likewise.
11929         * darwin-nat-info.c (info_mach_region_command): Likewise.
11930         * dwarf2loc.c (entry_data_value_coerce_ref)
11931         (value_of_dwarf_reg_entry): Likewise.
11932         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11933         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11934         Likewise.
11935         * findvar.c (extract_typed_address, store_typed_address):
11936         Likewise.
11937         * gdbtypes.c (rank_one_type): Likewise.
11938         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11939         * infcall.c (value_arg_coerce): Likewise.
11940         * language.c (pointer_type): Likewise.
11941         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11942         Likewise.
11943         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11944         * mn10300-tdep.c (mn10300_type_align): Likewise.
11945         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11946         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11947         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11948         Likewise.
11949         * printcmd.c (print_formatted, x_command): Likewise.
11950         * python/py-type.c (typy_get_composite, typy_template_argument):
11951         Likewise.
11952         * python/py-value.c (valpy_referenced_value)
11953         (valpy_get_dynamic_type, value_has_field): Likewise.
11954         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11955         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11956         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11957         * spu-tdep.c (spu_scalar_value_p): Likewise.
11958         * symtab.c (lookup_symbol_aux): Likewise.
11959         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11960         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11961         Likewise.
11962         * valops.c (value_cast_pointers, value_cast)
11963         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11964         (value_struct_elt, value_struct_elt_bitpos)
11965         (value_find_oload_method_list, find_overload_match)
11966         (value_rtti_indirect_type): Likewise.
11967         * valprint.c (val_print_scalar_type_p, generic_val_print):
11968         Likewise.
11969         * value.c (value_actual_type, value_as_address, unpack_long)
11970         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11971         (coerce_ref): Likewise.
11972         * varobj.c (varobj_get_value_type): Likewise.
11973
11974 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11975
11976         PR gdb/14441
11977         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11978         table of constants.
11979         * python/lib/gdb/command/explore.py: Support exploring values
11980         of rvalue reference types.
11981         * python/lib/gdb/types.py: Implement get_basic_type() for
11982         rvalue reference types.
11983         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11984         constant.
11985         * python/py-value.c (valpy_getitem): Add an rvalue reference
11986         check.
11987         (valpy_reference_value): Add new parameter "refcode".
11988         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11989         New wrappers for valpy_reference_value().
11990         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11991         (gdbpy_invoke_xmethod): Likewise.
11992
11993 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11994
11995         PR gdb/14441
11996         * dwarf2read.c (process_die, read_type_die_1): Handle the
11997         DW_TAG_rvalue_reference_type DIE.
11998         (read_tag_reference_type): Add new parameter "refcode".
11999
12000 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12001
12002         PR gdb/14441
12003         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12004         (c_type_print_modifier, c_type_print_varspec_suffix)
12005         (c_type_print_base): Support printing rvalue reference types.
12006         * c-valprint.c (c_val_print, c_value_print): Support printing
12007         rvalue reference values.
12008
12009 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12010
12011         PR gdb/14441
12012         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12013         typename.
12014         * cp-support.c (replace_typedefs): Handle
12015         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12016         * python/py-type.c (typy_lookup_type): Likewise.
12017
12018 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12019
12020         PR gdb/14441
12021         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12022         * parse.c (insert_type): Change assert statement.
12023         (follow_types): Handle rvalue reference types.
12024         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12025         constant.
12026
12027 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12028
12029         PR gdb/14441
12030         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12031         value_ref() interface.
12032         * c-valprint.c (c_value_print): Likewise.
12033         * infcall.c (value_arg_coerce): Likewise.
12034         * python/py-value.c (valpy_reference_value): Likewise.
12035         * valops.c (value_cast, value_reinterpret_cast)
12036         (value_dynamic_cast, typecmp): Likewise.
12037         (value_ref): Parameterize by kind of return value reference type.
12038         * value.h (value_ref): Add new parameter "refcode".
12039
12040 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12041
12042         PR gdb/14441
12043         * dwarf2read.c (read_tag_reference_type): Use
12044         lookup_lvalue_reference_type() instead of lookup_reference_type().
12045         * eval.c (evaluate_subexp_standard): Likewise.
12046         * f-exp.y: Likewise.
12047         * gdbtypes.c (make_reference_type, lookup_reference_type):
12048         Generalize with rvalue reference types.
12049         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12050         convenience wrappers for lookup_reference_type().
12051         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12052         reference kind parameter.
12053         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12054         wrappers for lookup_reference_type().
12055         * guile/scm-type.c (gdbscm_type_reference): Use
12056         lookup_lvalue_reference_type() instead of lookup_reference_type().
12057         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12058         * parse.c (follow_types): Likewise.
12059         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12060         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12061         Likewise.
12062         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12063         (gdbpy_invoke_xmethod): Likewise.
12064         * stabsread.c: Provide extra argument to make_reference_type()
12065         call.
12066         * valops.c (value_ref, value_rtti_indirect_type): Use
12067         lookup_lvalue_reference_type() instead of lookup_reference_type().
12068
12069 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12070
12071         PR gdb/14441
12072         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12073         (TYPE_IS_REFERENCE): New macro.
12074         (struct type): Add rvalue_reference_type field.
12075         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12076
12077 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12078
12079         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12080         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12081         New function definition.
12082         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12083         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12084         New function declaration.
12085         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12086         * mi/mi-interp.h: New file.
12087         * solib.c (info_sharedlibrary_command): Replace for loop with
12088         ALL_SO_LIBS macro
12089         * solib.h (update_solib_list): New function declaration.
12090         (so_list_head): Move macro.
12091         * solist.h (ALL_SO_LIBS): New macro.
12092
12093 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12094
12095         * infcmd.c (post_create_inferior): Remove unused argument in
12096         call to solib_add.
12097         * remote.c (remote_start_remote): Likewise.
12098         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12099         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12100         (enable_break): Likewise.
12101         * solib.c (update_solib_list): Remove unused target argument
12102         and its documentation.
12103         (solib_add): Remove unused target argument.  Remove unused
12104         argument in call to update_solib_list.
12105         (info_sharedlibrary_command): Remove unused argument in call
12106         to update_solib_list.
12107         (sharedlibrary_command): Remove unused argument in call to
12108         solib_add.
12109         (handle_solib_event): Likewise.
12110         (reload_shared_libraries): Likewise.
12111         * solib.h (solib_add): Remove unused target argument.
12112
12113 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12114
12115         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12116         (s390_displaced_step_fixup): Cover relative branches with the
12117         default fixup handling.  This fixes lack of support for some
12118         relative branch instructions.
12119
12120 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12121
12122         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12123         ptid from regcache.
12124
12125 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12126
12127         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12128         i386_darwin_store_inferior_registers): Use ptid from regcache.
12129
12130 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12131
12132         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12133         i386bsd_store_inferior_registers): Use ptid from regcache.
12134
12135 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12136
12137         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12138         hppaobsd_store_registers): Use ptid from regcache.
12139
12140 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12141
12142         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12143         hppanbsd_store_registers): Use ptid from regcache.
12144
12145 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12146
12147         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12148         from regcache.  Use get_ptrace_pid.
12149
12150 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12151
12152         * corelow.c (get_core_register_section): Use ptid from regcache,
12153         update doc.
12154
12155 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12156
12157         * bsd-uthread.c (bsd_uthread_fetch_registers,
12158         bsd_uthread_store_registers): Use ptid from regcache, set and
12159         restore inferior_ptid.
12160
12161 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12162
12163         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12164         fetch_fp_regs, store_register, store_regs, store_fp_register,
12165         store_fp_regs): Use ptid from regcache.
12166
12167 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12168
12169         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12170         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12171         store_vfp_regs): Use ptid from regcache.
12172
12173 2017-03-17  Pedro Alves  <palves@redhat.com>
12174
12175         PR remote/21188
12176         * ser-base.c (ser_base_wait_for): Add comment.
12177         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12178         version.
12179         * ser-unix.c (hardwire_raw): Remove reference to
12180         scb->current_timeout.
12181         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12182         (hardwire_ops): Install ser_base_readchar instead of
12183         hardwire_readchar.
12184         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12185         Remove fields.
12186
12187 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12188
12189         PR gdb/19637
12190         * python/lib/gdb/printer/bound_registers.py: Add support for
12191         Python 3.
12192
12193 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12194
12195         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12196         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12197         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12198         byte_offset to subobj_byte_offset.  Fix the handling of
12199         DWARF_VALUE_STACK on big-endian targets when coming via an
12200         implicit pointer.
12201         (dwarf2_evaluate_loc_desc): Adjust call to
12202         dwarf2_evaluate_loc_desc_full.
12203         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12204         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12205
12206 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12207
12208         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12209         and REVSH instructions.
12210
12211 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12212
12213         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12214         (arm_record_test): Declare.
12215         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12216         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12217         align with the manual.
12218         (thumb_record_misc): Adjust the code order to align with the
12219         manual.
12220         (thumb2_record_decode_insn_handler): Fix instruction matching.
12221         (instruction_reader_thumb): New class.
12222         (arm_record_test): New function.
12223
12224 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12225
12226         * arm-tdep.c (abstract_memory_reader): New class.
12227         (instruction_reader): New class.
12228         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12229         (decode_insn): Likewise.
12230
12231 2017-03-16  Doug Evans  <dje@google.com>
12232
12233         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12234         member.  Change type of TYPE member to SCM.  All uses updated.
12235         (lsscm_make_lazy_string_smob): Add assert.
12236         (lsscm_make_lazy_string): Flag bad length values.
12237         (lsscm_elt_type): New function.
12238         (gdbscm_lazy_string_to_value): Rewrite to use
12239         lsscm_safe_lazy_string_to_value.
12240         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12241         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12242         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12243         in incoming type.
12244         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12245         * guile/scm-type.c (tyscm_scm_to_type): New function.
12246
12247 2017-03-15  Doug Evans  <dje@google.com>
12248
12249         PR python/17728, python/18439, python/18779
12250         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12251         member.  Change type of TYPE member to PyObject *.  All uses updated.
12252         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12253         (gdbpy_create_lazy_string_object): Flag bad length values.
12254         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12255         Handle typedefs in incoming type.
12256         (stpy_lazy_string_elt_type): New function.
12257         (gdbpy_extract_lazy_string): Call it.
12258         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12259         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12260         typedefs in incoming type.
12261
12262 2017-03-16  Doug Evans  <dje@google.com>
12263
12264         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12265         * guile/scm-type.c (tyscm_scm_to_type): New function.
12266
12267 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12268
12269         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12270         "ULONGEST" for "skip".
12271
12272 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12273
12274         PR gdb/21220
12275         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12276         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12277         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12278         over ptrace peek/poke until end of buffer or error.
12279
12280 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12281
12282         * parse.c (length_of_subexp): Make static.
12283         * parser-defs.h (length_of_subexp): Remove.
12284
12285 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12286
12287         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12288         as well.
12289
12290 2017-03-14  Pedro Alves  <palves@redhat.com>
12291
12292         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12293         (main): Use std::unique_ptr.  Remove calls to
12294         cp_demangled_name_parse_free.
12295
12296 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12297
12298         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12299         alphabsd_store_inferior_registers): Use regcache->ptid instead
12300         of inferior_ptid.
12301
12302 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12303
12304         * aix-thread.c (aix_thread_fetch_registers,
12305         aix_thread_store_registers): Use regcache->ptid instead of
12306         inferior_ptid.
12307
12308 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12309
12310         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12311         store_gregs_to_thread, fetch_fpregs_from_thread,
12312         store_fpregs_to_thread): Use regcache->ptid instead of
12313         inferior_ptid.
12314
12315 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12316
12317         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12318         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12319         instead of inferior_ptid.
12320
12321 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12322
12323         * target.c (target_fetch_registers, target_store_registers): Add
12324         assert.
12325
12326 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12327
12328         * regcache.h (regcache_get_ptid): New function.
12329         * regcache.c (regcache_get_ptid): New function.
12330
12331 2017-03-13  Mark Wielaard  <mark@klomp.org>
12332
12333         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12334
12335 2017-03-10  Keith Seitz  <keiths@redhat.com>
12336
12337         PR c++/8218
12338         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12339
12340 2017-03-08  Pedro Alves  <palves@redhat.com>
12341
12342         PR gdb/18360
12343         * infrun.c (start_step_over, do_target_resume, resume)
12344         (restart_threads): Assert we're not resuming a thread that is
12345         meant to be stopped.
12346         (infrun_thread_stop_requested_callback): Delete.
12347         (infrun_thread_stop_requested): If the thread is internally
12348         stopped, queue a pending stop event and clear the thread's
12349         inline-frame state.
12350         (handle_stop_requested): New function.
12351         (handle_syscall_event, handle_inferior_event_1): Use
12352         handle_stop_requested.
12353         (handle_stop_requested): New function.
12354         (handle_signal_stop): Set the thread's stop_signal here instead of
12355         at caller.
12356         (finish_step_over): Clear step over info unconditionally.
12357         (handle_signal_stop): If the user had interrupted the event
12358         thread, consider the stop a random signal.
12359         (handle_signal_stop) <signal arrived while stepping over
12360         breakpoint>: Don't restart threads here.
12361         (stop_waiting): Don't clear step-over info here.
12362
12363 2017-03-08  Pedro Alves  <palves@redhat.com>
12364
12365         PR 21206
12366         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12367         goes to argument 2, not 1.
12368
12369 2017-03-08  Pedro Alves  <palves@redhat.com>
12370
12371         PR cli/21218
12372         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12373         display_gdb_prompt.
12374         (command_line_input): Add comment.
12375
12376 2017-03-08  Pedro Alves  <palves@redhat.com>
12377
12378         PR tui/21216
12379         * tui/tui-file.c (tui_file::write): New.
12380         * tui/tui-file.h (tui_file): Override "write".
12381         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12382         factored out from ...
12383         (tui_puts): ... here.
12384         (tui_putc): Use them.
12385         (tui_write): New function.
12386         * tui/tui-io.h (tui_write): Declare.
12387
12388 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12389
12390         * Makefile.in (SFILES): Replace "environ.c" with
12391         "common/environ.c".
12392         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12393         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12394         to...
12395         * common/environ.c: ... here.
12396         * environ.h: Moved to...
12397         * common/environ.h: ... here.
12398
12399 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12400
12401         * gdbarch.sh (pstring_ptr): New static function.
12402         (gdbarch_disassembler_options): Use it.
12403         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12404         not valid_disassembler_option->name.
12405         * gdbarch.c: Regenerate.
12406
12407 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12408
12409         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12410
12411 2017-03-07  Pedro Alves  <palves@redhat.com>
12412
12413         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12414
12415 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12416
12417         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12418         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12419         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12420         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12421
12422 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12423
12424         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12425
12426 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12427
12428         * remote.c (remote_add_target_side_commands): Use range-based
12429         for loop.
12430
12431 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12432
12433         PR gdb/21165
12434         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12435         value is lazy.
12436         * valprint.c (common_val_print): Likewise.
12437
12438 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12439
12440         * NEWS: Mention new set/show disassembler-options commands.
12441         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12442         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12443         (prospective_options): New static variable.
12444         (gdb_disassembler::gdb_disassembler): Initialize
12445         m_di.disassembler_options.
12446         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12447         (get_disassembler_options): New function.
12448         (set_disassembler_options): Likewise.
12449         (set_disassembler_options_sfunc): Likewise.
12450         (show_disassembler_options_sfunc): Likewise.
12451         (disassembler_options_completer): Likewise.
12452         (_initialize_disasm): Likewise.
12453         * disasm.h (get_disassembler_options): New prototype.
12454         (set_disassembler_options): Likewise.
12455         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12456         (gdbarch_verify_disassembler_options): Likewise.
12457         * gdbarch.c: Regenerate.
12458         * gdbarch.h: Likewise.
12459         * arm-tdep.c (num_disassembly_options): Delete.
12460         (set_disassembly_style): Likewise.
12461         (arm_disassembler_options): New static variable.
12462         (set_disassembly_style_sfunc): Convert short style name into long
12463         option name.  Call set_disassembler_options.
12464         (show_disassembly_style_sfunc): New function.
12465         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12466         set_gdbarch_verify_disassembler_options.
12467         (_initialize_arm_tdep): Delete regnames variable and update callers.
12468         (arm_disassembler_options): Initialize.
12469         (disasm_options): New variable.
12470         (num_disassembly_options): Rename from this...
12471         (num_disassembly_styles): ...to this.  Compute by scanning through
12472         disasm_options.
12473         (valid_disassembly_styles): Initialize using disasm_options.
12474         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12475         set_arm_regname_option.
12476         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12477         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12478         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12479         set_gdbarch_verify_disassembler_options.
12480         * s390-tdep.c (s390_disassembler_options): New static variable.
12481         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12482         set_gdbarch_verify_disassembler_options.
12483
12484 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12485
12486         * remote.c (remote_add_target_side_condition): Remove "struct"
12487         keyword from range-based for loop.
12488
12489 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12490
12491         * remote.c (remote_add_target_side_condition): Use range-based
12492         for loop.  Update comment.
12493
12494 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12495
12496         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12497
12498 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12499
12500         * regcache.c (regcache_raw_update): New function.
12501         (regcache_raw_read): Move code to regcache_raw_update.
12502         * regcache.h (regcache_raw_update): New declaration.
12503         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12504
12505 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12506
12507         * dwarf2read.c (create_debug_type_hash_table): Initialize
12508         header.signature and header.type_offset_in_tu.
12509
12510 2017-02-24  Pedro Alves  <palves@redhat.com>
12511
12512         * symtab.c (make_file_symbol_completion_list_1): Use
12513         add_symtab_completions.
12514
12515 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12516
12517         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12518
12519 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12520
12521         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12522         I386_MAX_REGISTER_SIZE.
12523         (i386_pseudo_register_write): Likewise.
12524         (i386_process_record): Likewise.
12525         * i387-tdep.c (i387_supply_xsave): Likewise.
12526         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12527         (store_register): Likewise.
12528
12529 2017-02-23  Pedro Alves  <palves@redhat.com>
12530
12531         * ada-lang.c: Include "common/function-view.h".
12532         (ada_iterate_over_symbols): Adjust to use function_view as
12533         callback type.
12534         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12535         (ada_make_symbol_completion_list): Use a lambda.
12536         (ada_exc_search_name_matches): Delete.
12537         (name_matches_regex): New.
12538         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12539         * compile/compile-c-support.c: Include "common/function-view.h".
12540         (print_one_macro): Change prototype to accept a ui_file pointer.
12541         (write_macro_definitions): Use a lambda.
12542         * dwarf2read.c: Include "common/function-view.h".
12543         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12544         (dw2_expand_symtabs_matching): Adjust to use function_view as
12545         callback type.
12546         * language.h: Include "common/function-view.h".
12547         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12548         function_view as callback type.
12549         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12550         * linespec.c: Include "common/function-view.h".
12551         (collect_info::add_symbol): New method.
12552         (struct symbol_and_data_callback, iterate_inline_only, struct
12553         symbol_matcher_data, iterate_name_matcher): Delete.
12554         (iterate_over_all_matching_symtabs): Adjust to use function_view
12555         as callback type and lambdas.
12556         (iterate_over_file_blocks): Adjust to use function_view as
12557         callback type.
12558         (decode_compound_collector): Now a class with private fields.
12559         (decode_compound_collector::release_symbols): New method.
12560         (collect_one_symbol): Rename to...
12561         (decode_compound_collector::operator()): ... this and adjust.
12562         (lookup_prefix_sym): decode_compound_collector construction bits
12563         move to decode_compound_collector ctor.  Pass the
12564         decode_compound_collector object directly as callback.  Remove
12565         cleanups and use decode_compound_collector::release_symbols
12566         instead.
12567         (symtab_collector): Now a class with private fields.
12568         (symtab_collector::release_symtabs): New method.
12569         (add_symtabs_to_list): Rename to...
12570         (symtab_collector::operator()): ... this and adjust.
12571         (collect_symtabs_from_filename): symtab_collector construction
12572         bits move to symtab_collector ctor.  Pass the symtab_collector
12573         object directly as callback.  Remove cleanups and use
12574         symtab_collector::release_symtabs instead.
12575         (collect_symbols): Delete.
12576         (add_matching_symbols_to_info): Use lambdas.
12577         * macrocmd.c (print_macro_callback): Delete.
12578         (info_macro_command): Use a lambda.
12579         (info_macros_command): Pass print_macro_definition as callable
12580         directly.
12581         (print_one_macro): Remove 'ignore' parameter.
12582         (macro_list_command): Adjust.
12583         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12584         (macro_for_each_data::user_data): Delete field.
12585         (foreach_macro): Adjust to call the function_view.
12586         (macro_for_each): Adjust to use function_view as callback type.
12587         (foreach_macro_in_scope): Adjust to call the function_view.
12588         (macro_for_each_in_scope): Adjust to use function_view as callback
12589         type.
12590         * macrotab.h: Include "common/function-view.h".
12591         (macro_callback_fn): Declare a prototype instead of a pointer.
12592         Remove "user_data" parameter.
12593         (macro_for_each, macro_for_each_in_scope): Adjust to use
12594         function_view as callback type.
12595         * psymtab.c (partial_map_expand_apply)
12596         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12597         Adjust to use function_view as callback type and to return bool.
12598         (psym_expand_symtabs_matching): Adjust to use function_view as
12599         callback types.
12600         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12601         to use function_view as callback type and to return bool.
12602         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12603         callback types.
12604         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12605         as callback types.
12606         * symfile.h: Include "common/function-view.h".
12607         (expand_symtabs_file_matcher_ftype)
12608         (expand_symtabs_symbol_matcher_ftype)
12609         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12610         return bool.
12611         (quick_symbol_functions::map_symtabs_matching_filename)
12612         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12613         function_view as callback type and return bool.
12614         (expand_symtabs_matching): Adjust to use function_view as callback
12615         type.
12616         (maintenance_expand_name_matcher)
12617         (maintenance_expand_file_matcher): Delete.
12618         (maintenance_expand_symtabs): Use lambdas.
12619         * symtab.c (iterate_over_some_symtabs): Adjust to use
12620         function_view as callback types and return bool.
12621         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12622         of a cleanup.
12623         (lookup_symtab_callback): Delete.
12624         (lookup_symtab): Use a lambda.
12625         (iterate_over_symbols): Adjust to use function_view as callback
12626         type.
12627         (struct search_symbols_data, search_symbols_file_matches)
12628         (search_symbols_name_matches): Delete.
12629         (search_symbols): Use a pair of lambdas.
12630         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12631         (symtab_expansion_callback): Delete.
12632         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12633         * symtab.h: Include "common/function-view.h".
12634         (iterate_over_some_symtabs): Adjust to use function_view as
12635         callback type and return bool.
12636         (iterate_over_symtabs): Adjust to use function_view as callback
12637         type.
12638         (symbol_found_callback_ftype): Remove 'data' parameter and return
12639         bool.
12640         (iterate_over_symbols): Adjust to use function_view as callback
12641         type.
12642
12643 2017-02-23  Pedro Alves  <palves@redhat.com>
12644
12645         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12646         (%.o) <unittests/%.c>: New pattern.
12647         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12648         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12649         * common/function-view.h: New file.
12650         * unittests/function-view-selftests.c: New file.
12651         * configure: Regenerate.
12652
12653 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12654
12655         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12656         inferior_ptid.
12657         * go32-nat.c (go32_thread_alive): Likewise.
12658
12659 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12660
12661         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12662         delete.
12663
12664 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12665
12666         * varobj.c (varobj_clear_saved_item): Use delete instead of
12667         xfree.
12668         (update_dynamic_varobj_children): Likewise.
12669
12670 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12671
12672         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12673
12674 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12675
12676         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12677         m_enum_value to 0 in default constructor.
12678
12679 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12680
12681         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12682         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12683         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12684         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12685         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12686         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12687         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12688         IS_STORE_CONDITIONAL_INSN.
12689
12690 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12691
12692         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12693
12694 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12695
12696         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12697
12698 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12699
12700         * dwarf2read.c (skip_one_die, read_attribute_value)
12701         (dwarf2_const_value_attr, dump_die_shallow)
12702         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12703         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12704
12705 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12706
12707         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12708         (dwarf_parse_macro_header): Accept DWARF version 5.
12709         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12710
12711 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12712
12713         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12714         DW_AT_GNU_*.
12715         * common/common-exceptions.h (enum errors): Likewise.
12716         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12717         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12718         (dwarf_expr_context::execute_stack_op): Likewise.
12719         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12720         Likewise.
12721         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12722         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12723         (show_entry_values_debug, call_site_to_target_addr)
12724         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12725         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12726         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12727         (value_of_dwarf_block_entry, indirect_pieced_value)
12728         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12729         (disassemble_dwarf_expression): Likewise.
12730         * dwarf2read.c (process_die, inherit_abstract_dies)
12731         (read_call_site_scope): Likewise.
12732         * gdbtypes.h (struct func_type, struct call_site_parameter)
12733         (struct call_site): Likewise.
12734         * stack.c (read_frame_arg): Likewise.
12735         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12736
12737 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12738
12739         * defs.h (read_unsigned_leb128): New declaration.
12740         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12741         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12742         (dwarf2_find_location_expression): Call also
12743         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12744         * dwarf2loc.h (dwarf2_version): New declaration.
12745         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12746         rnglists.
12747         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12748         .debug_rnglists.
12749         (struct dwop_section_names): Add loclists_dwo.
12750         (dwop_section_names): Add .debug_loclists.dwo.
12751         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12752         (struct dwarf2_per_cu_data): Add dwarf_version.
12753         (struct dwo_sections): Add loclists.
12754         (struct attr_abbrev): Add implicit_const.
12755         (read_indirect_line_string): New declaration.
12756         (read_unsigned_leb128): Delete declaration.
12757         (rcuh_kind): New definition.
12758         (read_and_check_comp_unit_head): Change parameter
12759         is_debug_types_section to section_kind.
12760         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12761         (read_comp_unit_head): Change parameter abfd to section, add parameter
12762         section_kind.  Handle DWARF-5.
12763         (error_check_comp_unit_head): Accept also DWARF version 5.
12764         (read_and_check_comp_unit_head): Change parameter
12765         is_debug_types_section to section_kind.
12766         (read_and_check_type_unit_head): Delete function.
12767         (read_abbrev_offset): Handle DWARF-5.
12768         (create_debug_type_hash_table): Add parameter section_kind.  Process
12769         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12770         comp_unit_head.
12771         (create_debug_types_hash_table): Update create_debug_type_hash_table
12772         caller.
12773         (create_all_type_units): Call create_debug_type_hash_table.
12774         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12775         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12776         caller.
12777         (skip_one_die): Handle DW_FORM_implicit_const.
12778         (dwarf2_rnglists_process): New function.
12779         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12780         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12781         (read_attribute_value): Handle DW_FORM_implicit_const,
12782         DW_FORM_line_strp.
12783         (read_attribute): Handle DW_FORM_implicit_const.
12784         (read_indirect_string_at_offset_from): New function from
12785         read_indirect_string_at_offset.
12786         (read_indirect_string_at_offset): Call
12787         read_indirect_string_at_offset_from.
12788         (read_indirect_line_string_at_offset): New function.
12789         (read_indirect_string): New function comment.
12790         (read_indirect_line_string): New function.
12791         (read_unsigned_leb128): Make it global.
12792         (dwarf2_string_attr): Handle DWARF-5.
12793         (add_include_dir_stub, read_formatted_entries): New functions.
12794         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12795         Handle DWARF-5.
12796         (per_cu_header_read_in): Update read_comp_unit_head caller.
12797         (dwarf2_version): New function.
12798         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12799         rnglists.
12800         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12801         fields.
12802
12803 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12804
12805         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12806
12807 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12808
12809         * dwarf2read.c (dwarf2_ranges_process): New function from
12810         dwarf2_ranges_read.
12811         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12812         dwarf2_ranges_process.
12813
12814 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12815
12816         * dwarf2read.c (create_debug_type_hash_table): New function from
12817         create_debug_types_hash_table.
12818         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12819         (create_all_type_units, open_and_init_dwo_file): Update
12820         create_debug_types_hash_table callers.
12821
12822 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12823
12824         PR gdb/16188
12825         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12826         refer to 'ap', not 'args'.
12827
12828 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12829             Pedro Alves  <palves@redhat.com>
12830
12831         PR gdb/16188
12832         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12833         calls succeeded.
12834         * fork-child.c (trace_start_error): New function.
12835         (trace_start_error_with_name): Likewise.
12836         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12837         * inf-ptrace.c (inf_ptrace_me): Likewise.
12838         * inferior.h (trace_start_error): New prototype.
12839         (trace_start_error_with_name): Likewise.
12840
12841 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12842
12843         PR gdb/21164
12844         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12845         NULL before using it.
12846         * symmisc.c (maintenance_print_symbols): Likewise.
12847         (maintenance_print_msymbols): Likewise.
12848
12849 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12850
12851         * NEWS: Add record Python bindings entry.
12852
12853 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12854
12855         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12856         py-record-full.o.
12857         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12858         * python/py-record-btrace.c, python/py-record-btrace.h,
12859         python/py-record-full.c, python/py-record-full.h: New file.
12860         * python/py-record.c: Add include for py-record-btrace.h and
12861         py-record-full.h.
12862         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12863         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12864         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12865         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12866         New definition.
12867         (gdbpy_initialize_btrace): New export.
12868         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12869
12870 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12871
12872         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12873         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12874         * python/py-record.c: New file.
12875         * python/python-internal.h (gdbpy_start_recording,
12876         gdbpy_current_recording, gdpy_stop_recording,
12877         gdbpy_initialize_record): New export.
12878         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12879         (python_GdbMethods): Add gdbpy_start_recording,
12880         gdbpy_current_recording and gdbpy_stop_recording.
12881
12882 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12883
12884         * record-btrace.c (record_btrace_record_method): New function.
12885         (init_record_btrace_ops): Initialize to_record_method.
12886         * record-full.c (record_full_record_method): New function.
12887         (init_record_full_ops, init_record_full_core_ops): Add
12888         record_full_record_method.
12889         * record.h (enum record_method): New enum.
12890         * target-debug.h (target_debug_print_enum_record_method: New define.
12891         * target-delegates.c: Regenerate.
12892         * target.c (target_record_method): New function.
12893         * target.h: Include record.h.
12894         (struct target_ops) <to_record_method>: New field.
12895         (target_record_method): New export.
12896
12897 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12898
12899         * record.h (record_start, record_stop): New export.
12900         * record.c (record_start, record_stop): New function.
12901
12902 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12903
12904         * btrace.c (btrace_fetch): Copy function call segments pointer
12905         into a vector.
12906         (btrace_clear): Clear the vector.
12907         (btrace_find_insn_by_number): Use binary search to find the correct
12908         function call segment.
12909         * btrace.h (brace_fun_p): New typedef.
12910         (struct btrace_thread_info) <functions>: New field.
12911
12912 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12913
12914         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12915         * btrace.c (btrace_decode_error): ... here.  New function.
12916         * btrace.h (btrace_decode_error): New export.
12917
12918 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12919
12920         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12921         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12922         btrace_find_insn_by_number): Remove special case for gaps.
12923         * btrace.h (btrace_insn_get_error): New export.
12924         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12925         * record-btrace.c (btrace_insn_history): Print number for gaps.
12926         (record_btrace_info, record_btrace_goto): Handle gaps.
12927
12928 2017-02-14  Tom Tromey  <tom@tromey.com>
12929
12930         PR python/13598:
12931         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12932         event.
12933         * python/py-evts.c (gdbpy_initialize_py_events): Add
12934         before_prompt registry.
12935         * python/py-events.h (events_object) <before_prompt>: New field.
12936
12937 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
12938
12939         * btrace.c (ftrace_new_switch): Preserve up link and flags.
12940
12941 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
12942
12943         * symfile (_initialize_symfile): Add usage text to the load command's
12944         help text.
12945
12946 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
12947
12948         * utils.c (defaulted_query): Don't query on secondary UIs.
12949
12950 2017-02-10  Tom Tromey  <tom@tromey.com>
12951
12952         * rust-lang.c (rust_get_disr_info): Remove unused variable.
12953
12954 2017-02-10  Tom Tromey  <tom@tromey.com>
12955
12956         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12957         "cleanup" local.
12958         * python/py-type.c (typy_legacy_template_argument): Remove
12959         unnecessary "cleanup" local.
12960
12961 2017-02-10  Tom Tromey  <tom@tromey.com>
12962
12963         * python/python.c (do_start_initialization): New function, from
12964         _initialize_python.
12965         (_initialize_python): Call do_start_initialization.
12966         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12967         goto.
12968
12969 2017-02-10  Tom Tromey  <tom@tromey.com>
12970
12971         * python/py-prettyprint.c (pretty_print_one_value): Use
12972         gdbpy_ref.
12973
12974 2017-02-10  Tom Tromey  <tom@tromey.com>
12975
12976         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12977         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12978         gdbpy_ref.
12979         * python/py-type.c (field_new): Use gdbpy_ref.
12980         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12981         gdbpy_ref.
12982         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12983         (py_free_pspace): Likewise.
12984         (pspace_to_pspace_object): Likewise.
12985         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12986         (py_free_objfile): Likewise.
12987         (objfile_to_objfile_object): Likewise.
12988         * python/py-inferior.c (delete_thread_object): Use
12989         gdbpy_ref.
12990         (infpy_read_memory): Likewise.
12991         (py_free_inferior): Likewise.
12992         * python/py-evtregistry.c (create_eventregistry_object): Use
12993         gdbpy_ref.
12994         * python/py-event.c (create_event_object): Use gdbpy_ref.
12995
12996 2017-02-10  Tom Tromey  <tom@tromey.com>
12997
12998         * python/py-ref.h (gdbpy_ref_policy): Now a template.
12999         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13000         used.
13001         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13002         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13003         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13004         python/py-framefilter.c, python/py-function.c,
13005         python/py-inferior.c, python/py-infevents.c,
13006         python/py-linetable.c, python/py-newobjfileevent.c,
13007         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13008         python/py-signalevent.c, python/py-stopevent.c,
13009         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13010         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13011         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13012         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13013
13014 2017-02-10  Tom Tromey  <tom@tromey.com>
13015
13016         * ui-out.h (ui_out_emit_type): New class.
13017         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13018         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13019         and ui_out_emit_tuple.
13020         (enumerate_locals): Likewise.
13021         (py_mi_print_variables, py_print_locals, py_print_args): Use
13022         ui_out_emit_list.
13023         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13024         ui_out_emit_list.
13025         * common/gdb_optional.h: New file.
13026
13027 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13028
13029         * MAINTAINERS (Write After Approval): Update my e-mail address.
13030
13031 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13032
13033         PR gdb/21122
13034         * breakpoint.c (_initialize_breakpoint): Update the help description
13035         of the 'commands' command to indicate that it takes a list argument.
13036
13037 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13038
13039         * interps.c (current_interp_set_logging): Remove "return".
13040
13041 2017-02-09  Gary Benson  <gbenson@redhat.com>
13042
13043         * symtab.c (add_symtab_completions): Prevent NULL pointer
13044         dereference.
13045
13046 2017-02-08  Pedro Alves  <palves@redhat.com>
13047
13048         * interps.c (interp::interp): Remove reference to quiet_p.
13049         (interp_set): Make static.  Remove dead "Switching to" output
13050         code.
13051         (interp_quiet_p, interp_set_quiet): Delete.
13052         (interpreter_exec_cmd): Don't set the interpreter quiet.
13053         * interps.h (interp_quiet_p): Make static.
13054         (class interp) <quiet_p>: Remove field
13055
13056 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13057
13058         * cli/cli-decode.c (find_command_name_length): Make it extern.
13059         * cli/cli-decode.h (find_command_name_length): Declare.
13060         * cli/cli-script.c (command_name_equals, line_first_arg):
13061         New functions.
13062         (process_next_line): Use cli-decode to parse command names.
13063         (build_command_line): Make args a constant pointer.
13064
13065 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13066
13067         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13068         Remove case-insensitive search.
13069
13070 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13071
13072         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13073         at the end of the line.  Avoids an ARI warning.
13074
13075 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13076
13077         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13078         rdseed instructions.
13079         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13080
13081 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13082
13083         PR tdep/20936
13084         Provide and use sparc32 and sparc64 target description XML files.
13085         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13086         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13087         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13088         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13089         * features/sparc/sparc32-solaris.xml: New file.
13090         * features/sparc/sparc64-solaris.xml: New file.
13091         * features/sparc/sparc32-solaris.c: Generated.
13092         * features/sparc/sparc64-solaris.c: Generated.
13093         * sparc-tdep.h: Account for differences in target descriptions.
13094         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13095         (sparc32_register_type): Use target provided registers.
13096         (validate_tdesc_registers): New function.
13097         (sparc32_gdbarch_init): Use tdesc_has_registers.
13098         Set pseudoregister functions.
13099         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13100         (sparc64_register_type): Use target provided registers.
13101         (sparc64_init_abi): Set pseudoregister functions.
13102
13103 2017-02-03  Tom Tromey  <tom@tromey.com>
13104
13105         PR rust/21097:
13106         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13107         with a single member.
13108
13109 2017-02-03  Pedro Alves  <palves@redhat.com>
13110
13111         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13112         (cli_interp_base::~cli_interp_base): New.
13113         (cli_interp): New struct.
13114         (as_cli_interp): Cast the interp itself to cli_interp.
13115         (cli_interpreter_pre_command_loop): Rename to ...
13116         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13117         parameter.
13118         (cli_interpreter_init): Rename to ...
13119         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13120         boolean.  Make extern.
13121         (cli_interpreter_resume): Rename to ...
13122         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13123         extern.
13124         (cli_interpreter_suspend): Rename to ...
13125         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13126         extern.
13127         (cli_interpreter_exec): Rename to ...
13128         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13129         extern.
13130         (cli_interpreter_supports_command_editing): Rename to ...
13131         (cli_interp_base::supports_command_editing): ... this.  Remove
13132         'interp' parameter.  Make extern.
13133         (cli_ui_out): Rename to ...
13134         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13135         Make extern.
13136         (cli_set_logging): Rename to ...
13137         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13138         parameter.  Make extern.
13139         (cli_interp_procs): Delete.
13140         (cli_interp_factory): Adjust to use "new".
13141         * cli/cli-interp.h: Include "interps.h".
13142         (struct cli_interp_base): New struct.
13143         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13144         (interp_new): Delete.
13145         (interp::interp, interp::~interp): New.
13146         (interp_set): Use bool, and return void.  Assume the interpreter
13147         has suspend, init and resume methods, and that the all return
13148         void.
13149         (set_top_level_interpreter): interp_set returns void.
13150         (interp_ui_out): Adapt.
13151         (current_interp_set_logging): Adapt.
13152         (interp_data): Delete.
13153         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13154         (interp_exec): Adapt.
13155         (top_level_interpreter_data): Delete.
13156         * interps.h (interp_init_ftype, interp_resume_ftype)
13157         (interp_suspend_ftype, interp_exec_ftype)
13158         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13159         (class interp): New.
13160         (interp_new): Delete.
13161         (interp_set): Now returns void.  Use bool.
13162         (interp_data, top_level_interpreter_data): Delete.
13163         * mi/mi-common.h: Include interps.h.
13164         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13165         init, resume, suspect, exec, interp_ui_out, set_logging and
13166         pre_command_loop methods.
13167         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13168         (mi_interpreter_init): Rename to ...
13169         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13170         bool, return void and make extern.  Adjust.
13171         (mi_interpreter_resume): ... Rename to ...
13172         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13173         return void and make extern.  Adjust.
13174         (mi_interpreter_suspend): ... Rename to ...
13175         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13176         return void and make extern.  Adjust.
13177         (mi_interpreter_exec): ... Rename to ...
13178         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13179         extern.  Adjust.
13180         (mi_interpreter_pre_command_loop): ... Rename to ...
13181         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13182         parameter and make extern.
13183         (mi_on_normal_stop_1): Adjust.
13184         (mi_ui_out): Rename to ...
13185         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13186         parameter and make extern.  Adjust.
13187         (mi_set_logging): Rename to ...
13188         (mi_interp::set_logging): ... this.  Remove the 'interp'
13189         parameter and make extern.  Adjust.
13190         (mi_interp_procs): Delete.
13191         (mi_interp_factory): Adjust to use 'new'.
13192         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13193         (mi_print_exception, mi_execute_command, mi_load_progress):
13194         Adjust.
13195         * tui/tui-interp.c (tui_interp): New class.
13196         (as_tui_interp): Return a tui_interp pointer.
13197         (tui_on_normal_stop, tui_on_signal_received)
13198         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13199         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13200         to use interp::interp_ui_out.
13201         (tui_init): Rename to ...
13202         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13203         bool, return void and make extern.  Adjust.
13204         (tui_resume): Rename to ...
13205         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13206         return void and make extern.  Adjust.
13207         (tui_suspend): Rename to ...
13208         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13209         return void and make extern.  Adjust.
13210         (tui_ui_out): Rename to ...
13211         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13212         parameter, and make extern.  Adjust.
13213         (tui_exec): Rename to ...
13214         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13215         make extern.
13216         (tui_interp_procs): Delete.
13217         (tui_interp_factory): Use "new".
13218
13219 2017-02-02  Tom Tromey  <tom@tromey.com>
13220
13221         * rust-exp.y (ends_raw_string, space_then_number)
13222         (rust_identifier_start_p): Return bool.
13223         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13224         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13225         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13226         (rust_chartype_p): Return bool.
13227         (val_print_struct, rust_print_struct_def, rust_print_type):
13228         Update.
13229         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13230         Return bool.
13231
13232 2017-02-02  Tom Tromey  <tom@tromey.com>
13233
13234         * rust-lang.c: Reindent.
13235
13236 2017-02-02  Tom Tromey  <tom@tromey.com>
13237
13238         * rust-lang.h (rust_crate_for_block): Update.
13239         * rust-lang.c (rust_crate_for_block): Return std::string.
13240         (rust_get_disr_info): Use std:;string, not
13241         gdb::unique_xmalloc_ptr.
13242         * rust-exp.y (crate_name): Update.
13243
13244 2017-02-02  Pedro Alves  <palves@redhat.com>
13245
13246         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13247         field out of gdb_disassembler_test and make it static.
13248
13249 2017-02-02  Pedro Alves  <palves@redhat.com>
13250
13251         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13252         mi1_interp and mi_interp fields.
13253
13254 2017-02-02  Pedro Alves  <palves@redhat.com>
13255
13256         * cli/cli-interp.c (struct saved_output_files, saved_output):
13257         Moved from cli/cli-logging.c.
13258         (cli_set_logging): New function.
13259         (cli_interp_procs): Install cli_set_logging.
13260         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13261         Declare.
13262         * cli/cli-logging.c (struct saved_output_files, saved_output):
13263         Moved to cli/cli-interp.c.
13264         (pop_output_files): Don't save outputs here.
13265         (make_logging_output): New function.
13266         (handle_redirections): Don't build tee nor save previous outputs
13267         here.
13268         * interps.c (current_interp_set_logging): Change prototype.
13269         Assume there's always a set_logging_proc method installed.
13270         * interps.h (interp_set_logging_ftype): Change prototype.
13271         (current_interp_set_logging): Change prototype and adjust comment.
13272         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13273         use make_logging_output.
13274         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13275 2017-02-02  Pedro Alves  <palves@redhat.com>
13276
13277         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13278         from ...
13279         (set_logging_overwrite): ... here.
13280         (logging_no_redirect_file): Delete.
13281         (set_logging_redirect): Don't handle redirection on the fly.
13282         Instead warn that "logging off" / "logging on" is necessary.
13283         (pop_output_files): Delete references to logging_no_redirect_file.
13284         (show_logging_command): Always speak in terms of what will happen
13285         once logging is reenabled.
13286
13287 2017-02-02  Pedro Alves  <palves@redhat.com>
13288
13289         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13290
13291 2017-02-02  Pedro Alves  <palves@redhat.com>
13292
13293         * disasm.c (gdb_pretty_print_insn): Rename to ...
13294         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13295         Remove gdbarch parameter.  Adapt to clear the object's buffers
13296         instead of allocating new buffers, and to print using the object's
13297         gdb_disassembler instead of calling gdb_print_insn.
13298         (dump_insns): Use gdb_pretty_print_disassembler.
13299         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13300         (gdb_pretty_print_disassembler): New class.
13301         * record-btrace.c (btrace_insn_history): Use
13302         gdb_pretty_print_disassembler.
13303
13304 2017-02-02  Pedro Alves  <palves@redhat.com>
13305
13306         * ada-lang.c (type_as_string): Use string_file.
13307         * ada-valprint.c (ada_print_floating): Use string_file.
13308         * ada-varobj.c (ada_varobj_scalar_image)
13309         (ada_varobj_get_value_image): Use string_file.
13310         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13311         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13312         * breakpoint.c (update_inserted_breakpoint_locations)
13313         (insert_breakpoint_locations, reattach_breakpoints)
13314         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13315         (print_it_watchpoint): Use string_file.
13316         (save_breakpoints): Use stdio_file.
13317         * c-exp.y (oper): Use string_file.
13318         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13319         tee_file.
13320         (pop_output_files): Use delete.
13321         (handle_redirections): Use stdio_file and tee_file.
13322         * cli/cli-setshow.c (do_show_command): Use string_file.
13323         * compile/compile-c-support.c (c_compute_program): Use
13324         string_file.
13325         * compile/compile-c-symbols.c (generate_vla_size): Take a
13326         'string_file &' instead of a 'ui_file *'.
13327         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13328         of a 'ui_file *'.  Use string_file.
13329         (generate_c_for_variable_locations): Take a 'string_file &'
13330         instead of a 'ui_file *'.
13331         * compile/compile-internal.h (generate_c_for_for_one_variable):
13332         Take a 'string_file &' instead of a 'ui_file *'.
13333         * compile/compile-loc2c.c (push, pushf, unary, binary)
13334         (print_label, pushf_register_address, pushf_register)
13335         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13336         'ui_file *'.  Adjust.
13337         * compile/compile.c (compile_to_object): Use string_file.
13338         * compile/compile.h (compile_dwarf_expr_to_c)
13339         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13340         'ui_file *'.
13341         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13342         (replace_typedefs_qualified_name): Use string_file and
13343         obstack_copy0.
13344         * disasm.c (gdb_pretty_print_insn): Use string_file.
13345         (gdb_disassembly): Adjust reference the null_stream global.
13346         (do_ui_file_delete): Delete.
13347         (gdb_insn_length): Use null_stream.
13348         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13349         * dwarf2loc.c (dwarf2_compile_property_to_c)
13350         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13351         'string_file &' instead of a 'ui_file *'.
13352         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13353         * dwarf2read.c (do_ui_file_peek_last): Delete.
13354         (dwarf2_compute_name): Use string_file.
13355         * event-top.c (gdb_setup_readline): Use stdio_file.
13356         * gdbarch.sh (verify_gdbarch): Use string_file.
13357         * gdbtypes.c (safe_parse_type): Use null_stream.
13358         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13359         string_file.
13360         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13361         'string_file *' instead of a 'ui_file *'.
13362         (gdbscm_arch_disassemble): Use string_file.
13363         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13364         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13365         inherits from ui_file.
13366         (ioscm_file_port_delete, ioscm_file_port_rewind)
13367         (ioscm_file_port_put): Delete.
13368         (ioscm_file_port_write): Rename to ...
13369         (ioscm_file_port::write): ... this.  Remove file_port_magic
13370         checks.
13371         (ioscm_file_port_new): Delete.
13372         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13373         ui_file_up.
13374         * guile/scm-type.c (tyscm_type_name): Use string_file.
13375         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13376         Use string_file.
13377         * infcmd.c (print_return_value_1): Use string_file.
13378         * infrun.c (print_target_wait_results): Use string_file.
13379         * language.c (add_language): Use string_file.
13380         * location.c (explicit_to_string_internal): Use string_file.
13381         * main.c (captured_main_1): Use null_file.
13382         * maint.c (maintenance_print_architecture): Use stdio_file.
13383         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13384         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13385         event_channel>: Change type to mi_console_file pointer.
13386         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13387         (mi_console_file_delete): Delete.
13388         (struct mi_console_file): Delete.
13389         (mi_console_file_magic): Delete.
13390         (mi_console_file_new): Delete.
13391         (mi_console_file::mi_console_file): New.
13392         (mi_console_file_delete): Delete.
13393         (mi_console_file_fputs): Delete.
13394         (mi_console_file::write): New.
13395         (mi_console_raw_packet): Delete.
13396         (mi_console_file::flush): New.
13397         (mi_console_file_flush): Delete.
13398         (mi_console_set_raw): Rename to ...
13399         (mi_console_file::set_raw): ... this.
13400         * mi/mi-console.h (class mi_console_file): New class.
13401         (mi_console_file_new, mi_console_set_raw): Delete.
13402         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13403         (mi_set_logging): Use delete and tee_file.  Adjust.
13404         * mi/mi-main.c (output_register): Use string_file.
13405         (mi_cmd_data_evaluate_expression): Use string_file.
13406         (mi_cmd_data_read_memory): Use string_file.
13407         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13408         * mi/mi-out.c (mi_ui_out::main_stream): New.
13409         (mi_ui_out::rewind): Use main_stream and
13410         string_file.
13411         (mi_ui_out::put): Use main_stream and string_file.
13412         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13413         Allocate a 'string_file' instead.
13414         (mi_out_new): Don't allocate a mem_fileopen stream here.
13415         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13416         (mi_ui_out::main_stream): Declare method.
13417         * printcmd.c (eval_command): Use string_file.
13418         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13419         * python/py-arch.c (archpy_disassemble): Use string_file.
13420         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13421         * python/py-frame.c (frapy_str): Use string_file.
13422         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13423         Use string_file.
13424         * python/py-type.c (typy_str): Use string_file.
13425         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13426         * python/py-value.c (valpy_str): Use string_file.
13427         * record-btrace.c (btrace_insn_history): Use string_file.
13428         * regcache.c (regcache_print): Use stdio_file.
13429         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13430         * remote.c (escape_buffer): Use string_file.
13431         * rust-lang.c (rust_get_disr_info): Use string_file.
13432         * serial.c (serial_open_ops_1): Use stdio_file.
13433         (do_serial_close): Use delete.
13434         * stack.c (print_frame_arg): Use string_file.
13435         (print_frame_args): Remove local mem_fileopen stream, not used.
13436         (print_frame): Use string_file.
13437         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13438         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13439         Take a 'string_file *' instead of a 'ui_file *'.
13440         * top.c (new_ui): Use stdio_file and stderr_file.
13441         (free_ui): Use delete.
13442         (execute_command_to_string): Use string_file.
13443         (quit_confirm): Use string_file.
13444         * tracepoint.c (collection_list::append_exp): Use string_file.
13445         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13446         * tui/tui-file.c: Don't include "ui-file.h".
13447         (enum streamtype, struct tui_stream): Delete.
13448         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13449         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13450         (tui_file::tui_file): New method.
13451         (tui_file_fputs): Delete.
13452         (tui_file_get_strbuf): Delete.
13453         (tui_file::puts): New method.
13454         (tui_file_adjust_strbuf): Delete.
13455         (tui_file_flush): Delete.
13456         (tui_file::flush): New method.
13457         * tui/tui-file.h: Tweak intro comment.
13458         Include ui-file.h.
13459         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13460         (tui_file_adjust_strbuf): Delete declarations.
13461         (class tui_file): New class.
13462         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13463         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13464         (tui_register_format): Use string_stream.
13465         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13466         (tui_get_function_from_frame): Use string_file.
13467         * typeprint.c (type_to_string): Use string_file.
13468         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13469         (null_stream): New global.
13470         (ui_file_delete): Delete.
13471         (ui_file::ui_file): New.
13472         (null_file_isatty): Delete.
13473         (ui_file::~ui_file): New.
13474         (null_file_rewind): Delete.
13475         (ui_file::printf): New.
13476         (null_file_put): Delete.
13477         (null_file_flush): Delete.
13478         (ui_file::putstr): New.
13479         (null_file_write): Delete.
13480         (ui_file::putstrn): New.
13481         (null_file_read): Delete.
13482         (ui_file::putc): New.
13483         (null_file_fputs): Delete.
13484         (null_file_write_async_safe): Delete.
13485         (ui_file::vprintf): New.
13486         (null_file_delete): Delete.
13487         (null_file::write): New.
13488         (null_file_fseek): Delete.
13489         (null_file::puts): New.
13490         (ui_file_data): Delete.
13491         (null_file::write_async_safe): New.
13492         (gdb_flush, ui_file_isatty): Adjust.
13493         (ui_file_put, ui_file_rewind): Delete.
13494         (ui_file_write): Adjust.
13495         (ui_file_write_for_put): Delete.
13496         (ui_file_write_async_safe, ui_file_read): Adjust.
13497         (ui_file_fseek): Delete.
13498         (fputs_unfiltered): Adjust.
13499         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13500         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13501         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13502         (set_ui_file_data): Delete.
13503         (string_file::~string_file, string_file::write)
13504         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13505         (do_ui_file_as_string, ui_file_as_string): Delete.
13506         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13507         (struct mem_file): Delete.
13508         (mem_file_new): Delete.
13509         (stdio_file::stdio_file): New.
13510         (mem_file_delete): Delete.
13511         (stdio_file::stdio_file): New.
13512         (mem_fileopen): Delete.
13513         (stdio_file::~stdio_file): New.
13514         (mem_file_rewind): Delete.
13515         (stdio_file::set_stream): New.
13516         (mem_file_put): Delete.
13517         (stdio_file::open): New.
13518         (mem_file_write): Delete.
13519         (stdio_file_magic, struct stdio_file): Delete.
13520         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13521         (stdio_file::flush): New.
13522         (stdio_file_read): Rename to ...
13523         (stdio_file::read): ... this.  Adjust.
13524         (stdio_file_write): Rename to ...
13525         (stdio_file::write): ... this.  Adjust.
13526         (stdio_file_write_async_safe): Rename to ...
13527         (stdio_file::write_async_safe) ... this.  Adjust.
13528         (stdio_file_fputs): Rename to ...
13529         (stdio_file::puts) ... this.  Adjust.
13530         (stdio_file_isatty): Delete.
13531         (stdio_file_fseek): Delete.
13532         (stdio_file::isatty): New.
13533         (stderr_file_write): Rename to ...
13534         (stderr_file::write) ... this.  Adjust.
13535         (stderr_file_fputs): Rename to ...
13536         (stderr_file::puts) ... this.  Adjust.
13537         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13538         (stderr_file::stderr_file): New.
13539         (tee_file_magic): Delete.
13540         (struct tee_file): Delete.
13541         (tee_file::tee_file): New.
13542         (tee_file_new): Delete.
13543         (tee_file::~tee_file): New.
13544         (tee_file_delete): Delete.
13545         (tee_file_flush): Rename to ...
13546         (tee_file::flush): ... this.  Adjust.
13547         (tee_file_write): Rename to ...
13548         (tee_file::write): ... this.  Adjust.
13549         (tee_file::write_async_safe): New.
13550         (tee_file_fputs): Rename to ...
13551         (tee_file::puts): ... this.  Adjust.
13552         (tee_file_isatty): Rename to ...
13553         (tee_file::isatty): ... this.  Adjust.
13554         * ui-file.h (struct obstack, struct ui_file): Don't
13555         forward-declare.
13556         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13557         (ui_file_write_ftype)
13558         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13559         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13560         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13561         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13562         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13563         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13564         (set_ui_file_fseek): Delete.
13565         (ui_file_data, ui_file_delete, ui_file_rewind)
13566         (struct ui_file): New.
13567         (ui_file_up): New.
13568         (class null_file): New.
13569         (null_stream): Declare.
13570         (ui_file_write_for_put, ui_file_put): Delete.
13571         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13572         Delete.
13573         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13574         (gdb_fopen, tee_file_new): Delete.
13575         (struct string_file): New.
13576         (struct stdio_file): New.
13577         (stdio_file_up): New.
13578         (struct stderr_file): New.
13579         (class tee_file): New.
13580         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13581         of a 'ui_file *'.  Adjust.
13582         * ui-out.h (class ui_out) <field_stream>: Likewise.
13583         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13584         (null_stream): Delete.
13585         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13586         Adjust.
13587         * utils.h (struct ui_file): Delete forward declaration..
13588         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13589         (error_stream): Take a 'string_file &' instead of a
13590         'ui_file *'.
13591         * varobj.c (varobj_value_get_print_value): Use string_file.
13592         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13593         * gdbarch.c: Regenerate.
13594
13595 2017-02-02  Pedro Alves  <palves@redhat.com>
13596
13597         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13598         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13599         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13600         Adjust to call gdb_print_insn instead of
13601         gdb_disassembler::print_insn.
13602         (dump_insns, do_mixed_source_and_assembly_deprecated)
13603         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13604         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13605         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13606         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13607         declaration.
13608         (gdb_pretty_print_insn): Re-add declaration.
13609         * record-btrace.c (btrace_insn_history): Don't allocate a
13610         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13611
13612 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13613
13614         * disasm.h (gdb_disassembly): Remove file_string parameter.
13615         * disasm.c (gdb_disassembly): Likewise.
13616         * cli/cli-cmds.c (print_disassembly): Adapt.
13617         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13618         * stack.c (do_gdb_disassembly): Likewise.
13619
13620 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13621
13622         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13623         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13624         targets.  And if the implicit value is longer than needed, extract
13625         the first bytes instead of the "least significant" ones.
13626
13627 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13628
13629         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13630         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13631         (btrace_fetch): Assert can_access_registers_ptid.
13632         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13633         validate_registers_access.
13634
13635 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13636
13637         * gdbthread.h (can_access_registers_ptid): New.
13638         * thread.c (can_access_registers_ptid): New.
13639
13640 2017-02-01  Pedro Alves  <palves@redhat.com>
13641
13642         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13643
13644 2017-01-31  Pedro Alves  <palves@redhat.com>
13645
13646         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13647         Fix typos.
13648
13649 2017-01-31  Pedro Alves  <palves@redhat.com>
13650
13651         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13652         not used.
13653
13654 2017-01-31  Pedro Alves  <palves@redhat.com>
13655
13656         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13657
13658 2017-01-31  Pedro Alves  <palves@redhat.com>
13659
13660         * common/scoped_restore.h
13661         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13662         change the value's parameter type to T2.
13663         (make_scoped_restore): Likewise.
13664
13665 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13666             Richard Henderson  <rth@redhat.com>
13667
13668         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13669         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13670         GS_BASE for older kernels.
13671         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13672         GS_BASE for older kernels.
13673         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13674         and GS_BASE to the offset table.
13675         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13676         system register group.
13677         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13678         for older kernels.
13679         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13680         amd64 ABI.
13681         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13682         AMD64_GSBASE_REGNUM.
13683         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13684         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13685         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13686         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13687         i386/64bit-segments.xml in those rules.
13688         * features/i386/64bit-segments.xml: New file.
13689         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13690         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13691         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13692         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13693         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13694         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13695         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13696         * features/i386/amd64-avx-linux.c: Regenerated.
13697         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13698         * features/i386/amd64-avx-mpx.c: Regenerated.
13699         * features/i386/amd64-avx512-linux.c: Regenerated.
13700         * features/i386/amd64-linux.c: Regenerated.
13701         * features/i386/amd64-mpx-linux.c: Regenerated.
13702         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13703         * features/i386/i386-avx-mpx.c: Regenerated.
13704         * features/i386/x32-avx-linux.c: Regenerated.
13705         * features/i386/x32-avx512-linux.c: Regenerated.
13706         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13707         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13708         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13709         * regformats/i386/amd64-linux.dat: Regenerated.
13710         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13711         * regformats/i386/x32-avx-linux.dat: Regenerated.
13712         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13713         * regformats/i386/x32-linux.dat: Regenerated.
13714
13715 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13716
13717         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13718         Set to AMD64_NUM_REGS.
13719
13720 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13721
13722         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13723         that checks validity of a register number.
13724
13725 2017-01-27  Kees Cook  <keescook@google.com>
13726
13727         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13728         fetch_fpregs if target has fpa registers.
13729         (arm_linux_store_inferior_registers): Call store_fpregs if target
13730         has fpa registers.
13731
13732 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13733
13734         * cris-tdep.c (cris_gdbarch_init): Remove check for
13735         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13736
13737 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13738
13739         * corelow.c (get_core_register_section): Check for regset
13740         existence before checking for REGSET_VARIABLE_SIZE.
13741
13742 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13743             Pedro Alves  <palves@redhat.com>
13744
13745         PR gdb/20939
13746         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13747         call memory_error, save memaddr instead.
13748         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13749         negative, cal memory_error.
13750         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13751
13752 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13753
13754         * disasm-selftests.c (memory_error_test): New function.
13755         (_initialize_disasm_selftests): Register memory_error_test.
13756
13757 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13758
13759         * Makefile.in (SFILES): Add disasm-selftests.c and
13760         selftest-arch.c.
13761         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13762         * disasm-selftests.c: New file.
13763         * selftest-arch.c: New file.
13764         * selftest-arch.h: New file.
13765
13766 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13767
13768         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13769         to bfd_arch_mep.  Don't return 0 if section is not
13770         found.  Call print_insn_mep.
13771
13772 2017-01-26  Pedro Alves  <palves@redhat.com>
13773             Yao Qi  <yao.qi@linaro.org>
13774
13775         * arm-tdep.c: Include "disasm.h".
13776         (gdb_print_insn_arm): Update code to get gdbarch.
13777         * disasm.c (dis_asm_read_memory): Change it to
13778         gdb_disassembler::dis_asm_read_memory.
13779         (dis_asm_memory_error): Likewise.
13780         (dis_asm_print_address): Likewise.
13781         (gdb_pretty_print_insn): Change it to
13782         gdb_disassembler::pretty_print_insn.
13783         (dump_insns): Add one argument gdb_disassemlber.  All
13784         callers updated.
13785         (do_mixed_source_and_assembly_deprecated): Likewise.
13786         (do_mixed_source_and_assembly): Likewise.
13787         (do_assembly_only): Likewise.
13788         (gdb_disassembler::gdb_disassembler): New.
13789         (gdb_disassembler::print_insn): New.
13790         * disasm.h (class gdb_disassembler): New.
13791         (gdb_pretty_print_insn): Remove declaration.
13792         (gdb_disassemble_info): Likewise.
13793         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13794         (gdbscm_disasm_read_memory_worker): Update.
13795         (gdbscm_disasm_read_memory): Update.
13796         (gdbscm_disasm_memory_error): Remove.
13797         (gdbscm_disasm_print_address): Remove.
13798         (gdbscm_disassembler::gdbscm_disassembler): New.
13799         (gdbscm_print_insn_from_port): Update.
13800         * mips-tdep.c: Include disasm.h.
13801         (gdb_print_insn_mips): Update code to get gdbarch.
13802         * record-btrace.c (btrace_insn_history): Update.
13803         * spu-tdep.c: Include disasm.h.
13804         (struct spu_dis_asm_data): Remove.
13805         (struct spu_dis_asm_info): New.
13806         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13807         SPU id.
13808         (gdb_print_insn_spu): Cast disassemble_info to
13809         spu_dis_asm_info.
13810
13811 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13812
13813         * disasm.c (do_ui_file_delete): Delete.
13814         (gdb_insn_length): Move code creating stream to ...
13815         * utils.c (null_stream): ... here.  New function.
13816         * utils.h (null_stream): Declare.
13817
13818 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13819
13820         * python/py-inferior.c (find_thread_object): Return directly
13821         from the loop.  Remove "found" variable.
13822
13823 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13824
13825         GDB 7.12.1 released.
13826
13827 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13828
13829         * python/py-function.c (fnpy_call): Reorder declarations to have
13830         the gdbpy_enter object declared first.
13831         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13832
13833 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13834
13835         PR python/21068
13836         * python/python-internal.h (PyMem_RawMalloc): Define for
13837         Python < 3.4.
13838         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13839         PyMem_RawMalloc instead of PyMem_Malloc.
13840
13841 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13842             Luis Machado  <lgustavo@codesourcery.com>
13843
13844         * NEWS (New commands): Mention flash-erase.
13845         (New MI commands): Mention target-flash-erase.
13846         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13847         command.
13848         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13849         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13850         * target.c (flash_erase_command): New function.
13851         (initialize_targets): Add new flash-erase command.
13852         * target.h (flash_erase_command): New declaration.
13853
13854 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13855
13856         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13857         HAVE_SYS_PROCFS_H is defined.
13858
13859 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13860
13861         * remote.c (struct cached_reg): Change data into a pointer.
13862         * (stop_reply_dtr): Free data pointers before deleting vector.
13863         (process_stop_reply): Likewise.
13864         (remote_parse_stop_reply): Allocate space for data
13865
13866 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13867
13868         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13869         MAX_REGISTER_SIZE.
13870         (amd64_pseudo_register_read_value): Likewise.
13871         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13872         (store_register_using_P): Likewise.
13873         * regcache.c (regcache_xfer_part): Likewise.
13874
13875 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13876
13877         Split real and pseudo registers.
13878         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13879         (sparc32_pseudo_regnum): New enum.
13880         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13881         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13882         (SPARC32_CP0_REGISTERS): New macro.
13883         (sparc32_pseudo_register_name): New function.
13884         (sparc32_register_name): Use sparc32_pseudo_register_name.
13885         (sparc32_pseudo_register_type): New function.
13886         (sparc32_register_type): Use sparc32_pseudo_register_type.
13887         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13888         pseudo register numbers.
13889         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13890         (SPARC64_CP0_REGISTERS): New macro.
13891         (sparc64_pseudo_register_name): New function.
13892         (sparc64_register_name): Use sparc64_pseudo_register_name.
13893         (sparc64_pseudo_register_type): New function.
13894         (sparc64_register_type): Use sparc64_pseudo_register_type.
13895         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13896         pseudo register numbers.
13897         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13898         sparc64_store_arguments): Handle pseudo register numbers.
13899
13900 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13901
13902         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13903         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13904         output.
13905         (getpkt_or_notif_sane_1): Likewise.
13906
13907 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13908
13909         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13910         of CC.  Pass "-x c++-header" instead of "-x c".
13911
13912 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13913
13914         * remote.c (remote_can_async_p): Update comment.
13915
13916 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13917
13918         * linux-nat.c (linux_nat_can_async_p): Update comment.
13919
13920 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
13921
13922         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13923
13924 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
13925
13926         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13927
13928 2017-01-10  Tom Tromey  <tom@tromey.com>
13929
13930         * python/py-type.c (typy_legacy_template_argument): Update.
13931         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13932         ~demangle_parse_info): Declare new members.
13933         (cp_demangled_name_to_comp): Return unique_ptr.
13934         (cp_demangled_name_parse_free)
13935         (make_cleanup_cp_demangled_name_parse_free)
13936         (cp_new_demangle_parse_info): Remove.
13937         * cp-support.c (do_demangled_name_parse_free_cleanup)
13938         (make_cleanup_cp_demangled_name_parse_free): Remove.
13939         (inspect_type, cp_canonicalize_string_full)
13940         (cp_canonicalize_string): Update.
13941         (mangled_name_to_comp): Change return type.
13942         (cp_class_name_from_physname, method_name_from_physname)
13943         (cp_func_name, cp_remove_params): Update.
13944         * cp-name-parser.y (demangle_parse_info): New constructor, from
13945         cp_new_demangle_parse_info.
13946         (~demangle_parse_info): New destructor, from
13947         cp_demangled_name_parse_free.
13948         (cp_merge_demangle_parse_infos): Update.
13949         (cp_demangled_name_to_comp): Change return type.
13950
13951 2017-01-10  Tom Tromey  <tom@tromey.com>
13952
13953         * top.c (prevent_dont_repeat): Change return type.
13954         * python/python.c (execute_gdb_command): Use std::string.
13955         Update.
13956         * guile/guile.c (gdbscm_execute_gdb_command): Update.
13957         * command.h (prevent_dont_repeat): Change return type.
13958         * breakpoint.c (bpstat_do_actions_1): Update.
13959
13960 2017-01-10  Tom Tromey  <tom@tromey.com>
13961
13962         * value.h (scoped_value_mark::~scoped_value_mark): Call
13963         free_to_mark.
13964         (scoped_value_mark::free_to_mark): New method.
13965         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13966         scoped_value_mark.
13967
13968 2017-01-10  Tom Tromey  <tom@tromey.com>
13969
13970         * python/py-value.c (valpy_dereference, valpy_referenced_value)
13971         (valpy_reference_value, valpy_const_value, valpy_get_address)
13972         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13973         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13974         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13975         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13976         scoped_value_mark.
13977         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13978         * value.h (scoped_value_mark): New class.
13979
13980 2017-01-10  Tom Tromey  <tom@tromey.com>
13981
13982         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13983         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13984         * psymtab.c (discard_psymtabs_upto): Remove.
13985         (make_cleanup_discard_psymtabs): Remove.
13986         (struct psymtab_state): Remove.
13987
13988 2017-01-10  Tom Tromey  <tom@tromey.com>
13989
13990         * record-full.c (record_full_save_cleanups): Remove.
13991         (record_full_save): Use gdb::unlinker.
13992         * gcore.c (do_bfd_delete_cleanup): Remove.
13993         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
13994         cleanups.
13995         * dwarf2read.c (unlink_if_set): Remove.
13996         (write_psymtabs_to_index): Use gdb::unlinker.
13997         * common/gdb_unlinker.h: New file.
13998
13999 2017-01-10  Tom Tromey  <tom@tromey.com>
14000
14001         * windows-tdep.c (windows_xfer_shared_library): Update.
14002         * windows-nat.c (windows_make_so): Update.
14003         * utils.h (make_cleanup_bfd_unref): Remove.
14004         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14005         * symfile.h (symfile_bfd_open)
14006         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14007         * symfile.c (read_symbols, symbol_file_add)
14008         (separate_debug_file_exists): Update.
14009         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14010         (generic_load, reread_symbols): Update.
14011         * symfile-mem.c (symbol_file_add_from_memory): Update.
14012         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14013         (spu_symbol_file_add_from_memory): Update.
14014         * solist.h (struct target_so_ops) <bfd_open>: Return
14015         gdb_bfd_ref_ptr.
14016         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14017         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14018         gdb_bfd_ref_ptr.
14019         (solib_map_sections, reload_shared_libraries_1): Update.
14020         * solib-svr4.c (enable_break): Update.
14021         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14022         * solib-frv.c (enable_break2): Update.
14023         * solib-dsbt.c (enable_break): Update.
14024         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14025         gdb_bfd_ref_ptr.
14026         (darwin_solib_get_all_image_info_addr_at_init): Update.
14027         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14028         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14029         * record-full.c (record_full_save): Update.
14030         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14031         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14032         * minidebug.c (find_separate_debug_file_in_section): Return
14033         gdb_bfd_ref_ptr.
14034         * machoread.c (macho_add_oso_symfile): Change abfd to
14035         gdb_bfd_ref_ptr.
14036         (macho_symfile_read_all_oso): Update.
14037         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14038         (macho_symfile_read): Update.
14039         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14040         (jit_bfd_try_read_symtab): Update.
14041         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14042         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14043         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14044         gdb_bfd_ref_ptr.
14045         (gdb_bfd_ref_policy): New struct.
14046         (gdb_bfd_ref_ptr): New typedef.
14047         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14048         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14049         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14050         gdb_bfd_ref_ptr.
14051         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14052         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14053         (gcore_command): Update.
14054         * exec.c (exec_file_attach): Update.
14055         * elfread.c (elf_symfile_read): Update.
14056         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14057         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14058         (open_and_init_dwo_file): Update.
14059         (open_dwp_file): Return gdb_bfd_ref_ptr.
14060         (open_and_init_dwp_file): Update.
14061         * corelow.c (core_open): Update.
14062         * compile/compile-object-load.c (compile_object_load): Update.
14063         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14064         * coffread.c (coff_symfile_read): Update.
14065         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14066         gdb_bfd_ref_ptr.  Rename.
14067         (dump_bfd_file, restore_command): Update.
14068         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14069         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14070         (find_separate_debug_file_by_buildid): Update.
14071
14072 2017-01-10  Tom Tromey  <tom@tromey.com>
14073
14074         * common/gdb_ref_ptr.h: New file.
14075         * python/py-ref.h (struct gdbpy_ref_policy): New.
14076         (gdbpy_ref): Now a typedef.
14077
14078 2017-01-10  Tom Tromey  <tom@tromey.com>
14079
14080         * utils.h (make_cleanup_htab_delete): Don't declare.
14081         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14082         Remove.
14083         * linespec.c (decode_compound_collector): Add constructor,
14084         destructor.
14085         (lookup_prefix_sym): Remove cleanup.
14086         (symtab_collector): Add constructor, destructor.
14087         (collect_symtabs_from_filename): Remove cleanup.
14088         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14089         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14090         Use htab_up.
14091         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14092         * dwarf2read.c (dw2_expand_symtabs_matching)
14093         (dw2_map_symbol_filenames, dwarf_decode_macros)
14094         (write_psymtabs_to_index): Use htab_up.
14095         * dwarf2loc.c (func_verify_no_selftailcall)
14096         (call_site_find_chain_1, func_verify_no_selftailcall)
14097         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14098         std::vector, gdb::unique_xmalloc_ptr.
14099         (call_sitep): Remove typedef.
14100         (dwarf2_locexpr_baton_eval): Remove unused variable.
14101
14102 2017-01-10  Tom Tromey  <tom@tromey.com>
14103
14104         * python/python-internal.h (make_cleanup_py_decref)
14105         (make_cleanup_py_xdecref): Don't declare.
14106         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14107         (py_xdecref, make_cleanup_py_xdecref): Remove.
14108
14109 2017-01-10  Tom Tromey  <tom@tromey.com>
14110
14111         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14112         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14113
14114 2017-01-10  Tom Tromey  <tom@tromey.com>
14115
14116         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14117
14118 2017-01-10  Tom Tromey  <tom@tromey.com>
14119
14120         * python/py-utils.c (unicode_to_encoded_string)
14121         (python_string_to_target_string)
14122         (python_string_to_target_python_string)
14123         (python_string_to_host_string, gdbpy_obj_to_string)
14124         (get_addr_from_python): Use gdbpy_ref.
14125
14126 2017-01-10  Tom Tromey  <tom@tromey.com>
14127
14128         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14129         gdbpy_ref.
14130
14131 2017-01-10  Tom Tromey  <tom@tromey.com>
14132
14133         * python/python.c (eval_python_command, gdbpy_decode_line)
14134         (gdbpy_run_events, gdbpy_start_type_printers)
14135         (gdbpy_apply_type_printers): Use gdbpy_ref.
14136
14137 2017-01-10  Tom Tromey  <tom@tromey.com>
14138
14139         * python/py-param.c (get_doc_string, compute_enum_values): Use
14140         gdbpy_ref.
14141
14142 2017-01-10  Tom Tromey  <tom@tromey.com>
14143
14144         * python/py-inferior.c (find_thread_object, build_inferior_list):
14145         Use gdbpy_ref.
14146
14147 2017-01-10  Tom Tromey  <tom@tromey.com>
14148
14149         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14150
14151 2017-01-10  Tom Tromey  <tom@tromey.com>
14152
14153         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14154         gdbpy_ref.
14155
14156 2017-01-10  Tom Tromey  <tom@tromey.com>
14157
14158         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14159         extra incref.
14160         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14161         Use gdbpy_ref.
14162
14163 2017-01-10  Tom Tromey  <tom@tromey.com>
14164
14165         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14166         gdbpy_ref.
14167
14168 2017-01-10  Tom Tromey  <tom@tromey.com>
14169
14170         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14171         decref results of PyArg_ParseTupleAndKeywords.
14172
14173 2017-01-10  Tom Tromey  <tom@tromey.com>
14174
14175         * python/python.c (python_run_simple_file): Use
14176         unique_xmalloc_ptr, gdbpy_ref.
14177
14178 2017-01-10  Tom Tromey  <tom@tromey.com>
14179
14180         * python/py-prettyprint.c (print_stack_unless_memory_error)
14181         (print_string_repr, print_children): Use gdbpy_ref.
14182         (dummy_python_frame): New class.
14183         (dummy_python_frame::dummy_python_frame): Rename from
14184         push_dummy_python_frame.
14185         (py_restore_tstate): Remove.
14186
14187 2017-01-10  Tom Tromey  <tom@tromey.com>
14188
14189         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14190
14191 2017-01-10  Tom Tromey  <tom@tromey.com>
14192
14193         * python/python.c (ensure_python_env, restore_python_env):
14194         Remove.
14195         * python/python-internal.h (ensure_python_env): Don't declare.
14196         * varobj.h (varobj_ensure_python_env): Don't declare.
14197         * varobj.c (varobj_ensure_python_env): Remove.
14198
14199 2017-01-10  Tom Tromey  <tom@tromey.com>
14200
14201         * varobj.c (varobj_value_get_print_value): Use
14202         gdbpy_enter_varobj.
14203
14204 2017-01-10  Tom Tromey  <tom@tromey.com>
14205
14206         * python/py-prettyprint.c (print_string_repr, print_children):
14207         Update.
14208         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14209         of "encoding".
14210         * varobj.c (varobj_value_get_print_value): Update.
14211         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14212
14213 2017-01-10  Tom Tromey  <tom@tromey.com>
14214
14215         * varobj.c (varobj_get_display_hint)
14216         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14217         (varobj_set_visualizer, free_variable): Use
14218         gdbpy_enter_varobj.
14219
14220 2017-01-10  Tom Tromey  <tom@tromey.com>
14221
14222         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14223         (do_finish_initialization): New function.  Use gdbpy_ref.
14224         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14225         do_finish_initialization.
14226
14227 2017-01-10  Tom Tromey  <tom@tromey.com>
14228
14229         * python/py-param.c (get_set_value, get_show_value): Use
14230         gdbpy_enter, gdbpy_ref.
14231
14232 2017-01-10  Tom Tromey  <tom@tromey.com>
14233
14234         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14235
14236 2017-01-10  Tom Tromey  <tom@tromey.com>
14237
14238         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14239
14240 2017-01-10  Tom Tromey  <tom@tromey.com>
14241
14242         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14243         Use gdbpy_enter_varobj.
14244
14245 2017-01-10  Tom Tromey  <tom@tromey.com>
14246
14247         * varobj.c (gdbpy_enter_varobj): New constructor.
14248         * python/python-internal.h (gdbpy_enter_varobj): New class.
14249         * python/py-varobj.c (py_varobj_get_iterator): Use
14250         gdbpy_enter_varobj.
14251
14252 2017-01-10  Tom Tromey  <tom@tromey.com>
14253
14254         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14255         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14256         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14257         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14258         unique_xmalloc_ptr.
14259         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14260
14261 2017-01-10  Tom Tromey  <tom@tromey.com>
14262
14263         * python/py-xmethods.c (invoke_match_method): Use
14264         gdbpy_ref.
14265
14266 2017-01-10  Tom Tromey  <tom@tromey.com>
14267
14268         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14269         gdbpy_enter, gdbpy_ref.
14270
14271 2017-01-10  Tom Tromey  <tom@tromey.com>
14272
14273         * python/python.c (python_interactive_command): Use gdbpy_enter.
14274
14275 2017-01-10  Tom Tromey  <tom@tromey.com>
14276
14277         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14278         gdbpy_ref.
14279
14280 2017-01-10  Tom Tromey  <tom@tromey.com>
14281
14282         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14283         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14284
14285 2017-01-10  Tom Tromey  <tom@tromey.com>
14286
14287         * utils.h (htab_deleter): New struct.
14288         (htab_up): New typedef.
14289         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14290         gdbpy_enter, gdbpy_ref, htab_up.
14291
14292 2017-01-10  Tom Tromey  <tom@tromey.com>
14293
14294         * python/py-unwind.c (pending_frame_invalidate): Remove.
14295         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14296
14297 2017-01-10  Tom Tromey  <tom@tromey.com>
14298
14299         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14300         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14301
14302 2017-01-10  Tom Tromey  <tom@tromey.com>
14303
14304         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14305
14306 2017-01-10  Tom Tromey  <tom@tromey.com>
14307
14308         * python/python.c (gdbpy_eval_from_control_command)
14309         (gdbpy_source_script, gdbpy_run_events)
14310         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14311         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14312         gdbpy_enter.
14313
14314 2017-01-10  Tom Tromey  <tom@tromey.com>
14315
14316         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14317
14318 2017-01-10  Tom Tromey  <tom@tromey.com>
14319
14320         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14321
14322 2017-01-10  Tom Tromey  <tom@tromey.com>
14323
14324         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14325         (python_on_inferior_call_pre, python_on_inferior_call_post)
14326         (python_on_memory_change, python_on_register_change)
14327         (python_inferior_exit, python_new_objfile, add_thread_object)
14328         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14329
14330 2017-01-10  Tom Tromey  <tom@tromey.com>
14331
14332         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14333         (bpfinishpy_handle_exit): Use gdbpy_enter.
14334
14335 2017-01-10  Tom Tromey  <tom@tromey.com>
14336
14337         * python/py-cmd.c (cmdpy_destroyer)
14338         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14339         gdbpy_enter.
14340
14341 2017-01-10  Tom Tromey  <tom@tromey.com>
14342
14343         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14344         gdbpy_enter.
14345         (gdbpy_breakpoint_has_cond): Likewise.
14346
14347 2017-01-10  Tom Tromey  <tom@tromey.com>
14348
14349         * python/python.c (gdbpy_enter): New constructor.
14350         (~gdbpy_enter): New destructor.
14351         (restore_python_env, ensure_python_env): Rewrite.
14352         * python/python-internal.h (gdbpy_enter): New class.
14353
14354 2017-01-10  Tom Tromey  <tom@tromey.com>
14355
14356         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14357
14358 2017-01-10  Tom Tromey  <tom@tromey.com>
14359
14360         * python/py-value.c (value_has_field, get_field_flag)
14361         (get_field_type, valpy_getitem, convert_value_from_python): Use
14362         gdbpy_ref.
14363
14364 2017-01-10  Tom Tromey  <tom@tromey.com>
14365
14366         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14367         gdbpy_ref.
14368
14369 2017-01-10  Tom Tromey  <tom@tromey.com>
14370
14371         * python/py-prettyprint.c (search_pp_list)
14372         (find_pretty_printer_from_objfiles)
14373         (find_pretty_printer_from_progspace)
14374         (find_pretty_printer_from_gdb, find_pretty_printer)
14375         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14376         gdbpy_ref.
14377
14378 2017-01-10  Tom Tromey  <tom@tromey.com>
14379
14380         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14381
14382 2017-01-10  Tom Tromey  <tom@tromey.com>
14383
14384         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14385         (ltpy_get_all_source_lines): Use gdbpy_ref.
14386
14387 2017-01-10  Tom Tromey  <tom@tromey.com>
14388
14389         * python/py-framefilter.c (extract_sym, extract_value)
14390         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14391         gdbpy_ref.
14392
14393 2017-01-10  Tom Tromey  <tom@tromey.com>
14394
14395         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14396
14397 2017-01-10  Tom Tromey  <tom@tromey.com>
14398
14399         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14400
14401 2017-01-10  Tom Tromey  <tom@tromey.com>
14402
14403         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14404         gdbpy_ref.
14405
14406 2017-01-10  Tom Tromey  <tom@tromey.com>
14407
14408         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14409
14410 2017-01-10  Tom Tromey  <tom@tromey.com>
14411
14412         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14413         (typy_range): Use gdbpy_ref.
14414
14415 2017-01-10  Tom Tromey  <tom@tromey.com>
14416
14417         * python/py-threadevent.c (create_thread_event_object): Use
14418         gdbpy_ref.
14419         * python/py-stopevent.c (create_stop_event_object): Simplify.
14420         (emit_stop_event): Use gdbpy_ref.
14421         * python/py-signalevent.c (create_signal_event_object): Use
14422         gdbpy_ref.
14423         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14424         (emit_new_objfile_event, create_clear_objfiles_event_object)
14425         (emit_clear_objfiles_event): Use gdbpy_ref.
14426         * python/py-infevents.c (create_inferior_call_event_object)
14427         (create_register_changed_event_object)
14428         (create_memory_changed_event_object, emit_inferior_call_event)
14429         (emit_memory_changed_event, emit_register_changed_event): Use
14430         gdbpy_ref.
14431         * python/py-exitedevent.c (create_exited_event_object)
14432         (emit_exited_event): Use gdbpy_ref.
14433         * python/py-event.h (evpy_emit_event): Remove
14434         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14435         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14436         * python/py-continueevent.c (emit_continue_event): Use
14437         gdbpy_ref.
14438         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14439         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14440         gdbpy_ref.
14441         * python/py-bpevent.c (create_breakpoint_event_object): Use
14442         gdbpy_ref.
14443
14444 2017-01-10  Tom Tromey  <tom@tromey.com>
14445
14446         * python/py-ref.h: New file.
14447
14448 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14449
14450         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14451         void.
14452         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14453         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14454         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14455         * ui-out.c (ui_out::redirect): Likewise.
14456         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14457         * cli/cli-logging.c (set_logging_redirect): Update call site of
14458         ui_out::redirect.
14459         (handle_redirections): Likewise.
14460         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14461         * top.c (execute_command_to_string): Likewise.
14462         * utils.c (do_ui_out_redirect_pop): Likewise.
14463
14464 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14465
14466         * stack.c (_initialize_stack): Update "frame" command help message.
14467
14468 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14469
14470         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14471
14472 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14473
14474         * x86-linux-nat.h: Include gdb_proc_service.h.
14475
14476 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14477
14478         * ser-base.h: Include serial.h.
14479
14480 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14481
14482         * ppc-linux-tdep.h: Include ppc-tdep.h.
14483
14484 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14485
14486         * nat/amd64-linux-siginfo.h: Include signal.h.
14487
14488 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14489
14490         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14491
14492 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14493
14494         * mi/mi-parse.h: Include mi-cmds.h.
14495
14496 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14497
14498         * inf-loop.c: Don't include "target.h".
14499         * inf-loop.h: Include it here.
14500
14501 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14502
14503         * dfp.h: Include "dboulest.h" and "expression.h".
14504
14505 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14506
14507         * ax-gdb.h: Include "ax.h".
14508
14509 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14510
14511         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14512         with nat/gdb_ptrace.h.
14513
14514 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14515
14516         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14517         new line.
14518         (mips64_fbsd_sigframe_init): Likewise.
14519
14520 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14521
14522         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14523         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14524
14525 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14526
14527         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14528         * NEWS: Mention new FreeBSD/mips native configuration.
14529         * config/mips/fbsd.mh: New file.
14530         * configure.host: Add mips*-*-freebsd*.
14531         * mips-fbsd-nat.c: New file.
14532
14533 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14534
14535         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14536         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14537         * NEWS: Mention new FreeBSD/mips target.
14538         * configure.tgt: Add mips*-*-freebsd*.
14539         * mips-fbsd-tdep.c: New file.
14540         * mips-fbsd-tdep.h: New file.
14541
14542 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14543
14544         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14545         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14546
14547 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14548
14549         Update copyright year range in all GDB files.
14550
14551 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14552
14553         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14554
14555 For older changes see ChangeLog-2016.
14556 \f
14557 Local Variables:
14558 mode: change-log
14559 left-margin: 8
14560 fill-column: 74
14561 version-control: never
14562 coding: utf-8
14563 End: