Target FP: Remove unused floating-point routines
[external/binutils.git] / gdb / ChangeLog
1 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
2
3         * doublest.c: Do not include "gdbtypes.h".
4         (extract_typed_floating): Remove.
5         (store_typed_floating): Remove.
6         (convert_typed_floating): Remove.
7         * doublest.h (struct type): Remove.
8         (DOUBLEST_PRINT_FORMAT): Remove.
9         (DOUBLEST_SCAN_FORMAT): Remove.
10         (extract_typed_floating): Remove.
11         (store_typed_floating): Remove.
12         (convert_typed_floating): Remove.
13
14         * dfp.c (decimal_from_doublest): Remove.
15         (decimal_to_doublest): Remove.
16         * dfp.h: Do not include "doublest.h".
17         (decimal_from_doublest): Remove.
18         (decimal_to_doublest): Remove.
19
20         * value.c: Do not include "doublest.h" and "dfp.h".
21         (value_as_double): Remove.
22         (unpack_double): Remove.
23         (value_from_double): Remove.
24         (value_from_decfloat): Remove.
25         * value.h: Do not include "doublest.h".
26         (value_as_double): Remove.
27         (unpack_double): Remove.
28         (value_from_double): Remove.
29         (value_from_decfloat): Remove.
30
31 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
32
33         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
34         (i386_extract_return_value): Use target_float_convert.
35         (i386_store_return_value): Likewise.
36         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
37         (i387_value_to_register): Likewise.
38         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
39         (ia64_register_to_value): Use target_float_convert.
40         (ia64_value_to_register): Likewise.
41         (ia64_extract_return_value): Likewise.
42         (ia64_store_return_value): Likewise.
43         (ia64_push_dummy_call): Likewise.
44         * m68k-tdep.c: Include "target-float.h".
45         (m68k_register_to_value): Use target_float_convert.
46         (m68k_value_to_register): Likewise.
47         (m68k_svr4_extract_return_value): Likewise.
48         (m68k_svr4_store_return_value): Likewise.
49         * ppc-sysv-tdep.c: Include "target-float.h".
50         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
51         (do_ppc_sysv_return_value): Likewise.
52         (ppc64_sysv_abi_push_freg): Likewise.
53         (ppc64_sysv_abi_return_value_base): Likewise.
54         * rs6000-aix-tdep.c: Include "target-float.h".
55         (rs6000_push_dummy_call): Use target_float_convert.
56         (rs6000_return_value): Likewise.
57         * rs6000-lynx178-tdep.c: Include "target-float.h".
58         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
59         (rs6000_lynx178_return_value): Likewise.
60         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
61         (rs6000_register_to_value): Use target_float_convert.
62         (rs6000_value_to_register): Likewise.
63         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
64         (arm_extract_return_value): Use target_float_convert.
65         (arm_store_return_value): Likewise.
66         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
67         (sh_register_convert_to_virtual): Use target_float_convert.
68         (sh_register_convert_to_raw): Likewise.
69         * sh64-tdep.c: Include "target-float.h".
70         (sh64_extract_return_value): Use target_float_convert.
71         (sh64_register_convert_to_virtual): Likewise.
72         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
73
74 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
75
76         * target-float.c (floatformat_to_host_double): New function.
77         (floatformat_from_host_double): Likewise.
78         (target_float_to_host_double): Likewise.
79         (target_float_from_host_double): Likewise.
80         * target-float.h (target_float_to_host_double): Add prototype.
81         (target_float_from_host_double): Likewise.
82
83         * guile/scm-value.c: Include "target-float.h".
84         (gdbscm_value_to_real): Use target_float_to_host_double.
85         Handle integer source values via value_as_long.
86         * guile/scm-math.c: Include "target-float.h".  Do not include
87         "doublest.h", "dfp.h", and "expression.h".
88         (vlscm_convert_typed_number): Use target_float_from_host_double.
89         (vlscm_convert_number): Likewise.
90
91         * python/py-value.c (valpy_float): Use target_float_to_host_double.
92         (convert_value_from_python): Use target_float_from_host_double.
93
94 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
95
96         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
97         (cast_from_fixed): Likewise.
98         (ada_scaling_type): New function.
99         (ada_delta): Return value instead of DOUBLEST.  Perform target
100         arithmetic instead of host arithmetic.
101         (scaling_factor): Rename to ...
102         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
103         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
104         (ada_fixed_to_float): Remove.
105         (ada_float_to_fixed): Remove.
106         * ada-lang.h (ada_fixed_to_float): Remove.
107         (ada_float_to_fixed): Remove.
108         (ada_delta): Return value instead of DOUBLEST.
109         (ada_scaling_factor): Add prototype.
110
111         * ada-typeprint.c: Include "target-float.h".
112         (print_fixed_point_type): Perform target arithmetic instead of
113         host arithmetic.
114         * ada-valprint.c: Include "target-float.h".
115         (ada_val_print_num): Perform target arithmetic instead of
116         host arithmetic for fixed-point types.
117
118 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
119
120         * target-float.c: Include <math.h>.
121         (floatformat_binop): New function.
122         (floatformat_compare): Likewise.
123         (target_float_binop): Likewise.
124         (target_float_compare): Likewise.
125         * target-float.h: Include "expression.h".
126         (target_float_binop): Add prototype.
127         (target_float_compare): Likewise.
128
129         * valarith.c: Do not include "doublest.h" and "dfp.h".
130         Include "common/byte-vector.h".
131         (value_args_as_decimal): Remove, replace by ...
132         (value_args_as_target_float): ... this function.  Handle both
133         binary and decimal target floating-point formats.
134         (scalar_binop): Handle both binary and decimal FP using
135         value_args_as_target_float and target_float_binop.
136         (value_equal): Handle both binary and decimal FP using
137         value_args_as_target_float and target_float_compare.
138         (value_less): Likewise.
139         (value_pos): Handle all scalar types as simple copy.
140         (value_neg): Handle all scalar types via BINOP_SUB from 0.
141         * dfp.c (decimal_binop): Throw error instead of internal_error
142         when called with an unsupported operation code.
143
144 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
145
146         * target-float.c (target_float_to_string): New function.
147         (target_float_from_string): New function.
148         * target-float.h (target_float_to_string): Add prototype.
149         (target_float_from_string): Add prototype.
150
151         * valprint.c: Include "target-float.h".  Do not include
152         "doublest.h" and "dfp.h".
153         (print_floating): Use target_float_to_string.
154         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
155         (printf_floating): Use target_float_to_string.
156         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
157         (print_i387_value): Use target_float_to_string.
158         * mips-tdep.c: Include "target-float.h".
159         (mips_print_fp_register): Use target_float_to_string.
160         * sh64-tdep.c: Include "target-float.h".
161         (sh64_do_fp_register): Use target_float_to_string.
162
163         * parse.c: Include "target-float.h".  Do not include
164         "doublest.h" and "dfp.h".
165         (parse_float): Use target_float_from_string.
166         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
167         (define_symbol): Use target_float_from_string.
168         * gdbarch-selftests.c: Include "target-float.h".
169         (register_to_value_test): Use target_float_from_string.
170
171 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
172
173         * Makefile.c (SFILES): Add target-float.c.
174         (HFILES_NO_SRCDIR): Add target-float.h.
175         (COMMON_OBS): Add target-float.o.
176         * target-float.h: New file.
177         * target-float.c: New file.
178
179         * doublest.c (floatformat_classify): Fix detection of float_zero.
180
181         * gdbtypes.c (is_floating_type): New function.
182         * gdbtypes.h (is_floating_type): Add prototype.
183
184         * value.c: Do not include "floatformat.h".
185         (unpack_double): Use target_float_is_valid.
186         (is_floating_value): New function.
187         * value.h (is_floating_value): Add prototype-
188
189         * valarith.c: Include "target-float.h".
190         (value_logical_not): Use target_float_is_zero.
191
192         * python/py-value.c: Include "target-float.h".
193         (valpy_nonzero): Use target_float_is_zero.
194
195 2017-11-04  Tom Tromey  <tom@tromey.com>
196
197         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
198
199 2017-11-04  Tom Tromey  <tom@tromey.com>
200
201         * breakpoint.c (set_momentary_breakpoint): Return
202         breakpoint_up.
203         (until_break_command): Update.
204         (new_until_break_fsm): Change argument types to
205         breakpoint_up.
206         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
207         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
208         Remove.
209         * infcmd.c (finish_forward): Update.
210         * breakpoint.h (set_momentary_breakpoint)
211         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
212         (make_cleanup_delete_breakpoint): Remove.
213         (struct breakpoint_deleter): New.
214         (breakpoint_up): New typedef.
215         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
216         (insert_exception_resume_breakpoint): Update.
217         (insert_exception_resume_from_probe): Update.
218         (insert_longjmp_resume_breakpoint): Update.
219         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
220         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
221         * infcall.c (call_function_by_hand_dummy): Update
222
223 2017-11-04  Tom Tromey  <tom@tromey.com>
224
225         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
226
227 2017-11-04  Tom Tromey  <tom@tromey.com>
228
229         * linux-tdep.c (linux_core_info_proc_mappings): Use
230         gdb::def_vector.
231         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
232         "size" argument.
233         (linux_corefile_thread): Update.
234         (linux_make_corefile_notes): Remove unused variable.
235
236 2017-11-04  Tom Tromey  <tom@tromey.com>
237
238         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
239         gdb::byte_vector.
240
241 2017-11-04  Tom Tromey  <tom@tromey.com>
242
243         * objfiles.c (do_free_objfile_cleanup): Remove.
244         * compile/compile-object-load.c (compile_object_load): Update.
245         * objfiles.h (make_cleanup_free_objfile): Remove.
246
247 2017-11-04  Tom Tromey  <tom@tromey.com>
248
249         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
250         (adi_read_versions): Change "tags" to "gdb_byte *".
251         (adi_print_versions): Likewise.
252
253 2017-11-04  Tom Tromey  <tom@tromey.com>
254
255         * breakpoint.c
256         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
257         from start_rbreak_breakpoints.
258         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
259         * breakpoint.h (class scoped_rbreak_breakpoints): New.
260         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
261         * symtab.c (do_end_rbreak_breakpoints): Remove.
262         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
263
264 2017-11-04  Tom Tromey  <tom@tromey.com>
265
266         * cp-namespace.c (reset_directive_searched): Remove.
267         (cp_lookup_symbol_via_imports): Use scoped_restore.
268         * cp-support.c (reset_directive_searched): Remove.
269         (make_symbol_overload_list_using): Use scoped_restore.
270         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
271         (reset_directive_searched): Remove.
272
273 2017-11-04  Tom Tromey  <tom@tromey.com>
274
275         * symfile.c (find_separate_debug_file_by_debuglink): Use
276         unique_xmalloc_ptr.
277
278 2017-11-04  Tom Tromey  <tom@tromey.com>
279
280         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
281         type of "info".
282         (compute_stack_depth): Likewise.
283         (do_compile_dwarf_expr_to_c): Use std::vector.
284
285 2017-11-04  Tom Tromey  <tom@tromey.com>
286
287         * compile/compile-object-load.c (link_callbacks_einfo): Use
288         std::string.
289
290 2017-11-04  Tom Tromey  <tom@tromey.com>
291
292         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
293         Use scoped_free_pendings.
294         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
295         scoped_free_pendings.
296         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
297         (xcoff_initial_scan): Likewise.
298         * buildsym.c (reset_symtab_globals): Update comment.
299         (scoped_free_pendings): Rename from really_free_pendings.
300         (prepare_for_building): Update comment.
301         (buildsym_init): Likewise.
302         * buildsym.h (class scoped_free_pendings): New class.
303         (really_free_pendings): Don't declare.
304
305 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
306
307         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
308         output when converting a zero value to a special byteorder format.
309
310 2017-11-02  Yao Qi  <yao.qi@linaro.org>
311
312         * frame.c (do_frame_register_read): Remove aspace.
313         * jit.c (jit_frame_sniffer): Likwise.
314         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
315         * regcache.c (regcache::regcache): Pass nullptr.
316         (regcache_print): Caller updated.
317         * regcache.h (regcache::regcache): Remove one constructor
318         parameter aspace.
319
320 2017-11-02  Yao Qi  <yao.qi@linaro.org>
321
322         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
323
324 2017-11-02  Yao Qi  <yao.qi@linaro.org>
325
326         * breakpoint.c (insert_single_step_breakpoints): Update.
327         * frame.c (struct frame_info) <aspace>: Add const.
328         (frame_save_as_regcache): Add const.
329         (get_frame_address_space): Return const address_space *.
330         * frame.h (get_frame_address_space): Update declaration.
331         * infrun.c (struct step_over_info) <aspace>: Add const.
332         (set_step_over_info): Make aspace const.
333         (displaced_step_prepare_throw): Change variable const.
334         (resume): Likewise.
335         (proceed): Likewise.
336         (adjust_pc_after_break): Likewise.
337         (save_waitstatus): Likewise.
338         (handle_signal_stop): Likewise.
339         (keep_going_pass_signal): Likewise.
340         * jit.c (jit_frame_sniffer): Add const.
341         * mips-tdep.c (mips_single_step_through_delay): Likewise.
342         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
343         * record-full.c (record_full_wait_1): Likewise.
344         * regcache.c (regcache::regcache): Change parameter to const.
345         * regcache.h (regcache::regcache): Likewise.
346         (regcache::aspace): Return const address_space *.
347         (regcache) <m_aspace>: Add const.
348
349 2017-11-02  Yao Qi  <yao.qi@linaro.org>
350
351         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
352         * frame.c (create_sentinel_frame): Likewise.
353         * infrun.c (displaced_step_prepare_throw): Likewise.
354         (resume): Likewise.
355         (thread_still_needs_step_over_bp): Likewise.
356         (proceed): Likewise.
357         (do_target_wait): Likewise.
358         (adjust_pc_after_break): Likewise.
359         (handle_syscall_event): Likewise.
360         (save_waitstatus): Likewise.
361         (handle_inferior_event_1): Likewise.
362         (handle_signal_stop): Likewise.
363         (keep_going_pass_signal): Likewise.
364         * linux-nat.c (status_callback): Likewise.
365         (save_stop_reason): Likewise.
366         (resume_stopped_resumed_lwps): Likewise.
367         * record-full.c (record_full_exec_insn): Likewise.
368         (record_full_wait_1): Likewise.
369         * regcache.c (get_regcache_aspace): Remove.
370         * regcache.h (get_regcache_aspace): Remove.
371
372 2017-11-02  Yao Qi  <yao.qi@linaro.org>
373
374         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
375         (init_regcache_descr): Use gdbarch_num_regs.
376         (regcache::regcache): Likewise.
377         (regcache::get_register_status): Likewise.
378         (regcache::assert_raw_regnum): Likewise.
379         (regcache::cooked_read): Likewise.
380         (regcache::cooked_read_value): Likewise.
381         (regcache::cooked_write): Likewise.
382         (regcache::dump): Likewise.
383         (regcache::num_raw_registers): New method.
384         * regcache.h (class regcache) <num_raw_registers>: New.
385
386 2017-11-02  Yao Qi  <yao.qi@linaro.org>
387
388         * regcache.c (regcache::assert_regnum): New method.
389         (regcache::invalidate): Call assert_regnum.
390         (regcache::raw_update): Likewise.
391         (regcache::raw_write): Likewise.
392         (regcache::raw_read_part): Likewise.
393         (regcache::raw_write_part): Likewise.
394         (regcache::raw_supply): Likewise.
395         (regcache::raw_supply_integer): Likewise.
396         (regcache::raw_supply_zeroed): Likewise.
397         (regcache::raw_collect): Likewise.
398         (regcache::raw_collect_integer): Likewise.
399         * regcache.h (regcache::assert_regnum): Declare.
400
401 2017-11-02  Yao Qi  <yao.qi@linaro.org>
402
403         * regcache.c (regcache::dump): Remove code.
404
405 2017-11-02  Yao Qi  <yao.qi@linaro.org>
406
407         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
408         Remove.
409         <sizeof_cooked_register_status>: Remove.
410         (init_regcache_descr): Update.
411         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
412         (regcache::save): Likewise.
413         (regcache::dump): Likewise.
414
415 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
416
417         * ft32-tdep.c (ft32_fetch_instruction): New function.
418         (ft32_analyze_prologue): Use ft32_fetch_instruction().
419
420 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
421
422         * cli/cli-script.c (execute_control_command): Rename to ...
423         (execute_control_command_1): ... this.
424         (execute_control_command): New function.
425
426 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
427
428         * tracepoint.c (tfind_command): Remove const_cast.
429
430 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
431
432         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
433
434 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
435
436         * common/common-utils.h (in_inclusive_range): New function.
437         * arm-tdep.c (arm_record_extension_space): Use
438         in_inclusive_range.
439         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
440         * cris-tdep.c (cris_spec_reg_applicable): Use
441         in_inclusive_range.
442
443 2017-10-30  Pedro Alves  <palves@redhat.com>
444             Simon Marchi <simon.marchi@ericsson.com>
445
446         * remote.c (remote_set_syscall_catchpoint): Build a std::string
447         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
448
449 2017-10-30  Pedro Alves  <palves@redhat.com>
450
451         * common/common-utils.c (string_appendf, string_vappendf): New
452         functions.
453         * common/common-utils.h (string_appendf, string_vappendf): New
454         declarations.
455         * unittests/common-utils-selftests.c (string_appendf_func)
456         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
457         (string_vappendf_tests): New functions.
458         (_initialize_common_utils_selftests): Register "string_appendf" and
459         "string_vappendf tests".
460
461 2017-10-30  Pedro Alves  <palves@redhat.com>
462
463         * unittests/common-utils-selftests.c (format_func): New typedef.
464         (string_printf_tests, string_vprintf_tests): Tests factored out
465         and merged to ...
466         (test_format_func): ... this new function.
467         (string_printf_tests, string_vprintf_tests): Reimplement on top of
468         test_format_func.
469
470 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
471
472         * darwin-nat.c: Remove include of gdb.h.
473
474 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
475
476         * xtensa-xtregs.c: Fix formatting issues.
477
478 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
479
480         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
481
482 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
483
484         PR python/21213
485         * python/py-infthread.c (thpy_get_inferior): Increment reference
486         of inferior before returning it.
487
488 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
489
490         * unittests/common-utils-selftests.c (format): Add
491         ATTRIBUTE_PRINTF.
492
493 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
494
495         * xml-syscall.c (struct syscall_desc): Add constructor.
496         <name>: Change type to std::string.
497         (syscall_desc_up): New typedef.
498         (syscall_desc_p): Remove typeder.
499         (DEF_VEC_P(syscall_desc_p)): Remove.
500         (struct syscall_group_desc): Add constructor.
501         <name>: Change type to std::string.
502         <syscalls>: Change type to std::vector.
503         (syscall_group_desc_up): New typedef.
504         (syscall_group_desc_p): Remove typedef.
505         (DEF_VEC_P(syscall_group_desc_p)): Remove.
506         (struct syscalls_info) <syscalls>: Change type to std::vector of
507         unique_ptr.
508         <groups>: Likewise.
509         <my_gdb_datadir>: Change type to std::string.
510         (syscalls_info_up): New typedef.
511         (allocate_syscalls_info): Remove.
512         (syscalls_info_free_syscalls_desc): Remove.
513         (syscalls_info_free_syscall_group_desc): Remove.
514         (free_syscalls_info): Remove.
515         (make_cleanup_free_syscalls_info): Remove.
516         (syscall_group_create_syscall_group_desc): Adjust.
517         (syscall_group_add_syscall): Adjust.
518         (syscall_create_syscall_desc): Adjust.
519         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
520         (init_syscalls_info): Adjust.
521         (syscall_group_get_group_by_name): Adjust.
522         (xml_get_syscall_number): Adjust.
523         (xml_get_syscall_name): Adjust.
524         (xml_list_of_syscalls): Adjust.
525         (xml_list_syscalls_by_group): Adjust.
526         (xml_list_of_groups): Adjust.
527
528 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
529
530         * probe.h: Don't include gdb_vecs.h.
531         (DEF_VEC_P (probe_p)): Remove.
532         (find_probes_in_objfile): Return an std::vector.
533         * probe.c (find_probes_in_objfile): Likewise.
534         * breakpoint.c (breakpoint_objfile_data)
535         <longjmp_probes>: Change type to std::vector.
536         <exception_probes>: Likewise.
537         (free_breakpoint_probes): Don't manually free vectors.
538         (create_longjmp_master_breakpoint): Adjust.
539         (create_exception_master_breakpoint): Adjust.
540         * solib-svr4.c (svr4_create_probe_breakpoints): Change
541         parameter type, adjust.
542         (svr4_create_solib_event_breakpoints): Adjust.
543
544 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
545
546         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
547         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
548         with new.
549         (free_breakpoint_probes): Rename to ...
550         (free_breakpoint_objfile_data): ... this, and call delete on
551         bp_objfile_data..
552
553 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
554
555         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
556         (loaded_script_ptr): Remove typedef.
557         (DEF_VEC_P (loaded_script_ptr)): Remove.
558         (struct collect_matching_scripts_data): Add constructor.
559         <scripts_p>: Change type to (pointer to) std::vector.
560         (collect_matching_scripts_data): Adjust.
561         (sort_scripts_by_name): Make suitable for std::sort.
562         (print_scripts): Don't sort vector, adjust to std::vector.
563         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
564
565 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
566
567         * symfile.c (filename_language): Make struct, not typedef.  Add
568         constructor.
569         <ext>: Change type to std::string.
570         (DEF_VEC_O (filename_language)): Remove.
571         (filename_language_table): Change type to std::vector.
572         (add_filename_language): Adjust.
573         (set_ext_lang_command): Adjust.
574         (info_ext_lang_command): Adjust.
575         (deduce_language_from_filename): Adjust.
576         (class scoped_restore_filename_language_table): Remove.
577         (test_filename_language): Use scoped_restore.
578         (test_set_ext_lang_command): Use scoped_restore, adjust to
579         std::vector change.
580
581 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
582
583         * symfile.c: Include selftest.h.
584         (class scoped_restore_filename_language_table): New.
585         (test_filename_language): New test.
586         (test_set_ext_lang_command): New test.
587         (_initialize_symfile): Register tests.
588
589 2017-10-27  Keith Seitz  <keiths@redhat.com>
590
591         * breakpoint.c (print_breakpoint_location): Use the symbol saved
592         in the bp_location, falling back to find_pc_sect_function when
593         needed.
594         (add_location_to_breakpoint): Save sal->symbol.
595         * breakpoint.h (struct bp_location) <symbol>: New field.
596         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
597         * symtab.h (struct symtab_and_line) <symbol>: New field.
598
599 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
600
601         PR gdb/13669
602         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
603         to rewind obstack.
604
605 2017-10-26  Pedro Alves  <palves@redhat.com>
606
607         * remote.c (remote_async_terminal_ours_p): Delete.
608         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
609         Remove references to 'remote_async_terminal_ours_p'.
610
611 2017-10-26  Yao Qi  <yao.qi@linaro.org>
612
613         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
614
615 2017-10-26  Yao Qi  <yao.qi@linaro.org>
616
617         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
618         aspace const.
619         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
620         Likewise.
621         * breakpoint.c (bpstat_check_location): Remove cast.
622         (breakpoint_hit_catch_fork): Make aspce const.
623         (breakpoint_hit_catch_solib): Likewise.
624         (breakpoint_hit_catch_exec): Likewise.
625         (breakpoint_hit_ranged_breakpoint): Likewise.
626         (breakpoint_hit_watchpoint): Likewise.
627         (base_breakpoint_breakpoint_hit): Likewise.
628         (bkpt_breakpoint_hit): Likewise.
629         (dprintf_breakpoint_hit): Likewise.
630         (tracepoint_breakpoint_hit): Likewise.
631         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
632
633 2017-10-26  Yao Qi  <yao.qi@linaro.org>
634
635         * breakpoint.c (breakpoint_location_address_match): Change
636         "struct address_space *" to "const address_space".
637         (breakpoint_location_address_range_overlap): Likewise.
638         (breakpoint_here_p): Likewise.
639         (breakpoint_in_range_p): Likewise.
640         (moribund_breakpoint_here_p): Likewise.
641         (bp_location_inserted_here_p): Likewise.
642         (software_breakpoint_inserted_here_p): Likewise.
643         (hardware_breakpoint_inserted_here_p): Likewise.
644         (hardware_watchpoint_inserted_in_range): Likewise.
645         (bpstat_check_location): Likewise.
646         (bpstat_stop_status): Likewise.
647         (breakpoint_address_match): Likewise.
648         (breakpoint_address_match_range): Likewise.
649         (breakpoint_location_address_match): Likewise.
650         (breakpoint_location_address_range_overlap): Likewise.
651         (insert_single_step_breakpoint): Likewise.
652         (breakpoint_has_location_inserted_here): Likewise.
653         (single_step_breakpoint_inserted_here_p): Likewise.
654         (pc_at_non_inline_function): Likewise.
655         * breakpoint.h (bpstat_stop_status): Update declaration.
656         (breakpoint_here_p): Likewise.
657         (breakpoint_in_range_p): Likewise.
658         (moribund_breakpoint_here_p): Likewise.
659         (breakpoint_inserted_here_p): Likewise.
660         (software_breakpoint_inserted_here_p): Likewise.
661         (hardware_breakpoint_inserted_here_p): Likewise.
662         (breakpoint_has_location_inserted_here): Likewise.
663         (single_step_breakpoint_inserted_here_p): Likewise.
664         (hardware_watchpoint_inserted_in_range): Likewise.
665         (breakpoint_address_match): Likewise.
666         (insert_single_step_breakpoint): Likewise.
667         (pc_at_non_inline_function): Likewise.
668         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
669         * record.c (record_check_stopped_by_breakpoint): Likewise.
670         * record.h (record_check_stopped_by_breakpoint): Likewise.
671         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
672
673 2017-10-25  Yao Qi  <yao.qi@linaro.org>
674
675         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
676         regcache->arch () instead get_regcache_arch.
677         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
678         Likewise.
679         (aarch64_fbsd_store_inferior_registers): Likewise.
680         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
681         (store_gregs_to_thread): Likewise.
682         (fetch_fpregs_from_thread): Likewise.
683         (store_fpregs_to_thread): Likewise.
684         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
685         (aarch64_store_return_value): Likewise.
686         (aarch64_software_single_step): Likewise.
687         * aix-thread.c (aix_thread_wait): Likewise.
688         (supply_reg32): Likewise.
689         (supply_sprs64): Likewise.
690         (supply_sprs32): Likewise.
691         (fill_gprs64): Likewise.
692         (fill_gprs32): Likewise.
693         (fill_sprs64): Likewise.
694         (fill_sprs32): Likewise.
695         (store_regs_user_thread): Likewise.
696         (store_regs_kernel_thread): Likewise.
697         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
698         (alphabsd_store_inferior_registers): Likewise.
699         * alpha-tdep.c (alpha_extract_return_value): Likewise.
700         (alpha_store_return_value): Likewise.
701         (alpha_deal_with_atomic_sequence): Likewise.
702         (alpha_next_pc): Likewise.
703         (alpha_software_single_step): Likewise.
704         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
705         (amd64bsd_store_inferior_registers): Likewise.
706         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
707         Likewise.
708         (amd64_linux_store_inferior_registers): Likewise.
709         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
710         (amd64_collect_native_gregset): Likewise.
711         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
712         (amd64obsd_collect_uthread): Likewise.
713         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
714         (amd64_collect_fpregset): Likewise.
715         (amd64_supply_fxsave): Likewise.
716         (amd64_supply_xsave): Likewise.
717         (amd64_collect_fxsave): Likewise.
718         (amd64_collect_xsave): Likewise.
719         * arc-tdep.c (arc_write_pc): Likewise.
720         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
721         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
722         (arm_fbsd_store_inferior_registers): Likewise.
723         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
724         (store_vfp_regs): Likewise.
725         (arm_linux_fetch_inferior_registers): Likewise.
726         (arm_linux_store_inferior_registers): Likewise.
727         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
728         (arm_linux_sigreturn_next_pc): Likewise.
729         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
730         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
731         (fetch_register): Likewise.
732         (store_register): Likewise.
733         * arm-tdep.c (arm_is_thumb): Likewise.
734         (displaced_in_arm_mode): Likewise.
735         (bx_write_pc): Likewise.
736         (arm_get_next_pcs_addr_bits_remove): Likewise.
737         (arm_software_single_step): Likewise.
738         (arm_extract_return_value): Likewise.
739         (arm_store_return_value): Likewise.
740         (arm_write_pc): Likewise.
741         * bfin-tdep.c (bfin_extract_return_value): Likewise.
742         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
743         (bsd_uthread_store_registers): Likewise.
744         * core-regset.c (fetch_core_registers): Likewise.
745         * corelow.c (get_core_registers): Likewise.
746         * cris-tdep.c (cris_store_return_value): Likewise.
747         (cris_extract_return_value): Likewise.
748         (find_step_target): Likewise.
749         (find_step_target): Likewise.
750         (cris_software_single_step): Likewise.
751         * ctf.c (ctf_fetch_registers): Likewise.
752         * darwin-nat.c (cancel_breakpoint): Likewise.
753         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
754         * frv-tdep.c (frv_extract_return_value): Likewise.
755         * ft32-tdep.c (ft32_store_return_value): Likewise.
756         (ft32_extract_return_value): Likewise.
757         * go32-nat.c (fetch_register): Likewise.
758         (go32_fetch_registers): Likewise.
759         (go32_store_registers): Likewise.
760         (store_register): Likewise.
761         * h8300-tdep.c (h8300_extract_return_value): Likewise.
762         (h8300_store_return_value): Likewise.
763         * hppa-linux-nat.c (fetch_register): Likewise.
764         (store_register): Likewise.
765         (hppa_linux_fetch_inferior_registers): Likewise.
766         (hppa_linux_store_inferior_registers): Likewise.
767         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
768         (i386_darwin_store_inferior_registers): Likewise.
769         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
770         (gnu_store_registers): Likewise.
771         * i386-linux-nat.c (fetch_register): Likewise.
772         (store_register): Likewise.
773         (supply_gregset): Likewise.
774         (fill_gregset): Likewise.
775         (i386_linux_fetch_inferior_registers): Likewise.
776         (i386_linux_store_inferior_registers): Likewise.
777         (i386_linux_resume): Likewise.
778         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
779         Likewise.
780         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
781         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
782         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
783         (i386obsd_collect_uthread): Likewise.
784         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
785         (i386_supply_gregset): Likewise.
786         (i386_collect_gregset): Likewise.
787         (i386_supply_fpregset): Likewise.
788         (i386_collect_fpregset): Likewise.
789         (i386_mpx_bd_base): Likewise.
790         * i386-v4-nat.c (supply_fpregset): Likewise.
791         (fill_fpregset): Likewise.
792         * i387-tdep.c (i387_supply_fsave): Likewise.
793         (i387_collect_fsave): Likewise.
794         (i387_supply_fxsave): Likewise.
795         (i387_collect_fxsave): Likewise.
796         (i387_supply_xsave): Likewise.
797         (i387_collect_xsave): Likewise.
798         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
799         (ia64_linux_store_registers): Likewise.
800         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
801         (ia64_extract_return_value): Likewise.
802         (ia64_store_return_value): Likewise.
803         (find_func_descr): Likewise.
804         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
805         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
806         (inf_ptrace_store_registers): Likewise.
807         * infrun.c (use_displaced_stepping): Likewise.
808         (displaced_step_prepare_throw): Likewise.
809         (resume): Likewise.
810         (proceed): Likewise.
811         (do_target_wait): Likewise.
812         (adjust_pc_after_break): Likewise.
813         (handle_inferior_event_1): Likewise.
814         (handle_signal_stop): Likewise.
815         (save_infcall_suspend_state): Likewise.
816         (restore_infcall_suspend_state): Likewise.
817         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
818         * jit.c (jit_frame_prev_register): Likewise.
819         * linux-nat.c (save_stop_reason): Likewise.
820         (linux_nat_wait_1): Likewise.
821         (resume_stopped_resumed_lwps): Likewise.
822         * linux-record.c (record_linux_sockaddr): Likewise.
823         (record_linux_msghdr): Likewise.
824         (record_linux_system_call): Likewise.
825         * linux-tdep.c (linux_collect_thread_registers): Likewise.
826         * lm32-tdep.c (lm32_extract_return_value): Likewise.
827         (lm32_store_return_value): Likewise.
828         * m32c-tdep.c (m32c_read_flg): Likewise.
829         (m32c_pseudo_register_read): Likewise.
830         (m32c_pseudo_register_write): Likewise.
831         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
832         (m32r_linux_collect_gregset): Likewise.
833         * m32r-tdep.c (m32r_store_return_value): Likewise.
834         (m32r_extract_return_value): Likewise.
835         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
836         (m68kbsd_collect_fpregset): Likewise.
837         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
838         * m68k-linux-nat.c (fetch_register): Likewise.
839         (old_fetch_inferior_registers): Likewise.
840         (old_store_inferior_registers): Likewise.
841         (store_regs): Likewise.
842         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
843         (m68k_svr4_store_return_value): Likewise.
844         * m88k-tdep.c (m88k_store_arguments): Likewise.
845         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
846         (mi_cmd_data_write_register_values): Likewise.
847         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
848         (mips_fbsd_store_inferior_registers): Likewise.
849         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
850         (mips_fbsd_supply_gregs): Likewise.
851         (mips_fbsd_collect_fpregs): Likewise.
852         (mips_fbsd_collect_gregs): Likewise.
853         (mips_fbsd_supply_fpregset): Likewise.
854         (mips_fbsd_collect_fpregset): Likewise.
855         (mips_fbsd_supply_gregset): Likewise.
856         (mips_fbsd_collect_gregset): Likewise.
857         * mips-linux-nat.c (supply_gregset): Likewise.
858         (fill_gregset): Likewise.
859         (supply_fpregset): Likewise.
860         (fill_fpregset): Likewise.
861         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
862         (mips_fill_gregset): Likewise.
863         (mips_supply_fpregset): Likewise.
864         (mips_fill_fpregset): Likewise.
865         (mips64_supply_gregset): Likewise.
866         (micromips_linux_sigframe_validate): Likewise.
867         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
868         (mipsnbsd_fetch_inferior_registers): Likewise.
869         (mipsnbsd_store_inferior_registers): Likewise.
870         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
871         (mipsnbsd_supply_gregset): Likewise.
872         (mipsnbsd_iterate_over_regset_sections): Likewise.
873         (mipsnbsd_supply_reg): Likewise.
874         (mipsnbsd_supply_fpreg): Likewise.
875         * mips-tdep.c (mips_in_frame_stub): Likewise.
876         (mips_dummy_id): Likewise.
877         (is_octeon_bbit_op): Likewise.
878         (micromips_bc1_pc): Likewise.
879         (extended_mips16_next_pc): Likewise.
880         (mips16_next_pc): Likewise.
881         (deal_with_atomic_sequence): Likewise.
882         * moxie-tdep.c (moxie_process_readu): Likewise.
883         * nios2-tdep.c (nios2_get_next_pc): Likewise.
884         * nto-procfs.c (procfs_store_registers): Likewise.
885         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
886         (ppcfbsd_store_inferior_registers): Likewise.
887         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
888         (fetch_altivec_register): Likewise.
889         (get_spe_registers): Likewise.
890         (fetch_spe_register): Likewise.
891         (fetch_altivec_registers): Likewise.
892         (fetch_all_gp_regs): Likewise.
893         (fetch_all_fp_regs): Likewise.
894         (store_vsx_register): Likewise.
895         (store_altivec_register): Likewise.
896         (set_spe_registers): Likewise.
897         (store_spe_register): Likewise.
898         (store_altivec_registers): Likewise.
899         (store_all_gp_regs): Likewise.
900         (store_all_fp_regs): Likewise.
901         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
902         (ppc_linux_collect_gregset): Likewise.
903         (ppc_canonicalize_syscall): Likewise.
904         (ppc_linux_record_signal): Likewise.
905         (ppu2spu_prev_register): Likewise.
906         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
907         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
908         (ppcobsd_store_registers): Likewise.
909         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
910         Likewise.
911         (ppc_ravenscar_generic_store_registers): Likewise.
912         * procfs.c (procfs_fetch_registers): Likewise.
913         (procfs_store_registers): Likewise.
914         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
915         (ravenscar_store_registers): Likewise.
916         (ravenscar_prepare_to_store): Likewise.
917         * record-btrace.c (record_btrace_fetch_registers): Likewise.
918         * record-full.c (record_full_wait_1): Likewise.
919         (record_full_registers_change): Likewise.
920         (record_full_store_registers): Likewise.
921         (record_full_core_fetch_registers): Likewise.
922         (record_full_save): Likewise.
923         (record_full_goto_insn): Likewise.
924         * regcache.c (regcache_register_size): Likewise.
925         (get_regcache_arch): Remove.
926         (regcache_read_pc): Likewise.
927         * regcache.h (get_regcache_arch): Remove.
928         * remote-sim.c (gdbsim_fetch_register): Likewise.
929         (gdbsim_store_register): Likewise.
930         * remote.c (fetch_register_using_p): Likewise.
931         (send_g_packet): Likewise.
932         (remote_prepare_to_store): Likewise.
933         (store_registers_using_G): Likewise.
934         * reverse.c (save_bookmark_command): Likewise.
935         (goto_bookmark_command): Likewise.
936         * rs6000-aix-tdep.c (branch_dest): Likewise.
937         * rs6000-nat.c (rs6000_ptrace64): Likewise.
938         (fetch_register): Likewise.
939         * rs6000-tdep.c (ppc_supply_reg): Likewise.
940         (ppc_collect_reg): Likewise.
941         (ppc_collect_gregset): Likewise.
942         (ppc_collect_fpregset): Likewise.
943         (ppc_collect_vsxregset): Likewise.
944         (ppc_collect_vrregset): Likewise.
945         (ppc_displaced_step_hw_singlestep): Likewise.
946         (rs6000_pseudo_register_read): Likewise.
947         (rs6000_pseudo_register_write): Likewise.
948         * s390-linux-nat.c (supply_gregset): Likewise.
949         (fill_gregset): Likewise.
950         (s390_linux_fetch_inferior_registers): Likewise.
951         * s390-linux-tdep.c (s390_write_pc): Likewise.
952         (s390_software_single_step): Likewise.
953         (s390_all_but_pc_registers_record): Likewise.
954         (s390_linux_syscall_record): Likewise.
955         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
956         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
957         (shnbsd_store_inferior_registers): Likewise.
958         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
959         (sh_extract_return_value_fpu): Likewise.
960         (sh_store_return_value_nofpu): Likewise.
961         (sh_corefile_supply_regset): Likewise.
962         (sh_corefile_collect_regset): Likewise.
963         * sh64-tdep.c (sh64_extract_return_value): Likewise.
964         (sh64_store_return_value): Likewise.
965         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
966         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
967         (sparc_store_inferior_registers): Likewise.
968         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
969         (sparc_ravenscar_prepare_to_store): Likewise.
970         * sparc-tdep.c (sparc32_store_arguments): Likewise.
971         (sparc_analyze_control_transfer): Likewise.
972         (sparc_step_trap): Likewise.
973         (sparc_software_single_step): Likewise.
974         (sparc32_gdbarch_init): Likewise.
975         (sparc_supply_rwindow): Likewise.
976         (sparc_collect_rwindow): Likewise.
977         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
978         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
979         (sparc64nbsd_collect_gregset): Likewise.
980         (sparc64nbsd_supply_fpregset): Likewise.
981         (sparc64nbsd_collect_fpregset): Likewise.
982         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
983         (sparc64_supply_gregset): Likewise.
984         (sparc64_collect_gregset): Likewise.
985         (sparc64_supply_fpregset): Likewise.
986         (sparc64_collect_fpregset): Likewise.
987         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
988         * spu-tdep.c (spu_unwind_sp): Likewise.
989         (spu2ppu_prev_register): Likewise.
990         (spu_memory_remove_breakpoint): Likewise.
991         * stack.c (return_command): Likewise.
992         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
993         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
994         * tracefile.c (trace_save_ctf): Likewise.
995         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
996         (do_windows_store_inferior_registers): Likewise.
997         (windows_resume): Likewise.
998         * xtensa-linux-nat.c (fill_gregset): Likewise.
999         (supply_gregset_reg): Likewise.
1000         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
1001         (xtensa_register_read_masked): Likewise.
1002         (xtensa_supply_gregset): Likewise.
1003         (xtensa_extract_return_value): Likewise.
1004         (xtensa_store_return_value): Likewise.
1005
1006 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
1007
1008         * doublest.c (floatformat_from_string): New function.
1009         * doublest.h (floatformat_from_string): Add prototype.
1010
1011         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
1012         (OP_FLOAT): ... this.
1013         * expression.h: Do not include "doublest.h".
1014         (union exp_element): Replace doubleconst and decfloatconst by
1015         new element floatconst.
1016         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
1017         (ada_evaluate_subexp): Likewise.
1018         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
1019         OP_DOUBLE and OP_DECFLOAT.
1020         * expprint.c (print_subexp_standard): Likewise.
1021         (dump_subexp_body_standard): Likewise.
1022         * breakpoint.c (watchpoint_exp_is_const): Likewise.
1023
1024         * parse.c: Include "dfp.h".
1025         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1026         (write_exp_elt_floatcst): New function.
1027         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
1028         and OP_DECFLOAT.
1029         (operator_check_standard): Likewise.
1030         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
1031         Return target format buffer instead of host DOUBLEST.
1032         Use floatformat_from_string and decimal_from_string to parse
1033         either binary or decimal floating-point types.
1034         (parse_c_float): Remove.
1035         * parser-defs.h: Do not include "doublest.h".
1036         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
1037         (write_exp_elt_floatcst): Add prototype.
1038         (parse_float): Update prototype.
1039         (parse_c_float): Remove.
1040
1041         * c-exp.y: Do not include "dfp.h".
1042         (typed_val_float): Use byte buffer instead of DOUBLEST.
1043         (typed_val_decfloat): Remove.
1044         (DECFLOAT): Remove.
1045         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1046         (parse_number): Update to new parse_float interface.
1047         Parse suffixes and determine type before calling parse_float.
1048         Handle decimal and binary FP types the same way.
1049
1050         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1051         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
1052         (parse_number): Update to new parse_float interface.
1053         Parse suffixes and determine type before calling parse_float.
1054
1055         * f-exp.y: Replace dval by typed_val_float.
1056         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1057         (parse_number): Use parse_float instead of atof.
1058
1059         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1060         (parse_go_float): Remove.
1061         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1062         (parse_number): Call parse_float instead of parse_go_float.
1063         Parse suffixes and determine type before calling parse_float.
1064
1065         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1066         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1067         (parse_number): Update to new parse_float interface.
1068         Parse suffixes and determine type before calling parse_float.
1069
1070         * m2-exp.y: Replace dval by byte buffer val.
1071         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1072         (parse_number): Call parse_float instead of atof.
1073
1074         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
1075         (lex_number): Call parse_float instead of strtod.
1076         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
1077         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
1078         Use write_exp_elt_floatcst.
1079         (unit_testing): Remove static variable.
1080         (rust_type): Do not check unit_testing.
1081         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
1082
1083         * ada-exp.y (type_float, type_double): Remove.
1084         (typed_val_float): Use byte buffer instead of DOUBLEST.
1085         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
1086         * ada-lex.l (processReal): Use parse_float instead of sscanf.
1087
1088 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1089
1090         * aarch64-tdep.h (enum aarch64_regnum): Remove.
1091         * arch/aarch64.h: New file.
1092
1093 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1094
1095         * dfp.h (decimal_from_string): Use const reference for argument.
1096         * dfp.c (decimal_from_string): Likewise.
1097
1098 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1099
1100         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
1101         * sh64-tdep.c (sh64_do_fp_register): Likewise.
1102         * mips-tdep.c (mips_print_fp_register): Likewise.
1103
1104 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1105
1106         * common/format.h (enum argclass): Replace decfloat_arg by
1107         dec32float_arg, dec64float_arg, and dec128float_arg.
1108         * common/format.c (parse_format_string): Update to return
1109         new decimal float argument classes.
1110
1111         * printcmd.c (printf_decfloat): Rename to ...
1112         (printf_floating): ... this.  Add argclass argument, and use it
1113         instead of parsing the format string again.  Add support for
1114         binary floating-point values, using floatformat_to_string.
1115         Convert value to the target format if it doesn't already match.
1116         (ui_printf): Call printf_floating instead of printf_decfloat,
1117         also for double_arg / long_double_arg.  Pass argclass.
1118
1119         * dfp.c (decimal_to_string): Add format string argument.
1120         * dfp.h (decimal_to_string): Likewise.
1121
1122         * doublest.c (floatformat_to_string): Add format string argument.
1123         * doublest.h (floatformat_to_string): Likewise.
1124
1125 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1126
1127         * doublest.c (floatformat_precision): New routine.
1128         (floatformat_to_string): Likewise.
1129         * doublest.c (floatformat_to_string): Add prototype.
1130
1131         * printcmd.c (print_scalar_formatted): Only call print_floating
1132         on floating-point types.
1133         * valprint.c: Do not include "floatformat.h".
1134         (generic_val_print_decfloat): Remove.
1135         (generic_val_print): Call generic_val_print_float for both
1136         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
1137         (print_floating): Use floatformat_to_string.  Handle decimal float.
1138         (print_decimal_floating): Remove, merge into floatformat_to_string.
1139         * value.h (print_decimal_floating): Remove.
1140
1141         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
1142
1143 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
1144
1145         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
1146
1147 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1148
1149         * memattr.h: Don't include vec.h.
1150         (struct mem_attrib): Initialize fields.
1151         <unknown>: New static method.
1152         (struct mem_region): Add constructors, operator<, initialize
1153         fields.
1154         * memattr.c: Include algorithm.
1155         (default_mem_attrib, unknown_mem_attrib): Remove.
1156         (user_mem_region_list): New global.
1157         (target_mem_region_list, mem_region_list): Change type to
1158         std::vector<mem_region>.
1159         (mem_use_target): Now a function.
1160         (target_mem_regions_valid): Change type to bool.
1161         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
1162         (require_user_regions): Adjust.
1163         (require_target_regions): Adjust.
1164         (create_mem_region): Adjust.
1165         (lookup_mem_region): Adjust.
1166         (invalidate_target_mem_regions): Adjust.
1167         (mem_clear): Rename to...
1168         (user_mem_clear): ... this, and adjust.
1169         (mem_command): Adjust.
1170         (info_mem_command): Adjust.
1171         (mem_enable, enable_mem_command, mem_disable,
1172         disable_mem_command): Adjust.
1173         (mem_delete): Adjust.
1174         (delete_mem_command): Adjust.
1175         * memory-map.h (parse_memory_map): Return an std::vector.
1176         * memory-map.c (parse_memory_map): Likewise.
1177         (struct memory_map_parsing_data): Add constructor.
1178         <memory_map>: Point to std::vector.
1179         (memory_map_start_memory): Adjust.
1180         (memory_map_end_memory): Adjust.
1181         (memory_map_end_property): Adjust.
1182         (clear_result): Remove.
1183         * remote.c (remote_memory_map): Return an std::vector.
1184         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
1185         Remove.
1186         (target_debug_print_mem_region_vector): New.
1187         * target-delegates.c: Regenerate.
1188         * target.h (mem_region_vector): New typedef.
1189         (to_memory_map): Return mem_region_vector.
1190         (target_memory_map): Return an std::vector.
1191         * target.c (target_memory_map): Return an std::vector.
1192         (flash_erase_command): Adjust.
1193
1194 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1195
1196         * memory-map.c (struct memory_map_parsing_data) <property_name>:
1197         Change type to std::string.
1198         (memory_map_start_property): Adjust.
1199         (memory_map_end_property): Adjust.
1200
1201 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1202
1203         * infrun.h: Include common/byte-vector.h.
1204         (struct displaced_step_closure): New struct.
1205         (struct buf_displaced_step_closure): New struct.
1206         * infrun.c (displaced_step_closure::~displaced_step_closure):
1207         Provide default implementation.
1208         (displaced_step_clear): Deallocate step closure with delete.
1209         * aarch64-tdep.c (displaced_step_closure): Rename to ...
1210         (aarch64_displaced_step_closure): ... this, extend
1211         displaced_step_closure.
1212         (aarch64_displaced_step_data) <dsc>: Change type to
1213         aarch64_displaced_step_closure.
1214         (aarch64_displaced_step_copy_insn): Adjust to type change, use
1215         unique_ptr.
1216         (aarch64_displaced_step_fixup): Add cast for displaced step
1217         closure.
1218         * amd64-tdep.c (displaced_step_closure): Rename to ...
1219         (amd64_displaced_step_closure): ... this, extend
1220         displaced_step_closure.
1221         <insn_buf>: Change type to std::vector<gdb_byte>.
1222         <max_len>: Remove.
1223         (fixup_riprel): Change type of DSC parameter, adjust to type
1224         change of insn_buf.
1225         (fixup_displaced_copy): Change type of DSC parameter.
1226         (amd64_displaced_step_copy_insn): Instantiate
1227         amd64_displaced_step_closure.
1228         (amd64_displaced_step_fixup): Add cast for closure type, adjust
1229         to type change of insn_buf.
1230         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1231         parameter DSC.
1232         (arm_linux_copy_svc): Likewise.
1233         (cleanup_kernel_helper_return): Likewise.
1234         (arm_catch_kernel_helper_return): Likewise.
1235         (arm_linux_displaced_step_copy_insn): Instantiate
1236         arm_displaced_step_closure.
1237         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1238         (displaced_read_reg): Change type of parameter DSC.
1239         (branch_write_pc): Likewise.
1240         (load_write_pc): Likewise.
1241         (alu_write_pc): Likewise.
1242         (displaced_write_reg): Likewise.
1243         (arm_copy_unmodified): Likewise.
1244         (thumb_copy_unmodified_32bit): Likewise.
1245         (thumb_copy_unmodified_16bit): Likewise.
1246         (cleanup_preload): Likewise.
1247         (install_preload): Likewise.
1248         (arm_copy_preload): Likewise.
1249         (thumb2_copy_preload): Likewise.
1250         (install_preload_reg): Likewise.
1251         (arm_copy_preload_reg): Likewise.
1252         (cleanup_copro_load_store): Likewise.
1253         (install_copro_load_store): Likewise.
1254         (arm_copy_copro_load_store) Likewise.
1255         (thumb2_copy_copro_load_store): Likewise.
1256         (cleanup_branch): Likewise.
1257         (install_b_bl_blx): Likewise.
1258         (arm_copy_b_bl_blx): Likewise.
1259         (thumb2_copy_b_bl_blx): Likewise.
1260         (thumb_copy_b): Likewise.
1261         (install_bx_blx_reg): Likewise.
1262         (arm_copy_bx_blx_reg): Likewise.
1263         (thumb_copy_bx_blx_reg): Likewise.
1264         (cleanup_alu_imm): Likewise.
1265         (arm_copy_alu_imm): Likewise.
1266         (thumb2_copy_alu_imm): Likewise.
1267         (cleanup_alu_reg): Likewise.
1268         (install_alu_reg): Likewise.
1269         (arm_copy_alu_reg): Likewise.
1270         (thumb_copy_alu_reg): Likewise.
1271         (cleanup_alu_shifted_reg): Likewise.
1272         (install_alu_shifted_reg): Likewise.
1273         (arm_copy_alu_shifted_reg): Likewise.
1274         (cleanup_load): Likewise.
1275         (cleanup_store): Likewise.
1276         (arm_copy_extra_ld_st): Likewise.
1277         (install_load_store): Likewise.
1278         (thumb2_copy_load_literal): Likewise.
1279         (thumb2_copy_load_reg_imm): Likewise.
1280         (arm_copy_ldr_str_ldrb_strb): Likewise.
1281         (cleanup_block_load_all): Likewise.
1282         (cleanup_block_store_pc): Likewise.
1283         (cleanup_block_load_pc): Likewise.
1284         (arm_copy_block_xfer): Likewise.
1285         (thumb2_copy_block_xfer): Likewise.
1286         (cleanup_svc): Likewise.
1287         (install_svc): Likewise.
1288         (arm_copy_svc): Likewise.
1289         (thumb_copy_svc): Likewise.
1290         (arm_copy_undef): Likewise.
1291         (thumb_32bit_copy_undef): Likewise.
1292         (arm_copy_unpred): Likewise.
1293         (arm_decode_misc_memhint_neon): Likewise.
1294         (arm_decode_unconditional): Likewise.
1295         (arm_decode_miscellaneous): Likewise.
1296         (arm_decode_dp_misc): Likewise.
1297         (arm_decode_ld_st_word_ubyte): Likewise.
1298         (arm_decode_media): Likewise.
1299         (arm_decode_b_bl_ldmstm): Likewise.
1300         (arm_decode_ext_reg_ld_st): Likewise.
1301         (thumb2_decode_dp_shift_reg): Likewise.
1302         (thumb2_decode_ext_reg_ld_st): Likewise.
1303         (arm_decode_svc_copro): Likewise.
1304         (thumb2_decode_svc_copro): Likewise.
1305         (install_pc_relative): Likewise.
1306         (thumb_copy_pc_relative_16bit): Likewise.
1307         (thumb_decode_pc_relative_16bit): Likewise.
1308         (thumb_copy_pc_relative_32bit): Likewise.
1309         (thumb_copy_16bit_ldr_literal): Likewise.
1310         (thumb_copy_cbnz_cbz): Likewise.
1311         (thumb2_copy_table_branch): Likewise.
1312         (cleanup_pop_pc_16bit_all): Likewise.
1313         (thumb_copy_pop_pc_16bit): Likewise.
1314         (thumb_process_displaced_16bit_insn): Likewise.
1315         (decode_thumb_32bit_ld_mem_hints): Likewise.
1316         (thumb_process_displaced_32bit_insn): Likewise.
1317         (thumb_process_displaced_insn): Likewise.
1318         (arm_process_displaced_insn): Likewise.
1319         (arm_displaced_init_closure): Likewise.
1320         (arm_displaced_step_fixup): Add cast for closure.
1321         * arm-tdep.h: Include infrun.h.
1322         (displaced_step_closure): Rename to ...
1323         (arm_displaced_step_closure): ... this, extend
1324         displaced_step_closure.
1325         <u::svc::copy_svc_os>: Change type of parameter DSC.
1326         <cleanup>: Likewise.
1327         (arm_process_displaced_insn): Likewise.
1328         (arm_displaced_init_closure): Likewise.
1329         (displaced_read_reg): Likewise.
1330         (displaced_write_reg): Likewise.
1331         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1332         Adjust.
1333         * i386-tdep.h: Include infrun.h.
1334         (i386_displaced_step_closure): New typedef.
1335         * i386-tdep.c (i386_displaced_step_copy_insn): Use
1336         i386_displaced_step_closure.
1337         (i386_displaced_step_fixup): Adjust.
1338         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1339         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1340         and unique_ptr.
1341         (ppc_displaced_step_fixup): Adjust.
1342         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1343         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1344         and unique_ptr.
1345         (s390_displaced_step_fixup): Adjust.
1346
1347 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
1348
1349         * interps.h (interp_resume, interp_suspend, interp_set_temp):
1350         Remove declarations.
1351
1352 2017-10-20  Tom Tromey  <tom@tromey.com>
1353
1354         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1355         std::vector.
1356         (gdb_bfd_record_inclusion): Update.
1357         (bfdp): Remove typedef.
1358
1359 2017-10-20  Tom Tromey  <tom@tromey.com>
1360
1361         * gdb_bfd.c (gdb_bfd_ref): Use new.
1362         (struct gdb_bfd_data): Add constructor, destructor, and member
1363         initializers.
1364         (gdb_bfd_unref): Use delete.
1365
1366 2017-10-20  Tom Tromey  <tom@tromey.com>
1367
1368         * exec.c (exec_file_attach): Use new_bfd_ref.
1369         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1370         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1371         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1372         new_bfd_ref.
1373         * gdb_bfd.h (new_bfd_ref): New function.
1374
1375 2017-10-20  Pedro Alves  <palves@redhat.com>
1376
1377         * main.c (captured_command_loop): Add attribute noinline.
1378
1379 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
1380
1381         * interps.c (struct interp_factory): Add constructor.
1382         (interp_factory_p): Remove typedef.
1383         (DEF_VEC_P(interp_factory_p)): Remove.
1384         (interpreter_factories): Change type to std::vector.
1385         (interp_factory_register): Adjust.
1386         (interp_lookup): Adjust.
1387         (interpreter_completer): Adjust.
1388
1389 2017-10-19  Tom Tromey  <tom@tromey.com>
1390
1391         * break-catch-syscall.c (catch_syscall_completer): Use
1392         std::string, gdb::unique_xmalloc_ptr.
1393
1394 2017-10-19  Tom Tromey  <tom@tromey.com>
1395
1396         * infcall.c (call_function_by_hand_dummy): Use std::string.
1397
1398 2017-10-19  Tom Tromey  <tom@tromey.com>
1399
1400         * mi/mi-main.c (mi_cmd_execute): Update.
1401         * top.h (prepare_execute_command): Return scoped_value_mark.
1402         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1403         Add move constructor.
1404         * top.c (prepare_execute_command): Return scoped_value_mark.
1405         (execute_command): Update.
1406
1407 2017-10-19  Pedro Alves  <palves@redhat.com>
1408
1409         * xml-support.c (xml_fetch_content_from_file): Check fread's
1410         return.
1411
1412 2017-10-19  Pedro Alves  <palves@redhat.com>
1413
1414         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1415         async.
1416         (handle_error_fd): New function.
1417         (ser_base_async): Add/delete an event loop file handler for
1418         error_fd.
1419
1420 2017-10-19  Pedro Alves  <palves@redhat.com>
1421
1422         * xml-support.c (xml_fetch_content_from_file): Don't read in
1423         chunks.  Instead use fseek to determine the file's size, and read
1424         it in one go.
1425
1426 2017-11-18  Keith Seitz  <keiths@redhat.com>
1427
1428         * c-exp.y (oper): Canonicalize conversion operators of user-defined
1429         types.
1430         Add whitespace to front of type name.
1431
1432 2017-10-18  Keith Seitz  <keiths@redhat.com>
1433
1434         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1435         DW_AT_accessibility.
1436
1437 2017-10-18  Yao Qi  <yao.qi@linaro.org>
1438
1439         * features/tic6x-c62x-linux.c: Remove.
1440
1441 2017-10-17  Tom Tromey  <tom@tromey.com>
1442
1443         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1444         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1445         (do_mixed_source_and_assembly): Likewise.
1446
1447 2017-10-17  Tom Tromey  <tom@tromey.com>
1448
1449         * regcache.c (regcache::xfer_part): Remove assertion.
1450
1451 2017-10-17  Pedro Alves  <palves@redhat.com>
1452
1453         * xml-support.c (xml_fetch_content_from_file): Call
1454         unique_ptr::release() instead unique_ptr::get() when passing
1455         through xrealloc.
1456
1457 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1458
1459         * regcache.c (regcache::xfer_part): Remove parameters read and
1460         write, add parameter is_raw.  All callers are updated.
1461
1462 2017-10-16  Keith Seitz  <keiths@redhat.com>
1463
1464         * c-typeprint.c (enum access_specifier): Moved here from
1465         c_type_print_base.
1466         (output_access_specifier): New function.
1467         (c_type_print_base): Consider typedefs when assessing
1468         whether access labels are needed.
1469         Use output_access_specifier as needed.
1470         Output access specifier for typedefs, if needed.
1471         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1472         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1473         fields.
1474         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1475         accessor macros.
1476
1477 2017-10-16  Tom Tromey  <tom@tromey.com>
1478
1479         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1480         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1481         * target.c (target_fileio_read_stralloc): Update.
1482         * sparc64-tdep.c (adi_is_addr_mapped): Update.
1483         * target.h (target_fileio_read_stralloc): Return
1484         unique_xmalloc_ptr.
1485
1486 2017-10-16  Tom Tromey  <tom@tromey.com>
1487
1488         * xml-syscall.c (xml_init_syscalls_info): Update.
1489         * xml-support.c (xinclude_start_include): Update.
1490         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1491         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1492         (xml_fetch_content_from_file): Likewise.
1493         * osdata.c (get_osdata): Update.
1494         * target.h (target_read_stralloc, target_get_osdata): Return
1495         unique_xmalloc_ptr.
1496         * solib-aix.c (solib_aix_get_library_list): Update.
1497         * solib-target.c (solib_target_current_sos): Update.
1498         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1499         * xml-tdesc.c (fetch_available_features_from_target): Update.
1500         (target_fetch_description_xml): Update.
1501         (file_read_description_xml): Update.
1502         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1503         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1504         (remote_pid_to_exec_file): Update.
1505         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1506         (target_get_osdata): Likewise.
1507
1508 2017-10-16  Tom Tromey  <tom@tromey.com>
1509
1510         * remote.c (remote_register_number_and_offset): Use std::vector.
1511         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1512         (putpkt_binary): Use gdb::def_vector.
1513         (compare_sections_command): Use gdb::byte_vector.
1514
1515 2017-10-16  Tom Tromey  <tom@tromey.com>
1516
1517         * ppc-linux-nat.c (hwdebug_insert_point): Use
1518         gdb::unique_xmalloc_ptr, XDUP.
1519
1520 2017-10-16  Tom Tromey  <tom@tromey.com>
1521
1522         * probe.c (parse_probes): Use std::string.
1523         (info_probes_for_ops, enable_probes_command)
1524         (disable_probes_command): Remove cleanups.
1525
1526 2017-10-16  Tom Tromey  <tom@tromey.com>
1527
1528         * buildsym.c (block_compar): Remove.
1529         (end_symtab_get_static_block): Use std::vector.
1530
1531 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
1532
1533         * memrange.h (struct mem_range): Define operator< and operator==.
1534         (mem_range_s): Remove.
1535         (DEF_VEC_O (mem_range_s)): Remove.
1536         (normalize_mem_ranges): Change parameter type to std::vector.
1537         * memrange.c (compare_mem_ranges): Remove.
1538         (normalize_mem_ranges): Change parameter type to std::vector,
1539         adjust to vector change.
1540         * exec.c (section_table_available_memory): Return vector, remove
1541         parameter.
1542         (section_table_read_available_memory): Adjust to std::vector
1543         change.
1544         * remote.c (remote_read_bytes): Adjust to std::vector
1545         change.
1546         * tracepoint.h (traceframe_available_memory): Change parameter
1547         type to std::vector.
1548         * tracepoint.c (traceframe_available_memory): Change parameter
1549         type to std::vector, adjust.
1550         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1551         std::vector change.
1552         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1553         unittests/memrange-selftests.c.
1554         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1555         * gdb/unittests/memrange-selftests.c: New file.
1556
1557 2017-10-16  Pedro Alves  <palves@redhat.com>
1558
1559         * elfread.c (probe_key_free): Rename range-for variable.
1560         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1561         (find_probe_by_pc, collect_probes): Rename range-for variable.
1562
1563 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1564
1565         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1566         * features/tic6x-c62x.c: Remove.
1567         * features/tic6x-c64x-linux.c: Remove.
1568         * features/tic6x-c64x.c: Remove.
1569         * features/tic6x-c64xp-linux.c: Remove.
1570         * features/tic6x-c64xp.c: Remove.
1571         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1572         initialize_tdesc_tic6x_*_linux functions.
1573         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1574         initialize_tdesc_tic6x_* functions.
1575
1576 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1577
1578         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1579         tic6x-c62x.
1580         * regformats/tic6x-c62x.dat: Remove.
1581         * regformats/tic6x-c64x.dat: Remove.
1582         * regformats/tic6x-c64xp.dat: Remove.
1583
1584 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
1585
1586         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1587         (the !HAVE_LIBEXPAT version).
1588
1589 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1590
1591         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1592         const.
1593
1594 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1595
1596         * target.h: Include tracepoint.h.
1597         (enum trace_find_type): Move to tracepoint.h.
1598         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1599         * tracepoint.h: Don't include target.h
1600         (enum trace_find_type): Move from target.h.
1601         (parse_traceframe_info): Return a unique ptr.
1602         * tracepoint.c (current_traceframe_info): Change type to unique
1603         ptr.
1604         (free_traceframe_info): Remove.
1605         (clear_traceframe_info): Don't manually free
1606         current_traceframe_info.
1607         (free_result): Remove.
1608         (parse_traceframe_info): Return a unique ptr.
1609         (get_traceframe_info): Adjust to unique ptr.
1610         * ctf.c (ctf_traceframe_info): Return a unique ptr.
1611         * remote.c (remote_traceframe_info): Return a unique ptr.
1612         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1613         ptr.
1614         * target-debug.h (target_debug_print_traceframe_info_up): New
1615         macro.
1616         * target-delegates.c: Regenerate.
1617
1618 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1619
1620         * memrange.h (struct mem_range): Add constructors.
1621         * tracepoint.h (struct traceframe_info) <memory>: Change type to
1622         std::vector<mem_range>.
1623         * tracepoint.c (free_traceframe_info): Don't manually free
1624         vector.
1625         (traceframe_info_start_memory): Adjust to vector change.
1626         (traceframe_available_memory): Likewise.
1627         * tracefile-tfile.c (build_traceframe_info): Likewise.
1628         * ctf.c (ctf_traceframe_info): Likewise.
1629
1630 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1631
1632         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1633         std::vector<int>.
1634         * tracepoint.c (free_traceframe_info): Deallocate with delete.
1635         (traceframe_info_start_tvar): Adjust to vector change.
1636         (parse_traceframe_info): Allocate with new.
1637         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1638         vector change.
1639         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1640         change.
1641         tfile_traceframe_info): Allocate with new.
1642         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1643         change.
1644
1645 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1646
1647         * tracepoint.c (traceframe_info): Rename to...
1648         (current_traceframe_info): ...this.
1649         (clear_traceframe_info): Adjust.
1650         (get_traceframe_info): Adjust.
1651
1652 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1653
1654         * nat/linux-osdata.c: Include algorithm.
1655         (compare_processes): Remove.
1656         (struct pid_pgid_entry): New struct.
1657         (linux_xfer_osdata_processgroups): Use std::vector instead of
1658         XNEWVEC.
1659
1660 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
1661
1662         * objfiles.h: Don't include symfile.h.
1663         (struct partial_symbol): Remove forward-declaration.
1664         (struct objfile) <global_psymbols, static_psymbols>: Change type
1665         to std::vector<partial_symbol *>.
1666         * objfiles.c (objfile::objfile): Don't memset those fields.
1667         (objfile::~objfile): Don't free those fields.
1668         * psympriv.h (struct psymbol_allocation_list): Remove
1669         forward-declaration.
1670         (add_psymbol_to_list): Change psymbol_allocation_list parameter
1671         to std::vector.
1672         (start_psymtab_common): Change parameters to std::vector.
1673         * psymtab.c: Include algorithm.
1674         (require_partial_symbols): Call shrink_to_fit.
1675         (find_pc_sect_psymbol): Adjust to vector change.
1676         (match_partial_symbol): Likewise.
1677         (lookup_partial_symbol): Likewise.
1678         (psym_relocate): Likewise.
1679         (dump_psymtab): Likewise.
1680         (recursively_search_psymtabs): Likewise.
1681         (compare_psymbols): Remove.
1682         (sort_pst_symbols): Adjust to vector change.
1683         (start_psymtab_common): Likewise.
1684         (end_psymtab_common): Likewise.
1685         (psymbol_bcache_full): De-constify return value.
1686         (add_psymbol_to_bcache): Likewise.
1687         (extend_psymbol_list): Remove.
1688         (append_psymbol_to_list): Adjust to vector change.
1689         (add_psymbol_to_list): Likewise.
1690         (init_psymbol_list): Likewise.
1691         (maintenance_info_psymtabs): Likewise.
1692         (maintenance_check_psymtabs): Likewise.
1693         * symfile.h (struct psymbol_allocation_list): Remove.
1694         * symfile.c (reread_symbols): Adjust to vector change.
1695         * dbxread.c (start_psymtab): Change type of parameters.
1696         (dbx_symfile_read): Adjust to vector change.
1697         (read_dbx_symtab): Likewise.
1698         (start_psymtab): Change type of parameters.
1699         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1700         (create_partial_symtab): Likewise.
1701         (add_partial_symbol): Likewise.
1702         (write_one_signatured_type): Likewise.
1703         (recursively_write_psymbols): Likewise.
1704         * mdebugread.c (parse_partial_symbols): Likewise.
1705         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1706         (scan_xcoff_symtab): Adjust to vector change.
1707         (xcoff_initial_scan): Likewise.
1708
1709 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
1710
1711         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1712
1713 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1714
1715         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1716         Remove s390x-*-expedite, add s390x-expedite.
1717
1718 2017-10-13  Yao Qi  <yao.qi@linaro.org>
1719
1720         * features/s390-gs-linux64.c: Regenerated.
1721         * features/s390x-gs-linux64.c: Regenerated.
1722
1723 2017-10-13  Tom Tromey  <tom@tromey.com>
1724
1725         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1726         * solib.c (update_solib_list, reload_shared_libraries_1): Use
1727         delete.
1728         * symfile.c (symbol_file_add_with_addrs): Use new.
1729         (symbol_file_add_separate): Update comment.
1730         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1731         * jit.c (jit_object_close_impl): Use new.
1732         (jit_unregister_code): Use delete.
1733         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1734         (~objfile): Rename from free_objfile.
1735         (free_objfile_separate_debug, do_free_objfile_cleanup)
1736         (free_all_objfiles, objfile_purge_solibs): Use delete.
1737         * objfiles.h (struct objfile): Add constructor and destructor.
1738         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
1739         (allocate_objfile, free_objfile): Don't declare.
1740         (struct objstats): Add initializers.
1741
1742 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1743
1744         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1745         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1746         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1747         * gdbarch.h: Regenerate.
1748         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1749         Adjust comment.
1750         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1751         (i386_displaced_step_fixup): Adjust comment.
1752         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1753
1754 2017-10-12  Tom Tromey  <tom@tromey.com>
1755
1756         * prologue-value.h (pv_area::store_would_trash): Return bool.
1757         (pv_area::find_reg): Likewise.
1758         * prologue-value.c (pv_area::store_would_trash): Return bool.
1759         (pv_area::find_reg): Likewise.
1760
1761 2017-10-12  Tom Tromey  <tom@tromey.com>
1762
1763         * s390-linux-tdep.c (s390_store, s390_load)
1764         (s390_check_for_saved, s390_analyze_prologue): Update.
1765         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1766         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1767         * prologue-value.h (class pv_area): Move from prologue-value.c.
1768         Change names of members.  Add constructor, destructor, member
1769         functions.
1770         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1771         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1772         (pv_area_fetch, pv_area_scan): Don't declare.
1773         * prologue-value.c (struct pv_area::area_entry): Now member of
1774         pv_area.
1775         (struct pv_area): Move to prologue-value.h.
1776         (pv_area::pv_area): Rename from make_pv_area.
1777         (pv_area::~pv_area): Rename from free_pv_area.
1778         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1779         (clear_entries, find_entry, overlaps, store_would_trash, store)
1780         (fetch, find_reg, scan): Now member of pv_area.
1781         Remove "area" argument.  Update.
1782         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1783         Update.
1784         * mn10300-tdep.c (push_reg, check_for_saved)
1785         (mn10300_analyze_prologue): Update.
1786         * mep-tdep.c (is_arg_spill, check_for_saved)
1787         (mep_analyze_prologue): Update.
1788         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1789         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1790         (m32c_is_struct_return, m32c_analyze_prologue): Update.
1791         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1792         Update.
1793         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1794         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1795
1796 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1797
1798         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1799         * linux-nat.c (linux_nat_delete_thread): New variable.
1800         (lwp_free): Invoke linux_nat_delete_thread if set.
1801         (linux_nat_set_delete_thread): New function.
1802         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1803         thread delete callback.
1804         * arm-linux-nat.c (arm_linux_delete_thread): New function.
1805         (_initialize_arm_linux_nat): Assign thread delete callback.
1806         * s390-linux-nat.c (s390_delete_thread): New function.
1807         (_initialize_s390_nat): Assign thread delete callback.
1808         * x86-linux-nat.c (x86_linux_add_target): Likewise.
1809         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1810         function.
1811         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1812         declaration.
1813         * nat/x86-linux.c (x86_linux_delete_thread): New function.
1814         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1815
1816 2017-10-09  Tom Tromey  <tom@tromey.com>
1817
1818         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1819         std::string.
1820         * tui/tui-layout.c (enum tui_status): Use std::string.
1821
1822 2017-10-11  Tom Tromey  <tom@tromey.com>
1823
1824         * gdbthread.h (thread_command): Constify.
1825         * inferior.h (detach_command): Constify.
1826         * top.h (set_history, show_history): Constify.
1827         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1828         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1829         * bsd-kvm.c (bsd_kvm_cmd): Constify.
1830         * printcmd.c (set_command): Constify.
1831         (non_const_set_command): New function.
1832         * dcache.c (set_dcache_command, show_dcache_command): Constify.
1833         * breakpoint.c (enable_command, disable_command, delete_command)
1834         (catch_command, tcatch_command, set_breakpoint_cmd)
1835         (show_breakpoint_cmd): Constify.
1836         * macrocmd.c (macro_command): Constify.
1837         * infcmd.c (unset_command, kill_command, detach_command)
1838         (info_proc_cmd): Constify.
1839         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1840         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1841         (info_auto_load_cmd): Constify.
1842         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1843         (unset_tdesc_cmd): Constify.
1844         * ada-lang.c (set_ada_command, show_ada_command)
1845         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1846         * guile/guile.c (set_guile_command, show_guile_command)
1847         (info_guile_command): Constify.
1848         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1849         Constify.
1850         * skip.c (skip_command): Constify.
1851         * compile/compile.c (_initialize_compile): Constify.
1852         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1853         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1854         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1855         (maint_btrace_pt_show_cmd): Constify.
1856         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1857         Constify.
1858         * python/python.c (user_show_python, user_set_python): Constify.
1859         * mips-tdep.c (set_mips_command, show_mips_command)
1860         (set_mipsfpu_command): Constify.
1861         * record-btrace.c (cmd_record_btrace_start)
1862         (cmd_set_record_btrace, cmd_show_record_btrace)
1863         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1864         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1865         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1866         Constify.
1867         * symfile.c (overlay_command): Constify.
1868         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1869         * cli/cli-logging.c (set_logging_command, show_logging_command):
1870         Constify.
1871         * cli/cli-dump.c (dump_command, append_command)
1872         (srec_dump_command, ihex_dump_command, verilog_dump_command)
1873         (tekhex_dump_command, binary_dump_command)
1874         (binary_append_command): Constify.
1875         * cli/cli-decode.c (struct cmd_list_element): Change type of
1876         "fun".
1877         * cli/cli-cmds.c (info_command, show_command, set_debug)
1878         (show_debug): Constify.
1879         (show_command): Add non-const overload.
1880         * top.c (set_history, show_history): Constify.
1881         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1882         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1883         * target.c (target_command): Constify.
1884         * sparc64-tdep.c (info_adi_command): Constify.
1885         * record-full.c (cmd_record_full_start): Constify.
1886         (set_record_full_command): Constify.  Fix typo.
1887         (show_record_full_command): Constify.
1888         * thread.c (thread_command, thread_apply_command): Constify.
1889         * memattr.c (dummy_cmd): Constify.
1890         * value.c (function_command): Constify.
1891         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1892         * probe.c (info_probes_command): Constify.
1893         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1894         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1895         (show_thread_cmd, set_thread_default_cmd)
1896         (show_thread_default_cmd): Constify.
1897         (check_empty): Constify.
1898         * tracepoint.c (tfind_command): Constify.
1899         * cp-support.c (maint_cplus_command): Constify.
1900         * windows-tdep.c (info_w32_command): Constify.
1901         * record.c (cmd_record_start, set_record_command)
1902         (show_record_command, info_record_command, cmd_record_goto):
1903         Constify.
1904         * ravenscar-thread.c (set_ravenscar_command)
1905         (show_ravenscar_command): Constify.
1906         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1907         Constify.
1908         (add_internal_problem_command): Remove casts.
1909         * arc-tdep.c (maintenance_print_arc_command): Constify.
1910         * valprint.c (set_print, show_print, set_print_raw)
1911         (show_print_raw): Constify.
1912         * maint.c (maintenance_command, maintenance_info_command)
1913         (maintenance_print_command, maintenance_set_cmd)
1914         (maintenance_show_cmd, set_per_command_cmd)
1915         (show_per_command_cmd, maintenance_check_command): Constify.
1916         * language.c (set_check, show_check): Constify.
1917         * typeprint.c (show_print_type, set_print_type): Constify.
1918         * go32-nat.c (go32_info_dos_command): Constify.
1919
1920 2017-10-11  Tom Tromey  <tom@tromey.com>
1921
1922         * breakpoint.c (prepare_re_set_context): Remove.
1923         (breakpoint_re_set_one): Update.  Don't use cleanups.
1924         (breakpoint_re_set): Use scoped_restore, std::string, and
1925         scoped_restore_current_language.
1926
1927 2017-10-11  Tom Tromey  <tom@tromey.com>
1928
1929         * breakpoint.c (commands_command_1): Use std::string.
1930         (cleanup_executing_breakpoints): Remove.
1931         (bpstat_do_actions_1): Use scoped_restore.
1932         (bpstat_check_watchpoint): Use std::string.
1933         (decode_static_tracepoint_spec): Likewise.
1934         (break_range_command): Likewise.
1935         (watch_command_1): Likewise.
1936         (compare_breakpoints): Change argument types.
1937         (clear_command): Use std::vector.
1938         (cleanup_executing_breakpoints): Remove.
1939         (update_global_location_list): Use unique_xmalloc_ptr.
1940         (strace_command): Remove unused declaration.
1941
1942 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1943
1944         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1945         * NEWS: Mention new FreeBSD/arm native configuration.
1946         * configure.host: Add arm*-*-freebsd*.
1947         * configure.nat: Likewise.
1948         * arm-fbsd-nat.c: New file.
1949
1950 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
1951
1952         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1953         (ALLDEPFILES): Add arm-fbsd-tdep.c.
1954         * NEWS: Mention new FreeBSD/arm target.
1955         * configure.tgt: Add arm*-*-freebsd*.
1956         * arm-fbsd-tdep.c: New file.
1957         * arm-fbsd-tdep.h: New file.
1958
1959 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1960
1961         * linux-tdep.c (linux_make_corefile_notes): Remove call to
1962         `gdbarch_elfcore_write_linux_prpsinfo'.
1963         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1964         method.
1965         (elf_internal_linux_prpsinfo): Remove declaration.
1966         * gdbarch.h: Regenerate.
1967         * gdbarch.c: Regenerate.
1968
1969 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
1970
1971         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1972         `set_gdbarch_elfcore_write_linux_prpsinfo'.
1973
1974 2017-10-11  Pedro Alves  <palves@redhat.com>
1975
1976         * breakpoint.c (reattach_breakpoints): Delete.
1977         * breakpoint.h (reattach_breakpoints): Delete.
1978
1979 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
1980
1981         * symfile.c (registered_sym_fns): Make struct, not typedef.
1982         (DEF_VEC_O (registered_sym_fns)): Remove.
1983         (symtab_fns): Change type to std::vector.
1984         (add_symtab_fns): Adjust.
1985         (find_sym_fns): Adjust.
1986
1987 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
1988
1989         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1990         * arc-tdep.h (arc_arch_is_em): New function.
1991         (arc_arch_is_hs): Likewise.
1992
1993 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
1994
1995         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1996         parentheses in the declaration.
1997         (macro_lookup_inclusion): Likewise.
1998         (macro_lookup_definition): Likewise.
1999         * p-lang.h (pascal_builtin_types): Likewise.
2000         * tui/tui-data.c (tui_win_list): Likewise.
2001         * tui/tui-data.h (tui_win_list): Likewise.
2002         * utils.h (make_cleanup_free_section_addr_info): Likewise.
2003
2004 2017-10-11  Mark Rages  <markrages@gmail.com>
2005
2006         * target-memory.c (block_boundaries): Fix for block address not
2007         aligned on block size.
2008
2009 2017-10-10  Pedro Alves <palves@redhat.com>
2010             Tom Tromey  <tom@tromey.com>
2011
2012         * breakpoint.c (struct captured_breakpoint_query_args)
2013         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
2014         (print_breakpoint): New.
2015         * breakpoint.h (print_breakpoint): Declare.
2016         * common/common-exceptions.h (enum return_reason): Remove
2017         references to catch_exceptions.
2018         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
2019         Delete.
2020         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
2021         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
2022         * gdb.h: Delete.
2023         * gdbthread.h (thread_select): Declare.
2024         * mi/mi-cmd-break.c: Don't include gdb.h.
2025         (breakpoint_notify): Use print_breakpoint.
2026         * mi/mi-cmd-catch.c: Don't include gdb.h.
2027         * mi/mi-interp.c: Don't include gdb.h.
2028         (mi_print_breakpoint_for_event): New.
2029         (mi_breakpoint_created, mi_breakpoint_modified): Use
2030         mi_print_breakpoint_for_event.
2031         * mi/mi-main.c: Don't include gdb.h.
2032         (mi_cmd_thread_select): Parse the global thread ID here.  Use
2033         thread_select instead of gdb_thread_select.
2034         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
2035         of using gdb_list_thread_ids.
2036         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
2037         FILEIO_ENOSYS here.
2038         (remote_fileio_request): Use TRY/CATCH instead of
2039         catch_exceptions.
2040         * symfile-mem.c (struct symbol_file_add_from_memory_args)
2041         (symbol_file_add_from_memory_wrapper): Delete.
2042         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
2043         * thread.c: Don't include gdb.h.
2044         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
2045         (thread_alive): Use thread_select.
2046         (do_captured_thread_select): Delete, parts salvaged as ...
2047         (thread_select): ... this new function.
2048         (gdb_thread_select): Delete.
2049
2050 2017-10-10  Pedro Alves  <palves@redhat.com>
2051             Tom Tromey  <tom@tromey.com>
2052
2053         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
2054         and reverse logic.
2055         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
2056         No longer macros.  Instead ...
2057         (enum wp_check_result): They're now values of this new
2058         enumeration.
2059         (watchpoint_check): Change return type to wp_check_result and
2060         parameter type to bpstat.
2061         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
2062         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
2063         catch_errors.  Reverse logic of watchpoint_check call.
2064         (breakpoint_re_set_one): Now returns void and takes a breakpoint
2065         pointer as parameter.
2066         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
2067         * common/common-exceptions.c (throw_exception_sjlj): Update
2068         comments to avoid mentioning catch_errors.
2069         * exceptions.c (catch_errors): Delete.
2070         * exceptions.h: Update comments to avoid mentioning catch_errors.
2071         (catch_errors_ftype, catch_errors): Delete.
2072         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
2073         (hook_stop_stub): Delete.
2074         (restore_selected_frame): Change return type to void, and
2075         parameter type to const frame_id &.
2076         (restore_infcall_control_state): Use TRY/CATCH instead of
2077         catch_errors.
2078         * main.c (captured_command_loop): Return void and remove
2079         parameter.  Remove references to catch_errors.
2080         (captured_main): Use TRY/CATCH instead of catch_errors.
2081         * objc-lang.c (objc_submethod_helper_data)
2082         (find_objc_msgcall_submethod_helper): Delete.
2083         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
2084         catch_errors.
2085         * record-full.c (record_full_message): Return void.
2086         (record_full_message_args, record_full_message_wrapper): Delete.
2087         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
2088         instead of catch_errors.
2089         * solib-aix.c (solib_aix_open_symbol_file_object): Change
2090         parameter type to int.
2091         * solib-darwin.c (open_symbol_file_object): Ditto.
2092         * solib-dsbt.c (open_symbol_file_object): Ditto.
2093         * solib-frv.c (open_symbol_file_object): Ditto.
2094         * solib-svr4.c (open_symbol_file_object): Ditto.
2095         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
2096         * solib.c (update_solib_list): Use TRY/CATCH instead of
2097         catch_errors.
2098         * solist.h (struct target_so_ops) <open_symbol_file_object>:
2099         Change type.
2100         * symmisc.c (struct print_symbol_args): Remove.
2101         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
2102         (print_symbol): Change type.
2103         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
2104         and remove parameters.
2105         (catch_errors): New.
2106         (get_windows_debug_event): Adjust.
2107
2108 2017-10-09  Tom Tromey  <tom@tromey.com>
2109
2110         * mi/mi-main.c (free_splay_tree): Remove.
2111         (list_available_thread_groups): Use splay_tree_up.
2112         * common/gdb_splay_tree.h: New file.
2113
2114 2017-10-09  Tom Tromey  <tom@tromey.com>
2115
2116         * mi/mi-main.c (do_nothing): Remove.
2117         (list_available_thread_groups): Update.
2118
2119 2017-10-09  Pedro Alves  <palves@redhat.com>
2120
2121         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
2122         reading registers when switching context.
2123
2124 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
2125
2126         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
2127         (fbsd_convert_siginfo): Likewise.
2128         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
2129
2130 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
2131
2132         * configure.ac (try_guile_versions): Remove guile-2.2.
2133         * configure: Regenerate.
2134
2135 2017-10-09  Tom Tromey  <tom@tromey.com>
2136
2137         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
2138         (COMPILE.pre): Use $(CXX).
2139
2140 2017-10-09  Pedro Alves  <palves@redhat.com>
2141
2142         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
2143         Use bool.
2144         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2145         * cp-support.h (cp_remove_params): Now returns a
2146         gdb::unique_xmalloc_ptr.
2147         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
2148         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
2149         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
2150         returning a gdb::unique_xmalloc_ptr.
2151         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
2152         * stack.c (find_frame_funname): Adjust to cp_remove_params
2153         returning a gdb::unique_xmalloc_ptr.
2154
2155 2017-10-08  Tom Tromey  <tom@tromey.com>
2156
2157         * dwarf2read.c (dwarf2_get_dwz_file): Use
2158         gdb::unique_xmalloc_ptr.
2159         (find_slot_in_mapped_hash): Likewise.
2160         (dwarf2_physname): Likewise.
2161         (create_dwo_unit_in_dwp_v1): Use std::string.
2162         (create_dwo_unit_in_dwp_v2): Likewise.
2163         (lookup_dwo_cutu): Likewise.
2164         (inherit_abstract_dies): Use std::vector.
2165         (read_array_type): Likewise.
2166         (dwarf_decode_macros): Remove unused declaration.
2167         (unsigned_int_compar): Remove.
2168         (dwarf2_build_psymtabs_hard): Use scoped_restore.
2169         (psymtabs_addrmap_cleanup): Remove.
2170
2171 2017-10-08  Tom Tromey  <tom@tromey.com>
2172
2173         * frame-unwind.c (frame_unwind_try_unwinder): Update.
2174         * frame.h (frame_cleanup_after_sniffer): Declare.
2175         (frame_prepare_for_sniffer): Return void.
2176         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
2177         type of argument.
2178         (frame_prepare_for_sniffer): Return void.
2179
2180 2017-10-08  Tom Tromey  <tom@tromey.com>
2181
2182         * utils.h (make_cleanup_value_free): Remove.
2183         * utils.c (do_value_free, struct cleanup): Remove.
2184         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
2185         Use gdb_value_up.
2186         * value.h (struct value_deleter): New.
2187         (gdb_value_up): New typedef.
2188
2189 2017-10-08  Tom Tromey  <tom@tromey.com>
2190
2191         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
2192         (make_cleanup_free_search_symbols): Remove.
2193         (search_symbols): Return std::vector.
2194         (symbol_search::compare_search_syms): Now member of
2195         symbol_search.  Change arguments.
2196         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
2197         (symtab_symbol_info, rbreak_command): Update.
2198         * symtab.h (struct symbol_search) <next>: Remove.
2199         Add constructors.
2200         (symbol_search::operator<): New function.
2201         (symbol_search::operator==): New function.
2202         (search_symbols): Remove std::vector.
2203         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2204         (symbol_search::compare_search_syms): Declare.
2205
2206 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2207
2208         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2209         arch/aarch64-insn.o.
2210         Remove one rule.
2211         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2212
2213 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2214
2215         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2216         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2217         arch/arm-linux.o respectively.
2218         * configure.tgt: Likewise.
2219
2220 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2221
2222         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2223         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2224
2225 2017-10-06  Pedro Alves  <palves@redhat.com>
2226
2227         * windows-nat.c: Include <algorithm>.
2228
2229 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2230
2231         * configure.tgt (i386_tobjs): New variable.
2232         (amd64_tobjs): New variable.
2233         Set $cpu_obs and $os_obs.
2234
2235 2017-10-06  Yao Qi  <yao.qi@linaro.org>
2236
2237         * Makefile.in (CONFIG_SRC_SUBDIR): New.
2238         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2239         (clean): Remove object files and dependency files.
2240         (distclean): Remove the directory.
2241         * configure.ac: Invoke AC_CONFIG_COMMANDS.
2242         * configure: Re-generated.
2243         * configure.tgt: Replace amd64.o with arch/amd64.o.
2244
2245 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
2246
2247         PR build/22188
2248         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2249         and SETEND.
2250
2251 2017-10-05  Pedro Alves  <palves@redhat.com>
2252
2253         * linux-nat.c (linux_child_follow_fork): When following the parent
2254         and detaching the child, consult the parent thread's architecture
2255         instead of the child's.
2256
2257 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2258
2259         * ax.h: Do not include "doublest.h".
2260         (union agent_val): Remove.
2261
2262 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2263
2264         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2265         (decimal_to_string): Return std::string object.
2266         (decimal_from_string): Accept std::string object.  Return bool.
2267         (decimal_from_integral, decimal_from_doublest): Remove.
2268         (decimal_from_longest): Add prototype.
2269         (decimal_from_ulongest): Likewise.
2270         (decimal_to_longest): Likewise.
2271         (decimal_from_doublest): Likewise.
2272         * dfp.c: Do not include "gdbtypes.h" or "value.h".
2273         (MAX_DECIMAL_STRING): Move here.
2274         (decimal_to_string): Return std::string object.
2275         (decimal_from_string): Accept std::string object.  Return bool.
2276         (decimal_from_integral): Remove, replace by ...
2277         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2278         (decimal_to_longest): New function.
2279         (decimal_from_floating): Remove, replace by ...
2280         (decimal_from_doublest): ... this new function.
2281         (decimal_to_doublest): Update to new decimal_to_string interface.
2282
2283         * value.c (unpack_long): Use decimal_to_longest.
2284         * valops.c (value_cast): Use decimal_from_doublest instead of
2285         decimal_from_floating.  Use decimal_from_[u]longest isntead of
2286         decimal_from_integral.
2287         * valarith.c (value_args_as_decimal): Likewise.
2288         * valprint.c (print_decimal_floating): Update to new
2289         decimal_to_string interface.
2290         * printcmd.c (printf_decfloat): Likewise.
2291         * c-exp.y (parse_number): Update to new decimal_from_string interface.
2292
2293 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
2294
2295         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
2296         * gdbtypes.c: Include "floatformat.h".
2297         * value.c: Likewise.
2298         * m68k-tdep.c: Likewise.
2299
2300         * findvar.c: Do not include "floatformat.h".
2301         * amd64-darwin-tdep.c: Likewise.
2302         * arm-linux-tdep.c: Likewise.
2303         * i386-darwin-tdep.c: Likewise.
2304         * i387-tdep.c: Likewise.
2305         * m68k-linux-tdep.c: Likewise.
2306         * mep-tdep.c: Likewise.
2307         * mips-tdep.c: Likewise.
2308         * nios2-tdep.c: Likewise.
2309         * s390-linux-tdep.c: Likewise.
2310         * sparc-obsd-tdep.c: Likewise.
2311         * sparc-tdep.c: Likewise.
2312         * sparc64-tdep.c: Likewise.
2313         * spu-tdep.c: Likewise.
2314         * tic6x-tdep.c: Likewise.
2315         * tilegx-tdep.c: Likewise.
2316         * vax-tdep.c: Likewise.
2317         * xstormy16-tdep.c: Likewise.
2318         * xtensa-tdep.c: Likewise.
2319
2320         * top.c: Do not include "doublest.h".
2321         * aarch64-tdep.c: Likewise.
2322         * alpha-tdep.c: Likewise.
2323         * arm-linux-tdep.c: Likewise.
2324         * m68k-linux-tdep.c: Likewise.
2325         * tilegx-tdep.c: Likewise.
2326         * xstormy16-tdep.c: Likewise.
2327
2328 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2329
2330         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2331         (mipsn32_fbsd_sigframe): Define.
2332         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2333         for FreeBSD/mipsn32.
2334
2335 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
2336
2337         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2338         AT_HWCAP.
2339
2340 2017-10-05  Tristan Gingold  <tgingold@free.fr>
2341
2342         * MAINTAINERS (Misc): Update my email address.
2343
2344 2017-10-04  Pedro Alves  <palves@redhat.com>
2345
2346         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
2347         it instead of target_gdbarch.
2348         (get_remote_state, get_remote_packet_size): Adjust
2349         get_remote_arch_state calls, passing down target_gdbarch
2350         explicitly.
2351         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2352         'gdbarch' and use it instead of target_gdbarch.
2353         (get_memory_packet_size): Adjust get_remote_arch_state calls,
2354         passing down target_gdbarch explicitly.
2355         (struct stop_reply) <arch>: New field.
2356         (remote_parse_stop_reply): Use the stopped thread's architecture,
2357         not the current inferior's.  Save the architecture in the
2358         stop_reply.
2359         (process_stop_reply): Use the stop reply's architecture.
2360         (process_g_packet, remote_fetch_registers)
2361         (remote_prepare_to_store, store_registers_using_G)
2362         (remote_store_registers): Adjust get_remote_arch_state calls,
2363         using the regcache's architecture.
2364         (remote_get_trace_status): Adjust get_remote_arch_state calls,
2365         passing down target_gdbarch explicitly.
2366         * spu-multiarch.c (spu_thread_architecture): Defer to the target
2367         beneath instead of calling target_gdbarch.
2368         * target.c (default_thread_architecture): Use the specified
2369         inferior's architecture, instead of the current inferior's
2370         architecture (via target_gdbarch).
2371
2372 2017-10-04  Pedro Alves  <palves@redhat.com>
2373
2374         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2375         case.
2376         (regcache_print): Handle !target_has_registers here instead.
2377
2378 2017-10-04  Pedro Alves  <palves@redhat.com>
2379
2380         * frame.c (create_test_frame): Delete.
2381         * frame.h (create_test_frame): Delete.
2382         * gdbarch-selftests.c: Include gdbthread.h and target.h.
2383         (class regcache_test): Delete.
2384         (test_target_has_registers, test_target_has_stack)
2385         (test_target_has_memory, test_target_prepare_to_store)
2386         (test_target_store_registers): New functions.
2387         (test_target_ops): New class.
2388         (register_to_value_test): Error out if there's already a
2389         process_stratum (or higher) target pushed.  Create a fuller mock
2390         environment, with mock target_ops, inferior, address space, thread
2391         and inferior_ptid.
2392         * progspace.c (struct address_space): Move to ...
2393         * progspace.h (struct address_space): ... here.
2394         * regcache.h (regcache::~regcache, regcache::raw_write)
2395         [GDB_SELF_TEST]: No longer virtual.
2396
2397 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2398
2399         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2400
2401 2017-10-04  Pedro Alves  <palves@redhat.com>
2402
2403         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2404         out of 'between TRY and CATCH'.
2405
2406 2017-10-04  Pedro Alves  <palves@redhat.com>
2407
2408         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2409         * common/common-exceptions.h (TRY): Open an outermost scope.
2410         Expand intro comment.
2411         (CATCH): Reindent.
2412         (END_CATCH): Close the outermost scope.
2413         * completer.c (complete_line_internal): Add missing END_CATCH.
2414
2415 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2416
2417         * NEWS (Changes since GDB 8.0): Add entry about new
2418         'set-cwd-on-gdbserver' feature.
2419         (New remote packets): Add entry for QSetWorkingDir.
2420         * common/common-inferior.h (set_inferior_cwd): New prototype.
2421         * infcmd.c (set_inferior_cwd): Remove "static".
2422         (show_cwd_command): Expand text to include remote debugging.
2423         * remote.c: Add PACKET_QSetWorkingDir.
2424         (remote_protocol_features) <QSetWorkingDir>: New entry for
2425         PACKET_QSetWorkingDir.
2426         (extended_remote_set_inferior_cwd): New function.
2427         (extended_remote_create_inferior): Call
2428         "extended_remote_set_inferior_cwd".
2429         (_initialize_remote): Call "add_packet_config_cmd" for
2430         QSetWorkingDir.
2431
2432 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2433
2434         * NEWS (New commands): Mention "set/show cwd".
2435         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2436         "cd" command's help text.
2437         * common/common-inferior.h (get_inferior_cwd): New prototype.
2438         * infcmd.c (inferior_cwd_scratch): New global variable.
2439         (set_inferior_cwd): New function.
2440         (get_inferior_cwd): Likewise.
2441         (set_cwd_command): Likewise.
2442         (show_cwd_command): Likewise.
2443         (_initialize_infcmd): Add "set/show cwd" commands.
2444         * inferior.h (class inferior) <cwd>: New field.
2445         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2446         (fork_inferior): Change inferior's cwd before its execution.
2447         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2448         to CreateProcess.
2449
2450 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2451
2452         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2453         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2454         (COMMON_OBS): Add gdb_tilde_expand.o.
2455         * common/gdb_tilde_expand.c: New file.
2456         * common/gdb_tilde_expand.h: Likewise.
2457
2458 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
2459
2460         * gdbarch.sh (objfile): Remove duplicate declaration.
2461         * gdbarch.h: Regenerate.
2462
2463 2017-10-03  Tom Tromey  <tom@tromey.com>
2464
2465         * utils.c (internal_vproblem): Use string_vprintf.
2466
2467 2017-10-03  Tom Tromey  <tom@tromey.com>
2468
2469         * printcmd.c (info_symbol_command): Use std::string.
2470
2471 2017-10-03  Tom Tromey  <tom@tromey.com>
2472
2473         * top.c (gdb_safe_append_history): Use std::string.
2474
2475 2017-10-03  Tom Tromey  <tom@tromey.com>
2476
2477         * event-top.c (stdin_event_handler): Update.
2478         * main.c (captured_main_1): Update.
2479         * top.h (make_delete_ui_cleanup): Remove.
2480         (struct ui): Add constructor and destructor.
2481         (new_ui, delete_ui): Remove.
2482         * top.c (make_delete_ui_cleanup): Remove.
2483         (new_ui_command): Use std::unique_ptr.
2484         (delete_ui_cleanup): Remove.
2485         (ui::ui): Rename from new_ui.  Update.
2486         (free_ui): Remove.
2487         (ui::~ui): Rename from delete_ui.  Update.
2488
2489 2017-10-03  Tom Tromey  <tom@tromey.com>
2490
2491         * symfile.c (load_progress): Use gdb::byte_vector.
2492
2493 2017-10-03  Tom Tromey  <tom@tromey.com>
2494
2495         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2496         declaration.
2497         * printcmd.c (x_command): Remove unused declaration.
2498         * symfile.c (symbol_file_command): Remove unused declaration.
2499
2500 2017-10-03  Tom Tromey  <tom@tromey.com>
2501
2502         * utils.c (internal_vproblem): Use std::string.
2503         (defaulted_query): Likewise.
2504
2505 2017-10-03  Tom Tromey  <tom@tromey.com>
2506
2507         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2508         * top.c (execute_command_to_string): Update.
2509         * utils.c (make_cleanup_restore_page_info): Remove.
2510         (do_restore_page_info_cleanup): Remove.
2511         (set_batch_flag_and_restore_page_info):
2512         New.
2513         (make_cleanup_restore_page_info): Remove.
2514         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2515         (~set_batch_flag_and_restore_page_info): New
2516         (make_cleanup_restore_uinteger): Remove.
2517         (make_cleanup_restore_integer): Remove.
2518         (struct restore_integer_closure): Remove.
2519         (restore_integer): Remove.
2520         * utils.h (struct set_batch_flag_and_restore_page_info): New
2521         class.
2522         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2523         (make_cleanup_restore_page_info): Remove.
2524         (make_cleanup_restore_uinteger) Remove.
2525         (make_cleanup_restore_integer) Remove.
2526
2527 2017-10-03  Tom Tromey  <tom@tromey.com>
2528
2529         * record-full.h (record_full_gdb_operation_disable_set): Return
2530         scoped_restore_tmpl<int>.
2531         * infrun.c (adjust_pc_after_break): Update.
2532         (handle_signal_stop): Update.
2533         * record-full.c (record_full_gdb_operation_disable_set): Return
2534         scoped_restore_tmpl<int>.
2535         (record_full_wait_1, record_full_insert_breakpoint)
2536         (record_full_remove_breakpoint, record_full_save)
2537         (record_full_goto_insn): Update.
2538
2539 2017-10-02  Tom Tromey  <tom@tromey.com>
2540
2541         PR rust/22236:
2542         * rust-lang.c (rust_val_print_str): New function.
2543         (val_print_struct): Call it.
2544         (rust_subscript): Preserve name of slice type.
2545
2546 2017-10-02  Tom Tromey  <tom@tromey.com>
2547
2548         * rust-lang.c (rust_subscript): Handle slices in
2549         EVAL_AVOID_SIDE_EFFECTS case.
2550
2551 2017-10-02  Tom Tromey  <tom@tromey.com>
2552
2553         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2554
2555 2017-10-02  Tom Tromey  <tom@tromey.com>
2556
2557         * rust-lang.h (rust_slice_type): Add "extern".
2558
2559 2017-10-02  Tom Tromey  <tom@tromey.com>
2560             Pedro Alves  <palves@redhat.com>
2561
2562         * ada-lang.h (ada_exc_info::operator<): Make const.
2563         (ada_exc_info::operator==): Make const.
2564         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2565         Make const.
2566
2567 2017-09-29  Tom Tromey  <tom@tromey.com>
2568
2569         * target.c (read_whatever_is_readable): Change type of "result".
2570         Update.
2571         (free_memory_read_result_vector): Remove.
2572         (read_memory_robust): Change return type.  Update.
2573         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
2574         bin2hex, std::string.
2575         * target.h (memory_read_result_s): Remove typedef.
2576         (free_memory_read_result_vector): Remove.
2577         (read_memory_robust): Return std::vector.
2578
2579 2017-09-29  Tom Tromey  <tom@tromey.com>
2580
2581         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2582
2583 2017-09-29  Tom Tromey  <tom@tromey.com>
2584
2585         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2586         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
2587         operator< and operator==.
2588         (ada_exceptions_list): Return a std::vector.
2589         * ada-lang.c (ada_exc_info::operator<): Rename from
2590         compare_ada_exception_info.
2591         (ada_exc_info::operator==): New.
2592         (sort_remove_dups_ada_exceptions_list): Change type of
2593         "exceptions".
2594         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2595         (ada_add_global_exceptions): Likewise.
2596         (ada_exceptions_list_1): Return a std::vector.
2597         (ada_exceptions_list): Likewise.
2598
2599 2017-09-29  Tom Tromey  <tom@tromey.com>
2600
2601         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2602         'std::set *'.
2603         (print_one_inferior): Update.
2604         (free_vector_of_ints): Remove.
2605         (list_available_thread_groups): Change "ids" to std::set.
2606         (mi_cmd_list_thread_groups): Update.
2607         (struct collect_cores_data) <core>: Now a std::set.
2608         (collect_cores): Update.
2609         (unique): Remove.
2610         (print_one_inferior): Update.
2611
2612 2017-09-29  Tom Tromey  <tom@tromey.com>
2613
2614         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2615         (mi_execute_async_cli_command): Likewise.
2616         (mi_cmd_trace_frame_collected): Use field_fmt.
2617
2618 2017-09-29  Tom Tromey  <tom@tromey.com>
2619
2620         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2621         gdb::byte_vector.
2622
2623 2017-09-29  Tom Tromey  <tom@tromey.com>
2624
2625         * mi/mi-parse.c (mi_parse): Remove unused declaration.
2626
2627 2017-09-29  Tom Tromey  <tom@tromey.com>
2628
2629         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2630
2631 2017-09-29  Tom Tromey  <tom@tromey.com>
2632
2633         * varobj.h (varobj_gen_name): Return std::string.
2634         * varobj.c (varobj_gen_name): Return std::string.
2635         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2636         (mi_cmd_var_delete): Don't copy "name".
2637
2638 2017-09-29  Tom Tromey  <tom@tromey.com>
2639
2640         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2641         (mi_cmd_break_insert_1): Update.
2642
2643 2017-09-29  Tom Tromey  <tom@tromey.com>
2644
2645         * target.h (make_scoped_defer_target_commit_resume): Update.
2646         * target.c (make_scoped_defer_target_commit_resume): Rename from
2647         make_cleanup_defer_target_commit_resume.  Return a
2648         scoped_restore.
2649         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2650
2651 2017-09-29  Tom Tromey  <tom@tromey.com>
2652
2653         * main.c (captured_main_1): Remove unused declaration.
2654         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2655
2656 2017-09-29  Tom Tromey  <tom@tromey.com>
2657
2658         * symtab.c (search_symbols): Remove unused outer cleanup.
2659         (make_source_files_completion_list): Remove unused declaration.
2660
2661 2017-09-29  Tom Tromey  <tom@tromey.com>
2662
2663         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2664
2665 2017-09-29  Tom Tromey  <tom@tromey.com>
2666
2667         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2668         gdb::byte_vector.
2669
2670 2017-09-29  Tom Tromey  <tom@tromey.com>
2671
2672         * complaints.c (vcomplaint): Use std::string.
2673
2674 2017-09-29  Tom Tromey  <tom@tromey.com>
2675
2676         * tracepoint.c (trace_variable_command): Use std::string.
2677         (encode_actions_1): Remove unused declarations.
2678         (create_tsv_from_upload): Use std::string.
2679
2680 2017-09-29  Tom Tromey  <tom@tromey.com>
2681
2682         * cp-support.c (gdb_demangle): Use std::string.
2683
2684 2017-09-29  Tom Tromey  <tom@tromey.com>
2685
2686         * stack.c (parse_frame_specification): Use std::string
2687         (info_frame_command): Use gdb::unique_xmalloc_ptr.
2688
2689 2017-09-29  Tom Tromey  <tom@tromey.com>
2690
2691         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2692
2693 2017-09-29  Tom Tromey  <tom@tromey.com>
2694
2695         * utils.c (vfprintf_maybe_filtered): Use std::string.
2696         (vfprintf_unfiltered): Likewise.
2697
2698 2017-09-29  Tom Tromey  <tom@tromey.com>
2699
2700         * event-top.c (top_level_prompt): Return std::string.
2701         (display_gdb_prompt): Update.
2702
2703 2017-09-29  Tom Tromey  <tom@tromey.com>
2704
2705         * unittests/common-utils-selftests.c (format): New function.
2706         (string_vprintf_tests): New function.
2707         (_initialize_common_utils_selftests): Register new tests.
2708         * common/common-utils.c (string_vprintf): New function.
2709         * common/common-utils.h (string_vprintf): Declare.
2710
2711 2017-09-29  Pedro Alves  <palves@redhat.com>
2712
2713         * common/rsp-low.c (unpack_varlen_hex): Constify.
2714         * common/rsp-low.h (unpack_varlen_hex): Constify.
2715         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2716         Constify.
2717         * remote.c (remote_set_permissions, read_ptid)
2718         (remote_current_thread, remote_get_threads_with_qthreadinfo)
2719         (remote_static_tracepoint_marker_at)
2720         (remote_static_tracepoint_markers_by_strid)
2721         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2722         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2723         (parse_tracepoint_definition, parse_tsv_definition)
2724         (parse_static_tracepoint_marker_definition): Constify.
2725         * tracepoint.h (parse_static_tracepoint_marker_definition)
2726         (parse_trace_status, parse_tracepoint_status)
2727         (parse_tracepoint_definition, parse_tsv_definition): Constify.
2728
2729 2017-09-29  Pedro Alves  <palves@redhat.com>
2730
2731         * remote.c (target_buf, target_buf_size): Delete.
2732         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2733         Use the connection's packet buffer instead.
2734         All callers adjusted.
2735         (_initialize_remote): Remove references to target_buf and
2736         target_buf_size.
2737
2738 2017-09-28  Pedro Alves  <palves@redhat.com>
2739
2740         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2741         unittests/common-utils-selftests.c.
2742         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2743         (COMMON_OBS): Remove utils-selftests.o.
2744         * utils-selftests.c: Move to ...
2745         * unittests/common-utils-selftests.c: ... here and rename self
2746         test to "string_printf".
2747
2748 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2749
2750         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2751         having NULL cus or tus.
2752
2753 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2754
2755         * arm-tdep.c: (convert_from_extended): Remove.
2756         (convert_to_extended): Likewise.
2757         (arm_extract_return_value): Use convert_typed_floating.
2758         (arm_store_return_value): Likewise.
2759
2760         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2761         * sh-tdep.c: Do not include "floatformat.h".
2762         (sh_littlebyte_bigword_type): New function.
2763         (sh_register_convert_to_virtual): Use convert_typed_floating.
2764         (sh_register_convert_to_raw): Likewise.
2765         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2766         (sh64_littlebyte_bigword_type): New function.
2767         (sh64_extract_return_value): Use convert_typed_floating.
2768         (sh64_register_convert_to_virtual): Likewise.
2769         (sh64_register_convert_to_raw): Likewise.
2770
2771 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2772
2773         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2774         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2775
2776         * gdbtypes.h (union type_specific): Make field floatformat hold
2777         just a single struct floatformat, not an array.
2778         (floatformat_from_type): Move here.
2779         * gdbtypes.c (floatformat_from_type): Move here.  Update to
2780         changed TYPE_FLOATFORMAT definition.
2781         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2782         (recursive_dump_type): Likewise.
2783         (init_float_type): Install correct floatformat for byte order.
2784         (arch_float_type): Likewise.
2785
2786 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
2787
2788         * gdbtypes.c (init_type): Change incoming argument from
2789         length-in-bytes to length-in-bits.  Assert length is a
2790         multiple of TARGET_CHAR_BITS.
2791         (arch_type, arch_flags_type): Likewise.
2792         (init_integer_type): Update call to init_type.
2793         (init_character_type): Likewise.
2794         (init_boolean_type): Likewise.
2795         (init_float_type): Likewise.
2796         (init_decfloat_type): Likewise.
2797         (init_complex_type): Likewise.
2798         (init_pointer_type): Likewise.
2799         (objfile_type): Likewise.
2800         (arch_integer_type): Update call to arch_type.
2801         (arch_character_type): Likewise.
2802         (arch_boolean_type): Likewise.
2803         (arch_float_type): Likewise.
2804         (arch_decfloat_type): Likewise.
2805         (arch_complex_type): Likewise.
2806         (arch_pointer_type): Likewise.
2807         (gdbtypes_post_init): Likewise.
2808
2809         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2810         (read_base_type): Likewise.
2811         * mdebugread.c (basic_type): Likewise.
2812         * stabsread.c (dbx_init_float_type): Likewise.
2813         (rs6000_builtin_type): Likewise.
2814         (read_range_type): Likewise.  Also, fix call to init_integer_type
2815         with erroneous length argument.
2816
2817         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2818         * d-lang.c (build_d_types): Likewise.
2819         * f-lang.c (build_fortran_types): Likewise.
2820         * go-lang.c (build_go_types): Likewise.
2821         * opencl-lang.c (build_opencl_types): Likewise.
2822         * jit.c (finalize_symtab): Likewise.
2823         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2824         (build_std_type_info_type): Likewise.
2825         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
2826         update call to arch_flags_type.
2827
2828         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2829         arch_type.
2830         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2831         * windows-tdep.c (windows_get_tlb_type): Likewise.
2832
2833         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2834         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2835         * m32c-tdep.c (make_types): Likewise.
2836         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2837         (rl78_psw_type): Update call to arch_flags_type.
2838         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2839         * rx-tdep.c (rx_psw_type): Likewise.
2840         (rx_fpsw_type): Likewise.
2841         * sparc-tdep.c (sparc_psr_type): Likewise.
2842         (sparc_fsr_type): Likewise.
2843         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2844         (sparc64_ccr_type): Likewise.
2845         (sparc64_fsr_type): Likewise.
2846         (sparc64_fprs_type): Likewise.
2847
2848 2017-09-27  Tom Tromey  <tom@tromey.com>
2849
2850         * findcmd.c (find_command): Constify.
2851
2852 2017-09-27  Tom Tromey  <tom@tromey.com>
2853
2854         * ada-tasks.c (task_command_1, task_command): Constify.
2855
2856 2017-09-27  Tom Tromey  <tom@tromey.com>
2857
2858         * symtab.c (maintenance_print_symbol_cache)
2859         (maintenance_flush_symbol_cache)
2860         (maintenance_print_symbol_cache_statistics): Constify.
2861
2862 2017-09-27  Tom Tromey  <tom@tromey.com>
2863
2864         * inferior.c (detach_inferior_command, kill_inferior_command)
2865         (inferior_command): Constify.
2866
2867 2017-09-27  Tom Tromey  <tom@tromey.com>
2868
2869         * regcache.c (regcache_print, maintenance_print_registers)
2870         (maintenance_print_raw_registers)
2871         (maintenance_print_cooked_registers)
2872         (maintenance_print_register_groups)
2873         (maintenance_print_remote_registers): Constify.
2874
2875 2017-09-27  Tom Tromey  <tom@tromey.com>
2876
2877         * printcmd.c (map_display_numbers, undisplay_command)
2878         (enable_disable_display_command, enable_display_command)
2879         (disable_display_command): Constify.
2880
2881 2017-09-27  Tom Tromey  <tom@tromey.com>
2882
2883         * breakpoint.h (delete_command): Don't declare.
2884         * breakpoint.c (delete_command, enable_once_command)
2885         (enable_count_command, enable_delete_command, breakpoint_1)
2886         (maintenance_info_breakpoints, stopin_command, stopat_command)
2887         (delete_command, delete_trace_command, save_breakpoints)
2888         (save_breakpoints_command, save_tracepoints_command): Constify.
2889
2890 2017-09-27  Tom Tromey  <tom@tromey.com>
2891
2892         * macrocmd.c (macro_expand_command, macro_expand_once_command)
2893         (skip_ws, extract_identifier, macro_define_command)
2894         (macro_undef_command, macro_list_command): Constify.
2895
2896 2017-09-27  Tom Tromey  <tom@tromey.com>
2897
2898         * infcmd.c (environment_info, set_environment_command)
2899         (unset_environment_command, path_info, info_proc_cmd_1)
2900         (info_proc_cmd_mappings, info_proc_cmd_stat)
2901         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2902         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2903
2904 2017-09-27  Tom Tromey  <tom@tromey.com>
2905
2906         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2907         Constify.
2908
2909 2017-09-27  Tom Tromey  <tom@tromey.com>
2910
2911         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2912
2913 2017-09-27  Tom Tromey  <tom@tromey.com>
2914
2915         * demangle.c (demangle_command): Constify.
2916
2917 2017-09-27  Tom Tromey  <tom@tromey.com>
2918
2919         * progspace.c (maintenance_info_program_spaces_command):
2920         Constify.
2921
2922 2017-09-27  Tom Tromey  <tom@tromey.com>
2923
2924         * compile/compile.c (check_raw_argument, compile_file_command)
2925         (compile_code_command, compile_print_command): Constify.
2926
2927 2017-09-27  Tom Tromey  <tom@tromey.com>
2928
2929         * reggroups.c (maintenance_print_reggroups): Constify.
2930
2931 2017-09-27  Tom Tromey  <tom@tromey.com>
2932
2933         * dwarf2read.c (save_gdb_index_command): Constify.
2934
2935 2017-09-27  Tom Tromey  <tom@tromey.com>
2936
2937         * stap-probe.c (info_probes_stap_command): Constify.
2938
2939 2017-09-27  Tom Tromey  <tom@tromey.com>
2940
2941         * fork-child.c (unset_exec_wrapper_command): Constify.
2942
2943 2017-09-27  Tom Tromey  <tom@tromey.com>
2944
2945         * btrace.c (get_uint, get_context_size, no_chunk)
2946         (maint_btrace_packet_history_cmd)
2947         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2948         (maint_info_btrace_cmd): Constify.
2949
2950 2017-09-27  Tom Tromey  <tom@tromey.com>
2951
2952         * reverse.c (delete_bookmark_command): Constify.
2953
2954 2017-09-27  Tom Tromey  <tom@tromey.com>
2955
2956         * remote.c (set_memory_packet_size)
2957         (set_memory_write_packet_size, show_memory_write_packet_size)
2958         (set_memory_read_packet_size, show_memory_read_packet_size)
2959         (compare_sections_command, packet_command, remote_put_command)
2960         (remote_get_command, remote_delete_command): Constify.
2961
2962 2017-09-27  Tom Tromey  <tom@tromey.com>
2963
2964         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2965         (set_mipsfpu_double_command, set_mipsfpu_none_command)
2966         (set_mipsfpu_auto_command): Constify.
2967
2968 2017-09-27  Tom Tromey  <tom@tromey.com>
2969
2970         * cli/cli-cmds.h (cd_command): Constify.
2971         * cli/cli-cmds.c (cd_command): Constify.
2972
2973 2017-09-27  Tom Tromey  <tom@tromey.com>
2974
2975         * thread.c (thread_name_command, thread_find_command): Constify.
2976
2977 2017-09-27  Tom Tromey  <tom@tromey.com>
2978
2979         * probe.c (enable_probes_command, disable_probes_command):
2980         Constify.
2981
2982 2017-09-27  Tom Tromey  <tom@tromey.com>
2983
2984         * symfile.c (symbol_file_command): Constify.
2985         * gdbcore.h (deprecated_file_changed_hook): Constify.
2986         * exec.c (deprecated_file_changed_hook, exec_file_command)
2987         (file_command): Constify.
2988         * defs.h (symbol_file_command): Constify.
2989
2990 2017-09-27  Tom Tromey  <tom@tromey.com>
2991
2992         * remote-fileio.c (set_system_call_allowed)
2993         (show_system_call_allowed): Constify.
2994
2995 2017-09-27  Tom Tromey  <tom@tromey.com>
2996
2997         * tracepoint.c (delete_trace_variable_command)
2998         (tfind_end_command, tfind_start_command, tfind_pc_command)
2999         (tfind_tracepoint_command, tfind_line_command)
3000         (tfind_range_command, tfind_outside_command): Constify.
3001
3002 2017-09-27  Tom Tromey  <tom@tromey.com>
3003
3004         * ax-gdb.c (maint_agent_printf_command, agent_command)
3005         (agent_eval_command): Constify.
3006
3007 2017-09-27  Tom Tromey  <tom@tromey.com>
3008
3009         * tracepoint.c (info_scope_command): Constify.
3010         * python/python.c (gdbpy_decode_line): Constify.
3011         * python/py-breakpoint.c (bppy_init): Constify.
3012         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
3013         * location.h: (new_linespec_location)
3014         (string_to_event_location_basic, string_to_event_location):
3015         Constify.
3016         * location.c (new_linespec_location)
3017         (string_to_event_location_basic, string_to_event_location):
3018         Constify.
3019         * linespec.h (decode_line_with_current_source)
3020         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
3021         * linespec.c (linespec_lex_to_end)
3022         (decode_line_with_current_source)
3023         (decode_line_with_last_displayed): Constify.
3024         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
3025         Constify.
3026         * cli/cli-cmds.c (edit_command, list_command): Constify.
3027         * breakpoint.h (until_break_command, watch_command_wrapper)
3028         (awatch_command_wrapper, rwatch_command_wrapper)
3029         (init_ada_exception_breakpoint): Constify.
3030         * breakpoint.c (break_command_1, dprintf_command)
3031         (break_range_command, watch_command_wrapper)
3032         (rwatch_command_wrapper, awatch_command_wrapper)
3033         (until_break_command, init_ada_exception_breakpoint)
3034         (strace_marker_create_sals_from_location, trace_command)
3035         (ftrace_command, strace_command, struct tracepoint): Constify.
3036         * ax-gdb.c (agent_command_1): Constify.
3037         * ada-lang.c (ada_exception_sal): Constify.
3038
3039 2017-09-27  Tom Tromey  <tom@tromey.com>
3040
3041         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
3042         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
3043         (get_context_size, no_chunk, get_insn_history_modifiers)
3044         (cmd_record_insn_history, get_call_history_modifiers)
3045         (cmd_record_call_history): Constify.
3046
3047 2017-09-27  Tom Tromey  <tom@tromey.com>
3048
3049         * source.c (show_substitute_path_command)
3050         (unset_substitute_path_command, set_substitute_path_command):
3051         Constify.
3052
3053 2017-09-27  Tom Tromey  <tom@tromey.com>
3054
3055         * typeprint.c (maintenance_print_type): Constify.
3056         * maint.c (maintenance_dump_me, maintenance_demangle)
3057         (maintenance_time_display, maintenance_info_sections)
3058         (maintenance_print_statistics, maintenance_deprecate)
3059         (maintenance_undeprecate): Constify.
3060         (maintenance_do_deprecate): Constify.  Use std::string.
3061         (maintenance_selftest): Constify.
3062         * gdbtypes.h (maintenance_print_type): Constify.
3063
3064 2017-09-27  Tom Tromey  <tom@tromey.com>
3065
3066         * hppa-tdep.c (unwind_command): Constify.
3067
3068 2017-09-27  Tom Tromey  <tom@tromey.com>
3069
3070         * target-descriptions.c (unset_tdesc_filename_cmd)
3071         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
3072         Constify.
3073
3074 2017-09-27  Tom Tromey  <tom@tromey.com>
3075
3076         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
3077
3078 2017-09-27  Tom Tromey  <tom@tromey.com>
3079
3080         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
3081
3082 2017-09-27  Tom Tromey  <tom@tromey.com>
3083
3084         * tui/tui-regs.c (tui_reg_command): Constify.
3085
3086 2017-09-27  Tom Tromey  <tom@tromey.com>
3087
3088         * skip.c (skip_file_command, skip_function_command)
3089         (skip_enable_command, skip_disable_command, skip_delete_command):
3090         Constify.
3091
3092 2017-09-27  Tom Tromey  <tom@tromey.com>
3093
3094         * record-btrace.c (cmd_record_btrace_bts_start)
3095         (cmd_record_btrace_pt_start): Constify.
3096
3097 2017-09-27  Tom Tromey  <tom@tromey.com>
3098
3099         * symmisc.c (maintenance_print_symbols)
3100         (maintenance_print_msymbols, maintenance_print_objfiles)
3101         (maintenance_info_symtabs, maintenance_check_symtabs)
3102         (maintenance_expand_symtabs, maintenance_info_line_tables):
3103         Constify.
3104
3105 2017-09-27  Tom Tromey  <tom@tromey.com>
3106
3107         * top.c (new_ui_command): Constify.
3108
3109 2017-09-27  Tom Tromey  <tom@tromey.com>
3110
3111         * symfile.c (add_symbol_file_command)
3112         (remove_symbol_file_command, list_overlays_command)
3113         (map_overlay_command, unmap_overlay_command)
3114         (overlay_auto_command, overlay_manual_command)
3115         (overlay_off_command, overlay_load_command): Constify.
3116
3117 2017-09-27  Tom Tromey  <tom@tromey.com>
3118
3119         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
3120         (info_spu_mailbox_command, info_spu_dma_command)
3121         (info_spu_proxydma_command): Constify.
3122
3123 2017-09-27  Tom Tromey  <tom@tromey.com>
3124
3125         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
3126
3127 2017-09-27  Tom Tromey  <tom@tromey.com>
3128
3129         * cli/cli-script.c (user_defined_command): Constify.
3130
3131 2017-09-27  Tom Tromey  <tom@tromey.com>
3132
3133         * cli/cli-dump.c (dump_memory_command, dump_value_command)
3134         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
3135         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
3136         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
3137         (dump_binary_value, append_binary_memory, append_binary_value):
3138         Constify.
3139         (struct dump_context) <func>: Constify.
3140         (add_dump_command): Update.
3141
3142 2017-09-27  Tom Tromey  <tom@tromey.com>
3143
3144         * cli/cli-cmds.c (show_version, show_configuration)
3145         (source_command, show_user): Constify.
3146
3147 2017-09-27  Tom Tromey  <tom@tromey.com>
3148
3149         * target.c (maintenance_print_target_stack): Constify.
3150
3151 2017-09-27  Tom Tromey  <tom@tromey.com>
3152
3153         * interps.c (interpreter_exec_cmd): Constify.
3154
3155 2017-09-27  Tom Tromey  <tom@tromey.com>
3156
3157         * record-full.c (cmd_record_full_restore): Constify.
3158
3159 2017-09-27  Tom Tromey  <tom@tromey.com>
3160
3161         * memattr.c (enable_mem_command, disable_mem_command)
3162         (delete_mem_command): Constify.
3163
3164 2017-09-27  Tom Tromey  <tom@tromey.com>
3165
3166         * value.c (show_convenience): Constify.
3167
3168 2017-09-27  Tom Tromey  <tom@tromey.com>
3169
3170         * gdbcore.h (core_file_command): Update.
3171         * corefile.c (core_file_command): Constify.
3172
3173 2017-09-27  Tom Tromey  <tom@tromey.com>
3174
3175         * user-regs.c (maintenance_print_user_registers): Constify.
3176
3177 2017-09-27  Tom Tromey  <tom@tromey.com>
3178
3179         * cp-namespace.c (maintenance_cplus_namespace): Constify.
3180
3181 2017-09-27  Tom Tromey  <tom@tromey.com>
3182
3183         * cp-support.c (first_component_command): Constify.
3184
3185 2017-09-27  Tom Tromey  <tom@tromey.com>
3186
3187         * psymtab.c (maintenance_print_psymbols)
3188         (maintenance_info_psymtabs, maintenance_check_psymtabs):
3189         Constify.
3190
3191 2017-09-27  Tom Tromey  <tom@tromey.com>
3192
3193         * windows-tdep.c (display_tib): Constify.
3194
3195 2017-09-27  Tom Tromey  <tom@tromey.com>
3196
3197         * linux-fork.c (delete_checkpoint_command)
3198         (detach_checkpoint_command): Constify.
3199
3200 2017-09-27  Tom Tromey  <tom@tromey.com>
3201
3202         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3203
3204 2017-09-27  Tom Tromey  <tom@tromey.com>
3205
3206         * arc-tdep.c (dump_arc_instruction_command): Constify.
3207
3208 2017-09-27  Tom Tromey  <tom@tromey.com>
3209
3210         * valprint.c (set_radix, show_radix): Constify.
3211
3212 2017-09-27  Tom Tromey  <tom@tromey.com>
3213
3214         * dtrace-probe.c (info_probes_dtrace_command): Constify.
3215
3216 2017-09-27  Tom Tromey  <tom@tromey.com>
3217
3218         * command.h (not_just_help_class_command): Update.
3219         * cli/cli-decode.h (not_just_help_class_command): Update.
3220         * cli/cli-decode.c (not_just_help_class_command): Constify.
3221
3222 2017-09-27  Tom Tromey  <tom@tromey.com>
3223
3224         * gdb_bfd.c (maintenance_info_bfds): Constify.
3225
3226 2017-09-27  Tom Tromey  <tom@tromey.com>
3227
3228         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3229         overloads.
3230         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
3231         (do_const_cfunc): New function.
3232         (cmd_cfunc_eq): New overload.
3233         (cli_user_command_p): Check do_const_cfunc.
3234         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3235         const_cfunc.
3236         * command.h (add_cmd): Add const overload and no-function
3237         overload.
3238         (set_cmd_cfunc): Add const overload.
3239         (cmd_const_cfunc_ftype): Declare.
3240         (cmd_cfunc_eq): Add const overload.
3241         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3242         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3243         overload.
3244
3245 2017-09-27  Tom Tromey  <tom@tromey.com>
3246
3247         * macroexp.c (get_next_token_for_substitution): New function.
3248         (substitute_args): Call it.  Check for __VA_OPT__.
3249
3250 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3251             Pedro Alves <palves@redhat.com>
3252
3253         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3254         producer_is_icc_lt_14.
3255         (producer_is_icc_lt_14): New function.
3256         (check_producer): Add code for checking version of ICC.
3257         (producer_is_icc): Move to producer.c.
3258         (read_structure_type): Restrict ICC workaround to ICC<14.
3259         * producer.c: Include selftest.h.
3260         (producer_is_icc, producer_parsing_tests, _initialize_producer):
3261         New functions.
3262         * producer.h (producer_is_icc): New declaration.
3263
3264 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3265
3266         * Makefile.in (SFILES): Add producer.c.
3267         (COMMON_OBS): Add producer.o
3268         * amd64-tdep.c (producer.h): Add new include.
3269         * dwarf2read.c (producer.h): Add new include.
3270         * producer.c: New file.
3271         * producer.h: New file.
3272         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3273         producer.c.
3274         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3275         producer.h.
3276
3277 2017-09-26  Matthias Klose  <doko@ubuntu.com>
3278
3279         * configure.ac: Search ncursesw before ncurses.
3280         Check ncursesw/ncurses.h before ncurses/ncurses.h.
3281         * gdb_curses.h: Include <ncursesw/ncurses.h>
3282         * config.in, configure: Regenerate.
3283
3284 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3285
3286         PR gdb/22185
3287         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3288         obsolete.
3289         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3290         Remove i386sol2 support.
3291         * configure.nat <i386sol2>: Remove.
3292         <sol2-64>: Fold into ...
3293         <sol2>: ... this.
3294         Move common settings to default section.
3295         Add sol-thread.o.
3296         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3297         x86_64-*-solaris2.1[0-9]*>: Rename to ...
3298         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3299         <i[34567]86-*-solaris*>: Remove.
3300         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3301
3302         * configure.ac: Remove wctype in libw check.
3303         (_MSE_INT_H): Don't define on Solaris 7-9.
3304         <solaris*>: Remove libthread_db.so.1 check.
3305         * configure: Regenerate.
3306         * config.in: Regenerate.
3307
3308         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3309         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3310         (gdb_ps_size_t): Remove.
3311         Use base types in users.
3312         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3313
3314         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3315
3316 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3317
3318         PR build/22206
3319         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3320         (adi_is_addr_mapped): Likewise.
3321         (PSR_ICC): Don't redefine.
3322         (PSR_IMPL): Likewise.
3323
3324 2017-09-25  Tom Tromey  <tom@tromey.com>
3325
3326         * regcache.c (regcache::dump): Use string_printf.
3327
3328 2017-09-25  Tom Tromey  <tom@tromey.com>
3329
3330         * regcache.c (class regcache_invalidator): New.
3331         (struct register_to_invalidate): Remove.
3332         (make_cleanup_regcache_invalidate): Remove.
3333         (regcache::raw_write): Use regcache_invalidator.
3334
3335 2017-09-25  Tom Tromey  <tom@tromey.com>
3336
3337         * spu-tdep.c (spu2ppu_sniffer): Update.
3338         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3339         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3340         Remove.
3341         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3342         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3343         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3344         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3345         (frame_pop): Update.
3346
3347 2017-09-25  Tom Tromey  <tom@tromey.com>
3348
3349         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3350         * regcache.h (regcache_xfree): Don't declare.
3351         * regcache.c (regcache_xfree): Remove.
3352         (do_regcache_xfree): Use delete.
3353         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3354         * linux-fork.c (free_fork): Use delete.
3355         (fork_save_infrun_state): Likewise.
3356         * jit.c (jit_dealloc_cache): Use delete.
3357         * infrun.c (discard_infcall_suspend_state): Use delete.
3358
3359 2017-09-25  Tom Tromey  <tom@tromey.com>
3360
3361         * regcache.h (regcache_xmalloc): Don't declare.
3362         (regcache_raw_set_cached_value): Update comment.
3363         * regcache.c (regcache_xmalloc): Remove.
3364         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3365         * jit.c (jit_frame_sniffer): Use new.
3366         * frame.c (frame_save_as_regcache): Use new.
3367
3368 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3369
3370         * NEWS: Advertise support for guarded-storage registers on IBM z.
3371
3372 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3373
3374         * s390-linux-nat.c (have_regset_gs): New static variable.
3375         (s390_linux_fetch_inferior_registers): Handle guarded-storage
3376         control block and guarded-storage broadcast control regsets.
3377         (s390_read_description): Detect whether the target has
3378         guarded-storage support, return appropriate tdesc.
3379         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3380         (features/s390x-gs-linux64.c): Likewise.
3381         (struct gdbarch_tdep) <have_gs>: New field.
3382         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3383         (s390_gsbc_regset): New variables.
3384         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3385         and s390_gsbc_regset, if applicable.
3386         (s390_core_read_description): Check whether core file was from a
3387         target with guarded-storage support; include appropriate regsets.
3388         (s390_gdbarch_init): Add registers for guarded-storage support.
3389         (_initialize_s390_tdep): Initialize new target descriptions that
3390         include registers for guarded-storage support.
3391         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3392         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3393         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3394         (S390_NUM_REGS): Adjust macro definition.
3395         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3396         (tdesc_s390x_gs_linux64): New declarations.
3397
3398 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3399
3400         * features/s390-gs-linux64.xml: New file.
3401         * features/s390-gs.xml: New file.
3402         * features/s390-gsbc.xml: New file.
3403         * features/s390x-gs-linux64.xml: New file.
3404         * features/Makefile (WHICH): Add s390-gs-linux64 and
3405         s390x-gs-linux64.
3406         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3407         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3408         * features/s390-gs-linux64.c: New generated file.
3409         * features/s390x-gs-linux64.c: New file.
3410         * regformats/s390-gs-linux64.dat: New file.
3411         * regformats/s390x-gs-linux64.dat: New file.
3412
3413 2017-09-23  Tom Tromey  <tom@tromey.com>
3414
3415         * defs.h (make_cleanup_override_quit_handler): Don't declare.
3416
3417 2017-09-22  Tom Tromey  <tom@tromey.com>
3418
3419         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3420         type to scoped_restore_tmpl.
3421         <scoped_input_handler>: Initialize m_quit_handler directly.
3422
3423 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3424
3425         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3426         (cd_command): Likewise.  Free "current_directory" before
3427         assigning to it.
3428         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3429         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3430         * top.c (gdb_dirbuf): Remove global declaration.
3431         * top.h (gdb_dirbuf): Likewise.
3432
3433 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3434
3435         * gnulib/aclocal.m4: Regenerate.
3436         * gnulib/config.in: Regenerate.
3437         * gnulib/configure: Regenerate.
3438         * gnulib/import/Makefile.am: Regenerate.
3439         * gnulib/import/Makefile.in: Regenerate.
3440         * gnulib/import/assure.h: New file.
3441         * gnulib/import/at-func.c: Likewise
3442         * gnulib/import/chdir-long.c: New file.
3443         * gnulib/import/chdir-long.h: New file.
3444         * gnulib/import/cloexec.c: New file.
3445         * gnulib/import/cloexec.h: New file.
3446         * gnulib/import/close.c: New file.
3447         * gnulib/import/closedir.c: New file.
3448         * gnulib/import/dirent-private.h: New file.
3449         * gnulib/import/dup-safer.c: New file.
3450         * gnulib/import/dup.c: New file.
3451         * gnulib/import/dup2.c: New file.
3452         * gnulib/import/error.c: New file.
3453         * gnulib/import/error.h: New file.
3454         * gnulib/import/exitfail.c: New file.
3455         * gnulib/import/exitfail.h: New file.
3456         * gnulib/import/fchdir.c: New file.
3457         * gnulib/import/fcntl.c: New file.
3458         * gnulib/import/fcntl.in.h: New file.
3459         * gnulib/import/fd-hook.c: New file.
3460         * gnulib/import/fd-hook.h: New file.
3461         * gnulib/import/fd-safer.c: New file.
3462         * gnulib/import/fdopendir.c: New file.
3463         * gnulib/import/filename.h: New file.
3464         * gnulib/import/filenamecat-lgpl.c: New file.
3465         * gnulib/import/filenamecat.h: New file.
3466         * gnulib/import/fstat.c: New file.
3467         * gnulib/import/fstatat.c: New file.
3468         * gnulib/import/getcwd-lgpl.c: New file.
3469         * gnulib/import/getcwd.c: New file.
3470         * gnulib/import/getdtablesize.c: New file.
3471         * gnulib/import/getlogin_r.c: New file.
3472         * gnulib/import/getprogname.c: New file.
3473         * gnulib/import/getprogname.h: New file.
3474         * gnulib/import/gettext.h: New file.
3475         * gnulib/import/glob-libc.h: New file.
3476         * gnulib/import/glob.c: New file.
3477         * gnulib/import/glob.in.h: New file.
3478         * gnulib/import/intprops.h: New file.
3479         * gnulib/import/m4/chdir-long.m4: New file.
3480         * gnulib/import/m4/close.m4: New file.
3481         * gnulib/import/m4/closedir.m4: New file.
3482         * gnulib/import/m4/d-ino.m4: New file.
3483         * gnulib/import/m4/d-type.m4: New file.
3484         * gnulib/import/m4/dup.m4: New file.
3485         * gnulib/import/m4/dup2.m4: New file.
3486         * gnulib/import/m4/error.m4: New file.
3487         * gnulib/import/m4/fchdir.m4: New file.
3488         * gnulib/import/m4/fcntl.m4: New file.
3489         * gnulib/import/m4/fcntl_h.m4: New file.
3490         * gnulib/import/m4/fdopendir.m4: New file.
3491         * gnulib/import/m4/filenamecat.m4: New file.
3492         * gnulib/import/m4/fstat.m4: New file.
3493         * gnulib/import/m4/fstatat.m4: New file.
3494         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3495         * gnulib/import/m4/getcwd-path-max.m4: New file.
3496         * gnulib/import/m4/getcwd.m4: New file.
3497         * gnulib/import/m4/getdtablesize.m4: New file.
3498         * gnulib/import/m4/getlogin_r.m4: New file.
3499         * gnulib/import/m4/getprogname.m4: New file.
3500         * gnulib/import/m4/glob.m4: New file.
3501         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3502         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3503         * gnulib/import/m4/mempcpy.m4: New file.
3504         * gnulib/import/m4/memrchr.m4: New file.
3505         * gnulib/import/m4/mode_t.m4: New file.
3506         * gnulib/import/m4/msvc-inval.m4: New file.
3507         * gnulib/import/m4/msvc-nothrow.m4: New file.
3508         * gnulib/import/m4/open.m4: New file.
3509         * gnulib/import/m4/openat.m4: New file.
3510         * gnulib/import/m4/opendir.m4: New file.
3511         * gnulib/import/m4/readdir.m4: New file.
3512         * gnulib/import/m4/realloc.m4: New file.
3513         * gnulib/import/m4/rewinddir.m4: New file.
3514         * gnulib/import/m4/save-cwd.m4: New file.
3515         * gnulib/import/m4/strdup.m4: New file.
3516         * gnulib/import/m4/strerror.m4: New file.
3517         * gnulib/import/m4/unistd-safer.m4: New file.
3518         * gnulib/import/mempcpy.c: New file.
3519         * gnulib/import/memrchr.c: New file.
3520         * gnulib/import/msvc-inval.c: New file.
3521         * gnulib/import/msvc-inval.h: New file.
3522         * gnulib/import/msvc-nothrow.c: New file.
3523         * gnulib/import/msvc-nothrow.h: New file.
3524         * gnulib/import/open.c: New file.
3525         * gnulib/import/openat-die.c: New file.
3526         * gnulib/import/openat-priv.h: New file.
3527         * gnulib/import/openat-proc.c: New file.
3528         * gnulib/import/openat.c: New file.
3529         * gnulib/import/openat.h: New file.
3530         * gnulib/import/opendir.c: New file.
3531         * gnulib/import/pipe-safer.c: New file.
3532         * gnulib/import/readdir.c: New file.
3533         * gnulib/import/realloc.c: New file.
3534         * gnulib/import/rewinddir.c: New file.
3535         * gnulib/import/save-cwd.c: New file.
3536         * gnulib/import/save-cwd.h: New file.
3537         * gnulib/import/strdup.c: New file.
3538         * gnulib/import/strerror-override.c: New file.
3539         * gnulib/import/strerror-override.h: New file.
3540         * gnulib/import/strerror.c: New file.
3541         * gnulib/import/unistd--.h: New file.
3542         * gnulib/import/unistd-safer.h: New file.
3543         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3544         "getcwd" and "glob".
3545         * ser-tcp.c: Undefine "close" before redefining it.
3546
3547 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3548
3549         * guile/scm-value.c (gdbscm_value_address): Initialize address,
3550         get rid of res_val.
3551
3552 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3553
3554         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3555         <sol2,sparc>: Likewise.
3556         <sol2-64,i386>: Likewise.
3557
3558         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3559         -Wdeprecated-declarations on *-*-solaris*.
3560         * configure: Regenerate.
3561
3562         * procfs.c: Include "nat/inferior.h".
3563         (procfs_info_proc): Fix typo.
3564
3565 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3566
3567         * remote.c (vector): Include.
3568         (struct private_thread_info): Add field, thread_handle.
3569         (free_private_thread_info): Deallocate storage associated with
3570         thread handle.
3571         (get_private_info_thread): Initialize `thread_handle' field.
3572         (struct thread_item): Add field, thread_handle.
3573         (clear_threads_listing_context): Deallocate storage associated
3574         with thread handle.
3575         (start_thread): Add support for "handle" attribute.
3576         (thread_attributes): Add "handle".
3577         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3578         field.
3579         (remote_update_thread_list): Update thread_handle.
3580         (remote_thread_handle_to_thread_info): New function.
3581         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3582
3583 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3584
3585         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3586         function.
3587         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3588         * python/python-internal.h (thread_object_type): Declare.
3589
3590 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
3591
3592         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3593         (target_thread_handle_to_thread_info): Declare.
3594         * target.c (target_thread_handle_to_thread_info): New function.
3595         * target-delegates.c: Regenerate.
3596         * gdbthread.h (find_thread_by_handle): Declare.
3597         * thread.c (find_thread_by_handle): New function.
3598         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3599         function.
3600         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3601
3602 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3603
3604         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3605
3606 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
3607
3608         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3609
3610 2017-09-21  Yao Qi  <yao.qi@linaro.org>
3611
3612         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3613         to gdb_target_obs.
3614
3615 2017-09-20  Tom Tromey  <tom@tromey.com>
3616
3617         * breakpoint.c (struct counted_command_line): Remove.
3618         (breakpoint_commands): Update.
3619         (alloc_counted_command_line, incref_counted_command_line)
3620         (decref_counted_command_line, do_cleanup_counted_command_line)
3621         (make_cleanup_decref_counted_command_line): Remove.
3622         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3623         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3624         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3625         (save_breakpoints): Update.
3626         * breakpoint.h (counted_command_line): Now a typedef to
3627         shared_ptr.
3628         (struct breakpoint) <commands>: Now a counted_command_line.
3629         (struct bpstats) <command>: Likewise.
3630
3631 2017-09-20  Tom Tromey  <tom@tromey.com>
3632
3633         * breakpoint.c (struct commands_info, do_map_commands_command):
3634         Remove.
3635         (commands_command_1): Update.
3636         (iterate_over_related_breakpoints): Take a function_view.
3637         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3638         (delete_command): Update.
3639         (map_breakpoint_numbers): Take a function_view.
3640         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3641         (disable_command): Update.
3642         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3643         (enable_command): Update.
3644         (struct disp_data, do_enable_breakpoint_disp)
3645         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3646         (do_map_enable_delete_breakpoint): Remove.
3647         (enable_once_command, enable_count_command, enable_delete_command)
3648         (delete_trace_variable_command): Update.
3649
3650 2017-09-20  Tom Tromey  <tom@tromey.com>
3651
3652         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
3653         (bpstat_clear): Use delete.
3654         (bpstats): New constructors.
3655         (bpstat_copy, bpstat_stop_status): Use new.
3656         (dprintf_after_condition_true): Update.
3657         * breakpoint.h (bpstats::bpstats): Add constructors.
3658         (bpstats::~bpstats): Add destructor.
3659
3660 2017-09-20  Pedro Alves  <palves@redhat.com>
3661
3662         * eval.c (make_params): Delete, refactored as ...
3663         (class fake_method): ... this new type's ctor.
3664         (fake_method::~fake_method): New.
3665         (evaluate_subexp_standard): Use 'fake_method'.
3666
3667 2017-09-20  Tom Tromey  <tom@tromey.com>
3668
3669         * windows-nat.c (get_windows_debug_event, windows_wait)
3670         (do_initial_windows_stuff, windows_attach): Update.
3671         * utils.c (vwarning, internal_vproblem): Update.
3672         (ui_unregister_input_event_handler_cleanup)
3673         (prepare_to_handle_input): Remove.
3674         (class scoped_input_handler): New.
3675         (defaulted_query, prompt_for_continue): Update.
3676         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3677         Update.
3678         * top.c (undo_terminal_modifications_before_exit): Update.
3679         * target/target.h (target_terminal_init, target_terminal_inferior)
3680         (target_terminal_ours): Don't declare.
3681         (class target_terminal): New.
3682         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3683         (target_terminal_ours_for_output)
3684         (make_cleanup_restore_target_terminal): Don't declare.
3685         (target_terminal_info): Remove.
3686         * target.c (enum terminal_state, terminal_state): Remove.
3687         (target_terminal::terminal_state): Define.
3688         (target_terminal::init): Rename from target_terminal_init.
3689         (target_terminal::inferior): Rename from
3690         target_terminal_inferior.
3691         (target_terminal::ours): Rename from target_terminal_ours.
3692         (target_terminal::ours_for_output): Rename from
3693         target_terminal_ours_for_output.
3694         (target_terminal::info): New method.
3695         (cleanup_restore_target_terminal)
3696         (make_cleanup_restore_target_terminal): Remove.
3697         * solib.c (handle_solib_event): Update.
3698         * remote.c (remote_serial_quit_handler): Update.
3699         (remote_terminal_inferior, remote_wait_as): Update.
3700         * record-full.c (record_full_wait_1): Update.
3701         * nto-procfs.c (procfs_create_inferior): Update.
3702         * nat/fork-inferior.c (startup_inferior): Update.
3703         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3704         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3705         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3706         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3707         (mi_breakpoint_created, mi_breakpoint_deleted)
3708         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3709         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3710         (mi_user_selected_context_changed, report_initial_inferior):
3711         Update.
3712         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3713         (linux_nat_terminal_inferior): Update.
3714         * infrun.c (follow_fork_inferior)
3715         (handle_vfork_child_exec_or_exit, do_target_resume)
3716         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3717         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3718         Update.
3719         * inflow.c (child_terminal_init, info_terminal_command): Update.
3720         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3721         (attach_command): Update.
3722         * infcall.c (call_thread_fsm_should_stop): Update.
3723         * gnu-nat.c (gnu_attach): Update.
3724         * extension.c (struct active_ext_lang_state)
3725         (restore_active_ext_lang): Update.
3726         * exceptions.c (print_flush): Update.
3727         * event-top.c (async_enable_stdin, default_quit_handler): Update.
3728         (struct quit_handler_cleanup_data, restore_quit_handler)
3729         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3730         Remove.
3731         * cp-support.c (gdb_demangle): Update.
3732         * breakpoint.c (update_inserted_breakpoint_locations)
3733         (insert_breakpoint_locations, handle_jit_event)
3734         (disable_breakpoints_in_unloaded_shlib): Update.
3735         * annotate.c (annotate_breakpoints_invalid)
3736         (annotate_frames_invalid): Update.
3737
3738 2017-09-20  Tom Tromey  <tom@tromey.com>
3739
3740         * main.c (catch_command_errors): Rename from
3741         catch_command_errors_const.
3742         (captured_main_1): Update.
3743
3744 2017-09-20  Pedro Alves  <palves@redhat.com>
3745
3746         * cli/cli-cmds.c (list_command): Use print_sal_location.
3747         (print_sal_location): New function.
3748         (ambiguous_line_spec): Use print_sal_location.
3749         * linespec.c (symbol_to_sal): Record the symbol in the sal.
3750         * symtab.c (find_function_start_sal): Likewise.
3751         * symtab.h (symtab_and_line::symbol): New field.
3752
3753 2017-09-20  Pedro Alves  <palves@redhat.com>
3754
3755         * linespec.c (minsym_found): Handle non-text minsyms.
3756         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3757
3758 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3759
3760         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3761         backslash.
3762
3763 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3764
3765         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3766         vmovups instead vmovaps.
3767         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3768
3769 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
3770
3771         * NEWS (Changes since GDB 8.0): Add starti.
3772         * infcmd.c (enum run_break): New.
3773         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3774         case.
3775         (run_command): Use enum run_how.
3776         (start_command): Likewise.
3777         (starti_command): New function.
3778         (RUN_ARGS_HELP): New macro.
3779         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3780         commands.  Add starti command.
3781
3782 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3783
3784         * Makefile.in (monitor.o): Remove the rule.
3785
3786 2017-09-19  Yao Qi  <yao.qi@linaro.org>
3787
3788         * annotate.h (struct annotate_arg_emitter): Use
3789         DISABLE_COPY_AND_ASSIGN.
3790         * common/refcounted-object.h (refcounted_object): Likewise.
3791         * completer.h (struct completion_result): Likewise.
3792         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3793         * filename-seen-cache.h (filename_seen_cache): Likewise.
3794         * gdbcore.h (thread_section_name): Likewise.
3795         * gdb_regex.h (compiled_regex): Likewise.
3796         * gdbthread.h (scoped_restore_current_thread): Likewise.
3797         * inferior.h (scoped_restore_current_inferior): Likewise.
3798         * jit.c (jit_reader): Likewise.
3799         * linespec.h (struct linespec_result): Likewise.
3800         * mi/mi-parse.h (struct mi_parse): Likewise.
3801         * nat/fork-inferior.c (execv_argv): Likewise.
3802         * progspace.h (scoped_restore_current_program_space): Likewise.
3803         * python/python-internal.h (class gdbpy_enter): Likewise.
3804         * regcache.h (regcache): Likewise.
3805         * target-descriptions.c (struct tdesc_reg): Likewise.
3806         (struct tdesc_type): Likewise.
3807         (struct tdesc_feature): Likewise.
3808         * ui-out.h (ui_out_emit_type): Likewise.
3809
3810 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
3811
3812         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3813         label abort_expression.
3814
3815 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3816
3817         * common/buffer.c (buffer_xml_printf): Adjust.
3818         * common/xml-utils.c (xml_escape_text): Change return type to
3819         std::string, update code accordingly.
3820         * common/xml-utils.h (xml_escape_text): Change return type to
3821         std::string.
3822         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3823         * windows-tdep.c (windows_xfer_shared_library): Adjust.
3824         * unittests/xml-utils-selftests.c (test_xml_escape_text):
3825         Adjust.
3826
3827 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3828
3829         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3830         (SUBDIR_UNITTESTS_OBS): Add new object file.
3831         * unittests/xml-utils-selftests.c: New file.
3832
3833 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3834
3835         * common/selftest.h (selftest): New struct/interface.
3836         (register_test): Add name parameter, add new overload.
3837         (run_tests): Add filter parameter.
3838         (for_each_selftest_ftype): New typedef.
3839         (for_each_selftest): New declaration.
3840         * common/selftest.c (tests): Change type to
3841         map<string, unique_ptr<selftest>>.
3842         (simple_selftest): New struct.
3843         (register_test): New function.
3844         (register_test): Add name parameter and use it.
3845         (run_tests): Add filter parameter and use it.  Add prints.
3846         Adjust to vector -> map change.
3847         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3848         registering selftests.
3849         * arm-tdep.c (_initialize_arm_tdep): Likewise.
3850         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3851         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3852         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3853         * findvar.c (_initialize_findvar): Likewise.
3854         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3855         * maint.c (maintenance_selftest): Update call to run_tests.
3856         (maintenance_info_selftests): New function.
3857         (_initialize_maint_cmds): Register "maintenance info selftests"
3858         command.  Update "maintenance selftest" doc.
3859         * regcache.c (_initialize_regcache): Add names when registering
3860         selftests.
3861         * rust-exp.y (_initialize_rust_exp): Likewise.
3862         * selftest-arch.c (gdbarch_selftest): New struct.
3863         (gdbarch_tests): Remove.
3864         (register_test_foreach_arch): Add name parameter.  Call
3865         register_test.
3866         (tests_with_arch): Remove, move most content to
3867         gdbarch_selftest::operator().
3868         (_initialize_selftests_foreach_arch): Remove.
3869         * selftest-arch.h (register_test_foreach_arch): Add name
3870         parameter.
3871         (run_tests_with_arch): New declaration.
3872         * utils-selftests.c (_initialize_utils_selftests): Add names
3873         when registering selftests.
3874         * utils.c (_initialize_utils): Likewise.
3875         * unittests/array-view-selftests.c
3876         (_initialize_array_view_selftests): Likewise.
3877         * unittests/environ-selftests.c (_initialize_environ_selftests):
3878         Likewise.
3879         * unittests/function-view-selftests.c
3880         (_initialize_function_view_selftests): Likewise.
3881         * unittests/offset-type-selftests.c
3882         (_initialize_offset_type_selftests): Likewise.
3883         * unittests/optional-selftests.c
3884         (_initialize_optional_selftests): Likewise.
3885         * unittests/scoped_restore-selftests.c
3886         (_initialize_scoped_restore_selftests): Likewise.
3887         * NEWS: Document "maintenance selftest" and "maint info
3888         selftests".
3889
3890 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3891
3892         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3893         scoped_restore.
3894
3895 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
3896
3897         * mi/mi-main.c (mi_load_progress): Make uiout variable
3898         a unique_ptr.
3899
3900 2017-09-15  Pedro Alves  <palves@redhat.com>
3901
3902         * compile/compile-c-types.c (convert_enum, convert_int)
3903         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3904
3905 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
3906
3907         * dwarf2read.c (copy_string): Remove.
3908         (parse_macro_definition): Replace copy_string with savestring.
3909
3910 2017-09-15  Yao Qi  <yao.qi@linaro.org>
3911
3912         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3913         gdb_target_obs.
3914         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3915         Likewise.
3916         (i[34567]86-*-linux*): Likewise.
3917
3918 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3919
3920         * dwarf2expr.h (dwarf_stack_value): Add constructor.
3921         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3922         <stack>: Change type to std::vector.
3923         <stack_len, stack_allocated>: Remove.
3924         <grow_stack>: Remove.
3925         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3926         (dwarf_expr_context::~dwarf_expr_context): Remove.
3927         (dwarf_expr_context::grow_stack): Remove.
3928         (dwarf_expr_context::push): Adjust.
3929         (dwarf_expr_context::pop): Adjust.
3930         (dwarf_expr_context::fetch): Adjust.
3931         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3932         (dwarf_expr_context::stack_empty_p): Adjust.
3933         (dwarf_expr_context::execute_stack_op): Adjust.
3934
3935 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3936
3937         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3938         return type to bool.
3939         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3940
3941 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3942
3943         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3944         Change type to bool.
3945         (dwarf_stack_value) <in_stack_memory>: Likewise.
3946         (dwarf_expr_context) <push_address>: Change parameter type to
3947         bool.
3948         <fetch_in_stack_memory>: Change return type to bool.
3949         <push>: Change parameter type to bool.
3950         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3951         to bool.
3952         (dwarf_expr_context::push_address): Likewise.
3953         (dwarf_expr_context::fetch_in_stack_memory): Change return type
3954         to bool.
3955         (dwarf_expr_context::execute_stack_op): Adjust.
3956         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3957
3958 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
3959
3960         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3961         (struct dwarf_expr_context) <n_pieces>: Remove.
3962         <pieces>: Change type to std::vector.
3963         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3964         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3965         pieces.
3966         (dwarf_expr_context::add_piece): Adjust.
3967         * dwarf2loc.c (struct piece_closure): Initialize fields.
3968         <n_pieces>: Remove.
3969         <pieces>: Change type to std::vector.
3970         (allocate_piece_closure): Adjust, change parameter to
3971         std::vector rvalue and std::move it to piece_closure.
3972         (rw_pieced_value): Adjust.
3973         (check_pieced_synthetic_pointer): Adjust.
3974         (indirect_synthetic_pointer): Adjust.
3975         (coerce_pieced_ref): Adjust.
3976         (free_pieced_value_closure):  Adjust.  Use delete to free
3977         piece_closure.
3978         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
3979         to allocate_piece_closure.
3980         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3981
3982 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3983
3984         * probe.h (probe_ops_cp): Remove typedef.
3985         (DEF_VEC_P (probe_ops_cp)): Remove.
3986         (all_probe_ops): Change type to std::vector.
3987         * probe.c (info_probes_for_ops): Adjust to vector change.
3988         (probe_linespec_to_ops): Likewise.
3989         (all_probe_ops): Change type to std::vector.
3990         (_initialize_probe): Adjust to vector change.
3991         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3992         * elfread.c (elf_get_probes): Likewise.
3993         * stap-probe.c (_initialize_stap_probe): Likewise.
3994
3995 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
3996
3997         * probe.h (struct bound_probe): Define constructors.
3998         * probe.c (bound_probe_s): Remove typedef.
3999         (DEF_VEC_O (bound_probe_s)): Remove VEC.
4000         (collect_probes): Change return type to std::vector, remove
4001         cleanup.
4002         (compare_probes): Return bool, change parameter type.  Change
4003         semantic to "less than".
4004         (gen_ui_out_table_header_info): Change parameter to std::vector
4005         and update.
4006         (exists_probe_with_pops): Likewise.
4007         (info_probes_for_ops): Update to std::vector change.
4008         (enable_probes_command): Likewise.
4009         (disable_probes_command): Likewise.
4010
4011 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
4012
4013         * probe.h (struct probe_ops) <get_probes>: Change parameter from
4014         vec to std::vector.
4015         * probe.c (parse_probes_in_pspace): Update.
4016         (find_probes_in_objfile): Update.
4017         (find_probe_by_pc): Update.
4018         (collect_probes): Update.
4019         (probe_any_get_probes): Update.
4020         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
4021         return type to reference to std::vector.
4022         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
4023         std::vector and update.
4024         (dtrace_process_dof): Likewise.
4025         (dtrace_get_probes): Likewise.
4026         * elfread.c (elf_get_probes): Change return type to std::vector,
4027         store an std::vector in bfd_data.
4028         (probe_key_free): Update to std::vector.
4029         * stap-probe.c (handle_stap_probe): Change parameter to
4030         std::vector and update.
4031         (stap_get_probes): Likewise.
4032         * symfile-debug.c (debug_sym_get_probes): Change return type to
4033         std::vector and update.
4034
4035 2017-09-11  Tom Tromey  <tom@tromey.com>
4036
4037         * breakpoint.c (program_breakpoint_here_p): Update.
4038         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
4039         from make_show_memory_breakpoints_cleanup.  Return a
4040         scoped_restore_tmpl<int>.
4041         (restore_show_memory_breakpoints): Remove.
4042         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
4043         * mem-break.c (memory_validate_breakpoint): Update.
4044         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
4045         (ia64_memory_remove_breakpoint): Update.
4046         (ia64_breakpoint_from_pc): Update.
4047         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
4048         from make_show_memory_breakpoints_cleanup.
4049
4050 2017-09-11  Tom Tromey  <tom@tromey.com>
4051
4052         * d-namespace.c (d_lookup_symbol): Use std::string.
4053         (find_symbol_in_baseclass): Likewise.
4054
4055 2017-09-11  Tom Tromey  <tom@tromey.com>
4056
4057         * ctf.c (ctf_start): Use std::string.
4058
4059 2017-09-11  Tom Tromey  <tom@tromey.com>
4060
4061         * ada-lang.c (is_known_support_routine): Update.
4062         (ada_unhandled_exception_name_addr_from_raise): Update.
4063         * guile/scm-frame.c (gdbscm_frame_name): Update.
4064         * python/py-frame.c (frapy_name): Update.
4065         (frapy_function): Update.
4066         * stack.h (find_frame_funname): Update.
4067         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
4068         (print_frame): Update.
4069
4070 2017-09-11  Tom Tromey  <tom@tromey.com>
4071
4072         * findcmd.c (put_bits): Take a gdb::byte_vector.
4073         (parse_find_args): Return gdb::byte_vector.  "args" now const.
4074         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
4075         cleanups.
4076         (find_command): Update.
4077
4078 2017-09-11  Tom Tromey  <tom@tromey.com>
4079
4080         * cli/cli-script.c (class scoped_restore_hook_in): New.
4081         (clear_hook_in_cleanup): Remove.
4082         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
4083         scoped_restore_hook_in.
4084
4085 2017-09-11  Tom Tromey  <tom@tromey.com>
4086
4087         * cli/cli-script.c (restore_interp): Remove.
4088         (read_command_lines): Use scoped_restore_interp.
4089         * interps.c (scoped_restore_interp::set_temp): Rename from
4090         interp_set_temp.
4091         * interps.h (class scoped_restore_interp): New.
4092         (interp_set_temp): Remove.
4093
4094 2017-09-11  Tom Tromey  <tom@tromey.com>
4095
4096         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4097         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
4098         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
4099         scoped_restore.
4100         (mi_cmd_break_insert_1): Update.
4101         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
4102         scoped_restore.
4103
4104 2017-09-11  Tom Tromey  <tom@tromey.com>
4105
4106         * demangle.c (demangle_command): Update.
4107         * breakpoint.c (disable_command): Update.
4108         (enable_command): Update.
4109         (find_location_by_number): Make "number" const.  Use
4110         get_number_trailer.
4111         * cli/cli-utils.c (extract_arg): Return std::string.
4112         * probe.c (parse_probe_linespec): Update.  Change types.
4113         (collect_probes): Take string arguments.
4114         (parse_probe_linespec): Likewise.
4115         (info_probes_for_ops): Update.
4116         (enable_probes_command): Update.
4117         (disable_probes_command): Update.
4118         * break-catch-sig.c (catch_signal_split_args): Update.
4119         * mi/mi-parse.c (mi_parse): Update.
4120
4121 2017-09-11  Tom Tromey  <tom@tromey.com>
4122
4123         * language.h (language_enum): Make argument const.
4124         * language.c (language_enum): Make argument const.
4125
4126 2017-09-11  Tom Tromey  <tom@tromey.com>
4127
4128         * common/common-utils.h (skip_to_space): Remove macro, redeclare
4129         as function.
4130         (skip_to_space): Rename from skip_to_space_const.
4131         * common/common-utils.c (skip_to_space): New function.
4132         (skip_to_space): Rename from skip_to_space_const.
4133         * cli/cli-utils.h (get_number): Rename from get_number_const.
4134         (extract_arg): Rename from extract_arg_const.
4135         * cli/cli-utils.c (get_number): Rename from get_number_const.
4136         (extract_arg): Rename from extract_arg_const.
4137         (number_or_range_parser::get_number): Use ::get_number.
4138         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
4139         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
4140         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
4141         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
4142         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
4143         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
4144         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
4145         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
4146
4147 2017-09-11  Tom Tromey  <tom@tromey.com>
4148
4149         * python/python.c (do_start_initialization): Use
4150         py-event-types.def to initialize types.
4151         Define all object type structures.
4152         * python/python-internal.h: Don't declare event initialization
4153         functions.
4154         * python/py-threadevent.c (thread_event_object_type): Don't
4155         define.
4156         * python/py-stopevent.c (stop_event_object_type): Don't define.
4157         * python/py-signalevent.c (signal_event_object_type): Don't
4158         declare or define.
4159         * python/py-newobjfileevent.c (new_objfile_event_object_type)
4160         (clear_objfiles_event_object_type): Don't declare or define.
4161         * python/py-infevents.c (inferior_call_pre_event_object_type)
4162         (inferior_call_post_event_object_type)
4163         (register_changed_event_object_type)
4164         (memory_changed_event_object_type): Don't declare or define.
4165         * python/py-inferior.c (new_thread_event_object_type)
4166         (new_inferior_event_object_type)
4167         (inferior_deleted_event_object_type): Don't declare or define.
4168         * python/py-exitedevent.c (exited_event_object_type): Don't
4169         declare or define.
4170         * python/py-evts.c (gdbpy_initialize_py_events): Use
4171         py-all-events.def.
4172         * python/py-events.h (thread_event_object_type): Don't declare.
4173         (events_object): Use py-all-events.def.
4174         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
4175         py-event-types.def.
4176         * python/py-event-types.def: New file.
4177         * python/py-continueevent.c (create_continue_event_object): Don't
4178         declare or define.
4179         * python/py-bpevent.c (breakpoint_event_object_type): Don't
4180         declare or define.
4181         * python/py-all-events.def: New file.
4182
4183 2017-09-11  Tom Tromey  <tom@tromey.com>
4184
4185         * python/py-threadevent.c (create_thread_event_object): Return
4186         gdbpy_ref.
4187         * python/py-stopevent.h (create_stop_event_object)
4188         (create_breakpoint_event_object, create_signal_event_object):
4189         Update.
4190         * python/py-stopevent.c (create_stop_event_object): Return
4191         gdbpy_ref.
4192         (emit_stop_event): Update.
4193         * python/py-signalevent.c (create_signal_event_object): Return
4194         gdbpy_ref.
4195         * python/py-infevents.c (create_inferior_call_event_object):
4196         Update.
4197         * python/py-event.h (create_event_object)
4198         (create_thread_event_object): Update.
4199         * python/py-event.c (create_event_object): Return gdbpy_ref.
4200         * python/py-continueevent.c: Return gdbpy_ref.
4201         * python/py-bpevent.c (create_breakpoint_event_object): Return
4202         gdbpy_ref.
4203
4204 2017-09-11  Tom Tromey  <tom@tromey.com>
4205
4206         PR python/15622:
4207         * NEWS: Add entry.
4208         * python/python.c (do_start_initialization): Initialize new event
4209         types.
4210         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4211         (gdbpy_initialize_inferior_deleted_event)
4212         (gdbpy_initialize_new_thread_event): Declare.
4213         * python/py-threadevent.c (create_thread_event_object): Add option
4214         "thread" parameter.
4215         * python/py-inferior.c (new_thread_event_object_type)
4216         (new_inferior_event_object_type)
4217         (inferior_deleted_event_object_type): Declare.
4218         (python_new_inferior, python_inferior_deleted): New functions.
4219         (add_thread_object): Emit new_thread event.
4220         (gdbpy_initialize_inferior): Attach new functions to corresponding
4221         observers.
4222         (new_thread, new_inferior, inferior_deleted): Define new event
4223         types.
4224         * python/py-evts.c (gdbpy_initialize_py_events): Add new
4225         registries.
4226         * python/py-events.h (events_object) <new_inferior,
4227         inferior_deleted, new_thread>: New fields.
4228         * python/py-event.h (create_thread_event_breakpoint): Add optional
4229         "thread" parameter.
4230
4231 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4232
4233         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4234         check current_ui instead.
4235         (internal_vproblem): Likewise.
4236
4237 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
4238
4239         * thread.c (print_thread_info_1): Remove unnecessary calls to
4240         uiout->is_mi_like_p.
4241
4242 2017-09-09  Tom Tromey  <tom@tromey.com>
4243
4244         * namespace.h (add_using_directive): Update.
4245         * namespace.c (add_using_directive): Change type of excludes to
4246         std::vector.
4247         * dwarf2read.c (read_import_statement): Use std::vector.
4248         (read_namespace): Update.
4249         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4250
4251 2017-09-09  Tom Tromey  <tom@tromey.com>
4252
4253         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4254
4255 2017-09-09  Tom Tromey  <tom@tromey.com>
4256
4257         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4258
4259 2017-09-09  Tom Tromey  <tom@tromey.com>
4260
4261         * stack.c (func_command): Use gdb::def_vector.
4262
4263 2017-09-09  Tom Tromey  <tom@tromey.com>
4264
4265         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4266         ui_out_emit_list, ui_out_emit_tuple.
4267         (mi_cmd_var_update): Likewise.
4268
4269 2017-09-09  Tom Tromey  <tom@tromey.com>
4270
4271         * mi/mi-interp.c (mi_user_selected_context_changed): Use
4272         ui_out_redirect_pop.
4273         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4274         ui_out_redirect_pop.
4275         * utils.c (do_ui_out_redirect_pop)
4276         (make_cleanup_ui_out_redirect_pop): Remove.
4277         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4278         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4279         * ui-out.h (ui_out_redirect_pop): New class.
4280
4281 2017-09-09  Tom Tromey  <tom@tromey.com>
4282
4283         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4284         (list_available_thread_groups, mi_cmd_list_thread_groups)
4285         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4286         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4287         Likewise.
4288
4289 2017-09-09  Tom Tromey  <tom@tromey.com>
4290
4291         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4292         ui_out_emit_tuple.
4293
4294 2017-09-09  Tom Tromey  <tom@tromey.com>
4295
4296         * target.c (flash_erase_command): Use ui_out_emit_tuple.
4297         * stack.c (print_frame): Use ui_out_emit_tuple.
4298         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4299         (info_spu_mailbox_command, info_spu_dma_command)
4300         (info_spu_proxydma_command): Likewise.
4301         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4302         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4303         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4304         ui_out_emit_tuple.
4305         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4306
4307 2017-09-09  Tom Tromey  <tom@tromey.com>
4308
4309         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4310         (class ui_out_emit_table): Update comment.
4311         * ui-out.c (do_cleanup_table_end)
4312         (make_cleanup_ui_out_table_begin_end): Remove.
4313         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4314         (info_spu_dma_cmdlist): Likewise.
4315         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4316         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4317         ui_out_emit_table.
4318
4319 2017-09-09  Tom Tromey  <tom@tromey.com>
4320
4321         * thread.c (print_thread_info_1): Use ui_out_emit_table,
4322         ui_out_emit_list, gdb::optional.
4323
4324 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
4325
4326         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4327         prototype.
4328         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4329         prototype.
4330         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4331         prototype.
4332         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4333         * ada-exp.y: Remove _initialize_ada_exp prototype.
4334         * ada-lang.c: Remove _initialize_ada_language prototype.
4335         * ada-tasks.c: Remove _initialize_tasks prototype.
4336         * addrmap.c: Remove _initialize_addrmap prototype.
4337         * agent.c: Remove _initialize_agent prototype.
4338         * aix-thread.c: Remove _initialize_aix_thread prototype.
4339         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4340         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4341         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4342         prototype.
4343         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4344         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4345         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4346         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4347         prototype.
4348         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4349         prototype.
4350         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4351         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4352         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4353         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4354         prototype.
4355         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4356         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4357         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4358         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4359         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4360         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4361         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4362         prototype.
4363         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4364         prototype.
4365         * annotate.c: Remove _initialize_annotate prototype.
4366         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4367         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4368         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4369         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4370         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4371         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4372         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4373         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4374         prototype.
4375         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4376         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4377         * auto-load.c: Remove _initialize_auto_load prototype.
4378         * auxv.c: Remove _initialize_auxv prototype.
4379         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4380         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4381         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4382         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4383         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4384         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4385         prototype.
4386         * break-catch-throw.c: Remove _initialize_break_catch_throw
4387         prototype.
4388         * breakpoint.c: Remove _initialize_breakpoint prototype.
4389         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4390         * btrace.c: Remove _initialize_btrace prototype.
4391         * charset.c: Remove _initialize_charset prototype.
4392         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4393         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4394         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4395         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4396         * cli/cli-script.c: Remove _initialize_cli_script prototype.
4397         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4398         * coffread.c: Remove _initialize_coffread prototype.
4399         * compile/compile.c: Remove _initialize_compile prototype.
4400         * complaints.c: Remove _initialize_complaints prototype.
4401         * completer.c: Remove _initialize_completer prototype.
4402         * copying.awk: Remove _initialize_copying prototype.
4403         * copying.c: Regenerate.
4404         * core-regset.c: Remove _initialize_core_regset prototype.
4405         * corefile.c: Remove _initialize_core prototype.
4406         * corelow.c: Remove _initialize_corelow prototype.
4407         * cp-abi.c: Remove _initialize_cp_abi prototype.
4408         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4409         * cp-support.c: Remove _initialize_cp_support prototype.
4410         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4411         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4412         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4413         * ctf.c: Remove _initialize_ctf prototype.
4414         * d-lang.c: Remove _initialize_d_language prototype.
4415         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4416         prototype.
4417         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4418         * dbxread.c: Remove _initialize_dbxread prototype.
4419         * dcache.c: Remove _initialize_dcache prototype.
4420         * demangle.c: Remove _initialize_demangler prototype.
4421         * disasm-selftests.c: Remove _initialize_disasm_selftests
4422         prototype.
4423         * disasm.c: Remove _initialize_disasm prototype.
4424         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4425         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4426         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4427         prototype.
4428         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4429         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4430         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4431         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4432         * elfread.c: Remove _initialize_elfread prototype.
4433         * exec.c: Remove _initialize_exec prototype.
4434         * extension.c: Remove _initialize_extension prototype.
4435         * f-lang.c: Remove _initialize_f_language prototype.
4436         * f-valprint.c: Remove _initialize_f_valprint prototype.
4437         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4438         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4439         * filesystem.c: Remove _initialize_filesystem prototype.
4440         * findcmd.c: Remove _initialize_mem_search prototype.
4441         * fork-child.c: Remove _initialize_fork_child prototype.
4442         * frame-base.c: Remove _initialize_frame_base prototype.
4443         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4444         * frame.c: Remove _initialize_frame prototype.
4445         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4446         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4447         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4448         * gcore.c: Remove _initialize_gcore prototype.
4449         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4450         * gdbarch.c: Regenerate.
4451         * gdbarch.sh: Remove _initialize_gdbarch prototype.
4452         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4453         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4454         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4455         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4456         * go-lang.c: Remove _initialize_go_language prototype.
4457         * go32-nat.c: Remove _initialize_go32_nat prototype.
4458         * guile/guile.c: Remove _initialize_guile prototype.
4459         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4460         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4461         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4462         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4463         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4464         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4465         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4466         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4467         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4468         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4469         prototype.
4470         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4471         prototype.
4472         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4473         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4474         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4475         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4476         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4477         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4478         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4479         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4480         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4481         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4482         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4483         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4484         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4485         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4486         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4487         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4488         prototype.
4489         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4490         prototype.
4491         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4492         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4493         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4494         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4495         * infcall.c: Remove _initialize_infcall prototype.
4496         * infcmd.c: Remove _initialize_infcmd prototype.
4497         * inferior.c: Remove _initialize_inferiors prototype.
4498         * inflow.c: Remove _initialize_inflow prototype.
4499         * infrun.c: Remove _initialize_infrun prototype.
4500         * interps.c: Remove _initialize_interpreter prototype.
4501         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4502         * jit.c: Remove _initialize_jit prototype.
4503         * language.c: Remove _initialize_language prototype.
4504         * linux-fork.c: Remove _initialize_linux_fork prototype.
4505         * linux-nat.c: Remove _initialize_linux_nat prototype.
4506         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4507         * linux-thread-db.c: Remove _initialize_thread_db prototype.
4508         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4509         * m2-lang.c: Remove _initialize_m2_language prototype.
4510         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4511         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4512         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4513         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4514         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4515         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4516         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4517         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4518         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4519         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4520         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4521         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4522         * machoread.c: Remove _initialize_machoread prototype.
4523         * macrocmd.c: Remove _initialize_macrocmd prototype.
4524         * macroscope.c: Remove _initialize_macroscope prototype.
4525         * maint.c: Remove _initialize_maint_cmds prototype.
4526         * mdebugread.c: Remove _initialize_mdebugread prototype.
4527         * memattr.c: Remove _initialize_mem prototype.
4528         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4529         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4530         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4531         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4532         * mi/mi-main.c: Remove _initialize_mi_main prototype.
4533         * microblaze-linux-tdep.c: Remove
4534         _initialize_microblaze_linux_tdep prototype.
4535         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4536         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4537         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4538         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4539         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4540         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4541         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4542         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4543         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4544         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4545         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4546         prototype.
4547         * mipsread.c: Remove _initialize_mipsread prototype.
4548         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4549         prototype.
4550         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4551         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4552         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4553         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4554         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4555         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4556         prototype.
4557         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4558         * nto-procfs.c: Remove _initialize_procfs prototype.
4559         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4560         * objc-lang.c: Remove _initialize_objc_language prototype.
4561         * objfiles.c: Remove _initialize_objfiles prototype.
4562         * observer.c: Remove observer_test_first_notification_function,
4563         observer_test_second_notification_function,
4564         observer_test_third_notification_function, and
4565         _initialize_observer prototypes.
4566         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4567         * osabi.c: Remove _initialize_gdb_osabi prototype.
4568         * osdata.c: Remove _initialize_osdata prototype.
4569         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4570         * parse.c: Remove _initialize_parse prototype.
4571         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4572         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4573         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4574         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4575         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4576         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4577         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4578         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4579         * printcmd.c: Remove _initialize_printcmd prototype.
4580         * probe.c: Remove _initialize_probe prototype.
4581         * proc-api.c: Remove _initialize_proc_api prototype.
4582         * proc-events.c: Remove _initialize_proc_events prototype.
4583         * proc-service.c: Remove _initialize_proc_service prototype.
4584         * procfs.c: Remove _initialize_procfs prototype.
4585         * psymtab.c: Remove _initialize_psymtab prototype.
4586         * python/python.c: Remove _initialize_python prototype.
4587         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4588         * record-btrace.c: Remove _initialize_record_btrace prototype.
4589         * record-full.c: Remove _initialize_record_full prototype.
4590         * record.c: Remove _initialize_record prototype.
4591         * regcache.c: Remove _initialize_regcache prototype.
4592         * reggroups.c: Remove _initialize_reggroup prototype.
4593         * remote-notif.c: Remove _initialize_notif prototype.
4594         * remote-sim.c: Remove _initialize_remote_sim prototype.
4595         * remote.c: Remove _initialize_remote prototype.
4596         * reverse.c: Remove _initialize_reverse prototype.
4597         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4598         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4599         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4600         prototype.
4601         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4602         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4603         * rust-exp.y: Remove _initialize_rust_exp prototype.
4604         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4605         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4606         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4607         * score-tdep.c: Remove _initialize_score_tdep prototype.
4608         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4609         prototype.
4610         * ser-go32.c: Remove _initialize_ser_dos prototype.
4611         * ser-mingw.c: Remove _initialize_ser_windows prototype.
4612         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4613         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4614         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4615         * serial.c: Remove _initialize_serial prototype.
4616         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4617         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4618         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4619         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4620         * skip.c: Remove _initialize_step_skip prototype.
4621         * sol-thread.c: Remove _initialize_sol_thread prototype.
4622         * solib-aix.c: Remove _initialize_solib_aix prototype.
4623         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4624         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4625         * solib-frv.c: Remove _initialize_frv_solib prototype.
4626         * solib-spu.c: Remove _initialize_spu_solib prototype.
4627         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4628         * solib-target.c: Remove _initialize_solib_target prototype.
4629         * solib.c: Remove _initialize_solib prototype.
4630         * source.c: Remove _initialize_source prototype.
4631         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4632         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4633         prototype.
4634         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4635         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4636         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4637         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4638         prototype.
4639         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4640         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4641         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4642         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4643         prototype.
4644         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4645         prototype.
4646         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4647         prototype.
4648         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4649         prototype.
4650         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4651         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4652         prototype.
4653         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4654         prototype.
4655         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4656         prototype.
4657         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4658         prototype.
4659         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4660         prototype.
4661         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4662         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4663         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4664         * stabsread.c: Remove _initialize_stabsread prototype.
4665         * stack.c: Remove _initialize_stack prototype.
4666         * stap-probe.c: Remove _initialize_stap_probe prototype.
4667         * std-regs.c: Remove _initialize_frame_reg prototype.
4668         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4669         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4670         * symfile.c: Remove _initialize_symfile prototype.
4671         * symmisc.c: Remove _initialize_symmisc prototype.
4672         * symtab.c: Remove _initialize_symtab prototype.
4673         * target-dcache.c: Remove _initialize_target_dcache prototype.
4674         * target-descriptions.c: Remove _initialize_target_descriptions
4675         prototype.
4676         * thread.c: Remove _initialize_thread prototype.
4677         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4678         prototype.
4679         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4680         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4681         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4682         prototype.
4683         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4684         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4685         * tracefile.c: Remove _initialize_tracefile prototype.
4686         * tracepoint.c: Remove _initialize_tracepoint prototype.
4687         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4688         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4689         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4690         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4691         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4692         * tui/tui-win.c: Remove _initialize_tui_win prototype.
4693         * tui/tui.c: Remove _initialize_tui prototype.
4694         * typeprint.c: Remove _initialize_typeprint prototype.
4695         * user-regs.c: Remove _initialize_user_regs prototype.
4696         * utils.c: Remove _initialize_utils prototype.
4697         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4698         * valarith.c: Remove _initialize_valarith prototype.
4699         * valops.c: Remove _initialize_valops prototype.
4700         * valprint.c: Remove _initialize_valprint prototype.
4701         * value.c: Remove _initialize_values prototype.
4702         * varobj.c: Remove _initialize_varobj prototype.
4703         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4704         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4705         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4706         * windows-nat.c: Remove _initialize_windows_nat,
4707         _initialize_check_for_gdb_ini, and _initialize_loadable
4708         prototypes.
4709         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4710         * xcoffread.c: Remove _initialize_xcoffread prototype.
4711         * xml-support.c: Remove _initialize_xml_support prototype.
4712         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4713         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4714         prototype.
4715         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4716         prototype.
4717         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4718
4719 2017-09-08  Keith Seitz  <keiths@redhat.com>
4720
4721         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4722         field.
4723
4724 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
4725
4726         * f-valprint.c (f_val_print): Remove check for one byte
4727         sized integers. Remove printing of character type.
4728
4729 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
4730             Christoph Weinmann  <christoph.t.weinmann@intel.com>
4731             Bernhard Heckel  <bernhard.heckel@intel.com>
4732
4733         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4734         to maintain proper indentation when printing pointers/refs.
4735
4736 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4737
4738         GDB 8.0.1 released.
4739
4740 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
4741
4742         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4743
4744 2017-09-05  Tom Tromey  <tom@tromey.com>
4745
4746         * parse.c (funcall_chain): Now a std::vector.
4747         (start_arglist, end_arglist): Simplify.
4748         (free_funcalls): Remove.
4749         (parse_exp_in_context_1): Remove cleanup.
4750
4751 2017-09-05  Tom Tromey  <tom@tromey.com>
4752
4753         * go-exp.y (go_parse): Don't create a cleanup.
4754
4755 2017-09-05  Tom Tromey  <tom@tromey.com>
4756
4757         * d-exp.y (PrimaryExpression): Use std::string.
4758         (d_parse): Don't create a cleanup.
4759
4760 2017-09-05  Tom Tromey  <tom@tromey.com>
4761
4762         * utils.c (do_clear_parser_state): Remove.
4763         (make_cleanup_clear_parser_state): Remove.
4764         * p-exp.y (pascal_parse): Use scoped_restore.
4765         * m2-exp.y (m2_parse): Use scoped_restore.
4766         * f-exp.y (f_parse): Use scoped_restore.
4767         * d-exp.y (d_parse): Use scoped_restore.
4768         * c-exp.y (c_parse): Use scoped_restore.
4769         * ada-exp.y (ada_parse): Use scoped_restore.
4770         * utils.h (make_cleanup_clear_parser_state): Remove.
4771
4772 2017-09-06  Keith Seitz  <keiths@redhat.com>
4773
4774         * dwarf2read.c (dw2_linkage_name_attr): New function.
4775         (dw2_linkage_name): New function.
4776         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4777         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4778         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4779
4780 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4781
4782         * config/djgpp/djconfig.sh: Correct shell portability issue.
4783
4784 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4785
4786         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4787
4788 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4789
4790         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4791         * NEWS: Mention new FreeBSD/mips native configuration.
4792         * configure.host: Add aarch64*-*-freebsd*.
4793         * configure.nat: Likewise.
4794         * aarch64-fbsd-nat.c: New file.
4795
4796 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
4797
4798         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4799         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4800         * NEWS: Mention new FreeBSD/aarch64 target.
4801         * configure.tgt: Add aarch64*-*-freebsd*.
4802         * aarch64-fbsd-tdep.c: New file.
4803         * aarch64-fbsd-tdep.h: New file.
4804
4805 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
4806
4807         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4808
4809 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
4810
4811         * parse.c (find_minsym_type_and_address): Don't relocate addresses
4812         of TLS symbols.
4813
4814 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4815
4816         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4817         call.
4818
4819 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4820
4821         * infrun.c (follow_exec): Call add_thread after
4822         target_find_description.
4823
4824 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4825
4826         * infrun.c (handle_inferior_event_1): When exec'ing, read
4827         stop_pc after follow_exec.
4828
4829 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
4830
4831         * remote.c (process_g_packet): Update error message.
4832
4833 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4834
4835         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4836         targets.
4837
4838 2017-09-05  Pedro Alves  <palves@redhat.com>
4839
4840         * eval.c (eval_call, evaluate_funcall): New functions, factored
4841         out from ...
4842         (evaluate_subexp_standard): ... this.
4843
4844 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4845
4846         * amd64-tdep.c (amd64_target_description): Create target
4847         descriptions.
4848         (_initialize_amd64_tdep): Don't call functions
4849         initialize_tdesc_amd64_*.  Add self tests.
4850         * arch/amd64.c (amd64_create_target_description): Add parameter
4851         is_linux.  Call set_tdesc_osabi if is_linux is true.
4852         * arch/amd64.h (amd64_create_target_description): Update the
4853         declaration.
4854         * arch/i386.c (i386_create_target_description): Add parameter
4855         is_linux.  Call set_tdesc_osabi if is_linux is true.
4856         * arch/i386.h (i386_create_target_description): Update
4857         declaration.
4858         * configure.tgt: Add i386.o to gdb_target_obs.
4859         * features/Makefile (XMLTOC): Remove i386/*.xml.
4860         * features/i386/amd64-avx-avx512.c: Remove.
4861         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4862         * features/i386/amd64-avx-mpx.c: Remove.
4863         * features/i386/amd64-avx.c: Remove.
4864         * features/i386/amd64-mpx.c: Remove.
4865         * features/i386/amd64.c: Remove.
4866         * features/i386/i386-avx-avx512.c: Remove.
4867         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4868         * features/i386/i386-avx-mpx.c: Remove.
4869         * features/i386/i386-avx.c: Remove.
4870         * features/i386/i386-mmx.c: Remove.
4871         * features/i386/i386-mpx.c: Remove.
4872         * features/i386/i386.c: Remove.
4873         * i386-tdep.c: Don't include features/i386/i386*.c., include
4874         target-descriptions.h and arch/i386.h.
4875         (i386_target_description): Create target descriptions.
4876         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4877         functions.  Do self tests.
4878
4879 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4880
4881         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4882         * features/i386/amd64-avx-avx512-linux.c: Removed.
4883         * features/i386/amd64-avx-linux.c: Removed.
4884         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4885         * features/i386/amd64-avx-mpx-linux.c: Removed.
4886         * features/i386/amd64-linux.c: Removed.
4887         * features/i386/amd64-mpx-linux.c: Removed.
4888         * features/i386/x32-avx-avx512-linux.c: Removed.
4889         * features/i386/x32-avx-linux.c: Removed.
4890         * features/i386/x32-linux.c: Removed.
4891
4892 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4893
4894         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
4895         features/i386/*.c.
4896         (amd64_linux_read_description): Call
4897         amd64_create_target_description.
4898         * arch/amd64.c: New file.
4899         * arch/amd64.h: New file.
4900         * configure.tgt (x86_64-*-linux*): Append amd64.o.
4901         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4902
4903 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4904
4905         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4906         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
4907         (amd64_linux_read_description): Create target descriptions.
4908         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4909         functions.  Add unit tests.
4910         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4911         x32-core.xml.
4912         * features/i386/64bit-avx.c: Generated.
4913         * features/i386/64bit-avx512.c: Generated.
4914         * features/i386/64bit-core.c: Generated.
4915         * features/i386/64bit-linux.c: Generated.
4916         * features/i386/64bit-mpx.c: Generated.
4917         * features/i386/64bit-pkeys.c: Generated.
4918         * features/i386/64bit-segments.c: Generated.
4919         * features/i386/64bit-sse.c: Generated.
4920         * features/i386/x32-core.c: Generated.
4921         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4922         c files for amd64-linux and x32-linux.
4923
4924 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4925
4926         * amd64-linux-tdep.c (amd64_linux_read_description): New
4927         function.
4928         (amd64_linux_core_read_description): Call
4929         amd64_linux_read_description.
4930         (amd64_linux_init_abi): Likewise.
4931         (amd64_x32_linux_init_abi): Likewise.
4932         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4933         * x86-linux-nat.c (x86_linux_read_description): Call
4934         amd64_linux_read_description.
4935
4936 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4937
4938         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4939         comments.
4940
4941 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4942
4943         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4944         * features/i386/i386-avx-avx512-linux.c: Remove.
4945         * features/i386/i386-avx-linux.c: Remove.
4946         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4947         * features/i386/i386-avx-mpx-linux.c: Remove.
4948         * features/i386/i386-linux.c: Remove.
4949         * features/i386/i386-mmx-linux.c: Remove.
4950         * features/i386/i386-mpx-linux.c: Remove.
4951
4952 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4953
4954         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4955         (SFILES): Add arch/i386.c.
4956         (HFILES_NO_SRCDIR): Add arch/i386.h.
4957         * arch/i386.c: New file.
4958         * arch/i386.h: New file.
4959         * arch/tdesc.h (allocate_target_description): Declare.
4960         (set_tdesc_architecture): Declare.
4961         (set_tdesc_osabi): Declare.
4962         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4963         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4964         include arch/i386.h.
4965         (i386_linux_read_description): Remove code and call
4966         i386_create_target_description.
4967         (set_tdesc_architecture): New function.
4968         (set_tdesc_osabi): New function.
4969         * target-descriptions.h (allocate_target_description): Remove.
4970
4971 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4972
4973         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4974         * target-descriptions.c (tdesc_create_feature): Likewise, and
4975         adjust code.
4976         * features/i386/32bit-avx.c: Re-generated.
4977         * features/i386/32bit-avx512.c: Re-generated.
4978         * features/i386/32bit-core.c: Re-generated.
4979         * features/i386/32bit-linux.c: Re-generated.
4980         * features/i386/32bit-mpx.c: Re-generated.
4981         * features/i386/32bit-pkeys.c: Re-generated.
4982         * features/i386/32bit-sse.c: Re-generated.
4983
4984 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4985
4986         * regformats/regdef.h (struct reg): Override operator == and !=.
4987
4988 2017-09-05  Yao Qi  <yao.qi@linaro.org>
4989
4990         * arch/tdesc.h: New file.
4991         * regformats/regdat.sh: Generate code using tdesc_create_reg.
4992         * target-descriptions.c: Update comments.
4993         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
4994         declarations.
4995         * features/i386/32bit-avx.c: Re-generated.
4996         * features/i386/32bit-avx512.c: Re-generated.
4997         * features/i386/32bit-core.c: Re-generated.
4998         * features/i386/32bit-linux.c: Re-generated.
4999         * features/i386/32bit-mpx.c: Re-generated.
5000         * features/i386/32bit-pkeys.c: Re-generated.
5001         * features/i386/32bit-sse.c: Re-generated.
5002
5003 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5004
5005         * regformats/regdat.sh: Update generated code.
5006
5007 2017-09-05  Yao Qi  <yao.qi@linaro.org>
5008
5009         * regformats/regdat.sh: Adjust code order.
5010
5011 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
5012
5013         * expprint.c (dump_subexp_body_standard): Use constant format
5014         string in fprintf_filtered call.
5015
5016 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5017
5018         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
5019         NetBSD/i386.
5020         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
5021
5022 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5023
5024         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
5025
5026 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5027
5028         * bsd-kvm.o: Define _KMEMUSER.
5029         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
5030         * configure: Regenerate.
5031
5032 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5033
5034         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
5035         * i386-fbsd-nat.c: Likewise.
5036
5037 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5038
5039         * unittests/array-view-selftests.c: Add include of <array>.
5040
5041 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
5042
5043         * spu-tdep.c (flush_ea_cache): Add missing argument to
5044         call_function_by_hand.
5045
5046 2017-09-04  Pedro Alves  <palves@redhat.com>
5047
5048         * NEWS (Safer support for debugging with no debug info): New.
5049
5050 2017-09-04  Pedro Alves  <palves@redhat.com>
5051
5052         * c-exp.y (function_method, function_method_void): Add current
5053         instance flags to TYPE_INSTANCE.
5054         * dwarf2read.c (check_modifier): New.
5055         (compute_delayed_physnames): Assert that only C++ adds delayed
5056         physnames.  Mark fn_fields as const/volatile depending on
5057         physname.
5058         * eval.c (make_params): New type_instance_flags parameter.  Use
5059         it as the new type's instance flags.
5060         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
5061         flags element and pass it to make_params.
5062         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
5063         instance flags element.
5064         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
5065         * gdbtypes.h: Include "enum-flags.h".
5066         (type_instance_flags): New enum-flags type.
5067         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
5068         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
5069         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
5070         (follow_type_instance_flags): New function.
5071         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
5072         * parser-defs.h (follow_type_instance_flags): Declare.
5073         * valops.c (value_struct_elt_for_reference): const/volatile must
5074         match too.
5075
5076 2017-09-04  Pedro Alves  <palves@redhat.com>
5077
5078         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
5079         function/method scopes; lookup the nested name as a function local
5080         static variable.
5081
5082 2017-09-04  Pedro Alves  <palves@redhat.com>
5083
5084         (%type <voidval>): Add function_method.
5085         * c-exp.y (exp): New production for calls with no arguments.
5086         (function_method, function_method_void_or_typelist): New
5087         productions.
5088         (exp): New production for "method()::static_var".
5089         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
5090         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5091         Handle OP_FUNC_STATIC_VAR.
5092         * parse.c (operator_length_standard):
5093         Handle OP_FUNC_STATIC_VAR.
5094
5095 2017-09-04  Pedro Alves  <palves@redhat.com>
5096
5097         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
5098         handling.
5099         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5100         Ditto.
5101         * parse.c (operator_length_standard, operator_check_standard):
5102         Ditto.
5103         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
5104
5105 2017-09-04  Pedro Alves  <palves@redhat.com>
5106
5107         * ax-gdb.c: Include "typeprint.h".
5108         (gen_expr_for_cast): New function.
5109         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
5110         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
5111         type is unknown.
5112         * dwarf2read.c (new_symbol_full): Fallback to int instead of
5113         nodebug_data_symbol.
5114         * eval.c: Include "typeprint.h".
5115         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
5116         Error out if symbol has unknown type.
5117         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
5118         evaluate_subexp_for_cast.
5119         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
5120         OP_VAR_MSYM_VALUE.
5121         (evaluate_subexp_for_cast): New function.
5122         * gdbtypes.c (init_nodebug_var_type): New function.
5123         (objfile_type): Use it to initialize types of variables with no
5124         debug info.
5125         * typeprint.c (error_unknown_type): New.
5126         * typeprint.h (error_unknown_type): New declaration.
5127         * compile/compile-c-types.c (convert_type_basic): Handle
5128         TYPE_CODE_ERROR; warn and fallback to int for variables with
5129         unknown type.
5130
5131 2017-09-04  Pedro Alves  <palves@redhat.com>
5132
5133         * eval.c (evaluate_var_value): New function, factored out from ...
5134         (evaluate_subexp_standard): ... here.
5135
5136 2017-09-04  Pedro Alves  <palves@redhat.com>
5137
5138         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
5139         Remove useless assignments to 'op'.
5140
5141 2017-09-04  Pedro Alves  <palves@redhat.com>
5142
5143         * eval.c (eval_skip_value): New function.
5144         (evaluate_subexp_standard): Use it.
5145
5146 2017-09-04  Pedro Alves  <palves@redhat.com>
5147
5148         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
5149         function name from symbol/minsym and pass it to
5150         error_call_unknown_return_type.
5151
5152 2017-09-04  Pedro Alves  <palves@redhat.com>
5153
5154         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
5155         * ax-gdb.c (gen_msym_var_ref): New function.
5156         (gen_expr): Handle OP_VAR_MSYM_VALUE.
5157         * eval.c (evaluate_var_msym_value): New function.
5158         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
5159         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
5160         to call_function_by_hand.
5161         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
5162         Handle OP_VAR_MSYM_VALUE.
5163         (union exp_element) <msymbol>: New field.
5164         * minsyms.h (struct type): Forward declare.
5165         (find_minsym_type_and_address): Declare.
5166         * parse.c (write_exp_elt_msym): New function.
5167         (write_exp_msymbol): Delete, refactored as ...
5168         (find_minsym_type_and_address): ... this new function.
5169         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
5170         (operator_length_standard, operator_check_standard): Handle
5171         OP_VAR_MSYM_VALUE.
5172         * std-operator.def (OP_VAR_MSYM_VALUE): New.
5173
5174 2017-09-04  Pedro Alves  <palves@redhat.com>
5175
5176         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
5177         TYPE_GNU_IFUNC specially here.  Throw error if return type is
5178         unknown.
5179         * ada-typeprint.c (print_func_type): Handle functions with unknown
5180         return type.
5181         * c-typeprint.c (c_type_print_base): Handle functions and methods
5182         with unknown return type.
5183         * compile/compile-c-symbols.c (convert_symbol_bmsym)
5184         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
5185         * compile/compile-c-types.c: Include "objfiles.h".
5186         (convert_func): For functions with unknown return type, warn and
5187         default to int.
5188         * compile/compile-object-run.c (compile_object_run): Adjust call
5189         to call_function_by_hand_dummy.
5190         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
5191         call_function_by_hand.
5192         * eval.c (evaluate_subexp_standard): Adjust calls to
5193         call_function_by_hand.  Handle functions and methods with unknown
5194         return type.  Pass expect_type to call_function_by_hand.
5195         * f-typeprint.c (f_type_print_base): Handle functions with unknown
5196         return type.
5197         * gcore.c (call_target_sbrk): Adjust call to
5198         call_function_by_hand.
5199         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5200         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
5201         an integer address type instead of nodebug.
5202         * guile/scm-value.c (gdbscm_value_call): Adjust call to
5203         call_function_by_hand.
5204         * infcall.c (error_call_unknown_return_type): New function.
5205         (call_function_by_hand): New "default_return_type" parameter.
5206         Pass it down.
5207         (call_function_by_hand_dummy): New "default_return_type"
5208         parameter.  Use it instead of defaulting to int.  If there's no
5209         default and the return type is unknown, throw an error.  If
5210         there's a default return type, and the called function has no
5211         debug info, then assume the function is prototyped.
5212         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5213         New "default_return_type" parameter.
5214         (error_call_unknown_return_type): New declaration.
5215         * linux-fork.c (call_lseek): Cast return type of lseek.
5216         (inferior_call_waitpid, checkpoint_command): Adjust calls to
5217         call_function_by_hand.
5218         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5219         calls to call_function_by_hand.
5220         * m2-typeprint.c (m2_procedure): Handle functions with unknown
5221         return type.
5222         * objc-lang.c (lookup_objc_class, lookup_child_selector)
5223         (value_nsstring, print_object_command): Adjust calls to
5224         call_function_by_hand.
5225         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5226         functions with unknown return type.
5227         (pascal_type_print_func_varspec_suffix): New function.
5228         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5229         TYPE_CODE_METHOD>: Use it.
5230         * python/py-value.c (valpy_call): Adjust call to
5231         call_function_by_hand.
5232         * rust-lang.c (rust_evaluate_funcall): Adjust call to
5233         call_function_by_hand.
5234         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5235         call_function_by_hand.
5236         * valops.c (value_allocate_space_in_inferior): Adjust call to
5237         call_function_by_hand.
5238         * typeprint.c (type_print_unknown_return_type): New function.
5239         * typeprint.h (type_print_unknown_return_type): New declaration.
5240
5241 2017-09-04  Pedro Alves  <palves@redhat.com>
5242
5243         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5244         types with more than one parameter as prototyped.
5245
5246 2017-09-04  Pedro Alves  <palves@redhat.com>
5247
5248         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5249         (disassemble_command): Use gdb_disassembly_flags instead of bare
5250         int.
5251         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5252         (dump_insns, do_mixed_source_and_assembly_deprecated)
5253         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5254         Use gdb_disassembly_flags instead of bare int.
5255         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5256         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5257         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5258         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
5259         (enum gdb_disassembly_flag): ... values of this new enumeration.
5260         (gdb_disassembly_flags): Define.
5261         (gdb_disassembly)
5262         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5263         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5264         gdb_disassembly_flags instead of bare int.
5265         * record-btrace.c (btrace_insn_history)
5266         (record_btrace_insn_history, record_btrace_insn_history_range)
5267         (record_btrace_insn_history_from): Use gdb_disassembly_flags
5268         instead of bare int.
5269         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5270         Use gdb_disassembly_flags instead of bare int.
5271         * target-debug.h (target_debug_print_gdb_disassembly_flags):
5272         Define.
5273         * target-delegates.c: Regenerate.
5274         * target.c (target_insn_history, target_insn_history_from)
5275         (target_insn_history_range): Use gdb_disassembly_flags instead of
5276         bare int.
5277         * target.h: Include "disasm.h".
5278         (struct target_ops) <to_insn_history, to_insn_history_from,
5279         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5280         int.
5281         (target_insn_history, target_insn_history_from)
5282         (target_insn_history_range): Use gdb_disassembly_flags instead of
5283         bare int.
5284
5285 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5286
5287         * cli/cli-script.c (build_command_line): For if/while commands,
5288         check whether args is empty.
5289
5290 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5291
5292         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5293         (enum command_control_type): Likewise.
5294         (struct command_line): Likewise.
5295         (free_command_lines): Likewise.
5296         (struct command_lines_deleter): Likewise.
5297         (command_line_up): Likewise.
5298         (read_command_lines): Likewise.
5299         (read_command_lines_1): Likewise.
5300         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5301         (enum command_control_type): Likewise.
5302         (struct command_line): Likewise.
5303         (free_command_lines): Likewise.
5304         (struct command_lines_deleter): Likewise.
5305         (command_line_up): Likewise.
5306         (read_command_lines): Likewise.
5307         (read_command_lines_1): Likewise.
5308         * breakpoint.h: Include cli/cli-script.h.
5309         * extension-priv.h: Likewise.
5310         * gdbcmd.h: Likewise.
5311
5312 2017-09-04  Pedro Alves  <palves@redhat.com>
5313
5314         * ada-lang.c (is_known_support_routine): Move sal declaration to
5315         where it is initialized.
5316         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5317         (parse_breakpoint_sals, decode_static_tracepoint_spec)
5318         (clear_command, update_static_tracepoint): Remove init_sal
5319         references.  Move declarations closer to initializations.
5320         * cli/cli-cmds.c (list_command): Move sal declarations closer to
5321         initializations.
5322         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5323         references.  Move sal declarations closer to initializations.
5324         * frame.c (find_frame_sal): Return a symtab_and_line via function
5325         return instead of output parameter.  Remove init_sal references.
5326         * frame.h (find_frame_sal): Return a symtab_and_line via function
5327         return instead of output parameter.
5328         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5329         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5330         instead of memset.
5331         (gdbscm_find_pc_line): Remove init_sal reference.
5332         * infcall.c (call_function_by_hand_dummy): Remove init_sal
5333         references.  Move declarations closer to initializations.
5334         * infcmd.c (set_step_frame): Update.  Move declarations closer to
5335         initializations.
5336         (finish_backward): Remove init_sal references.  Move declarations
5337         closer to initializations.
5338         * infrun.c (process_event_stop_test, handle_step_into_function)
5339         (insert_hp_step_resume_breakpoint_at_frame)
5340         (insert_step_resume_breakpoint_at_caller): Likewise.
5341         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5342         (symbol_to_sal): Likewise.
5343         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5344         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5345         to its initialization.
5346         * reverse.c (save_bookmark_command): Use new/delete.  Remove
5347         init_sal references.  Move declarations closer to initializations.
5348         * source.c (get_current_source_symtab_and_line): Remove brace
5349         initialization.
5350         (set_current_source_symtab_and_line): Now takes the sal by const
5351         reference.  Remove brace initialization.
5352         (line_info): Remove init_sal reference.
5353         * source.h (set_current_source_symtab_and_line): Now takes a
5354         symtab_and_line via const reference.
5355         * stack.c (set_current_sal_from_frame): Adjust.
5356         (print_frame_info): Adjust.
5357         (get_last_displayed_sal): Return the sal via function return
5358         instead of via output parameter.  Simplify.
5359         (frame_info): Adjust.
5360         * stack.h (get_last_displayed_sal): Return the sal via function
5361         return instead of via output parameter.
5362         * symtab.c (init_sal): Delete.
5363         (find_pc_sect_line): Remove init_sal references.  Move
5364         declarations closer to initializations.
5365         (find_function_start_sal): Remove init_sal references.  Move
5366         declarations closer to initializations.
5367         * symtab.h (struct symtab_and_line): In-class initialize all
5368         fields.
5369         * tracepoint.c (set_traceframe_context)
5370         (print_one_static_tracepoint_marker): Remove init_sal references.
5371         Move declarations closer to initializations.
5372         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5373         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
5374         declarations closer to initializations.
5375         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5376         init_sal references.  Adjust.
5377
5378 2017-09-04  Pedro Alves  <palves@redhat.com>
5379
5380         * ax-gdb.c (agent_command_1): Use range-for.
5381         * break-catch-throw.c (re_set_exception_catchpoint): Update.
5382         * breakpoint.c: Include "common/array-view.h".
5383         (init_breakpoint_sal, create_breakpoint_sal): Change sals
5384         parameter from struct symtabs_and_lines to
5385         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
5386         (breakpoint_sals_to_pc): Change sals parameter from struct
5387         symtabs_and_lines to std::vector reference.
5388         (check_fast_tracepoint_sals): Change sals parameter from struct
5389         symtabs_and_lines to std::array_view.  Use range-for.
5390         (decode_static_tracepoint_spec): Return a std::vector instead of
5391         symtabs_and_lines.  Update.
5392         (create_breakpoint): Update.
5393         (break_range_command, until_break_command, clear_command): Update.
5394         (base_breakpoint_decode_location, bkpt_decode_location)
5395         (bkpt_probe_create_sals_from_location)
5396         (bkpt_probe_decode_location, tracepoint_decode_location)
5397         (tracepoint_probe_decode_location)
5398         (strace_marker_create_sals_from_location): Return a std::vector
5399         instead of symtabs_and_lines.
5400         (strace_marker_create_breakpoints_sal): Update.
5401         (strace_marker_decode_location): Return a std::vector instead of
5402         symtabs_and_lines.  Update.
5403         (update_breakpoint_locations): Change struct symtabs_and_lines
5404         parameters to gdb::array_view.  Adjust.
5405         (location_to_sals): Return a std::vector instead of
5406         symtabs_and_lines.  Update.
5407         (breakpoint_re_set_default): Use std::vector instead of struct
5408         symtabs_and_lines.
5409         (decode_location_default): Return a std::vector instead of
5410         symtabs_and_lines.  Update.
5411         * breakpoint.h: Include "common/array-view.h".
5412         (struct breakpoint_ops) <decode_location>: Now returns a
5413         std::vector instead of returning a symtabs_and_lines via output
5414         parameter.
5415         (update_breakpoint_locations): Change sals parameters to use
5416         gdb::array_view.
5417         * cli/cli-cmds.c (edit_command, list_command): Update to use
5418         std::vector and gdb::array_view.
5419         (ambiguous_line_spec): Adjust to use gdb::array_view and
5420         range-for.
5421         (compare_symtabs): Rename to ...
5422         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
5423         const reference and adjust.
5424         (filter_sals): Rewrite using std::vector and standard algorithms.
5425         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5426         (jump_command): Update to use std::vector.
5427         * linespec.c (struct linespec_state) <canonical_names>: Update
5428         comment.
5429         (add_sal_to_sals_basic): Delete.
5430         (add_sal_to_sals, filter_results, convert_results_to_lsals)
5431         (decode_line_2, create_sals_line_offset)
5432         (convert_address_location_to_sals, convert_linespec_to_sals)
5433         (convert_explicit_location_to_sals, parse_linespec)
5434         (event_location_to_sals, decode_line_full, decode_line_1)
5435         (decode_line_with_current_source)
5436         (decode_line_with_last_displayed, decode_objc)
5437         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5438         (linespec_result::~linespec_result): Adjust to use std::vector
5439         instead of symtabs_and_lines.
5440         * linespec.h (linespec_sals::sals): Now a std::vector.
5441         (struct linespec_result): Use std::vector, bool, and in-class
5442         initialization.
5443         (decode_line_1, decode_line_with_current_source)
5444         (decode_line_with_last_displayed): Return std::vector.
5445         * macrocmd.c (info_macros_command): Use std::vector.
5446         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5447         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5448         std::vector.
5449         * probe.h (parse_probes): Return a std::vector.
5450         * python/python.c (gdbpy_decode_line): Use std::vector and
5451         gdb::array_view.
5452         * source.c (select_source_symtab, line_info): Use std::vector.
5453         * stack.c (func_command): Use std::vector.
5454         * symtab.h (struct symtabs_and_lines): Delete.
5455         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5456
5457 2017-09-04  Pedro Alves  <palves@redhat.com>
5458
5459         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5460         unittests/array-view-selftests.c.
5461         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5462         * common/array-view.h: New file.
5463         * unittests/array-view-selftests.c: New file.
5464
5465 2017-09-04  Pedro Alves  <palves@redhat.com>
5466
5467         * cli/cli-cmds.c (edit_command): Pass message to
5468         ambiguous_line_spec.
5469         (list_command): Pass message to ambiguous_line_spec.  Say
5470         "first"/"last" instead of "start" and "end" to be consistent with
5471         the manual.
5472         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
5473         them to print formatted message.
5474
5475 2017-09-04  Pedro Alves  <palves@redhat.com>
5476
5477         * btrace.c (ftrace_add_pt): Pass btrace_insn to
5478         ftrace_update_insns by reference instead of pointer.
5479
5480 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5481
5482         * i386-go32-tdep.c: Include x86-xstate.h.
5483         (i386_go32_init_abi): Call i386_target_description.
5484         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5485         if xcr0 is X86_XSTATE_X87_MASK.
5486         * i386-tdep.h (tdesc_i386): Remove the declaration.
5487         (tdesc_i386_mmx): Likewise.
5488
5489 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5490
5491         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5492         X86_XSTATE_SSE_MASK instead of 0.
5493
5494 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5495
5496         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5497         i386_target_description.
5498         * i386-fbsd-nat.c (i386fbsd_read_description): Call
5499         i386_target_description.
5500         * i386-tdep.c (i386_gdbarch_init): Likewise.
5501
5502 2017-09-04  Yao Qi  <yao.qi@linaro.org>
5503
5504         * amd64-darwin-tdep.c: Include "x86-xstate.h".
5505         (x86_darwin_init_abi_64): Call amd64_target_description.
5506         * amd64-dicos-tdep.c: Likewise.
5507         * amd64-fbsd-nat.c: Likewise.
5508         * amd64-fbsd-tdep.c: Likewise.
5509         * amd64-nbsd-tdep.c: Likewise.
5510         * amd64-obsd-tdep.c: Likewise.
5511         * amd64-sol2-tdep.c: Likewise.
5512         * amd64-windows-tdep.c: Likewise.
5513         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5514
5515 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
5516
5517         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5518         (btrace_function) <insn>: Change type to use std::vector.
5519         * btrace.c (ftrace_debug, ftrace_call_num_insn,
5520         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5521         ftrace_update_insns, ftrace_compute_global_level_offset,
5522         btrace_stitch_bts, btrace_clear, btrace_insn_get,
5523         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5524         change to std::vector.
5525         (ftrace_update_insns): Adjust to change to std::vector, change
5526         type of INSN parameter.
5527         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5528         * record-btrace.c (btrace_call_history_insn_range,
5529         btrace_compute_src_line_range,
5530         record_btrace_frame_prev_register): Adjust to change to
5531         std::vector.
5532         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5533         to change to std::vector.
5534
5535 2017-09-03  Tom Tromey  <tom@tromey.com>
5536
5537         * corefile.c (reopen_exec_file): Use std::string.
5538
5539 2017-09-03  Tom Tromey  <tom@tromey.com>
5540
5541         * compile/compile.c (compile_register_name_mangled): Return
5542         std::string.
5543         * compile/compile-loc2c.c (pushf_register_address): Update.
5544         (pushf_register): Update.
5545         * compile/compile-c-types.c (convert_array): Update.
5546         * compile/compile-c-symbols.c (generate_vla_size): Update.
5547         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5548         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5549         (convert_one_symbol): Update.
5550         (generate_c_for_for_one_variable): Update.
5551         * compile/compile-c-support.c (c_get_range_decl_name): Return a
5552         std::string.
5553         (generate_register_struct): Update.
5554         * compile/compile-internal.h (c_get_range_decl_name): Return a
5555         std::string.
5556         (compile_register_name_mangled): Return std::string.
5557
5558 2017-09-03  Tom Tromey  <tom@tromey.com>
5559
5560         * utils.c (perror_string): Return a std::string.
5561         (throw_perror_with_name, perror_warning_with_name): Update.
5562
5563 2017-09-03  Tom Tromey  <tom@tromey.com>
5564
5565         * demangle.c (demangle_command): Use std::string,
5566         unique_xmalloc_ptr.
5567
5568 2017-09-03  Tom Tromey  <tom@tromey.com>
5569
5570         * cli/cli-setshow.c (do_set_command): Use std::string.
5571
5572 2017-09-03  Tom Tromey  <tom@tromey.com>
5573
5574         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5575
5576 2017-09-03  Tom Tromey  <tom@tromey.com>
5577
5578         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5579
5580 2017-09-03  Tom Tromey  <tom@tromey.com>
5581
5582         * mi/mi-cmd-env.c (env_execute_cli_command): Use
5583         gdb::unique_xmalloc_ptr.
5584
5585 2017-09-03  Tom Tromey  <tom@tromey.com>
5586
5587         * thread.c (print_thread_info_1): Use string_printf.
5588         (thread_apply_command, thread_apply_all_command): Use
5589         std::string.
5590
5591 2017-09-03  Tom Tromey  <tom@tromey.com>
5592
5593         * valprint.c (val_print_string): Update.
5594         * gdbcore.h (memory_error_message): Return std::string.
5595         * corefile.c (memory_error_message): Return std::string.
5596         (memory_error): Update.
5597         * breakpoint.c (insert_bp_location): Update.
5598
5599 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
5600
5601         * target/waitstatus.h (target_waitstatus_to_string): Change
5602         return type to std::string.
5603         * target/waitstatus.c (target_waitstatus_to_string): Return
5604         std::string.
5605         * target.h (target_waitstatus_to_string): Remove declaration.
5606         * infrun.c (resume, clear_proceed_status_thread,
5607         print_target_wait_results, do_target_wait, save_waitstatus,
5608         stop_all_threads): Adjust.
5609         * record-btrace.c (record_btrace_wait): Adjust.
5610         * target-debug.h
5611         (target_debug_print_struct_target_waitstatus_p): Adjust.
5612
5613 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5614
5615         PR gdb/22046
5616         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5617         detection.
5618
5619 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
5620
5621         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5622         for setting/unsetting environment variables on the remote target.
5623         (New remote packets): Add entries for QEnvironmentHexEncoded,
5624         QEnvironmentUnset and QEnvironmentReset.
5625         * common/environ.c (gdb_environ::operator=): Extend method to
5626         handle m_user_set_env_list and m_user_unset_env_list.
5627         (gdb_environ::clear): Likewise.
5628         (match_var_in_string): Change type of first parameter from 'char
5629         *' to 'const char *'.
5630         (gdb_environ::set): Extend method to handle
5631         m_user_set_env_list and m_user_unset_env_list.
5632         (gdb_environ::unset): Likewise.
5633         (gdb_environ::clear_user_set_env): New method.
5634         (gdb_environ::user_set_envp): Likewise.
5635         (gdb_environ::user_unset_envp): Likewise.
5636         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5637         m_user_unset_env_list on move constructor/assignment.
5638         (unset): Add new default parameter 'update_unset_list = true'.
5639         (clear_user_set_env): New method.
5640         (user_set_envp): Likewise.
5641         (user_unset_envp): Likewise.
5642         (m_user_set_env_list): New std::set.
5643         (m_user_unset_env_list): Likewise.
5644         * common/rsp-low.c (hex2str): New function.
5645         (bin2hex): New overload for bin2hex function.
5646         * common/rsp-low.c (hex2str): New prototype.
5647         (str2hex): New overload prototype.
5648         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5649         QEnvironmentUnset and QEnvironmentReset.
5650         (remote_protocol_features): Add QEnvironmentHexEncoded,
5651         QEnvironmentUnset and QEnvironmentReset packets.
5652         (send_environment_packet): New function.
5653         (extended_remote_environment_support): Likewise.
5654         (extended_remote_create_inferior): Call
5655         extended_remote_environment_support.
5656         (_initialize_remote): Add QEnvironmentHexEncoded,
5657         QEnvironmentUnset and QEnvironmentReset packet configs.
5658         * unittests/environ-selftests.c (gdb_selftest_env_var):
5659         New variable.
5660         (test_vector_initialization): New function.
5661         (test_init_from_host_environ): Likewise.
5662         (test_reinit_from_host_environ): Likewise.
5663         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5664         Likewise.
5665         (test_unset_set_empty_vector): Likewise.
5666         (test_vector_clear): Likewise.
5667         (test_std_move): Likewise.
5668         (test_move_constructor):
5669         (test_self_move): Likewise.
5670         (test_set_unset_reset): Likewise.
5671         (run_tests): Rewrite in terms of the functions above.
5672
5673 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
5674
5675         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5676         (adi_available): Use a temp variable of type CORE_ADDR as argument
5677         3 when calling target_auxv_search.
5678         (adi_normalize_address): Use masks and xor operators to calculate
5679         normalized address.
5680         (adi_read_versions, adi_write_versions, adi_print_versions)
5681         (do_examine, do_assign): Use paddress.
5682
5683 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
5684
5685         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5686         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5687         out of loop and add supply of FIR.
5688         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5689         add collect of FIR.
5690
5691 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
5692
5693         PR gdb/21827
5694         * cli/cli-script.c (define_command): Don't convert command name
5695         to lower case.
5696
5697 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
5698
5699         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5700         Update all callers accordingly. Remove all code blocks handling
5701         the case where DISPP is not NULL.
5702
5703 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5704
5705         PR symtab/22003
5706         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5707         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5708         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5709
5710 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
5711
5712         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5713         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5714         (read_comp_units_from_section): New parameter abbrev_section, use
5715         read_and_check_comp_unit_head, allocate signatured_type if needed.
5716         (create_all_comp_units): Update read_comp_units_from_section caller.
5717
5718 2017-08-23  Pedro Alves  <palves@redhat.com>
5719
5720         PR remote/21852
5721         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5722         to null_ptid and switch to thread without reading the registers
5723         after adding the inferior.
5724
5725 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5726
5727         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5728         compile-gcc.
5729         * compile/compile.c (compile_gcc, show_compile_gcc): New.
5730         (compile_to_object): Implement compile_gcc.
5731         (_initialize_compile): Install "set compile-gcc".  Initialize
5732         compile_gcc.
5733
5734 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
5735
5736         * compile/compile.c (compile_to_object): Conditionally call
5737         set_verbose.  Conditionally call compile or compile_v0.
5738
5739 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
5740
5741         * sparc64-tdep.h: (adi_normalize_address): New export.
5742         * sparc-nat.h: (open_adi_tag_fd): New export.
5743         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5744         * sparc64-linux-tdep.c:
5745         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5746         (sparc64_linux_handle_segmentation_fault): New function.
5747         (sparc64_linux_init_abi): Register
5748         sparc64_linux_handle_segmentation_fault
5749         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5750         (sparc64_addr_bits_remove): New function.
5751         (sparc64_init_abi): Register sparc64_addr_bits_remove.
5752         (MAX_PROC_NAME_SIZE): New macro.
5753         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5754         (sparc64adilist): New variable.
5755         (adi_proc_list): New variable.
5756         (find_adi_info): New function.
5757         (add_adi_info): New function.
5758         (get_adi_info_proc): New function.
5759         (get_adi_info): New function.
5760         (info_adi_command): New function.
5761         (read_maps_entry): New function.
5762         (adi_available): New function.
5763         (adi_normalize_address): New function.
5764         (adi_align_address): New function.
5765         (adi_convert_byte_count): New function.
5766         (adi_tag_fd): New function.
5767         (adi_is_addr_mapped): New function.
5768         (adi_read_versions): New function.
5769         (adi_write_versions): New function.
5770         (adi_print_versions): New function.
5771         (do_examine): New function.
5772         (do_assign): New function.
5773         (adi_examine_command): New function.
5774         (adi_assign_command): New function.
5775         (_initialize_sparc64_adi_tdep): New function.
5776
5777 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
5778
5779         * breakpoint.c (breakpoints_info): Rename to ...
5780         (info_breakpoints_command): ... this.
5781         (watchpoints_info): Rename to ...
5782         (info_watchpoints_command): ... this.
5783         (tracepoints_info): Rename to ...
5784         (info_tracepoints_command): ... this.
5785         (_initialize_breakpoint): Adjust.
5786         * dcache.c (dcache_info): Rename to ...
5787         (info_display_command): ... this.
5788         (_initialize_dcache): Adjust.
5789         * frame.h (args_info): Rename to ...
5790         (info_args_command): ... this.
5791         (locals_info): Rename to ...
5792         (info_locals_command): ... this.
5793         * infcmd.c (nofp_registers_info): Rename to ...
5794         (info_registers_command): ... this.
5795         (float_info): Rename to ...
5796         (info_float_command): ... this.
5797         (program_info): Rename to ...
5798         (info_program_command): ... this.
5799         (all_registers_info): Rename to ...
5800         (info_all_registers_command): ... this.
5801         (vector_info): Rename to ...
5802         (info_vector_command): ... this.
5803         (float_info): Rename to ...
5804         (info_float_command): ... this.
5805         (_initialize_infcmd): Adjust.
5806         * inferior.h (term_info): Rename to ...
5807         (info_terminal_command): ... this.
5808         * inflow.c (term_info): Rename to ...
5809         (info_terminal_command): ... this.
5810         (_initialize_inflow): Adjust.
5811         * infrun.c (signals_info): Rename to ...
5812         (info_signals_command): ... this.
5813         (_initialize_infrun): Adjust.
5814         * objc-lang.c (classes_info): Rename to ...
5815         (info_classes_command): ... this.
5816         (selectors_info): Rename to ...
5817         (info_selectors_command): ... this.
5818         (_initialize_objc_language): Adjust.
5819         * printcmd.c (sym_info): Rename to ...
5820         (info_symbol_command): ... this.
5821         (address_info): Rename to ...
5822         (info_address_command): ... this.
5823         (display_info): Rename to ...
5824         (info_display_command): ... this.
5825         (_initialize_printcmd): Adjust.
5826         * reverse.c (bookmarks_info): Rename to ...
5827         (info_breakpoints_command): ... this.
5828         (_initialize_reverse): Adjust.
5829         * ser-go32.c (dos_info): Rename to ...
5830         (info_serial_command): ... this.
5831         (_initialize_ser_dos): Adjust.
5832         * skip.c (skip_info): Rename to ...
5833         (info_skip_command): ... this.
5834         (_initialize_step_skip): Adjust.
5835         * source.c (line_info): Rename to ...
5836         (info_line_command): ... this.
5837         (source_info): Rename to ...
5838         (info_source_command)
5839         * stack.c (frame_info): Rename to ...
5840         (info_frame_command): ... this.
5841         (locals_info): Rename to ...
5842         (info_locals_command): ... this.
5843         (args_info): Rename to ...
5844         (info_args_command): ... this.
5845         (_initialize_stack): Adjust.
5846         * symtab.c (sources_info): Rename to ...
5847         (info_sources_command): ... this.
5848         (variables_info): Rename to ...
5849         (info_variables_command): ... this.
5850         (functions_info): Rename to ...
5851         (info_functions_command): ... this.
5852         (types_info): Rename to ...
5853         (info_types_command): ... this.
5854         (_initialize_symtab): Adjust.
5855         * target.c (target_info): Rename to ...
5856         (info_target_command): ... this.
5857         (initialize_targets): Adjust.
5858         * tracepoint.c (tvariables_info): Rename to ...
5859         (info_tvariables_command): ... this.
5860         (scope_info): Rename to ...
5861         (info_scope_command): ... this.
5862         (trace_dump_actions): Adjust.
5863         (_initialize_tracepoint): Adjust.
5864
5865 2017-08-22  Tom Tromey  <tom@tromey.com>
5866
5867         * breakpoint.h (install_breakpoint): Update.
5868         * breakpoint.c (add_solib_catchpoint): Update.
5869         (install_breakpoint): Change argument to a std::unique_ptr.
5870         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5871         (create_breakpoint_sal, create_breakpoint): Update.
5872         (watch_command_1, catch_exec_command_1)
5873         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5874         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5875         Return the breakpoint.
5876         (set_raw_breakpoint_without_location, set_raw_breakpoint)
5877         (new_single_step_breakpoint): Update.
5878         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5879         std::unique_ptr.
5880         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5881         std::unique_ptr.
5882         * break-catch-sig.c (create_signal_catchpoint): Use
5883         std::unique_ptr.
5884         * ada-lang.c (create_ada_exception_catchpoint): Use
5885         std::unique_ptr.
5886
5887 2017-08-22  Tom Tromey  <tom@tromey.com>
5888
5889         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5890
5891 2017-08-22  Tom Tromey  <tom@tromey.com>
5892
5893         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5894         (lookup_partial_symbol): Update.
5895
5896 2017-08-22  Tom Tromey  <tom@tromey.com>
5897
5898         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5899         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5900         (find_and_open_source, symtab_to_fullname): Update.
5901         * psymtab.c (psymtab_to_fullname): Update.
5902
5903 2017-08-22  Tom Tromey  <tom@tromey.com>
5904
5905         * exec.c (exec_file_attach): Update.
5906         * linux-thread-db.c (try_thread_db_load): Update.
5907         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5908         * utils.c (gdb_realpath): Change return type.
5909         (gdb_realpath_keepfile): Update.
5910         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5911         (_initialize_utils): Register the new self test.
5912         * source.c (openp): Update.
5913         (find_and_open_source): Update.
5914         * nto-tdep.c (nto_find_and_open_solib): Update.
5915         * main.c (set_gdb_data_directory): Update.
5916         (captured_main_1): Update.
5917         * dwarf2read.c (dwarf2_get_dwz_file): Update
5918         (dw2_map_symbol_filenames): Update.
5919         * auto-load.c (auto_load_safe_path_vec_update): Update.
5920         (filename_is_in_auto_load_safe_path_vec): Change type of
5921         "filename_realp".
5922         (auto_load_objfile_script): Update.
5923         (file_is_auto_load_safe): Update.  Use std::string.
5924         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5925
5926 2017-08-22  Tom Tromey  <tom@tromey.com>
5927
5928         * utils.c (gdb_realpath_keepfile): Return a
5929         gdb::unique_xmalloc_ptr.
5930         * exec.c (exec_file_attach): Update.
5931         * utils.h (gdb_realpath_keepfile): Return a
5932         gdb::unique_xmalloc_ptr.
5933
5934 2017-08-22  Tom Tromey  <tom@tromey.com>
5935
5936         * compile/compile.c (compile_file_command): Use
5937         gdb::unique_xmalloc_ptr, std::string.
5938         * utils.c (gdb_abspath): Change return type.
5939         * source.c (openp): Update.
5940         * objfiles.c (allocate_objfile): Update.
5941         * main.c (set_gdb_data_directory): Update.
5942         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5943
5944 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
5945
5946         * cli-cmds.c (list_commands): List actual code around more than
5947         one location.
5948
5949 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
5950
5951         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5952
5953 2017-08-21  Pedro Alves  <palves@redhat.com>
5954
5955         PR gdb/19487
5956         * c-exp.y (variable production): Handle function aliases.
5957         * minsyms.c (msymbol_is_text): New function.
5958         * minsyms.h (msymbol_is_text): Declare.
5959         * symtab.c (find_function_alias_target): New function.
5960         * symtab.h (find_function_alias_target): Declare.
5961
5962 2017-08-21  Pedro Alves  <palves@redhat.com>
5963
5964         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5965         typedefs.
5966         * typeprint.c (whatis_exp): If handling "whatis", and expression
5967         is OP_TYPE, strip one typedef level.  Otherwise don't strip
5968         typedefs here.
5969         * valops.c (value_cast): Save "to" type before resolving
5970         stubs/typedefs.  Use that type as resulting value's type.
5971
5972 2017-08-18  Tom Tromey  <tom@tromey.com>
5973             Pedro Alves  <palves@redhat.com>
5974
5975         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5976         * sol-thread.c (sol_thread_resume, sol_thread_wait)
5977         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5978         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5979         * proc-service.c (ps_xfer_memory): Use scoped_restore.
5980         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5981         (linux_get_siginfo_data): Add "thread" argument.  Use
5982         scoped_restore.
5983         * linux-nat.c (linux_child_follow_fork)
5984         (check_stopped_by_watchpoint): Use scoped_restore.
5985         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5986         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5987         (restore_inferior_ptid, save_inferior_ptid): Remove.
5988         * btrace.c (btrace_fetch): Use scoped_restore.
5989         * bsd-uthread.c (bsd_uthread_fetch_registers)
5990         (bsd_uthread_store_registers): Use scoped_restore.
5991         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5992         scoped_restore.
5993         * aix-thread.c (aix_thread_resume, aix_thread_wait)
5994         (aix_thread_xfer_partial): Use scoped_restore.
5995         * inferior.h (save_inferior_ptid): Remove.
5996
5997 2017-08-18  Yao Qi  <yao.qi@linaro.org>
5998
5999         PR tdep/21818
6000         * arm-tdep.c (gdb_print_insn_arm): Mark
6001         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
6002
6003 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6004
6005         * NEWS: Mention GDBserver's new option "--selftest".
6006         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
6007         * selftest.c: Move it to common/selftest.c.
6008         * selftest.h: Move it to common/selftest.h.
6009         * selftest-arch.c (reset): New function.
6010         (tests_with_arch): Call reset.
6011
6012 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6013
6014         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
6015         instead of exception_fprintf and printf_filtered.
6016
6017 2017-08-18  Yao Qi  <yao.qi@linaro.org>
6018
6019         * selftest.c (register_self_test): Rename it to
6020         selftests::register_test.
6021         (run_self_tests): selftest::run_tests.
6022         * selftest.h: Update declarations.
6023         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
6024         selftests::register_test_foreach_arch.
6025         * selftest-arch.h: Update declaration.
6026         * aarch64-tdep.c: Update.
6027         * arm-tdep.c: Likewise.
6028         * disasm-selftests.c: Likewise.
6029         * dwarf2loc.c: Likewise.
6030         * dwarf2-frame.c: Likewise.
6031         * findvar.c: Likewise.
6032         * gdbarch-selftests.c: Likewise.
6033         * maint.c (maintenance_selftest): Likewise.
6034         * regcache.c: Likewise.
6035         * rust-exp.y: Likewise.
6036         * selftest-arch.c: Likewise.
6037         * unittests/environ-selftests.c: Likewise.
6038         * unittests/function-view-selftests.c: Likewise.
6039         * unittests/offset-type-selftests.c: Likewise.
6040         * unittests/optional-selftests.c: Likewise.
6041         * unittests/scoped_restore-selftests.c: Likewise.
6042         * utils-selftests.c: Likewise.
6043
6044 2017-08-17  Pedro Alves  <palves@redhat.com>
6045
6046         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
6047         local.
6048
6049 2017-08-17  Pedro Alves  <palves@redhat.com>
6050
6051         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
6052         field.
6053         (reset_die_in_process): Delete, replaced by ...
6054         (process_die_scope): ... this new class.  Make it responsible for
6055         freeing cu->line_header too.
6056         (process_die): Use process_die_scope.
6057         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
6058         cu->line_header_die_owner.  Don't release the line header if it's
6059         owned by the CU.
6060         (setup_type_unit_groups): Make the CU/DIE own the line header.
6061         Don't release the line header here.
6062
6063 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
6064
6065         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
6066
6067 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6068
6069         * NEWS: Mention new shortcuts for nexti and stepi in TUI
6070         Single-Key mode
6071
6072 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6073
6074         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
6075         mode command list.
6076
6077 2017-08-15  Stafford Horne  <shorne@gmail.com>
6078
6079         * MAINTAINERS (Write After Approval): Add Stafford Horne.
6080
6081 2017-08-15  Stafford Horne  <shorne@gmail.com>
6082
6083         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
6084
6085 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6086
6087         PR gdb/21954
6088         * infcmd.c (unset_environment_command): Use the 'clear' method on
6089         the environment instead of resetting it.
6090
6091 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
6092
6093         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
6094         platforms.
6095
6096 2017-08-14  Tom Tromey  <tom@tromey.com>
6097
6098         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
6099         (print_binary_chars): Likewise.
6100         (BITS_IN_BYTES): Remove.
6101
6102 2017-08-14  Tom Tromey  <tom@tromey.com>
6103
6104         PR gdb/21675
6105         * valprint.c (LOW_ZERO): Change value to 034.
6106         (print_octal_chars): Add static_asserts for octal constants.
6107         * printcmd.c (print_scalar_formatted): Add 'd' case.
6108
6109 2017-08-11  Tom Tromey  <tom@tromey.com>
6110
6111         * symfile.c (add_symbol_file_command): Use std::vector.
6112
6113 2017-08-14  Tom Tromey  <tom@tromey.com>
6114
6115         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
6116         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
6117         std::move.
6118         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
6119
6120 2017-08-11  Pedro Alves  <palves@redhat.com>
6121
6122         * infrun.c (process_event_stop_test): Adjust
6123         function_name_is_marked_for_skip call.
6124         * skip.c: Include <list>.
6125         (skiplist_entry): Make it a class with private fields, and
6126         getters/setters.
6127         (skiplist_entry_chain): Delete.
6128         (skiplist_entries): New.
6129         (skiplist_entry_count): Delete.
6130         (highest_skiplist_entry_num): New.
6131         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
6132         (add_skiplist_entry): Delete.
6133         (skiplist_entry::skiplist_entry): New.
6134         (skiplist_entry::add_entry): New.
6135         (skip_file_command, skip_function): Adjust.
6136         (compile_skip_regexp): Delete.
6137         (skip_command): Don't compile regexp here.  Adjust to use
6138         skiplist_entry::add_entry.
6139         (skip_info): Adjust to use range-for and getters.
6140         (skip_enable_command, skip_disable_command): Adjust to use
6141         range-for and setters.
6142         (skip_delete_command): Adjust to use std::list.
6143         (add_skiplist_entry): Delete.
6144         (skip_file_p): Delete, refactored as ...
6145         (skiplist_entry::do_skip_file_p): ... this new method.
6146         (skip_gfile_p): Delete, refactored as ...
6147         (skiplist_entry::do_gskip_file_p): ... this new method.
6148         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
6149         (skiplist_entry::skip_function_p): ... this new method.
6150         (function_name_is_marked_for_skip): Now returns bool, and takes
6151         the function sal by const reference.  Adjust to use range-for and
6152         skiplist_entry methods.
6153         (_initialize_step_skip): Remove references to
6154         skiplist_entry_chain, skiplist_entry_count.
6155         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
6156         takes the function sal by const reference.
6157
6158 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6159
6160         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
6161         (dwarf2_frame_cache): Remove reset_cache_cleanup.
6162         (dwarf2_frame_cache):
6163         * frame-unwind.c (frame_unwind_try_unwinder): Catch
6164         RETURN_MASK_ALL and set *this_case to NULL.
6165         * frame-unwind.h: Update comments.
6166
6167 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6168
6169         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
6170         (dwarf2_frame_state_copy_regs): Remove.
6171         (dwarf2_frame_state_free_regs): Remove.
6172         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
6173         (dwarf2_restore_rule): Call method .alloc_regs instead of
6174         dwarf2_frame_state_alloc_regs.
6175         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
6176         constructor.  Call std::move.
6177         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
6178         (dwarf2_frame_cache): Likewise.
6179
6180         [GDB_SELF_TEST]: Include selftest.h and
6181         selftest-arch.h.
6182         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
6183         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
6184         execute_cfa_program_test.
6185
6186         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
6187         copy ctor, assignment operator, move assignment.
6188         <alloc_regs>: New method.
6189         <swap>: New method.
6190         (struct dwarf2_frame_state): Delete dtor.
6191         (dwarf2_frame_state_alloc_regs): Remove declaration.
6192         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
6193         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
6194
6195 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6196
6197         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6198         (dwarf2_frame_state::dwarf2_frame_state): New.
6199         (dwarf2_frame_state::~dwarf2_frame_state): New.
6200         (dwarf2_fetch_cfa_info): Update.
6201         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
6202         rather than a pointer.  Update code.
6203         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6204         dtor.
6205         <data_align, code_align, retaddr_column>: Change them to const.
6206         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6207         to bool.
6208
6209 2017-08-11  Yao Qi  <yao.qi@linaro.org>
6210
6211         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6212         <loc.exp>: New field.
6213         * dwarf2-frame.c (execute_cfa_program): Update.
6214         (dwarf2_frame_prev_register): Update.
6215
6216 2017-08-10  Pedro Alves  <palves@redhat.com>
6217
6218         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6219
6220 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6221
6222         * fbsd-nat.c (struct fbsd_fork_info): Remove.
6223         (fbsd_pending_children): Use std::list.
6224         (fbsd_remember_child): Likewise.
6225         (fbsd_is_child_pending): Likewise.
6226         (fbsd_pending_vfork_done): Use std::forward_list.
6227         (fbsd_add_vfork_done): Likewise.
6228         (fbsd_is_vfork_done_pending): Likewise.
6229         (fbsd_next_vfork_done): Likewise.
6230
6231 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6232
6233         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6234         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6235         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6236         for `mapfilename'.
6237         (fbsd_xfer_partial): Use gdb::byte_vector.
6238         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6239
6240 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
6241
6242         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6243         "filestuff.h".
6244         (fbsd_find_memory_regions): Fix `mapfile' initialization.
6245
6246 2017-08-09  Tom Tromey  <tom@tromey.com>
6247
6248         * skip.c (skiplist_entry): New constructor.
6249         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6250         (skiplist_entry::file_is_glob): Now bool.
6251         (skiplist_entry::file, skiplist_entry::function): Now
6252         std::string.
6253         (make_skip_entry): Return a unique_ptr.  Use new.
6254         (free_skiplist_entry, free_skiplist_entry_cleanup)
6255         (make_free_skiplist_entry_cleanup): Remove.
6256         (skip_command, skip_disable_command, add_skiplist_entry)
6257         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6258         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6259         (function_name_is_marked_for_skip): Update.
6260         (skip_delete_command): Update.  Use delete.
6261
6262 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
6263
6264         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6265         (aarch64_linux_core_read_description): New function.
6266         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6267
6268 2017-08-09  Pedro Alves  <palves@redhat.com>
6269
6270         * cp-name-parser.y (cp_comp_to_string): Return a
6271         gdb::unique_xmalloc_ptr<char>.
6272         * cp-support.c (replace_typedefs_qualified_name)
6273         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6274         (cp_canonicalize_string_full): Use op= instead of explicit
6275         convertion.
6276         (cp_class_name_from_physname, method_name_from_physname)
6277         (cp_func_name, cp_remove_params): Adjust to use
6278         gdb::unique_xmalloc_ptr<char>.
6279         * cp-support.h (cp_comp_to_string): Return a
6280         gdb::unique_xmalloc_ptr<char>.
6281         * python/py-type.c (typy_lookup_type): Adjust to use
6282         gdb::unique_xmalloc_ptr<char>.
6283
6284 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
6285
6286         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6287
6288 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
6289             Yao Qi  <yao.qi@linaro.org>
6290
6291         * cp-support.c (cp_canonicalize_string_full): Use
6292         gdb::unique_xmalloc_ptr<char>.
6293         (cp_canonicalize_string): Likewise.
6294
6295 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6296
6297         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6298         * regformats/i386/amd64-avx-avx512.dat: Remove.
6299         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6300         * regformats/i386/amd64-avx-mpx.dat:Remove.
6301         * regformats/i386/amd64-avx.dat: Remove.
6302         * regformats/i386/amd64-mpx.dat: Remove.
6303         * regformats/i386/i386-avx-avx512.dat: Remove.
6304         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6305         * regformats/i386/i386-avx-mpx.dat: Remove.
6306         * regformats/i386/i386-mmx.dat: Remove.
6307         * regformats/i386/i386-mpx.dat: Remove.
6308
6309 2017-08-09  Yao Qi  <yao.qi@linaro.org>
6310
6311         * amd64-tdep.h (tdesc_x32): Remove the declaration.
6312         * amd64-tdep.c: Don't include features/i386/x32*.c.
6313         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6314         functions.
6315         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6316         and i386/x32-avx-avx512.
6317         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6318         and i386/x32.xml.
6319         * features/i386/x32-avx-avx512.c: Removed.
6320         * features/i386/x32-avx-avx512.xml: Removed.
6321         * features/i386/x32-avx.c: Removed.
6322         * features/i386/x32-avx.xml: Removed.
6323         * features/i386/x32.c: Removed.
6324         * features/i386/x32.xml: Removed.
6325         * regformats/i386/x32-avx-avx512.dat: Removed.
6326         * regformats/i386/x32-avx.dat: Removed.
6327         * regformats/i386/x32.dat: Removed.
6328
6329 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6330
6331         PR breakpoints/21886
6332         * mem-break.c (default_memory_insert_breakpoint): Use
6333         `->placed_address' rather than `->reqstd_address' for the
6334         breakpoint location.
6335
6336 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6337
6338         * arch-utils.c (default_print_insn): Remove arch/mach/endian
6339         assertions.
6340
6341 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
6342
6343         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6344         a union of `tdep_info', `tdesc_data' and `id'.
6345         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6346         rather than `info.tdep_info'.
6347         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6348         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6349         * i386-tdep.c (i386_gdbarch_init): Likewise.
6350         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6351         * mips-tdep.c (mips_gdbarch_init): Likewise.
6352         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6353         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6354         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6355         `info.tdep_info'.
6356         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6357         `info.tdep_info'.
6358         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6359         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6360         `info.tdep_info'.
6361         * spu-tdep.c (spu_gdbarch_init): Likewise.
6362         * gdbarch.h: Regenerate.
6363
6364 2017-08-07  Leszek Swirski  <leszeks@google.com>
6365
6366         PR symtab/20899
6367         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6368
6369 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
6370
6371         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6372         (gdbsim_open): Rename gdb_argv args object to argv.
6373
6374 2017-08-05  Tom Tromey  <tom@tromey.com>
6375
6376         * compile/compile-object-load.c (compile_object_load): Use
6377         gdb::unique_xmalloc_ptr.
6378         * cli/cli-dump.c (scan_filename): Rename from
6379         scan_filename_with_cleanup.  Change return type.
6380         (scan_expression): Rename from scan_expression_with_cleanup.
6381         Change return type.
6382         (dump_memory_to_file, dump_value_to_file, restore_command):
6383         Use gdb::unique_xmalloc_ptr.  Update.
6384         * cli/cli-cmds.c (find_and_open_script): Use
6385         gdb::unique_xmalloc_ptr.
6386         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6387         * symmisc.c (maintenance_print_symbols)
6388         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6389         * symfile.c (symfile_bfd_open, generic_load)
6390         (add_symbol_file_command, remove_symbol_file_command): Use
6391         gdb::unique_xmalloc_ptr.
6392         * source.c (openp): Use gdb::unique_xmalloc_ptr.
6393         * psymtab.c (maintenance_print_psymbols): Use
6394         gdb::unique_xmalloc_ptr.
6395         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6396         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6397         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6398         (reload_shared_libraries_1): Likewise.
6399
6400 2017-08-05  Tom Tromey  <tom@tromey.com>
6401
6402         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6403         (rust_op_vector, rust_set_vector): New typedefs.
6404         (current_parser): New global.
6405         (work_obstack): Change to pointer type.  Update all users.
6406         (rust_ast, pstate): Remove globals.
6407         (struct rust_parser): New.
6408         (%union) <params, field_inits>: Change type.
6409         (start, tuple_expr, unit_expr, struct_expr_list, literal)
6410         (field_expr, expr_list, maybe_expr_list, type_list): Update.
6411         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6412         (convert_params_to_types, convert_params_to_expression): Change
6413         type of "params".
6414         (ast_string): Change type of "fields".
6415         (rust_parse): Make a rust_parser.  Remove cleanups.
6416         (rust_lex_tests): Make and install an auto_obstack.
6417
6418 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6419
6420         * configure.srv (ipa_x32_linux_regobj): New.
6421         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6422         instead of X86_TDESC_AVX512.
6423         (initialize_low_tracepoint): Call
6424         init_registers_x32_avx_avx512_linux.
6425
6426 2017-08-04  Yao Qi  <yao.qi@linaro.org>
6427
6428         * utils.h (gdb_argv): Add namespace std for nullptr_t.
6429
6430 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
6431
6432         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6433
6434 2017-08-03  Tom Tromey  <tom@tromey.com>
6435
6436         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6437         Remove.
6438         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6439
6440 2017-08-03  Tom Tromey  <tom@tromey.com>
6441
6442         * python/py-param.c (compute_enum_values): Use gdb_argv.
6443
6444 2017-08-03  Tom Tromey  <tom@tromey.com>
6445
6446         * utils.h (struct gdb_argv_deleter): New.
6447         (gdb_argv): New class.
6448         * utils.c (gdb_argv::reset): New method.
6449         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6450         * tracefile.c (tsave_command): Use gdb_argv.
6451         * top.c (new_ui_command): Use gdb_argv.
6452         * symmisc.c (maintenance_print_symbols)
6453         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6454         * symfile.c (symbol_file_command, generic_load)
6455         (remove_symbol_file_command): Use gdb_argv.
6456         * stack.c (backtrace_command): Use gdb_argv.
6457         * source.c (add_path, show_substitute_path_command)
6458         (unset_substitute_path_command, set_substitute_path_command):
6459         Use gdb_argv.
6460         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
6461         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6462         * remote.c (extended_remote_run, remote_put_command)
6463         (remote_get_command, remote_delete_command): Use gdb_argv.
6464         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6465         (gdbsim_open): Use gdb_argv.
6466         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6467         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6468         * procfs.c (procfs_info_proc): Use gdb_argv.
6469         * interps.c (interpreter_exec_cmd): Use gdb_argv.
6470         * infrun.c (handle_command): Use gdb_argv.
6471         * inferior.c (add_inferior_command, clone_inferior_command):
6472         Use gdb_argv.
6473         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6474         * exec.c (exec_file_command): Use gdb_argv.
6475         * cli/cli-cmds.c (alias_command): Use gdb_argv.
6476         * compile/compile.c (build_argc_argv): Use gdb_argv.
6477
6478 2017-08-03  Tom Tromey  <tom@tromey.com>
6479
6480         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6481
6482 2017-08-03  Tom Tromey  <tom@tromey.com>
6483
6484         * python/python.c (compute_python_string): Return std::string.
6485         (gdbpy_eval_from_control_command): Update.
6486         (do_start_initialization): Use std::string.
6487         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6488         xstrprintf.
6489         * python/py-breakpoint.c (local_setattro): Use string_printf, not
6490         xstrprintf.
6491
6492 2017-08-03  Tom Tromey  <tom@tromey.com>
6493
6494         * top.h (do_restore_instream_cleanup): Remove.
6495         * top.c (do_restore_instream_cleanup): Remove.
6496         (read_command_file): Use scoped_restore.
6497         * cli/cli-script.c (execute_user_command): Use scoped_restore.
6498
6499 2017-08-03  Tom Tromey  <tom@tromey.com>
6500
6501         * cli/cli-script.c (execute_user_command)
6502         (execute_control_command): Use scoped_restore.
6503
6504 2017-08-03  Tom Tromey  <tom@tromey.com>
6505
6506         * cli/cli-script.c (do_restore_user_call_depth): Remove.
6507         (execute_user_command): Remove user_call_depth; use
6508         user_args_stack's size instead.
6509
6510 2017-08-03  Tom Tromey  <tom@tromey.com>
6511
6512         * top.h (in_user_command): Remove.
6513         * top.c (in_user_command): Remove.
6514         * cli/cli-script.c (do_restore_user_call_depth)
6515         (execute_user_command): Update.
6516
6517 2017-08-03  Tom Tromey  <tom@tromey.com>
6518
6519         * valops.c (search_struct_method): Use gdb::byte_vector.
6520         * valarith.c (value_concat): Use std::vector.
6521         * target.c (memory_xfer_partial): Use gdb::byte_vector.
6522         (simple_search_memory): Likewise.
6523         * printcmd.c (find_string_backward): Use gdb::byte_vector.
6524         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6525         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6526         * elfread.c (elf_rel_plt_read): Use std::string.
6527         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6528         * cli/cli-dump.c (restore_section_callback): Use
6529         gdb::byte_vector.
6530
6531 2017-08-03  Tom Tromey  <tom@tromey.com>
6532
6533         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6534
6535 2017-08-03  Tom Tromey  <tom@tromey.com>
6536
6537         * tui/tui-regs.c (tui_restore_gdbout): Remove.
6538         (tui_register_format): Use scoped_restore.
6539
6540 2017-08-03  Tom Tromey  <tom@tromey.com>
6541
6542         * reverse.c (exec_direction_default): Remove.
6543         (exec_reverse_once): Use scoped_restore.
6544         * remote.c (restore_remote_timeout): Remove.
6545         (remote_flash_erase, remote_flash_write, remote_flash_done)
6546         (readchar, remote_serial_write): Use scoped_restore.
6547         * cli/cli-script.c (struct source_cleanup_lines_args)
6548         (source_cleanup_lines): Remove.
6549         (script_from_file): Use scoped_restore.
6550         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6551         (source_command): Use scoped_restore.
6552
6553 2017-08-03  Tom Tromey  <tom@tromey.com>
6554
6555         * utils.h (make_cleanup_free_so): Remove.
6556         * utils.c (do_free_so, make_cleanup_free_so): Remove.
6557         * solist.h (struct so_deleter): New.
6558         (so_list_up): New typedef.
6559         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6560
6561 2017-08-03  Tom Tromey  <tom@tromey.com>
6562
6563         * utils.h (make_cleanup_restore_current_language): Remove.
6564         * utils.c (do_restore_current_language)
6565         (make_cleanup_restore_current_language): Remove.
6566         * parse.c (parse_exp_in_context_1)
6567         (parse_expression_with_language): Use
6568         scoped_restore_current_language.
6569         * mi/mi-main.c (mi_cmd_execute): Use
6570         scoped_restore_current_language.
6571         * language.h (scoped_restore_current_language): New class.
6572
6573 2017-08-03  Tom Tromey  <tom@tromey.com>
6574
6575         * compile/compile.c (cleanup_unlink_file): Remove.
6576         (compile_to_object): Use gdb::unlinker.
6577         (eval_compile_command): Likewise.
6578
6579 2017-08-03  Tom Tromey  <tom@tromey.com>
6580
6581         * utils.h (make_cleanup_fclose): Remove.
6582         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6583
6584 2017-08-03  Tom Tromey  <tom@tromey.com>
6585
6586         * top.c (open_terminal_stream): Return gdb_file_up.
6587         (new_ui_command): Update.
6588
6589 2017-08-03  Tom Tromey  <tom@tromey.com>
6590
6591         * source.c (print_source_lines_base, forward_search_command)
6592         (reverse_search_command): Use gdb_file_up.
6593
6594 2017-08-03  Tom Tromey  <tom@tromey.com>
6595
6596         * fbsd-nat.c (fbsd_find_memory_regions): Update.
6597
6598 2017-08-03  Tom Tromey  <tom@tromey.com>
6599
6600         * cli/cli-cmds.c (find_and_open_script): Change return type.
6601         Remove "streamp" and "full_path" parameters.
6602         (source_script_with_search): Update.
6603         * auto-load.c (source_script_file): Update.
6604         * cli/cli-cmds.h (find_and_open_script): Change type.
6605         (open_script): New struct.
6606
6607 2017-08-03  Tom Tromey  <tom@tromey.com>
6608
6609         * xml-support.c (xml_fetch_content_from_file): Update.
6610         * ui-file.c (stdio_file::open): Update.
6611         * tracefile-tfile.c (tfile_start): Update.
6612         * remote.c (remote_file_put, remote_file_get): Update.
6613         * nat/linux-procfs.c (linux_proc_get_int)
6614         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6615         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6616         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6617         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6618         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6619         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6620         * linux-nat.c (linux_proc_pending_signals): Update.
6621         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6622         (file_closer): Remove.
6623         * compile/compile.c (compile_to_object): Update.
6624         * common/filestuff.h (struct gdb_file_deleter): New.
6625         (gdb_file_up): New typedef.
6626         (gdb_fopen_cloexec): Change return type.
6627         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6628         * cli/cli-dump.c (fopen_with_cleanup): Remove.
6629         (dump_binary_file, restore_binary_file): Update.
6630         * auto-load.c (auto_load_objfile_script_1): Update.
6631
6632 2017-08-03  Tom Tromey  <tom@tromey.com>
6633
6634         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6635         (info_static_tracepoint_markers_command): Likewise.
6636         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6637         * skip.c (skip_info): Use ui_out_emit_table.
6638         * progspace.c (print_program_space): Use ui_out_emit_table.
6639         * osdata.c (info_osdata): Use ui_out_emit_table.
6640         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6641         ui_out_emit_table.
6642         * linux-thread-db.c (info_auto_load_libthread_db): Use
6643         ui_out_emit_table.
6644         * inferior.c (print_inferior): Use ui_out_emit_table.
6645         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6646         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6647         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6648         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6649         * ui-out.h (class ui_out_emit_table): New.
6650
6651 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
6652
6653         * mips-tdep.c (mips_fpu_type_str): New function.
6654         (mips_dump_tdep): Call it.
6655
6656 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
6657
6658         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6659         `->mips_fpu_type'.
6660
6661 2017-07-31  Xavier Roirand  <roirand@adacore.com>
6662
6663         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6664
6665 2017-07-27  Xavier Roirand  <roirand@adacore.com>
6666
6667         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6668
6669 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6670
6671         * cli/cli-cmds.c (maintenancechecklist): New variable.
6672         * gdbcmd.h (maintenancechecklist): Declare it.
6673         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6674         Call i386_linux_read_description with different masks.
6675         * maint.c (maintenance_check_command): New function.
6676         (_initialize_maint_cmds): Call add_prefix_cmd.
6677         * target-descriptions.c (tdesc_reg): override operator != and ==.
6678         (tdesc_type): Likewise.
6679         (tdesc_feature): Likewise.
6680         (target_desc): Likewise.
6681         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6682         (maintenance_check_xml_descriptions): New function.
6683         (_initialize_target_descriptions) Add command "xml-descriptions".
6684         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6685
6686 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6687
6688         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6689         Include features/i386/32bit-*.c.
6690         (i386_linux_read_description): Generate target description if it
6691         doesn't exist.
6692         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6693         functions.
6694         * features/i386/32bit-linux.c: Re-generated.
6695         * features/i386/32bit-sse.c: Likewise.
6696         * target-descriptions.c (print_c_feature::visit): Print code to
6697         set register number if needed.
6698         (print_c_feature) <m_next_regnum>: New field.
6699
6700 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6701
6702         * features/Makefile (CFILES): Rename with TDESC_CFILES.
6703         (FEATURE_XMLFILES): New.
6704         (FEATURE_CFILES): New.
6705         New rules.
6706         (clean-cfiles): Remove generated c files.
6707         * features/i386/32bit-avx.c: Generated.
6708         * features/i386/32bit-avx512.c: Generated.
6709         * features/i386/32bit-core.c: Generated.
6710         * features/i386/32bit-linux.c: Generated.
6711         * features/i386/32bit-mpx.c: Generated.
6712         * features/i386/32bit-pkeys.c: Generated.
6713         * features/i386/32bit-sse.c: Generated.
6714         * target-descriptions.c: Include algorithm.
6715         (tdesc_element_visitor): Add method visit_end.
6716         (print_c_tdesc): Implement visit_end.
6717         (print_c_tdesc:: m_filename_after_features): Move it to
6718         protected.
6719         (print_c_feature): New class.
6720         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6721         name starts with "i386/32bit-".
6722
6723 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6724
6725         * target-descriptions.c (tdesc_element_visitor): New class.
6726         (tdesc_element): New class.
6727         (tdesc_reg): Inherit from tdesc_element.
6728         (tdesc_reg::accept): New function.
6729         (tdesc_type): Inherit from tdesc_element.
6730         (tdesc_type::accept): New function.
6731         (tdesc_feature): Inherit from tdesc_element.
6732         (tdesc_feature::accept): New function.
6733         (target_desc): Inherit from tdesc_element.
6734         (target_desc::target_desc): New.
6735         (target_desc::~target_desc): New.
6736         (target_desc::accept): New.
6737         (allocate_target_description): Use new.
6738         (free_target_description): Use delete.
6739         (print_c_tdesc): New class.
6740         (maint_print_c_tdesc_cmd): Adjust.
6741
6742         * features/aarch64.c: Re-generated.
6743         * features/arc-arcompact.c: Re-generated.
6744         * features/arc-v2.c: Re-generated.
6745         * features/arm/arm-with-iwmmxt.c: Re-generated.
6746         * features/arm/arm-with-m.c: Re-generated.
6747         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6748         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6749         * features/arm/arm-with-neon.c: Re-generated.
6750         * features/arm/arm-with-vfpv2.c: Re-generated.
6751         * features/arm/arm-with-vfpv3.c: Re-generated.
6752         * features/i386/amd64-avx-avx512.c: Re-generated.
6753         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6754         * features/i386/amd64-avx.c: Re-generated.
6755         * features/i386/amd64-avx-linux.c: Re-generated.
6756         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6757         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6758         * features/i386/amd64-avx-mpx.c: Re-generated.
6759         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6760         * features/i386/amd64.c: Re-generated.
6761         * features/i386/amd64-linux.c: Re-generated.
6762         * features/i386/amd64-mpx.c: Re-generated.
6763         * features/i386/amd64-mpx-linux.c: Re-generated.
6764         * features/i386/i386-avx-avx512.c: Re-generated.
6765         * features/i386/i386-avx-avx512-linux.c: Re-generated.
6766         * features/i386/i386-avx.c: Re-generated.
6767         * features/i386/i386-avx-linux.c: Re-generated.
6768         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6769         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6770         * features/i386/i386-avx-mpx.c: Re-generated.
6771         * features/i386/i386-avx-mpx-linux.c: Re-generated.
6772         * features/i386/i386.c: Re-generated.
6773         * features/i386/i386-linux.c: Re-generated.
6774         * features/i386/i386-mmx.c: Re-generated.
6775         * features/i386/i386-mmx-linux.c: Re-generated.
6776         * features/i386/i386-mpx.c: Re-generated.
6777         * features/i386/i386-mpx-linux.c: Re-generated.
6778         * features/i386/x32-avx-avx512.c: Re-generated.
6779         * features/i386/x32-avx-avx512-linux.c: Re-generated.
6780         * features/i386/x32-avx.c: Re-generated.
6781         * features/i386/x32-avx-linux.c: Re-generated.
6782         * features/i386/x32.c: Re-generated.
6783         * features/i386/x32-linux.c: Re-generated.
6784         * features/microblaze.c: Re-generated.
6785         * features/microblaze-with-stack-protect.c: Re-generated.
6786         * features/mips64-dsp-linux.c: Re-generated.
6787         * features/mips64-linux.c: Re-generated.
6788         * features/mips-dsp-linux.c: Re-generated.
6789         * features/mips-linux.c: Re-generated.
6790         * features/nds32.c: Re-generated.
6791         * features/nios2.c: Re-generated.
6792         * features/nios2-linux.c: Re-generated.
6793         * features/rs6000/powerpc-32.c: Re-generated.
6794         * features/rs6000/powerpc-32l.c: Re-generated.
6795         * features/rs6000/powerpc-403.c: Re-generated.
6796         * features/rs6000/powerpc-403gc.c : Re-generated.
6797         * features/rs6000/powerpc-405.c: Re-generated.
6798         * features/rs6000/powerpc-505.c: Re-generated.
6799         * features/rs6000/powerpc-601.c: Re-generated.
6800         * features/rs6000/powerpc-602.c: Re-generated.
6801         * features/rs6000/powerpc-603.c: Re-generated.
6802         * features/rs6000/powerpc-604.c: Re-generated.
6803         * features/rs6000/powerpc-64.c: Re-generated.
6804         * features/rs6000/powerpc-64l.c: Re-generated.
6805         * features/rs6000/powerpc-7400.c: Re-generated.
6806         * features/rs6000/powerpc-750.c: Re-generated.
6807         * features/rs6000/powerpc-860.c: Re-generated.
6808         * features/rs6000/powerpc-altivec32.c: Re-generated.
6809         * features/rs6000/powerpc-altivec32l.c: Re-generated.
6810         * features/rs6000/powerpc-altivec64.c: Re-generated.
6811         * features/rs6000/powerpc-altivec64l.c: Re-generated.
6812         * features/rs6000/powerpc-cell32l.c: Re-generated.
6813         * features/rs6000/powerpc-cell64l.c: Re-generated.
6814         * features/rs6000/powerpc-e500.c: Re-generated.
6815         * features/rs6000/powerpc-e500l.c: Re-generated.
6816         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6817         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6818         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6819         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6820         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6821         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6822         * features/rs6000/powerpc-vsx32.c: Re-generated.
6823         * features/rs6000/powerpc-vsx32l.c: Re-generated.
6824         * features/rs6000/powerpc-vsx64.c: Re-generated.
6825         * features/rs6000/powerpc-vsx64l.c: Re-generated.
6826         * features/rs6000/rs6000.c: Re-generated.
6827         * features/s390-linux32.c: Re-generated.
6828         * features/s390-linux32v1.c: Re-generated.
6829         * features/s390-linux32v2.c: Re-generated.
6830         * features/s390-linux64.c: Re-generated.
6831         * features/s390-linux64v1.c: Re-generated.
6832         * features/s390-linux64v2.c: Re-generated.
6833         * features/s390-te-linux64.c: Re-generated.
6834         * features/s390-tevx-linux64.c: Re-generated.
6835         * features/s390-vx-linux64.c: Re-generated.
6836         * features/s390x-linux64.c: Re-generated.
6837         * features/s390x-linux64v1.c: Re-generated.
6838         * features/s390x-linux64v2.c: Re-generated.
6839         * features/s390x-te-linux64.c: Re-generated.
6840         * features/s390x-tevx-linux64.c: Re-generated.
6841         * features/s390x-vx-linux64.c: Re-generated.
6842         * features/sparc/sparc32-solaris.c: Re-generated.
6843         * features/sparc/sparc64-solaris.c: Re-generated.
6844         * features/tic6x-c62x.c: Re-generated.
6845         * features/tic6x-c62x-linux.c: Re-generated.
6846         * features/tic6x-c64x.c: Re-generated.
6847         * features/tic6x-c64x-linux.c: Re-generated.
6848         * features/tic6x-c64xp.c: Re-generated.
6849         * features/tic6x-c64xp-linux.c: Re-generated.
6850
6851 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6852
6853         * i386-linux-tdep.c (i386_linux_read_description): New function.
6854         (i386_linux_core_read_description): Call
6855         i386_linux_read_description.
6856         * i386-linux-tdep.h (i386_linux_read_description): Declare.
6857         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6858         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6859         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6860         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6861         * x86-linux-nat.c (x86_linux_read_description): Call
6862         i386_linux_read_description.
6863
6864 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6865
6866         * NEWS: Mention it.
6867         * features/Makefile (%.c: %.xml): Pass the xml file name to
6868         command "maint print c-tdesc".
6869         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6870         name from 'arg'.
6871
6872 2017-07-26  Yao Qi  <yao.qi@linaro.org>
6873
6874         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
6875         in-class initialization.
6876         (tdesc_create_feature): Call new instead of XCNEW.
6877         (free_target_description): Ue delete.
6878
6879 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
6880
6881         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6882
6883 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6884
6885         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6886         constant.
6887         (amd64_x32_init_abi): Likewise.
6888         * amd64-tdep.h (amd64_init_abi): Update declaration.
6889         (amd64_x32_init_abi): Likewise.
6890
6891 2017-07-25  Yao Qi  <yao.qi@linaro.org>
6892
6893         PR tdep/21717
6894         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6895         condition for FPSCR.
6896         (arm_linux_store_inferior_registers): Likewise.
6897
6898 2017-07-22  Tom Tromey  <tom@tromey.com>
6899
6900         * break-catch-syscall.c (struct catch_syscall_inferior_data)
6901         <syscalls_counts>: Now a std::vector.
6902         (get_catch_syscall_inferior_data): Use "new".
6903         (catch_syscall_inferior_data_cleanup): Use "delete".
6904         (insert_catch_syscall, remove_catch_syscall)
6905         (clear_syscall_counts): Update.
6906
6907 2017-07-22  Tom Tromey  <tom@tromey.com>
6908
6909         * break-catch-syscall.c (syscall_catchpoint)
6910         <syscalls_to_be_caught>: Now a std::vector<int>
6911         (~syscall_catchpoint): Remove.
6912         (insert_catch_syscall, remove_catch_syscall)
6913         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6914         (print_mention_catch_syscall, print_recreate_catch_syscall):
6915         Update.
6916         (create_syscall_event_catchpoint): Change type of "filter"
6917         parameter.
6918         (catch_syscall_split_args): Return a std::vector.
6919         (catch_syscall_command_1, catching_syscall_number_1): Update.
6920
6921 2017-07-22  Tom Tromey  <tom@tromey.com>
6922
6923         * break-catch-throw.c (struct exception_catchpoint)
6924         <exception_rx>: Now a std::string.
6925         (~exception_catchpoint): Remove.
6926         (print_one_detail_exception_catchpoint): Update.
6927         (handle_gnu_v3_exceptions): Change type of except_rx.
6928         (extract_exception_regexp): Return a std::string.
6929         (catch_exception_command_1): Update.
6930
6931 2017-07-22  Tom Tromey  <tom@tromey.com>
6932
6933         * break-catch-sig.c (gdb_signal_type): Remove typedef.
6934         (struct signal_catchpoint) <signals_to_be_caught>: Now a
6935         std::vector.
6936         <catch_all>: Now a bool.
6937         (~signal_catchpoint): Remove.
6938         (signal_catchpoint_insert_location)
6939         (signal_catchpoint_remove_location)
6940         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6941         (signal_catchpoint_print_mention)
6942         (signal_catchpoint_print_recreate)
6943         (signal_catchpoint_explains_signal): Update.
6944         (create_signal_catchpoint): Change type of "filter" and
6945         "catch_all".
6946         (catch_signal_split_args): Return a std::vector.  Change type of
6947         "catch_all".
6948         (catch_signal_command): Update.
6949
6950 2017-07-20  Pedro Alves  <palves@redhat.com>
6951
6952         * ada-lang.c (ada_language_defn): Make extern.
6953         (_initialize_ada_language): Remove add_language call.
6954         * c-lang.c (c_language_defn, cplus_language_defn)
6955         (asm_language_defn, minimal_language_defn): Make extern.
6956         (_initialize_c_language): Delete.
6957         * completer.c (compare_cstrings): Delete, moved to utils.h.
6958         * d-lang.c (d_language_defn): Make extern.
6959         (_initialize_d_language): Remove add_language calls.
6960         * defs.h (enum language): Add comment.
6961         * f-lang.c (f_language_defn): Make extern.
6962         (_initialize_f_language): Remove add_language call.
6963         * go-lang.c (go_language_defn): Make extern.
6964         (_initialize_go_language): Remove add_language call.
6965         * language.c: Include <algorithm>.
6966         (languages): Redefine as const array.
6967         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6968         (set_language_command): Handle "local".  Use for-range loop.
6969         (set_language): Remove loop.
6970         (language_enum): Rewrite.
6971         (language_def, language_str): Remove loops.
6972         (add_language): Delete.
6973         (add_set_language_command): New, based on add_languages.
6974         (skip_language_trampoline): Adjust.
6975         (local_language_defn): Delete.
6976         (language_gdbarch_post_init): Adjust.
6977         (_initialize_language): Remove add_language calls.  Call
6978         add_set_language_command.
6979         * language.h (add_language): Delete.
6980         (auto_language_defn)
6981         (unknown_language_defn, minimal_language_defn, ada_language_defn)
6982         (asm_language_defn, c_language_defn, cplus_language_defn)
6983         (d_language_defn, f_language_defn, go_language_defn)
6984         (m2_language_defn, objc_language_defn, opencl_language_defn)
6985         (pascal_language_defn, rust_language_defn): Declare.
6986         * m2-lang.c (m2_language_defn): Make extern.
6987         (_initialize_m2_language): Remove add_language call.
6988         * objc-lang.c (objc_language_defn): Make extern.
6989         (_initialize_objc_language): Remove add_language call.
6990         * opencl-lang.c (opencl_language_defn): Make extern.
6991         (_initialize_opencl_language): Remove add_language call.
6992         * p-lang.c (pascal_language_defn): Make extern.
6993         (_initialize_pascal_language): Delete.
6994         * rust-lang.c (rust_language_defn): Make extern.
6995         (_initialize_rust_language): Delete.
6996         * utils.h (compare_cstrings): New static inline function.
6997
6998 2017-07-20  Pedro Alves  <palves@redhat.com>
6999
7000         * ada-lang.c (ada_to_fixed_type_1): Adjust.
7001         (get_var_value): Constify parameters.
7002         (get_int_var_value): Change prototype.
7003         (to_fixed_range_type): Adjust.
7004         * ada-lang.h (get_int_var_value): Change prototype.
7005
7006 2017-07-20  Pedro Alves  <palves@redhat.com>
7007
7008         * dwarf2read.c (dw2_lookup_symbol): Use
7009         SYMBOL_MATCHES_SEARCH_NAME.
7010         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
7011
7012 2017-07-20  Pedro Alves  <palves@redhat.com>
7013
7014         * block.c (block_iter_name_step, block_iter_name_first)
7015         (block_iter_name_next): Delete.
7016         (block_lookup_symbol_primary): Adjust to use
7017         dict_iter_match_first/dict_iter_match_next.
7018         * block.h (block_iter_name_first, block_iter_name_next): Delete
7019         declarations.
7020         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
7021         dict_iter_match_first/dict_iter_match_next.
7022
7023 2017-07-20  Pedro Alves  <palves@redhat.com>
7024
7025         * cp-support.c (cp_find_first_component_aux): Add missing case for
7026         end of string.
7027
7028 2017-07-18  David Blaikie  <dblaikie@gmail.com>
7029
7030         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
7031         of dwo_cu's dwo_file.
7032
7033 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7034
7035         * remote.c (store_registers_using_G): Remove one line comment.
7036
7037 2017-07-18  Yao Qi  <yao.qi@linaro.org>
7038
7039         * regcache.c (regcache_cpy): Simplify it.
7040         (regcache::cpy_no_passthrough): Remove it.
7041         * regcache.h (cpy_no_passthrough): Remove it.
7042         (regcache_dup, regcache_cpy): Update comments.
7043
7044 2017-07-18  Pedro Alves  <palves@redhat.com>
7045
7046         * remote-sim.c (sim_command_completer): Adjust to work with a
7047         completion_tracker instead of a VEC.
7048
7049 2017-07-17  Pedro Alves  <palves@redhat.com>
7050
7051         * completer.c (complete_source_filenames): New function.
7052         (complete_address_and_linespec_locations): New function.
7053         (location_completer): Use complete_address_and_linespec_locations.
7054         (completion_tracker::build_completion_result): Honor the tracker's
7055         request to suppress append.
7056         * completer.h (completion_tracker::suppress_append_ws)
7057         (completion_tracker::set_suppress_append_ws): New methods.
7058         (completion_tracker::m_suppress_append_ws): New field.
7059         (complete_source_filenames): New declaration.
7060         * linespec.c (linespec_complete_what): New.
7061         (struct ls_parser) <complete_what, completion_word,
7062         completion_quote_char, completion_quote_end, completion_tracker>:
7063         New fields.
7064         (string_find_incomplete_keyword_at_end): New.
7065         (linespec_lexer_lex_string): Record quote char.  If in completion
7066         mode, don't throw.
7067         (linespec_lexer_consume_token): Advance the completion word point.
7068         (linespec_lexer_peek_token): Save/restore completion info.
7069         (save_stream_and_consume_token): New.
7070         (set_completion_after_number): New.
7071         (linespec_parse_basic): Set what to complete next depending on
7072         token.  Handle function and label completions specially.
7073         (parse_linespec): Disable objc shortcut in completion mode.  Set
7074         what to complete next depending on token type.  Skip keyword if in
7075         completion mode.
7076         (complete_linespec_component, linespec_complete): New.
7077         * linespec.h (linespec_complete): Declare.
7078
7079 2017-07-17  Pedro Alves  <palves@redhat.com>
7080
7081         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
7082         Handle 'operator<' / 'operator<<'.
7083
7084 2017-07-17  Pedro Alves  <palves@redhat.com>
7085
7086         * completer.c (collect_explicit_location_matches): Handle
7087         MATCH_LABEL.
7088         (convert_explicit_location_to_linespec): New, factored out from
7089         ...
7090         (convert_explicit_location_to_sals): ... this.
7091         (complete_label): New.
7092         (linespec_complete_label, find_label_symbols_in_block): New.
7093         (find_label_symbols): Add completion_mode parameter and adjust to
7094         call find_label_symbols_in_block.
7095         * linespec.h (linespec_complete_label): Declare.
7096
7097 2017-07-17  Pedro Alves  <palves@redhat.com>
7098
7099         * ada-lang.c (ada_collect_symbol_completion_matches): Add
7100         complete_symbol_mode parameter.
7101         * cli/cli-cmds.c (complete_command): Get the completion result out
7102         of the handle_brkchars tracker if used a custom word point.
7103         * completer.c: Include "linespec.h".
7104         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
7105         (advance_to_expression_complete_word_point): New.
7106         (completion_tracker::completes_to_completion_word): New.
7107         (complete_files_symbols): Pass down
7108         complete_symbol_mode::EXPRESSION.
7109         (explicit_options, probe_options): New.
7110         (collect_explicit_location_matches): Complete on the
7111         explictit_loc->foo instead of word.  Use
7112         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
7113         keyword and options completions.
7114         (backup_text_ptr): Delete.
7115         (skip_keyword): New.
7116         (complete_explicit_location): Remove 'word' parameter.  Add
7117         language, quoted_arg_start and quoted_arg_end parameters.
7118         Rewrite, parsing left to right.
7119         (location_completer): Rewrite.
7120         (location_completer_handle_brkchars): New function.
7121         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
7122         (enum complete_line_internal_reason): Adjust comments.
7123         (completion_tracker::discard_completions): New.
7124         (completer_handle_brkchars_func_for_completer): Handle
7125         location_completer.
7126         (gdb_custom_word_point_brkchars)
7127         (gdb_org_rl_basic_quote_characters): New.
7128         (gdb_completion_word_break_characters_throw)
7129         (completion_find_completion_word): Handle trackers that use a
7130         custom word point.
7131         (completion_tracker::advance_custom_word_point_by): New.
7132         (completion_tracker::build_completion_result): Don't rely on
7133         readline appending the quote char.
7134         (gdb_rl_attempted_completion_function_throw): Handle trackers that
7135         use a custom word point.
7136         (gdb_rl_attempted_completion_function): Restore
7137         rl_basic_quote_characters.
7138         * completer.h (class completion_tracker): Extend intro comment.
7139         (completion_tracker::set_quote_char)
7140         (completion_tracker::quote_char)
7141         (completion_tracker::set_use_custom_word_point)
7142         (completion_tracker::use_custom_word_point)
7143         (completion_tracker::custom_word_point)
7144         (completion_tracker::set_custom_word_point)
7145         (completion_tracker::advance_custom_word_point_by)
7146         (completion_tracker::completes_to_completion_word)
7147         (completion_tracker::discard_completions): New methods.
7148         (completion_tracker::m_quote_char)
7149         (completion_tracker::m_use_custom_word_point)
7150         (completion_tracker::m_custom_word_point): New fields.
7151         (advance_to_expression_complete_word_point): Declare.
7152         * f-lang.c (f_collect_symbol_completion_matches): Add
7153         complete_symbol_mode parameter.
7154         * language.h (struct language_defn)
7155         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
7156         parameter.
7157         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
7158         (linespec_complete_function): New function.
7159         (linespec_lexer_lex_keyword): Adjust.
7160         * linespec.h (linespec_keywords, linespec_complete_function): New
7161         declarations.
7162         * location.c (find_end_quote): New function.
7163         (explicit_location_lex_one): Add explicit_completion_info
7164         parameter.  Save quoting info.  Don't throw if being called for
7165         completion.  Don't handle Ada operators here.
7166         (is_cp_operator, skip_op_false_positives, first_of)
7167         (explicit_location_lex_one_function): New function.
7168         (string_to_explicit_location): Replace 'dont_throw' parameter with
7169         an explicit_completion_info pointer parameter.  Handle it.  Don't
7170         use explicit_location_lex_one to lex function names.  Use
7171         explicit_location_lex_one_function instead.
7172         * location.h (struct explicit_completion_info): New.
7173         (string_to_explicit_location): Replace 'dont_throw' parameter with
7174         an explicit_completion_info pointer parameter.
7175         * symtab.c (default_collect_symbol_completion_matches_break_on):
7176         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
7177         (default_collect_symbol_completion_matches)
7178         (collect_symbol_completion_matches): Add complete_symbol_mode
7179         parameter.
7180         (collect_symbol_completion_matches_type): Pass down
7181         complete_symbol_mode::EXPRESSION.
7182         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7183         parameter.  Handle LINESPEC mode.
7184         * symtab.h (complete_symbol_mode): New.
7185         (default_collect_symbol_completion_matches_break_on)
7186         (default_collect_symbol_completion_matches)
7187         (collect_symbol_completion_matches)
7188         (collect_file_symbol_completion_matches): Add complete_symbol_mode
7189         parameter.
7190
7191 2017-07-17  Pedro Alves  <palves@redhat.com>
7192
7193         * utils.c (enum class strncmp_iw_mode): New.
7194         (strcmp_iw): Rename to ...
7195         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
7196         parameters.  Handle them.
7197         (strncmp_iw): New.
7198         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7199         * utils.h (strncmp_iw): Declare.
7200         (strcmp_iw): Move describing comments here.
7201
7202 2017-07-17  Pedro Alves  <palves@redhat.com>
7203
7204         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7205         CP_OPERATOR_STR.
7206         * c-typeprint.c (is_type_conversion_operator): Use
7207         CP_OPERATOR_STR.
7208         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7209         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7210         CP_OPERATOR_LEN.
7211         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7212         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7213         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7214         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7215         CP_OPERATOR_STR.
7216         * location.c: Include "cp-support.h".
7217         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7218         CP_OPERATOR_STR.
7219         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7220         CP_OPERATOR_LEN.
7221
7222 2017-07-17  Pedro Alves  <palves@redhat.com>
7223
7224         * cli/cli-cmds.c (complete_command): Use a completion tracker
7225         along with completion_find_completion_word for handle_brkchars
7226         phase.
7227         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7228         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7229         (struct gdb_rl_completion_word_info): New.
7230         (gdb_rl_find_completion_word): New.
7231         (completion_find_completion_word): New.
7232         * completer.h (completion_find_completion_word): Declare.
7233
7234 2017-07-17  Pedro Alves  <palves@redhat.com>
7235
7236         * ada-lang.c (symbol_completion_match): Adjust comments.
7237         (symbol_completion_add): Replace vector parameter with
7238         completion_tracker parameter.  Use it.
7239         (ada_make_symbol_completion_list): Rename to...
7240         (ada_collect_symbol_completion_matches): ... this.  Add
7241         completion_tracker parameter and use it.
7242         (ada_language_defn): Adjust.
7243         * break-catch-syscall.c (catch_syscall_completer): Adjust
7244         prototype and work with completion_tracker instead of VEC.
7245         * breakpoint.c (condition_completer): Adjust prototype and work
7246         with completion_tracker instead of VEC.
7247         * c-lang.c (c_language_defn, cplus_language_defn)
7248         (asm_language_defn, minimal_language_defn): Adjust to renames.
7249         * cli/cli-cmds.c (complete_command): Rework using
7250         completion_tracker.  Catch exceptions when completing.
7251         * cli/cli-decode.c (integer_unlimited_completer)
7252         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7253         with completion_tracker instead of VEC.
7254         * command.h (struct completion_tracker): Forward declare.
7255         (completer_ftype, completer_handle_brkchars_ftype): Change
7256         types.
7257         (complete_on_cmdlist, complete_on_enum): Adjust.
7258         * completer.c: Include <algorithm>.
7259         (struct gdb_completer_state): New.
7260         (current_completion): New global.
7261         (readline_line_completion_function): Delete.
7262         (noop_completer, filename_completer)
7263         (filename_completer_handle_brkchars, complete_files_symbols)
7264         (linespec_location_completer): Adjust to work with a
7265         completion_tracker instead of a VEC.
7266         (string_or_empty): New.
7267         (collect_explicit_location_matches): Adjust to work with a
7268         completion_tracker instead of a VEC.
7269         (explicit_location_completer): Rename to ...
7270         (complete_explicit_location): ... this and adjust to work with a
7271         completion_tracker instead of a VEC.
7272         (location_completer): Adjust to work with a completion_tracker
7273         instead of a VEC.
7274         (add_struct_fields): Adjust to work with a completion_list instead
7275         of VEC.
7276         (expression_completer): Rename to ...
7277         (complete_expression): ... this and adjust to work with a
7278         completion_tracker instead of a VEC.  Use complete_files_symbols.
7279         (expression_completer): Reimplement on top of complete_expression.
7280         (symbol_completer): Adjust to work with a completion_tracker
7281         instead of a VEC.
7282         (enum complete_line_internal_reason): Add describing comments.
7283         (complete_line_internal_normal_command): Adjust to work with a
7284         completion_tracker instead of a VEC.
7285         (complete_line_internal): Rename to ...
7286         (complete_line_internal_1): ... this and adjust to work with a
7287         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
7288         handle_brkchars phase.
7289         (new_completion_tracker): Delete.
7290         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7291         complete_line_internal_1.
7292         (free_completion_tracker): Delete.
7293         (INITIAL_COMPLETION_HTAB_SIZE): New.
7294         (completion_tracker::completion_tracker)
7295         (completion_tracker::~completion_tracker): New.
7296         (maybe_add_completion): Delete.
7297         (completion_tracker::maybe_add_completion)
7298         (completion_tracker::add_completion)
7299         (completion_tracker::add_completions): New.
7300         (throw_max_completions_reached_error): Delete.
7301         (complete_line): Adjust to work with a completion_tracker instead
7302         of a VEC.  Don't create a completion_tracker_t or check for max
7303         completions here.
7304         (command_completer, command_completer_handle_brkchars)
7305         (signal_completer, reg_or_group_completer_1)
7306         (reg_or_group_completer, default_completer_handle_brkchars):
7307         Adjust to work with a completion_tracker.
7308         (gdb_completion_word_break_characters_throw): New.
7309         (gdb_completion_word_break_characters): Reimplement.
7310         (line_completion_function): Delete.
7311         (completion_tracker::recompute_lowest_common_denominator)
7312         (expand_preserving_ws)
7313         (completion_tracker::build_completion_result)
7314         (completion_result::completion_result)
7315         (completion_result::completion_result)
7316         (completion_result::~completion_result)
7317         (completion_result::completion_result)
7318         (completion_result::release_match_list, compare_cstrings)
7319         (completion_result::sort_match_list)
7320         (completion_result::reset_match_list)
7321         (gdb_rl_attempted_completion_function_throw)
7322         (gdb_rl_attempted_completion_function): New.
7323         * completer.h (completion_list, struct completion_result)
7324         (class completion_tracker): New.
7325         (complete_line): Add completion_tracker parameter.
7326         (readline_line_completion_function): Delete.
7327         (gdb_rl_attempted_completion_function): New.
7328         (noop_completer, filename_completer, expression_completer)
7329         (location_completer, symbol_completer, command_completer)
7330         (signal_completer, reg_or_group_completer): Update prototypes.
7331         (completion_tracker_t, new_completion_tracker)
7332         (make_cleanup_free_completion_tracker): Delete.
7333         (enum maybe_add_completion_enum): Delete.
7334         (maybe_add_completion): Delete.
7335         (throw_max_completions_reached_error): Delete.
7336         * corefile.c (complete_set_gnutarget): Adjust to work with a
7337         completion_tracker instead of a VEC.
7338         * cp-abi.c (cp_abi_completer): Adjust to work with a
7339         completion_tracker instead of a VEC.
7340         * d-lang.c (d_language_defn): Adjust.
7341         * disasm.c (disassembler_options_completer): Adjust to work with a
7342         completion_tracker instead of a VEC.
7343         * f-lang.c (f_make_symbol_completion_list): Rename to ...
7344         (f_collect_symbol_completion_matches): ... this.  Adjust to work
7345         with a completion_tracker instead of a VEC.
7346         (f_language_defn): Adjust.
7347         * go-lang.c (go_language_defn): Adjust.
7348         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7349         Adjust to work with a completion_tracker instead of a VEC.
7350         * infrun.c (handle_completer): Likewise.
7351         * interps.c (interpreter_completer): Likewise.
7352         * interps.h (interpreter_completer): Likewise.
7353         * language.c (unknown_language_defn, auto_language_defn)
7354         (local_language_defn): Adjust.
7355         * language.h (language_defn::la_make_symbol_completion_list):
7356         Rename to ...
7357         (language_defn::la_collect_symbol_completion_matches): ... this
7358         and adjust to work with a completion_tracker instead of a VEC.
7359         * m2-lang.c (m2_language_defn): Adjust.
7360         * objc-lang.c (objc_language_defn): Adjust.
7361         * opencl-lang.c (opencl_language_defn): Adjust.
7362         * p-lang.c (pascal_language_defn): Adjust.
7363         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7364         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7365         with a completion_tracker.
7366         * rust-lang.c (rust_language_defn): Adjust.
7367         * symtab.c (free_completion_list, do_free_completion_list)
7368         (return_val, completion_tracker): Delete.
7369         (completion_list_add_name, completion_list_add_symbol)
7370         (completion_list_add_msymbol, completion_list_objc_symbol)
7371         (completion_list_add_fields, add_symtab_completions): Add
7372         completion_tracker parameter and use it.
7373         (default_make_symbol_completion_list_break_on_1): Rename to...
7374         (default_collect_symbol_completion_matches_break_on): ... this.
7375         Add completion_tracker parameter and use it instead of allocating
7376         a completion tracker here.
7377         (default_make_symbol_completion_list_break_on): Delete old
7378         implementation.
7379         (default_make_symbol_completion_list): Delete.
7380         (default_collect_symbol_completion_matches): New.
7381         (make_symbol_completion_list): Delete.
7382         (collect_symbol_completion_matches): New.
7383         (make_symbol_completion_type): Rename to ...
7384         (collect_symbol_completion_matches_type): ... this.  Add
7385         completion_tracker parameter and use it instead of VEC.
7386         (make_file_symbol_completion_list_1): Rename to...
7387         (collect_file_symbol_completion_matches): ... this.  Add
7388         completion_tracker parameter and use it instead of VEC.
7389         (make_file_symbol_completion_list): Delete.
7390         (add_filename_to_list): Use completion_list instead of a VEC.
7391         (add_partial_filename_data::list): Now a completion_list.
7392         (make_source_files_completion_list): Work with a completion_list
7393         instead of a VEC.
7394         * symtab.h: Include "completer.h".
7395         (default_make_symbol_completion_list_break_on)
7396         (default_make_symbol_completion_list, make_symbol_completion_list)
7397         (make_symbol_completion_type, make_file_symbol_completion_list)
7398         (make_source_files_completion_list): Delete.
7399         (default_collect_symbol_completion_matches_break_on)
7400         (default_collect_symbol_completion_matches)
7401         (collect_symbol_completion_matches)
7402         (collect_symbol_completion_matches_type)
7403         (collect_file_symbol_completion_matches)
7404         (make_source_files_completion_list): New.
7405         * top.c (init_main): Don't install a rl_completion_entry_function
7406         hook.  Install a rl_attempted_completion_function hook instead.
7407         * tui/tui-layout.c (layout_completer): Adjust to work with a
7408         completion_tracker.
7409         * tui/tui-regs.c (tui_reggroup_completer):
7410         * tui/tui-win.c (window_name_completer, focus_completer)
7411         (winheight_completer): Adjust to work with a completion_tracker.
7412         * value.c: Include "completer.h".
7413         (complete_internalvar): Adjust to work with a completion_tracker.
7414         * value.h (complete_internalvar): Likewise.
7415
7416 2017-07-17  Pedro Alves  <palves@redhat.com>
7417
7418         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7419         renames.
7420         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7421         comments to completer_ftype's declaration.
7422         <completer_handle_brkchars>: Change type to
7423         completer_handle_brkchars_ftype.
7424         * command.h (completer_ftype): Add describing comment and give
7425         names to parameters.
7426         (completer_ftype_void): Rename to ...
7427         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
7428         (set_cmd_completer_handle_brkchars): Adjust.
7429         * completer.c (filename_completer_handle_brkchars): New function.
7430         (complete_line_internal_normal_command): New function, factored
7431         out from ...
7432         (complete_line_internal): ... here.
7433         (command_completer_handle_brkchars)
7434         (default_completer_handle_brkchars)
7435         (completer_handle_brkchars_func_for_completer): New functions.
7436         * completer.h (set_gdb_completion_word_break_characters): Delete
7437         declaration.
7438         (completer_handle_brkchars_func_for_completer): New declaration.
7439         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7440         completer_handle_brkchars_func_for_completer.
7441
7442 2017-07-17  Pedro Alves  <palves@redhat.com>
7443
7444         * completer.c (symbol_completer): New function, based on
7445         make_symbol_completion_list_fn.
7446         * completer.h (symbol_completer): New declaration.
7447         * guile/scm-cmd.c (cmdscm_completers): Adjust.
7448         * python/py-cmd.c (completers): Adjust.
7449         * symtab.c (make_symbol_completion_list_fn): Delete.
7450         * symtab.h (make_symbol_completion_list_fn): Delete.
7451         * cli/cli-decode.c (add_cmd): Adjust.
7452
7453 2017-07-17  Pedro Alves  <palves@redhat.com>
7454
7455         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7456         * dwarf2read.c: Include "filename-seen-cache.h".
7457         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7458         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7459         * filename-seen-cache.c: New file.
7460         * filename-seen-cache.h: New file.
7461         * symtab.c: Include "filename-seen-cache.h".
7462         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7463         (create_filename_seen_cache, clear_filename_seen_cache)
7464         (delete_filename_seen_cache, filename_seen): Delete, parts moved
7465         to filename-seen-cache.h/filename-seen-cache.c.
7466         (output_source_filename, sources_info)
7467         (maybe_add_partial_symtab_filename)
7468         (make_source_files_completion_list): Adjust to use
7469         filename_seen_cache.
7470
7471 2017-07-17  Pedro Alves  <palves@redhat.com>
7472
7473         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7474         fields.
7475         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7476         dwarf2_debug_sections*)): New.
7477         (dwarf2_per_objfile::dwarf2_per_objfile(const
7478         dwarf2_per_objfile&)): Declare as deleted.
7479         (dwarf2_per_objfile::operator=): Declare as deleted.
7480         (dwarf2_per_objfile::dwarf2_per_objfile)
7481         (dwarf2_per_objfile::~dwarf2_per_objfile)
7482         (dwarf2_per_objfile::free_cached_comp_units): New.
7483         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7484         ctor.  Call dwarf2_per_objfile's ctor manually.
7485         (dwarf2_locate_sections): Deleted/refactored as ...
7486         (dwarf2_per_objfile::locate_sections): ... this new method.
7487         (free_cached_comp_units): Defer to
7488         dwarf2_per_objfile::free_cached_comp_units.
7489         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7490
7491 2017-07-14  Tom Tromey  <tom@tromey.com>
7492
7493         PR rust/21764:
7494         * rust-exp.y (convert_ast_to_expression): Add "want_type"
7495         parameter.
7496         <UNOP_SIZEOF>: Split into separate case.
7497         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
7498
7499 2017-07-14  Tom Tromey  <tom@tromey.com>
7500
7501         PR rust/21763:
7502         * symtab.c (symbol_matches_domain): Add language_rust to special
7503         case.
7504         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7505         treat LOC_TYPEDEF symbols as variables.
7506
7507 2017-07-14  Pedro Alves  <palves@redhat.com>
7508
7509         * symtab.c (make_file_symbol_completion_list_1): Iterate over
7510         symtabs matching all symtabs with SRCFILE as file name instead of
7511         only considering the first hit, with lookup_symtab.
7512
7513 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7514
7515         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7516         operator_name parameters.
7517         (gen_expr): Update function call.
7518
7519 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7520
7521         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7522         parameter.
7523         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7524         Likewise.
7525         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7526         parameter, use agent_expr::gdbarch instead, update function
7527         calls.
7528         (locexpr_tracepoint_var_ref): Likewise.
7529         (loclist_tracepoint_var_ref): Likewise.
7530         * ax-gdb.c (gen_trace_static_fields): Likewise.
7531         (gen_traced_pop): Likewise.
7532         (gen_frame_args_address): Likewise.
7533         (gen_frame_locals_address): Likewise.
7534         (gen_var_ref): Likewise.
7535         (gen_struct_ref_recursive): Likewise.
7536         (gen_static_field): Likewise.
7537         (gen_maybe_namespace_elt): Likewise.
7538         (gen_expr): Likewise.
7539         (gen_trace_for_var): Likewise.
7540         (gen_trace_for_expr): Likewise.
7541         (gen_trace_for_return_address): Likewise.
7542
7543 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7544
7545         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7546         parameter.
7547         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7548
7549 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
7550
7551         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7552         from ax, update calls.
7553         (gen_usual_arithmetic): Likewise.
7554         (gen_integral_promotions): Likewise.
7555         (gen_bitfield_ref): Likewise.
7556         (gen_primitive_field): Likewise.
7557         (gen_struct_ref_recursive): Likewise.
7558         (gen_struct_ref): Likewise.
7559         (gen_maybe_namespace_elt): Likewise.
7560         (gen_struct_elt_for_reference): Likewise.
7561         (gen_namespace_elt): Likewise.
7562         (gen_aggregate_elt_ref): Likewise.
7563         (gen_expr): Get gdbarch from ax, update calls.
7564         (gen_expr_binop_rest): Likewise.
7565
7566 2017-07-13  Pedro Alves  <palves@redhat.com>
7567
7568         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7569         as default tdesc.
7570         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7571         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7572         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7573         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
7574         tdep.
7575         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7576         Get final tdesc from the tdep.
7577         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7578         default tdesc.
7579         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7580         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7581         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7582         Use it as default tdesc.
7583         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7584         down to amd_init_abi.  No longer handle fallback tdesc here.
7585         * amd64-tdep.h (tdesc_x32): Declare.
7586         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7587         parameter.
7588         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7589         as default tdesc.
7590
7591 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7592
7593         * s390-linux-tdep.c (s390_process_record): Add support for
7594         instructions new in arch12.
7595
7596 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7597
7598         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7599         PT_GETFSBASE and PT_GETGSBASE.
7600         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7601         PT_SETGSBASE.
7602
7603 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
7604
7605         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7606         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7607         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7608         those rules.
7609         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7610         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7611         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7612         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7613         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7614         * features/i386/amd64.xml: Add 64bit-segments.xml.
7615         * features/i386/amd64-avx-avx512.c: Regenerated.
7616         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7617         * features/i386/amd64-avx-mpx.c: Regenerated.
7618         * features/i386/amd64-avx.c: Regenerated.
7619         * features/i386/amd64-mpx.c: Regenerated.
7620         * features/i386/amd64.c: Regenerated.
7621         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7622         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7623         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7624         * regformats/i386/amd64-avx.dat: Regenerated.
7625         * regformats/i386/amd64-mpx.dat: Regenerated.
7626         * regformats/i386/amd64.dat: Regenerated.
7627
7628 2017-07-10  Yao Qi  <yao.qi@linaro.org>
7629
7630         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7631         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7632
7633 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
7634
7635         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7636         unsetenv.
7637         * gnulib/aclocal.m4: Regenerate.
7638         * gnulib/config.in: Regenerate.
7639         * gnulib/configure: Regenerate.
7640         * gnulib/import/Makefile.am: Regenerate.
7641         * gnulib/import/Makefile.in: Regenerate.
7642         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7643         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7644         * gnulib/import/m4/environ.m4: New file.
7645         * gnulib/import/m4/setenv.m4: New file.
7646         * gnulib/import/setenv.c: New file.
7647         * gnulib/import/unsetenv.c: New file.
7648
7649 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
7650
7651         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7652         address when op is DW_OP_addr.
7653
7654 2017-07-09  Tom Tromey  <tom@tromey.com>
7655
7656         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7657         check and apply to outer type.
7658
7659 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7660
7661         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7662         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7663         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7664         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7665
7666 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7667
7668         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7669
7670 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7671
7672         * corelow.c (get_core_siginfo): Remove.
7673         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7674         instead of get_core_siginfo.
7675         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7676         * gdbarch.h: Re-generate.
7677         * gdbarch.c: Re-generate.
7678         * linux-tdep.c (linux_core_xfer_siginfo): New.
7679         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7680
7681 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7682
7683         * corelow.c (thread_section_name): Move to ...
7684         * gdbcore.h (thread_section_name): ... here.
7685
7686 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7687
7688         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7689         (struct siginfo32): New.
7690         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7691         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7692         via ptrace(PT_LWPINFO).
7693
7694 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
7695
7696         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7697         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7698         (fbsd_get_siginfo_type): New.
7699         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7700         (_initialize_fbsd_tdep): New.
7701
7702 2017-07-06  David Blaikie  <dblaikie@gmail.com>
7703
7704         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7705         a singular dwo_unit*) to support multiple CUs in the same way that
7706         multiple TUs are supported.
7707         (create_cus_hash_table): Replace create_dwo_cu with a function for
7708         parsing multiple CUs from a DWO file.
7709         (open_and_init_dwo_file): Use create_cus_hash_table rather than
7710         create_dwo_cu.
7711         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7712         htab_find, rather than comparing the signature to a singleton CU in
7713         the dwo_file.
7714
7715 2017-07-06  Pedro Alves  <palves@redhat.com>
7716
7717         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7718
7719 2017-07-04  Pedro Alves  <palves@redhat.com>
7720
7721         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7722         * gdbtypes.h (TYPE_STATIC): Delete.
7723         (struct fn_field) <is_public, is_abstract, is_static, is_final,
7724         is_synchronized, is_native>: Delete.
7725         <dummy>: Bump.
7726         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7727         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7728         (TYPE_FN_FIELD_ABSTRACT): Delete.
7729
7730 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
7731
7732         * buffer.h (buffer_finish): Fix spelling mistakes.
7733
7734 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
7735
7736         * .dir-locals.el: Automatically switch to C-style comments in
7737         versions of Emacs that support the feature.
7738
7739 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7740             Pedro Alves  <palves@redhat.com>
7741
7742         PR cli/21688
7743         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7744         (process_next_line): New variable 'inline_cmd'.
7745         Adjust 'if' clauses for "python", "compile" and "guile" to use
7746         'command_name_equals' and check for '!inline_cmd'.
7747
7748 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
7749
7750         PR cli/21688
7751         * cli/cli-script.c (command_name_equals_not_inline): New function.
7752         (process_next_line): Adjust 'if' clauses for "python", "compile"
7753         and "guile" to use command_name_equals_not_inline.
7754
7755 2017-06-29  Pedro Alves  <palves@redhat.com>
7756
7757         * completer.c (expression_completer): Call
7758         linespec_location_completer instead of location_completer.
7759
7760 2017-06-29  Pedro Alves  <palves@redhat.com>
7761
7762         * completer.c (expression_completer): Remove code that recomputes
7763         'text' from 'word'.
7764
7765 2017-06-29  Yao Qi  <yao.qi@linaro.org>
7766
7767         * regformats/regdat.sh: Generate code with
7768         "ifndef IN_PROCESS_AGENT".
7769
7770 2017-06-28  Pedro Alves  <palves@redhat.com>
7771
7772         * command.h: Include "common/scoped_restore.h".
7773
7774 2017-06-28  Yao Qi  <yao.qi@linaro.org>
7775
7776         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7777         instead of obstack_grow.
7778
7779 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
7780
7781         PR gdb/21337
7782         * symfile.c (reread_symbols): Call objfiles_changed just before
7783         read_symbols.
7784
7785 2017-06-27  Pedro Alves  <palves@redhat.com>
7786
7787         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7788         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7789         (completion_list_add_symbol, completion_list_add_msymbol):
7790         ... these new functions.
7791         (add_symtab_completions)
7792         (default_make_symbol_completion_list_break_on_1): Adjust.
7793
7794 2017-06-27  Pedro Alves  <palves@redhat.com>
7795
7796         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7797         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
7798         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7799         dtor.
7800         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
7801         'storage_obstack' field an auto_obstack.  In-class initialize all
7802         non-bitfield fields.  Make minsyms_read bool.
7803         * symfile.c (read_symbols): Adjust.
7804
7805 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
7806
7807         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7808         (gdbsim_store_register): Likewise.
7809
7810 2017-06-27  Pedro Alves  <palves@redhat.com>
7811
7812         * c-exp.y (name_obstack): Now an auto_obstack.
7813         (yylex): Use auto_obstack::clear.
7814         (c_parse): Use auto_obstack::clear instead of reinitializing and
7815         freeing the obstack.
7816         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7817         * d-exp.y (name_obstack): Now an auto_obstack.
7818         (yylex): Use auto_obstack::clear.
7819         (d_parse): Use auto_obstack::clear instead of reinitializing and
7820         freeing the obstack.
7821         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7822         auto_obstack.
7823         * dwarf2read.c (create_addrmap_from_index)
7824         (dwarf2_build_psymtabs_hard)
7825         (update_enumeration_type_from_children): Likewise.
7826         * gdb_obstack.h (auto_obstack): New type.
7827         * go-exp.y (name_obstack): Now an auto_obstack.
7828         (build_packaged_name): Use auto_obstack::clear.
7829         (go_parse): Use auto_obstack::clear instead of reinitializing and
7830         freeing the obstack.
7831         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7832         auto_obstack.
7833         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7834         * rust-exp.y (work_obstack): Now an auto_obstack.
7835         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7836         reinitializing and freeing the obstack.
7837         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7838         (host_char_to_target): Use auto_obstack.
7839         * utils.h (make_cleanup_obstack_free): Delete declaration.
7840         * valprint.c (generic_emit_char, generic_printstr): Use
7841         auto_obstack.
7842
7843 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
7844
7845         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7846         thread.
7847         (darwin_init_thread_list): Don't update dummy thread.
7848         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7849
7850 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7851
7852         * record-full.c (netorder16): Remove.
7853
7854 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7855
7856         * common/diagnostics.h: Define macros for GCC.
7857         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7858         * common/vec.h: Include diagnostics.h.
7859         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7860         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7861         warning.
7862
7863 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
7864
7865         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7866         New macro.
7867         * ada-lex.l: Ignore deprecated register warnings.
7868
7869 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7870
7871         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7872         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7873
7874 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7875
7876         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7877         its own line.
7878
7879 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
7880
7881         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7882
7883 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
7884
7885         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7886         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7887         (xtensa_register_read_masked): Likewise.
7888
7889 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7890
7891         * common/environ.c (gdb_environ::unset): Update comment.
7892
7893 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7894
7895         * python/py-unwind.c (pyuw_sniffer): Allocate space for
7896         registers.
7897
7898 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7899
7900         * record-full.c (record_full_exec_insn): Use byte_vector.
7901
7902 2017-06-22  Yao Qi  <yao.qi@linaro.org>
7903
7904         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7905         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7906
7907 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
7908
7909         * remote.c (cached_reg): Move from here...
7910         * regcache.h (cached_reg): ...to here.
7911         * python/py-unwind.c (struct reg_info): Remove.
7912         (cached_frame_info): Use cached_reg_t.
7913         (pyuw_prev_register): Likewise.
7914         (pyuw_sniffer): Use cached_reg_t and allocate registers.
7915         (pyuw_dealloc_cache): Free all registers.
7916
7917 2017-06-22  Pedro Alves  <palves@redhat.com>
7918             Simon Marchi  <simon.marchi@ericsson.com>
7919
7920         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7921         warning.
7922         * common/diagnostics.h: New file.
7923
7924 2017-06-22  Pedro Alves  <palves@redhat.com>
7925
7926         * common/agent.h: Add include guards.
7927
7928 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
7929
7930         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7931         talk about addressable units instead of bytes.
7932
7933 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7934
7935         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7936         of '::const_iterator'.
7937
7938 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
7939
7940         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7941         'unittests/environ-selftests.c'.
7942         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7943         * charset.c (find_charset_names): Declare object 'iconv_env'.
7944         Update code to use 'iconv_env' object.  Remove call to
7945         'free_environ'.
7946         * common/environ.c: Include <utility>.
7947         (make_environ): Delete function.
7948         (free_environ): Delete function.
7949         (gdb_environ::clear): New function.
7950         (gdb_environ::operator=): New function.
7951         (gdb_environ::get): Likewise.
7952         (environ_vector): Delete function.
7953         (set_in_environ): Delete function.
7954         (gdb_environ::set): New function.
7955         (unset_in_environ): Delete function.
7956         (gdb_environ::unset): New function.
7957         (gdb_environ::envp): Likewise.
7958         * common/environ.h: Include <vector>.
7959         (struct gdb_environ): Delete; transform into...
7960         (class gdb_environ): ... this class.
7961         (free_environ): Delete prototype.
7962         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7963         environ_vector): Likewise.
7964         * infcmd.c (run_command_1): Update code to call
7965         'envp' from 'gdb_environ' class.
7966         (environment_info): Update code to call methods from 'gdb_environ'
7967         class.
7968         (unset_environment_command): Likewise.
7969         (path_info): Likewise.
7970         (path_command): Likewise.
7971         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7972         (inferior::inferior): Initialize 'environment' using the host's
7973         information.
7974         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7975         Include "environ.h".
7976         (class inferior) <environment>: Change type from 'struct
7977         gdb_environ' to 'gdb_environ'.
7978         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7979         methods from 'gdb_environ' class.
7980         * solib.c (solib_find_1): Likewise
7981         * unittests/environ-selftests.c: New file.
7982
7983 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7984
7985         * features/i386/i386-linux.xml: Exchange the order of including
7986         32bit-linux.xml and 32bit-sse.xml.
7987         * features/i386/i386-linux.c: Regenerated.
7988
7989 2017-06-20  Yao Qi  <yao.qi@linaro.org>
7990
7991         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7992         Delete copy ctor and assignment operator.
7993         (tdesc_type): Likewise.
7994         (tdesc_feature): Likewise.
7995         (tdesc_free_reg): Remove.
7996         (tdesc_create_reg): Use new.
7997         (tdesc_free_type): Remove.
7998         (tdesc_create_vector): Use new.
7999         (tdesc_create_union): Likewise.
8000         (tdesc_create_flags): Likewise.
8001         (tdesc_create_enum): Likewise.
8002         (tdesc_free_feature): Delete.
8003         (free_target_description): Use delete.
8004
8005 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
8006
8007         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
8008         registers.
8009
8010 2017-06-19  Pedro Alves  <palves@redhat.com>
8011
8012         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
8013         after gdb::unlinker.
8014
8015 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
8016
8017         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
8018         gdb_environ to access an environment variable.
8019
8020 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
8021
8022         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
8023         gdb_byte*.
8024
8025 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8026
8027         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
8028
8029 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8030
8031         * configure: Re-generate.
8032         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
8033
8034 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8035
8036         * configure: Re-generate.
8037         * warning.m4: Pass -Werror to compiler when checking for
8038         supported warning flags.
8039
8040 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
8041
8042         * Makefile.in (COMPILE.pre): Add "-x c++".
8043
8044 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
8045             Pedro Alves  <palves@redhat.com>
8046             Yao Qi  <yao.qi@linaro.org>
8047
8048         * defs.h (RequireLongest): New.
8049         (extract_integer): Declare function template.
8050         (extract_signed_integer): Remove the declaration, but define it
8051         static inline.
8052         (extract_unsigned_integer): Likewise.
8053         (store_integer): Declare function template.
8054         (store_signed_integer): Remove the declaration, but define it
8055         static inline.
8056         (store_unsigned_integer): Likewise.
8057         * findvar.c (extract_integer): New function template.
8058         (extract_signed_integer): Remove.
8059         (extract_unsigned_integer): Remove.
8060         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
8061         instantiations.
8062         (store_integer): New function template.
8063         (store_signed_integer): Remove.
8064         (store_unsigned_integer): Remove.
8065         (store_integer): Explicit instantiations.
8066         * regcache.c (regcache_raw_read_signed): Update.
8067         (regcache::raw_read): New function.
8068         (regcache::raw_read_signed): Remove.
8069         (regcache::raw_read_unsigned): Remove.
8070         (regcache_raw_read_unsigned): Update.
8071         (regcache_raw_write_unsigned): Update.
8072         (regcache::raw_write_signed): Remove.
8073         (regcache::raw_write): New function.
8074         (regcache_cooked_read_signed): Update.
8075         (regcache::raw_write_unsigned): Remove.
8076         (regcache::cooked_read_signed): Remove.
8077         (regcache_cooked_read_unsigned): Update.
8078         (regcache::cooked_read_unsigned): Remove.
8079         (regcache_cooked_write_signed): Update.
8080         (regcache_cooked_write_unsigned): Update.
8081         * regcache.h (regcache) <raw_read_signed>: Remove.
8082         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
8083         <raw_read, raw_write>: New.
8084         <cooked_read_signed, cooked_write_signed>: Remove.
8085         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
8086         <cooked_read, cooked_write>: New.
8087         * sh64-tdep.c (sh64_pseudo_register_read): Update.
8088         (sh64_pseudo_register_write): Update.
8089
8090 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
8091
8092         * arc-tdep.c (arc_disassembler_options): New variable.
8093         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
8094         of default_print_insn.
8095         (arc_delayed_print_insn): Set info->section when needed,
8096         use default_print_insn to retrieve a disassembler.
8097
8098 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
8099
8100         PR gdb/21574
8101         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
8102         to mention $SHELL and startup-with-shell.
8103
8104 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
8105
8106         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
8107
8108 2017-06-14  Yao Qi  <yao.qi@linaro.org>
8109
8110         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
8111         default_print_insn instead of print_insn_aarch64.
8112         * arm-tdep.c (gdb_print_insn_arm): Call
8113         default_print_insn instead of print_insn_big_arm
8114         and print_insn_little_arm.
8115         * i386-tdep.c (i386_print_insn): Call default_print_insn
8116         instead of print_insn_i386.
8117         * ia64-tdep.c (ia64_print_insn): Call
8118         default_print_insn instead of print_insn_ia64.
8119         * mips-tdep.c (gdb_print_insn_mips): Call
8120         default_print_insn instead of print_insn_big_mips
8121         and print_insn_little_mips.
8122         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
8123         instead of print_insn_spu.
8124
8125 2017-06-14  Pedro Alves  <palves@redhat.com>
8126
8127         * ada-lang.c: Include "common/byte-vector.h".
8128         (ada_value_primitive_packed_val): Use gdb::byte_vector.
8129         * charset.c (wchar_iterator::iterate): Resize the vector instead
8130         of reserving it.
8131         * common/byte-vector.h: Include "common/def-vector.h".
8132         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
8133         * cli/cli-dump.c: Include "common/byte-vector.h".
8134         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
8135         * common/byte-vector.h: New file.
8136         * common/def-vector.h: New file.
8137         * common/default-init-alloc.h: New file.
8138         * dwarf2loc.c: Include "common/byte-vector.h".
8139         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
8140         instead of reserving it.
8141         * dwarf2read.c: Include "common/byte-vector.h".
8142         (data_buf::m_vec): Now a gdb::byte_vector.
8143         * gdb_regex.c: Include "common/def-vector.h".
8144         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
8145         * mi/mi-main.c: Include "common/byte-vector.h".
8146         (mi_cmd_data_read_memory): Use gdb::byte_vector.
8147         * printcmd.c: Include "common/byte-vector.h".
8148         (print_scalar_formatted): Use gdb::byte_vector.
8149         * valprint.c: Include "common/byte-vector.h".
8150         (maybe_negate_by_bytes, print_decimal_chars): Use
8151         gdb::byte_vector.
8152
8153 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8154
8155         * darwin-nat.c: Include "nat/fork-inferior.h".
8156
8157 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8158
8159         * configure.nat: Factor out Darwin bits that are not
8160         architecture-specific.  Add fork-inferior.o.
8161
8162 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
8163
8164         * configure.nat: Factor out AIX bits that are not
8165         architecture-specific.  Add fork-inferior.o.
8166
8167 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8168
8169         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
8170         (read_pieced_value, write_pieced_value): ...here.  Reduce to
8171         wrappers that just call rw_pieced_value.
8172
8173 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8174
8175         * dwarf2loc.c (write_pieced_value): When writing the data for a
8176         memory piece, use write_memory_with_notification instead of
8177         write_memory.
8178
8179 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8180
8181         * valops.c (read_value_memory): Change embedded_offset to
8182         represent a bit offset instead of a byte offset.
8183         * value.h (read_value_memory): Adjust comment.
8184
8185 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8186
8187         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
8188         dest_offset_bits and source_offset_bits.
8189         (write_pieced_value): Likewise.
8190
8191 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8192
8193         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
8194         given by DW_OP_bit_piece.
8195         (write_pieced_value): Likewise.
8196
8197 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8198
8199         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8200         some other preparations to the places where sufficient information
8201         is available.
8202         (write_pieced_value): Likewise.
8203
8204 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8205
8206         * dwarf2loc.c (bits_to_bytes): New function.
8207         (read_pieced_value): Fix offset calculations for register pieces
8208         on big-endian targets.
8209         (write_pieced_value): Likewise.
8210
8211 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8212
8213         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8214         (write_pieced_value): Likewise.
8215
8216 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8217
8218         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8219         transfer the source value's least significant bits, instead of its
8220         lowest-addressed ones.  Rename type_len to max_offset.
8221         (read_pieced_value): Mirror above changes to write_pieced_value as
8222         applicable.
8223
8224 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8225
8226         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8227         truncate full bytes from dest_offset_bits before using it as an
8228         offset into the buffer.
8229
8230 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8231
8232         * dwarf2loc.c (write_pieced_value): Include transfer size in
8233         byte-wise check.
8234
8235 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8236
8237         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8238         calculation of this_size.
8239
8240 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8241
8242         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8243         when targeting a bit-field.
8244         (write_pieced_value): Likewise.
8245
8246 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8247
8248         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8249         (allocate_piece_closure): Drop addr_size parameter.
8250         (dwarf2_evaluate_loc_desc_full): Adjust call to
8251         allocate_piece_closure.
8252
8253 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8254
8255         PR gdb/21226
8256         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8257         the LSB end, independent of endianness.
8258
8259 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8260
8261         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8262         size capping.
8263
8264 2017-06-13  Yao Qi  <yao.qi@linaro.org>
8265
8266         * mips-linux-nat.c: Move include features/mips*-linux.c to
8267         mips-linux-tdep.c.
8268         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8269         to mips-linux-tdep.c.
8270         * mips-linux-tdep.c: Include features/mips*-linux.c
8271         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8272         functions.
8273         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8274         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8275         (tdesc_mips64_dsp_linux): Declare.
8276
8277 2017-06-12  Tom Tromey  <tom@tromey.com>
8278
8279         * valprint.h (val_print_type_code_int): Remove.
8280         * valprint.c (generic_val_print_int): Always call
8281         val_print_scalar_formatted.
8282         (val_print_type_code_int): Remove.
8283         * printcmd.c (print_scalar_formatted): Handle options->format==0.
8284         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8285         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8286         * ada-valprint.c (ada_val_print_num): Use
8287         val_print_scalar_formatted.
8288
8289 2017-06-12  Tom Tromey  <tom@tromey.com>
8290
8291         * printcmd.c (print_scalar_formatted): Unify the two switches.
8292         Don't convert scalars to LONGEST.
8293
8294 2017-06-12  Tom Tromey  <tom@tromey.com>
8295
8296         PR exp/16225:
8297         * valprint.h (print_decimal_chars): Update.
8298         * valprint.c (maybe_negate_by_bytes): New function.
8299         (print_decimal_chars): Add "is_signed" argument.
8300         * printcmd.c (print_scalar_formatted): Update.
8301
8302 2017-06-12  Tom Tromey  <tom@tromey.com>
8303
8304         PR exp/16225:
8305         * valprint.h (print_binary_chars, print_hex_chars): Update.
8306         * valprint.c (val_print_type_code_int): Update.
8307         (print_binary_chars): Add "zero_pad" argument.
8308         (emit_octal_digit): New function.
8309         (print_octal_chars): Don't zero-pad.
8310         (print_decimal_chars): Likewise.
8311         (print_hex_chars): Add "zero_pad" argument.
8312         * sh64-tdep.c (sh64_do_fp_register): Update.
8313         * regcache.c (regcache::dump): Update.
8314         * printcmd.c (print_scalar_formatted): Update.
8315         * infcmd.c (default_print_one_register_info): Update.
8316
8317 2017-06-12  Pedro Alves  <palves@redhat.com>
8318             Alan Hayward  <alan.hayward@arm.com>
8319
8320         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8321         (mips_eabi_push_dummy_call): Rename local 'regsize' to
8322         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
8323         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8324         Assert that abi_regsize bytes fit in 'ref_valbuf'.
8325
8326 2017-06-12  Pedro Alves  <palves@redhat.com>
8327
8328         * dwarf2read.c (mapped_symtab::data): Now a vector of
8329         symtab_index_entry instead of vector of
8330         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
8331         whether an element's name is NULL instead of checking whether the
8332         element itself is NULL.
8333         (find_slot): Change return type.  Adjust.
8334         (hash_expand, , add_index_entry, uniquify_cu_indices)
8335         (write_hash_table): Adjust.
8336
8337 2017-06-12  Pedro Alves  <palves@redhat.com>
8338
8339         * dwarf2read.c (recursively_count_psymbols): New function.
8340         (write_psymtabs_to_index): Call it to compute number of psyms and
8341         pass estimate size of psyms_seen to unordered_set's ctor.
8342
8343 2017-06-12  Pedro Alves  <palves@redhat.com>
8344
8345         * dwarf2read.c (write_hash_table): Check if key already exists
8346         before emplacing.
8347
8348 2017-06-12  Pedro Alves  <palves@redhat.com>
8349
8350         * dwarf2read.c (data_buf::append_space): Rename to...
8351         (data_buf::grow): ... this, and make private.  Adjust all callers.
8352         (data_buf::append_uint): New method.
8353         (add_address_entry, write_one_signatured_type)
8354         (write_psymtabs_to_index): Use it.
8355
8356 2017-06-12  Pedro Alves  <palves@redhat.com>
8357
8358         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8359         (file_write (FILE *, const std::vector<Elem>&)): Delete.
8360         (data_buf::file_write): Call ::fwrite directly.
8361
8362 2017-06-12  Pedro Alves  <palves@redhat.com>
8363
8364         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8365         std::vector::erase.
8366
8367 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
8368
8369         Code cleanup: C++ify .gdb_index producer.
8370         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8371         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8372         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8373         (create_strtab, add_string): Remove.
8374         (file_write, data_buf): New.
8375         (struct symtab_index_entry): Use std::vector for cu_indices.
8376         (struct mapped_symtab): Use std::vector for data.
8377         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8378         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8379         Remove.
8380         (find_slot): Change return type.  Update it to the new data structures.
8381         (hash_expand, add_index_entry): Update it to the new data structures.
8382         (offset_type_compare): Remove.
8383         (uniquify_cu_indices): Update it to the new data structures.
8384         (c_str_view, c_str_view_hasher, vector_hasher): New.
8385         (add_indices_to_cpool): Remove.
8386         (write_hash_table): Update it to the new data structures.
8387         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8388         (eq_psymtab_cu_index): Remove.
8389         (psym_index_map): New typedef.
8390         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8391         reference and std::unordered_map for cu_index_htab.
8392         (add_address_entry, add_address_entry_worker, write_address_map)
8393         (write_psymbols): Update it to the new data structures.
8394         (write_obstack): Remove.
8395         (struct signatured_type_index_data): Change types_list to a data_buf
8396         reference and psyms_seen to a std::unordered_set reference.
8397         (write_one_signatured_type, recursively_write_psymbols)
8398         (write_psymtabs_to_index): Update it to the new data structures.
8399
8400 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
8401
8402         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8403         separate-debug-file commands.
8404         * symfile.h (separate_debug_file_debug): New global.
8405         * symfile.c (separate_debug_file_debug): New global.
8406         (separate_debug_file_exists, find_separate_debug_file): Add
8407         debug output.
8408         (_initialize_symfile): Add "set debug separate-debug-file"
8409         command.
8410         * build-id.c (build_id_to_debug_bfd,
8411         find_separate_debug_file_by_buildid): Add debug output.
8412
8413 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
8414
8415         * gdbarch.sh (displaced_step_free_closure): Remove.
8416         * gdbarch.h, gdbarch.c: Re-generate.
8417         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8418         displaced_step_free_closure.
8419         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8420         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8421         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8422         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8423         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8424         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8425         * arch-utils.h (simple_displaced_step_free_closure): Remove.
8426         * arch-utils.c (simple_displaced_step_free_closure): Remove.
8427         * infrun.c (displaced_step_clear): Call xfree instead of
8428         gdbarch_displaced_step_free_closure.
8429
8430 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
8431
8432         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8433         NULL".
8434
8435 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
8436
8437         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8438         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8439         (mn10300_push_dummy_call): Likewise.
8440
8441 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8442
8443         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8444
8445 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
8446
8447         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8448
8449 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8450
8451         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8452         able to start inferiors using a shell.
8453         (New remote packets): Announce new packet "QStartupWithShell".
8454         * remote.c: Add PACKET_QStartupWithShell.
8455         (extended_remote_create_inferior): Handle new
8456         PACKET_QStartupWithShell.
8457         (remote_protocol_features) <QStartupWithShell>: New entry for
8458         PACKET_QStartupWithShell.
8459         (_initialize_remote): Call "add_packet_config_cmd" for
8460         QStartupShell.
8461
8462 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8463             Pedro Alves  <palves@redhat.com>
8464
8465         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8466         and "nat/fork-inferior.h".
8467         * common/common-inferior.h: New file, with contents from
8468         "gdb/inferior.h".
8469         * commom/common-utils.c: Include "common-utils.h".
8470         (stringify_argv): New function.
8471         * common/common-utils.h (stringify_argv): New prototype.
8472         * configure.nat: Add "fork-inferior.o" as a dependency for
8473         "*linux*", "fbsd*" and "nbsd*" hosts.
8474         * corefile.c (get_exec_file): Update comment.
8475         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8476         instead of "startup_inferior".
8477         (darwin_create_inferior): Call "add_thread_silent" after
8478         "fork_inferior".
8479         * fork-child.c: Cleanup unnecessary includes.
8480         (SHELL_FILE): Move to "common/common-fork-child.c".
8481         (environ): Likewise.
8482         (exec_wrapper): Initialize.
8483         (get_exec_wrapper): New function.
8484         (breakup_args): Move to "common/common-fork-child.c"; rename to
8485         "breakup_args_for_exec".
8486         (escape_bang_in_quoted_argument): Move to
8487         "common/common-fork-child.c".
8488         (saved_ui): New variable.
8489         (prefork_hook): New function.
8490         (postfork_hook): Likewise.
8491         (postfork_child_hook): Likewise.
8492         (gdb_startup_inferior): Likewise.
8493         (fork_inferior): Move to "common/common-fork-child.c".  Update
8494         function to support gdbserver.
8495         (startup_inferior): Likewise.
8496         * gdbcore.h (get_exec_file): Remove declaration.
8497         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8498         instead of "startup_inferior".  Call "add_thread_silent" after
8499         "fork_inferior".
8500         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8501         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8502         instead of "startup_inferior".  Call "add_thread_silent" after
8503         "fork_inferior".
8504         * inferior.h: Include "common-inferior.h".
8505         (trace_start_error): Move to "common/common-utils.h".
8506         (trace_start_error_with_name): Likewise.
8507         (fork_inferior): Move prototype to "nat/fork-inferior.h".
8508         (startup_inferior): Likewise.
8509         (gdb_startup_inferior): New prototype.
8510         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8511         * nat/fork-inferior.h: New file.
8512         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8513         instead of "startup_inferior".  Call "add_thread_silent" after
8514         "fork_inferior".
8515         * target.h (target_terminal_init): Move prototype to
8516         "target/target.h".
8517         (target_terminal_inferior): Likewise.
8518         (target_terminal_ours): Likewise.
8519         * target/target.h (target_terminal_init): New prototype, moved
8520         from "target.h".
8521         (target_terminal_inferior): Likewise.
8522         (target_terminal_ours): Likewise.
8523         * utils.c (gdb_flush_out_err): New function.
8524
8525 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8526
8527         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8528         * common/common-gdbthread.h: New file, with parts from
8529         "gdb/gdbthread.h".
8530         * gdbthread.h: Include "common-gdbthread.h".
8531         (switch_to_thread): Moved to "common/common-gdbthread.h".
8532
8533 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8534
8535         * Makefile.in (SFILES): Add "common/job-control.c".
8536         (HFILES_NO_SRCDIR): Add "common/job-control.h".
8537         (COMMON_OBS): Add "job-control.o".
8538         * common/job-control.c: New file, with contents from
8539         "gdb/inflow.c".
8540         * common/job-control.h: New file, with contents from "terminal.h".
8541         * fork-child.c: Include "job-control.h".
8542         * inflow.c: Include "job-control.h".
8543         (gdb_setpgid): Move to "common/common-inflow.c".
8544         (_initialize_inflow): Move setting of "job_control" to
8545         "handle_job_control".
8546         * terminal.h (job_control): Moved to "common/common-terminal.h".
8547         (gdb_setpgid): Likewise.
8548         * top.c: Include "job_control.h".
8549         * utils.c: Likewise.
8550         (job_control): Moved to "job-control.c".
8551
8552 2017-06-07  Pedro Alves  <palves@redhat.com>
8553
8554         * Makefile.in (SFILES): Add gdb_regex.c.
8555         (COMMON_OBS): Add gdb_regex.o.
8556         * ada-lang.c (ada_add_standard_exceptions)
8557         (ada_add_exceptions_from_frame, name_matches_regex)
8558         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8559         parameter type to compiled_regex.  Adjust.
8560         (ada_exceptions_list): Use compiled_regex.
8561         * break-catch-throw.c (exception_catchpoint::pattern): Now a
8562         std::unique_ptr<compiled_regex>.
8563         (exception_catchpoint::~exception_catchpoint): Remove regfree
8564         call.
8565         (check_status_exception_catchpoint): Adjust to use compiled_regex.
8566         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8567         * breakpoint.c (solib_catchpoint::compiled): Now a
8568         std::unique_ptr<compiled_regex>.
8569         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8570         (check_status_catch_solib): Adjust to use compiled_regex.
8571         (add_solib_catchpoint): Adjust to use compiled_regex.
8572         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8573         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8574         compiled_regex reference.  Adjust to use it.
8575         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8576         declaration.  Include "gdb_regex.h".
8577         (apropos_cmd): Change regex parameter to compiled_regex reference.
8578         * gdb_regex.c: New file.
8579         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8580         declarations.
8581         (class compiled_regex): New.
8582         * linux-tdep.c: Include "common/gdb_optional.h".
8583         (struct mapping_regexes): New, factored out from
8584         mapping_is_anonymous_p, and adjusted to use compiled_regex.
8585         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8586         gdb::optional and remove cleanups.  Adjust to compiled_regex.
8587         * probe.c: Include "common/gdb_optional.h".
8588         (collect_probes): Use compiled_regex and gdb::optional and remove
8589         cleanups.
8590         * skip.c: Include "common/gdb_optional.h".
8591         (skiplist_entry::compiled_function_regexp): Now a
8592         gdb::optional<compiled_regex>.
8593         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8594         (free_skiplist_entry): Remove regfree call.
8595         (compile_skip_regexp, skip_rfunction_p): Adjust to use
8596         compiled_regex and gdb::optional.
8597         * symtab.c: Include "common/gdb_optional.h".
8598         (search_symbols): Use compiled_regex and gdb::optional.
8599         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8600         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
8601         to gdb_regex.c.
8602
8603 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8604
8605         * regcache.c (regcache::save): Avoid buffer use.
8606         (regcache::dump): Likewise.
8607
8608 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8609
8610         * sh-tdep.c (sh_pseudo_register_read): Remove
8611         MAX_REGISTER_SIZE.
8612         (sh_pseudo_register_write): Likewise.
8613         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8614         (sh64_pseudo_register_write): Likewise
8615
8616 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
8617
8618         * aarch64-tdep.c (aarch64_store_return_value): Use
8619         V_REGISTER_SIZE.
8620         (aarch64_pseudo_read_value): Likewise.
8621         (aarch64_pseudo_write): Likewise.
8622
8623 2017-06-06  Yao Qi  <yao.qi@linaro.org>
8624
8625         * regformats/regdef.h (set_register_cache): Remove the
8626         declaration.
8627
8628 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
8629
8630         * frame.c (frame_unwind_register_signed): Use
8631         frame_unwind_register_value.
8632
8633 2017-06-06  Pedro Alves  <palves@redhat.com>
8634
8635         PR breakpoints/21553
8636         * breakpoint.c (create_breakpoints_sal_default)
8637         (init_breakpoint_sal, create_breakpoint_sal): Use
8638         gdb::unique_xmalloc_ptr for string parameters.
8639         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8640         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
8641         (base_breakpoint_create_breakpoints_sal)
8642         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8643         (strace_marker_create_breakpoints_sal)
8644         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8645         string parameters.
8646         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8647         gdb::unique_xmalloc_ptr for string parameters.
8648         (create_breakpoint): Constify 'extra_string' and 'cond_string'
8649         parameters.
8650
8651 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8652
8653         * alpha-tdep.c (alpha_register_to_value): Use
8654         get_frame_register_value.
8655         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8656
8657 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
8658
8659         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8660         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8661         (ia64_value_to_register): Likewise.
8662         (ia64_extract_return_value): Likewise.
8663         (ia64_store_return_value): Likewise.
8664         (ia64_push_dummy_call): Likewise.
8665
8666 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
8667
8668         GDB 8.0 released.
8669
8670 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
8671
8672         * x86-linux-nat.c (struct arch_lwp_info): Remove.
8673
8674 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
8675
8676         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8677         parameter.
8678         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8679
8680 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
8681
8682         * event-loop.c (poll_timers): Unallocate timer using delete
8683         instead of xfree.
8684
8685 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8686
8687         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8688         (struct breakpoint) <~breakpoint>: New.
8689         (struct watchpoint): Inherit from breakpoint.
8690         <~watchpoint>: New.
8691         <base>: Remove.
8692         (struct tracepoint): Inherit from breakpoint.
8693         <base>: Remove.
8694         * breakpoint.c (longjmp_breakpoint_ops): Remove.
8695         (struct longjmp_breakpoint): Inherit from breakpoint.
8696         <~longjmp_breakpoint>: New.
8697         <base>: Remove.
8698         (new_breakpoint_from_type): Remove casts.
8699         (watchpoint_in_thread_scope): Remove reference to base field.
8700         (watchpoint_del_at_next_stop): Likewise.
8701         (update_watchpoint): Likewise.
8702         (watchpoint_check): Likewise.
8703         (bpstat_check_watchpoint): Likewise.
8704         (set_longjmp_breakpoint): Likewise.
8705         (struct fork_catchpoint): Inherit from breakpoint.
8706         <base>: Remove.
8707         (struct solib_catchpoint): Inherit from breakpoint.
8708         <~solib_catchpoint>: New.
8709         <base>: Remove.
8710         (dtor_catch_solib): Change to ...
8711         (solib_catchpoint::~solib_catchpoint): ... this.
8712         (breakpoint_hit_catch_solib): Remove reference to base field.
8713         (add_solib_catchpoint): Likewise.
8714         (create_fork_vfork_event_catchpoint): Likewise.
8715         (struct exec_catchpoint): Inherit from breakpoint.
8716         <~exec_catchpoint>: New.
8717         <base>: Remove.
8718         (dtor_catch_exec): Change to ...
8719         (exec_catchpoint::~exec_catchpoint): ... this.
8720         (dtor_watchpoint): Change to ...
8721         (watchpoint::~watchpoint): ... this.
8722         (watch_command_1): Remove reference to base field.
8723         (catch_exec_command_1): Likewise.
8724         (base_breakpoint_dtor): Change to ...
8725         (breakpoint::~breakpoint): ... this.
8726         (base_breakpoint_ops): Remove dtor field value.
8727         (longjmp_bkpt_dtor): Change to ...
8728         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8729         (strace_marker_create_breakpoints_sal): Remove reference to base
8730         field.
8731         (delete_breakpoint): Don't manually call breakpoint destructor.
8732         (create_tracepoint_from_upload): Remove reference to base field.
8733         (trace_pass_set_count): Likewise.
8734         (initialize_breakpoint_ops): Don't initialize
8735         momentary_breakpoint_ops, don't set dtors.
8736         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8737         <~ada_catchpoint>: New.
8738         <base>: Remove.
8739         (create_excep_cond_exprs): Remove reference to base field.
8740         (dtor_exception): Change to ...
8741         (ada_catchpoint::~ada_catchpoint): ... this.
8742         (dtor_catch_exception): Remove.
8743         (dtor_catch_exception_unhandled): Remove.
8744         (dtor_catch_assert): Remove.
8745         (create_ada_exception_catchpoint): Remove reference to base
8746         field.
8747         (initialize_ada_catchpoint_ops): Don't set dtors.
8748         * break-catch-sig.c (struct signal_catchpoint): Inherit from
8749         breakpoint.
8750         <~signal_catchpoint>: New.
8751         <base>: Remove.
8752         (signal_catchpoint_dtor): Change to ...
8753         (signal_catchpoint::~signal_catchpoint): ... this.
8754         (create_signal_catchpoint): Remove reference to base field.
8755         (initialize_signal_catchpoint_ops): Don't set dtor.
8756         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8757         from breakpoint.
8758         <~syscall_catchpoint>: New.
8759         <base>: Remove.
8760         (dtor_catch_syscall): Change to ...
8761         (syscall_catchpoint::~syscall_catchpoint): ... this.
8762         (create_syscall_event_catchpoint): Remove reference to base
8763         field.
8764         (initialize_syscall_catchpoint_ops): Don't set dtor.
8765         * break-catch-throw.c (struct exception_catchpoint): Inherit
8766         from breakpoint.
8767         <~exception_catchpoint>: New.
8768         <base>: Remove.
8769         (dtor_exception_catchpoint): Change to ...
8770         (exception_catchpoint::~exception_catchpoint): ... this.
8771         (handle_gnu_v3_exceptions): Remove reference to base field.
8772         (initialize_throw_catchpoint_ops): Don't set dtor.
8773         * ctf.c (ctf_get_traceframe_address): Remove reference to base
8774         field.
8775         * remote.c (remote_get_tracepoint_status): Likewise.
8776         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8777         * tracefile.c (tracefile_fetch_registers): Likewise.
8778         * tracepoint.c (actions_command): Likewise.
8779         (validate_actionline): Likewise.
8780         (tfind_1): Likewise.
8781         (get_traceframe_location): Likewise.
8782         (find_matching_tracepoint_location): Likewise.
8783         (parse_tracepoint_status): Likewise.
8784         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8785
8786 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8787
8788         * breakpoint.c (struct longjmp_breakpoint): New struct.
8789         (is_tracepoint_type): Change return type to bool.
8790         (is_longjmp_type): New function.
8791         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8792         (set_raw_breakpoint_without_location): Use
8793         new_breakpoint_from_type.
8794         (set_raw_breakpoint): Likewise.
8795
8796 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
8797
8798         * breakpoint.c (new_breakpoint_from_type): New function.
8799         (create_breakpoint_sal): Use new_breakpoint_from_type and
8800         unique_ptr.
8801         (create_breakpoint): Likewise.
8802
8803 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
8804
8805         * memattr.c (mem_info_command): Rename to ...
8806         (info_mem_command): ... this.
8807         (mem_enable_command): Rename to ...
8808         (enable_mem_command): ... this.
8809         (mem_disable_command): Rename to ...
8810         (disable_mem_command): ... this.
8811         (mem_delete_command): Rename to ...
8812         (delete_mem_command): ... this.
8813         (_initialize_mem): Adjust function names.
8814
8815 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8816
8817         * btrace.c (handle_pt_insn_events): New.
8818         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
8819         STATUS.  Split into this and ...
8820         (handle_pt_insn_event_flags): ... this.
8821
8822 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
8823
8824         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8825         and struct pt_insn.resynced.
8826         * configure: Regenerated.
8827         * config.in: Regenerated.
8828
8829 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8830
8831         * btrace.c (ftrace_find_call_by_number): New function.
8832         (ftrace_new_function): Store objects, not pointers.
8833         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8834         ftrace_new_gap, ftrace_update_function,
8835         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8836         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8837         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8838         btrace_ends_with_single_insn, btrace_call_get): Account for
8839         btrace_thread_info::functions now storing objects.
8840         * btrace.h (struct btrace_thread_info): Add constructor.
8841         (struct btrace_thread_info) <functions>: Make std::vector.
8842         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8843         Initialize with default values.
8844         * record-btrace.c (record_btrace_frame_sniffer): Account for
8845         btrace_thread_info::functions now storing objects.
8846
8847 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8848
8849         * btrace.c: Remove typedef bfun_s.
8850         (ftrace_new_gap): Directly add gaps to the list of gaps.
8851         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8852         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8853         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8854         instead of gdb VEC.
8855
8856 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8857
8858         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8859         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8860         with btrace_thread_info::next_segment and
8861         btrace_thread_info::prev_segment.
8862         * btrace.h: Remove struct btrace_func_link.
8863         (struct btrace_function): Replace pair of function segment pointers
8864         with pair of indices.
8865         * python/py-record-btrace.c (btpy_call_prev_sibling,
8866         btpy_call_next_sibling): Replace references to
8867         btrace_thread_info::segment with btrace_thread_info::next_segment and
8868         btrace_thread_info::prev_segment.
8869         * record-btrace.c (record_btrace_frame_this_id): Use
8870         btrace_find_call_by_number.
8871
8872 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8873
8874         * btrace.c (ftrace_new_function, ftrace_fixup_level,
8875         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8876         btrace_insn_next, btrace_insn_prev): Remove references to
8877         btrace_thread_info::flow.
8878         * btrace.h (struct btrace_function): Remove FLOW.
8879
8880 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8881
8882         * btrace.c (ftrace_find_call_by_number): New function.
8883         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8884         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8885         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8886         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8887         index.
8888         * btrace.h (struct btrace_function): Turn UP into an index.
8889         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8890         as an index.
8891         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8892         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8893         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8894
8895 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8896
8897         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8898         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8899         ftrace_update_function, ftrace_compute_global_level_offset,
8900         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8901         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8902         btrace_insn_end, btrace_is_empty): Remove references to
8903         btrace_thread_info::begin and btrace_thread_info::end.
8904         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8905         (struct btrace_thread_info) <functions>: Adjust comment.
8906         * record-btrace.c (record_btrace_start_replaying): Remove reference to
8907         btrace_thread_info::begin.
8908
8909 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8910
8911         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8912         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8913         ftrace_update_function): Remove arguments that implicitly were always
8914         BTINFO->END.
8915         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8916         Don't pass BTINFO->END.
8917
8918 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8919
8920         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8921         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8922         btrace_find_insn_by_number): Replace function segment pointer with
8923         index.
8924         (btrace_insn_cmp): Simplify.
8925         * btrace.h: (struct btrace_insn_iterator) Rename index to
8926         insn_index.  Replace function segment pointer with index into function
8927         segment vector.
8928         * record-btrace.c (record_btrace_call_history): Replace function
8929         segment pointer use with index.
8930         (record_btrace_frame_sniffer): Retrieve function call segment through
8931         vector.
8932         (record_btrace_set_replay): Remove defunc't safety check.
8933
8934 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8935
8936         * btrace.c (btrace_ends_with_single_insn): New function.
8937         (btrace_call_get, btrace_call_number, btrace_call_begin,
8938         btrace_call_end, btrace_call_next, btrace_call_prev,
8939         btrace_find_call_by_number): Use index into call segment vector
8940         instead of pointer.
8941         (btrace_call_cmp): Simplify.
8942         * btrace.h (struct btrace_call_iterator): Replace function call segment
8943         pointer with index into vector.
8944         * record-btrace.c (record_btrace_call_history): Use index instead of
8945         pointer.
8946
8947 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8948
8949         * btrace.c (btrace_insn_begin, btrace_insn_end,
8950         btrace_find_insn_by_number): Add btinfo to iterator.
8951         * btrace.h (struct btrace_insn_iterator): Add btinfo.
8952
8953 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8954
8955         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8956         and save pointers directly.
8957         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8958         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8959         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
8960         changed signature of functions.
8961         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8962         (btrace_fetch): Remove code that adds btrace_function pointers to
8963         vector of btrace_functions.
8964         (btrace_clear): Simplify freeing vector of btrace_functions.
8965
8966 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
8967
8968         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8969         Replace VEC_* with std::vector functions.
8970         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8971         (struct btrace_thread_info)<functions>: Change type to std::vector.
8972
8973 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
8974
8975         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
8976         "Removed targets and native configurations" up.  Merge duplicate
8977         "New commands" sub-sections.  Add "New options" sub-sections.
8978
8979 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
8980
8981         * defs.h (copy_integer_to_size): New declaration.
8982         * findvar.c (copy_integer_to_size): New function.
8983         (do_cint_test): New selftest function.
8984         (copy_integer_to_size_test): Likewise.
8985         (_initialize_findvar): Likewise.
8986         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8987         (mips_fbsd_collect_reg): Use raw_collect_integer.
8988         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8989         (mips64_fill_gregset): Use raw_collect_integer
8990         (mips64_fill_fpregset): Use raw_supply_integer.
8991         * regcache.c (regcache::raw_supply_integer): New function.
8992         (regcache::raw_collect_integer): Likewise.
8993         * regcache.h: (regcache::raw_supply_integer): New declaration.
8994         (regcache::raw_collect_integer): Likewise.
8995
8996 2017-05-24  Yao Qi  <yao.qi@linaro.org>
8997
8998         * Makefile.in (SFILES): Add gdbarch-selftests.c.
8999         (COMMON_OBS): Add gdbarch-selftests.o.
9000         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
9001         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
9002         * gdbarch-selftests.c: New file.
9003         * regcache.h (regcache) <~regcache>: Mark it virtual if
9004         GDB_SELF_TEST.
9005         <raw_write>: Likewise.
9006
9007 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9008
9009         * regcache.c (current_regcache): Change it to
9010         regcache::current_regcache.
9011         (regcache_observer_target_changed): Update.
9012         (regcache_thread_ptid_changed): Make it a regcache static
9013         method.
9014         (regcache_thread_ptid_changed): Update.
9015         (class regcache_access): New.
9016         (current_regcache_test): Update.
9017         (_initialize_regcache): Update.
9018         * regcache.h: Include forward_list.
9019         (regcache): Declare regcache_thread_ptid_changed and declare
9020         registers_changed_ptid as friend.
9021
9022 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9023
9024         * i387-tdep.c (i387_register_to_value): Use register_size
9025         instead of TYPE_LENGTH.
9026         * m68k-tdep.c (m68k_register_to_value): Likewise.
9027
9028 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9029
9030         * i387-tdep.c (i387_convert_register_p): Return false if type
9031         code isn't TYPE_CODE_FLT.
9032
9033 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9034
9035         * alpha-tdep.c (alpha_convert_register_p): Return true if type
9036         length is 4.
9037         (alpha_register_to_value): Remove type length check.
9038         (alpha_value_to_register): Likewise.
9039
9040 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9041
9042         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
9043         TYPE_CODE_FLT.
9044
9045 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9046
9047         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
9048         TYPE_CODE_FLT or not.
9049
9050 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9051
9052         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
9053         * avr-tdep.c (avr_gdbarch_init): Likewise.
9054         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9055         * cris-tdep.c (cris_gdbarch_init): Likewise.
9056         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9057         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9058         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9059         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
9060         * mep-tdep.c (mep_gdbarch_init): Likewise.
9061         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9062         * mips-tdep.c (mips_gdbarch_init): Likewise.
9063         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9064         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9065         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9066         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9067         * v850-tdep.c (v850_gdbarch_init): Likewise.
9068
9069 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9070
9071         * selftest-arch.c (tests_with_arch): Call registers_changed
9072         and reinit_frame_cache.
9073         * selftest.c (run_self_tests): Likewise.
9074
9075 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9076
9077         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
9078         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
9079
9080 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9081
9082         * rl78-tdep.c (rl78_gdbarch_init): Don't call
9083         set_gdbarch_print_insn.
9084
9085 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9086
9087         * h8300-tdep.c (h8300_gdbarch_init): Don't call
9088         set_gdbarch_print_insn.
9089
9090 2017-05-24  Yao Qi  <yao.qi@linaro.org>
9091
9092         * alpha-tdep.c (alpha_gdbarch_init): Don't call
9093         set_gdbarch_print_insn.
9094         * arc-tdep.c (arc_gdbarch_init): Likewise.
9095         * arch-utils.c: include dis-asm.h.
9096         (default_print_insn): New function.
9097         * arch-utils.h (default_print_insn): Declare.
9098         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
9099         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
9100         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
9101         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
9102         * frv-tdep.c (frv_gdbarch_init): Likewise.
9103         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
9104         * gdbarch.sh (print_insn): Use default_print_insn.
9105         * gdbarch.c: Regenerated.
9106         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
9107         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
9108         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
9109         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
9110         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9111         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
9112         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
9113         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
9114         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
9115         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
9116         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
9117         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9118         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
9119         * mt-tdep.c (mt_gdbarch_init): Likewise.
9120         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9121         * nios2-tdep.c (nios2_print_insn): Remove.
9122         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
9123         * rx-tdep.c (rx_gdbarch_init): Likewise.
9124         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9125         * score-tdep.c (score_print_insn): Remove.
9126         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
9127         * sh-tdep.c (sh_gdbarch_init): Likewise.
9128         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
9129         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9130         * tic6x-tdep.c (tic6x_print_insn): Remove.
9131         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
9132         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
9133         * v850-tdep.c (v850_gdbarch_init): Likewise.
9134         * vax-tdep.c (vax_gdbarch_init): Likewise.
9135         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9136         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
9137
9138 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9139
9140         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
9141         (MIPS_FP0_REGNUM): Remove.
9142         (MIPS_FSR_REGNUM): Remove.
9143         (mips_fbsd_supply_fpregs): Use mips_regnum.
9144         (mips_fbsd_supply_gregs): Likewise.
9145         (mips_fbsd_collect_fpregs): Likewise.
9146         (mips_fbsd_collect_gregs): Likewise.
9147
9148 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
9149
9150         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
9151         (getpfpregs_supplies): New function.
9152         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
9153         getfpregs_supplies.
9154         (mips_fbsd_store_inferior_registers): Likewise.
9155
9156 2017-05-22  Pedro Alves <palves@redhat.com>
9157
9158         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
9159         maintainer.
9160
9161 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
9162
9163         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
9164         (store_register): Likewise.
9165         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
9166         (get_decimal_float_return_value): Likewise.
9167         (do_ppc_sysv_return_value): Likewise.
9168         (ppc64_sysv_abi_push_integer): Likewise.
9169         (ppc64_sysv_abi_push_freg): Likewise.
9170         (ppc64_sysv_abi_return_value_base): Likewise.
9171         (ppc64_sysv_abi_return_value): Likewise.
9172         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
9173         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
9174         * rs6000-nat.c: Likewise.
9175         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
9176         (rs6000_value_to_register): Likewise.
9177         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
9178
9179 2017-05-21  Tom Tromey  <tom@tromey.com>
9180
9181         PR rust/21466:
9182         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
9183         arrays as "[T]", not "[T; ]".
9184
9185 2017-05-19  Tom Tromey  <tom@tromey.com>
9186
9187         PR rust/21484:
9188         * rust-lang.c (exp_descriptor_rust): New function.
9189         (rust_language_defn): Use it.
9190         * p-lang.c (pascal_language_defn): Update.
9191         * opencl-lang.c (opencl_language_defn): Update.
9192         * objc-lang.c (objc_language_defn): Update.
9193         * m2-lang.c (m2_language_defn): Update.
9194         * language.h (struct language_defn)
9195         <la_watch_location_expression>: New member.
9196         * language.c (unknown_language_defn, auto_language_defn)
9197         (local_language_defn): Update.
9198         * go-lang.c (go_language_defn): Update.
9199         * f-lang.c (f_language_defn): Update.
9200         * d-lang.c (d_language_defn): Update.
9201         * c-lang.h (c_watch_location_expression): Declare.
9202         * c-lang.c (c_watch_location_expression): New function.
9203         (c_language_defn, cplus_language_defn, asm_language_defn)
9204         (minimal_language_defn): Use it.
9205         * breakpoint.c (watch_command_1): Call
9206         la_watch_location_expression.
9207         * ada-lang.c (ada_language_defn): Update.
9208
9209 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9210
9211         PR tui/21482
9212         * gdb_curses.h (NOMACROS): Define.
9213         (NCURSES_NOMACROS): Define.
9214
9215 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9216
9217         PR tui/21482
9218         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9219         arg to char *.
9220         * tui/tui-wingeneral.c (box_win): Likewise.
9221         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9222         (tui_show_source_line): Likewise.
9223         (tui_show_exec_info_content): Likewise.
9224
9225 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9226
9227         * sparc-tdep.c (sparc_structure_return_p)
9228         (sparc_arg_on_registers_p): New functions.
9229         (sparc32_store_arguments): Use them.
9230         * sparc64-tdep.c (sparc64_16_byte_align_p)
9231         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9232         Handle TYPE_CODE_ARRAY.
9233
9234 2017-05-17  Yao Qi  <yao.qi@linaro.org>
9235
9236         * cli/cli-decode.c (add_alias_cmd): New function.
9237         * command.h (add_alias_cmd): Declare.
9238         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9239         instead call add_alias_cmd.
9240
9241 2017-05-17  Pedro Alves  <palves@redhat.com>
9242
9243         * Makefile.in (nat_extra_makefile_frag): Rename to ...
9244         (nat_makefile_frag): ... this.  All references updated.
9245         * configure.ac: Likewise.
9246         * configure.nat: Likewise.  Enhance comments.
9247         * configure: Regenerate.
9248
9249 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9250
9251         * procfs.c (procfs_create_inferior): Change prototype to match
9252         definition.
9253
9254 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
9255
9256         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9257         C++ compiler warning.
9258
9259 2017-05-12  Tom Tromey  <tom@tromey.com>
9260
9261         PR rust/21483:
9262         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9263         recurse, just call value_struct_elt directly.
9264
9265 2017-05-12  Tom Tromey  <tom@tromey.com>
9266
9267         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9268         OP_RUST_ARRAY>: Fix.
9269
9270 2017-05-12  Tom Tromey  <tom@tromey.com>
9271
9272         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9273
9274 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9275
9276         * regcache.c: Include <forward_list>.
9277         (struct regcache_list): Remove.
9278         (current_regcache): Update.
9279         (get_thread_arch_aspace_regcache): Update for std::forward_list.
9280         (regcache_thread_ptid_changed): Likewise.
9281         (registers_changed_ptid): Likewise.
9282         (current_regcache_size): Likewise.
9283
9284 2017-05-09  Yao Qi  <yao.qi@linaro.org>
9285
9286         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9287         (current_regcache_size): New function.
9288         (current_regcache_test): New function.
9289         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9290
9291 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9292
9293         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9294         (print_gp_register_row): Use get_frame_register_value.
9295
9296 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9297
9298         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9299         (mips_supply_fpregset): Likewise.
9300         (mips64_supply_gregset): Likewise.
9301
9302 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
9303
9304         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
9305         regcache->raw_supply_zeroed.
9306
9307 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9308
9309         * configure.nat: Rearrange 'case' statements to match
9310         host before cpu.
9311
9312 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
9313
9314         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
9315         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9316         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
9317         "@nat_extra_makefile_frag@".
9318         (Makefile): Remove dependency on "@frags@".
9319         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9320         (data-directory/Makefile): Likewise.
9321         * config/aarch64/linux.mh: Deleted; moved contents to
9322         "gdb/configure.nat".
9323         * config/alpha/alpha-linux.mh: Likewise.
9324         * config/alpha/nbsd.mh: Likewise.
9325         * config/arm/linux.mh: Likewise.
9326         * config/arm/nbsdelf.mh: Likewise.
9327         * config/i386/cygwin.mh: Likewise.
9328         * config/i386/cygwin64.mh: Likewise.
9329         * config/i386/darwin.mh: Likewise.
9330         * config/i386/fbsd.mh: Likewise.
9331         * config/i386/fbsd64.mh: Likewise.
9332         * config/i386/go32.mh: Likewise.
9333         * config/i386/i386gnu.mh: Likewise.
9334         * config/i386/i386sol2.mh: Likewise.
9335         * config/i386/linux.mh: Likewise.
9336         * config/i386/linux64.mh: Likewise.
9337         * config/i386/mingw.mh: Likewise.
9338         * config/i386/mingw64.mh: Likewise.
9339         * config/i386/nbsd64.mh: Likewise.
9340         * config/i386/nbsdelf.mh: Likewise.
9341         * config/i386/nto.mh: Likewise.
9342         * config/i386/obsd.mh: Likewise.
9343         * config/i386/obsd64.mh: Likewise.
9344         * config/i386/sol2-64.mh: Likewise.
9345         * config/ia64/linux.mh: Likewise.
9346         * config/m32r/linux.mh: Likewise.
9347         * config/m68k/linux.mh: Likewise.
9348         * config/m68k/nbsdelf.mh: Likewise.
9349         * config/m68k/obsd.mh: Likewise.
9350         * config/m88k/obsd.mh: Likewise.
9351         * config/mips/fbsd.mh: Likewise.
9352         * config/mips/linux.mh: Likewise.
9353         * config/mips/nbsd.mh: Likewise.
9354         * config/mips/obsd64.mh: Likewise.
9355         * config/pa/linux.mh: Likewise.
9356         * config/pa/nbsd.mh: Likewise.
9357         * config/pa/obsd.mh: Likewise.
9358         * config/powerpc/aix.mh: Likewise.
9359         * config/powerpc/fbsd.mh: Likewise.
9360         * config/powerpc/linux.mh: Likewise.
9361         * config/powerpc/nbsd.mh: Likewise.
9362         * config/powerpc/obsd.mh: Likewise.
9363         * config/powerpc/ppc64-linux.mh: Likewise.
9364         * config/powerpc/spu-linux.mh: Likewise.
9365         * config/s390/linux.mh: Likewise.
9366         * config/sh/nbsd.mh: Likewise.
9367         * config/sparc/fbsd.mh: Likewise.
9368         * config/sparc/linux.mh: Likewise.
9369         * config/sparc/linux64.mh: Likewise.
9370         * config/sparc/nbsd64.mh: Likewise.
9371         * config/sparc/nbsdelf.mh: Likewise.
9372         * config/sparc/obsd64.mh: Likewise.
9373         * config/sparc/sol2.mh: Likewise.
9374         * config/tilegx/linux.mh: Likewise.
9375         * config/vax/nbsdelf.mh: Likewise.
9376         * config/vax/obsd.mh: Likewise.
9377         * config/xtensa/linux.mh: Likewise.
9378         * config/i386/i386gnu.mn: New file, with excerpts from
9379         "config/i386/i386gnu.mh".
9380         * configure: Regenerate.
9381         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9382         *.mh files under "gdb/config".
9383         * configure.nat: New file, with contents from the
9384         "gdb/config/*/*.mh" files.
9385
9386 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
9387
9388         * btrace.c (btrace_clear): Free insn vector.
9389
9390 2017-05-05  Pedro Alves  <palves@redhat.com>
9391
9392         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9393         * configure: Regenerate.
9394
9395 2017-05-04  Pedro Alves  <palves@redhat.com>
9396
9397         * Makefile.in (SFILES): Add progspace-and-thread.c.
9398         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9399         (COMMON_OBS): Add progspace-and-thread.o.
9400         * breakpoint.c: Include "progspace-and-thread.h".
9401         (update_inserted_breakpoint_locations)
9402         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9403         Use scoped_restore_current_pspace_and_thread.
9404         (create_std_terminate_master_breakpoint): Use
9405         scoped_restore_current_program_space.
9406         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9407         (print_breakpoint_location): Use
9408         scoped_restore_current_program_space.
9409         (bp_loc_is_permanent): Use
9410         scoped_restore_current_pspace_and_thread.
9411         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9412         (download_tracepoint_locations): Use
9413         scoped_restore_current_pspace_and_thread.
9414         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9415         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9416         (enum step_over_calls_kind): Moved from inferior.h.
9417         (class scoped_restore_current_thread): New class.
9418         * gdbthread.h (make_cleanup_restore_current_thread): Delete
9419         declaration.
9420         (scoped_restore_current_thread): New class.
9421         * infcmd.c: Include "common/gdb_optional.h".
9422         (continue_1, proceed_after_attach): Use
9423         scoped_restore_current_thread.
9424         (notice_new_inferior): Use scoped_restore_current_thread.
9425         * inferior.c: Include "progspace-and-thread.h".
9426         (restore_inferior, save_current_inferior): Delete.
9427         (add_inferior_command, clone_inferior_command): Use
9428         scoped_restore_current_pspace_and_thread.
9429         * inferior.h (scoped_restore_current_inferior): New class.
9430         * infrun.c: Include "progspace-and-thread.h" and
9431         "common/gdb_optional.h".
9432         (follow_fork_inferior): Use
9433         scoped_restore_current_pspace_and_thread.
9434         (scoped_restore_exited_inferior): New class.
9435         (handle_vfork_child_exec_or_exit): Use
9436         scoped_restore_exited_inferior,
9437         scoped_restore_current_pspace_and_thread,
9438         scoped_restore_current_thread and scoped_restore.
9439         (fetch_inferior_event): Use scoped_restore_current_thread.
9440         * linespec.c (decode_line_full, decode_line_1): Use
9441         scoped_restore_current_program_space.
9442         * mi/mi-main.c: Include "progspace-and-thread.h".
9443         (exec_continue): Use scoped_restore_current_thread.
9444         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9445         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9446         * proc-service.c (ps_pglobal_lookup): Use
9447         scoped_restore_current_program_space.
9448         * progspace-and-thread.c: New file.
9449         * progspace-and-thread.h: New file.
9450         * progspace.c (release_program_space, clone_program_space): Use
9451         scoped_restore_current_program_space.
9452         (restore_program_space, save_current_program_space)
9453         (save_current_space_and_thread): Delete.
9454         (switch_to_program_space_and_thread): Moved to
9455         progspace-and-thread.c.
9456         * progspace.h (save_current_program_space)
9457         (save_current_space_and_thread): Delete declarations.
9458         (scoped_restore_current_program_space): New class.
9459         * remote.c (remote_btrace_maybe_reopen): Use
9460         scoped_restore_current_thread.
9461         * symtab.c: Include "progspace-and-thread.h".
9462         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9463         * thread.c (print_thread_info_1): Use
9464         scoped_restore_current_thread.
9465         (struct current_thread_cleanup): Delete.
9466         (do_restore_current_thread_cleanup)
9467         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9468         (scoped_restore_current_thread::~scoped_restore_current_thread):
9469         ... this new dtor.
9470         (make_cleanup_restore_current_thread): Rename/convert to ...
9471         (scoped_restore_current_thread::scoped_restore_current_thread):
9472         ... this new ctor.
9473         (thread_apply_all_command): Use scoped_restore_current_thread.
9474         (thread_apply_command): Use scoped_restore_current_thread.
9475         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9476         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9477
9478 2017-05-04  Pedro Alves  <palves@redhat.com>
9479
9480         * thread.c (make_cleanup_restore_current_thread): Move
9481         find_thread_ptid call before the is_stopped call.  Assert that the
9482         thread is found.  Replace is_stopped call by checking the thread's
9483         state directly.  Remove unnecessary NULL-thread check.
9484
9485 2017-05-04  Pedro Alves  <palves@redhat.com>
9486
9487         * corelow.c (thread_section_name): New class.
9488         (get_core_register_section, get_core_siginfo): Use it.
9489
9490 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9491
9492         * corelow.c (sniff_core_bfd): Remove extra semicolon.
9493         (get_core_register_section): Remove xfree of NULL pointer.
9494
9495 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
9496
9497         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9498         * regcache.c (regcache::raw_supply_zeroed): New function.
9499         * regcache.h (regcache::raw_supply_zeroed): New declaration.
9500
9501 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9502
9503         * gdbarch.sh: Remove commented out definition of
9504         TARGET_CHAR_BIT.
9505         * gdbarch.h: Re-generate.
9506
9507 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
9508
9509         * configure: Regenerate.
9510
9511 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
9512
9513         * solib-target.c (solib_target_relocate_section_addresses):
9514         Remove num_section_bases, num_bases, segment_bases variables.
9515
9516 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9517
9518         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9519
9520 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9521
9522         * solib-target.c: Include <vector>
9523         (struct lm_info_target) <~lm_info_target>: Remove.
9524         <segment_bases, section_bases>: Change type to
9525         std::vector<CORE_ADDR>.
9526         (library_list_start_segment, library_list_start_section,
9527         library_list_end_library,
9528         solib_target_relocate_section_addresses): Adjust.
9529
9530 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9531
9532         * gdbarch.sh (software_single_step): Change return type to
9533         std::vector<CORE_ADDR>.
9534         * gdbarch.c, gdbarch.h: Re-generate.
9535         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9536         Adjust.
9537         (arm_deal_with_atomic_sequence_raw): Adjust.
9538         (thumb_get_next_pcs_raw): Adjust.
9539         (arm_get_next_pcs_raw): Adjust.
9540         (arm_get_next_pcs): Adjust.
9541         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9542         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9543         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9544         (alpha_software_single_step): Adjust.
9545         * alpha-tdep.h (alpha_software_single_step): Adjust.
9546         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9547         * arm-tdep.c (arm_software_single_step): Adjust.
9548         (arm_breakpoint_kind_from_current_state): Adjust.
9549         * arm-tdep.h (arm_software_single_step): Adjust.
9550         * breakpoint.c (insert_single_step_breakpoint): Adjust.
9551         * cris-tdep.c (cris_software_single_step): Adjust.
9552         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9553         (micromips_deal_with_atomic_sequence): Adjust.
9554         (deal_with_atomic_sequence): Adjust.
9555         (mips_software_single_step): Adjust.
9556         * mips-tdep.h (mips_software_single_step): Adjust.
9557         * moxie-tdep.c (moxie_software_single_step): Adjust.
9558         * nios2-tdep.c (nios2_software_single_step): Adjust.
9559         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9560         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9561         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9562         * s390-linux-tdep.c (s390_software_single_step): Adjust.
9563         * sparc-tdep.c (sparc_software_single_step): Adjust.
9564         * spu-tdep.c (spu_software_single_step): Adjust.
9565         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9566
9567 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
9568
9569         * gdbarch.sh: Use semi-colon as field separator instead of colon.
9570         * gdbarch.h: Re-generate.
9571
9572 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9573
9574         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9575         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9576         * python/py-instruction.c, python/py-instruction.h: New file.
9577         * python/py-record.c: Add py-instruction.h include.
9578         (gdbpy_initialize_record): Make gdb.Instruction a super class of
9579         gdb.RecordInstruction.
9580         * python/python-internal.h: Add gdbpy_initialize_instruction
9581         declaration.
9582         * python/python.c (do_start_initialization): Add
9583         gdbpy_initialize_instruction.
9584
9585 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9586
9587         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9588         Remove.
9589         (btrace_func_from_recpy_func): New function.
9590         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9591         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9592         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9593         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9594         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9595         Also, use new helper functions.
9596         (btpy_list_item): Use new helper functions.
9597         (recpy_bt_function_call_history): Use new type name.
9598         (btpy_call_getset): Remove.
9599         (gdbpy_initialize_btrace): Remove code to initialize
9600         gdb.BtraceFunctionCall.
9601         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9602         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9603         recpy_bt_func_prev, recpy_bt_func_next): New export.
9604         * python/py-record.c (recpy_func_type): New static object.
9605         (recpy_func_new, recpy_func_level, recpy_func_symbol,
9606         recpy_func_instructions, recpy_func_up, recpy_func_prev,
9607         recpy_func_next): New function.
9608         (recpy_element_hash, recpy_element_richcompare): Updated comment.
9609         (recpy_func_getset): New static object.
9610         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9611         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9612
9613 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9614
9615         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9616         (btpy_object, btpy_insn_type, btpy_new): Remove.
9617         (btpy_list_object): Use gdb.RecordInstruction type instead of
9618         gdb.BtraceInstruction type.
9619         (btrace_insn_from_recpy_insn): New function.
9620         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9621         btpy_new.
9622         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9623         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9624         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9625         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9626         instead of btpy_object.
9627         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9628         btpy_insn_data, btpy_insn_decode): Rename to ...
9629         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9630         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9631         recpy_bt_insn_decode): This.  Also, use new helper functions.
9632         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9633         recpy_insn_type.
9634         (btpy_insn_getset): Remove.
9635         (gdbpy_initialize_btrace): Remove code to initialize
9636         gdb.BtraceInstruction.  Use recpy_element_object.
9637         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9638         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9639         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9640         * python/py-record.c (recpy_insn_type): New static object.
9641         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9642         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9643         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9644         New function.
9645         (recpy_insn_getset): New static object.
9646         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9647         * python/py-record.h (recpy_element_object): New typedef.
9648         (recpy_insn_type, recpy_insn_new): New export.
9649
9650 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9651
9652         * py-record-btrace.c (btpy_insn_new): Removed.
9653         (btpy_insn_or_gap_new): New function.
9654         (btpy_insn_error): Removed.
9655         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9656         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9657         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9658         btpy_insn_or_gap_new instead of btpy_insn_new.
9659         (btpy_insn_getset): Remove btpy_insn_error.
9660         * py-record.c (recpy_gap_type): New static object.
9661         (recpy_gap_object): New typedef.
9662         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9663         recpy_gap_reason_string): New function.
9664         (recpy_gap_getset): New static object.
9665         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9666         * py-record.h (recpy_gap_new): New export.
9667
9668 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9669
9670         * python/py-record.c (recpy_ptid): Remove.
9671         (recpy_record_getset): Remove recpy_ptid.
9672
9673 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9674
9675         * btrace.c (btrace_fetch): Set inferior_ptid.
9676         * python/py-record-btrace.c: Add "py-record.h" include.
9677         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9678         recpy_bt_end, recpy_bt_instruction_history,
9679         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9680         in gdb.Record object instead of current ptid.
9681         * python/py-record.c: Include new "py-record.h" file.
9682         (recpy_record_object): Moved to py-record.h.
9683         * python/py-record.h: New file.
9684
9685 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
9686
9687         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9688         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9689         indentation.
9690
9691 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
9692
9693         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9694         the past maintainers section.
9695
9696 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9697
9698         * infcmd.c (get_return_value): Use regcache ctor, and remove
9699         cleanup.
9700
9701 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9702             Pedro Alves  <palves@redhat.com>
9703
9704         * regcache.c (regcache::regcache): New tag dispatch ctor.
9705         (do_cooked_read): Moved above.
9706         (regcache_dup): Use the tag dispatch ctor..
9707         * regcache.h (regcache): Declare ctor, delete copy ctor and
9708         assignment operator, remove friend regcache_dup.
9709
9710 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9711
9712         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9713         call method save instead of regcache_cpy.
9714         * regcache.h (struct regcache): Make regcache_dup a friend.
9715
9716 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9717
9718         * regcache.c (struct regcache): Move to regcache.h
9719         (regcache::arch): New method.
9720         (regcache_get_ptid): Update.
9721         (get_regcache_arch): Call arch method.
9722         (get_regcache_aspace): Call method aspace.
9723         (register_buffer): Change it to method.
9724         (regcache_save): Change it to regcache::save.
9725         (regcache_restore): Likewise.
9726         (regcache_cpy_no_passthrough): Remove the declaration.
9727         (regcache_cpy): Call methods restore and cpy_no_passthrough.
9728         (regcache_cpy_no_passthrough): Change it to method
9729         cpy_no_passthrough.
9730         (regcache_register_status): Change it to method
9731         get_register_status.
9732         (regcache_invalidate): Change it to method invalidate.
9733         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9734         (regcache_raw_update): Change it to method raw_update.
9735         (regcache_raw_read): Likewise.
9736         (regcache_raw_read_signed): Likewise.
9737         (regcache_raw_read_unsigned): Likewise.
9738         (regcache_raw_write_signed): Likewise.
9739         (regcache_raw_write_unsigned): Likewise.
9740         (regcache_cooked_read): Likewise.
9741         (regcache_cooked_read_value): Likewise.
9742         (regcache_cooked_read_signed): Likewise.
9743         (regcache_cooked_read_unsigned): Likewise.
9744         (regcache_cooked_write_signed): Likewise.
9745         (regcache_cooked_write_unsigned): Likewise.
9746         (regcache_raw_set_cached_value): Likewise.
9747         (regcache_raw_write): Likewise.
9748         (regcache_cooked_write): Likewise.
9749         (regcache_xfer_part): Likewise.
9750         (regcache_raw_read_part): Likewise.
9751         (regcache_raw_write_part): Likewise.
9752         (regcache_cooked_read_part): Likewise.
9753         (regcache_cooked_write_part): Likewise.
9754         (regcache_raw_supply): Likewise.
9755         (regcache_raw_collect): Likewise.
9756         (regcache_transfer_regset): Likewise.
9757         (regcache_supply_regset): Likewise.
9758         (regcache_collect_regset): Likewise.
9759         (regcache_debug_print_register): Likewise.
9760         (enum regcache_dump_what): Move it to regcache.h.
9761         (regcache_dump): Change it to method dump.
9762         * regcache.h (enum regcache_dump_what): New.
9763         (class regcache): New.
9764         * target.c (target_fetch_registers): Call method
9765         debug_print_register.
9766         (target_store_registers): Likewise.
9767
9768 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9769
9770         * windows-nat.c (struct lm_info_windows): Initialize field.
9771         (windows_make_so): Allocate lm_info_windows with new.
9772         (windows_free_so): Free lm_info_windows with delete.
9773
9774 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9775
9776         * solib-darwin.c (struct lm_info_darwin): Initialize field.
9777         (darwin_current_sos): Allocate lm_info_darwin with new, remove
9778         cleanup.
9779         (darwin_free_so): Free lm_info_darwin with delete.
9780
9781 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9782
9783         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9784         <l_addr_p>: Change type to bool.
9785         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9786         (svr4_free_so): Free lm_info_svr4 with delete.
9787         (svr4_copy_library_list): Replace memcpy with call to copy
9788         constructor.
9789         (library_list_start_library, svr4_default_sos): Allocate
9790         lm_info_svr4 with new.
9791
9792 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9793
9794         * solib-target.c (struct lm_info_target): Add destructor,
9795         initialize fields.
9796         <name>: Change type to std::string.
9797         (library_list_start_library): Allocate lm_info_target with new.
9798         (solib_target_free_library_list): Free lm_info_target with
9799         delete.
9800         (solib_target_current_sos): Adapt to std::string.
9801         (solib_target_free_so): Free lm_info_target with delete.
9802
9803 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9804
9805         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9806         fields.
9807         (frv_current_sos): Allocate lm_info_frv with new.
9808         (frv_relocate_main_executable): Free lm_info_frv with delete,
9809         allocate with new.
9810         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9811
9812 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9813
9814         * solib-frv.c (struct lm_info_frv): Fix indentation.
9815
9816 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9817
9818         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9819         map field.
9820         (dsbt_current_sos): Allocate lm_info_dsbt with new.
9821         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9822         and allocate with new.
9823         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9824
9825 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9826
9827         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9828         <filename, member_name>: Change type to std::string.
9829         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9830         (library_list_start_library): Allocate lm_info_aix with new.
9831         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9832         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9833         with copy constructor.
9834
9835 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9836
9837         * solist.h (struct lm_info): Remove.
9838         (struct lm_info_base): New class.
9839         (struct so_list) <lm_info>: Change type to lm_info_base *.
9840         * nto-tdep.c (struct lm_info): Remove.
9841         (lm_addr): Adjust.
9842         * solib-aix.c (struct lm_info): Rename to ...
9843         (struct lm_info_aix): ... this.  Extend lm_info_base.
9844         (lm_info_p): Rename to ...
9845         (lm_info_aix_p): ... this, and adjust.
9846         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9847         solib_aix_parse_libraries, library_list_start_library,
9848         solib_aix_free_library_list, solib_aix_parse_libraries,
9849         solib_aix_get_library_list,
9850         solib_aix_relocate_section_addresses, solib_aix_free_so,
9851         solib_aix_get_section_offsets,
9852         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9853         Adjust.
9854         (struct solib_aix_inferior_data) <library_list>: Adjust.
9855         * solib-darwin.c (struct lm_info): Rename to ...
9856         (struct lm_info_darwin): ... this.  Extend lm_info_base.
9857         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9858         * solib-dsbt.c (struct lm_info): Rename to ...
9859         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
9860         (struct dsbt_info) <main_executable_lm_info): Adjust.
9861         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9862         dsbt_relocate_section_addresses): Adjust.
9863         * solib-frv.c (struct lm_info): Rename to ...
9864         (struct lm_info_frv): ... this.  Extend lm_info_base.
9865         (main_executable_lm_info): Adjust.
9866         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9867         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9868         find_canonical_descriptor_in_load_object,
9869         frv_fdpic_find_canonical_descriptor): Adjust.
9870         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9871         to lm_info_svr4.
9872         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9873         svr4_clear_so, svr4_copy_library_list,
9874         library_list_start_library, svr4_default_sos, svr4_read_so_list,
9875         svr4_current_sos, svr4_fetch_objfile_link_map,
9876         solist_update_incremental): Adjust.
9877         * solib-svr4.h (struct lm_info_svr4): Move here from
9878         solib-svr4.c.
9879         * solib-target.c (struct lm_info): Rename to ...
9880         (struct lm_info_target): ... this.  Extend lm_info_base.
9881         (lm_info_p): Rename to ...
9882         (lm_info_target_p): ... this.
9883         (solib_target_parse_libraries, library_list_start_segment,
9884         library_list_start_section, library_list_start_library,
9885         library_list_end_library, solib_target_free_library_list,
9886         solib_target_current_sos, solib_target_free_so,
9887         solib_target_relocate_section_addresses): Adjust.
9888         * windows-nat.c (struct lm_info): Rename to ...
9889         (struct lm_info_windows): ... this.  Extend lm_info_base.
9890         (windows_make_so, handle_load_dll, handle_unload_dll,
9891         windows_xfer_shared_libraries): Adjust.
9892
9893 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
9894
9895         * solib-darwin.c (struct darwin_so_list): Remove.
9896         (darwin_current_sos): Allocate an so_list object instead of a
9897         darwin_so_list, separately allocate an lm_info object.
9898         (darwin_free_so): Free lm_info.
9899
9900 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
9901
9902         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9903         with fprintf_filtered.
9904
9905 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9906
9907         * regcache.c (regcache::regcache): New function.
9908         (regcache::~regcache): New function.
9909         (regcache_xmalloc_1): Remove.
9910         (regcache_xmalloc): Call new regcache.
9911         (regcache_xfree): Call delete regcache.
9912         (get_thread_arch_aspace_regcache): Call new regcache.
9913
9914 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9915
9916         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9917         lwp instead of ptid_get_lwp.
9918
9919 2017-04-28  Yao Qi  <yao.qi@linaro.org>
9920
9921         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9922         lwp_info instead of getting from inferior_ptid.
9923
9924 2017-04-27  Keith Seitz  <keiths@redhat.com>
9925
9926         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9927         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9928         (CV_CONVERSION_BADNESS): Define.
9929         (rank_one_type): Remove overly restrictive rvalue reference
9930         rank checks.
9931         Add cv-qualifier checks and subranks for type equality.
9932         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9933         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9934         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9935
9936 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
9937
9938         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9939         count when creating the object.
9940
9941 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
9942             Ulrich Weigand  <uweigand@de.ibm.com>
9943
9944         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9945         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9946         is used in AIX.
9947         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9948         (process_xcoff_symbol): Likewise.
9949         (scan_xcoff_symtab): Likewise.
9950
9951 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9952
9953         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9954         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9955         (ia64_access_reg): Use get_frame_register_unsigned.
9956         (ia64_access_rse_reg): Likewise.
9957         (ia64_libunwind_frame_prev_register): Likewise.
9958
9959 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
9960
9961         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9962         * gdbarch.c: Regenerated.
9963         * gdbarch.h: Regenerated.
9964         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9965         visibility external.
9966         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9967         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9968         (enum cfa_how_kind): Move to ...
9969         (struct dwarf2_frame_state_reg_info): Likewise.
9970         (struct dwarf2_frame_state): Likewise.
9971         * dwarf2-frame.h: ... here.
9972         (dwarf2_frame_state_alloc_regs): New declaration.
9973         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9974         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9975
9976 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9977
9978         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9979         regcache_raw_read_unsigned.
9980         (xtensa_pseudo_register_write): Likewise.
9981
9982 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
9983
9984         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9985         (nds32_pseudo_register_write): Likewise.
9986
9987 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9988
9989         * regcache.c (struct regcache) <readonly_p>: Change its type
9990         to bool.
9991         (regcache_xmalloc_1): Update parameter type and callers update.
9992
9993 2017-04-25  Yao Qi  <yao.qi@linaro.org>
9994
9995         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9996         set_gdbarch_wchar_bit.
9997         * arm-tdep.c (arm_gdbarch_init): Likewise.
9998
9999 2017-04-25  Pedro Alves  <palves@redhat.com>
10000
10001         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
10002         (BothAreRelocatable, memcopy, memmove): Don't define.
10003         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
10004         macros.
10005
10006 2017-04-25  Pedro Alves  <palves@redhat.com>
10007
10008         * common/common-defs.h: Include "common/poison.h".
10009         * common/function-view.h: (Not, Or, Requires): Move to traits.h
10010         and adjust.
10011         * common/poison.h: New file.
10012         * common/traits.h: Include <type_traits>.
10013         (Not, Or, Requires): New, moved from common/function-view.h.
10014
10015 2017-04-25  Pedro Alves  <palves@redhat.com>
10016
10017         * breakpoint.h (struct breakpoint): In-class initialize all
10018         fields.  Make boolean fields "bool".
10019         * breakpoint.c (init_raw_breakpoint_without_location): Remove
10020         memset call and initializations no longer necessary.
10021
10022 2017-04-25  Pedro Alves  <palves@redhat.com>
10023
10024         * btrace.c (pt_btrace_insn_flags): Change parameter type to
10025         reference.
10026         (pt_btrace_insn): New function.
10027         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
10028
10029 2017-04-25  Pedro Alves  <palves@redhat.com>
10030
10031         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
10032         "base" field and inherit from "bp_location" instead.  Add
10033         non-default ctor.
10034         (allocate_location_exception): Use new non-default ctor.
10035         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
10036         (init_bp_location): Convert to ...
10037         (bp_location::bp_location): ... this new ctor, and remove memset
10038         call.
10039         (base_breakpoint_allocate_location): Use the new non-default ctor.
10040         * breakpoint.h (bp_location): Now a class.  Declare default and
10041         non-default ctors.  In-class initialize all members.
10042         (init_bp_location): Remove declaration.
10043
10044 2017-04-25  Pedro Alves  <palves@redhat.com>
10045
10046         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
10047         assignment operator.
10048
10049 2017-04-24  Yao Qi  <yao.qi@linaro.org>
10050
10051         * doublest.c (convert_doublest_to_floatformat): Call
10052         floatformat_totalsize_bytes.
10053
10054 2017-04-22  Tom Tromey  <tom@tromey.com>
10055
10056         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
10057         ui_out_emit_list.
10058         * stack.c (print_frame): Use ui_out_emit_list.
10059         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10060         ui_out_emit_list.
10061         * mi/mi-main.c (print_one_inferior)
10062         (mi_cmd_data_list_register_names)
10063         (mi_cmd_data_list_register_values, mi_cmd_list_features)
10064         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
10065         ui_out_emit_list.
10066         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
10067         (mi_output_solib_attribs): Use ui_out_emit_list,
10068         ui_out_emit_tuple.
10069         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
10070         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
10071         (mi_cmd_stack_list_args, list_args_or_locals): Use
10072         ui_out_emit_list.
10073         * disasm.c (do_assembly_only): Use ui_out_emit_list.
10074         * breakpoint.c (print_solib_event, output_thread_groups): Use
10075         ui_out_emit_list.
10076
10077 2017-04-22  Tom Tromey  <tom@tromey.com>
10078
10079         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
10080         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
10081         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
10082
10083 2017-04-22  Tom Tromey  <tom@tromey.com>
10084
10085         * tracepoint.c (tvariables_info_1)
10086         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
10087
10088 2017-04-22  Tom Tromey  <tom@tromey.com>
10089
10090         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
10091         annotate_arg_emitter.
10092         * breakpoint.c (print_mention_watchpoint)
10093         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
10094         * annotate.h (struct annotate_arg_emitter): New.
10095
10096 2017-04-22  Tom Tromey  <tom@tromey.com>
10097
10098         * record-btrace.c (record_btrace_insn_history)
10099         (record_btrace_insn_history_range, record_btrace_call_history)
10100         (record_btrace_call_history_range): Use ui_out_emit_tuple.
10101         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
10102         ui_out_emit_tuple.
10103         * stack.c (print_frame_info): Use ui_out_emit_tuple.
10104         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
10105         * skip.c (skip_info): Use ui_out_emit_tuple.
10106         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
10107         * progspace.c (print_program_space): Use ui_out_emit_tuple.
10108         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
10109         * osdata.c (info_osdata): Use ui_out_emit_tuple.
10110         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
10111         ui_out_emit_tuple.
10112         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
10113         (output_register, mi_cmd_data_read_memory)
10114         (mi_cmd_data_read_memory_bytes, mi_load_progress)
10115         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
10116         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
10117         Use ui_out_emit_tuple.
10118         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
10119         ui_out_emit_tuple.
10120         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10121         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
10122         * linux-thread-db.c (info_auto_load_libthread_db): Use
10123         ui_out_emit_tuple.
10124         * inferior.c (print_inferior): Use ui_out_emit_tuple.
10125         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
10126         * disasm.c (do_mixed_source_and_assembly_deprecated)
10127         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
10128         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
10129         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
10130         * breakpoint.c (print_one_breakpoint_location)
10131         (print_one_breakpoint): Use ui_out_emit_tuple.
10132         * auto-load.c (print_script, info_auto_load_cmd): Use
10133         ui_out_emit_tuple.
10134         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
10135
10136 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
10137
10138         * thread.c (print_thread_info_1): Remove dead code.
10139
10140 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
10141
10142         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
10143         GDB_SELF_TEST.
10144         * arm-tdep.c (selftests::arm_record_test): Likewise.
10145
10146 2017-04-21  Yao Qi  <yao.qi@linaro.org>
10147
10148         * regcache.c (regcache_restore): Remove argument 2.  Replace
10149         argument 3 with regcache.  Get register status from
10150         src->register_status and get register contents from
10151         register_buffer (src, regnum).
10152         (regcache_cpy): Update.
10153
10154 2017-04-19  Pedro Alves  <palves@redhat.com>
10155
10156         * gdbthread.h (thread): Add missing closing parenthesis in
10157         comment.
10158
10159 2017-04-19  Pedro Alves  <palves@redhat.com>
10160
10161         * common/refcounted-object.h: New file.
10162         * gdbthread.h: Include "common/refcounted-object.h".
10163         (thread_info): Inherit from refcounted_object and add comments.
10164         (thread_info::incref, thread_info::decref)
10165         (thread_info::m_refcount): Delete.
10166         (thread_info::deletable): Use the refcounted_object::refcount()
10167         method.
10168         * inferior.c (current_inferior_): Add comment.
10169         (set_current_inferior): Increment/decrement refcounts.
10170         (prune_inferiors, remove_inferior_command): Skip inferiors marked
10171         not-deletable instead of comparing with the current inferior.
10172         (initialize_inferiors): Increment the initial inferior's refcount.
10173         * inferior.h (struct inferior): Forward declare.
10174         Include "common/refcounted-object.h".
10175         (current_inferior, set_current_inferior): Move declaration to
10176         before struct inferior's definition, and fix comment.
10177         (inferior): Inherit from refcounted_object.  Add comments.
10178         * thread.c (switch_to_thread_no_regs): Reference the thread's
10179         inferior pointer directly instead of doing a ptid lookup.
10180         (switch_to_no_thread): New function.
10181         (switch_to_thread(thread_info *)): New function, factored out
10182         from ...
10183         (switch_to_thread(ptid_t)): ... this.
10184         (restore_current_thread): Delete.
10185         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
10186         fields, and add 'inf' field.
10187         (do_restore_current_thread_cleanup): Check whether old->inf is
10188         alive instead of looking up an inferior by ptid.  Use
10189         switch_to_thread and switch_to_no_thread.
10190         (restore_current_thread_cleanup_dtor): Use old->inf directly
10191         instead of lookup up an inferior by id.  Decref the inferior.
10192         Don't restore 'removable'.
10193         (make_cleanup_restore_current_thread): Same the inferior pointer
10194         in old, instead of the inferior number.  Incref the inferior.
10195         Don't save/clear 'removable'.
10196
10197 2017-04-19  Pedro Alves  <palves@redhat.com>
10198
10199         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10200         unittests/scoped_restore-selftests.c.
10201         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10202         * common/scoped_restore.h (scoped_restore_base): Make "class".
10203         (scoped_restore_base::release): New public method.
10204         (scoped_restore_base::scoped_restore_base): New protected ctor.
10205         (scoped_restore_base::m_saved_var): New protected field.
10206         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10207         scoped_restore_base base class instead of m_saved_var directly.
10208         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10209         (scoped_restore_tmpl::scoped_restore_tmpl(const
10210         scoped_restore_tmpl<T>&)): Likewise.
10211         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10212         method.
10213         (scoped_restore_tmpl::saved_var): New method.
10214         (scoped_restore_tmpl::m_saved_var): Delete.
10215         * inferior.h (inferior::detaching): Now a bool.
10216         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10217         cleanup.
10218         * unittests/scoped_restore-selftests.c: New file.
10219
10220 2017-04-19  Pedro Alves  <palves@redhat.com>
10221
10222         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10223         Re-sort in alphabetic order.
10224
10225 2017-04-18  Pedro Alves  <palves@redhat.com>
10226
10227         * xml-support.c (obstack_xml_printf): Delete.
10228         * xml-support.h (obstack_xml_printf): Delete.
10229
10230 2017-04-18  Pedro Alves  <palves@redhat.com>
10231
10232         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10233         vdebug, verror, body_text, start_element, end_element, name,
10234         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10235         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10236         is_xinclude>: Make private and add m_ prefix.
10237         (gdb_xml_parser::body_text): New method, based on ...
10238         (gdb_xml_body_text): ... this.  Adjust.
10239         (gdb_xml_parser::vdebug): New method, based on ...
10240         (gdb_xml_debug): ... this.  Adjust.
10241         (gdb_xml_parser::verror): New method, based on ...
10242         (gdb_xml_error): ... this.  Adjust.
10243         (gdb_xml_parser::start_element): New method, based on ...
10244         (gdb_xml_start_element): ... this.  Adjust.
10245         (gdb_xml_start_element_wrapper): Defer to
10246         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10247         (gdb_xml_parser::end_element): New method, based on ...
10248         (gdb_xml_end_element_wrapper): ... this.  Adjust.
10249         (gdb_xml_parser::~gdb_xml_parser): Adjust.
10250         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10251         (gdb_xml_parser::use_dtd): New method, based on ...
10252         (gdb_xml_use_dtd): ... this.  Adjust.
10253         (gdb_xml_parser::parse): New method, based on ...
10254         (gdb_xml_parse): ... this.  Adjust.
10255         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10256         (xinclude_start_include): Adjust to call the parser's name method.
10257         (xml_xinclude_default, xml_xinclude_start_doctype)
10258         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10259         method.
10260         (xml_process_xincludes): Adjust to call parser methods.
10261         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10262         declarations.
10263
10264 2017-04-18  Pedro Alves  <palves@redhat.com>
10265
10266         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10267         gdb::optional<std::string>.
10268         * xml-support.c: Include <string>.
10269         (scope_level::scope_level(scope_level &&))
10270         (scope_level::~scope_level): Delete.
10271         (scope_level::body): Now a std::string.
10272         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10273         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10274         parameter.
10275         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10276         (xinclude_parsing_data::output): Now a std::string reference.
10277         (xinclude_start_include): Adjust.
10278         (xml_xinclude_default): Adjust.
10279         (xml_process_xincludes): Add 'output' parameter, and return bool.
10280         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10281         and return bool.
10282         * xml-tdesc.c: Include <unordered_map> and <string>.
10283         (tdesc_xml_cache): Delete.
10284         (tdesc_xml_cache_s): Delete.
10285         (xml_cache): Now an std::unordered_map.
10286         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10287         (target_fetch_description_xml): Change return type to
10288         gdb::optional<std::string>, and adjust.
10289         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10290         (target_fetch_description_xml): Change return type to
10291         gdb::optional<std::string>.
10292
10293 2017-04-18  Pedro Alves  <palves@redhat.com>
10294
10295         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10296         unittests/optional-selftests.c.
10297         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10298         * unittests/optional-selftests.c: New file.
10299         * unittests/optional/assignment/1.cc: New file.
10300         * unittests/optional/assignment/2.cc: New file.
10301         * unittests/optional/assignment/3.cc: New file.
10302         * unittests/optional/assignment/4.cc: New file.
10303         * unittests/optional/assignment/5.cc: New file.
10304         * unittests/optional/assignment/6.cc: New file.
10305         * unittests/optional/assignment/7.cc: New file.
10306         * unittests/optional/cons/copy.cc: New file.
10307         * unittests/optional/cons/default.cc: New file.
10308         * unittests/optional/cons/move.cc: New file.
10309         * unittests/optional/cons/value.cc: New file.
10310         * unittests/optional/in_place.cc: New file.
10311         * unittests/optional/observers/1.cc: New file.
10312         * unittests/optional/observers/2.cc: New file.
10313
10314 2017-04-18  Pedro Alves  <palves@redhat.com>
10315
10316         * common/gdb_optional.h: Include common/traits.h.
10317         (in_place_t): New type.
10318         (in_place): New constexpr variable.
10319         (optional::optional): Remove member initialization of
10320         m_instantiated.
10321         (optional::optional(in_place_t...)): New constructor.
10322         (optional::~optional): Use reset.
10323         (optional::optional(const optional&)): New.
10324         (optional::optional(const optional&&)): New.
10325         (optional::optional(T &)): New.
10326         (optional::optional(T &&)): New.
10327         (operator::operator=(const optional &)): New.
10328         (operator::operator=(optional &&)): New.
10329         (operator::operator= (const T &))
10330         (operator::operator= (T &&))
10331         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
10332         (operator::reset): New.
10333         (operator::m_instantiated):: Add in-class initializer.
10334         * common/traits.h: Include <type_traits>.
10335         (struct And): New types.
10336
10337 2017-04-18  Pedro Alves  <palves@redhat.com>
10338
10339         * xml-support.c: Include <vector>.
10340         (scope_level::scope_level(const gdb_xml_element *))
10341         (scope_level::scope_level(scope_level&&)): New.
10342         (scope_level::~scope_level): New.
10343         (scope_level_s): Delete.
10344         (gdb_xml_parser::scopes): Now a std::vector.
10345         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10346         Use std::vector.
10347         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10348         scope cleanup code.
10349         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10350         of the scopes member.  Use std::vector::emplace_back.
10351
10352 2017-04-18  Pedro Alves  <palves@redhat.com>
10353
10354         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
10355         a bool.
10356         (gdb_xml_end_element): Change type of first parameter.
10357         (gdb_xml_cleanup): Rename to ...
10358         (gdb_xml_parser::~gdb_xml_parser): ... this.
10359         (gdb_xml_create_parser_and_cleanup): Delete with ...
10360         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10361         to this new ctor.
10362         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10363         using gdb_xml_create_parser_and_cleanup.
10364         (xinclude_parsing_data): Add ctor/dtor.
10365         (xml_xinclude_cleanup): Delete.
10366         (xml_process_xincludes): Create a local xinclude_parsing_data
10367         instead of heap-allocating one.  Create a local gdb_xml_parser
10368         instead of heap-allocating one with
10369         gdb_xml_create_parser_and_cleanup.
10370
10371 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
10372
10373         PR threads/20743
10374         * fbsd-nat.c (resume_one_thread_cb): Remove.
10375         (resume_all_threads_cb): Remove.
10376         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10377         iterate_over_threads.
10378
10379 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10380
10381         * NEWS: Create a new section for the next release branch.
10382         Rename the section of the current branch, now that it has
10383         been cut.
10384
10385 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
10386
10387         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10388         * version.in: Bump version to 8.0.50.DATE-git.
10389
10390 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
10391
10392         PR gdb/21385
10393         * windows-nat.c (windows_create_inferior): Declare 'allargs'
10394         independently of the host, and fix build breakage on Cygwin.
10395
10396 2017-04-13  Pedro Alves  <palves@redhat.com>
10397
10398         * inferior.c (free_inferior): Convert to ...
10399         (inferior::~inferior): ... this dtor.
10400         (inferior::inferior): New ctor, factored out from ...
10401         (add_inferior_silent): ... here.  Allocate the inferior with a new
10402         expression.
10403         (delete_inferior): Call delete instead of free_inferior.
10404         * inferior.h (gdb_environ, continuation): Forward declare.
10405         (inferior): Now a class.  Add in-class initialization to all
10406         members.  Make boolean fields bool, except 'detaching'.
10407         (inferior::inferior): New explicit ctor.
10408         (inferior::~inferior): New.
10409
10410 2017-04-13  Pedro Alves  <palves@redhat.com>
10411
10412         * inferior.c (init_inferior_list): Delete.
10413         * inferior.h (init_inferior_list): Delete.
10414
10415 2017-04-13  Pedro Alves  <palves@redhat.com>
10416
10417         PR threads/13217
10418         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10419         (top level): Call it twice, with different thread sets.
10420
10421 2017-04-13  Pedro Alves  <palves@redhat.com>
10422
10423         * thread.c: Include <algorithm>.
10424         (thread_array_cleanup): Delete.
10425         (scoped_inc_dec_ref): New class.
10426         (live_threads_count): New function.
10427         (set_thread_refcount): Delete.
10428         (tp_array_compar_ascending): Now a bool.
10429         (tp_array_compar): Convert to a std::sort comparison function.
10430         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10431         and live_threads_count.
10432
10433 2017-04-13  Pedro Alves  <palves@redhat.com>
10434
10435         * infrun.c (follow_fork_inferior): Also switch the current
10436         inferior.
10437
10438 2017-04-13  Pedro Alves  <palves@redhat.com>
10439
10440         * breakpoint.c (watch_command_1): Save watchpoint-frame info
10441         before calling create_internal_breakpoint.
10442
10443 2017-04-13  Pedro Alves  <palves@redhat.com>
10444
10445         * fork-child.c (execv_argv): New class.
10446         (breakup_args): Refactored as ...
10447         (execv_argv::init_for_no_shell): .. this method of execv_argv.
10448         Copy arguments to storage and replace separators with NULL
10449         terminators in place.
10450         (escape_bang_in_quoted_argument): Adjust to return bool.
10451         (execv_argv::execv_argv): New ctor.
10452         (execv_argv::init_for_shell): New method, factored out from
10453         fork_inferior.  Don't strdup strings into the vector.
10454         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
10455         Remove free_vector_argv call.
10456
10457 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10458
10459         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10460         tdep->rx_psw_type.
10461
10462 2017-04-13  Yao Qi  <yao.qi@linaro.org>
10463
10464         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10465         * rx-tdep.c (rx_gdbarch_init): Likewise.
10466
10467 2017-04-13  Pedro Alves  <palves@redhat.com>
10468
10469         * breakpoint.h (struct breakpoint): Reindent.
10470
10471 2017-04-13  Pedro Alves  <palves@redhat.com>
10472
10473         * breakpoint.c (bp_location): Rename to ...
10474         (bp_locations): ... this.  All references updated.
10475         (bp_location_count): Rename to ...
10476         (bp_locations_count): ... this.  All references updated.
10477         (bp_location_placed_address_before_address_max): Rename to ...
10478         (bp_locations_placed_address_before_address_max): ... this.  All
10479         references updated.
10480         (bp_location_shadow_len_after_address_max): Rename to ...
10481         (bp_locations_shadow_len_after_address_max): ... this.  All
10482         references updated.
10483         (bp_location_compare_addrs): Rename to ...
10484         (bp_locations_compare_addrs): ... this.  All references updated.
10485         (bp_location_compare):Rename to ...
10486         (bp_locations_compare): ... this.  All references updated.
10487         (bp_location_target_extensions_update): Rename to ...
10488         (bp_locations_target_extensions_update): ... this.  All references
10489         updated.
10490
10491 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10492
10493         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10494         * common/common.m4: Check headers 'termios.h', 'termio.h' and
10495         'sgtty.h'.
10496         * common/gdb_termios.h: New file, with parts of "terminal.h".
10497         * inflow.c: Include "gdb_termios.h".
10498         * ser-unix.c: Include "gdb_termios.h".
10499         * terminal.h: Move terminal-related defines to
10500         "common/gdb_termios.h".
10501
10502 2017-04-12  Tom Tromey  <tom@tromey.com>
10503
10504         * probe.c (parse_probes): Update.
10505         * location.h (delete_event_location): Don't declare.
10506         (event_location_deleter::operator()): Update.
10507         * location.c (event_location_deleter::operator()): Rename from
10508         delete_event_location.
10509         * linespec.h (linespec_result) <location>: Change type to
10510         event_location_up.
10511         * linespec.c (canonicalize_linespec, event_location_to_sals)
10512         (decode_objc): Update.
10513         (linespec_result): Don't call delete_event_location.
10514         * breakpoint.c (create_breakpoints_sal)
10515         (bkpt_probe_create_sals_from_location)
10516         (strace_marker_create_sals_from_location): Update.
10517
10518 2017-04-12  Tom Tromey  <tom@tromey.com>
10519
10520         * linespec.h (struct linespec_result): Add constructor and
10521         destructor.
10522         (init_linespec_result, destroy_linespec_result)
10523         (make_cleanup_destroy_linespec_result): Don't declare.
10524         * linespec.c (init_linespec_result): Remove.
10525         (linespec_result::~linespec_result): Rename from
10526         destroy_linespec_result.  Update.
10527         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10528         Remove.
10529         * breakpoint.c (create_breakpoint, break_range_command)
10530         (decode_location_default): Update.
10531         * ax-gdb.c (agent_command_1): Update.
10532
10533 2017-04-12  Tom Tromey  <tom@tromey.com>
10534
10535         * remote.c (remote_download_tracepoint): Update.
10536         * python/py-breakpoint.c (bppy_get_location): Update.
10537         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10538         (gdbscm_breakpoint_location): Update.
10539         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10540         * breakpoint.h (struct breakpoint) <location, location_range_end>:
10541         Change type to event_location_up.
10542         * breakpoint.c (create_overlay_event_breakpoint)
10543         (create_longjmp_master_breakpoint)
10544         (create_std_terminate_master_breakpoint)
10545         (create_exception_master_breakpoint)
10546         (breakpoint_event_location_empty_p, print_breakpoint_location)
10547         (print_one_breakpoint_location, create_thread_event_breakpoint)
10548         (init_breakpoint_sal, create_breakpoint)
10549         (print_recreate_ranged_breakpoint, break_range_command)
10550         (init_ada_exception_breakpoint, say_where): Update.
10551         (base_breakpoint_dtor): Don't call delete_event_location.
10552         (bkpt_print_recreate, tracepoint_print_recreate)
10553         (dprintf_print_recreate, update_static_tracepoint)
10554         (breakpoint_re_set_default): Update.
10555
10556 2017-04-12  Tom Tromey  <tom@tromey.com>
10557
10558         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10559         type of "to_do".  Update.
10560         (compute_stack_depth): Use std::vector.
10561
10562 2017-04-12  Tom Tromey  <tom@tromey.com>
10563
10564         * printcmd.c (find_instruction_backward): Use std::vector.
10565
10566 2017-04-12  Tom Tromey  <tom@tromey.com>
10567
10568         * symfile.c (objfilep): Remove typedef.
10569         (reread_symbols): Use a std::vector.
10570
10571 2017-04-12  Tom Tromey  <tom@tromey.com>
10572
10573         * mi/mi-main.c (exec_direction_forward): Remove.
10574         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10575         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10576         scoped_restore.
10577         * guile/guile.c (guile_repl_command, guile_command)
10578         (gdbscm_execute_gdb_command): Use scoped_restore.
10579         * go-exp.y (go_parse): Use scoped_restore.
10580         * d-exp.y (d_parse): Use scoped_restore.
10581         * cli/cli-decode.c (cmd_func): Use scoped_restore.
10582         * c-exp.y (c_parse): Use scoped_restore.
10583
10584 2017-04-12  Tom Tromey  <tom@tromey.com>
10585
10586         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10587         (mi_parse): Update return type.
10588         (mi_parse_free): Remove.
10589         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10590         (mi_parse::~mi_parse): Rename from mi_parse_free.
10591         (mi_parse_cleanup): Remove.
10592         (mi_parse): Return a unique_ptr.  Use new.
10593         * mi/mi-main.c (mi_execute_command): Update.
10594
10595 2017-04-12  Tom Tromey  <tom@tromey.com>
10596
10597         * location.c (explicit_location_lex_one): Return a
10598         unique_xmalloc_ptr.
10599         (string_to_explicit_location): Update.  Remove cleanups.
10600
10601 2017-04-12  Tom Tromey  <tom@tromey.com>
10602
10603         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10604         (compare_value_and_voffset): Change type.  Update.
10605         (compute_vtable_size): Change type of "offset_vec".
10606         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
10607         (gnuv3_get_typeid): Remove extraneous declaration.
10608
10609 2017-04-12  Tom Tromey  <tom@tromey.com>
10610
10611         * charset.h (wchar_iterator): Fix comment.
10612
10613 2017-04-12  Tom Tromey  <tom@tromey.com>
10614
10615         * charset.c (iconv_wrapper): New class.
10616         (cleanup_iconv): Remove.
10617         (convert_between_encodings): Use it.
10618
10619 2017-04-12  Tom Tromey  <tom@tromey.com>
10620
10621         * symfile.h (increment_reading_symtab): Update type.
10622         * symfile.c (decrement_reading_symtab): Remove.
10623         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10624         * psymtab.c (psymtab_to_symtab): Update.
10625         * dwarf2read.c (dw2_instantiate_symtab): Update.
10626
10627 2017-04-12  Tom Tromey  <tom@tromey.com>
10628
10629         * jit.c (struct jit_reader): Declare separately.  Add constructor
10630         and destructor.  Change type of "handle".
10631         (loaded_jit_reader): Define separately.
10632         (jit_reader_load): Update.  New "new".
10633         (jit_reader_unload_command): Use "delete".
10634         * gdb-dlfcn.h (struct dlclose_deleter): New.
10635         (gdb_dlhandle_up): New typedef.
10636         (gdb_dlopen, gdb_dlsym): Update types.
10637         (gdb_dlclose): Remove.
10638         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10639         (gdb_dlsym): Change type of "handle".
10640         (make_cleanup_dlclose): Remove.
10641         (dlclose_deleter::operator()): Rename from gdb_dlclose.
10642         * compile/compile-c-support.c (load_libcc): Update.
10643
10644 2017-04-12  Tom Tromey  <tom@tromey.com>
10645
10646         * symtab.h (find_pcs_for_symtab_line): Change return type.
10647         * symtab.c (find_pcs_for_symtab_line): Change return type.
10648         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10649         type of "vec".  Update.
10650         (ltpy_get_pcs_for_line): Update.
10651         * linespec.c (decode_digits_ordinary): Update.
10652
10653 2017-04-12  Tom Tromey  <tom@tromey.com>
10654
10655         * tracepoint.c (actions_command): Update.
10656         * python/python.c (python_command, python_interactive_command):
10657         Update.
10658         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10659         * guile/guile.c (guile_command): Update.
10660         * defs.h (read_command_lines, read_command_lines_1): Return
10661         command_line_up.
10662         (command_lines_deleter): New struct.
10663         (command_line_up): New typedef.
10664         * compile/compile.c (compile_code_command)
10665         (compile_print_command): Update.
10666         * cli/cli-script.h (get_command_line, copy_command_lines): Return
10667         command_line_up.
10668         (make_cleanup_free_command_lines): Remove.
10669         * cli/cli-script.c (get_command_line, read_command_lines_1)
10670         (copy_command_lines): Return command_line_up.
10671         (while_command, if_command, read_command_lines, define_command)
10672         (document_command): Update.
10673         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10674         Remove.
10675         * breakpoint.h (breakpoint_set_commands): Change type of
10676         "commands".
10677         * breakpoint.c (breakpoint_set_commands): Change type of
10678         "commands".  Update.
10679         (do_map_commands_command, update_dprintf_command_list)
10680         (create_tracepoint_from_upload): Update.
10681
10682 2017-04-12  Tom Tromey  <tom@tromey.com>
10683
10684         * tracepoint.c (scope_info): Update.
10685         * spu-tdep.c (spu_catch_start): Update.
10686         * python/python.c (gdbpy_decode_line): Update.
10687         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10688         * python/py-breakpoint.c (bppy_init): Update.
10689         * probe.c (parse_probes): Update.
10690         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10691         * location.h (event_location_deleter): New struct.
10692         (event_location_up): New typedef.
10693         (new_linespec_location, new_address_location, new_probe_location)
10694         (new_explicit_location, copy_event_location)
10695         (string_to_event_location, string_to_event_location_basic)
10696         (string_to_explicit_location): Update return type.
10697         (make_cleanup_delete_event_location): Remove.
10698         * location.c (new_linespec_location, new_address_location)
10699         (new_probe_location, new_explicit_location, copy_event_location):
10700         Return event_location_up.
10701         (delete_event_location_cleanup)
10702         (make_cleanup_delete_event_location): Remove.
10703         (string_to_explicit_location, string_to_event_location_basic)
10704         (string_to_event_location): Return event_location_up.
10705         * linespec.c (canonicalize_linespec, event_location_to_sals)
10706         (decode_line_with_current_source)
10707         (decode_line_with_last_displayed, decode_objc): Update.
10708         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10709         * completer.c (location_completer): Update.
10710         * cli/cli-cmds.c (edit_command, list_command): Update.
10711         * breakpoint.c (create_overlay_event_breakpoint)
10712         (create_longjmp_master_breakpoint)
10713         (create_std_terminate_master_breakpoint)
10714         (create_exception_master_breakpoint)
10715         (create_thread_event_breakpoint): Update.
10716         (init_breakpoint_sal): Update.  Remove some dead code.
10717         (create_breakpoint_sal): Change type of "location".  Update.
10718         (create_breakpoints_sal, create_breakpoint, break_command_1)
10719         (dprintf_command, break_range_command, until_break_command)
10720         (init_ada_exception_breakpoint)
10721         (strace_marker_create_sals_from_location)
10722         (update_static_tracepoint, trace_command, ftrace_command)
10723         (strace_command, create_tracepoint_from_upload): Update.
10724         * break-catch-throw.c (re_set_exception_catchpoint): Update.
10725         * ax-gdb.c (agent_command_1): Update.
10726
10727 2017-04-12  Pedro Alves  <palves@redhat.com>
10728
10729         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10730         * configure.tgt: Handle i[34567]86-*-go32* and
10731         i[34567]86-*-msdosdjgpp*.
10732         * i386-tdep.c (i386_svr4_reg_to_regnum):
10733         Make extern.
10734         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10735         i386-go32-tdep.c.
10736         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10737         * i386-go32-tdep.c: New file.
10738         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10739         declarations.
10740
10741 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
10742
10743         * aix-thread.c (pd_status2str): Change return type to const char *.
10744
10745 2017-04-12  Pedro Alves  <palves@redhat.com>
10746
10747         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10748         calls to set_gdbarch_gnu_triplet_regexp.
10749
10750 2017-04-12  Pedro Alves  <palves@redhat.com>
10751
10752         PR gdb/21323
10753         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10754         New enum value.
10755         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10756         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10757         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10758         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10759         * gdbarch.h, gdbarch.c: Regenerate.
10760         * aarch64-tdep.c (aarch64_gdbarch_init): Override
10761         gdbarch_wchar_bit and gdbarch_wchar_signed.
10762         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10763         * arm-tdep.c (arm_gdbarch_init): Likewise.
10764         * avr-tdep.c (avr_gdbarch_init): Likewise.
10765         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10766         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10767         * i386-tdep.c (i386_go32_init_abi): Likewise.
10768         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10769         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10770         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10771         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10772         * sh-tdep.c (sh_gdbarch_init): Likewise.
10773         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10774         * sparc64-tdep.c (sparc64_init_abi): Likewise.
10775         * windows-tdep.c (windows_init_abi): Likewise.
10776         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10777
10778 2017-04-12  Pedro Alves  <palves@redhat.com>
10779
10780         PR c++/21323
10781         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10782         cplus_primitive_type_char32_t>: New enum values.
10783         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10784         and cplus_primitive_type_char32_t.
10785         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10786         32, use the archtecture's built-in type for char16_t and char32_t,
10787         respectively.  Otherwise, fallback to init_integer_type as before,
10788         but make the type unsigned, and issue a complaint.
10789         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10790
10791 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
10792
10793         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10794         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10795
10796 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10797
10798         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10799         'const char *'.
10800
10801 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
10802
10803         * common/common-utils.c (free_vector_argv): New function.
10804         * common/common-utils.h: Include <vector>.
10805         (free_vector_argv): New prototype.
10806         * darwin-nat.c (darwin_create_inferior): Rewrite function
10807         prototype in order to constify "exec_file" and accept a
10808         "std::string" for "allargs".
10809         * fork-child.c: Include <vector>.
10810         (breakup_args): Rewrite function, using C++.
10811         (fork_inferior): Rewrite function header, constify "exec_file_arg"
10812         and accept "std::string" for "allargs".  Update the code to
10813         calculate "argv" based on "allargs".  Update calls to "exec_fun"
10814         and "execvp".
10815         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10816         order to constify "exec_file" and accept a "std::string" for
10817         "allargs".
10818         * go32-nat.c (go32_create_inferior): Likewise.
10819         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10820         * infcmd.c (run_command_1): Constify "exec_file".  Use
10821         "std::string" for inferior arguments.
10822         * inferior.h (fork_inferior): Update prototype.
10823         * linux-nat.c (linux_nat_create_inferior): Rewrite function
10824         prototype in order to constify "exec_file" and accept a
10825         "std::string" for "allargs".
10826         * nto-procfs.c (procfs_create_inferior): Likewise.
10827         * procfs.c (procfs_create_inferior): Likewise.
10828         * remote-sim.c (gdbsim_create_inferior): Likewise.
10829         * remote.c (extended_remote_run): Update code to accept
10830         "std::string" as argument.
10831         (extended_remote_create_inferior): Rewrite function prototype in
10832         order to constify "exec_file" and accept a "std::string" for
10833         "allargs".
10834         * rs6000-nat.c (super_create_inferior): Likewise.
10835         (rs6000_create_inferior): Likewise.
10836         * target.h (struct target_ops) <to_create_inferior>: Likewise.
10837         * windows-nat.c (windows_create_inferior): Likewise.
10838
10839 2017-04-11  Pedro Alves  <palves@redhat.com>
10840
10841         * thread.c: Fix whitespace throughout.
10842
10843 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10844
10845         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10846
10847 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
10848
10849         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10850
10851 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
10852
10853         PR gdb/21364
10854         * osdata.c (info_osdata): Check if 'type' is an empty string
10855         instead of NULL.
10856
10857 2017-04-10  Pedro Alves  <palves@redhat.com>
10858
10859         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10860         (ptid_to_global_thread_id, in_thread_list)
10861         (do_captured_list_thread_ids, set_resumed, set_running)
10862         (set_executing, set_stop_requested, finish_thread_state)
10863         (validate_registers_access, can_access_registers_ptid)
10864         (print_thread_info_1, switch_to_thread)
10865         (do_restore_current_thread_cleanup)
10866         (make_cleanup_restore_current_thread, thread_command)
10867         (thread_name_command): Use operator== instead of ptid_equal.
10868
10869 2017-04-10  Pedro Alves  <palves@redhat.com>
10870
10871         * thread.c (struct current_thread_cleanup) <next>: Delete field.
10872         (current_thread_cleanup_chain): Delete.
10873         (restore_current_thread_cleanup_dtor)
10874         (make_cleanup_restore_current_thread): Remove references to
10875         current_thread_cleanup_chain.
10876
10877 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
10878
10879         * msp430-tdep.c (msp430_pseudo_register_read): Never return
10880         REG_UNKNOWN.
10881
10882 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10883
10884         PR gdb/19942
10885         * gdbthread.h (thread_info::deletable): New method.
10886         (thread_info::incref): New method.
10887         (thread_info::decref): New method.
10888         (thread_info::refcount): Move it to private.
10889         * infrun.c (save_stop_context): Call inc_refcount.
10890         (release_stop_context_cleanup): Likewise.
10891         * thread.c (set_thread_exited): New function.
10892         (init_thread_list): Delete "tp" only it is deletable, otherwise
10893         call set_thread_exited.
10894         (delete_thread_1): Call set_thread_exited.
10895         (current_thread_cleanup) <inferior_pid>: Remove.
10896         <thread>: New field.
10897         (restore_current_thread_ptid_changed): Removed.
10898         (do_restore_current_thread_cleanup): Adjust.
10899         (restore_current_thread_cleanup_dtor): Don't call
10900         find_thread_ptid.
10901         (set_thread_refcount): Use dec_refcount.
10902         (make_cleanup_restore_current_thread): Adjust.
10903         (thread_apply_all_command): Call inc_refcount.
10904         (_initialize_thread): Don't call
10905         observer_attach_thread_ptid_changed.
10906
10907 2017-04-10  Yao Qi  <yao.qi@linaro.org>
10908
10909         * thread.c (delete_thread_1): Hoist code on marking thread as
10910         exited.
10911
10912 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10913
10914         * windows-nat.c (windows_detach): Initialize ptid with
10915         minus_one_ptid.
10916
10917 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10918
10919         * unittests/ptid-selftests.c: Fix erroneous assert messages.
10920
10921 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
10922
10923         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10924         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10925         (bfin_pseudo_register_write): Likewise
10926
10927 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
10928
10929         * common/ptid.h (struct ptid): Change to...
10930         (class ptid_t): ... this.
10931         <ptid_t>: New constructors.
10932         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10933         matches>: New methods.
10934         <make_null, make_minus_one>: New static methods.
10935         <pid>: Rename to...
10936         <m_pid>: ...this.
10937         <lwp>: Rename to...
10938         <m_lwp>: ...this.
10939         <tid>: Rename to...
10940         <m_tid>: ...this.
10941         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10942         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10943         as references, move comment to class ptid_t.
10944         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10945         ptid_t static methods.
10946         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10947         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10948         Take ptid arguments as references, implement using ptid_t methods.
10949         * unittests/ptid-selftests.c: New file.
10950         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10951         unittests/ptid-selftests.c.
10952         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10953
10954 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10955
10956         * python/python.c (python_run_simple_file): Cast mode literal to
10957         non-const char pointer as expected by PyFile_FromString.
10958
10959 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
10960
10961         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10962         minus_one_ptid and null_ptid.
10963
10964 2017-04-05  Pedro Alves  <palves@redhat.com>
10965
10966         * warning.m4 (build_warnings): Remove -Wno-write-strings.
10967         * configure: Regenerate.
10968
10969 2017-04-05  Pedro Alves  <palves@redhat.com>
10970
10971         * ada-exp.y (yyerror): Constify.
10972         * ada-lang.c (bound_name, get_selections)
10973         (ada_variant_discrim_type)
10974         (ada_variant_discrim_name, ada_value_struct_elt)
10975         (ada_lookup_struct_elt_type, is_unchecked_variant)
10976         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10977         (catch_ada_exception_command_split)
10978         (catch_ada_assert_command_split, catch_assert_command)
10979         (ada_op_name): Constify.
10980         * ada-lang.h (ada_yyerror, get_selections)
10981         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10982         * arc-tdep.c (arc_print_frame_cache): Constify.
10983         * arm-tdep.c (arm_skip_stub): Constify.
10984         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10985         (gen_aggregate_elt_ref): Constify.
10986         * bcache.c (print_bcache_statistics): Constify.
10987         * bcache.h (print_bcache_statistics): Constify.
10988         * break-catch-throw.c (catch_exception_command_1):
10989         * breakpoint.c (struct ep_type_description::description):
10990         Constify.
10991         (add_solib_catchpoint): Constify.
10992         (catch_fork_command_1): Add cast.
10993         (add_catch_command): Constify.
10994         * breakpoint.h (add_catch_command, add_solib_catchpoint):
10995         Constify.
10996         * bsd-uthread.c (bsd_uthread_state): Constify.
10997         * buildsym.c (patch_subfile_names): Constify.
10998         * buildsym.h (next_symbol_text_func, patch_subfile_names):
10999         Constify.
11000         * c-exp.y (yyerror): Constify.
11001         (token::oper): Constify.
11002         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
11003         * c-varobj.c (cplus_describe_child): Constify.
11004         * charset.c (find_charset_names): Add cast.
11005         (find_charset_names): Constify array and add const_cast.
11006         * cli/cli-cmds.c (complete_command, cd_command): Constify.
11007         (edit_command): Constify.
11008         * cli/cli-decode.c (lookup_cmd): Constify.
11009         * cli/cli-dump.c (dump_memory_command, dump_value_command):
11010         Constify.
11011         (struct dump_context): Constify.
11012         (add_dump_command, restore_command): Constify.
11013         * cli/cli-script.c (get_command_line): Constify.
11014         * cli/cli-script.h (get_command_line): Constify.
11015         * cli/cli-utils.c (check_for_argument): Constify.
11016         * cli/cli-utils.h (check_for_argument): Constify.
11017         * coff-pe-read.c (struct read_pe_section_data): Constify.
11018         * command.h (lookup_cmd): Constify.
11019         * common/print-utils.c (decimal2str): Constify.
11020         * completer.c (gdb_print_filename): Constify.
11021         * corefile.c (set_gnutarget): Constify.
11022         * cp-name-parser.y (yyerror): Constify.
11023         * cp-valprint.c (cp_print_class_member): Constify.
11024         * cris-tdep.c (cris_register_name, crisv32_register_name):
11025         Constify.
11026         * d-exp.y (yyerror): Constify.
11027         (struct token::oper): Constify.
11028         * d-lang.h (d_yyerror): Constify.
11029         * dbxread.c (struct header_file_location::name): Constify.
11030         (add_old_header_file, add_new_header_file, last_function_name)
11031         (dbx_next_symbol_text, add_bincl_to_list)
11032         (find_corresponding_bincl_psymtab, set_namestring)
11033         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
11034         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
11035         * defs.h (command_line_input, print_address_symbolic)
11036         (deprecated_readline_begin_hook): Constify.
11037         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
11038         Constify.
11039         * event-top.c (handle_line_of_input): Constify and add cast.
11040         * exceptions.c (catch_errors): Constify.
11041         * exceptions.h (catch_errors): Constify.
11042         * expprint.c (print_subexp_standard, op_string, op_name)
11043         (op_name_standard, dump_raw_expression, dump_raw_expression):
11044         * expression.h (op_name, op_string, dump_raw_expression):
11045         Constify.
11046         * f-exp.y (yyerror): Constify.
11047         (struct token::oper): Constify.
11048         (struct f77_boolean_val::name): Constify.
11049         * f-lang.c (f_word_break_characters): Constify.
11050         * f-lang.h (f_yyerror): Constify.
11051         * fork-child.c (fork_inferior): Add cast.
11052         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
11053         (new_variant): Constify.
11054         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
11055         * gdbarch.c: Regenerate.
11056         * gdbcore.h (set_gnutarget): Constify.
11057         * go-exp.y (yyerror): Constify.
11058         (token::oper): Constify.
11059         * go-lang.h (go_yyerror): Constify.
11060         * go32-nat.c (go32_sysinfo): Constify.
11061         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
11062         * guile/scm-cmd.c (cmdscm_function): Constify.
11063         * guile/scm-param.c (pascm_param_value): Constify.
11064         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
11065         (h8300sx_register_name): Constify.
11066         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
11067         Constify.
11068         * ia64-tdep.c (ia64_register_names): Constify.
11069         * infcmd.c (construct_inferior_arguments): Constify.
11070         (path_command, attach_post_wait): Constify.
11071         * language.c (show_range_command, show_case_command)
11072         (unk_lang_error): Constify.
11073         * language.h (language_defn::la_error)
11074         (language_defn::la_name_of_this): Constify.
11075         * linespec.c (decode_line_2): Constify.
11076         * linux-thread-db.c (thread_db_err_str): Constify.
11077         * lm32-tdep.c (lm32_register_name): Constify.
11078         * m2-exp.y (yyerror): Constify.
11079         * m2-lang.h (m2_yyerror): Constify.
11080         * m32r-tdep.c (m32r_register_names): Constify and make static.
11081         * m68hc11-tdep.c (m68hc11_register_names): Constify.
11082         * m88k-tdep.c (m88k_register_name): Constify.
11083         * macroexp.c (appendmem): Constify.
11084         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
11085         (upgrade_type, parse_external, parse_partial_symbols)
11086         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
11087         (new_symbol): Constify.
11088         * memattr.c (mem_info_command): Constify.
11089         * mep-tdep.c (register_name_from_keyword): Constify.
11090         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
11091         Constify.
11092         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
11093         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
11094         * mi/mi-main.c (captured_mi_execute_command): Constify and add
11095         cast.
11096         (mi_execute_async_cli_command): Constify.
11097         * mips-tdep.c (mips_register_name): Constify.
11098         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
11099         (am33_register_name, am33_2_register_name)
11100         * moxie-tdep.c (moxie_register_names): Constify.
11101         * nat/linux-osdata.c (osdata_type): Constify fields.
11102         * nto-tdep.c (nto_parse_redirection): Constify.
11103         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
11104         (lookup_child_selector): Constify.
11105         (objc_methcall::name): Constify.
11106         * objc-lang.h (lookup_objc_class, lookup_child_selector)
11107         (lookup_struct_typedef): Constify.
11108         * objfiles.c (pc_in_section): Constify.
11109         * objfiles.h (pc_in_section): Constify.
11110         * p-exp.y (struct token::oper): Constify.
11111         (yyerror): Constify.
11112         * p-lang.h (pascal_yyerror): Constify.
11113         * parser-defs.h (op_name_standard): Constify.
11114         (op_print::string): Constify.
11115         (exp_descriptor::op_name): Constify.
11116         * printcmd.c (print_address_symbolic): Constify.
11117         * psymtab.c (print_partial_symbols): Constify.
11118         * python/py-breakpoint.c (stop_func): Constify.
11119         (bppy_get_expression): Constify.
11120         * python/py-cmd.c (cmdpy_completer::name): Constify.
11121         (cmdpy_function): Constify.
11122         * python/py-event.c (evpy_add_attribute)
11123         (gdbpy_initialize_event_generic): Constify.
11124         * python/py-event.h (evpy_add_attribute)
11125         (gdbpy_initialize_event_generic): Constify.
11126         * python/py-evts.c (add_new_registry): Constify.
11127         * python/py-finishbreakpoint.c (outofscope_func): Constify.
11128         * python/py-framefilter.c (get_py_iter_from_func): Constify.
11129         * python/py-inferior.c (get_buffer): Add cast.
11130         * python/py-param.c (parm_constant::name): Constify.
11131         * python/py-unwind.c (fprint_frame_id): Constify.
11132         * python/python.c (gdbpy_parameter_value): Constify.
11133         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
11134         * remote.c (memory_packet_config::name): Constify.
11135         (show_packet_config_cmd, remote_write_bytes)
11136         (remote_buffer_add_string):
11137         * reverse.c (exec_reverse_once): Constify.
11138         * rs6000-tdep.c (variant::name, variant::description): Constify.
11139         * rust-exp.y (rustyyerror): Constify.
11140         * rust-lang.c (rust_op_name): Constify.
11141         * rust-lang.h (rustyyerror): Constify.
11142         * serial.h (serial_ops::name): Constify.
11143         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
11144         (sh_sh3e_register_name, sh_sh2e_register_name)
11145         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
11146         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
11147         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
11148         (sh_sh4al_dsp_register_name): Constify.
11149         * sh64-tdep.c (sh64_register_name): Constify.
11150         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
11151         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
11152         * stabsread.c (patch_block_stabs, read_type_number)
11153         (ref_map::stabs, ref_add, process_reference)
11154         (symbol_reference_defined, define_symbol, define_symbol)
11155         (error_type, read_type, read_member_functions, read_cpp_abbrev)
11156         (read_one_struct_field, read_struct_fields, read_baseclasses)
11157         (read_tilde_fields, read_struct_type, read_array_type)
11158         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
11159         (read_huge_number, read_range_type, read_args, common_block_start)
11160         (find_name_end): Constify.
11161         * stabsread.h (common_block_start, define_symbol)
11162         (process_one_symbol, symbol_reference_defined, ref_add):
11163         * symfile.c (get_section_index, add_symbol_file_command):
11164         * symfile.h (get_section_index): Constify.
11165         * target-descriptions.c (tdesc_type::name): Constify.
11166         (tdesc_free_type): Add cast.
11167         * target.c (find_default_run_target):
11168         (add_deprecated_target_alias, find_default_run_target)
11169         (target_announce_detach): Constify.
11170         (do_option): Constify.
11171         * target.h (add_deprecated_target_alias): Constify.
11172         * thread.c (print_thread_info_1): Constify.
11173         * top.c (deprecated_readline_begin_hook, command_line_input):
11174         Constify.
11175         (init_main): Add casts.
11176         * top.h (handle_line_of_input): Constify.
11177         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
11178         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
11179         (tfind_command): Rename to ...
11180         (tfind_command_1): ... this and constify.
11181         (tfind_command): New function.
11182         (tfind_end_command, tfind_start_command): Adjust.
11183         (encode_source_string): Constify.
11184         * tracepoint.h (encode_source_string): Constify.
11185         * tui/tui-data.c (tui_partial_win_by_name): Constify.
11186         * tui/tui-data.h (tui_partial_win_by_name): Constify.
11187         * tui/tui-source.c (tui_set_source_content_nil): Constify.
11188         * tui/tui-source.h (tui_set_source_content_nil): Constify.
11189         * tui/tui-win.c (parse_scrolling_args): Constify.
11190         * tui/tui-windata.c (tui_erase_data_content): Constify.
11191         * tui/tui-windata.h (tui_erase_data_content): Constify.
11192         * tui/tui-winsource.c (tui_erase_source_content): Constify.
11193         * tui/tui.c (tui_enable): Add cast.
11194         * utils.c (defaulted_query): Constify.
11195         (init_page_info): Add cast.
11196         (puts_debug, subset_compare): Constify.
11197         * utils.h (subset_compare): Constify.
11198         * varobj.c (varobj_format_string): Constify.
11199         * varobj.h (varobj_format_string): Constify.
11200         * vax-tdep.c (vax_register_name): Constify.
11201         * windows-nat.c (windows_detach): Constify.
11202         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11203         * xml-support.c (gdb_xml_end_element): Constify.
11204         * xml-tdesc.c (tdesc_start_reg): Constify.
11205         * xstormy16-tdep.c (xstormy16_register_name): Constify.
11206         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11207         * xtensa-tdep.h (xtensa_register_t::name): Constify.
11208
11209 2017-04-05  Pedro Alves  <palves@redhat.com>
11210
11211         * proc-api.c (struct trans): Constify.
11212         (procfs_note): Constify.
11213         * proc-events.c (struct trans, syscall_table):
11214         * proc-flags.c (struct trans): Constify.
11215         * proc-utils.h (procfs_note): Constify.
11216         * proc-why.c (struct trans): Constify.
11217         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11218         (procfs_detach): Constify.
11219         * sol-thread.c (struct string_map): Constify.
11220         (td_err_string, td_state_string): Constify.
11221
11222 2017-04-05  Pedro Alves  <palves@redhat.com>
11223
11224         * proc-api.c (procfs_filename): Don't initialize
11225         procfs_filename.
11226         (prepare_to_trace): Assume procfs_filename is non-NULL.
11227         (_initialize_proc_api): Give procfs_filename a default value here.
11228
11229 2017-04-05  Pedro Alves  <palves@redhat.com>
11230
11231         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11232         'cond_string' parameter.
11233         (extract_exception_regexp): Constify 'string' parameter.
11234         (catch_exception_command_1): Constify.
11235         * breakpoint.c (init_catchpoint)
11236         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11237         parameter.
11238         (ep_parse_optional_if_clause, catch_fork_command_1)
11239         (catch_exec_command_1): Constify.
11240         * breakpoint.h (init_catchpoint): Constify 'cond_string'
11241         parameter.
11242         (ep_parse_optional_if_clause): Constify.
11243         * cli/cli-utils.c (remove_trailing_whitespace)
11244         (check_for_argument): Constify.
11245         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11246         non-const overload.
11247         (check_for_argument): Likewise.
11248
11249 2017-04-05  Pedro Alves  <palves@redhat.com>
11250
11251         * event-top.c (command_line_handler): Add cast to execute_command
11252         call.
11253         * record-btrace.c (cmd_record_btrace_bts_start)
11254         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11255         (cmd_record_btrace_start): Add cast to execute_command call.
11256         * record-full.c (record_full_goto_insn):
11257         * record.c (record_start, record_stop): Add cast to
11258         execute_command_to_string calls.
11259         (cmd_record_start): Add cast to execute_command calls.
11260
11261 2017-04-05  Pedro Alves  <palves@redhat.com>
11262
11263         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11264         static inline function.
11265         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11266         array and use gdb_PyArg_ParseTupleAndKeywords.
11267         * python/py-cmd.c (cmdpy_init): Likewise.
11268         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11269         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11270         (infpy_search_memory): Likewise.
11271         * python/py-objfile.c (objfpy_add_separate_debug_file)
11272         (gdbpy_lookup_objfile): Likewise.
11273         * python/py-symbol.c (gdbpy_lookup_symbol)
11274         (gdbpy_lookup_global_symbol): Likewise.
11275         * python/py-type.c (gdbpy_lookup_type): Likewise.
11276         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11277         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11278         Likewise.
11279
11280 2017-04-05  Pedro Alves  <palves@redhat.com>
11281
11282         * python/python-internal.h (gdb_PyGetSetDef): New type.
11283         * python/py-block.c (block_object_getset)
11284         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11285         * python/py-event.c (event_object_getset)
11286         (finish_breakpoint_object_getset): Likewise.
11287         * python/py-inferior.c (inferior_object_getset): Likewise.
11288         * python/py-infthread.c (thread_object_getset): Likewise.
11289         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11290         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11291         * python/py-objfile.c (objfile_getset): Likewise.
11292         * python/py-progspace.c (pspace_getset): Likewise.
11293         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11294         Likewise.
11295         * python/py-record.c (recpy_record_getset): Likewise.
11296         * python/py-symbol.c (symbol_object_getset): Likewise.
11297         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11298         Likewise.
11299         * python/py-type.c (type_object_getset, field_object_getset):
11300         Likewise.
11301         * python/py-value.c (value_object_getset): Likewise.
11302
11303 2017-04-05  Pedro Alves  <palves@redhat.com>
11304
11305         * python/python-internal.h (gdb_PyObject_CallMethod)
11306         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11307         New functions.
11308         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11309         (PySys_GetObject, PySys_SetPath): New macros.
11310
11311 2017-04-05  Pedro Alves  <palves@redhat.com>
11312
11313         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11314         info_osdata_command.
11315         * osdata.c (info_osdata_command): Rename to ...
11316         (info_osdata): ... this.  Constify 'type' parameter, and remove
11317         the 'from_tty' parameter.  Accept NULL TYPE.
11318         (info_osdata_command): New function.
11319         * osdata.h (info_osdata_command): Remove declaration.
11320         (info_osdata): New declaration.
11321
11322 2017-04-05  Pedro Alves  <palves@redhat.com>
11323
11324         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11325         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11326         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11327         parameter.
11328         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11329         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11330         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11331         parameter.
11332         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11333         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11334         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11335         (mi_cmd_file_list_exec_source_files)
11336         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11337         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11338         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11339         parameter.
11340         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11341         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11342         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11343         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11344         (mi_cmd_stack_info_frame): Constify 'command' parameter.
11345         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11346         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11347         'command' parameter.
11348         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11349         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11350         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11351         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11352         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11353         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11354         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11355         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11356         (mi_cmd_var_set_update_range): Constify 'command' parameter.
11357         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11358         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11359         parameter.
11360         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11361         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11362         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11363         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11364         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11365         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11366         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11367         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11368         (mi_cmd_data_list_changed_registers)
11369         (mi_cmd_data_write_register_values)
11370         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11371         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11372         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11373         (mi_cmd_list_features, mi_cmd_list_target_features)
11374         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11375         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11376         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11377         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11378         (mi_cmd_trace_frame_collected): Constify 'command'
11379         parameter.
11380         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11381         'command' parameter.
11382
11383 2017-04-05  Pedro Alves  <palves@redhat.com>
11384
11385         * ada-lang.c (ada_completer_word_break_characters): Now a const
11386         array.
11387         (ada_get_gdb_completer_word_break_characters): Constify.
11388         * completer.c (gdb_completer_command_word_break_characters)
11389         (gdb_completer_file_name_break_characters)
11390         (gdb_completer_quote_characters): Now const arrays.
11391         (get_gdb_completer_quote_characters): Constify.
11392         (set_rl_completer_word_break_characters): New function.
11393         (set_gdb_completion_word_break_characters)
11394         (complete_line_internal): Use it.
11395         * completer.h (get_gdb_completer_quote_characters): Constify.
11396         (set_rl_completer_word_break_characters): Declare.
11397         * f-lang.c (f_word_break_characters): Constify.
11398         * language.c (default_word_break_characters): Constify.
11399         * language.h (language_defn::la_word_break_characters): Constify.
11400         (default_word_break_characters): Constify.
11401         * top.c (init_main): Use set_rl_completer_word_break_characters.
11402
11403 2017-04-05  Pedro Alves  <palves@redhat.com>
11404
11405         * aix-thread.c (aix_thread_pid_to_str)
11406         (aix_thread_extra_thread_info): Constify.
11407         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11408         * bsd-uthread.c (bsd_uthread_extra_thread_info)
11409         (bsd_uthread_pid_to_str): Constify.
11410         * corelow.c (core_pid_to_str): Constify.
11411         * darwin-nat.c (darwin_pid_to_str): Constify.
11412         * fbsd-nat.c (fbsd_pid_to_str): Constify.
11413         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11414         Constify.
11415         * gnu-nat.c (gnu_pid_to_str): Constify.
11416         * go32-nat.c (go32_pid_to_str): Constify.
11417         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11418         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11419         * inferior.c (inferior_pid_to_str): Constify.
11420         * linux-nat.c (linux_nat_pid_to_str): Constify.
11421         * linux-tdep.c (linux_core_pid_to_str): Constify.
11422         * linux-thread-db.c (thread_db_pid_to_str)
11423         (thread_db_extra_thread_info): Constify.
11424         * nto-tdep.c (nto_extra_thread_info): Constify.
11425         * nto-tdep.h (nto_extra_thread_info): Constify.
11426         * obsd-nat.c (obsd_pid_to_str): Constify.
11427         * procfs.c (procfs_pid_to_str): Constify.
11428         * ravenscar-thread.c (ravenscar_extra_thread_info)
11429         (ravenscar_pid_to_str): Constify.
11430         * remote-sim.c (gdbsim_pid_to_str): Constify.
11431         * remote.c (remote_threads_extra_info, remote_pid_to_str):
11432         Constify.
11433         * sol-thread.c (solaris_pid_to_str): Constify.
11434         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11435         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11436         * target.c (default_pid_to_str, target_pid_to_str)
11437         (normal_pid_to_str, default_pid_to_str): Constify.
11438         * target.h (target_ops::to_pid_to_str)
11439         (target_ops::to_extra_thread_info): Constify.
11440         (target_pid_to_str, normal_pid_to_str): Constify.
11441         * windows-nat.c (windows_pid_to_str): Constify.
11442         * gdbarch.sh (core_pid_to_str): Constify.
11443         * target-delegates.c: Regenerate.
11444         * gdbarch.h, gdbarch.c: Regenerate.
11445
11446 2017-04-05  Pedro Alves  <palves@redhat.com>
11447
11448         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11449         the memory of the temporary warning_pre_print override.
11450         * utils.c (warning_pre_print): Constify.
11451         * utils.h (warning_pre_print): Constify.
11452
11453 2017-04-05  Pedro Alves  <palves@redhat.com>
11454
11455         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11456         (shell_command): New function.
11457         (make_command): Use std::string.
11458         (init_cli_cmds): Register shell_command instead of shell_escape.
11459
11460 2017-04-05  Pedro Alves  <palves@redhat.com>
11461
11462         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11463         * tracepoint.c (default_collect): Don't initialize.
11464
11465 2017-04-05  Pedro Alves  <palves@redhat.com>
11466
11467         * macroexp.c (macro_buffer::shared): Now a bool.
11468         (init_buffer): Update.
11469         (init_shared_buffer): Constify 'addr' parameter.
11470         (substitute_args, expand, macro_expand, macro_expand_next): Remove
11471         casts.
11472
11473 2017-04-05  Pedro Alves  <palves@redhat.com>
11474
11475         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11476         * disasm.c (set_disassembler_options): Constify local.
11477         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11478
11479 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
11480
11481         PR gdb/21352
11482         * tracefile.c (tsave_command): Fix argument parsing for '-r'
11483         option.
11484
11485 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11486
11487         * frame.c (frame_unwind_register_unsigned): Call
11488         frame_unwind_register_value.
11489
11490 2017-04-05  Yao Qi  <yao.qi@linaro.org>
11491
11492         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11493         Use gdb_test_multiple, and don't match anchor.
11494
11495 2017-04-05  Pedro Alves  <palves@redhat.com>
11496
11497         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11498         (Write After Approval): Remove Simon Marchi.
11499
11500 2017-04-05  Pedro Alves  <palves@redhat.com>
11501
11502         * common/gdb_optional.h (optional::optional): Make constexpr and
11503         initialize m_dummy.
11504
11505 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11506
11507         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11508         (amd64fbsd_jmp_buf_reg_offset): Remove.
11509         (amd64fbsd_supply_uthread): Remove function.
11510         (amd64fbsd_collect_uthread): Remove function.
11511         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11512         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11513         (x86_64-*-freebsd*): Remove bsd-uthread.o.
11514         (fbsd-nat.c): Update comment.
11515         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11516         (i386fbsd_jmp_buf_reg_offset): Remove.
11517         (i386fbsd_supply_uthread): Remove function.
11518         (i386fbsd_collect_uthread): Remove function.
11519         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11520
11521 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11522
11523         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11524         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11525         * NEWS: Mention that support for FreeBSD/alpha was removed.
11526         * alpha-fbsd-tdep.c: Delete file.
11527         * config/alpha/fbsd.mh: Delete file.
11528         * configure.host: Delete alpha*-*-freebsd* and
11529         alpha*-*-kfreebsd*-gnu.
11530         * configure.tgt: Delete alpha*-*-freebsd* and
11531         alpha*-*-kfreebsd*-gnu.
11532
11533 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
11534
11535         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11536         amd64bsd_store_inferior_registers): Use ptid from regcache.
11537
11538 2017-04-04  Pedro Alves  <palves@redhat.com>
11539
11540         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
11541         data fields, make them private and add "m_" prefixes.
11542         (lnp_state_machine::lnp_state_machine): New ctor.
11543         (record_line, check_line_address, handle_set_discriminator)
11544         (handle_set_address, handle_advance_pc, handle_special_opcode)
11545         (handle_advance_line, handle_set_file, handle_negate_stmt)
11546         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11547         (end_sequence, advance_line): New methods.
11548         (m_gdbarch, m_record_lines_p): New fields.
11549         (lnp_reader_state): Delete.
11550         (dwarf_record_line): Rename to ...
11551         (lnp_state_machine::record_line): ... adjust.
11552         (init_lnp_state_machine): Delete.
11553         (lnp_state_machine::lnp_state_machine): New.
11554         (check_line_address): Rename to ...
11555         (lnp_state_machine::check_line_address): This.
11556         (dwarf_decode_lines_1): Remove reference to "reader_state".
11557         Adjust lnp_state_machine having a non-default ctor.  Use bool.
11558         State machine internal state manipulation moved to
11559         lnp_state_machine methods.
11560
11561 2017-04-04  Pedro Alves  <palves@redhat.com>
11562
11563         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11564         unittests/offset-type-selftests.c.
11565         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11566         * common/offset-type.h: New file.
11567         * common/preprocessor.h: New file.
11568         * common/traits.h: New file.
11569         * common/valid-expr.h: New file.
11570         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
11571         sect_offset and cu_offset strong typedefs throughout.
11572         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11573         typedefs throughout.
11574         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
11575         sect_offset and cu_offset strong typedefs throughout.
11576         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11577         typedefs throughout.
11578         * gdbtypes.h: Include "common/offset-type.h".
11579         (cu_offset): Now an offset type (strong typedef) instead of a
11580         struct.
11581         (sect_offset): Likewise.
11582         (union call_site_parameter_u): Rename "param_offset" field to
11583         "param_cu_off".
11584         * unittests/offset-type-selftests.c: New file.
11585
11586 2017-04-04  Pedro Alves  <palves@redhat.com>
11587
11588         * common/underlying.h: New file.
11589         * dwarf2read.c: Include "common/gdb_optional.h" and
11590         "common/underlying.h".
11591         (dir_index, file_name_index): New types.
11592         (file_entry): Use them.
11593         (file_entry::include): Use to_underlying.
11594         (line_header::add_file_name): Use dir_index.
11595         (read_formatted_entries): Use gdb::optional.  Read form before
11596         writting to file_entry.
11597         (dwarf_decode_line_header): Use dir_index.
11598         (lnp_state_machine::current_file): Use to_underlying.
11599         (lnp_state_machine::file): Change type to file_name_index.
11600         (dwarf_record_line): Use to_underlying.
11601         (init_lnp_state_machine): Use file_name_index.
11602         (dwarf_decode_lines_1): Use dir_index and file_name_index.
11603
11604 2017-04-04  Pedro Alves  <palves@redhat.com>
11605
11606         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11607         operator bool, has_value and get methods.
11608
11609 2017-04-04  Pedro Alves  <palves@redhat.com>
11610
11611         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11612         fields.
11613         (line_header): Initialize all data fields.  Change type of
11614         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11615         Change type of include_dirs to std::vector<const char *>.  Remove
11616         num_include_dirs, include_dirs_size.  Change type of file_names to
11617         std::vector<file_entry>.  Remove num_file_names, file_names_size.
11618         (line_header::line_header): New.
11619         (line_header::add_include_dir, line_header::add_file_name): New
11620         methods.
11621         (line_header::include_dir_at): Remove NULL check.
11622         (line_header::file_name_at): Add const overload.
11623         (line_header_up): New unique_ptr typedef.
11624         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
11625         std::vector.  Remove free_line_header call.
11626         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
11627         free_line_header call.
11628         (free_cu_line_header): Delete.
11629         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11630         (setup_type_unit_groups): Use line_header_up instead of cleanups.
11631         Adjust to use std::vector.
11632         (free_line_header): Delete.
11633         (free_line_header_voidp): Use delete.
11634         (add_include_dir): Replace with ...
11635         (line_header::add_include_dir): ... this method.  Use std::vector.
11636         (add_file_name): Replace with ...
11637         (line_header::add_file_name): ... this method.  Use std::vector.
11638         (add_include_dir_stub): Delete.
11639         (read_formatted_entries): Remove memset.
11640         (dwarf_decode_line_header): Return a line_header_up instead of a
11641         raw pointer.  Remove cleanup handling.  Pass lambdas to
11642         read_formatted_entries.  Adjust to use line_header methods.
11643         (dwarf_decode_lines_1): Adjust to use line_header methods.
11644         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11645         use std::vector.
11646
11647 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
11648
11649         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11650         instead of struct ptid.
11651
11652 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
11653
11654         * frame.c (get_frame_register_bytes): Unwind using value.
11655         (put_frame_register_bytes): Likewise.
11656
11657 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
11658
11659         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11660         aggregate-like.
11661
11662 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
11663
11664         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11665
11666 2017-03-29  Yao Qi  <yao.qi@linaro.org>
11667
11668         * gdbthread.h (struct thread_info): Declare constructor and
11669         destructor.  Add some in-class member initializers.
11670         * thread.c (free_thread): Remove.
11671         (init_thread_list): Call delete instead of free_thread.
11672         (new_thread): Call thread_info constructor.
11673         (thread_info::thread_info): New function.
11674         (thread_info::~thread_info): New function.
11675         (delete_thread_1): Call delete instead of free_thread.
11676         (make_cleanup_restore_current_thread): Move tp and frame to
11677         inner block.
11678
11679 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11680
11681         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11682         (arc_skip_prologue): Likewise.
11683         (arc_make_frame_cache): Likewise.
11684         (arc_pv_get_operand): New function.
11685         (arc_is_in_prologue): Likewise.
11686         (arc_analyze_prologue): Likewise.
11687         (arc_print_frame_cache): Likewise.
11688         (MAX_PROLOGUE_LENGTH): New constant.
11689
11690 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11691
11692         * configure.tgt: Add arc-insn.o.
11693         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11694         (dump_arc_instruction_command): New function.
11695         (arc_fprintf_disasm): Likewise.
11696         (arc_disassemble_info): Likewise.
11697         (arc_insn_get_operand_value): Likewise.
11698         (arc_insn_get_operand_value_signed): Likewise.
11699         (arc_insn_get_memory_base_reg): Likewise.
11700         (arc_insn_get_memory_offset): Likewise.
11701         (arc_insn_get_branch_target): Likewise.
11702         (arc_insn_dump): Likewise.
11703         (arc_insn_get_linear_next_pc): Likewise.
11704         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11705         (arc_disassemble_info): Likewise.
11706         (arc_insn_get_branch_target): Likewise.
11707         (arc_insn_get_linear_next_pc): Likewise.
11708         * NEWS: Mention new "maint print arc arc-instruction".
11709
11710 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11711
11712         * arc-tdep (maintenance_print_arc_list): New variable.
11713         (maintenance_print_arc_command): New function.
11714
11715 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
11716
11717         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11718         Add "limm" and "reserved".
11719         (arc_cannot_fetch_register, arc_cannot_store_register): Add
11720         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11721         * arc-tdep.h (arc_regnum): Likewise.
11722
11723 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11724
11725         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11726         for THREADPTR register.
11727         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11728         register.
11729         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11730         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11731         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11732
11733 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11734
11735         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11736         registers above gdbarch_num_regs (gdbarch) as privileged in
11737         call0 ABI.
11738
11739 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11740
11741         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11742         for a single specified register or for all registers in
11743         a0_base..a0_base + C0_NREGS range.
11744         (supply_gregset_reg): Call regcache_raw_supply for a single
11745         specified register or for all registers in a0_base..a0_base +
11746         C0_NREGS range.
11747
11748 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11749
11750         * arch/xtensa.h (C0_NREGS): Add definition.
11751         * xtensa-tdep.c (C0_NREGS): Remove definition.
11752
11753 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
11754
11755         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11756         Drop xtensa_default_isa initialization.
11757         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11758
11759 2017-03-27  Pedro Alves  <palves@redhat.com>
11760
11761         * dwarf2read.c (file_entry) <dir_index>: Add comment.
11762         (file_entry::include_dir): New method.
11763         (line_header::include_dir_at, line_header::file_name_at): New
11764         methods.
11765         (setup_type_unit_groups, setup_type_unit_groups)
11766         (psymtab_include_file_name): Simplify using the new methods.
11767         (lnp_state_machine) <the_line_header>: New field.
11768         <file>: Add comment.
11769         (lnp_state_machine::current_file): New method.
11770         (dwarf_record_line): Simplify using the new methods.
11771         (init_lnp_state_machine): Initialize the "the_line_header" field.
11772         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11773         Simplify using the new methods.
11774
11775 2017-03-27  Pedro Alves  <palves@redhat.com>
11776
11777         * cp-name-parser.y (make_empty): Delete.
11778         (demangler_special, nested_name, ptr_operator, array_indicator)
11779         (direct_declarator, declarator_1): Use fill_comp instead of
11780         make_empty.
11781
11782 2017-03-27  Pedro Alves  <palves@redhat.com>
11783
11784         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11785         to ATTRIBUTE_PRINTF.
11786         * solib-target.c (library_list_start_list): Print "string" not
11787         "version".
11788         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11789         gdb_xml_error call.
11790
11791 2017-03-27  Pedro Alves  <palves@redhat.com>
11792
11793         * dwarf2read.c (struct file_and_directory): New.
11794         (dwarf2_get_dwz_file): Adjust to use std::string.
11795         (dw2_get_file_names_reader): Adjust to use file_and_directory.
11796         (find_file_and_directory): Adjust to return a file_and_directory
11797         object.
11798         (read_file_scope): Adjust to use file_and_directory.  Remove
11799         make_cleanup/do_cleanups calls.
11800         (open_and_init_dwp_file): Adjust to use std::string.  Remove
11801         make_cleanup/do_cleanups calls.
11802         * python/python.c (do_start_initialization): Adjust to ldirname
11803         returning a std::string.
11804         * utils.c (ldirname): Now returns a std::string.
11805         * utils.h (ldirname): Change return type to std::string.
11806         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11807         returning a std::string.
11808         * xml-tdesc.c (file_read_description_xml): Likewise.
11809
11810 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
11811
11812         * regcache.c (regcache_debug_print_register): New function.
11813         * regcache.h (regcache_debug_print_register): New declaration.
11814         * target.c (debug_print_register): Remove.
11815         (target_fetch_registers): Call regcache_debug_print_register.
11816         (target_store_registers): Likewise.
11817
11818 2017-03-24  Pádraig Brady  <pbrady@fb.com>
11819
11820         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11821         reference beyond the 'lh->include_dirs' array before accessing to
11822         it.
11823         (psymtab_include_file_name): Likewise.
11824         (dwarf_decode_lines_1): Likewise.
11825         (dwarf_decode_lines): Likewise.
11826         (file_file_name): Likewise.
11827
11828 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
11829
11830         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11831         inferior_ptid.
11832         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11833         ps_lsetfpregs): Likewise.
11834         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11835         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11836         ps_lsetfpregs): Likewise.
11837         * target.c (target_fetch_registers, target_store_registers):
11838         Remove asserts.
11839
11840 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
11841
11842         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11843
11844 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11845
11846         * aarch64-tdep.c (aarch64_process_record_test): Declare.
11847         (_initialize_aarch64_tdep): Register it.
11848         (aarch64_record_load_store): Handle PRFM instruction.
11849         (aarch64_process_record_test): New function.
11850
11851 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11852
11853         * aarch64-tdep.c (aarch64_record_load_store): Fix code
11854         indentation.
11855
11856 2017-03-23  Yao Qi  <yao.qi@linaro.org>
11857
11858         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11859
11860 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
11861
11862         python/python.c (do_start_initialization): Fix memory leak.
11863
11864 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11865
11866         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11867         using get_ptrace_pid.
11868         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11869         inferior_ptid.
11870         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11871         inferior_ptid instead of pid.
11872
11873 2017-03-22  Yao Qi  <yao.qi@linaro.org>
11874
11875         * aarch64-tdep.c: Wrap locally used classes in anonymous
11876         namespace.
11877         * arm-tdep.c: Likewise.
11878         * linespec.c: Likewise.
11879         * ui-out.c: Likewise.
11880
11881 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
11882
11883         PR gdb/19637
11884         * python/lib/gdb/printer/bound_registers.py: Import sys.
11885
11886 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11887
11888         * windows-nat.c (do_windows_fetch_inferior_registers): Add
11889         windows_thread_info parameter and use it instead of
11890         current_thread.
11891         (windows_fetch_inferior_registers): Don't set current_thread,
11892         pass the thread to do_windows_fetch_inferior_registers.  Use
11893         ptid from regcache instead of inferior_ptid.
11894         (do_windows_store_inferior_registers): Add windows_thread_info
11895         parameter and use it instead of current_thread.
11896         (windows_store_inferior_registers): Don't set current_thread,
11897         pass the thread to do_windows_store_inferior_registers.  Use
11898         ptid from regcache instead of inferior_ptid.
11899
11900 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
11901
11902         * ser-mingw.c (ser_windows_raw): Remove reference to
11903         struct serial::current_timeout.
11904
11905 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
11906
11907         PR tdep/20928
11908         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11909         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11910         (sparc64_fsr_type): Fix %fsr decoding.
11911
11912 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
11913
11914         * python/py-record-btrace.c (btpy_insn_data): Change return type
11915         for Python 2.
11916
11917 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11918
11919         * spu-linux-nat.c (spu_fetch_inferior_registers,
11920         spu_store_inferior_registers): Use ptid from regcache, set and
11921         restore inferior_ptid.
11922         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11923         Likewise.
11924
11925 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
11926
11927         * i386-linux-nat.c (fetch_register, store_register,
11928         i386_linux_fetch_inferior_registers,
11929         i386_linux_store_inferior_registers): Use ptid from regcache.
11930         * ia64-linux-nat.c (ia64_linux_fetch_register,
11931         ia64_linux_store_register): Likewise.
11932         * inf-ptrace.c (inf_ptrace_fetch_register,
11933         inf_ptrace_store_register): Likewise.
11934         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11935         m32r_linux_store_inferior_registers): Likewise.
11936         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11937         m68kbsd_store_inferior_registers): Likewise.
11938         * m68k-linux-nat.c (fetch_register, store_register,
11939         m68k_linux_fetch_inferior_registers,
11940         m68k_linux_store_inferior_registers): Likewise.
11941         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11942         m88kbsd_store_inferior_registers): Likewise.
11943         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11944         mips_fbsd_store_inferior_registers): Likewise.
11945         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11946         mips64_linux_regsets_store_registers): Likewise.
11947         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11948         mipsnbsd_store_inferior_registers): Likewise.
11949         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11950         mips64obsd_store_inferior_registers): Likewise.
11951         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11952         Likewise.
11953         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11954         ppcfbsd_store_inferior_registers): Likewise.
11955         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11956         ppc_linux_store_inferior_registers): Likewise.
11957         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11958         ppcnbsd_store_inferior_registers): Likewise.
11959         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11960         ppcobsd_store_registers): Likewise.
11961         * procfs.c (procfs_fetch_registers, procfs_store_registers):
11962         Likewise.
11963         * ravenscar-thread.c (ravenscar_fetch_registers,
11964         ravenscar_store_registers, ravenscar_prepare_to_store):
11965         Likewise.
11966         * record-btrace.c (record_btrace_fetch_registers,
11967         record_btrace_store_registers, record_btrace_prepare_to_store):
11968         Likewise.
11969         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11970         Lookup inferior using ptid from regcache, instead of
11971         current_inferior.
11972         * remote.c (remote_fetch_registers, remote_store_registers): Use
11973         ptid from regcache.
11974         * rs6000-nat.c (fetch_register, store_register): Likewise.
11975         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11976         s390_linux_store_inferior_registers): Likewise.
11977         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11978         shnbsd_store_inferior_registers): Likewise.
11979         * sol-thread.c (sol_thread_fetch_registers,
11980         sol_thread_store_registers): Likewise.
11981         * sparc-nat.c (sparc_fetch_inferior_registers,
11982         sparc_store_inferior_registers): Likewise.
11983         * tilegx-linux-nat.c (fetch_inferior_registers,
11984         store_inferior_registers): Likewise.
11985         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11986         vaxbsd_store_inferior_registers): Likewise.
11987         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11988         store_xtregs): Likewise.
11989
11990 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11991
11992         PR gdb/14441
11993         * NEWS: Mention support for rvalue references in GDB and python.
11994         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11995         supports both lvalue and rvalue references.
11996
11997 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
11998
11999         PR gdb/14441
12000         * gdbtypes.c (rank_one_type): Implement overloading
12001         resolution rules regarding rvalue references.
12002
12003 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12004
12005         PR gdb/14441
12006         * aarch64-tdep.c (aarch64_type_align)
12007         (aarch64_extract_return_value, aarch64_store_return_value): Change
12008         lvalue reference type checks to general reference type checks.
12009         * amd64-tdep.c (amd64_classify): Likewise.
12010         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
12011         Likewise.
12012         * arm-tdep.c (arm_type_align, arm_extract_return_value)
12013         (arm_store_return_value): Likewise.
12014         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
12015         * c-typeprint.c (c_print_type): Likewise.
12016         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
12017         (cplus_number_of_children, cplus_describe_child): Likewise.
12018         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
12019         * completer.c (expression_completer): Likewise.
12020         * cp-support.c (make_symbol_overload_list_adl_namespace):
12021         Likewise.
12022         * darwin-nat-info.c (info_mach_region_command): Likewise.
12023         * dwarf2loc.c (entry_data_value_coerce_ref)
12024         (value_of_dwarf_reg_entry): Likewise.
12025         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
12026         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
12027         Likewise.
12028         * findvar.c (extract_typed_address, store_typed_address):
12029         Likewise.
12030         * gdbtypes.c (rank_one_type): Likewise.
12031         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
12032         * infcall.c (value_arg_coerce): Likewise.
12033         * language.c (pointer_type): Likewise.
12034         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
12035         Likewise.
12036         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
12037         * mn10300-tdep.c (mn10300_type_align): Likewise.
12038         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
12039         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
12040         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
12041         Likewise.
12042         * printcmd.c (print_formatted, x_command): Likewise.
12043         * python/py-type.c (typy_get_composite, typy_template_argument):
12044         Likewise.
12045         * python/py-value.c (valpy_referenced_value)
12046         (valpy_get_dynamic_type, value_has_field): Likewise.
12047         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
12048         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
12049         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
12050         * spu-tdep.c (spu_scalar_value_p): Likewise.
12051         * symtab.c (lookup_symbol_aux): Likewise.
12052         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
12053         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
12054         Likewise.
12055         * valops.c (value_cast_pointers, value_cast)
12056         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
12057         (value_struct_elt, value_struct_elt_bitpos)
12058         (value_find_oload_method_list, find_overload_match)
12059         (value_rtti_indirect_type): Likewise.
12060         * valprint.c (val_print_scalar_type_p, generic_val_print):
12061         Likewise.
12062         * value.c (value_actual_type, value_as_address, unpack_long)
12063         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
12064         (coerce_ref): Likewise.
12065         * varobj.c (varobj_get_value_type): Likewise.
12066
12067 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12068
12069         PR gdb/14441
12070         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
12071         table of constants.
12072         * python/lib/gdb/command/explore.py: Support exploring values
12073         of rvalue reference types.
12074         * python/lib/gdb/types.py: Implement get_basic_type() for
12075         rvalue reference types.
12076         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
12077         constant.
12078         * python/py-value.c (valpy_getitem): Add an rvalue reference
12079         check.
12080         (valpy_reference_value): Add new parameter "refcode".
12081         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
12082         New wrappers for valpy_reference_value().
12083         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12084         (gdbpy_invoke_xmethod): Likewise.
12085
12086 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12087
12088         PR gdb/14441
12089         * dwarf2read.c (process_die, read_type_die_1): Handle the
12090         DW_TAG_rvalue_reference_type DIE.
12091         (read_tag_reference_type): Add new parameter "refcode".
12092
12093 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12094
12095         PR gdb/14441
12096         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
12097         (c_type_print_modifier, c_type_print_varspec_suffix)
12098         (c_type_print_base): Support printing rvalue reference types.
12099         * c-valprint.c (c_val_print, c_value_print): Support printing
12100         rvalue reference values.
12101
12102 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12103
12104         PR gdb/14441
12105         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
12106         typename.
12107         * cp-support.c (replace_typedefs): Handle
12108         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
12109         * python/py-type.c (typy_lookup_type): Likewise.
12110
12111 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12112
12113         PR gdb/14441
12114         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
12115         * parse.c (insert_type): Change assert statement.
12116         (follow_types): Handle rvalue reference types.
12117         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
12118         constant.
12119
12120 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12121
12122         PR gdb/14441
12123         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
12124         value_ref() interface.
12125         * c-valprint.c (c_value_print): Likewise.
12126         * infcall.c (value_arg_coerce): Likewise.
12127         * python/py-value.c (valpy_reference_value): Likewise.
12128         * valops.c (value_cast, value_reinterpret_cast)
12129         (value_dynamic_cast, typecmp): Likewise.
12130         (value_ref): Parameterize by kind of return value reference type.
12131         * value.h (value_ref): Add new parameter "refcode".
12132
12133 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12134
12135         PR gdb/14441
12136         * dwarf2read.c (read_tag_reference_type): Use
12137         lookup_lvalue_reference_type() instead of lookup_reference_type().
12138         * eval.c (evaluate_subexp_standard): Likewise.
12139         * f-exp.y: Likewise.
12140         * gdbtypes.c (make_reference_type, lookup_reference_type):
12141         Generalize with rvalue reference types.
12142         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
12143         convenience wrappers for lookup_reference_type().
12144         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
12145         reference kind parameter.
12146         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
12147         wrappers for lookup_reference_type().
12148         * guile/scm-type.c (gdbscm_type_reference): Use
12149         lookup_lvalue_reference_type() instead of lookup_reference_type().
12150         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
12151         * parse.c (follow_types): Likewise.
12152         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
12153         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
12154         Likewise.
12155         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
12156         (gdbpy_invoke_xmethod): Likewise.
12157         * stabsread.c: Provide extra argument to make_reference_type()
12158         call.
12159         * valops.c (value_ref, value_rtti_indirect_type): Use
12160         lookup_lvalue_reference_type() instead of lookup_reference_type().
12161
12162 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
12163
12164         PR gdb/14441
12165         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
12166         (TYPE_IS_REFERENCE): New macro.
12167         (struct type): Add rvalue_reference_type field.
12168         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
12169
12170 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12171
12172         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
12173         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
12174         New function definition.
12175         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
12176         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
12177         New function declaration.
12178         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
12179         * mi/mi-interp.h: New file.
12180         * solib.c (info_sharedlibrary_command): Replace for loop with
12181         ALL_SO_LIBS macro
12182         * solib.h (update_solib_list): New function declaration.
12183         (so_list_head): Move macro.
12184         * solist.h (ALL_SO_LIBS): New macro.
12185
12186 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
12187
12188         * infcmd.c (post_create_inferior): Remove unused argument in
12189         call to solib_add.
12190         * remote.c (remote_start_remote): Likewise.
12191         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
12192         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
12193         (enable_break): Likewise.
12194         * solib.c (update_solib_list): Remove unused target argument
12195         and its documentation.
12196         (solib_add): Remove unused target argument.  Remove unused
12197         argument in call to update_solib_list.
12198         (info_sharedlibrary_command): Remove unused argument in call
12199         to update_solib_list.
12200         (sharedlibrary_command): Remove unused argument in call to
12201         solib_add.
12202         (handle_solib_event): Likewise.
12203         (reload_shared_libraries): Likewise.
12204         * solib.h (solib_add): Remove unused target argument.
12205
12206 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12207
12208         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12209         (s390_displaced_step_fixup): Cover relative branches with the
12210         default fixup handling.  This fixes lack of support for some
12211         relative branch instructions.
12212
12213 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12214
12215         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12216         ptid from regcache.
12217
12218 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12219
12220         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12221         i386_darwin_store_inferior_registers): Use ptid from regcache.
12222
12223 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12224
12225         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12226         i386bsd_store_inferior_registers): Use ptid from regcache.
12227
12228 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12229
12230         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12231         hppaobsd_store_registers): Use ptid from regcache.
12232
12233 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12234
12235         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12236         hppanbsd_store_registers): Use ptid from regcache.
12237
12238 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12239
12240         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12241         from regcache.  Use get_ptrace_pid.
12242
12243 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12244
12245         * corelow.c (get_core_register_section): Use ptid from regcache,
12246         update doc.
12247
12248 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12249
12250         * bsd-uthread.c (bsd_uthread_fetch_registers,
12251         bsd_uthread_store_registers): Use ptid from regcache, set and
12252         restore inferior_ptid.
12253
12254 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12255
12256         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12257         fetch_fp_regs, store_register, store_regs, store_fp_register,
12258         store_fp_regs): Use ptid from regcache.
12259
12260 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
12261
12262         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12263         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12264         store_vfp_regs): Use ptid from regcache.
12265
12266 2017-03-17  Pedro Alves  <palves@redhat.com>
12267
12268         PR remote/21188
12269         * ser-base.c (ser_base_wait_for): Add comment.
12270         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12271         version.
12272         * ser-unix.c (hardwire_raw): Remove reference to
12273         scb->current_timeout.
12274         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12275         (hardwire_ops): Install ser_base_readchar instead of
12276         hardwire_readchar.
12277         * serial.h (struct serial) <current_timeout, timeout_remaining>:
12278         Remove fields.
12279
12280 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
12281
12282         PR gdb/19637
12283         * python/lib/gdb/printer/bound_registers.py: Add support for
12284         Python 3.
12285
12286 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12287
12288         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12289         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12290         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12291         byte_offset to subobj_byte_offset.  Fix the handling of
12292         DWARF_VALUE_STACK on big-endian targets when coming via an
12293         implicit pointer.
12294         (dwarf2_evaluate_loc_desc): Adjust call to
12295         dwarf2_evaluate_loc_desc_full.
12296         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12297         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12298
12299 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12300
12301         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12302         and REVSH instructions.
12303
12304 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12305
12306         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12307         (arm_record_test): Declare.
12308         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12309         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12310         align with the manual.
12311         (thumb_record_misc): Adjust the code order to align with the
12312         manual.
12313         (thumb2_record_decode_insn_handler): Fix instruction matching.
12314         (instruction_reader_thumb): New class.
12315         (arm_record_test): New function.
12316
12317 2017-03-16  Yao Qi  <yao.qi@linaro.org>
12318
12319         * arm-tdep.c (abstract_memory_reader): New class.
12320         (instruction_reader): New class.
12321         (extract_arm_insn): Add argument 'reader'.  Callers updated.
12322         (decode_insn): Likewise.
12323
12324 2017-03-16  Doug Evans  <dje@google.com>
12325
12326         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12327         member.  Change type of TYPE member to SCM.  All uses updated.
12328         (lsscm_make_lazy_string_smob): Add assert.
12329         (lsscm_make_lazy_string): Flag bad length values.
12330         (lsscm_elt_type): New function.
12331         (gdbscm_lazy_string_to_value): Rewrite to use
12332         lsscm_safe_lazy_string_to_value.
12333         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12334         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12335         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
12336         in incoming type.
12337         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12338         * guile/scm-type.c (tyscm_scm_to_type): New function.
12339
12340 2017-03-15  Doug Evans  <dje@google.com>
12341
12342         PR python/17728, python/18439, python/18779
12343         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12344         member.  Change type of TYPE member to PyObject *.  All uses updated.
12345         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12346         (gdbpy_create_lazy_string_object): Flag bad length values.
12347         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12348         Handle typedefs in incoming type.
12349         (stpy_lazy_string_elt_type): New function.
12350         (gdbpy_extract_lazy_string): Call it.
12351         * python/py-value.c (valpy_lazy_string): Flag bad length values.
12352         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
12353         typedefs in incoming type.
12354
12355 2017-03-16  Doug Evans  <dje@google.com>
12356
12357         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12358         * guile/scm-type.c (tyscm_scm_to_type): New function.
12359
12360 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
12361
12362         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12363         "ULONGEST" for "skip".
12364
12365 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12366
12367         PR gdb/21220
12368         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12369         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12370         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
12371         over ptrace peek/poke until end of buffer or error.
12372
12373 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
12374
12375         * parse.c (length_of_subexp): Make static.
12376         * parser-defs.h (length_of_subexp): Remove.
12377
12378 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12379
12380         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12381         as well.
12382
12383 2017-03-14  Pedro Alves  <palves@redhat.com>
12384
12385         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12386         (main): Use std::unique_ptr.  Remove calls to
12387         cp_demangled_name_parse_free.
12388
12389 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12390
12391         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12392         alphabsd_store_inferior_registers): Use regcache->ptid instead
12393         of inferior_ptid.
12394
12395 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12396
12397         * aix-thread.c (aix_thread_fetch_registers,
12398         aix_thread_store_registers): Use regcache->ptid instead of
12399         inferior_ptid.
12400
12401 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12402
12403         * aarch64-linux-nat.c (fetch_gregs_from_thread,
12404         store_gregs_to_thread, fetch_fpregs_from_thread,
12405         store_fpregs_to_thread): Use regcache->ptid instead of
12406         inferior_ptid.
12407
12408 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12409
12410         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12411         amd64_linux_fetch_inferior_registers): Use regcache->ptid
12412         instead of inferior_ptid.
12413
12414 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12415
12416         * target.c (target_fetch_registers, target_store_registers): Add
12417         assert.
12418
12419 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
12420
12421         * regcache.h (regcache_get_ptid): New function.
12422         * regcache.c (regcache_get_ptid): New function.
12423
12424 2017-03-13  Mark Wielaard  <mark@klomp.org>
12425
12426         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12427
12428 2017-03-10  Keith Seitz  <keiths@redhat.com>
12429
12430         PR c++/8218
12431         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12432
12433 2017-03-08  Pedro Alves  <palves@redhat.com>
12434
12435         PR gdb/18360
12436         * infrun.c (start_step_over, do_target_resume, resume)
12437         (restart_threads): Assert we're not resuming a thread that is
12438         meant to be stopped.
12439         (infrun_thread_stop_requested_callback): Delete.
12440         (infrun_thread_stop_requested): If the thread is internally
12441         stopped, queue a pending stop event and clear the thread's
12442         inline-frame state.
12443         (handle_stop_requested): New function.
12444         (handle_syscall_event, handle_inferior_event_1): Use
12445         handle_stop_requested.
12446         (handle_stop_requested): New function.
12447         (handle_signal_stop): Set the thread's stop_signal here instead of
12448         at caller.
12449         (finish_step_over): Clear step over info unconditionally.
12450         (handle_signal_stop): If the user had interrupted the event
12451         thread, consider the stop a random signal.
12452         (handle_signal_stop) <signal arrived while stepping over
12453         breakpoint>: Don't restart threads here.
12454         (stop_waiting): Don't clear step-over info here.
12455
12456 2017-03-08  Pedro Alves  <palves@redhat.com>
12457
12458         PR 21206
12459         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12460         goes to argument 2, not 1.
12461
12462 2017-03-08  Pedro Alves  <palves@redhat.com>
12463
12464         PR cli/21218
12465         * top.c (gdb_readline_wrapper): Avoid passing NULL to
12466         display_gdb_prompt.
12467         (command_line_input): Add comment.
12468
12469 2017-03-08  Pedro Alves  <palves@redhat.com>
12470
12471         PR tui/21216
12472         * tui/tui-file.c (tui_file::write): New.
12473         * tui/tui-file.h (tui_file): Override "write".
12474         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12475         factored out from ...
12476         (tui_puts): ... here.
12477         (tui_putc): Use them.
12478         (tui_write): New function.
12479         * tui/tui-io.h (tui_write): Declare.
12480
12481 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12482
12483         * Makefile.in (SFILES): Replace "environ.c" with
12484         "common/environ.c".
12485         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12486         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
12487         to...
12488         * common/environ.c: ... here.
12489         * environ.h: Moved to...
12490         * common/environ.h: ... here.
12491
12492 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12493
12494         * gdbarch.sh (pstring_ptr): New static function.
12495         (gdbarch_disassembler_options): Use it.
12496         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12497         not valid_disassembler_option->name.
12498         * gdbarch.c: Regenerate.
12499
12500 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
12501
12502         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12503
12504 2017-03-07  Pedro Alves  <palves@redhat.com>
12505
12506         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12507
12508 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12509
12510         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12511         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12512         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12513         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12514
12515 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
12516
12517         * xtensa-linux-nat.c (fetch_gregs): Remove const.
12518
12519 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
12520
12521         * remote.c (remote_add_target_side_commands): Use range-based
12522         for loop.
12523
12524 2017-03-03  Yao Qi  <yao.qi@linaro.org>
12525
12526         PR gdb/21165
12527         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12528         value is lazy.
12529         * valprint.c (common_val_print): Likewise.
12530
12531 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
12532
12533         * NEWS: Mention new set/show disassembler-options commands.
12534         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12535         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12536         (prospective_options): New static variable.
12537         (gdb_disassembler::gdb_disassembler): Initialize
12538         m_di.disassembler_options.
12539         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12540         (get_disassembler_options): New function.
12541         (set_disassembler_options): Likewise.
12542         (set_disassembler_options_sfunc): Likewise.
12543         (show_disassembler_options_sfunc): Likewise.
12544         (disassembler_options_completer): Likewise.
12545         (_initialize_disasm): Likewise.
12546         * disasm.h (get_disassembler_options): New prototype.
12547         (set_disassembler_options): Likewise.
12548         * gdbarch.sh (gdbarch_disassembler_options): New variable.
12549         (gdbarch_verify_disassembler_options): Likewise.
12550         * gdbarch.c: Regenerate.
12551         * gdbarch.h: Likewise.
12552         * arm-tdep.c (num_disassembly_options): Delete.
12553         (set_disassembly_style): Likewise.
12554         (arm_disassembler_options): New static variable.
12555         (set_disassembly_style_sfunc): Convert short style name into long
12556         option name.  Call set_disassembler_options.
12557         (show_disassembly_style_sfunc): New function.
12558         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12559         set_gdbarch_verify_disassembler_options.
12560         (_initialize_arm_tdep): Delete regnames variable and update callers.
12561         (arm_disassembler_options): Initialize.
12562         (disasm_options): New variable.
12563         (num_disassembly_options): Rename from this...
12564         (num_disassembly_styles): ...to this.  Compute by scanning through
12565         disasm_options.
12566         (valid_disassembly_styles): Initialize using disasm_options.
12567         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12568         set_arm_regname_option.
12569         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12570         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12571         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12572         set_gdbarch_verify_disassembler_options.
12573         * s390-tdep.c (s390_disassembler_options): New static variable.
12574         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12575         set_gdbarch_verify_disassembler_options.
12576
12577 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12578
12579         * remote.c (remote_add_target_side_condition): Remove "struct"
12580         keyword from range-based for loop.
12581
12582 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
12583
12584         * remote.c (remote_add_target_side_condition): Use range-based
12585         for loop.  Update comment.
12586
12587 2017-02-27  Yao Qi  <yao.qi@linaro.org>
12588
12589         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12590
12591 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
12592
12593         * regcache.c (regcache_raw_update): New function.
12594         (regcache_raw_read): Move code to regcache_raw_update.
12595         * regcache.h (regcache_raw_update): New declaration.
12596         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12597
12598 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
12599
12600         * dwarf2read.c (create_debug_type_hash_table): Initialize
12601         header.signature and header.type_offset_in_tu.
12602
12603 2017-02-24  Pedro Alves  <palves@redhat.com>
12604
12605         * symtab.c (make_file_symbol_completion_list_1): Use
12606         add_symtab_completions.
12607
12608 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12609
12610         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12611
12612 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
12613
12614         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12615         I386_MAX_REGISTER_SIZE.
12616         (i386_pseudo_register_write): Likewise.
12617         (i386_process_record): Likewise.
12618         * i387-tdep.c (i387_supply_xsave): Likewise.
12619         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12620         (store_register): Likewise.
12621
12622 2017-02-23  Pedro Alves  <palves@redhat.com>
12623
12624         * ada-lang.c: Include "common/function-view.h".
12625         (ada_iterate_over_symbols): Adjust to use function_view as
12626         callback type.
12627         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12628         (ada_make_symbol_completion_list): Use a lambda.
12629         (ada_exc_search_name_matches): Delete.
12630         (name_matches_regex): New.
12631         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12632         * compile/compile-c-support.c: Include "common/function-view.h".
12633         (print_one_macro): Change prototype to accept a ui_file pointer.
12634         (write_macro_definitions): Use a lambda.
12635         * dwarf2read.c: Include "common/function-view.h".
12636         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12637         (dw2_expand_symtabs_matching): Adjust to use function_view as
12638         callback type.
12639         * language.h: Include "common/function-view.h".
12640         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12641         function_view as callback type.
12642         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12643         * linespec.c: Include "common/function-view.h".
12644         (collect_info::add_symbol): New method.
12645         (struct symbol_and_data_callback, iterate_inline_only, struct
12646         symbol_matcher_data, iterate_name_matcher): Delete.
12647         (iterate_over_all_matching_symtabs): Adjust to use function_view
12648         as callback type and lambdas.
12649         (iterate_over_file_blocks): Adjust to use function_view as
12650         callback type.
12651         (decode_compound_collector): Now a class with private fields.
12652         (decode_compound_collector::release_symbols): New method.
12653         (collect_one_symbol): Rename to...
12654         (decode_compound_collector::operator()): ... this and adjust.
12655         (lookup_prefix_sym): decode_compound_collector construction bits
12656         move to decode_compound_collector ctor.  Pass the
12657         decode_compound_collector object directly as callback.  Remove
12658         cleanups and use decode_compound_collector::release_symbols
12659         instead.
12660         (symtab_collector): Now a class with private fields.
12661         (symtab_collector::release_symtabs): New method.
12662         (add_symtabs_to_list): Rename to...
12663         (symtab_collector::operator()): ... this and adjust.
12664         (collect_symtabs_from_filename): symtab_collector construction
12665         bits move to symtab_collector ctor.  Pass the symtab_collector
12666         object directly as callback.  Remove cleanups and use
12667         symtab_collector::release_symtabs instead.
12668         (collect_symbols): Delete.
12669         (add_matching_symbols_to_info): Use lambdas.
12670         * macrocmd.c (print_macro_callback): Delete.
12671         (info_macro_command): Use a lambda.
12672         (info_macros_command): Pass print_macro_definition as callable
12673         directly.
12674         (print_one_macro): Remove 'ignore' parameter.
12675         (macro_list_command): Adjust.
12676         * macrotab.c (macro_for_each_data::fn): Now a function_view.
12677         (macro_for_each_data::user_data): Delete field.
12678         (foreach_macro): Adjust to call the function_view.
12679         (macro_for_each): Adjust to use function_view as callback type.
12680         (foreach_macro_in_scope): Adjust to call the function_view.
12681         (macro_for_each_in_scope): Adjust to use function_view as callback
12682         type.
12683         * macrotab.h: Include "common/function-view.h".
12684         (macro_callback_fn): Declare a prototype instead of a pointer.
12685         Remove "user_data" parameter.
12686         (macro_for_each, macro_for_each_in_scope): Adjust to use
12687         function_view as callback type.
12688         * psymtab.c (partial_map_expand_apply)
12689         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12690         Adjust to use function_view as callback type and to return bool.
12691         (psym_expand_symtabs_matching): Adjust to use function_view as
12692         callback types.
12693         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12694         to use function_view as callback type and to return bool.
12695         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12696         callback types.
12697         * symfile.c (expand_symtabs_matching): Adjust to use function_view
12698         as callback types.
12699         * symfile.h: Include "common/function-view.h".
12700         (expand_symtabs_file_matcher_ftype)
12701         (expand_symtabs_symbol_matcher_ftype)
12702         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12703         return bool.
12704         (quick_symbol_functions::map_symtabs_matching_filename)
12705         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12706         function_view as callback type and return bool.
12707         (expand_symtabs_matching): Adjust to use function_view as callback
12708         type.
12709         (maintenance_expand_name_matcher)
12710         (maintenance_expand_file_matcher): Delete.
12711         (maintenance_expand_symtabs): Use lambdas.
12712         * symtab.c (iterate_over_some_symtabs): Adjust to use
12713         function_view as callback types and return bool.
12714         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
12715         of a cleanup.
12716         (lookup_symtab_callback): Delete.
12717         (lookup_symtab): Use a lambda.
12718         (iterate_over_symbols): Adjust to use function_view as callback
12719         type.
12720         (struct search_symbols_data, search_symbols_file_matches)
12721         (search_symbols_name_matches): Delete.
12722         (search_symbols): Use a pair of lambdas.
12723         (struct add_name_data, add_macro_name, symbol_completion_matcher)
12724         (symtab_expansion_callback): Delete.
12725         (default_make_symbol_completion_list_break_on_1): Use lambdas.
12726         * symtab.h: Include "common/function-view.h".
12727         (iterate_over_some_symtabs): Adjust to use function_view as
12728         callback type and return bool.
12729         (iterate_over_symtabs): Adjust to use function_view as callback
12730         type.
12731         (symbol_found_callback_ftype): Remove 'data' parameter and return
12732         bool.
12733         (iterate_over_symbols): Adjust to use function_view as callback
12734         type.
12735
12736 2017-02-23  Pedro Alves  <palves@redhat.com>
12737
12738         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12739         (%.o) <unittests/%.c>: New pattern.
12740         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12741         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12742         * common/function-view.h: New file.
12743         * unittests/function-view-selftests.c: New file.
12744         * configure: Regenerate.
12745
12746 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
12747
12748         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12749         inferior_ptid.
12750         * go32-nat.c (go32_thread_alive): Likewise.
12751
12752 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12753
12754         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12755         delete.
12756
12757 2017-02-23  Yao Qi  <yao.qi@linaro.org>
12758
12759         * varobj.c (varobj_clear_saved_item): Use delete instead of
12760         xfree.
12761         (update_dynamic_varobj_children): Likewise.
12762
12763 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12764
12765         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12766
12767 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
12768
12769         * common/enum-flags.h (enum_flags::enum_flags): Initialize
12770         m_enum_value to 0 in default constructor.
12771
12772 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
12773
12774         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12775         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12776         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12777         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12778         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12779         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12780         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12781         IS_STORE_CONDITIONAL_INSN.
12782
12783 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
12784
12785         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12786
12787 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12788
12789         * NEWS (Changes since GDB 7.12): Add DWARF-5.
12790
12791 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12792
12793         * dwarf2read.c (skip_one_die, read_attribute_value)
12794         (dwarf2_const_value_attr, dump_die_shallow)
12795         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12796         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12797
12798 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12799
12800         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12801         (dwarf_parse_macro_header): Accept DWARF version 5.
12802         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12803
12804 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12805
12806         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12807         DW_AT_GNU_*.
12808         * common/common-exceptions.h (enum errors): Likewise.
12809         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12810         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12811         (dwarf_expr_context::execute_stack_op): Likewise.
12812         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12813         Likewise.
12814         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12815         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12816         (show_entry_values_debug, call_site_to_target_addr)
12817         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12818         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12819         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12820         (value_of_dwarf_block_entry, indirect_pieced_value)
12821         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12822         (disassemble_dwarf_expression): Likewise.
12823         * dwarf2read.c (process_die, inherit_abstract_dies)
12824         (read_call_site_scope): Likewise.
12825         * gdbtypes.h (struct func_type, struct call_site_parameter)
12826         (struct call_site): Likewise.
12827         * stack.c (read_frame_arg): Likewise.
12828         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12829
12830 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12831
12832         * defs.h (read_unsigned_leb128): New declaration.
12833         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12834         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12835         (dwarf2_find_location_expression): Call also
12836         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
12837         * dwarf2loc.h (dwarf2_version): New declaration.
12838         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12839         rnglists.
12840         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12841         .debug_rnglists.
12842         (struct dwop_section_names): Add loclists_dwo.
12843         (dwop_section_names): Add .debug_loclists.dwo.
12844         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12845         (struct dwarf2_per_cu_data): Add dwarf_version.
12846         (struct dwo_sections): Add loclists.
12847         (struct attr_abbrev): Add implicit_const.
12848         (read_indirect_line_string): New declaration.
12849         (read_unsigned_leb128): Delete declaration.
12850         (rcuh_kind): New definition.
12851         (read_and_check_comp_unit_head): Change parameter
12852         is_debug_types_section to section_kind.
12853         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12854         (read_comp_unit_head): Change parameter abfd to section, add parameter
12855         section_kind.  Handle DWARF-5.
12856         (error_check_comp_unit_head): Accept also DWARF version 5.
12857         (read_and_check_comp_unit_head): Change parameter
12858         is_debug_types_section to section_kind.
12859         (read_and_check_type_unit_head): Delete function.
12860         (read_abbrev_offset): Handle DWARF-5.
12861         (create_debug_type_hash_table): Add parameter section_kind.  Process
12862         only DW_UT_type.  Use signature and type_offset_in_tu from struct
12863         comp_unit_head.
12864         (create_debug_types_hash_table): Update create_debug_type_hash_table
12865         caller.
12866         (create_all_type_units): Call create_debug_type_hash_table.
12867         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12868         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12869         caller.
12870         (skip_one_die): Handle DW_FORM_implicit_const.
12871         (dwarf2_rnglists_process): New function.
12872         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12873         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12874         (read_attribute_value): Handle DW_FORM_implicit_const,
12875         DW_FORM_line_strp.
12876         (read_attribute): Handle DW_FORM_implicit_const.
12877         (read_indirect_string_at_offset_from): New function from
12878         read_indirect_string_at_offset.
12879         (read_indirect_string_at_offset): Call
12880         read_indirect_string_at_offset_from.
12881         (read_indirect_line_string_at_offset): New function.
12882         (read_indirect_string): New function comment.
12883         (read_indirect_line_string): New function.
12884         (read_unsigned_leb128): Make it global.
12885         (dwarf2_string_attr): Handle DWARF-5.
12886         (add_include_dir_stub, read_formatted_entries): New functions.
12887         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12888         Handle DWARF-5.
12889         (per_cu_header_read_in): Update read_comp_unit_head caller.
12890         (dwarf2_version): New function.
12891         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12892         rnglists.
12893         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12894         fields.
12895
12896 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12897
12898         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12899
12900 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12901
12902         * dwarf2read.c (dwarf2_ranges_process): New function from
12903         dwarf2_ranges_read.
12904         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12905         dwarf2_ranges_process.
12906
12907 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
12908
12909         * dwarf2read.c (create_debug_type_hash_table): New function from
12910         create_debug_types_hash_table.
12911         (create_debug_types_hash_table): Call create_debug_type_hash_table.
12912         (create_all_type_units, open_and_init_dwo_file): Update
12913         create_debug_types_hash_table callers.
12914
12915 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12916
12917         PR gdb/16188
12918         * fork-child.c (trace_start_error): Fix thinko.  va_end should
12919         refer to 'ap', not 'args'.
12920
12921 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
12922             Pedro Alves  <palves@redhat.com>
12923
12924         PR gdb/16188
12925         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12926         calls succeeded.
12927         * fork-child.c (trace_start_error): New function.
12928         (trace_start_error_with_name): Likewise.
12929         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12930         * inf-ptrace.c (inf_ptrace_me): Likewise.
12931         * inferior.h (trace_start_error): New prototype.
12932         (trace_start_error_with_name): Likewise.
12933
12934 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
12935
12936         PR gdb/21164
12937         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12938         NULL before using it.
12939         * symmisc.c (maintenance_print_symbols): Likewise.
12940         (maintenance_print_msymbols): Likewise.
12941
12942 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12943
12944         * NEWS: Add record Python bindings entry.
12945
12946 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12947
12948         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12949         py-record-full.o.
12950         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12951         * python/py-record-btrace.c, python/py-record-btrace.h,
12952         python/py-record-full.c, python/py-record-full.h: New file.
12953         * python/py-record.c: Add include for py-record-btrace.h and
12954         py-record-full.h.
12955         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12956         recpy_instruction_history, recpy_function_call_history, recpy_begin,
12957         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12958         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12959         New definition.
12960         (gdbpy_initialize_btrace): New export.
12961         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12962
12963 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12964
12965         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12966         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12967         * python/py-record.c: New file.
12968         * python/python-internal.h (gdbpy_start_recording,
12969         gdbpy_current_recording, gdpy_stop_recording,
12970         gdbpy_initialize_record): New export.
12971         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12972         (python_GdbMethods): Add gdbpy_start_recording,
12973         gdbpy_current_recording and gdbpy_stop_recording.
12974
12975 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12976
12977         * record-btrace.c (record_btrace_record_method): New function.
12978         (init_record_btrace_ops): Initialize to_record_method.
12979         * record-full.c (record_full_record_method): New function.
12980         (init_record_full_ops, init_record_full_core_ops): Add
12981         record_full_record_method.
12982         * record.h (enum record_method): New enum.
12983         * target-debug.h (target_debug_print_enum_record_method: New define.
12984         * target-delegates.c: Regenerate.
12985         * target.c (target_record_method): New function.
12986         * target.h: Include record.h.
12987         (struct target_ops) <to_record_method>: New field.
12988         (target_record_method): New export.
12989
12990 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12991
12992         * record.h (record_start, record_stop): New export.
12993         * record.c (record_start, record_stop): New function.
12994
12995 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
12996
12997         * btrace.c (btrace_fetch): Copy function call segments pointer
12998         into a vector.
12999         (btrace_clear): Clear the vector.
13000         (btrace_find_insn_by_number): Use binary search to find the correct
13001         function call segment.
13002         * btrace.h (brace_fun_p): New typedef.
13003         (struct btrace_thread_info) <functions>: New field.
13004
13005 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13006
13007         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
13008         * btrace.c (btrace_decode_error): ... here.  New function.
13009         * btrace.h (btrace_decode_error): New export.
13010
13011 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
13012
13013         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
13014         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
13015         btrace_find_insn_by_number): Remove special case for gaps.
13016         * btrace.h (btrace_insn_get_error): New export.
13017         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
13018         * record-btrace.c (btrace_insn_history): Print number for gaps.
13019         (record_btrace_info, record_btrace_goto): Handle gaps.
13020
13021 2017-02-14  Tom Tromey  <tom@tromey.com>
13022
13023         PR python/13598:
13024         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
13025         event.
13026         * python/py-evts.c (gdbpy_initialize_py_events): Add
13027         before_prompt registry.
13028         * python/py-events.h (events_object) <before_prompt>: New field.
13029
13030 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
13031
13032         * btrace.c (ftrace_new_switch): Preserve up link and flags.
13033
13034 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
13035
13036         * symfile (_initialize_symfile): Add usage text to the load command's
13037         help text.
13038
13039 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
13040
13041         * utils.c (defaulted_query): Don't query on secondary UIs.
13042
13043 2017-02-10  Tom Tromey  <tom@tromey.com>
13044
13045         * rust-lang.c (rust_get_disr_info): Remove unused variable.
13046
13047 2017-02-10  Tom Tromey  <tom@tromey.com>
13048
13049         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
13050         "cleanup" local.
13051         * python/py-type.c (typy_legacy_template_argument): Remove
13052         unnecessary "cleanup" local.
13053
13054 2017-02-10  Tom Tromey  <tom@tromey.com>
13055
13056         * python/python.c (do_start_initialization): New function, from
13057         _initialize_python.
13058         (_initialize_python): Call do_start_initialization.
13059         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
13060         goto.
13061
13062 2017-02-10  Tom Tromey  <tom@tromey.com>
13063
13064         * python/py-prettyprint.c (pretty_print_one_value): Use
13065         gdbpy_ref.
13066
13067 2017-02-10  Tom Tromey  <tom@tromey.com>
13068
13069         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
13070         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
13071         gdbpy_ref.
13072         * python/py-type.c (field_new): Use gdbpy_ref.
13073         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
13074         gdbpy_ref.
13075         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
13076         (py_free_pspace): Likewise.
13077         (pspace_to_pspace_object): Likewise.
13078         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
13079         (py_free_objfile): Likewise.
13080         (objfile_to_objfile_object): Likewise.
13081         * python/py-inferior.c (delete_thread_object): Use
13082         gdbpy_ref.
13083         (infpy_read_memory): Likewise.
13084         (py_free_inferior): Likewise.
13085         * python/py-evtregistry.c (create_eventregistry_object): Use
13086         gdbpy_ref.
13087         * python/py-event.c (create_event_object): Use gdbpy_ref.
13088
13089 2017-02-10  Tom Tromey  <tom@tromey.com>
13090
13091         * python/py-ref.h (gdbpy_ref_policy): Now a template.
13092         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
13093         used.
13094         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
13095         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
13096         python/py-exitedevent.c, python/py-finishbreakpoint.c,
13097         python/py-framefilter.c, python/py-function.c,
13098         python/py-inferior.c, python/py-infevents.c,
13099         python/py-linetable.c, python/py-newobjfileevent.c,
13100         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
13101         python/py-signalevent.c, python/py-stopevent.c,
13102         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
13103         python/py-unwind.c, python/py-utils.c, python/py-value.c,
13104         python/py-varobj.c, python/py-xmethods.c, python/python.c,
13105         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
13106
13107 2017-02-10  Tom Tromey  <tom@tromey.com>
13108
13109         * ui-out.h (ui_out_emit_type): New class.
13110         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
13111         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
13112         and ui_out_emit_tuple.
13113         (enumerate_locals): Likewise.
13114         (py_mi_print_variables, py_print_locals, py_print_args): Use
13115         ui_out_emit_list.
13116         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
13117         ui_out_emit_list.
13118         * common/gdb_optional.h: New file.
13119
13120 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13121
13122         * MAINTAINERS (Write After Approval): Update my e-mail address.
13123
13124 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
13125
13126         PR gdb/21122
13127         * breakpoint.c (_initialize_breakpoint): Update the help description
13128         of the 'commands' command to indicate that it takes a list argument.
13129
13130 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
13131
13132         * interps.c (current_interp_set_logging): Remove "return".
13133
13134 2017-02-09  Gary Benson  <gbenson@redhat.com>
13135
13136         * symtab.c (add_symtab_completions): Prevent NULL pointer
13137         dereference.
13138
13139 2017-02-08  Pedro Alves  <palves@redhat.com>
13140
13141         * interps.c (interp::interp): Remove reference to quiet_p.
13142         (interp_set): Make static.  Remove dead "Switching to" output
13143         code.
13144         (interp_quiet_p, interp_set_quiet): Delete.
13145         (interpreter_exec_cmd): Don't set the interpreter quiet.
13146         * interps.h (interp_quiet_p): Make static.
13147         (class interp) <quiet_p>: Remove field
13148
13149 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13150
13151         * cli/cli-decode.c (find_command_name_length): Make it extern.
13152         * cli/cli-decode.h (find_command_name_length): Declare.
13153         * cli/cli-script.c (command_name_equals, line_first_arg):
13154         New functions.
13155         (process_next_line): Use cli-decode to parse command names.
13156         (build_command_line): Make args a constant pointer.
13157
13158 2017-02-08  Jerome Guitton  <guitton@adacore.com>
13159
13160         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
13161         Remove case-insensitive search.
13162
13163 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
13164
13165         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
13166         at the end of the line.  Avoids an ARI warning.
13167
13168 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
13169
13170         * NEWS: Mention support for record/replay of Intel 64 rdrand and
13171         rdseed instructions.
13172         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
13173
13174 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
13175
13176         PR tdep/20936
13177         Provide and use sparc32 and sparc64 target description XML files.
13178         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
13179         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
13180         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
13181         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
13182         * features/sparc/sparc32-solaris.xml: New file.
13183         * features/sparc/sparc64-solaris.xml: New file.
13184         * features/sparc/sparc32-solaris.c: Generated.
13185         * features/sparc/sparc64-solaris.c: Generated.
13186         * sparc-tdep.h: Account for differences in target descriptions.
13187         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
13188         (sparc32_register_type): Use target provided registers.
13189         (validate_tdesc_registers): New function.
13190         (sparc32_gdbarch_init): Use tdesc_has_registers.
13191         Set pseudoregister functions.
13192         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
13193         (sparc64_register_type): Use target provided registers.
13194         (sparc64_init_abi): Set pseudoregister functions.
13195
13196 2017-02-03  Tom Tromey  <tom@tromey.com>
13197
13198         PR rust/21097:
13199         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13200         with a single member.
13201
13202 2017-02-03  Pedro Alves  <palves@redhat.com>
13203
13204         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13205         (cli_interp_base::~cli_interp_base): New.
13206         (cli_interp): New struct.
13207         (as_cli_interp): Cast the interp itself to cli_interp.
13208         (cli_interpreter_pre_command_loop): Rename to ...
13209         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
13210         parameter.
13211         (cli_interpreter_init): Rename to ...
13212         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
13213         boolean.  Make extern.
13214         (cli_interpreter_resume): Rename to ...
13215         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
13216         extern.
13217         (cli_interpreter_suspend): Rename to ...
13218         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
13219         extern.
13220         (cli_interpreter_exec): Rename to ...
13221         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
13222         extern.
13223         (cli_interpreter_supports_command_editing): Rename to ...
13224         (cli_interp_base::supports_command_editing): ... this.  Remove
13225         'interp' parameter.  Make extern.
13226         (cli_ui_out): Rename to ...
13227         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
13228         Make extern.
13229         (cli_set_logging): Rename to ...
13230         (cli_interp_base::set_logging): ... this.  Remove 'interp'
13231         parameter.  Make extern.
13232         (cli_interp_procs): Delete.
13233         (cli_interp_factory): Adjust to use "new".
13234         * cli/cli-interp.h: Include "interps.h".
13235         (struct cli_interp_base): New struct.
13236         * interps.c (struct interp): Delete.  Fields moved to interps.h.
13237         (interp_new): Delete.
13238         (interp::interp, interp::~interp): New.
13239         (interp_set): Use bool, and return void.  Assume the interpreter
13240         has suspend, init and resume methods, and that the all return
13241         void.
13242         (set_top_level_interpreter): interp_set returns void.
13243         (interp_ui_out): Adapt.
13244         (current_interp_set_logging): Adapt.
13245         (interp_data): Delete.
13246         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13247         (interp_exec): Adapt.
13248         (top_level_interpreter_data): Delete.
13249         * interps.h (interp_init_ftype, interp_resume_ftype)
13250         (interp_suspend_ftype, interp_exec_ftype)
13251         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13252         (class interp): New.
13253         (interp_new): Delete.
13254         (interp_set): Now returns void.  Use bool.
13255         (interp_data, top_level_interpreter_data): Delete.
13256         * mi/mi-common.h: Include interps.h.
13257         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
13258         init, resume, suspect, exec, interp_ui_out, set_logging and
13259         pre_command_loop methods.
13260         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13261         (mi_interpreter_init): Rename to ...
13262         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
13263         bool, return void and make extern.  Adjust.
13264         (mi_interpreter_resume): ... Rename to ...
13265         (mi_interp::resume): ... this.  Remove the 'data' parameter,
13266         return void and make extern.  Adjust.
13267         (mi_interpreter_suspend): ... Rename to ...
13268         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
13269         return void and make extern.  Adjust.
13270         (mi_interpreter_exec): ... Rename to ...
13271         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
13272         extern.  Adjust.
13273         (mi_interpreter_pre_command_loop): ... Rename to ...
13274         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
13275         parameter and make extern.
13276         (mi_on_normal_stop_1): Adjust.
13277         (mi_ui_out): Rename to ...
13278         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
13279         parameter and make extern.  Adjust.
13280         (mi_set_logging): Rename to ...
13281         (mi_interp::set_logging): ... this.  Remove the 'interp'
13282         parameter and make extern.  Adjust.
13283         (mi_interp_procs): Delete.
13284         (mi_interp_factory): Adjust to use 'new'.
13285         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13286         (mi_print_exception, mi_execute_command, mi_load_progress):
13287         Adjust.
13288         * tui/tui-interp.c (tui_interp): New class.
13289         (as_tui_interp): Return a tui_interp pointer.
13290         (tui_on_normal_stop, tui_on_signal_received)
13291         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13292         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13293         to use interp::interp_ui_out.
13294         (tui_init): Rename to ...
13295         (tui_interp::init): ... this.  Remove the 'self' parameter, use
13296         bool, return void and make extern.  Adjust.
13297         (tui_resume): Rename to ...
13298         (tui_interp::resume): ... this.  Remove the 'data' parameter,
13299         return void and make extern.  Adjust.
13300         (tui_suspend): Rename to ...
13301         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
13302         return void and make extern.  Adjust.
13303         (tui_ui_out): Rename to ...
13304         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
13305         parameter, and make extern.  Adjust.
13306         (tui_exec): Rename to ...
13307         (tui_interp::exec): ... this.  Remove the 'data' parameter and
13308         make extern.
13309         (tui_interp_procs): Delete.
13310         (tui_interp_factory): Use "new".
13311
13312 2017-02-02  Tom Tromey  <tom@tromey.com>
13313
13314         * rust-exp.y (ends_raw_string, space_then_number)
13315         (rust_identifier_start_p): Return bool.
13316         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13317         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13318         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13319         (rust_chartype_p): Return bool.
13320         (val_print_struct, rust_print_struct_def, rust_print_type):
13321         Update.
13322         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13323         Return bool.
13324
13325 2017-02-02  Tom Tromey  <tom@tromey.com>
13326
13327         * rust-lang.c: Reindent.
13328
13329 2017-02-02  Tom Tromey  <tom@tromey.com>
13330
13331         * rust-lang.h (rust_crate_for_block): Update.
13332         * rust-lang.c (rust_crate_for_block): Return std::string.
13333         (rust_get_disr_info): Use std:;string, not
13334         gdb::unique_xmalloc_ptr.
13335         * rust-exp.y (crate_name): Update.
13336
13337 2017-02-02  Pedro Alves  <palves@redhat.com>
13338
13339         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13340         field out of gdb_disassembler_test and make it static.
13341
13342 2017-02-02  Pedro Alves  <palves@redhat.com>
13343
13344         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13345         mi1_interp and mi_interp fields.
13346
13347 2017-02-02  Pedro Alves  <palves@redhat.com>
13348
13349         * cli/cli-interp.c (struct saved_output_files, saved_output):
13350         Moved from cli/cli-logging.c.
13351         (cli_set_logging): New function.
13352         (cli_interp_procs): Install cli_set_logging.
13353         * cli/cli-interp.h (make_logging_output, cli_set_logging):
13354         Declare.
13355         * cli/cli-logging.c (struct saved_output_files, saved_output):
13356         Moved to cli/cli-interp.c.
13357         (pop_output_files): Don't save outputs here.
13358         (make_logging_output): New function.
13359         (handle_redirections): Don't build tee nor save previous outputs
13360         here.
13361         * interps.c (current_interp_set_logging): Change prototype.
13362         Assume there's always a set_logging_proc method installed.
13363         * interps.h (interp_set_logging_ftype): Change prototype.
13364         (current_interp_set_logging): Change prototype and adjust comment.
13365         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
13366         use make_logging_output.
13367         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13368 2017-02-02  Pedro Alves  <palves@redhat.com>
13369
13370         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13371         from ...
13372         (set_logging_overwrite): ... here.
13373         (logging_no_redirect_file): Delete.
13374         (set_logging_redirect): Don't handle redirection on the fly.
13375         Instead warn that "logging off" / "logging on" is necessary.
13376         (pop_output_files): Delete references to logging_no_redirect_file.
13377         (show_logging_command): Always speak in terms of what will happen
13378         once logging is reenabled.
13379
13380 2017-02-02  Pedro Alves  <palves@redhat.com>
13381
13382         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13383
13384 2017-02-02  Pedro Alves  <palves@redhat.com>
13385
13386         * disasm.c (gdb_pretty_print_insn): Rename to ...
13387         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13388         Remove gdbarch parameter.  Adapt to clear the object's buffers
13389         instead of allocating new buffers, and to print using the object's
13390         gdb_disassembler instead of calling gdb_print_insn.
13391         (dump_insns): Use gdb_pretty_print_disassembler.
13392         * disasm.h (gdb_pretty_print_insn): Delete declaration.
13393         (gdb_pretty_print_disassembler): New class.
13394         * record-btrace.c (btrace_insn_history): Use
13395         gdb_pretty_print_disassembler.
13396
13397 2017-02-02  Pedro Alves  <palves@redhat.com>
13398
13399         * ada-lang.c (type_as_string): Use string_file.
13400         * ada-valprint.c (ada_print_floating): Use string_file.
13401         * ada-varobj.c (ada_varobj_scalar_image)
13402         (ada_varobj_get_value_image): Use string_file.
13403         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13404         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13405         * breakpoint.c (update_inserted_breakpoint_locations)
13406         (insert_breakpoint_locations, reattach_breakpoints)
13407         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13408         (print_it_watchpoint): Use string_file.
13409         (save_breakpoints): Use stdio_file.
13410         * c-exp.y (oper): Use string_file.
13411         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13412         tee_file.
13413         (pop_output_files): Use delete.
13414         (handle_redirections): Use stdio_file and tee_file.
13415         * cli/cli-setshow.c (do_show_command): Use string_file.
13416         * compile/compile-c-support.c (c_compute_program): Use
13417         string_file.
13418         * compile/compile-c-symbols.c (generate_vla_size): Take a
13419         'string_file &' instead of a 'ui_file *'.
13420         (generate_c_for_for_one_variable): Take a 'string_file &' instead
13421         of a 'ui_file *'.  Use string_file.
13422         (generate_c_for_variable_locations): Take a 'string_file &'
13423         instead of a 'ui_file *'.
13424         * compile/compile-internal.h (generate_c_for_for_one_variable):
13425         Take a 'string_file &' instead of a 'ui_file *'.
13426         * compile/compile-loc2c.c (push, pushf, unary, binary)
13427         (print_label, pushf_register_address, pushf_register)
13428         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13429         'ui_file *'.  Adjust.
13430         * compile/compile.c (compile_to_object): Use string_file.
13431         * compile/compile.h (compile_dwarf_expr_to_c)
13432         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13433         'ui_file *'.
13434         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13435         (replace_typedefs_qualified_name): Use string_file and
13436         obstack_copy0.
13437         * disasm.c (gdb_pretty_print_insn): Use string_file.
13438         (gdb_disassembly): Adjust reference the null_stream global.
13439         (do_ui_file_delete): Delete.
13440         (gdb_insn_length): Use null_stream.
13441         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13442         * dwarf2loc.c (dwarf2_compile_property_to_c)
13443         (locexpr_generate_c_location, loclist_generate_c_location): Take a
13444         'string_file &' instead of a 'ui_file *'.
13445         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13446         * dwarf2read.c (do_ui_file_peek_last): Delete.
13447         (dwarf2_compute_name): Use string_file.
13448         * event-top.c (gdb_setup_readline): Use stdio_file.
13449         * gdbarch.sh (verify_gdbarch): Use string_file.
13450         * gdbtypes.c (safe_parse_type): Use null_stream.
13451         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13452         string_file.
13453         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13454         'string_file *' instead of a 'ui_file *'.
13455         (gdbscm_arch_disassemble): Use string_file.
13456         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13457         * guile/scm-ports.c (class ioscm_file_port): Now a class that
13458         inherits from ui_file.
13459         (ioscm_file_port_delete, ioscm_file_port_rewind)
13460         (ioscm_file_port_put): Delete.
13461         (ioscm_file_port_write): Rename to ...
13462         (ioscm_file_port::write): ... this.  Remove file_port_magic
13463         checks.
13464         (ioscm_file_port_new): Delete.
13465         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13466         ui_file_up.
13467         * guile/scm-type.c (tyscm_type_name): Use string_file.
13468         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13469         Use string_file.
13470         * infcmd.c (print_return_value_1): Use string_file.
13471         * infrun.c (print_target_wait_results): Use string_file.
13472         * language.c (add_language): Use string_file.
13473         * location.c (explicit_to_string_internal): Use string_file.
13474         * main.c (captured_main_1): Use null_file.
13475         * maint.c (maintenance_print_architecture): Use stdio_file.
13476         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13477         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13478         event_channel>: Change type to mi_console_file pointer.
13479         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13480         (mi_console_file_delete): Delete.
13481         (struct mi_console_file): Delete.
13482         (mi_console_file_magic): Delete.
13483         (mi_console_file_new): Delete.
13484         (mi_console_file::mi_console_file): New.
13485         (mi_console_file_delete): Delete.
13486         (mi_console_file_fputs): Delete.
13487         (mi_console_file::write): New.
13488         (mi_console_raw_packet): Delete.
13489         (mi_console_file::flush): New.
13490         (mi_console_file_flush): Delete.
13491         (mi_console_set_raw): Rename to ...
13492         (mi_console_file::set_raw): ... this.
13493         * mi/mi-console.h (class mi_console_file): New class.
13494         (mi_console_file_new, mi_console_set_raw): Delete.
13495         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13496         (mi_set_logging): Use delete and tee_file.  Adjust.
13497         * mi/mi-main.c (output_register): Use string_file.
13498         (mi_cmd_data_evaluate_expression): Use string_file.
13499         (mi_cmd_data_read_memory): Use string_file.
13500         (mi_cmd_execute, print_variable_or_computed): Use string_file.
13501         * mi/mi-out.c (mi_ui_out::main_stream): New.
13502         (mi_ui_out::rewind): Use main_stream and
13503         string_file.
13504         (mi_ui_out::put): Use main_stream and string_file.
13505         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13506         Allocate a 'string_file' instead.
13507         (mi_out_new): Don't allocate a mem_fileopen stream here.
13508         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13509         (mi_ui_out::main_stream): Declare method.
13510         * printcmd.c (eval_command): Use string_file.
13511         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13512         * python/py-arch.c (archpy_disassemble): Use string_file.
13513         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13514         * python/py-frame.c (frapy_str): Use string_file.
13515         * python/py-framefilter.c (py_print_type, py_print_single_arg):
13516         Use string_file.
13517         * python/py-type.c (typy_str): Use string_file.
13518         * python/py-unwind.c (unwind_infopy_str): Use string_file.
13519         * python/py-value.c (valpy_str): Use string_file.
13520         * record-btrace.c (btrace_insn_history): Use string_file.
13521         * regcache.c (regcache_print): Use stdio_file.
13522         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13523         * remote.c (escape_buffer): Use string_file.
13524         * rust-lang.c (rust_get_disr_info): Use string_file.
13525         * serial.c (serial_open_ops_1): Use stdio_file.
13526         (do_serial_close): Use delete.
13527         * stack.c (print_frame_arg): Use string_file.
13528         (print_frame_args): Remove local mem_fileopen stream, not used.
13529         (print_frame): Use string_file.
13530         * symmisc.c (maintenance_print_symbols): Use stdio_file.
13531         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13532         Take a 'string_file *' instead of a 'ui_file *'.
13533         * top.c (new_ui): Use stdio_file and stderr_file.
13534         (free_ui): Use delete.
13535         (execute_command_to_string): Use string_file.
13536         (quit_confirm): Use string_file.
13537         * tracepoint.c (collection_list::append_exp): Use string_file.
13538         * tui/tui-disasm.c (tui_disassemble): Use string_file.
13539         * tui/tui-file.c: Don't include "ui-file.h".
13540         (enum streamtype, struct tui_stream): Delete.
13541         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13542         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13543         (tui_file::tui_file): New method.
13544         (tui_file_fputs): Delete.
13545         (tui_file_get_strbuf): Delete.
13546         (tui_file::puts): New method.
13547         (tui_file_adjust_strbuf): Delete.
13548         (tui_file_flush): Delete.
13549         (tui_file::flush): New method.
13550         * tui/tui-file.h: Tweak intro comment.
13551         Include ui-file.h.
13552         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13553         (tui_file_adjust_strbuf): Delete declarations.
13554         (class tui_file): New class.
13555         * tui/tui-io.c (tui_initialize_io): Use tui_file.
13556         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13557         (tui_register_format): Use string_stream.
13558         * tui/tui-stack.c (tui_make_status_line): Use string_file.
13559         (tui_get_function_from_frame): Use string_file.
13560         * typeprint.c (type_to_string): Use string_file.
13561         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13562         (null_stream): New global.
13563         (ui_file_delete): Delete.
13564         (ui_file::ui_file): New.
13565         (null_file_isatty): Delete.
13566         (ui_file::~ui_file): New.
13567         (null_file_rewind): Delete.
13568         (ui_file::printf): New.
13569         (null_file_put): Delete.
13570         (null_file_flush): Delete.
13571         (ui_file::putstr): New.
13572         (null_file_write): Delete.
13573         (ui_file::putstrn): New.
13574         (null_file_read): Delete.
13575         (ui_file::putc): New.
13576         (null_file_fputs): Delete.
13577         (null_file_write_async_safe): Delete.
13578         (ui_file::vprintf): New.
13579         (null_file_delete): Delete.
13580         (null_file::write): New.
13581         (null_file_fseek): Delete.
13582         (null_file::puts): New.
13583         (ui_file_data): Delete.
13584         (null_file::write_async_safe): New.
13585         (gdb_flush, ui_file_isatty): Adjust.
13586         (ui_file_put, ui_file_rewind): Delete.
13587         (ui_file_write): Adjust.
13588         (ui_file_write_for_put): Delete.
13589         (ui_file_write_async_safe, ui_file_read): Adjust.
13590         (ui_file_fseek): Delete.
13591         (fputs_unfiltered): Adjust.
13592         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13593         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13594         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13595         (set_ui_file_data): Delete.
13596         (string_file::~string_file, string_file::write)
13597         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13598         (do_ui_file_as_string, ui_file_as_string): Delete.
13599         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13600         (struct mem_file): Delete.
13601         (mem_file_new): Delete.
13602         (stdio_file::stdio_file): New.
13603         (mem_file_delete): Delete.
13604         (stdio_file::stdio_file): New.
13605         (mem_fileopen): Delete.
13606         (stdio_file::~stdio_file): New.
13607         (mem_file_rewind): Delete.
13608         (stdio_file::set_stream): New.
13609         (mem_file_put): Delete.
13610         (stdio_file::open): New.
13611         (mem_file_write): Delete.
13612         (stdio_file_magic, struct stdio_file): Delete.
13613         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13614         (stdio_file::flush): New.
13615         (stdio_file_read): Rename to ...
13616         (stdio_file::read): ... this.  Adjust.
13617         (stdio_file_write): Rename to ...
13618         (stdio_file::write): ... this.  Adjust.
13619         (stdio_file_write_async_safe): Rename to ...
13620         (stdio_file::write_async_safe) ... this.  Adjust.
13621         (stdio_file_fputs): Rename to ...
13622         (stdio_file::puts) ... this.  Adjust.
13623         (stdio_file_isatty): Delete.
13624         (stdio_file_fseek): Delete.
13625         (stdio_file::isatty): New.
13626         (stderr_file_write): Rename to ...
13627         (stderr_file::write) ... this.  Adjust.
13628         (stderr_file_fputs): Rename to ...
13629         (stderr_file::puts) ... this.  Adjust.
13630         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13631         (stderr_file::stderr_file): New.
13632         (tee_file_magic): Delete.
13633         (struct tee_file): Delete.
13634         (tee_file::tee_file): New.
13635         (tee_file_new): Delete.
13636         (tee_file::~tee_file): New.
13637         (tee_file_delete): Delete.
13638         (tee_file_flush): Rename to ...
13639         (tee_file::flush): ... this.  Adjust.
13640         (tee_file_write): Rename to ...
13641         (tee_file::write): ... this.  Adjust.
13642         (tee_file::write_async_safe): New.
13643         (tee_file_fputs): Rename to ...
13644         (tee_file::puts): ... this.  Adjust.
13645         (tee_file_isatty): Rename to ...
13646         (tee_file::isatty): ... this.  Adjust.
13647         * ui-file.h (struct obstack, struct ui_file): Don't
13648         forward-declare.
13649         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13650         (ui_file_write_ftype)
13651         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13652         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13653         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13654         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13655         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13656         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13657         (set_ui_file_fseek): Delete.
13658         (ui_file_data, ui_file_delete, ui_file_rewind)
13659         (struct ui_file): New.
13660         (ui_file_up): New.
13661         (class null_file): New.
13662         (null_stream): Declare.
13663         (ui_file_write_for_put, ui_file_put): Delete.
13664         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13665         Delete.
13666         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13667         (gdb_fopen, tee_file_new): Delete.
13668         (struct string_file): New.
13669         (struct stdio_file): New.
13670         (stdio_file_up): New.
13671         (struct stderr_file): New.
13672         (class tee_file): New.
13673         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13674         of a 'ui_file *'.  Adjust.
13675         * ui-out.h (class ui_out) <field_stream>: Likewise.
13676         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13677         (null_stream): Delete.
13678         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13679         Adjust.
13680         * utils.h (struct ui_file): Delete forward declaration..
13681         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13682         (error_stream): Take a 'string_file &' instead of a
13683         'ui_file *'.
13684         * varobj.c (varobj_value_get_print_value): Use string_file.
13685         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13686         * gdbarch.c: Regenerate.
13687
13688 2017-02-02  Pedro Alves  <palves@redhat.com>
13689
13690         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13691         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
13692         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
13693         Adjust to call gdb_print_insn instead of
13694         gdb_disassembler::print_insn.
13695         (dump_insns, do_mixed_source_and_assembly_deprecated)
13696         (do_mixed_source_and_assembly, do_assembly_only): Add back a
13697         'gdbarch' parameter.  Remove gdb_disassembler parameter.
13698         (gdb_disassembly): Don't allocate a gdb_disassembler here.
13699         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13700         declaration.
13701         (gdb_pretty_print_insn): Re-add declaration.
13702         * record-btrace.c (btrace_insn_history): Don't allocate a
13703         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
13704
13705 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
13706
13707         * disasm.h (gdb_disassembly): Remove file_string parameter.
13708         * disasm.c (gdb_disassembly): Likewise.
13709         * cli/cli-cmds.c (print_disassembly): Adapt.
13710         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13711         * stack.c (do_gdb_disassembly): Likewise.
13712
13713 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13714
13715         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13716         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13717         targets.  And if the implicit value is longer than needed, extract
13718         the first bytes instead of the "least significant" ones.
13719
13720 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13721
13722         * btrace.c (btrace_enable): Do not call btrace_add_pc for
13723         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13724         (btrace_fetch): Assert can_access_registers_ptid.
13725         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13726         validate_registers_access.
13727
13728 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
13729
13730         * gdbthread.h (can_access_registers_ptid): New.
13731         * thread.c (can_access_registers_ptid): New.
13732
13733 2017-02-01  Pedro Alves  <palves@redhat.com>
13734
13735         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13736
13737 2017-01-31  Pedro Alves  <palves@redhat.com>
13738
13739         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13740         Fix typos.
13741
13742 2017-01-31  Pedro Alves  <palves@redhat.com>
13743
13744         * stack.c (print_frame_args): Remove local mem_fileopen stream,
13745         not used.
13746
13747 2017-01-31  Pedro Alves  <palves@redhat.com>
13748
13749         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13750
13751 2017-01-31  Pedro Alves  <palves@redhat.com>
13752
13753         * common/scoped_restore.h
13754         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13755         change the value's parameter type to T2.
13756         (make_scoped_restore): Likewise.
13757
13758 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13759             Richard Henderson  <rth@redhat.com>
13760
13761         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13762         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13763         GS_BASE for older kernels.
13764         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13765         GS_BASE for older kernels.
13766         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13767         and GS_BASE to the offset table.
13768         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13769         system register group.
13770         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13771         for older kernels.
13772         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13773         amd64 ABI.
13774         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13775         AMD64_GSBASE_REGNUM.
13776         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13777         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13778         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13779         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13780         i386/64bit-segments.xml in those rules.
13781         * features/i386/64bit-segments.xml: New file.
13782         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13783         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13784         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13785         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13786         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13787         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13788         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13789         * features/i386/amd64-avx-linux.c: Regenerated.
13790         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13791         * features/i386/amd64-avx-mpx.c: Regenerated.
13792         * features/i386/amd64-avx512-linux.c: Regenerated.
13793         * features/i386/amd64-linux.c: Regenerated.
13794         * features/i386/amd64-mpx-linux.c: Regenerated.
13795         * features/i386/i386-avx-mpx-linux.c: Regenerated.
13796         * features/i386/i386-avx-mpx.c: Regenerated.
13797         * features/i386/x32-avx-linux.c: Regenerated.
13798         * features/i386/x32-avx512-linux.c: Regenerated.
13799         * regformats/i386/amd64-avx-linux.dat: Regenerated.
13800         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13801         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13802         * regformats/i386/amd64-linux.dat: Regenerated.
13803         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13804         * regformats/i386/x32-avx-linux.dat: Regenerated.
13805         * regformats/i386/x32-avx512-linux.dat: Regenerated.
13806         * regformats/i386/x32-linux.dat: Regenerated.
13807
13808 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13809
13810         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13811         Set to AMD64_NUM_REGS.
13812
13813 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13814
13815         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13816         that checks validity of a register number.
13817
13818 2017-01-27  Kees Cook  <keescook@google.com>
13819
13820         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13821         fetch_fpregs if target has fpa registers.
13822         (arm_linux_store_inferior_registers): Call store_fpregs if target
13823         has fpa registers.
13824
13825 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13826
13827         * cris-tdep.c (cris_gdbarch_init): Remove check for
13828         info.byte_order and force it to BFD_ENDIAN_LITTLE.
13829
13830 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
13831
13832         * corelow.c (get_core_register_section): Check for regset
13833         existence before checking for REGSET_VARIABLE_SIZE.
13834
13835 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13836             Pedro Alves  <palves@redhat.com>
13837
13838         PR gdb/20939
13839         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13840         call memory_error, save memaddr instead.
13841         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13842         negative, cal memory_error.
13843         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13844
13845 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13846
13847         * disasm-selftests.c (memory_error_test): New function.
13848         (_initialize_disasm_selftests): Register memory_error_test.
13849
13850 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13851
13852         * Makefile.in (SFILES): Add disasm-selftests.c and
13853         selftest-arch.c.
13854         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13855         * disasm-selftests.c: New file.
13856         * selftest-arch.c: New file.
13857         * selftest-arch.h: New file.
13858
13859 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13860
13861         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13862         to bfd_arch_mep.  Don't return 0 if section is not
13863         found.  Call print_insn_mep.
13864
13865 2017-01-26  Pedro Alves  <palves@redhat.com>
13866             Yao Qi  <yao.qi@linaro.org>
13867
13868         * arm-tdep.c: Include "disasm.h".
13869         (gdb_print_insn_arm): Update code to get gdbarch.
13870         * disasm.c (dis_asm_read_memory): Change it to
13871         gdb_disassembler::dis_asm_read_memory.
13872         (dis_asm_memory_error): Likewise.
13873         (dis_asm_print_address): Likewise.
13874         (gdb_pretty_print_insn): Change it to
13875         gdb_disassembler::pretty_print_insn.
13876         (dump_insns): Add one argument gdb_disassemlber.  All
13877         callers updated.
13878         (do_mixed_source_and_assembly_deprecated): Likewise.
13879         (do_mixed_source_and_assembly): Likewise.
13880         (do_assembly_only): Likewise.
13881         (gdb_disassembler::gdb_disassembler): New.
13882         (gdb_disassembler::print_insn): New.
13883         * disasm.h (class gdb_disassembler): New.
13884         (gdb_pretty_print_insn): Remove declaration.
13885         (gdb_disassemble_info): Likewise.
13886         * guile/scm-disasm.c (class gdbscm_disassembler): New.
13887         (gdbscm_disasm_read_memory_worker): Update.
13888         (gdbscm_disasm_read_memory): Update.
13889         (gdbscm_disasm_memory_error): Remove.
13890         (gdbscm_disasm_print_address): Remove.
13891         (gdbscm_disassembler::gdbscm_disassembler): New.
13892         (gdbscm_print_insn_from_port): Update.
13893         * mips-tdep.c: Include disasm.h.
13894         (gdb_print_insn_mips): Update code to get gdbarch.
13895         * record-btrace.c (btrace_insn_history): Update.
13896         * spu-tdep.c: Include disasm.h.
13897         (struct spu_dis_asm_data): Remove.
13898         (struct spu_dis_asm_info): New.
13899         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13900         SPU id.
13901         (gdb_print_insn_spu): Cast disassemble_info to
13902         spu_dis_asm_info.
13903
13904 2017-01-26  Yao Qi  <yao.qi@linaro.org>
13905
13906         * disasm.c (do_ui_file_delete): Delete.
13907         (gdb_insn_length): Move code creating stream to ...
13908         * utils.c (null_stream): ... here.  New function.
13909         * utils.h (null_stream): Declare.
13910
13911 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
13912
13913         * python/py-inferior.c (find_thread_object): Return directly
13914         from the loop.  Remove "found" variable.
13915
13916 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
13917
13918         GDB 7.12.1 released.
13919
13920 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13921
13922         * python/py-function.c (fnpy_call): Reorder declarations to have
13923         the gdbpy_enter object declared first.
13924         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13925
13926 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
13927
13928         PR python/21068
13929         * python/python-internal.h (PyMem_RawMalloc): Define for
13930         Python < 3.4.
13931         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13932         PyMem_RawMalloc instead of PyMem_Malloc.
13933
13934 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
13935             Luis Machado  <lgustavo@codesourcery.com>
13936
13937         * NEWS (New commands): Mention flash-erase.
13938         (New MI commands): Mention target-flash-erase.
13939         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13940         command.
13941         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13942         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13943         * target.c (flash_erase_command): New function.
13944         (initialize_targets): Add new flash-erase command.
13945         * target.h (flash_erase_command): New declaration.
13946
13947 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
13948
13949         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13950         HAVE_SYS_PROCFS_H is defined.
13951
13952 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13953
13954         * remote.c (struct cached_reg): Change data into a pointer.
13955         * (stop_reply_dtr): Free data pointers before deleting vector.
13956         (process_stop_reply): Likewise.
13957         (remote_parse_stop_reply): Allocate space for data
13958
13959 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
13960
13961         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13962         MAX_REGISTER_SIZE.
13963         (amd64_pseudo_register_read_value): Likewise.
13964         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13965         (store_register_using_P): Likewise.
13966         * regcache.c (regcache_xfer_part): Likewise.
13967
13968 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
13969
13970         Split real and pseudo registers.
13971         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13972         (sparc32_pseudo_regnum): New enum.
13973         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13974         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13975         (SPARC32_CP0_REGISTERS): New macro.
13976         (sparc32_pseudo_register_name): New function.
13977         (sparc32_register_name): Use sparc32_pseudo_register_name.
13978         (sparc32_pseudo_register_type): New function.
13979         (sparc32_register_type): Use sparc32_pseudo_register_type.
13980         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13981         pseudo register numbers.
13982         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13983         (SPARC64_CP0_REGISTERS): New macro.
13984         (sparc64_pseudo_register_name): New function.
13985         (sparc64_register_name): Use sparc64_pseudo_register_name.
13986         (sparc64_pseudo_register_type): New function.
13987         (sparc64_register_type): Use sparc64_pseudo_register_type.
13988         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13989         pseudo register numbers.
13990         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13991         sparc64_store_arguments): Handle pseudo register numbers.
13992
13993 2017-01-13  Yao Qi  <yao.qi@linaro.org>
13994
13995         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13996         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13997         output.
13998         (getpkt_or_notif_sane_1): Likewise.
13999
14000 2017-01-13  Yao Qi  <yao.qi@linaro.org>
14001
14002         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
14003         of CC.  Pass "-x c++-header" instead of "-x c".
14004
14005 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14006
14007         * remote.c (remote_can_async_p): Update comment.
14008
14009 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14010
14011         * linux-nat.c (linux_nat_can_async_p): Update comment.
14012
14013 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
14014
14015         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
14016
14017 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
14018
14019         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
14020
14021 2017-01-10  Tom Tromey  <tom@tromey.com>
14022
14023         * python/py-type.c (typy_legacy_template_argument): Update.
14024         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
14025         ~demangle_parse_info): Declare new members.
14026         (cp_demangled_name_to_comp): Return unique_ptr.
14027         (cp_demangled_name_parse_free)
14028         (make_cleanup_cp_demangled_name_parse_free)
14029         (cp_new_demangle_parse_info): Remove.
14030         * cp-support.c (do_demangled_name_parse_free_cleanup)
14031         (make_cleanup_cp_demangled_name_parse_free): Remove.
14032         (inspect_type, cp_canonicalize_string_full)
14033         (cp_canonicalize_string): Update.
14034         (mangled_name_to_comp): Change return type.
14035         (cp_class_name_from_physname, method_name_from_physname)
14036         (cp_func_name, cp_remove_params): Update.
14037         * cp-name-parser.y (demangle_parse_info): New constructor, from
14038         cp_new_demangle_parse_info.
14039         (~demangle_parse_info): New destructor, from
14040         cp_demangled_name_parse_free.
14041         (cp_merge_demangle_parse_infos): Update.
14042         (cp_demangled_name_to_comp): Change return type.
14043
14044 2017-01-10  Tom Tromey  <tom@tromey.com>
14045
14046         * top.c (prevent_dont_repeat): Change return type.
14047         * python/python.c (execute_gdb_command): Use std::string.
14048         Update.
14049         * guile/guile.c (gdbscm_execute_gdb_command): Update.
14050         * command.h (prevent_dont_repeat): Change return type.
14051         * breakpoint.c (bpstat_do_actions_1): Update.
14052
14053 2017-01-10  Tom Tromey  <tom@tromey.com>
14054
14055         * value.h (scoped_value_mark::~scoped_value_mark): Call
14056         free_to_mark.
14057         (scoped_value_mark::free_to_mark): New method.
14058         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
14059         scoped_value_mark.
14060
14061 2017-01-10  Tom Tromey  <tom@tromey.com>
14062
14063         * python/py-value.c (valpy_dereference, valpy_referenced_value)
14064         (valpy_reference_value, valpy_const_value, valpy_get_address)
14065         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
14066         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
14067         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
14068         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
14069         scoped_value_mark.
14070         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
14071         * value.h (scoped_value_mark): New class.
14072
14073 2017-01-10  Tom Tromey  <tom@tromey.com>
14074
14075         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
14076         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
14077         * psymtab.c (discard_psymtabs_upto): Remove.
14078         (make_cleanup_discard_psymtabs): Remove.
14079         (struct psymtab_state): Remove.
14080
14081 2017-01-10  Tom Tromey  <tom@tromey.com>
14082
14083         * record-full.c (record_full_save_cleanups): Remove.
14084         (record_full_save): Use gdb::unlinker.
14085         * gcore.c (do_bfd_delete_cleanup): Remove.
14086         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
14087         cleanups.
14088         * dwarf2read.c (unlink_if_set): Remove.
14089         (write_psymtabs_to_index): Use gdb::unlinker.
14090         * common/gdb_unlinker.h: New file.
14091
14092 2017-01-10  Tom Tromey  <tom@tromey.com>
14093
14094         * windows-tdep.c (windows_xfer_shared_library): Update.
14095         * windows-nat.c (windows_make_so): Update.
14096         * utils.h (make_cleanup_bfd_unref): Remove.
14097         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
14098         * symfile.h (symfile_bfd_open)
14099         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
14100         * symfile.c (read_symbols, symbol_file_add)
14101         (separate_debug_file_exists): Update.
14102         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
14103         (generic_load, reread_symbols): Update.
14104         * symfile-mem.c (symbol_file_add_from_memory): Update.
14105         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
14106         (spu_symbol_file_add_from_memory): Update.
14107         * solist.h (struct target_so_ops) <bfd_open>: Return
14108         gdb_bfd_ref_ptr.
14109         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
14110         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
14111         gdb_bfd_ref_ptr.
14112         (solib_map_sections, reload_shared_libraries_1): Update.
14113         * solib-svr4.c (enable_break): Update.
14114         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
14115         * solib-frv.c (enable_break2): Update.
14116         * solib-dsbt.c (enable_break): Update.
14117         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
14118         gdb_bfd_ref_ptr.
14119         (darwin_solib_get_all_image_info_addr_at_init): Update.
14120         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
14121         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
14122         * record-full.c (record_full_save): Update.
14123         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
14124         * procfs.c (insert_dbx_link_bpt_in_file): Update.
14125         * minidebug.c (find_separate_debug_file_in_section): Return
14126         gdb_bfd_ref_ptr.
14127         * machoread.c (macho_add_oso_symfile): Change abfd to
14128         gdb_bfd_ref_ptr.
14129         (macho_symfile_read_all_oso): Update.
14130         (macho_check_dsym): Return gdb_bfd_ref_ptr.
14131         (macho_symfile_read): Update.
14132         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
14133         (jit_bfd_try_read_symtab): Update.
14134         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14135         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14136         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14137         gdb_bfd_ref_ptr.
14138         (gdb_bfd_ref_policy): New struct.
14139         (gdb_bfd_ref_ptr): New typedef.
14140         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
14141         (gdb_bfd_openw, gdb_bfd_openr_iovec)
14142         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
14143         gdb_bfd_ref_ptr.
14144         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14145         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
14146         (gcore_command): Update.
14147         * exec.c (exec_file_attach): Update.
14148         * elfread.c (elf_symfile_read): Update.
14149         * dwarf2read.c (dwarf2_get_dwz_file): Update.
14150         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
14151         (open_and_init_dwo_file): Update.
14152         (open_dwp_file): Return gdb_bfd_ref_ptr.
14153         (open_and_init_dwp_file): Update.
14154         * corelow.c (core_open): Update.
14155         * compile/compile-object-load.c (compile_object_load): Update.
14156         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
14157         * coffread.c (coff_symfile_read): Update.
14158         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
14159         gdb_bfd_ref_ptr.  Rename.
14160         (dump_bfd_file, restore_command): Update.
14161         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14162         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
14163         (find_separate_debug_file_by_buildid): Update.
14164
14165 2017-01-10  Tom Tromey  <tom@tromey.com>
14166
14167         * common/gdb_ref_ptr.h: New file.
14168         * python/py-ref.h (struct gdbpy_ref_policy): New.
14169         (gdbpy_ref): Now a typedef.
14170
14171 2017-01-10  Tom Tromey  <tom@tromey.com>
14172
14173         * utils.h (make_cleanup_htab_delete): Don't declare.
14174         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
14175         Remove.
14176         * linespec.c (decode_compound_collector): Add constructor,
14177         destructor.
14178         (lookup_prefix_sym): Remove cleanup.
14179         (symtab_collector): Add constructor, destructor.
14180         (collect_symtabs_from_filename): Remove cleanup.
14181         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
14182         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
14183         Use htab_up.
14184         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
14185         * dwarf2read.c (dw2_expand_symtabs_matching)
14186         (dw2_map_symbol_filenames, dwarf_decode_macros)
14187         (write_psymtabs_to_index): Use htab_up.
14188         * dwarf2loc.c (func_verify_no_selftailcall)
14189         (call_site_find_chain_1, func_verify_no_selftailcall)
14190         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
14191         std::vector, gdb::unique_xmalloc_ptr.
14192         (call_sitep): Remove typedef.
14193         (dwarf2_locexpr_baton_eval): Remove unused variable.
14194
14195 2017-01-10  Tom Tromey  <tom@tromey.com>
14196
14197         * python/python-internal.h (make_cleanup_py_decref)
14198         (make_cleanup_py_xdecref): Don't declare.
14199         * python/py-utils.c (py_decref, make_cleanup_py_decref)
14200         (py_xdecref, make_cleanup_py_xdecref): Remove.
14201
14202 2017-01-10  Tom Tromey  <tom@tromey.com>
14203
14204         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14205         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14206
14207 2017-01-10  Tom Tromey  <tom@tromey.com>
14208
14209         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14210
14211 2017-01-10  Tom Tromey  <tom@tromey.com>
14212
14213         * python/py-utils.c (unicode_to_encoded_string)
14214         (python_string_to_target_string)
14215         (python_string_to_target_python_string)
14216         (python_string_to_host_string, gdbpy_obj_to_string)
14217         (get_addr_from_python): Use gdbpy_ref.
14218
14219 2017-01-10  Tom Tromey  <tom@tromey.com>
14220
14221         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14222         gdbpy_ref.
14223
14224 2017-01-10  Tom Tromey  <tom@tromey.com>
14225
14226         * python/python.c (eval_python_command, gdbpy_decode_line)
14227         (gdbpy_run_events, gdbpy_start_type_printers)
14228         (gdbpy_apply_type_printers): Use gdbpy_ref.
14229
14230 2017-01-10  Tom Tromey  <tom@tromey.com>
14231
14232         * python/py-param.c (get_doc_string, compute_enum_values): Use
14233         gdbpy_ref.
14234
14235 2017-01-10  Tom Tromey  <tom@tromey.com>
14236
14237         * python/py-inferior.c (find_thread_object, build_inferior_list):
14238         Use gdbpy_ref.
14239
14240 2017-01-10  Tom Tromey  <tom@tromey.com>
14241
14242         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14243
14244 2017-01-10  Tom Tromey  <tom@tromey.com>
14245
14246         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14247         gdbpy_ref.
14248
14249 2017-01-10  Tom Tromey  <tom@tromey.com>
14250
14251         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
14252         extra incref.
14253         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14254         Use gdbpy_ref.
14255
14256 2017-01-10  Tom Tromey  <tom@tromey.com>
14257
14258         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14259         gdbpy_ref.
14260
14261 2017-01-10  Tom Tromey  <tom@tromey.com>
14262
14263         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
14264         decref results of PyArg_ParseTupleAndKeywords.
14265
14266 2017-01-10  Tom Tromey  <tom@tromey.com>
14267
14268         * python/python.c (python_run_simple_file): Use
14269         unique_xmalloc_ptr, gdbpy_ref.
14270
14271 2017-01-10  Tom Tromey  <tom@tromey.com>
14272
14273         * python/py-prettyprint.c (print_stack_unless_memory_error)
14274         (print_string_repr, print_children): Use gdbpy_ref.
14275         (dummy_python_frame): New class.
14276         (dummy_python_frame::dummy_python_frame): Rename from
14277         push_dummy_python_frame.
14278         (py_restore_tstate): Remove.
14279
14280 2017-01-10  Tom Tromey  <tom@tromey.com>
14281
14282         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14283
14284 2017-01-10  Tom Tromey  <tom@tromey.com>
14285
14286         * python/python.c (ensure_python_env, restore_python_env):
14287         Remove.
14288         * python/python-internal.h (ensure_python_env): Don't declare.
14289         * varobj.h (varobj_ensure_python_env): Don't declare.
14290         * varobj.c (varobj_ensure_python_env): Remove.
14291
14292 2017-01-10  Tom Tromey  <tom@tromey.com>
14293
14294         * varobj.c (varobj_value_get_print_value): Use
14295         gdbpy_enter_varobj.
14296
14297 2017-01-10  Tom Tromey  <tom@tromey.com>
14298
14299         * python/py-prettyprint.c (print_string_repr, print_children):
14300         Update.
14301         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14302         of "encoding".
14303         * varobj.c (varobj_value_get_print_value): Update.
14304         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14305
14306 2017-01-10  Tom Tromey  <tom@tromey.com>
14307
14308         * varobj.c (varobj_get_display_hint)
14309         (dynamic_varobj_has_child_method, install_new_value_visualizer)
14310         (varobj_set_visualizer, free_variable): Use
14311         gdbpy_enter_varobj.
14312
14313 2017-01-10  Tom Tromey  <tom@tromey.com>
14314
14315         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14316         (do_finish_initialization): New function.  Use gdbpy_ref.
14317         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
14318         do_finish_initialization.
14319
14320 2017-01-10  Tom Tromey  <tom@tromey.com>
14321
14322         * python/py-param.c (get_set_value, get_show_value): Use
14323         gdbpy_enter, gdbpy_ref.
14324
14325 2017-01-10  Tom Tromey  <tom@tromey.com>
14326
14327         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14328
14329 2017-01-10  Tom Tromey  <tom@tromey.com>
14330
14331         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14332
14333 2017-01-10  Tom Tromey  <tom@tromey.com>
14334
14335         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14336         Use gdbpy_enter_varobj.
14337
14338 2017-01-10  Tom Tromey  <tom@tromey.com>
14339
14340         * varobj.c (gdbpy_enter_varobj): New constructor.
14341         * python/python-internal.h (gdbpy_enter_varobj): New class.
14342         * python/py-varobj.c (py_varobj_get_iterator): Use
14343         gdbpy_enter_varobj.
14344
14345 2017-01-10  Tom Tromey  <tom@tromey.com>
14346
14347         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14348         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14349         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14350         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14351         unique_xmalloc_ptr.
14352         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14353
14354 2017-01-10  Tom Tromey  <tom@tromey.com>
14355
14356         * python/py-xmethods.c (invoke_match_method): Use
14357         gdbpy_ref.
14358
14359 2017-01-10  Tom Tromey  <tom@tromey.com>
14360
14361         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14362         gdbpy_enter, gdbpy_ref.
14363
14364 2017-01-10  Tom Tromey  <tom@tromey.com>
14365
14366         * python/python.c (python_interactive_command): Use gdbpy_enter.
14367
14368 2017-01-10  Tom Tromey  <tom@tromey.com>
14369
14370         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14371         gdbpy_ref.
14372
14373 2017-01-10  Tom Tromey  <tom@tromey.com>
14374
14375         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14376         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14377
14378 2017-01-10  Tom Tromey  <tom@tromey.com>
14379
14380         * utils.h (htab_deleter): New struct.
14381         (htab_up): New typedef.
14382         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14383         gdbpy_enter, gdbpy_ref, htab_up.
14384
14385 2017-01-10  Tom Tromey  <tom@tromey.com>
14386
14387         * python/py-unwind.c (pending_frame_invalidate): Remove.
14388         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14389
14390 2017-01-10  Tom Tromey  <tom@tromey.com>
14391
14392         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14393         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14394
14395 2017-01-10  Tom Tromey  <tom@tromey.com>
14396
14397         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14398
14399 2017-01-10  Tom Tromey  <tom@tromey.com>
14400
14401         * python/python.c (gdbpy_eval_from_control_command)
14402         (gdbpy_source_script, gdbpy_run_events)
14403         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14404         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14405         gdbpy_enter.
14406
14407 2017-01-10  Tom Tromey  <tom@tromey.com>
14408
14409         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14410
14411 2017-01-10  Tom Tromey  <tom@tromey.com>
14412
14413         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14414
14415 2017-01-10  Tom Tromey  <tom@tromey.com>
14416
14417         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14418         (python_on_inferior_call_pre, python_on_inferior_call_post)
14419         (python_on_memory_change, python_on_register_change)
14420         (python_inferior_exit, python_new_objfile, add_thread_object)
14421         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14422
14423 2017-01-10  Tom Tromey  <tom@tromey.com>
14424
14425         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14426         (bpfinishpy_handle_exit): Use gdbpy_enter.
14427
14428 2017-01-10  Tom Tromey  <tom@tromey.com>
14429
14430         * python/py-cmd.c (cmdpy_destroyer)
14431         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14432         gdbpy_enter.
14433
14434 2017-01-10  Tom Tromey  <tom@tromey.com>
14435
14436         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14437         gdbpy_enter.
14438         (gdbpy_breakpoint_has_cond): Likewise.
14439
14440 2017-01-10  Tom Tromey  <tom@tromey.com>
14441
14442         * python/python.c (gdbpy_enter): New constructor.
14443         (~gdbpy_enter): New destructor.
14444         (restore_python_env, ensure_python_env): Rewrite.
14445         * python/python-internal.h (gdbpy_enter): New class.
14446
14447 2017-01-10  Tom Tromey  <tom@tromey.com>
14448
14449         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14450
14451 2017-01-10  Tom Tromey  <tom@tromey.com>
14452
14453         * python/py-value.c (value_has_field, get_field_flag)
14454         (get_field_type, valpy_getitem, convert_value_from_python): Use
14455         gdbpy_ref.
14456
14457 2017-01-10  Tom Tromey  <tom@tromey.com>
14458
14459         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14460         gdbpy_ref.
14461
14462 2017-01-10  Tom Tromey  <tom@tromey.com>
14463
14464         * python/py-prettyprint.c (search_pp_list)
14465         (find_pretty_printer_from_objfiles)
14466         (find_pretty_printer_from_progspace)
14467         (find_pretty_printer_from_gdb, find_pretty_printer)
14468         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14469         gdbpy_ref.
14470
14471 2017-01-10  Tom Tromey  <tom@tromey.com>
14472
14473         * python/py-param.c (call_doc_function): Use gdbpy_ref.
14474
14475 2017-01-10  Tom Tromey  <tom@tromey.com>
14476
14477         * python/py-linetable.c (build_line_table_tuple_from_pcs)
14478         (ltpy_get_all_source_lines): Use gdbpy_ref.
14479
14480 2017-01-10  Tom Tromey  <tom@tromey.com>
14481
14482         * python/py-framefilter.c (extract_sym, extract_value)
14483         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14484         gdbpy_ref.
14485
14486 2017-01-10  Tom Tromey  <tom@tromey.com>
14487
14488         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14489
14490 2017-01-10  Tom Tromey  <tom@tromey.com>
14491
14492         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14493
14494 2017-01-10  Tom Tromey  <tom@tromey.com>
14495
14496         * python/py-function.c (convert_values_to_python, fnpy_init): Use
14497         gdbpy_ref.
14498
14499 2017-01-10  Tom Tromey  <tom@tromey.com>
14500
14501         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14502
14503 2017-01-10  Tom Tromey  <tom@tromey.com>
14504
14505         * python/py-type.c (convert_field, make_fielditem, typy_fields)
14506         (typy_range): Use gdbpy_ref.
14507
14508 2017-01-10  Tom Tromey  <tom@tromey.com>
14509
14510         * python/py-threadevent.c (create_thread_event_object): Use
14511         gdbpy_ref.
14512         * python/py-stopevent.c (create_stop_event_object): Simplify.
14513         (emit_stop_event): Use gdbpy_ref.
14514         * python/py-signalevent.c (create_signal_event_object): Use
14515         gdbpy_ref.
14516         * python/py-newobjfileevent.c (create_new_objfile_event_object)
14517         (emit_new_objfile_event, create_clear_objfiles_event_object)
14518         (emit_clear_objfiles_event): Use gdbpy_ref.
14519         * python/py-infevents.c (create_inferior_call_event_object)
14520         (create_register_changed_event_object)
14521         (create_memory_changed_event_object, emit_inferior_call_event)
14522         (emit_memory_changed_event, emit_register_changed_event): Use
14523         gdbpy_ref.
14524         * python/py-exitedevent.c (create_exited_event_object)
14525         (emit_exited_event): Use gdbpy_ref.
14526         * python/py-event.h (evpy_emit_event): Remove
14527         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14528         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14529         * python/py-continueevent.c (emit_continue_event): Use
14530         gdbpy_ref.
14531         * python/py-breakpoint.c (gdbpy_breakpoint_created)
14532         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14533         gdbpy_ref.
14534         * python/py-bpevent.c (create_breakpoint_event_object): Use
14535         gdbpy_ref.
14536
14537 2017-01-10  Tom Tromey  <tom@tromey.com>
14538
14539         * python/py-ref.h: New file.
14540
14541 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14542
14543         * cli-out.c (cli_ui_out::do_redirect): Change return type to
14544         void.
14545         * cli-out.h (cli_ui_out::do_redirect): Likewise.
14546         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14547         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14548         * ui-out.c (ui_out::redirect): Likewise.
14549         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14550         * cli/cli-logging.c (set_logging_redirect): Update call site of
14551         ui_out::redirect.
14552         (handle_redirections): Likewise.
14553         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14554         * top.c (execute_command_to_string): Likewise.
14555         * utils.c (do_ui_out_redirect_pop): Likewise.
14556
14557 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
14558
14559         * stack.c (_initialize_stack): Update "frame" command help message.
14560
14561 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
14562
14563         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14564
14565 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14566
14567         * x86-linux-nat.h: Include gdb_proc_service.h.
14568
14569 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14570
14571         * ser-base.h: Include serial.h.
14572
14573 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14574
14575         * ppc-linux-tdep.h: Include ppc-tdep.h.
14576
14577 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14578
14579         * nat/amd64-linux-siginfo.h: Include signal.h.
14580
14581 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14582
14583         * nat/aarch64-linux-hw-point.h: Include break-common.h.
14584
14585 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14586
14587         * mi/mi-parse.h: Include mi-cmds.h.
14588
14589 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14590
14591         * inf-loop.c: Don't include "target.h".
14592         * inf-loop.h: Include it here.
14593
14594 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14595
14596         * dfp.h: Include "dboulest.h" and "expression.h".
14597
14598 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14599
14600         * ax-gdb.h: Include "ax.h".
14601
14602 2017-01-06  Yao Qi  <yao.qi@linaro.org>
14603
14604         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14605         with nat/gdb_ptrace.h.
14606
14607 2017-01-05  Yao Qi  <yao.qi@linaro.org>
14608
14609         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14610         new line.
14611         (mips64_fbsd_sigframe_init): Likewise.
14612
14613 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14614
14615         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14616         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14617
14618 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14619
14620         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14621         * NEWS: Mention new FreeBSD/mips native configuration.
14622         * config/mips/fbsd.mh: New file.
14623         * configure.host: Add mips*-*-freebsd*.
14624         * mips-fbsd-nat.c: New file.
14625
14626 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
14627
14628         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14629         (ALLDEPFILES): Add mips-fbsd-tdep.c.
14630         * NEWS: Mention new FreeBSD/mips target.
14631         * configure.tgt: Add mips*-*-freebsd*.
14632         * mips-fbsd-tdep.c: New file.
14633         * mips-fbsd-tdep.h: New file.
14634
14635 2017-01-04  Yao Qi  <yao.qi@linaro.org>
14636
14637         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14638         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14639
14640 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14641
14642         Update copyright year range in all GDB files.
14643
14644 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
14645
14646         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14647
14648 For older changes see ChangeLog-2016.
14649 \f
14650 Local Variables:
14651 mode: change-log
14652 left-margin: 8
14653 fill-column: 74
14654 version-control: never
14655 coding: utf-8
14656 End: