Remove some cleanups from probe.c
[external/binutils.git] / gdb / ChangeLog
1 2017-10-16  Tom Tromey  <tom@tromey.com>
2
3         * probe.c (parse_probes): Use std::string.
4         (info_probes_for_ops, enable_probes_command)
5         (disable_probes_command): Remove cleanups.
6
7 2017-10-16  Tom Tromey  <tom@tromey.com>
8
9         * buildsym.c (block_compar): Remove.
10         (end_symtab_get_static_block): Use std::vector.
11
12 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
13
14         * memrange.h (struct mem_range): Define operator< and operator==.
15         (mem_range_s): Remove.
16         (DEF_VEC_O (mem_range_s)): Remove.
17         (normalize_mem_ranges): Change parameter type to std::vector.
18         * memrange.c (compare_mem_ranges): Remove.
19         (normalize_mem_ranges): Change parameter type to std::vector,
20         adjust to vector change.
21         * exec.c (section_table_available_memory): Return vector, remove
22         parameter.
23         (section_table_read_available_memory): Adjust to std::vector
24         change.
25         * remote.c (remote_read_bytes): Adjust to std::vector
26         change.
27         * tracepoint.h (traceframe_available_memory): Change parameter
28         type to std::vector.
29         * tracepoint.c (traceframe_available_memory): Change parameter
30         type to std::vector, adjust.
31         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
32         std::vector change.
33         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
34         unittests/memrange-selftests.c.
35         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
36         * gdb/unittests/memrange-selftests.c: New file.
37
38 2017-10-16  Pedro Alves  <palves@redhat.com>
39
40         * elfread.c (probe_key_free): Rename range-for variable.
41         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
42         (find_probe_by_pc, collect_probes): Rename range-for variable.
43
44 2017-10-16  Yao Qi  <yao.qi@linaro.org>
45
46         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
47         * features/tic6x-c62x.c: Remove.
48         * features/tic6x-c64x-linux.c: Remove.
49         * features/tic6x-c64x.c: Remove.
50         * features/tic6x-c64xp-linux.c: Remove.
51         * features/tic6x-c64xp.c: Remove.
52         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
53         initialize_tdesc_tic6x_*_linux functions.
54         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
55         initialize_tdesc_tic6x_* functions.
56
57 2017-10-16  Yao Qi  <yao.qi@linaro.org>
58
59         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
60         tic6x-c62x.
61         * regformats/tic6x-c62x.dat: Remove.
62         * regformats/tic6x-c64x.dat: Remove.
63         * regformats/tic6x-c64xp.dat: Remove.
64
65 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
66
67         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
68         (the !HAVE_LIBEXPAT version).
69
70 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
71
72         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
73         const.
74
75 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
76
77         * target.h: Include tracepoint.h.
78         (enum trace_find_type): Move to tracepoint.h.
79         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
80         * tracepoint.h: Don't include target.h
81         (enum trace_find_type): Move from target.h.
82         (parse_traceframe_info): Return a unique ptr.
83         * tracepoint.c (current_traceframe_info): Change type to unique
84         ptr.
85         (free_traceframe_info): Remove.
86         (clear_traceframe_info): Don't manually free
87         current_traceframe_info.
88         (free_result): Remove.
89         (parse_traceframe_info): Return a unique ptr.
90         (get_traceframe_info): Adjust to unique ptr.
91         * ctf.c (ctf_traceframe_info): Return a unique ptr.
92         * remote.c (remote_traceframe_info): Return a unique ptr.
93         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
94         ptr.
95         * target-debug.h (target_debug_print_traceframe_info_up): New
96         macro.
97         * target-delegates.c: Regenerate.
98
99 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
100
101         * memrange.h (struct mem_range): Add constructors.
102         * tracepoint.h (struct traceframe_info) <memory>: Change type to
103         std::vector<mem_range>.
104         * tracepoint.c (free_traceframe_info): Don't manually free
105         vector.
106         (traceframe_info_start_memory): Adjust to vector change.
107         (traceframe_available_memory): Likewise.
108         * tracefile-tfile.c (build_traceframe_info): Likewise.
109         * ctf.c (ctf_traceframe_info): Likewise.
110
111 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
112
113         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
114         std::vector<int>.
115         * tracepoint.c (free_traceframe_info): Deallocate with delete.
116         (traceframe_info_start_tvar): Adjust to vector change.
117         (parse_traceframe_info): Allocate with new.
118         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
119         vector change.
120         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
121         change.
122         tfile_traceframe_info): Allocate with new.
123         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
124         change.
125
126 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
127
128         * tracepoint.c (traceframe_info): Rename to...
129         (current_traceframe_info): ...this.
130         (clear_traceframe_info): Adjust.
131         (get_traceframe_info): Adjust.
132
133 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
134
135         * nat/linux-osdata.c: Include algorithm.
136         (compare_processes): Remove.
137         (struct pid_pgid_entry): New struct.
138         (linux_xfer_osdata_processgroups): Use std::vector instead of
139         XNEWVEC.
140
141 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
142
143         * objfiles.h: Don't include symfile.h.
144         (struct partial_symbol): Remove forward-declaration.
145         (struct objfile) <global_psymbols, static_psymbols>: Change type
146         to std::vector<partial_symbol *>.
147         * objfiles.c (objfile::objfile): Don't memset those fields.
148         (objfile::~objfile): Don't free those fields.
149         * psympriv.h (struct psymbol_allocation_list): Remove
150         forward-declaration.
151         (add_psymbol_to_list): Change psymbol_allocation_list parameter
152         to std::vector.
153         (start_psymtab_common): Change parameters to std::vector.
154         * psymtab.c: Include algorithm.
155         (require_partial_symbols): Call shrink_to_fit.
156         (find_pc_sect_psymbol): Adjust to vector change.
157         (match_partial_symbol): Likewise.
158         (lookup_partial_symbol): Likewise.
159         (psym_relocate): Likewise.
160         (dump_psymtab): Likewise.
161         (recursively_search_psymtabs): Likewise.
162         (compare_psymbols): Remove.
163         (sort_pst_symbols): Adjust to vector change.
164         (start_psymtab_common): Likewise.
165         (end_psymtab_common): Likewise.
166         (psymbol_bcache_full): De-constify return value.
167         (add_psymbol_to_bcache): Likewise.
168         (extend_psymbol_list): Remove.
169         (append_psymbol_to_list): Adjust to vector change.
170         (add_psymbol_to_list): Likewise.
171         (init_psymbol_list): Likewise.
172         (maintenance_info_psymtabs): Likewise.
173         (maintenance_check_psymtabs): Likewise.
174         * symfile.h (struct psymbol_allocation_list): Remove.
175         * symfile.c (reread_symbols): Adjust to vector change.
176         * dbxread.c (start_psymtab): Change type of parameters.
177         (dbx_symfile_read): Adjust to vector change.
178         (read_dbx_symtab): Likewise.
179         (start_psymtab): Change type of parameters.
180         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
181         (create_partial_symtab): Likewise.
182         (add_partial_symbol): Likewise.
183         (write_one_signatured_type): Likewise.
184         (recursively_write_psymbols): Likewise.
185         * mdebugread.c (parse_partial_symbols): Likewise.
186         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
187         (scan_xcoff_symtab): Adjust to vector change.
188         (xcoff_initial_scan): Likewise.
189
190 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
191
192         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
193
194 2017-10-13  Yao Qi  <yao.qi@linaro.org>
195
196         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
197         Remove s390x-*-expedite, add s390x-expedite.
198
199 2017-10-13  Yao Qi  <yao.qi@linaro.org>
200
201         * features/s390-gs-linux64.c: Regenerated.
202         * features/s390x-gs-linux64.c: Regenerated.
203
204 2017-10-13  Tom Tromey  <tom@tromey.com>
205
206         * compile/compile-object-run.c (do_module_cleanup): Use delete.
207         * solib.c (update_solib_list, reload_shared_libraries_1): Use
208         delete.
209         * symfile.c (symbol_file_add_with_addrs): Use new.
210         (symbol_file_add_separate): Update comment.
211         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
212         * jit.c (jit_object_close_impl): Use new.
213         (jit_unregister_code): Use delete.
214         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
215         (~objfile): Rename from free_objfile.
216         (free_objfile_separate_debug, do_free_objfile_cleanup)
217         (free_all_objfiles, objfile_purge_solibs): Use delete.
218         * objfiles.h (struct objfile): Add constructor and destructor.
219         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
220         (allocate_objfile, free_objfile): Don't declare.
221         (struct objstats): Add initializers.
222
223 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
224
225         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
226         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
227         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
228         * gdbarch.h: Regenerate.
229         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
230         Adjust comment.
231         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
232         (i386_displaced_step_fixup): Adjust comment.
233         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
234
235 2017-10-12  Tom Tromey  <tom@tromey.com>
236
237         * prologue-value.h (pv_area::store_would_trash): Return bool.
238         (pv_area::find_reg): Likewise.
239         * prologue-value.c (pv_area::store_would_trash): Return bool.
240         (pv_area::find_reg): Likewise.
241
242 2017-10-12  Tom Tromey  <tom@tromey.com>
243
244         * s390-linux-tdep.c (s390_store, s390_load)
245         (s390_check_for_saved, s390_analyze_prologue): Update.
246         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
247         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
248         * prologue-value.h (class pv_area): Move from prologue-value.c.
249         Change names of members.  Add constructor, destructor, member
250         functions.
251         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
252         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
253         (pv_area_fetch, pv_area_scan): Don't declare.
254         * prologue-value.c (struct pv_area::area_entry): Now member of
255         pv_area.
256         (struct pv_area): Move to prologue-value.h.
257         (pv_area::pv_area): Rename from make_pv_area.
258         (pv_area::~pv_area): Rename from free_pv_area.
259         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
260         (clear_entries, find_entry, overlaps, store_would_trash, store)
261         (fetch, find_reg, scan): Now member of pv_area.
262         Remove "area" argument.  Update.
263         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
264         Update.
265         * mn10300-tdep.c (push_reg, check_for_saved)
266         (mn10300_analyze_prologue): Update.
267         * mep-tdep.c (is_arg_spill, check_for_saved)
268         (mep_analyze_prologue): Update.
269         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
270         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
271         (m32c_is_struct_return, m32c_analyze_prologue): Update.
272         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
273         Update.
274         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
275         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
276
277 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
278
279         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
280         * linux-nat.c (linux_nat_delete_thread): New variable.
281         (lwp_free): Invoke linux_nat_delete_thread if set.
282         (linux_nat_set_delete_thread): New function.
283         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
284         thread delete callback.
285         * arm-linux-nat.c (arm_linux_delete_thread): New function.
286         (_initialize_arm_linux_nat): Assign thread delete callback.
287         * s390-linux-nat.c (s390_delete_thread): New function.
288         (_initialize_s390_nat): Assign thread delete callback.
289         * x86-linux-nat.c (x86_linux_add_target): Likewise.
290         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
291         function.
292         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
293         declaration.
294         * nat/x86-linux.c (x86_linux_delete_thread): New function.
295         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
296
297 2017-10-09  Tom Tromey  <tom@tromey.com>
298
299         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
300         std::string.
301         * tui/tui-layout.c (enum tui_status): Use std::string.
302
303 2017-10-11  Tom Tromey  <tom@tromey.com>
304
305         * gdbthread.h (thread_command): Constify.
306         * inferior.h (detach_command): Constify.
307         * top.h (set_history, show_history): Constify.
308         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
309         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
310         * bsd-kvm.c (bsd_kvm_cmd): Constify.
311         * printcmd.c (set_command): Constify.
312         (non_const_set_command): New function.
313         * dcache.c (set_dcache_command, show_dcache_command): Constify.
314         * breakpoint.c (enable_command, disable_command, delete_command)
315         (catch_command, tcatch_command, set_breakpoint_cmd)
316         (show_breakpoint_cmd): Constify.
317         * macrocmd.c (macro_command): Constify.
318         * infcmd.c (unset_command, kill_command, detach_command)
319         (info_proc_cmd): Constify.
320         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
321         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
322         (info_auto_load_cmd): Constify.
323         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
324         (unset_tdesc_cmd): Constify.
325         * ada-lang.c (set_ada_command, show_ada_command)
326         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
327         * guile/guile.c (set_guile_command, show_guile_command)
328         (info_guile_command): Constify.
329         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
330         Constify.
331         * skip.c (skip_command): Constify.
332         * compile/compile.c (_initialize_compile): Constify.
333         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
334         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
335         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
336         (maint_btrace_pt_show_cmd): Constify.
337         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
338         Constify.
339         * python/python.c (user_show_python, user_set_python): Constify.
340         * mips-tdep.c (set_mips_command, show_mips_command)
341         (set_mipsfpu_command): Constify.
342         * record-btrace.c (cmd_record_btrace_start)
343         (cmd_set_record_btrace, cmd_show_record_btrace)
344         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
345         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
346         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
347         Constify.
348         * symfile.c (overlay_command): Constify.
349         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
350         * cli/cli-logging.c (set_logging_command, show_logging_command):
351         Constify.
352         * cli/cli-dump.c (dump_command, append_command)
353         (srec_dump_command, ihex_dump_command, verilog_dump_command)
354         (tekhex_dump_command, binary_dump_command)
355         (binary_append_command): Constify.
356         * cli/cli-decode.c (struct cmd_list_element): Change type of
357         "fun".
358         * cli/cli-cmds.c (info_command, show_command, set_debug)
359         (show_debug): Constify.
360         (show_command): Add non-const overload.
361         * top.c (set_history, show_history): Constify.
362         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
363         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
364         * target.c (target_command): Constify.
365         * sparc64-tdep.c (info_adi_command): Constify.
366         * record-full.c (cmd_record_full_start): Constify.
367         (set_record_full_command): Constify.  Fix typo.
368         (show_record_full_command): Constify.
369         * thread.c (thread_command, thread_apply_command): Constify.
370         * memattr.c (dummy_cmd): Constify.
371         * value.c (function_command): Constify.
372         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
373         * probe.c (info_probes_command): Constify.
374         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
375         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
376         (show_thread_cmd, set_thread_default_cmd)
377         (show_thread_default_cmd): Constify.
378         (check_empty): Constify.
379         * tracepoint.c (tfind_command): Constify.
380         * cp-support.c (maint_cplus_command): Constify.
381         * windows-tdep.c (info_w32_command): Constify.
382         * record.c (cmd_record_start, set_record_command)
383         (show_record_command, info_record_command, cmd_record_goto):
384         Constify.
385         * ravenscar-thread.c (set_ravenscar_command)
386         (show_ravenscar_command): Constify.
387         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
388         Constify.
389         (add_internal_problem_command): Remove casts.
390         * arc-tdep.c (maintenance_print_arc_command): Constify.
391         * valprint.c (set_print, show_print, set_print_raw)
392         (show_print_raw): Constify.
393         * maint.c (maintenance_command, maintenance_info_command)
394         (maintenance_print_command, maintenance_set_cmd)
395         (maintenance_show_cmd, set_per_command_cmd)
396         (show_per_command_cmd, maintenance_check_command): Constify.
397         * language.c (set_check, show_check): Constify.
398         * typeprint.c (show_print_type, set_print_type): Constify.
399         * go32-nat.c (go32_info_dos_command): Constify.
400
401 2017-10-11  Tom Tromey  <tom@tromey.com>
402
403         * breakpoint.c (prepare_re_set_context): Remove.
404         (breakpoint_re_set_one): Update.  Don't use cleanups.
405         (breakpoint_re_set): Use scoped_restore, std::string, and
406         scoped_restore_current_language.
407
408 2017-10-11  Tom Tromey  <tom@tromey.com>
409
410         * breakpoint.c (commands_command_1): Use std::string.
411         (cleanup_executing_breakpoints): Remove.
412         (bpstat_do_actions_1): Use scoped_restore.
413         (bpstat_check_watchpoint): Use std::string.
414         (decode_static_tracepoint_spec): Likewise.
415         (break_range_command): Likewise.
416         (watch_command_1): Likewise.
417         (compare_breakpoints): Change argument types.
418         (clear_command): Use std::vector.
419         (cleanup_executing_breakpoints): Remove.
420         (update_global_location_list): Use unique_xmalloc_ptr.
421         (strace_command): Remove unused declaration.
422
423 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
424
425         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
426         * NEWS: Mention new FreeBSD/arm native configuration.
427         * configure.host: Add arm*-*-freebsd*.
428         * configure.nat: Likewise.
429         * arm-fbsd-nat.c: New file.
430
431 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
432
433         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
434         (ALLDEPFILES): Add arm-fbsd-tdep.c.
435         * NEWS: Mention new FreeBSD/arm target.
436         * configure.tgt: Add arm*-*-freebsd*.
437         * arm-fbsd-tdep.c: New file.
438         * arm-fbsd-tdep.h: New file.
439
440 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
441
442         * linux-tdep.c (linux_make_corefile_notes): Remove call to
443         `gdbarch_elfcore_write_linux_prpsinfo'.
444         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
445         method.
446         (elf_internal_linux_prpsinfo): Remove declaration.
447         * gdbarch.h: Regenerate.
448         * gdbarch.c: Regenerate.
449
450 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
451
452         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
453         `set_gdbarch_elfcore_write_linux_prpsinfo'.
454
455 2017-10-11  Pedro Alves  <palves@redhat.com>
456
457         * breakpoint.c (reattach_breakpoints): Delete.
458         * breakpoint.h (reattach_breakpoints): Delete.
459
460 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
461
462         * symfile.c (registered_sym_fns): Make struct, not typedef.
463         (DEF_VEC_O (registered_sym_fns)): Remove.
464         (symtab_fns): Change type to std::vector.
465         (add_symtab_fns): Adjust.
466         (find_sym_fns): Adjust.
467
468 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
469
470         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
471         * arc-tdep.h (arc_arch_is_em): New function.
472         (arc_arch_is_hs): Likewise.
473
474 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
475
476         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
477         parentheses in the declaration.
478         (macro_lookup_inclusion): Likewise.
479         (macro_lookup_definition): Likewise.
480         * p-lang.h (pascal_builtin_types): Likewise.
481         * tui/tui-data.c (tui_win_list): Likewise.
482         * tui/tui-data.h (tui_win_list): Likewise.
483         * utils.h (make_cleanup_free_section_addr_info): Likewise.
484
485 2017-10-11  Mark Rages  <markrages@gmail.com>
486
487         * target-memory.c (block_boundaries): Fix for block address not
488         aligned on block size.
489
490 2017-10-10  Pedro Alves <palves@redhat.com>
491             Tom Tromey  <tom@tromey.com>
492
493         * breakpoint.c (struct captured_breakpoint_query_args)
494         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
495         (print_breakpoint): New.
496         * breakpoint.h (print_breakpoint): Declare.
497         * common/common-exceptions.h (enum return_reason): Remove
498         references to catch_exceptions.
499         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
500         Delete.
501         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
502         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
503         * gdb.h: Delete.
504         * gdbthread.h (thread_select): Declare.
505         * mi/mi-cmd-break.c: Don't include gdb.h.
506         (breakpoint_notify): Use print_breakpoint.
507         * mi/mi-cmd-catch.c: Don't include gdb.h.
508         * mi/mi-interp.c: Don't include gdb.h.
509         (mi_print_breakpoint_for_event): New.
510         (mi_breakpoint_created, mi_breakpoint_modified): Use
511         mi_print_breakpoint_for_event.
512         * mi/mi-main.c: Don't include gdb.h.
513         (mi_cmd_thread_select): Parse the global thread ID here.  Use
514         thread_select instead of gdb_thread_select.
515         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
516         of using gdb_list_thread_ids.
517         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
518         FILEIO_ENOSYS here.
519         (remote_fileio_request): Use TRY/CATCH instead of
520         catch_exceptions.
521         * symfile-mem.c (struct symbol_file_add_from_memory_args)
522         (symbol_file_add_from_memory_wrapper): Delete.
523         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
524         * thread.c: Don't include gdb.h.
525         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
526         (thread_alive): Use thread_select.
527         (do_captured_thread_select): Delete, parts salvaged as ...
528         (thread_select): ... this new function.
529         (gdb_thread_select): Delete.
530
531 2017-10-10  Pedro Alves  <palves@redhat.com>
532             Tom Tromey  <tom@tromey.com>
533
534         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
535         and reverse logic.
536         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
537         No longer macros.  Instead ...
538         (enum wp_check_result): They're now values of this new
539         enumeration.
540         (watchpoint_check): Change return type to wp_check_result and
541         parameter type to bpstat.
542         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
543         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
544         catch_errors.  Reverse logic of watchpoint_check call.
545         (breakpoint_re_set_one): Now returns void and takes a breakpoint
546         pointer as parameter.
547         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
548         * common/common-exceptions.c (throw_exception_sjlj): Update
549         comments to avoid mentioning catch_errors.
550         * exceptions.c (catch_errors): Delete.
551         * exceptions.h: Update comments to avoid mentioning catch_errors.
552         (catch_errors_ftype, catch_errors): Delete.
553         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
554         (hook_stop_stub): Delete.
555         (restore_selected_frame): Change return type to void, and
556         parameter type to const frame_id &.
557         (restore_infcall_control_state): Use TRY/CATCH instead of
558         catch_errors.
559         * main.c (captured_command_loop): Return void and remove
560         parameter.  Remove references to catch_errors.
561         (captured_main): Use TRY/CATCH instead of catch_errors.
562         * objc-lang.c (objc_submethod_helper_data)
563         (find_objc_msgcall_submethod_helper): Delete.
564         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
565         catch_errors.
566         * record-full.c (record_full_message): Return void.
567         (record_full_message_args, record_full_message_wrapper): Delete.
568         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
569         instead of catch_errors.
570         * solib-aix.c (solib_aix_open_symbol_file_object): Change
571         parameter type to int.
572         * solib-darwin.c (open_symbol_file_object): Ditto.
573         * solib-dsbt.c (open_symbol_file_object): Ditto.
574         * solib-frv.c (open_symbol_file_object): Ditto.
575         * solib-svr4.c (open_symbol_file_object): Ditto.
576         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
577         * solib.c (update_solib_list): Use TRY/CATCH instead of
578         catch_errors.
579         * solist.h (struct target_so_ops) <open_symbol_file_object>:
580         Change type.
581         * symmisc.c (struct print_symbol_args): Remove.
582         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
583         (print_symbol): Change type.
584         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
585         and remove parameters.
586         (catch_errors): New.
587         (get_windows_debug_event): Adjust.
588
589 2017-10-09  Tom Tromey  <tom@tromey.com>
590
591         * mi/mi-main.c (free_splay_tree): Remove.
592         (list_available_thread_groups): Use splay_tree_up.
593         * common/gdb_splay_tree.h: New file.
594
595 2017-10-09  Tom Tromey  <tom@tromey.com>
596
597         * mi/mi-main.c (do_nothing): Remove.
598         (list_available_thread_groups): Update.
599
600 2017-10-09  Pedro Alves  <palves@redhat.com>
601
602         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
603         reading registers when switching context.
604
605 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
606
607         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
608         (fbsd_convert_siginfo): Likewise.
609         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
610
611 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
612
613         * configure.ac (try_guile_versions): Remove guile-2.2.
614         * configure: Regenerate.
615
616 2017-10-09  Tom Tromey  <tom@tromey.com>
617
618         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
619         (COMPILE.pre): Use $(CXX).
620
621 2017-10-09  Pedro Alves  <palves@redhat.com>
622
623         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
624         Use bool.
625         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
626         * cp-support.h (cp_remove_params): Now returns a
627         gdb::unique_xmalloc_ptr.
628         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
629         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
630         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
631         returning a gdb::unique_xmalloc_ptr.
632         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
633         * stack.c (find_frame_funname): Adjust to cp_remove_params
634         returning a gdb::unique_xmalloc_ptr.
635
636 2017-10-08  Tom Tromey  <tom@tromey.com>
637
638         * dwarf2read.c (dwarf2_get_dwz_file): Use
639         gdb::unique_xmalloc_ptr.
640         (find_slot_in_mapped_hash): Likewise.
641         (dwarf2_physname): Likewise.
642         (create_dwo_unit_in_dwp_v1): Use std::string.
643         (create_dwo_unit_in_dwp_v2): Likewise.
644         (lookup_dwo_cutu): Likewise.
645         (inherit_abstract_dies): Use std::vector.
646         (read_array_type): Likewise.
647         (dwarf_decode_macros): Remove unused declaration.
648         (unsigned_int_compar): Remove.
649         (dwarf2_build_psymtabs_hard): Use scoped_restore.
650         (psymtabs_addrmap_cleanup): Remove.
651
652 2017-10-08  Tom Tromey  <tom@tromey.com>
653
654         * frame-unwind.c (frame_unwind_try_unwinder): Update.
655         * frame.h (frame_cleanup_after_sniffer): Declare.
656         (frame_prepare_for_sniffer): Return void.
657         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
658         type of argument.
659         (frame_prepare_for_sniffer): Return void.
660
661 2017-10-08  Tom Tromey  <tom@tromey.com>
662
663         * utils.h (make_cleanup_value_free): Remove.
664         * utils.c (do_value_free, struct cleanup): Remove.
665         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
666         Use gdb_value_up.
667         * value.h (struct value_deleter): New.
668         (gdb_value_up): New typedef.
669
670 2017-10-08  Tom Tromey  <tom@tromey.com>
671
672         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
673         (make_cleanup_free_search_symbols): Remove.
674         (search_symbols): Return std::vector.
675         (symbol_search::compare_search_syms): Now member of
676         symbol_search.  Change arguments.
677         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
678         (symtab_symbol_info, rbreak_command): Update.
679         * symtab.h (struct symbol_search) <next>: Remove.
680         Add constructors.
681         (symbol_search::operator<): New function.
682         (symbol_search::operator==): New function.
683         (search_symbols): Remove std::vector.
684         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
685         (symbol_search::compare_search_syms): Declare.
686
687 2017-10-06  Yao Qi  <yao.qi@linaro.org>
688
689         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
690         arch/aarch64-insn.o.
691         Remove one rule.
692         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
693
694 2017-10-06  Yao Qi  <yao.qi@linaro.org>
695
696         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
697         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
698         arch/arm-linux.o respectively.
699         * configure.tgt: Likewise.
700
701 2017-10-06  Yao Qi  <yao.qi@linaro.org>
702
703         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
704         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
705
706 2017-10-06  Pedro Alves  <palves@redhat.com>
707
708         * windows-nat.c: Include <algorithm>.
709
710 2017-10-06  Yao Qi  <yao.qi@linaro.org>
711
712         * configure.tgt (i386_tobjs): New variable.
713         (amd64_tobjs): New variable.
714         Set $cpu_obs and $os_obs.
715
716 2017-10-06  Yao Qi  <yao.qi@linaro.org>
717
718         * Makefile.in (CONFIG_SRC_SUBDIR): New.
719         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
720         (clean): Remove object files and dependency files.
721         (distclean): Remove the directory.
722         * configure.ac: Invoke AC_CONFIG_COMMANDS.
723         * configure: Re-generated.
724         * configure.tgt: Replace amd64.o with arch/amd64.o.
725
726 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
727
728         PR build/22188
729         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
730         and SETEND.
731
732 2017-10-05  Pedro Alves  <palves@redhat.com>
733
734         * linux-nat.c (linux_child_follow_fork): When following the parent
735         and detaching the child, consult the parent thread's architecture
736         instead of the child's.
737
738 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
739
740         * ax.h: Do not include "doublest.h".
741         (union agent_val): Remove.
742
743 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
744
745         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
746         (decimal_to_string): Return std::string object.
747         (decimal_from_string): Accept std::string object.  Return bool.
748         (decimal_from_integral, decimal_from_doublest): Remove.
749         (decimal_from_longest): Add prototype.
750         (decimal_from_ulongest): Likewise.
751         (decimal_to_longest): Likewise.
752         (decimal_from_doublest): Likewise.
753         * dfp.c: Do not include "gdbtypes.h" or "value.h".
754         (MAX_DECIMAL_STRING): Move here.
755         (decimal_to_string): Return std::string object.
756         (decimal_from_string): Accept std::string object.  Return bool.
757         (decimal_from_integral): Remove, replace by ...
758         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
759         (decimal_to_longest): New function.
760         (decimal_from_floating): Remove, replace by ...
761         (decimal_from_doublest): ... this new function.
762         (decimal_to_doublest): Update to new decimal_to_string interface.
763
764         * value.c (unpack_long): Use decimal_to_longest.
765         * valops.c (value_cast): Use decimal_from_doublest instead of
766         decimal_from_floating.  Use decimal_from_[u]longest isntead of
767         decimal_from_integral.
768         * valarith.c (value_args_as_decimal): Likewise.
769         * valprint.c (print_decimal_floating): Update to new
770         decimal_to_string interface.
771         * printcmd.c (printf_decfloat): Likewise.
772         * c-exp.y (parse_number): Update to new decimal_from_string interface.
773
774 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
775
776         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
777         * gdbtypes.c: Include "floatformat.h".
778         * value.c: Likewise.
779         * m68k-tdep.c: Likewise.
780
781         * findvar.c: Do not include "floatformat.h".
782         * amd64-darwin-tdep.c: Likewise.
783         * arm-linux-tdep.c: Likewise.
784         * i386-darwin-tdep.c: Likewise.
785         * i387-tdep.c: Likewise.
786         * m68k-linux-tdep.c: Likewise.
787         * mep-tdep.c: Likewise.
788         * mips-tdep.c: Likewise.
789         * nios2-tdep.c: Likewise.
790         * s390-linux-tdep.c: Likewise.
791         * sparc-obsd-tdep.c: Likewise.
792         * sparc-tdep.c: Likewise.
793         * sparc64-tdep.c: Likewise.
794         * spu-tdep.c: Likewise.
795         * tic6x-tdep.c: Likewise.
796         * tilegx-tdep.c: Likewise.
797         * vax-tdep.c: Likewise.
798         * xstormy16-tdep.c: Likewise.
799         * xtensa-tdep.c: Likewise.
800
801         * top.c: Do not include "doublest.h".
802         * aarch64-tdep.c: Likewise.
803         * alpha-tdep.c: Likewise.
804         * arm-linux-tdep.c: Likewise.
805         * m68k-linux-tdep.c: Likewise.
806         * tilegx-tdep.c: Likewise.
807         * xstormy16-tdep.c: Likewise.
808
809 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
810
811         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
812         (mipsn32_fbsd_sigframe): Define.
813         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
814         for FreeBSD/mipsn32.
815
816 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
817
818         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
819         AT_HWCAP.
820
821 2017-10-05  Tristan Gingold  <tgingold@free.fr>
822
823         * MAINTAINERS (Misc): Update my email address.
824
825 2017-10-04  Pedro Alves  <palves@redhat.com>
826
827         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
828         it instead of target_gdbarch.
829         (get_remote_state, get_remote_packet_size): Adjust
830         get_remote_arch_state calls, passing down target_gdbarch
831         explicitly.
832         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
833         'gdbarch' and use it instead of target_gdbarch.
834         (get_memory_packet_size): Adjust get_remote_arch_state calls,
835         passing down target_gdbarch explicitly.
836         (struct stop_reply) <arch>: New field.
837         (remote_parse_stop_reply): Use the stopped thread's architecture,
838         not the current inferior's.  Save the architecture in the
839         stop_reply.
840         (process_stop_reply): Use the stop reply's architecture.
841         (process_g_packet, remote_fetch_registers)
842         (remote_prepare_to_store, store_registers_using_G)
843         (remote_store_registers): Adjust get_remote_arch_state calls,
844         using the regcache's architecture.
845         (remote_get_trace_status): Adjust get_remote_arch_state calls,
846         passing down target_gdbarch explicitly.
847         * spu-multiarch.c (spu_thread_architecture): Defer to the target
848         beneath instead of calling target_gdbarch.
849         * target.c (default_thread_architecture): Use the specified
850         inferior's architecture, instead of the current inferior's
851         architecture (via target_gdbarch).
852
853 2017-10-04  Pedro Alves  <palves@redhat.com>
854
855         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
856         case.
857         (regcache_print): Handle !target_has_registers here instead.
858
859 2017-10-04  Pedro Alves  <palves@redhat.com>
860
861         * frame.c (create_test_frame): Delete.
862         * frame.h (create_test_frame): Delete.
863         * gdbarch-selftests.c: Include gdbthread.h and target.h.
864         (class regcache_test): Delete.
865         (test_target_has_registers, test_target_has_stack)
866         (test_target_has_memory, test_target_prepare_to_store)
867         (test_target_store_registers): New functions.
868         (test_target_ops): New class.
869         (register_to_value_test): Error out if there's already a
870         process_stratum (or higher) target pushed.  Create a fuller mock
871         environment, with mock target_ops, inferior, address space, thread
872         and inferior_ptid.
873         * progspace.c (struct address_space): Move to ...
874         * progspace.h (struct address_space): ... here.
875         * regcache.h (regcache::~regcache, regcache::raw_write)
876         [GDB_SELF_TEST]: No longer virtual.
877
878 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
879
880         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
881
882 2017-10-04  Pedro Alves  <palves@redhat.com>
883
884         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
885         out of 'between TRY and CATCH'.
886
887 2017-10-04  Pedro Alves  <palves@redhat.com>
888
889         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
890         * common/common-exceptions.h (TRY): Open an outermost scope.
891         Expand intro comment.
892         (CATCH): Reindent.
893         (END_CATCH): Close the outermost scope.
894         * completer.c (complete_line_internal): Add missing END_CATCH.
895
896 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
897
898         * NEWS (Changes since GDB 8.0): Add entry about new
899         'set-cwd-on-gdbserver' feature.
900         (New remote packets): Add entry for QSetWorkingDir.
901         * common/common-inferior.h (set_inferior_cwd): New prototype.
902         * infcmd.c (set_inferior_cwd): Remove "static".
903         (show_cwd_command): Expand text to include remote debugging.
904         * remote.c: Add PACKET_QSetWorkingDir.
905         (remote_protocol_features) <QSetWorkingDir>: New entry for
906         PACKET_QSetWorkingDir.
907         (extended_remote_set_inferior_cwd): New function.
908         (extended_remote_create_inferior): Call
909         "extended_remote_set_inferior_cwd".
910         (_initialize_remote): Call "add_packet_config_cmd" for
911         QSetWorkingDir.
912
913 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
914
915         * NEWS (New commands): Mention "set/show cwd".
916         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
917         "cd" command's help text.
918         * common/common-inferior.h (get_inferior_cwd): New prototype.
919         * infcmd.c (inferior_cwd_scratch): New global variable.
920         (set_inferior_cwd): New function.
921         (get_inferior_cwd): Likewise.
922         (set_cwd_command): Likewise.
923         (show_cwd_command): Likewise.
924         (_initialize_infcmd): Add "set/show cwd" commands.
925         * inferior.h (class inferior) <cwd>: New field.
926         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
927         (fork_inferior): Change inferior's cwd before its execution.
928         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
929         to CreateProcess.
930
931 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
932
933         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
934         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
935         (COMMON_OBS): Add gdb_tilde_expand.o.
936         * common/gdb_tilde_expand.c: New file.
937         * common/gdb_tilde_expand.h: Likewise.
938
939 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
940
941         * gdbarch.sh (objfile): Remove duplicate declaration.
942         * gdbarch.h: Regenerate.
943
944 2017-10-03  Tom Tromey  <tom@tromey.com>
945
946         * utils.c (internal_vproblem): Use string_vprintf.
947
948 2017-10-03  Tom Tromey  <tom@tromey.com>
949
950         * printcmd.c (info_symbol_command): Use std::string.
951
952 2017-10-03  Tom Tromey  <tom@tromey.com>
953
954         * top.c (gdb_safe_append_history): Use std::string.
955
956 2017-10-03  Tom Tromey  <tom@tromey.com>
957
958         * event-top.c (stdin_event_handler): Update.
959         * main.c (captured_main_1): Update.
960         * top.h (make_delete_ui_cleanup): Remove.
961         (struct ui): Add constructor and destructor.
962         (new_ui, delete_ui): Remove.
963         * top.c (make_delete_ui_cleanup): Remove.
964         (new_ui_command): Use std::unique_ptr.
965         (delete_ui_cleanup): Remove.
966         (ui::ui): Rename from new_ui.  Update.
967         (free_ui): Remove.
968         (ui::~ui): Rename from delete_ui.  Update.
969
970 2017-10-03  Tom Tromey  <tom@tromey.com>
971
972         * symfile.c (load_progress): Use gdb::byte_vector.
973
974 2017-10-03  Tom Tromey  <tom@tromey.com>
975
976         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
977         declaration.
978         * printcmd.c (x_command): Remove unused declaration.
979         * symfile.c (symbol_file_command): Remove unused declaration.
980
981 2017-10-03  Tom Tromey  <tom@tromey.com>
982
983         * utils.c (internal_vproblem): Use std::string.
984         (defaulted_query): Likewise.
985
986 2017-10-03  Tom Tromey  <tom@tromey.com>
987
988         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
989         * top.c (execute_command_to_string): Update.
990         * utils.c (make_cleanup_restore_page_info): Remove.
991         (do_restore_page_info_cleanup): Remove.
992         (set_batch_flag_and_restore_page_info):
993         New.
994         (make_cleanup_restore_page_info): Remove.
995         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
996         (~set_batch_flag_and_restore_page_info): New
997         (make_cleanup_restore_uinteger): Remove.
998         (make_cleanup_restore_integer): Remove.
999         (struct restore_integer_closure): Remove.
1000         (restore_integer): Remove.
1001         * utils.h (struct set_batch_flag_and_restore_page_info): New
1002         class.
1003         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1004         (make_cleanup_restore_page_info): Remove.
1005         (make_cleanup_restore_uinteger) Remove.
1006         (make_cleanup_restore_integer) Remove.
1007
1008 2017-10-03  Tom Tromey  <tom@tromey.com>
1009
1010         * record-full.h (record_full_gdb_operation_disable_set): Return
1011         scoped_restore_tmpl<int>.
1012         * infrun.c (adjust_pc_after_break): Update.
1013         (handle_signal_stop): Update.
1014         * record-full.c (record_full_gdb_operation_disable_set): Return
1015         scoped_restore_tmpl<int>.
1016         (record_full_wait_1, record_full_insert_breakpoint)
1017         (record_full_remove_breakpoint, record_full_save)
1018         (record_full_goto_insn): Update.
1019
1020 2017-10-02  Tom Tromey  <tom@tromey.com>
1021
1022         PR rust/22236:
1023         * rust-lang.c (rust_val_print_str): New function.
1024         (val_print_struct): Call it.
1025         (rust_subscript): Preserve name of slice type.
1026
1027 2017-10-02  Tom Tromey  <tom@tromey.com>
1028
1029         * rust-lang.c (rust_subscript): Handle slices in
1030         EVAL_AVOID_SIDE_EFFECTS case.
1031
1032 2017-10-02  Tom Tromey  <tom@tromey.com>
1033
1034         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
1035
1036 2017-10-02  Tom Tromey  <tom@tromey.com>
1037
1038         * rust-lang.h (rust_slice_type): Add "extern".
1039
1040 2017-10-02  Tom Tromey  <tom@tromey.com>
1041             Pedro Alves  <palves@redhat.com>
1042
1043         * ada-lang.h (ada_exc_info::operator<): Make const.
1044         (ada_exc_info::operator==): Make const.
1045         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
1046         Make const.
1047
1048 2017-09-29  Tom Tromey  <tom@tromey.com>
1049
1050         * target.c (read_whatever_is_readable): Change type of "result".
1051         Update.
1052         (free_memory_read_result_vector): Remove.
1053         (read_memory_robust): Change return type.  Update.
1054         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
1055         bin2hex, std::string.
1056         * target.h (memory_read_result_s): Remove typedef.
1057         (free_memory_read_result_vector): Remove.
1058         (read_memory_robust): Return std::vector.
1059
1060 2017-09-29  Tom Tromey  <tom@tromey.com>
1061
1062         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
1063
1064 2017-09-29  Tom Tromey  <tom@tromey.com>
1065
1066         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
1067         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
1068         operator< and operator==.
1069         (ada_exceptions_list): Return a std::vector.
1070         * ada-lang.c (ada_exc_info::operator<): Rename from
1071         compare_ada_exception_info.
1072         (ada_exc_info::operator==): New.
1073         (sort_remove_dups_ada_exceptions_list): Change type of
1074         "exceptions".
1075         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
1076         (ada_add_global_exceptions): Likewise.
1077         (ada_exceptions_list_1): Return a std::vector.
1078         (ada_exceptions_list): Likewise.
1079
1080 2017-09-29  Tom Tromey  <tom@tromey.com>
1081
1082         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
1083         'std::set *'.
1084         (print_one_inferior): Update.
1085         (free_vector_of_ints): Remove.
1086         (list_available_thread_groups): Change "ids" to std::set.
1087         (mi_cmd_list_thread_groups): Update.
1088         (struct collect_cores_data) <core>: Now a std::set.
1089         (collect_cores): Update.
1090         (unique): Remove.
1091         (print_one_inferior): Update.
1092
1093 2017-09-29  Tom Tromey  <tom@tromey.com>
1094
1095         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
1096         (mi_execute_async_cli_command): Likewise.
1097         (mi_cmd_trace_frame_collected): Use field_fmt.
1098
1099 2017-09-29  Tom Tromey  <tom@tromey.com>
1100
1101         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
1102         gdb::byte_vector.
1103
1104 2017-09-29  Tom Tromey  <tom@tromey.com>
1105
1106         * mi/mi-parse.c (mi_parse): Remove unused declaration.
1107
1108 2017-09-29  Tom Tromey  <tom@tromey.com>
1109
1110         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
1111
1112 2017-09-29  Tom Tromey  <tom@tromey.com>
1113
1114         * varobj.h (varobj_gen_name): Return std::string.
1115         * varobj.c (varobj_gen_name): Return std::string.
1116         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
1117         (mi_cmd_var_delete): Don't copy "name".
1118
1119 2017-09-29  Tom Tromey  <tom@tromey.com>
1120
1121         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
1122         (mi_cmd_break_insert_1): Update.
1123
1124 2017-09-29  Tom Tromey  <tom@tromey.com>
1125
1126         * target.h (make_scoped_defer_target_commit_resume): Update.
1127         * target.c (make_scoped_defer_target_commit_resume): Rename from
1128         make_cleanup_defer_target_commit_resume.  Return a
1129         scoped_restore.
1130         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
1131
1132 2017-09-29  Tom Tromey  <tom@tromey.com>
1133
1134         * main.c (captured_main_1): Remove unused declaration.
1135         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
1136
1137 2017-09-29  Tom Tromey  <tom@tromey.com>
1138
1139         * symtab.c (search_symbols): Remove unused outer cleanup.
1140         (make_source_files_completion_list): Remove unused declaration.
1141
1142 2017-09-29  Tom Tromey  <tom@tromey.com>
1143
1144         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
1145
1146 2017-09-29  Tom Tromey  <tom@tromey.com>
1147
1148         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
1149         gdb::byte_vector.
1150
1151 2017-09-29  Tom Tromey  <tom@tromey.com>
1152
1153         * complaints.c (vcomplaint): Use std::string.
1154
1155 2017-09-29  Tom Tromey  <tom@tromey.com>
1156
1157         * tracepoint.c (trace_variable_command): Use std::string.
1158         (encode_actions_1): Remove unused declarations.
1159         (create_tsv_from_upload): Use std::string.
1160
1161 2017-09-29  Tom Tromey  <tom@tromey.com>
1162
1163         * cp-support.c (gdb_demangle): Use std::string.
1164
1165 2017-09-29  Tom Tromey  <tom@tromey.com>
1166
1167         * stack.c (parse_frame_specification): Use std::string
1168         (info_frame_command): Use gdb::unique_xmalloc_ptr.
1169
1170 2017-09-29  Tom Tromey  <tom@tromey.com>
1171
1172         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
1173
1174 2017-09-29  Tom Tromey  <tom@tromey.com>
1175
1176         * utils.c (vfprintf_maybe_filtered): Use std::string.
1177         (vfprintf_unfiltered): Likewise.
1178
1179 2017-09-29  Tom Tromey  <tom@tromey.com>
1180
1181         * event-top.c (top_level_prompt): Return std::string.
1182         (display_gdb_prompt): Update.
1183
1184 2017-09-29  Tom Tromey  <tom@tromey.com>
1185
1186         * unittests/common-utils-selftests.c (format): New function.
1187         (string_vprintf_tests): New function.
1188         (_initialize_common_utils_selftests): Register new tests.
1189         * common/common-utils.c (string_vprintf): New function.
1190         * common/common-utils.h (string_vprintf): Declare.
1191
1192 2017-09-29  Pedro Alves  <palves@redhat.com>
1193
1194         * common/rsp-low.c (unpack_varlen_hex): Constify.
1195         * common/rsp-low.h (unpack_varlen_hex): Constify.
1196         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
1197         Constify.
1198         * remote.c (remote_set_permissions, read_ptid)
1199         (remote_current_thread, remote_get_threads_with_qthreadinfo)
1200         (remote_static_tracepoint_marker_at)
1201         (remote_static_tracepoint_markers_by_strid)
1202         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
1203         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
1204         (parse_tracepoint_definition, parse_tsv_definition)
1205         (parse_static_tracepoint_marker_definition): Constify.
1206         * tracepoint.h (parse_static_tracepoint_marker_definition)
1207         (parse_trace_status, parse_tracepoint_status)
1208         (parse_tracepoint_definition, parse_tsv_definition): Constify.
1209
1210 2017-09-29  Pedro Alves  <palves@redhat.com>
1211
1212         * remote.c (target_buf, target_buf_size): Delete.
1213         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
1214         Use the connection's packet buffer instead.
1215         All callers adjusted.
1216         (_initialize_remote): Remove references to target_buf and
1217         target_buf_size.
1218
1219 2017-09-28  Pedro Alves  <palves@redhat.com>
1220
1221         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1222         unittests/common-utils-selftests.c.
1223         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
1224         (COMMON_OBS): Remove utils-selftests.o.
1225         * utils-selftests.c: Move to ...
1226         * unittests/common-utils-selftests.c: ... here and rename self
1227         test to "string_printf".
1228
1229 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
1230
1231         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
1232         having NULL cus or tus.
1233
1234 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1235
1236         * arm-tdep.c: (convert_from_extended): Remove.
1237         (convert_to_extended): Likewise.
1238         (arm_extract_return_value): Use convert_typed_floating.
1239         (arm_store_return_value): Likewise.
1240
1241         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1242         * sh-tdep.c: Do not include "floatformat.h".
1243         (sh_littlebyte_bigword_type): New function.
1244         (sh_register_convert_to_virtual): Use convert_typed_floating.
1245         (sh_register_convert_to_raw): Likewise.
1246         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
1247         (sh64_littlebyte_bigword_type): New function.
1248         (sh64_extract_return_value): Use convert_typed_floating.
1249         (sh64_register_convert_to_virtual): Likewise.
1250         (sh64_register_convert_to_raw): Likewise.
1251
1252 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1253
1254         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
1255         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
1256
1257         * gdbtypes.h (union type_specific): Make field floatformat hold
1258         just a single struct floatformat, not an array.
1259         (floatformat_from_type): Move here.
1260         * gdbtypes.c (floatformat_from_type): Move here.  Update to
1261         changed TYPE_FLOATFORMAT definition.
1262         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
1263         (recursive_dump_type): Likewise.
1264         (init_float_type): Install correct floatformat for byte order.
1265         (arch_float_type): Likewise.
1266
1267 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
1268
1269         * gdbtypes.c (init_type): Change incoming argument from
1270         length-in-bytes to length-in-bits.  Assert length is a
1271         multiple of TARGET_CHAR_BITS.
1272         (arch_type, arch_flags_type): Likewise.
1273         (init_integer_type): Update call to init_type.
1274         (init_character_type): Likewise.
1275         (init_boolean_type): Likewise.
1276         (init_float_type): Likewise.
1277         (init_decfloat_type): Likewise.
1278         (init_complex_type): Likewise.
1279         (init_pointer_type): Likewise.
1280         (objfile_type): Likewise.
1281         (arch_integer_type): Update call to arch_type.
1282         (arch_character_type): Likewise.
1283         (arch_boolean_type): Likewise.
1284         (arch_float_type): Likewise.
1285         (arch_decfloat_type): Likewise.
1286         (arch_complex_type): Likewise.
1287         (arch_pointer_type): Likewise.
1288         (gdbtypes_post_init): Likewise.
1289
1290         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
1291         (read_base_type): Likewise.
1292         * mdebugread.c (basic_type): Likewise.
1293         * stabsread.c (dbx_init_float_type): Likewise.
1294         (rs6000_builtin_type): Likewise.
1295         (read_range_type): Likewise.  Also, fix call to init_integer_type
1296         with erroneous length argument.
1297
1298         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
1299         * d-lang.c (build_d_types): Likewise.
1300         * f-lang.c (build_fortran_types): Likewise.
1301         * go-lang.c (build_go_types): Likewise.
1302         * opencl-lang.c (build_opencl_types): Likewise.
1303         * jit.c (finalize_symtab): Likewise.
1304         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
1305         (build_std_type_info_type): Likewise.
1306         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
1307         update call to arch_flags_type.
1308
1309         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
1310         arch_type.
1311         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
1312         * windows-tdep.c (windows_get_tlb_type): Likewise.
1313
1314         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
1315         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
1316         * m32c-tdep.c (make_types): Likewise.
1317         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
1318         (rl78_psw_type): Update call to arch_flags_type.
1319         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
1320         * rx-tdep.c (rx_psw_type): Likewise.
1321         (rx_fpsw_type): Likewise.
1322         * sparc-tdep.c (sparc_psr_type): Likewise.
1323         (sparc_fsr_type): Likewise.
1324         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
1325         (sparc64_ccr_type): Likewise.
1326         (sparc64_fsr_type): Likewise.
1327         (sparc64_fprs_type): Likewise.
1328
1329 2017-09-27  Tom Tromey  <tom@tromey.com>
1330
1331         * findcmd.c (find_command): Constify.
1332
1333 2017-09-27  Tom Tromey  <tom@tromey.com>
1334
1335         * ada-tasks.c (task_command_1, task_command): Constify.
1336
1337 2017-09-27  Tom Tromey  <tom@tromey.com>
1338
1339         * symtab.c (maintenance_print_symbol_cache)
1340         (maintenance_flush_symbol_cache)
1341         (maintenance_print_symbol_cache_statistics): Constify.
1342
1343 2017-09-27  Tom Tromey  <tom@tromey.com>
1344
1345         * inferior.c (detach_inferior_command, kill_inferior_command)
1346         (inferior_command): Constify.
1347
1348 2017-09-27  Tom Tromey  <tom@tromey.com>
1349
1350         * regcache.c (regcache_print, maintenance_print_registers)
1351         (maintenance_print_raw_registers)
1352         (maintenance_print_cooked_registers)
1353         (maintenance_print_register_groups)
1354         (maintenance_print_remote_registers): Constify.
1355
1356 2017-09-27  Tom Tromey  <tom@tromey.com>
1357
1358         * printcmd.c (map_display_numbers, undisplay_command)
1359         (enable_disable_display_command, enable_display_command)
1360         (disable_display_command): Constify.
1361
1362 2017-09-27  Tom Tromey  <tom@tromey.com>
1363
1364         * breakpoint.h (delete_command): Don't declare.
1365         * breakpoint.c (delete_command, enable_once_command)
1366         (enable_count_command, enable_delete_command, breakpoint_1)
1367         (maintenance_info_breakpoints, stopin_command, stopat_command)
1368         (delete_command, delete_trace_command, save_breakpoints)
1369         (save_breakpoints_command, save_tracepoints_command): Constify.
1370
1371 2017-09-27  Tom Tromey  <tom@tromey.com>
1372
1373         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1374         (skip_ws, extract_identifier, macro_define_command)
1375         (macro_undef_command, macro_list_command): Constify.
1376
1377 2017-09-27  Tom Tromey  <tom@tromey.com>
1378
1379         * infcmd.c (environment_info, set_environment_command)
1380         (unset_environment_command, path_info, info_proc_cmd_1)
1381         (info_proc_cmd_mappings, info_proc_cmd_stat)
1382         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
1383         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
1384
1385 2017-09-27  Tom Tromey  <tom@tromey.com>
1386
1387         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
1388         Constify.
1389
1390 2017-09-27  Tom Tromey  <tom@tromey.com>
1391
1392         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
1393
1394 2017-09-27  Tom Tromey  <tom@tromey.com>
1395
1396         * demangle.c (demangle_command): Constify.
1397
1398 2017-09-27  Tom Tromey  <tom@tromey.com>
1399
1400         * progspace.c (maintenance_info_program_spaces_command):
1401         Constify.
1402
1403 2017-09-27  Tom Tromey  <tom@tromey.com>
1404
1405         * compile/compile.c (check_raw_argument, compile_file_command)
1406         (compile_code_command, compile_print_command): Constify.
1407
1408 2017-09-27  Tom Tromey  <tom@tromey.com>
1409
1410         * reggroups.c (maintenance_print_reggroups): Constify.
1411
1412 2017-09-27  Tom Tromey  <tom@tromey.com>
1413
1414         * dwarf2read.c (save_gdb_index_command): Constify.
1415
1416 2017-09-27  Tom Tromey  <tom@tromey.com>
1417
1418         * stap-probe.c (info_probes_stap_command): Constify.
1419
1420 2017-09-27  Tom Tromey  <tom@tromey.com>
1421
1422         * fork-child.c (unset_exec_wrapper_command): Constify.
1423
1424 2017-09-27  Tom Tromey  <tom@tromey.com>
1425
1426         * btrace.c (get_uint, get_context_size, no_chunk)
1427         (maint_btrace_packet_history_cmd)
1428         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
1429         (maint_info_btrace_cmd): Constify.
1430
1431 2017-09-27  Tom Tromey  <tom@tromey.com>
1432
1433         * reverse.c (delete_bookmark_command): Constify.
1434
1435 2017-09-27  Tom Tromey  <tom@tromey.com>
1436
1437         * remote.c (set_memory_packet_size)
1438         (set_memory_write_packet_size, show_memory_write_packet_size)
1439         (set_memory_read_packet_size, show_memory_read_packet_size)
1440         (compare_sections_command, packet_command, remote_put_command)
1441         (remote_get_command, remote_delete_command): Constify.
1442
1443 2017-09-27  Tom Tromey  <tom@tromey.com>
1444
1445         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
1446         (set_mipsfpu_double_command, set_mipsfpu_none_command)
1447         (set_mipsfpu_auto_command): Constify.
1448
1449 2017-09-27  Tom Tromey  <tom@tromey.com>
1450
1451         * cli/cli-cmds.h (cd_command): Constify.
1452         * cli/cli-cmds.c (cd_command): Constify.
1453
1454 2017-09-27  Tom Tromey  <tom@tromey.com>
1455
1456         * thread.c (thread_name_command, thread_find_command): Constify.
1457
1458 2017-09-27  Tom Tromey  <tom@tromey.com>
1459
1460         * probe.c (enable_probes_command, disable_probes_command):
1461         Constify.
1462
1463 2017-09-27  Tom Tromey  <tom@tromey.com>
1464
1465         * symfile.c (symbol_file_command): Constify.
1466         * gdbcore.h (deprecated_file_changed_hook): Constify.
1467         * exec.c (deprecated_file_changed_hook, exec_file_command)
1468         (file_command): Constify.
1469         * defs.h (symbol_file_command): Constify.
1470
1471 2017-09-27  Tom Tromey  <tom@tromey.com>
1472
1473         * remote-fileio.c (set_system_call_allowed)
1474         (show_system_call_allowed): Constify.
1475
1476 2017-09-27  Tom Tromey  <tom@tromey.com>
1477
1478         * tracepoint.c (delete_trace_variable_command)
1479         (tfind_end_command, tfind_start_command, tfind_pc_command)
1480         (tfind_tracepoint_command, tfind_line_command)
1481         (tfind_range_command, tfind_outside_command): Constify.
1482
1483 2017-09-27  Tom Tromey  <tom@tromey.com>
1484
1485         * ax-gdb.c (maint_agent_printf_command, agent_command)
1486         (agent_eval_command): Constify.
1487
1488 2017-09-27  Tom Tromey  <tom@tromey.com>
1489
1490         * tracepoint.c (info_scope_command): Constify.
1491         * python/python.c (gdbpy_decode_line): Constify.
1492         * python/py-breakpoint.c (bppy_init): Constify.
1493         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
1494         * location.h: (new_linespec_location)
1495         (string_to_event_location_basic, string_to_event_location):
1496         Constify.
1497         * location.c (new_linespec_location)
1498         (string_to_event_location_basic, string_to_event_location):
1499         Constify.
1500         * linespec.h (decode_line_with_current_source)
1501         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
1502         * linespec.c (linespec_lex_to_end)
1503         (decode_line_with_current_source)
1504         (decode_line_with_last_displayed): Constify.
1505         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
1506         Constify.
1507         * cli/cli-cmds.c (edit_command, list_command): Constify.
1508         * breakpoint.h (until_break_command, watch_command_wrapper)
1509         (awatch_command_wrapper, rwatch_command_wrapper)
1510         (init_ada_exception_breakpoint): Constify.
1511         * breakpoint.c (break_command_1, dprintf_command)
1512         (break_range_command, watch_command_wrapper)
1513         (rwatch_command_wrapper, awatch_command_wrapper)
1514         (until_break_command, init_ada_exception_breakpoint)
1515         (strace_marker_create_sals_from_location, trace_command)
1516         (ftrace_command, strace_command, struct tracepoint): Constify.
1517         * ax-gdb.c (agent_command_1): Constify.
1518         * ada-lang.c (ada_exception_sal): Constify.
1519
1520 2017-09-27  Tom Tromey  <tom@tromey.com>
1521
1522         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
1523         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
1524         (get_context_size, no_chunk, get_insn_history_modifiers)
1525         (cmd_record_insn_history, get_call_history_modifiers)
1526         (cmd_record_call_history): Constify.
1527
1528 2017-09-27  Tom Tromey  <tom@tromey.com>
1529
1530         * source.c (show_substitute_path_command)
1531         (unset_substitute_path_command, set_substitute_path_command):
1532         Constify.
1533
1534 2017-09-27  Tom Tromey  <tom@tromey.com>
1535
1536         * typeprint.c (maintenance_print_type): Constify.
1537         * maint.c (maintenance_dump_me, maintenance_demangle)
1538         (maintenance_time_display, maintenance_info_sections)
1539         (maintenance_print_statistics, maintenance_deprecate)
1540         (maintenance_undeprecate): Constify.
1541         (maintenance_do_deprecate): Constify.  Use std::string.
1542         (maintenance_selftest): Constify.
1543         * gdbtypes.h (maintenance_print_type): Constify.
1544
1545 2017-09-27  Tom Tromey  <tom@tromey.com>
1546
1547         * hppa-tdep.c (unwind_command): Constify.
1548
1549 2017-09-27  Tom Tromey  <tom@tromey.com>
1550
1551         * target-descriptions.c (unset_tdesc_filename_cmd)
1552         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
1553         Constify.
1554
1555 2017-09-27  Tom Tromey  <tom@tromey.com>
1556
1557         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
1558
1559 2017-09-27  Tom Tromey  <tom@tromey.com>
1560
1561         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
1562
1563 2017-09-27  Tom Tromey  <tom@tromey.com>
1564
1565         * tui/tui-regs.c (tui_reg_command): Constify.
1566
1567 2017-09-27  Tom Tromey  <tom@tromey.com>
1568
1569         * skip.c (skip_file_command, skip_function_command)
1570         (skip_enable_command, skip_disable_command, skip_delete_command):
1571         Constify.
1572
1573 2017-09-27  Tom Tromey  <tom@tromey.com>
1574
1575         * record-btrace.c (cmd_record_btrace_bts_start)
1576         (cmd_record_btrace_pt_start): Constify.
1577
1578 2017-09-27  Tom Tromey  <tom@tromey.com>
1579
1580         * symmisc.c (maintenance_print_symbols)
1581         (maintenance_print_msymbols, maintenance_print_objfiles)
1582         (maintenance_info_symtabs, maintenance_check_symtabs)
1583         (maintenance_expand_symtabs, maintenance_info_line_tables):
1584         Constify.
1585
1586 2017-09-27  Tom Tromey  <tom@tromey.com>
1587
1588         * top.c (new_ui_command): Constify.
1589
1590 2017-09-27  Tom Tromey  <tom@tromey.com>
1591
1592         * symfile.c (add_symbol_file_command)
1593         (remove_symbol_file_command, list_overlays_command)
1594         (map_overlay_command, unmap_overlay_command)
1595         (overlay_auto_command, overlay_manual_command)
1596         (overlay_off_command, overlay_load_command): Constify.
1597
1598 2017-09-27  Tom Tromey  <tom@tromey.com>
1599
1600         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
1601         (info_spu_mailbox_command, info_spu_dma_command)
1602         (info_spu_proxydma_command): Constify.
1603
1604 2017-09-27  Tom Tromey  <tom@tromey.com>
1605
1606         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
1607
1608 2017-09-27  Tom Tromey  <tom@tromey.com>
1609
1610         * cli/cli-script.c (user_defined_command): Constify.
1611
1612 2017-09-27  Tom Tromey  <tom@tromey.com>
1613
1614         * cli/cli-dump.c (dump_memory_command, dump_value_command)
1615         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
1616         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
1617         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
1618         (dump_binary_value, append_binary_memory, append_binary_value):
1619         Constify.
1620         (struct dump_context) <func>: Constify.
1621         (add_dump_command): Update.
1622
1623 2017-09-27  Tom Tromey  <tom@tromey.com>
1624
1625         * cli/cli-cmds.c (show_version, show_configuration)
1626         (source_command, show_user): Constify.
1627
1628 2017-09-27  Tom Tromey  <tom@tromey.com>
1629
1630         * target.c (maintenance_print_target_stack): Constify.
1631
1632 2017-09-27  Tom Tromey  <tom@tromey.com>
1633
1634         * interps.c (interpreter_exec_cmd): Constify.
1635
1636 2017-09-27  Tom Tromey  <tom@tromey.com>
1637
1638         * record-full.c (cmd_record_full_restore): Constify.
1639
1640 2017-09-27  Tom Tromey  <tom@tromey.com>
1641
1642         * memattr.c (enable_mem_command, disable_mem_command)
1643         (delete_mem_command): Constify.
1644
1645 2017-09-27  Tom Tromey  <tom@tromey.com>
1646
1647         * value.c (show_convenience): Constify.
1648
1649 2017-09-27  Tom Tromey  <tom@tromey.com>
1650
1651         * gdbcore.h (core_file_command): Update.
1652         * corefile.c (core_file_command): Constify.
1653
1654 2017-09-27  Tom Tromey  <tom@tromey.com>
1655
1656         * user-regs.c (maintenance_print_user_registers): Constify.
1657
1658 2017-09-27  Tom Tromey  <tom@tromey.com>
1659
1660         * cp-namespace.c (maintenance_cplus_namespace): Constify.
1661
1662 2017-09-27  Tom Tromey  <tom@tromey.com>
1663
1664         * cp-support.c (first_component_command): Constify.
1665
1666 2017-09-27  Tom Tromey  <tom@tromey.com>
1667
1668         * psymtab.c (maintenance_print_psymbols)
1669         (maintenance_info_psymtabs, maintenance_check_psymtabs):
1670         Constify.
1671
1672 2017-09-27  Tom Tromey  <tom@tromey.com>
1673
1674         * windows-tdep.c (display_tib): Constify.
1675
1676 2017-09-27  Tom Tromey  <tom@tromey.com>
1677
1678         * linux-fork.c (delete_checkpoint_command)
1679         (detach_checkpoint_command): Constify.
1680
1681 2017-09-27  Tom Tromey  <tom@tromey.com>
1682
1683         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
1684
1685 2017-09-27  Tom Tromey  <tom@tromey.com>
1686
1687         * arc-tdep.c (dump_arc_instruction_command): Constify.
1688
1689 2017-09-27  Tom Tromey  <tom@tromey.com>
1690
1691         * valprint.c (set_radix, show_radix): Constify.
1692
1693 2017-09-27  Tom Tromey  <tom@tromey.com>
1694
1695         * dtrace-probe.c (info_probes_dtrace_command): Constify.
1696
1697 2017-09-27  Tom Tromey  <tom@tromey.com>
1698
1699         * command.h (not_just_help_class_command): Update.
1700         * cli/cli-decode.h (not_just_help_class_command): Update.
1701         * cli/cli-decode.c (not_just_help_class_command): Constify.
1702
1703 2017-09-27  Tom Tromey  <tom@tromey.com>
1704
1705         * gdb_bfd.c (maintenance_info_bfds): Constify.
1706
1707 2017-09-27  Tom Tromey  <tom@tromey.com>
1708
1709         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
1710         overloads.
1711         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
1712         (do_const_cfunc): New function.
1713         (cmd_cfunc_eq): New overload.
1714         (cli_user_command_p): Check do_const_cfunc.
1715         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
1716         const_cfunc.
1717         * command.h (add_cmd): Add const overload and no-function
1718         overload.
1719         (set_cmd_cfunc): Add const overload.
1720         (cmd_const_cfunc_ftype): Declare.
1721         (cmd_cfunc_eq): Add const overload.
1722         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
1723         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
1724         overload.
1725
1726 2017-09-27  Tom Tromey  <tom@tromey.com>
1727
1728         * macroexp.c (get_next_token_for_substitution): New function.
1729         (substitute_args): Call it.  Check for __VA_OPT__.
1730
1731 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1732             Pedro Alves <palves@redhat.com>
1733
1734         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
1735         producer_is_icc_lt_14.
1736         (producer_is_icc_lt_14): New function.
1737         (check_producer): Add code for checking version of ICC.
1738         (producer_is_icc): Move to producer.c.
1739         (read_structure_type): Restrict ICC workaround to ICC<14.
1740         * producer.c: Include selftest.h.
1741         (producer_is_icc, producer_parsing_tests, _initialize_producer):
1742         New functions.
1743         * producer.h (producer_is_icc): New declaration.
1744
1745 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1746
1747         * Makefile.in (SFILES): Add producer.c.
1748         (COMMON_OBS): Add producer.o
1749         * amd64-tdep.c (producer.h): Add new include.
1750         * dwarf2read.c (producer.h): Add new include.
1751         * producer.c: New file.
1752         * producer.h: New file.
1753         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
1754         producer.c.
1755         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
1756         producer.h.
1757
1758 2017-09-26  Matthias Klose  <doko@ubuntu.com>
1759
1760         * configure.ac: Search ncursesw before ncurses.
1761         Check ncursesw/ncurses.h before ncurses/ncurses.h.
1762         * gdb_curses.h: Include <ncursesw/ncurses.h>
1763         * config.in, configure: Regenerate.
1764
1765 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1766
1767         PR gdb/22185
1768         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
1769         obsolete.
1770         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
1771         Remove i386sol2 support.
1772         * configure.nat <i386sol2>: Remove.
1773         <sol2-64>: Fold into ...
1774         <sol2>: ... this.
1775         Move common settings to default section.
1776         Add sol-thread.o.
1777         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
1778         x86_64-*-solaris2.1[0-9]*>: Rename to ...
1779         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
1780         <i[34567]86-*-solaris*>: Remove.
1781         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
1782
1783         * configure.ac: Remove wctype in libw check.
1784         (_MSE_INT_H): Don't define on Solaris 7-9.
1785         <solaris*>: Remove libthread_db.so.1 check.
1786         * configure: Regenerate.
1787         * config.in: Regenerate.
1788
1789         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
1790         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
1791         (gdb_ps_size_t): Remove.
1792         Use base types in users.
1793         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
1794
1795         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
1796
1797 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1798
1799         PR build/22206
1800         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
1801         (adi_is_addr_mapped): Likewise.
1802         (PSR_ICC): Don't redefine.
1803         (PSR_IMPL): Likewise.
1804
1805 2017-09-25  Tom Tromey  <tom@tromey.com>
1806
1807         * regcache.c (regcache::dump): Use string_printf.
1808
1809 2017-09-25  Tom Tromey  <tom@tromey.com>
1810
1811         * regcache.c (class regcache_invalidator): New.
1812         (struct register_to_invalidate): Remove.
1813         (make_cleanup_regcache_invalidate): Remove.
1814         (regcache::raw_write): Use regcache_invalidator.
1815
1816 2017-09-25  Tom Tromey  <tom@tromey.com>
1817
1818         * spu-tdep.c (spu2ppu_sniffer): Update.
1819         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
1820         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
1821         Remove.
1822         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
1823         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
1824         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
1825         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
1826         (frame_pop): Update.
1827
1828 2017-09-25  Tom Tromey  <tom@tromey.com>
1829
1830         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
1831         * regcache.h (regcache_xfree): Don't declare.
1832         * regcache.c (regcache_xfree): Remove.
1833         (do_regcache_xfree): Use delete.
1834         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
1835         * linux-fork.c (free_fork): Use delete.
1836         (fork_save_infrun_state): Likewise.
1837         * jit.c (jit_dealloc_cache): Use delete.
1838         * infrun.c (discard_infcall_suspend_state): Use delete.
1839
1840 2017-09-25  Tom Tromey  <tom@tromey.com>
1841
1842         * regcache.h (regcache_xmalloc): Don't declare.
1843         (regcache_raw_set_cached_value): Update comment.
1844         * regcache.c (regcache_xmalloc): Remove.
1845         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
1846         * jit.c (jit_frame_sniffer): Use new.
1847         * frame.c (frame_save_as_regcache): Use new.
1848
1849 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1850
1851         * NEWS: Advertise support for guarded-storage registers on IBM z.
1852
1853 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1854
1855         * s390-linux-nat.c (have_regset_gs): New static variable.
1856         (s390_linux_fetch_inferior_registers): Handle guarded-storage
1857         control block and guarded-storage broadcast control regsets.
1858         (s390_read_description): Detect whether the target has
1859         guarded-storage support, return appropriate tdesc.
1860         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
1861         (features/s390x-gs-linux64.c): Likewise.
1862         (struct gdbarch_tdep) <have_gs>: New field.
1863         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
1864         (s390_gsbc_regset): New variables.
1865         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
1866         and s390_gsbc_regset, if applicable.
1867         (s390_core_read_description): Check whether core file was from a
1868         target with guarded-storage support; include appropriate regsets.
1869         (s390_gdbarch_init): Add registers for guarded-storage support.
1870         (_initialize_s390_tdep): Initialize new target descriptions that
1871         include registers for guarded-storage support.
1872         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
1873         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
1874         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
1875         (S390_NUM_REGS): Adjust macro definition.
1876         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
1877         (tdesc_s390x_gs_linux64): New declarations.
1878
1879 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1880
1881         * features/s390-gs-linux64.xml: New file.
1882         * features/s390-gs.xml: New file.
1883         * features/s390-gsbc.xml: New file.
1884         * features/s390x-gs-linux64.xml: New file.
1885         * features/Makefile (WHICH): Add s390-gs-linux64 and
1886         s390x-gs-linux64.
1887         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
1888         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
1889         * features/s390-gs-linux64.c: New generated file.
1890         * features/s390x-gs-linux64.c: New file.
1891         * regformats/s390-gs-linux64.dat: New file.
1892         * regformats/s390x-gs-linux64.dat: New file.
1893
1894 2017-09-23  Tom Tromey  <tom@tromey.com>
1895
1896         * defs.h (make_cleanup_override_quit_handler): Don't declare.
1897
1898 2017-09-22  Tom Tromey  <tom@tromey.com>
1899
1900         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
1901         type to scoped_restore_tmpl.
1902         <scoped_input_handler>: Initialize m_quit_handler directly.
1903
1904 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1905
1906         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
1907         (cd_command): Likewise.  Free "current_directory" before
1908         assigning to it.
1909         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
1910         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
1911         * top.c (gdb_dirbuf): Remove global declaration.
1912         * top.h (gdb_dirbuf): Likewise.
1913
1914 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1915
1916         * gnulib/aclocal.m4: Regenerate.
1917         * gnulib/config.in: Regenerate.
1918         * gnulib/configure: Regenerate.
1919         * gnulib/import/Makefile.am: Regenerate.
1920         * gnulib/import/Makefile.in: Regenerate.
1921         * gnulib/import/assure.h: New file.
1922         * gnulib/import/at-func.c: Likewise
1923         * gnulib/import/chdir-long.c: New file.
1924         * gnulib/import/chdir-long.h: New file.
1925         * gnulib/import/cloexec.c: New file.
1926         * gnulib/import/cloexec.h: New file.
1927         * gnulib/import/close.c: New file.
1928         * gnulib/import/closedir.c: New file.
1929         * gnulib/import/dirent-private.h: New file.
1930         * gnulib/import/dup-safer.c: New file.
1931         * gnulib/import/dup.c: New file.
1932         * gnulib/import/dup2.c: New file.
1933         * gnulib/import/error.c: New file.
1934         * gnulib/import/error.h: New file.
1935         * gnulib/import/exitfail.c: New file.
1936         * gnulib/import/exitfail.h: New file.
1937         * gnulib/import/fchdir.c: New file.
1938         * gnulib/import/fcntl.c: New file.
1939         * gnulib/import/fcntl.in.h: New file.
1940         * gnulib/import/fd-hook.c: New file.
1941         * gnulib/import/fd-hook.h: New file.
1942         * gnulib/import/fd-safer.c: New file.
1943         * gnulib/import/fdopendir.c: New file.
1944         * gnulib/import/filename.h: New file.
1945         * gnulib/import/filenamecat-lgpl.c: New file.
1946         * gnulib/import/filenamecat.h: New file.
1947         * gnulib/import/fstat.c: New file.
1948         * gnulib/import/fstatat.c: New file.
1949         * gnulib/import/getcwd-lgpl.c: New file.
1950         * gnulib/import/getcwd.c: New file.
1951         * gnulib/import/getdtablesize.c: New file.
1952         * gnulib/import/getlogin_r.c: New file.
1953         * gnulib/import/getprogname.c: New file.
1954         * gnulib/import/getprogname.h: New file.
1955         * gnulib/import/gettext.h: New file.
1956         * gnulib/import/glob-libc.h: New file.
1957         * gnulib/import/glob.c: New file.
1958         * gnulib/import/glob.in.h: New file.
1959         * gnulib/import/intprops.h: New file.
1960         * gnulib/import/m4/chdir-long.m4: New file.
1961         * gnulib/import/m4/close.m4: New file.
1962         * gnulib/import/m4/closedir.m4: New file.
1963         * gnulib/import/m4/d-ino.m4: New file.
1964         * gnulib/import/m4/d-type.m4: New file.
1965         * gnulib/import/m4/dup.m4: New file.
1966         * gnulib/import/m4/dup2.m4: New file.
1967         * gnulib/import/m4/error.m4: New file.
1968         * gnulib/import/m4/fchdir.m4: New file.
1969         * gnulib/import/m4/fcntl.m4: New file.
1970         * gnulib/import/m4/fcntl_h.m4: New file.
1971         * gnulib/import/m4/fdopendir.m4: New file.
1972         * gnulib/import/m4/filenamecat.m4: New file.
1973         * gnulib/import/m4/fstat.m4: New file.
1974         * gnulib/import/m4/fstatat.m4: New file.
1975         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
1976         * gnulib/import/m4/getcwd-path-max.m4: New file.
1977         * gnulib/import/m4/getcwd.m4: New file.
1978         * gnulib/import/m4/getdtablesize.m4: New file.
1979         * gnulib/import/m4/getlogin_r.m4: New file.
1980         * gnulib/import/m4/getprogname.m4: New file.
1981         * gnulib/import/m4/glob.m4: New file.
1982         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1983         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1984         * gnulib/import/m4/mempcpy.m4: New file.
1985         * gnulib/import/m4/memrchr.m4: New file.
1986         * gnulib/import/m4/mode_t.m4: New file.
1987         * gnulib/import/m4/msvc-inval.m4: New file.
1988         * gnulib/import/m4/msvc-nothrow.m4: New file.
1989         * gnulib/import/m4/open.m4: New file.
1990         * gnulib/import/m4/openat.m4: New file.
1991         * gnulib/import/m4/opendir.m4: New file.
1992         * gnulib/import/m4/readdir.m4: New file.
1993         * gnulib/import/m4/realloc.m4: New file.
1994         * gnulib/import/m4/rewinddir.m4: New file.
1995         * gnulib/import/m4/save-cwd.m4: New file.
1996         * gnulib/import/m4/strdup.m4: New file.
1997         * gnulib/import/m4/strerror.m4: New file.
1998         * gnulib/import/m4/unistd-safer.m4: New file.
1999         * gnulib/import/mempcpy.c: New file.
2000         * gnulib/import/memrchr.c: New file.
2001         * gnulib/import/msvc-inval.c: New file.
2002         * gnulib/import/msvc-inval.h: New file.
2003         * gnulib/import/msvc-nothrow.c: New file.
2004         * gnulib/import/msvc-nothrow.h: New file.
2005         * gnulib/import/open.c: New file.
2006         * gnulib/import/openat-die.c: New file.
2007         * gnulib/import/openat-priv.h: New file.
2008         * gnulib/import/openat-proc.c: New file.
2009         * gnulib/import/openat.c: New file.
2010         * gnulib/import/openat.h: New file.
2011         * gnulib/import/opendir.c: New file.
2012         * gnulib/import/pipe-safer.c: New file.
2013         * gnulib/import/readdir.c: New file.
2014         * gnulib/import/realloc.c: New file.
2015         * gnulib/import/rewinddir.c: New file.
2016         * gnulib/import/save-cwd.c: New file.
2017         * gnulib/import/save-cwd.h: New file.
2018         * gnulib/import/strdup.c: New file.
2019         * gnulib/import/strerror-override.c: New file.
2020         * gnulib/import/strerror-override.h: New file.
2021         * gnulib/import/strerror.c: New file.
2022         * gnulib/import/unistd--.h: New file.
2023         * gnulib/import/unistd-safer.h: New file.
2024         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
2025         "getcwd" and "glob".
2026         * ser-tcp.c: Undefine "close" before redefining it.
2027
2028 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2029
2030         * guile/scm-value.c (gdbscm_value_address): Initialize address,
2031         get rid of res_val.
2032
2033 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2034
2035         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
2036         <sol2,sparc>: Likewise.
2037         <sol2-64,i386>: Likewise.
2038
2039         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
2040         -Wdeprecated-declarations on *-*-solaris*.
2041         * configure: Regenerate.
2042
2043         * procfs.c: Include "nat/inferior.h".
2044         (procfs_info_proc): Fix typo.
2045
2046 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2047
2048         * remote.c (vector): Include.
2049         (struct private_thread_info): Add field, thread_handle.
2050         (free_private_thread_info): Deallocate storage associated with
2051         thread handle.
2052         (get_private_info_thread): Initialize `thread_handle' field.
2053         (struct thread_item): Add field, thread_handle.
2054         (clear_threads_listing_context): Deallocate storage associated
2055         with thread handle.
2056         (start_thread): Add support for "handle" attribute.
2057         (thread_attributes): Add "handle".
2058         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
2059         field.
2060         (remote_update_thread_list): Update thread_handle.
2061         (remote_thread_handle_to_thread_info): New function.
2062         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
2063
2064 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2065
2066         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
2067         function.
2068         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
2069         * python/python-internal.h (thread_object_type): Declare.
2070
2071 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
2072
2073         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
2074         (target_thread_handle_to_thread_info): Declare.
2075         * target.c (target_thread_handle_to_thread_info): New function.
2076         * target-delegates.c: Regenerate.
2077         * gdbthread.h (find_thread_by_handle): Declare.
2078         * thread.c (find_thread_by_handle): New function.
2079         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
2080         function.
2081         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
2082
2083 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2084
2085         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
2086
2087 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2088
2089         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
2090
2091 2017-09-21  Yao Qi  <yao.qi@linaro.org>
2092
2093         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
2094         to gdb_target_obs.
2095
2096 2017-09-20  Tom Tromey  <tom@tromey.com>
2097
2098         * breakpoint.c (struct counted_command_line): Remove.
2099         (breakpoint_commands): Update.
2100         (alloc_counted_command_line, incref_counted_command_line)
2101         (decref_counted_command_line, do_cleanup_counted_command_line)
2102         (make_cleanup_decref_counted_command_line): Remove.
2103         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
2104         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
2105         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
2106         (save_breakpoints): Update.
2107         * breakpoint.h (counted_command_line): Now a typedef to
2108         shared_ptr.
2109         (struct breakpoint) <commands>: Now a counted_command_line.
2110         (struct bpstats) <command>: Likewise.
2111
2112 2017-09-20  Tom Tromey  <tom@tromey.com>
2113
2114         * breakpoint.c (struct commands_info, do_map_commands_command):
2115         Remove.
2116         (commands_command_1): Update.
2117         (iterate_over_related_breakpoints): Take a function_view.
2118         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
2119         (delete_command): Update.
2120         (map_breakpoint_numbers): Take a function_view.
2121         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
2122         (disable_command): Update.
2123         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
2124         (enable_command): Update.
2125         (struct disp_data, do_enable_breakpoint_disp)
2126         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
2127         (do_map_enable_delete_breakpoint): Remove.
2128         (enable_once_command, enable_count_command, enable_delete_command)
2129         (delete_trace_variable_command): Update.
2130
2131 2017-09-20  Tom Tromey  <tom@tromey.com>
2132
2133         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
2134         (bpstat_clear): Use delete.
2135         (bpstats): New constructors.
2136         (bpstat_copy, bpstat_stop_status): Use new.
2137         (dprintf_after_condition_true): Update.
2138         * breakpoint.h (bpstats::bpstats): Add constructors.
2139         (bpstats::~bpstats): Add destructor.
2140
2141 2017-09-20  Pedro Alves  <palves@redhat.com>
2142
2143         * eval.c (make_params): Delete, refactored as ...
2144         (class fake_method): ... this new type's ctor.
2145         (fake_method::~fake_method): New.
2146         (evaluate_subexp_standard): Use 'fake_method'.
2147
2148 2017-09-20  Tom Tromey  <tom@tromey.com>
2149
2150         * windows-nat.c (get_windows_debug_event, windows_wait)
2151         (do_initial_windows_stuff, windows_attach): Update.
2152         * utils.c (vwarning, internal_vproblem): Update.
2153         (ui_unregister_input_event_handler_cleanup)
2154         (prepare_to_handle_input): Remove.
2155         (class scoped_input_handler): New.
2156         (defaulted_query, prompt_for_continue): Update.
2157         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
2158         Update.
2159         * top.c (undo_terminal_modifications_before_exit): Update.
2160         * target/target.h (target_terminal_init, target_terminal_inferior)
2161         (target_terminal_ours): Don't declare.
2162         (class target_terminal): New.
2163         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
2164         (target_terminal_ours_for_output)
2165         (make_cleanup_restore_target_terminal): Don't declare.
2166         (target_terminal_info): Remove.
2167         * target.c (enum terminal_state, terminal_state): Remove.
2168         (target_terminal::terminal_state): Define.
2169         (target_terminal::init): Rename from target_terminal_init.
2170         (target_terminal::inferior): Rename from
2171         target_terminal_inferior.
2172         (target_terminal::ours): Rename from target_terminal_ours.
2173         (target_terminal::ours_for_output): Rename from
2174         target_terminal_ours_for_output.
2175         (target_terminal::info): New method.
2176         (cleanup_restore_target_terminal)
2177         (make_cleanup_restore_target_terminal): Remove.
2178         * solib.c (handle_solib_event): Update.
2179         * remote.c (remote_serial_quit_handler): Update.
2180         (remote_terminal_inferior, remote_wait_as): Update.
2181         * record-full.c (record_full_wait_1): Update.
2182         * nto-procfs.c (procfs_create_inferior): Update.
2183         * nat/fork-inferior.c (startup_inferior): Update.
2184         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
2185         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
2186         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
2187         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
2188         (mi_breakpoint_created, mi_breakpoint_deleted)
2189         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
2190         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2191         (mi_user_selected_context_changed, report_initial_inferior):
2192         Update.
2193         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
2194         (linux_nat_terminal_inferior): Update.
2195         * infrun.c (follow_fork_inferior)
2196         (handle_vfork_child_exec_or_exit, do_target_resume)
2197         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
2198         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
2199         Update.
2200         * inflow.c (child_terminal_init, info_terminal_command): Update.
2201         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
2202         (attach_command): Update.
2203         * infcall.c (call_thread_fsm_should_stop): Update.
2204         * gnu-nat.c (gnu_attach): Update.
2205         * extension.c (struct active_ext_lang_state)
2206         (restore_active_ext_lang): Update.
2207         * exceptions.c (print_flush): Update.
2208         * event-top.c (async_enable_stdin, default_quit_handler): Update.
2209         (struct quit_handler_cleanup_data, restore_quit_handler)
2210         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
2211         Remove.
2212         * cp-support.c (gdb_demangle): Update.
2213         * breakpoint.c (update_inserted_breakpoint_locations)
2214         (insert_breakpoint_locations, handle_jit_event)
2215         (disable_breakpoints_in_unloaded_shlib): Update.
2216         * annotate.c (annotate_breakpoints_invalid)
2217         (annotate_frames_invalid): Update.
2218
2219 2017-09-20  Tom Tromey  <tom@tromey.com>
2220
2221         * main.c (catch_command_errors): Rename from
2222         catch_command_errors_const.
2223         (captured_main_1): Update.
2224
2225 2017-09-20  Pedro Alves  <palves@redhat.com>
2226
2227         * cli/cli-cmds.c (list_command): Use print_sal_location.
2228         (print_sal_location): New function.
2229         (ambiguous_line_spec): Use print_sal_location.
2230         * linespec.c (symbol_to_sal): Record the symbol in the sal.
2231         * symtab.c (find_function_start_sal): Likewise.
2232         * symtab.h (symtab_and_line::symbol): New field.
2233
2234 2017-09-20  Pedro Alves  <palves@redhat.com>
2235
2236         * linespec.c (minsym_found): Handle non-text minsyms.
2237         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
2238
2239 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2240
2241         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
2242         backslash.
2243
2244 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2245
2246         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
2247         vmovups instead vmovaps.
2248         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
2249
2250 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
2251
2252         * NEWS (Changes since GDB 8.0): Add starti.
2253         * infcmd.c (enum run_break): New.
2254         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
2255         case.
2256         (run_command): Use enum run_how.
2257         (start_command): Likewise.
2258         (starti_command): New function.
2259         (RUN_ARGS_HELP): New macro.
2260         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
2261         commands.  Add starti command.
2262
2263 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2264
2265         * Makefile.in (monitor.o): Remove the rule.
2266
2267 2017-09-19  Yao Qi  <yao.qi@linaro.org>
2268
2269         * annotate.h (struct annotate_arg_emitter): Use
2270         DISABLE_COPY_AND_ASSIGN.
2271         * common/refcounted-object.h (refcounted_object): Likewise.
2272         * completer.h (struct completion_result): Likewise.
2273         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
2274         * filename-seen-cache.h (filename_seen_cache): Likewise.
2275         * gdbcore.h (thread_section_name): Likewise.
2276         * gdb_regex.h (compiled_regex): Likewise.
2277         * gdbthread.h (scoped_restore_current_thread): Likewise.
2278         * inferior.h (scoped_restore_current_inferior): Likewise.
2279         * jit.c (jit_reader): Likewise.
2280         * linespec.h (struct linespec_result): Likewise.
2281         * mi/mi-parse.h (struct mi_parse): Likewise.
2282         * nat/fork-inferior.c (execv_argv): Likewise.
2283         * progspace.h (scoped_restore_current_program_space): Likewise.
2284         * python/python-internal.h (class gdbpy_enter): Likewise.
2285         * regcache.h (regcache): Likewise.
2286         * target-descriptions.c (struct tdesc_reg): Likewise.
2287         (struct tdesc_type): Likewise.
2288         (struct tdesc_feature): Likewise.
2289         * ui-out.h (ui_out_emit_type): Likewise.
2290
2291 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
2292
2293         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
2294         label abort_expression.
2295
2296 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2297
2298         * common/buffer.c (buffer_xml_printf): Adjust.
2299         * common/xml-utils.c (xml_escape_text): Change return type to
2300         std::string, update code accordingly.
2301         * common/xml-utils.h (xml_escape_text): Change return type to
2302         std::string.
2303         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
2304         * windows-tdep.c (windows_xfer_shared_library): Adjust.
2305         * unittests/xml-utils-selftests.c (test_xml_escape_text):
2306         Adjust.
2307
2308 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2309
2310         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
2311         (SUBDIR_UNITTESTS_OBS): Add new object file.
2312         * unittests/xml-utils-selftests.c: New file.
2313
2314 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2315
2316         * common/selftest.h (selftest): New struct/interface.
2317         (register_test): Add name parameter, add new overload.
2318         (run_tests): Add filter parameter.
2319         (for_each_selftest_ftype): New typedef.
2320         (for_each_selftest): New declaration.
2321         * common/selftest.c (tests): Change type to
2322         map<string, unique_ptr<selftest>>.
2323         (simple_selftest): New struct.
2324         (register_test): New function.
2325         (register_test): Add name parameter and use it.
2326         (run_tests): Add filter parameter and use it.  Add prints.
2327         Adjust to vector -> map change.
2328         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
2329         registering selftests.
2330         * arm-tdep.c (_initialize_arm_tdep): Likewise.
2331         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
2332         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
2333         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
2334         * findvar.c (_initialize_findvar): Likewise.
2335         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
2336         * maint.c (maintenance_selftest): Update call to run_tests.
2337         (maintenance_info_selftests): New function.
2338         (_initialize_maint_cmds): Register "maintenance info selftests"
2339         command.  Update "maintenance selftest" doc.
2340         * regcache.c (_initialize_regcache): Add names when registering
2341         selftests.
2342         * rust-exp.y (_initialize_rust_exp): Likewise.
2343         * selftest-arch.c (gdbarch_selftest): New struct.
2344         (gdbarch_tests): Remove.
2345         (register_test_foreach_arch): Add name parameter.  Call
2346         register_test.
2347         (tests_with_arch): Remove, move most content to
2348         gdbarch_selftest::operator().
2349         (_initialize_selftests_foreach_arch): Remove.
2350         * selftest-arch.h (register_test_foreach_arch): Add name
2351         parameter.
2352         (run_tests_with_arch): New declaration.
2353         * utils-selftests.c (_initialize_utils_selftests): Add names
2354         when registering selftests.
2355         * utils.c (_initialize_utils): Likewise.
2356         * unittests/array-view-selftests.c
2357         (_initialize_array_view_selftests): Likewise.
2358         * unittests/environ-selftests.c (_initialize_environ_selftests):
2359         Likewise.
2360         * unittests/function-view-selftests.c
2361         (_initialize_function_view_selftests): Likewise.
2362         * unittests/offset-type-selftests.c
2363         (_initialize_offset_type_selftests): Likewise.
2364         * unittests/optional-selftests.c
2365         (_initialize_optional_selftests): Likewise.
2366         * unittests/scoped_restore-selftests.c
2367         (_initialize_scoped_restore_selftests): Likewise.
2368         * NEWS: Document "maintenance selftest" and "maint info
2369         selftests".
2370
2371 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2372
2373         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
2374         scoped_restore.
2375
2376 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
2377
2378         * mi/mi-main.c (mi_load_progress): Make uiout variable
2379         a unique_ptr.
2380
2381 2017-09-15  Pedro Alves  <palves@redhat.com>
2382
2383         * compile/compile-c-types.c (convert_enum, convert_int)
2384         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
2385
2386 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2387
2388         * dwarf2read.c (copy_string): Remove.
2389         (parse_macro_definition): Replace copy_string with savestring.
2390
2391 2017-09-15  Yao Qi  <yao.qi@linaro.org>
2392
2393         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
2394         gdb_target_obs.
2395         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
2396         Likewise.
2397         (i[34567]86-*-linux*): Likewise.
2398
2399 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2400
2401         * dwarf2expr.h (dwarf_stack_value): Add constructor.
2402         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
2403         <stack>: Change type to std::vector.
2404         <stack_len, stack_allocated>: Remove.
2405         <grow_stack>: Remove.
2406         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2407         (dwarf_expr_context::~dwarf_expr_context): Remove.
2408         (dwarf_expr_context::grow_stack): Remove.
2409         (dwarf_expr_context::push): Adjust.
2410         (dwarf_expr_context::pop): Adjust.
2411         (dwarf_expr_context::fetch): Adjust.
2412         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
2413         (dwarf_expr_context::stack_empty_p): Adjust.
2414         (dwarf_expr_context::execute_stack_op): Adjust.
2415
2416 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2417
2418         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
2419         return type to bool.
2420         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
2421
2422 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2423
2424         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
2425         Change type to bool.
2426         (dwarf_stack_value) <in_stack_memory>: Likewise.
2427         (dwarf_expr_context) <push_address>: Change parameter type to
2428         bool.
2429         <fetch_in_stack_memory>: Change return type to bool.
2430         <push>: Change parameter type to bool.
2431         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
2432         to bool.
2433         (dwarf_expr_context::push_address): Likewise.
2434         (dwarf_expr_context::fetch_in_stack_memory): Change return type
2435         to bool.
2436         (dwarf_expr_context::execute_stack_op): Adjust.
2437         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
2438
2439 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
2440
2441         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
2442         (struct dwarf_expr_context) <n_pieces>: Remove.
2443         <pieces>: Change type to std::vector.
2444         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
2445         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
2446         pieces.
2447         (dwarf_expr_context::add_piece): Adjust.
2448         * dwarf2loc.c (struct piece_closure): Initialize fields.
2449         <n_pieces>: Remove.
2450         <pieces>: Change type to std::vector.
2451         (allocate_piece_closure): Adjust, change parameter to
2452         std::vector rvalue and std::move it to piece_closure.
2453         (rw_pieced_value): Adjust.
2454         (check_pieced_synthetic_pointer): Adjust.
2455         (indirect_synthetic_pointer): Adjust.
2456         (coerce_pieced_ref): Adjust.
2457         (free_pieced_value_closure):  Adjust.  Use delete to free
2458         piece_closure.
2459         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
2460         to allocate_piece_closure.
2461         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
2462
2463 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2464
2465         * probe.h (probe_ops_cp): Remove typedef.
2466         (DEF_VEC_P (probe_ops_cp)): Remove.
2467         (all_probe_ops): Change type to std::vector.
2468         * probe.c (info_probes_for_ops): Adjust to vector change.
2469         (probe_linespec_to_ops): Likewise.
2470         (all_probe_ops): Change type to std::vector.
2471         (_initialize_probe): Adjust to vector change.
2472         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
2473         * elfread.c (elf_get_probes): Likewise.
2474         * stap-probe.c (_initialize_stap_probe): Likewise.
2475
2476 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2477
2478         * probe.h (struct bound_probe): Define constructors.
2479         * probe.c (bound_probe_s): Remove typedef.
2480         (DEF_VEC_O (bound_probe_s)): Remove VEC.
2481         (collect_probes): Change return type to std::vector, remove
2482         cleanup.
2483         (compare_probes): Return bool, change parameter type.  Change
2484         semantic to "less than".
2485         (gen_ui_out_table_header_info): Change parameter to std::vector
2486         and update.
2487         (exists_probe_with_pops): Likewise.
2488         (info_probes_for_ops): Update to std::vector change.
2489         (enable_probes_command): Likewise.
2490         (disable_probes_command): Likewise.
2491
2492 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2493
2494         * probe.h (struct probe_ops) <get_probes>: Change parameter from
2495         vec to std::vector.
2496         * probe.c (parse_probes_in_pspace): Update.
2497         (find_probes_in_objfile): Update.
2498         (find_probe_by_pc): Update.
2499         (collect_probes): Update.
2500         (probe_any_get_probes): Update.
2501         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
2502         return type to reference to std::vector.
2503         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
2504         std::vector and update.
2505         (dtrace_process_dof): Likewise.
2506         (dtrace_get_probes): Likewise.
2507         * elfread.c (elf_get_probes): Change return type to std::vector,
2508         store an std::vector in bfd_data.
2509         (probe_key_free): Update to std::vector.
2510         * stap-probe.c (handle_stap_probe): Change parameter to
2511         std::vector and update.
2512         (stap_get_probes): Likewise.
2513         * symfile-debug.c (debug_sym_get_probes): Change return type to
2514         std::vector and update.
2515
2516 2017-09-11  Tom Tromey  <tom@tromey.com>
2517
2518         * breakpoint.c (program_breakpoint_here_p): Update.
2519         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
2520         from make_show_memory_breakpoints_cleanup.  Return a
2521         scoped_restore_tmpl<int>.
2522         (restore_show_memory_breakpoints): Remove.
2523         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
2524         * mem-break.c (memory_validate_breakpoint): Update.
2525         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
2526         (ia64_memory_remove_breakpoint): Update.
2527         (ia64_breakpoint_from_pc): Update.
2528         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
2529         from make_show_memory_breakpoints_cleanup.
2530
2531 2017-09-11  Tom Tromey  <tom@tromey.com>
2532
2533         * d-namespace.c (d_lookup_symbol): Use std::string.
2534         (find_symbol_in_baseclass): Likewise.
2535
2536 2017-09-11  Tom Tromey  <tom@tromey.com>
2537
2538         * ctf.c (ctf_start): Use std::string.
2539
2540 2017-09-11  Tom Tromey  <tom@tromey.com>
2541
2542         * ada-lang.c (is_known_support_routine): Update.
2543         (ada_unhandled_exception_name_addr_from_raise): Update.
2544         * guile/scm-frame.c (gdbscm_frame_name): Update.
2545         * python/py-frame.c (frapy_name): Update.
2546         (frapy_function): Update.
2547         * stack.h (find_frame_funname): Update.
2548         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
2549         (print_frame): Update.
2550
2551 2017-09-11  Tom Tromey  <tom@tromey.com>
2552
2553         * findcmd.c (put_bits): Take a gdb::byte_vector.
2554         (parse_find_args): Return gdb::byte_vector.  "args" now const.
2555         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
2556         cleanups.
2557         (find_command): Update.
2558
2559 2017-09-11  Tom Tromey  <tom@tromey.com>
2560
2561         * cli/cli-script.c (class scoped_restore_hook_in): New.
2562         (clear_hook_in_cleanup): Remove.
2563         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
2564         scoped_restore_hook_in.
2565
2566 2017-09-11  Tom Tromey  <tom@tromey.com>
2567
2568         * cli/cli-script.c (restore_interp): Remove.
2569         (read_command_lines): Use scoped_restore_interp.
2570         * interps.c (scoped_restore_interp::set_temp): Rename from
2571         interp_set_temp.
2572         * interps.h (class scoped_restore_interp): New.
2573         (interp_set_temp): Remove.
2574
2575 2017-09-11  Tom Tromey  <tom@tromey.com>
2576
2577         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
2578         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
2579         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
2580         scoped_restore.
2581         (mi_cmd_break_insert_1): Update.
2582         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
2583         scoped_restore.
2584
2585 2017-09-11  Tom Tromey  <tom@tromey.com>
2586
2587         * demangle.c (demangle_command): Update.
2588         * breakpoint.c (disable_command): Update.
2589         (enable_command): Update.
2590         (find_location_by_number): Make "number" const.  Use
2591         get_number_trailer.
2592         * cli/cli-utils.c (extract_arg): Return std::string.
2593         * probe.c (parse_probe_linespec): Update.  Change types.
2594         (collect_probes): Take string arguments.
2595         (parse_probe_linespec): Likewise.
2596         (info_probes_for_ops): Update.
2597         (enable_probes_command): Update.
2598         (disable_probes_command): Update.
2599         * break-catch-sig.c (catch_signal_split_args): Update.
2600         * mi/mi-parse.c (mi_parse): Update.
2601
2602 2017-09-11  Tom Tromey  <tom@tromey.com>
2603
2604         * language.h (language_enum): Make argument const.
2605         * language.c (language_enum): Make argument const.
2606
2607 2017-09-11  Tom Tromey  <tom@tromey.com>
2608
2609         * common/common-utils.h (skip_to_space): Remove macro, redeclare
2610         as function.
2611         (skip_to_space): Rename from skip_to_space_const.
2612         * common/common-utils.c (skip_to_space): New function.
2613         (skip_to_space): Rename from skip_to_space_const.
2614         * cli/cli-utils.h (get_number): Rename from get_number_const.
2615         (extract_arg): Rename from extract_arg_const.
2616         * cli/cli-utils.c (get_number): Rename from get_number_const.
2617         (extract_arg): Rename from extract_arg_const.
2618         (number_or_range_parser::get_number): Use ::get_number.
2619         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
2620         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
2621         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
2622         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
2623         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
2624         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
2625         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
2626         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
2627
2628 2017-09-11  Tom Tromey  <tom@tromey.com>
2629
2630         * python/python.c (do_start_initialization): Use
2631         py-event-types.def to initialize types.
2632         Define all object type structures.
2633         * python/python-internal.h: Don't declare event initialization
2634         functions.
2635         * python/py-threadevent.c (thread_event_object_type): Don't
2636         define.
2637         * python/py-stopevent.c (stop_event_object_type): Don't define.
2638         * python/py-signalevent.c (signal_event_object_type): Don't
2639         declare or define.
2640         * python/py-newobjfileevent.c (new_objfile_event_object_type)
2641         (clear_objfiles_event_object_type): Don't declare or define.
2642         * python/py-infevents.c (inferior_call_pre_event_object_type)
2643         (inferior_call_post_event_object_type)
2644         (register_changed_event_object_type)
2645         (memory_changed_event_object_type): Don't declare or define.
2646         * python/py-inferior.c (new_thread_event_object_type)
2647         (new_inferior_event_object_type)
2648         (inferior_deleted_event_object_type): Don't declare or define.
2649         * python/py-exitedevent.c (exited_event_object_type): Don't
2650         declare or define.
2651         * python/py-evts.c (gdbpy_initialize_py_events): Use
2652         py-all-events.def.
2653         * python/py-events.h (thread_event_object_type): Don't declare.
2654         (events_object): Use py-all-events.def.
2655         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
2656         py-event-types.def.
2657         * python/py-event-types.def: New file.
2658         * python/py-continueevent.c (create_continue_event_object): Don't
2659         declare or define.
2660         * python/py-bpevent.c (breakpoint_event_object_type): Don't
2661         declare or define.
2662         * python/py-all-events.def: New file.
2663
2664 2017-09-11  Tom Tromey  <tom@tromey.com>
2665
2666         * python/py-threadevent.c (create_thread_event_object): Return
2667         gdbpy_ref.
2668         * python/py-stopevent.h (create_stop_event_object)
2669         (create_breakpoint_event_object, create_signal_event_object):
2670         Update.
2671         * python/py-stopevent.c (create_stop_event_object): Return
2672         gdbpy_ref.
2673         (emit_stop_event): Update.
2674         * python/py-signalevent.c (create_signal_event_object): Return
2675         gdbpy_ref.
2676         * python/py-infevents.c (create_inferior_call_event_object):
2677         Update.
2678         * python/py-event.h (create_event_object)
2679         (create_thread_event_object): Update.
2680         * python/py-event.c (create_event_object): Return gdbpy_ref.
2681         * python/py-continueevent.c: Return gdbpy_ref.
2682         * python/py-bpevent.c (create_breakpoint_event_object): Return
2683         gdbpy_ref.
2684
2685 2017-09-11  Tom Tromey  <tom@tromey.com>
2686
2687         PR python/15622:
2688         * NEWS: Add entry.
2689         * python/python.c (do_start_initialization): Initialize new event
2690         types.
2691         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
2692         (gdbpy_initialize_inferior_deleted_event)
2693         (gdbpy_initialize_new_thread_event): Declare.
2694         * python/py-threadevent.c (create_thread_event_object): Add option
2695         "thread" parameter.
2696         * python/py-inferior.c (new_thread_event_object_type)
2697         (new_inferior_event_object_type)
2698         (inferior_deleted_event_object_type): Declare.
2699         (python_new_inferior, python_inferior_deleted): New functions.
2700         (add_thread_object): Emit new_thread event.
2701         (gdbpy_initialize_inferior): Attach new functions to corresponding
2702         observers.
2703         (new_thread, new_inferior, inferior_deleted): Define new event
2704         types.
2705         * python/py-evts.c (gdbpy_initialize_py_events): Add new
2706         registries.
2707         * python/py-events.h (events_object) <new_inferior,
2708         inferior_deleted, new_thread>: New fields.
2709         * python/py-event.h (create_thread_event_breakpoint): Add optional
2710         "thread" parameter.
2711
2712 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2713
2714         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
2715         check current_ui instead.
2716         (internal_vproblem): Likewise.
2717
2718 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2719
2720         * thread.c (print_thread_info_1): Remove unnecessary calls to
2721         uiout->is_mi_like_p.
2722
2723 2017-09-09  Tom Tromey  <tom@tromey.com>
2724
2725         * namespace.h (add_using_directive): Update.
2726         * namespace.c (add_using_directive): Change type of excludes to
2727         std::vector.
2728         * dwarf2read.c (read_import_statement): Use std::vector.
2729         (read_namespace): Update.
2730         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2731
2732 2017-09-09  Tom Tromey  <tom@tromey.com>
2733
2734         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
2735
2736 2017-09-09  Tom Tromey  <tom@tromey.com>
2737
2738         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
2739
2740 2017-09-09  Tom Tromey  <tom@tromey.com>
2741
2742         * stack.c (func_command): Use gdb::def_vector.
2743
2744 2017-09-09  Tom Tromey  <tom@tromey.com>
2745
2746         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
2747         ui_out_emit_list, ui_out_emit_tuple.
2748         (mi_cmd_var_update): Likewise.
2749
2750 2017-09-09  Tom Tromey  <tom@tromey.com>
2751
2752         * mi/mi-interp.c (mi_user_selected_context_changed): Use
2753         ui_out_redirect_pop.
2754         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
2755         ui_out_redirect_pop.
2756         * utils.c (do_ui_out_redirect_pop)
2757         (make_cleanup_ui_out_redirect_pop): Remove.
2758         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
2759         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
2760         * ui-out.h (ui_out_redirect_pop): New class.
2761
2762 2017-09-09  Tom Tromey  <tom@tromey.com>
2763
2764         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
2765         (list_available_thread_groups, mi_cmd_list_thread_groups)
2766         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
2767         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
2768         Likewise.
2769
2770 2017-09-09  Tom Tromey  <tom@tromey.com>
2771
2772         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
2773         ui_out_emit_tuple.
2774
2775 2017-09-09  Tom Tromey  <tom@tromey.com>
2776
2777         * target.c (flash_erase_command): Use ui_out_emit_tuple.
2778         * stack.c (print_frame): Use ui_out_emit_tuple.
2779         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
2780         (info_spu_mailbox_command, info_spu_dma_command)
2781         (info_spu_proxydma_command): Likewise.
2782         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
2783         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
2784         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
2785         ui_out_emit_tuple.
2786         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
2787
2788 2017-09-09  Tom Tromey  <tom@tromey.com>
2789
2790         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
2791         (class ui_out_emit_table): Update comment.
2792         * ui-out.c (do_cleanup_table_end)
2793         (make_cleanup_ui_out_table_begin_end): Remove.
2794         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
2795         (info_spu_dma_cmdlist): Likewise.
2796         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
2797         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
2798         ui_out_emit_table.
2799
2800 2017-09-09  Tom Tromey  <tom@tromey.com>
2801
2802         * thread.c (print_thread_info_1): Use ui_out_emit_table,
2803         ui_out_emit_list, gdb::optional.
2804
2805 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
2806
2807         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
2808         prototype.
2809         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
2810         prototype.
2811         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
2812         prototype.
2813         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
2814         * ada-exp.y: Remove _initialize_ada_exp prototype.
2815         * ada-lang.c: Remove _initialize_ada_language prototype.
2816         * ada-tasks.c: Remove _initialize_tasks prototype.
2817         * addrmap.c: Remove _initialize_addrmap prototype.
2818         * agent.c: Remove _initialize_agent prototype.
2819         * aix-thread.c: Remove _initialize_aix_thread prototype.
2820         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
2821         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
2822         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
2823         prototype.
2824         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
2825         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
2826         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
2827         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
2828         prototype.
2829         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
2830         prototype.
2831         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
2832         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
2833         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
2834         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
2835         prototype.
2836         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
2837         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
2838         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
2839         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
2840         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2841         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
2842         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
2843         prototype.
2844         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
2845         prototype.
2846         * annotate.c: Remove _initialize_annotate prototype.
2847         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
2848         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
2849         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
2850         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
2851         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
2852         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
2853         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
2854         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
2855         prototype.
2856         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
2857         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
2858         * auto-load.c: Remove _initialize_auto_load prototype.
2859         * auxv.c: Remove _initialize_auxv prototype.
2860         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
2861         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
2862         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
2863         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
2864         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
2865         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
2866         prototype.
2867         * break-catch-throw.c: Remove _initialize_break_catch_throw
2868         prototype.
2869         * breakpoint.c: Remove _initialize_breakpoint prototype.
2870         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
2871         * btrace.c: Remove _initialize_btrace prototype.
2872         * charset.c: Remove _initialize_charset prototype.
2873         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
2874         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
2875         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
2876         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
2877         * cli/cli-script.c: Remove _initialize_cli_script prototype.
2878         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
2879         * coffread.c: Remove _initialize_coffread prototype.
2880         * compile/compile.c: Remove _initialize_compile prototype.
2881         * complaints.c: Remove _initialize_complaints prototype.
2882         * completer.c: Remove _initialize_completer prototype.
2883         * copying.awk: Remove _initialize_copying prototype.
2884         * copying.c: Regenerate.
2885         * core-regset.c: Remove _initialize_core_regset prototype.
2886         * corefile.c: Remove _initialize_core prototype.
2887         * corelow.c: Remove _initialize_corelow prototype.
2888         * cp-abi.c: Remove _initialize_cp_abi prototype.
2889         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
2890         * cp-support.c: Remove _initialize_cp_support prototype.
2891         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
2892         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
2893         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
2894         * ctf.c: Remove _initialize_ctf prototype.
2895         * d-lang.c: Remove _initialize_d_language prototype.
2896         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
2897         prototype.
2898         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
2899         * dbxread.c: Remove _initialize_dbxread prototype.
2900         * dcache.c: Remove _initialize_dcache prototype.
2901         * demangle.c: Remove _initialize_demangler prototype.
2902         * disasm-selftests.c: Remove _initialize_disasm_selftests
2903         prototype.
2904         * disasm.c: Remove _initialize_disasm prototype.
2905         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
2906         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
2907         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
2908         prototype.
2909         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
2910         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
2911         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
2912         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
2913         * elfread.c: Remove _initialize_elfread prototype.
2914         * exec.c: Remove _initialize_exec prototype.
2915         * extension.c: Remove _initialize_extension prototype.
2916         * f-lang.c: Remove _initialize_f_language prototype.
2917         * f-valprint.c: Remove _initialize_f_valprint prototype.
2918         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
2919         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
2920         * filesystem.c: Remove _initialize_filesystem prototype.
2921         * findcmd.c: Remove _initialize_mem_search prototype.
2922         * fork-child.c: Remove _initialize_fork_child prototype.
2923         * frame-base.c: Remove _initialize_frame_base prototype.
2924         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
2925         * frame.c: Remove _initialize_frame prototype.
2926         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
2927         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
2928         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
2929         * gcore.c: Remove _initialize_gcore prototype.
2930         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
2931         * gdbarch.c: Regenerate.
2932         * gdbarch.sh: Remove _initialize_gdbarch prototype.
2933         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
2934         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
2935         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
2936         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
2937         * go-lang.c: Remove _initialize_go_language prototype.
2938         * go32-nat.c: Remove _initialize_go32_nat prototype.
2939         * guile/guile.c: Remove _initialize_guile prototype.
2940         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
2941         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
2942         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
2943         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
2944         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
2945         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
2946         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
2947         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
2948         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
2949         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
2950         prototype.
2951         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
2952         prototype.
2953         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
2954         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
2955         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
2956         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
2957         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
2958         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
2959         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
2960         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
2961         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
2962         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
2963         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
2964         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
2965         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
2966         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
2967         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
2968         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
2969         prototype.
2970         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
2971         prototype.
2972         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
2973         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
2974         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
2975         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
2976         * infcall.c: Remove _initialize_infcall prototype.
2977         * infcmd.c: Remove _initialize_infcmd prototype.
2978         * inferior.c: Remove _initialize_inferiors prototype.
2979         * inflow.c: Remove _initialize_inflow prototype.
2980         * infrun.c: Remove _initialize_infrun prototype.
2981         * interps.c: Remove _initialize_interpreter prototype.
2982         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
2983         * jit.c: Remove _initialize_jit prototype.
2984         * language.c: Remove _initialize_language prototype.
2985         * linux-fork.c: Remove _initialize_linux_fork prototype.
2986         * linux-nat.c: Remove _initialize_linux_nat prototype.
2987         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
2988         * linux-thread-db.c: Remove _initialize_thread_db prototype.
2989         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
2990         * m2-lang.c: Remove _initialize_m2_language prototype.
2991         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
2992         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
2993         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
2994         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
2995         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
2996         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
2997         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
2998         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
2999         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3000         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3001         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3002         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3003         * machoread.c: Remove _initialize_machoread prototype.
3004         * macrocmd.c: Remove _initialize_macrocmd prototype.
3005         * macroscope.c: Remove _initialize_macroscope prototype.
3006         * maint.c: Remove _initialize_maint_cmds prototype.
3007         * mdebugread.c: Remove _initialize_mdebugread prototype.
3008         * memattr.c: Remove _initialize_mem prototype.
3009         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3010         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3011         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3012         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3013         * mi/mi-main.c: Remove _initialize_mi_main prototype.
3014         * microblaze-linux-tdep.c: Remove
3015         _initialize_microblaze_linux_tdep prototype.
3016         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3017         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3018         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3019         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3020         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3021         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3022         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3023         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
3024         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
3025         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
3026         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
3027         prototype.
3028         * mipsread.c: Remove _initialize_mipsread prototype.
3029         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
3030         prototype.
3031         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
3032         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
3033         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
3034         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
3035         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
3036         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
3037         prototype.
3038         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
3039         * nto-procfs.c: Remove _initialize_procfs prototype.
3040         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
3041         * objc-lang.c: Remove _initialize_objc_language prototype.
3042         * objfiles.c: Remove _initialize_objfiles prototype.
3043         * observer.c: Remove observer_test_first_notification_function,
3044         observer_test_second_notification_function,
3045         observer_test_third_notification_function, and
3046         _initialize_observer prototypes.
3047         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
3048         * osabi.c: Remove _initialize_gdb_osabi prototype.
3049         * osdata.c: Remove _initialize_osdata prototype.
3050         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
3051         * parse.c: Remove _initialize_parse prototype.
3052         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
3053         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
3054         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
3055         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
3056         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
3057         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
3058         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
3059         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
3060         * printcmd.c: Remove _initialize_printcmd prototype.
3061         * probe.c: Remove _initialize_probe prototype.
3062         * proc-api.c: Remove _initialize_proc_api prototype.
3063         * proc-events.c: Remove _initialize_proc_events prototype.
3064         * proc-service.c: Remove _initialize_proc_service prototype.
3065         * procfs.c: Remove _initialize_procfs prototype.
3066         * psymtab.c: Remove _initialize_psymtab prototype.
3067         * python/python.c: Remove _initialize_python prototype.
3068         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
3069         * record-btrace.c: Remove _initialize_record_btrace prototype.
3070         * record-full.c: Remove _initialize_record_full prototype.
3071         * record.c: Remove _initialize_record prototype.
3072         * regcache.c: Remove _initialize_regcache prototype.
3073         * reggroups.c: Remove _initialize_reggroup prototype.
3074         * remote-notif.c: Remove _initialize_notif prototype.
3075         * remote-sim.c: Remove _initialize_remote_sim prototype.
3076         * remote.c: Remove _initialize_remote prototype.
3077         * reverse.c: Remove _initialize_reverse prototype.
3078         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
3079         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
3080         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
3081         prototype.
3082         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
3083         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
3084         * rust-exp.y: Remove _initialize_rust_exp prototype.
3085         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
3086         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
3087         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
3088         * score-tdep.c: Remove _initialize_score_tdep prototype.
3089         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
3090         prototype.
3091         * ser-go32.c: Remove _initialize_ser_dos prototype.
3092         * ser-mingw.c: Remove _initialize_ser_windows prototype.
3093         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
3094         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
3095         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
3096         * serial.c: Remove _initialize_serial prototype.
3097         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
3098         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
3099         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
3100         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
3101         * skip.c: Remove _initialize_step_skip prototype.
3102         * sol-thread.c: Remove _initialize_sol_thread prototype.
3103         * solib-aix.c: Remove _initialize_solib_aix prototype.
3104         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
3105         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
3106         * solib-frv.c: Remove _initialize_frv_solib prototype.
3107         * solib-spu.c: Remove _initialize_spu_solib prototype.
3108         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
3109         * solib-target.c: Remove _initialize_solib_target prototype.
3110         * solib.c: Remove _initialize_solib prototype.
3111         * source.c: Remove _initialize_source prototype.
3112         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
3113         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
3114         prototype.
3115         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
3116         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
3117         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
3118         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
3119         prototype.
3120         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
3121         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
3122         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
3123         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
3124         prototype.
3125         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
3126         prototype.
3127         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
3128         prototype.
3129         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
3130         prototype.
3131         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
3132         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
3133         prototype.
3134         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
3135         prototype.
3136         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
3137         prototype.
3138         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
3139         prototype.
3140         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
3141         prototype.
3142         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
3143         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
3144         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
3145         * stabsread.c: Remove _initialize_stabsread prototype.
3146         * stack.c: Remove _initialize_stack prototype.
3147         * stap-probe.c: Remove _initialize_stap_probe prototype.
3148         * std-regs.c: Remove _initialize_frame_reg prototype.
3149         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
3150         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
3151         * symfile.c: Remove _initialize_symfile prototype.
3152         * symmisc.c: Remove _initialize_symmisc prototype.
3153         * symtab.c: Remove _initialize_symtab prototype.
3154         * target-dcache.c: Remove _initialize_target_dcache prototype.
3155         * target-descriptions.c: Remove _initialize_target_descriptions
3156         prototype.
3157         * thread.c: Remove _initialize_thread prototype.
3158         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
3159         prototype.
3160         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
3161         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
3162         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
3163         prototype.
3164         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
3165         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
3166         * tracefile.c: Remove _initialize_tracefile prototype.
3167         * tracepoint.c: Remove _initialize_tracepoint prototype.
3168         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
3169         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
3170         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
3171         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
3172         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
3173         * tui/tui-win.c: Remove _initialize_tui_win prototype.
3174         * tui/tui.c: Remove _initialize_tui prototype.
3175         * typeprint.c: Remove _initialize_typeprint prototype.
3176         * user-regs.c: Remove _initialize_user_regs prototype.
3177         * utils.c: Remove _initialize_utils prototype.
3178         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
3179         * valarith.c: Remove _initialize_valarith prototype.
3180         * valops.c: Remove _initialize_valops prototype.
3181         * valprint.c: Remove _initialize_valprint prototype.
3182         * value.c: Remove _initialize_values prototype.
3183         * varobj.c: Remove _initialize_varobj prototype.
3184         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
3185         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
3186         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
3187         * windows-nat.c: Remove _initialize_windows_nat,
3188         _initialize_check_for_gdb_ini, and _initialize_loadable
3189         prototypes.
3190         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
3191         * xcoffread.c: Remove _initialize_xcoffread prototype.
3192         * xml-support.c: Remove _initialize_xml_support prototype.
3193         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
3194         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
3195         prototype.
3196         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
3197         prototype.
3198         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
3199
3200 2017-09-08  Keith Seitz  <keiths@redhat.com>
3201
3202         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
3203         field.
3204
3205 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
3206
3207         * f-valprint.c (f_val_print): Remove check for one byte
3208         sized integers. Remove printing of character type.
3209
3210 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
3211             Christoph Weinmann  <christoph.t.weinmann@intel.com>
3212             Bernhard Heckel  <bernhard.heckel@intel.com>
3213
3214         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
3215         to maintain proper indentation when printing pointers/refs.
3216
3217 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3218
3219         GDB 8.0.1 released.
3220
3221 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
3222
3223         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
3224
3225 2017-09-05  Tom Tromey  <tom@tromey.com>
3226
3227         * parse.c (funcall_chain): Now a std::vector.
3228         (start_arglist, end_arglist): Simplify.
3229         (free_funcalls): Remove.
3230         (parse_exp_in_context_1): Remove cleanup.
3231
3232 2017-09-05  Tom Tromey  <tom@tromey.com>
3233
3234         * go-exp.y (go_parse): Don't create a cleanup.
3235
3236 2017-09-05  Tom Tromey  <tom@tromey.com>
3237
3238         * d-exp.y (PrimaryExpression): Use std::string.
3239         (d_parse): Don't create a cleanup.
3240
3241 2017-09-05  Tom Tromey  <tom@tromey.com>
3242
3243         * utils.c (do_clear_parser_state): Remove.
3244         (make_cleanup_clear_parser_state): Remove.
3245         * p-exp.y (pascal_parse): Use scoped_restore.
3246         * m2-exp.y (m2_parse): Use scoped_restore.
3247         * f-exp.y (f_parse): Use scoped_restore.
3248         * d-exp.y (d_parse): Use scoped_restore.
3249         * c-exp.y (c_parse): Use scoped_restore.
3250         * ada-exp.y (ada_parse): Use scoped_restore.
3251         * utils.h (make_cleanup_clear_parser_state): Remove.
3252
3253 2017-09-06  Keith Seitz  <keiths@redhat.com>
3254
3255         * dwarf2read.c (dw2_linkage_name_attr): New function.
3256         (dw2_linkage_name): New function.
3257         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
3258         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
3259         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
3260
3261 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3262
3263         * config/djgpp/djconfig.sh: Correct shell portability issue.
3264
3265 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3266
3267         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
3268
3269 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3270
3271         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
3272         * NEWS: Mention new FreeBSD/mips native configuration.
3273         * configure.host: Add aarch64*-*-freebsd*.
3274         * configure.nat: Likewise.
3275         * aarch64-fbsd-nat.c: New file.
3276
3277 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
3278
3279         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
3280         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
3281         * NEWS: Mention new FreeBSD/aarch64 target.
3282         * configure.tgt: Add aarch64*-*-freebsd*.
3283         * aarch64-fbsd-tdep.c: New file.
3284         * aarch64-fbsd-tdep.h: New file.
3285
3286 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
3287
3288         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
3289
3290 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
3291
3292         * parse.c (find_minsym_type_and_address): Don't relocate addresses
3293         of TLS symbols.
3294
3295 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3296
3297         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
3298         call.
3299
3300 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3301
3302         * infrun.c (follow_exec): Call add_thread after
3303         target_find_description.
3304
3305 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3306
3307         * infrun.c (handle_inferior_event_1): When exec'ing, read
3308         stop_pc after follow_exec.
3309
3310 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3311
3312         * remote.c (process_g_packet): Update error message.
3313
3314 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3315
3316         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
3317         targets.
3318
3319 2017-09-05  Pedro Alves  <palves@redhat.com>
3320
3321         * eval.c (eval_call, evaluate_funcall): New functions, factored
3322         out from ...
3323         (evaluate_subexp_standard): ... this.
3324
3325 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3326
3327         * amd64-tdep.c (amd64_target_description): Create target
3328         descriptions.
3329         (_initialize_amd64_tdep): Don't call functions
3330         initialize_tdesc_amd64_*.  Add self tests.
3331         * arch/amd64.c (amd64_create_target_description): Add parameter
3332         is_linux.  Call set_tdesc_osabi if is_linux is true.
3333         * arch/amd64.h (amd64_create_target_description): Update the
3334         declaration.
3335         * arch/i386.c (i386_create_target_description): Add parameter
3336         is_linux.  Call set_tdesc_osabi if is_linux is true.
3337         * arch/i386.h (i386_create_target_description): Update
3338         declaration.
3339         * configure.tgt: Add i386.o to gdb_target_obs.
3340         * features/Makefile (XMLTOC): Remove i386/*.xml.
3341         * features/i386/amd64-avx-avx512.c: Remove.
3342         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
3343         * features/i386/amd64-avx-mpx.c: Remove.
3344         * features/i386/amd64-avx.c: Remove.
3345         * features/i386/amd64-mpx.c: Remove.
3346         * features/i386/amd64.c: Remove.
3347         * features/i386/i386-avx-avx512.c: Remove.
3348         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
3349         * features/i386/i386-avx-mpx.c: Remove.
3350         * features/i386/i386-avx.c: Remove.
3351         * features/i386/i386-mmx.c: Remove.
3352         * features/i386/i386-mpx.c: Remove.
3353         * features/i386/i386.c: Remove.
3354         * i386-tdep.c: Don't include features/i386/i386*.c., include
3355         target-descriptions.h and arch/i386.h.
3356         (i386_target_description): Create target descriptions.
3357         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
3358         functions.  Do self tests.
3359
3360 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3361
3362         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
3363         * features/i386/amd64-avx-avx512-linux.c: Removed.
3364         * features/i386/amd64-avx-linux.c: Removed.
3365         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
3366         * features/i386/amd64-avx-mpx-linux.c: Removed.
3367         * features/i386/amd64-linux.c: Removed.
3368         * features/i386/amd64-mpx-linux.c: Removed.
3369         * features/i386/x32-avx-avx512-linux.c: Removed.
3370         * features/i386/x32-avx-linux.c: Removed.
3371         * features/i386/x32-linux.c: Removed.
3372
3373 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3374
3375         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
3376         features/i386/*.c.
3377         (amd64_linux_read_description): Call
3378         amd64_create_target_description.
3379         * arch/amd64.c: New file.
3380         * arch/amd64.h: New file.
3381         * configure.tgt (x86_64-*-linux*): Append amd64.o.
3382         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
3383
3384 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3385
3386         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
3387         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
3388         (amd64_linux_read_description): Create target descriptions.
3389         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
3390         functions.  Add unit tests.
3391         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
3392         x32-core.xml.
3393         * features/i386/64bit-avx.c: Generated.
3394         * features/i386/64bit-avx512.c: Generated.
3395         * features/i386/64bit-core.c: Generated.
3396         * features/i386/64bit-linux.c: Generated.
3397         * features/i386/64bit-mpx.c: Generated.
3398         * features/i386/64bit-pkeys.c: Generated.
3399         * features/i386/64bit-segments.c: Generated.
3400         * features/i386/64bit-sse.c: Generated.
3401         * features/i386/x32-core.c: Generated.
3402         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
3403         c files for amd64-linux and x32-linux.
3404
3405 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3406
3407         * amd64-linux-tdep.c (amd64_linux_read_description): New
3408         function.
3409         (amd64_linux_core_read_description): Call
3410         amd64_linux_read_description.
3411         (amd64_linux_init_abi): Likewise.
3412         (amd64_x32_linux_init_abi): Likewise.
3413         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
3414         * x86-linux-nat.c (x86_linux_read_description): Call
3415         amd64_linux_read_description.
3416
3417 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3418
3419         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
3420         comments.
3421
3422 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3423
3424         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
3425         * features/i386/i386-avx-avx512-linux.c: Remove.
3426         * features/i386/i386-avx-linux.c: Remove.
3427         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
3428         * features/i386/i386-avx-mpx-linux.c: Remove.
3429         * features/i386/i386-linux.c: Remove.
3430         * features/i386/i386-mmx-linux.c: Remove.
3431         * features/i386/i386-mpx-linux.c: Remove.
3432
3433 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3434
3435         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
3436         (SFILES): Add arch/i386.c.
3437         (HFILES_NO_SRCDIR): Add arch/i386.h.
3438         * arch/i386.c: New file.
3439         * arch/i386.h: New file.
3440         * arch/tdesc.h (allocate_target_description): Declare.
3441         (set_tdesc_architecture): Declare.
3442         (set_tdesc_osabi): Declare.
3443         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
3444         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
3445         include arch/i386.h.
3446         (i386_linux_read_description): Remove code and call
3447         i386_create_target_description.
3448         (set_tdesc_architecture): New function.
3449         (set_tdesc_osabi): New function.
3450         * target-descriptions.h (allocate_target_description): Remove.
3451
3452 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3453
3454         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
3455         * target-descriptions.c (tdesc_create_feature): Likewise, and
3456         adjust code.
3457         * features/i386/32bit-avx.c: Re-generated.
3458         * features/i386/32bit-avx512.c: Re-generated.
3459         * features/i386/32bit-core.c: Re-generated.
3460         * features/i386/32bit-linux.c: Re-generated.
3461         * features/i386/32bit-mpx.c: Re-generated.
3462         * features/i386/32bit-pkeys.c: Re-generated.
3463         * features/i386/32bit-sse.c: Re-generated.
3464
3465 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3466
3467         * regformats/regdef.h (struct reg): Override operator == and !=.
3468
3469 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3470
3471         * arch/tdesc.h: New file.
3472         * regformats/regdat.sh: Generate code using tdesc_create_reg.
3473         * target-descriptions.c: Update comments.
3474         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
3475         declarations.
3476         * features/i386/32bit-avx.c: Re-generated.
3477         * features/i386/32bit-avx512.c: Re-generated.
3478         * features/i386/32bit-core.c: Re-generated.
3479         * features/i386/32bit-linux.c: Re-generated.
3480         * features/i386/32bit-mpx.c: Re-generated.
3481         * features/i386/32bit-pkeys.c: Re-generated.
3482         * features/i386/32bit-sse.c: Re-generated.
3483
3484 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3485
3486         * regformats/regdat.sh: Update generated code.
3487
3488 2017-09-05  Yao Qi  <yao.qi@linaro.org>
3489
3490         * regformats/regdat.sh: Adjust code order.
3491
3492 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
3493
3494         * expprint.c (dump_subexp_body_standard): Use constant format
3495         string in fprintf_filtered call.
3496
3497 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3498
3499         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
3500         NetBSD/i386.
3501         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
3502
3503 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3504
3505         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
3506
3507 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3508
3509         * bsd-kvm.o: Define _KMEMUSER.
3510         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
3511         * configure: Regenerate.
3512
3513 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3514
3515         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
3516         * i386-fbsd-nat.c: Likewise.
3517
3518 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3519
3520         * unittests/array-view-selftests.c: Add include of <array>.
3521
3522 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
3523
3524         * spu-tdep.c (flush_ea_cache): Add missing argument to
3525         call_function_by_hand.
3526
3527 2017-09-04  Pedro Alves  <palves@redhat.com>
3528
3529         * NEWS (Safer support for debugging with no debug info): New.
3530
3531 2017-09-04  Pedro Alves  <palves@redhat.com>
3532
3533         * c-exp.y (function_method, function_method_void): Add current
3534         instance flags to TYPE_INSTANCE.
3535         * dwarf2read.c (check_modifier): New.
3536         (compute_delayed_physnames): Assert that only C++ adds delayed
3537         physnames.  Mark fn_fields as const/volatile depending on
3538         physname.
3539         * eval.c (make_params): New type_instance_flags parameter.  Use
3540         it as the new type's instance flags.
3541         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
3542         flags element and pass it to make_params.
3543         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
3544         instance flags element.
3545         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
3546         * gdbtypes.h: Include "enum-flags.h".
3547         (type_instance_flags): New enum-flags type.
3548         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
3549         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
3550         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
3551         (follow_type_instance_flags): New function.
3552         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
3553         * parser-defs.h (follow_type_instance_flags): Declare.
3554         * valops.c (value_struct_elt_for_reference): const/volatile must
3555         match too.
3556
3557 2017-09-04  Pedro Alves  <palves@redhat.com>
3558
3559         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
3560         function/method scopes; lookup the nested name as a function local
3561         static variable.
3562
3563 2017-09-04  Pedro Alves  <palves@redhat.com>
3564
3565         (%type <voidval>): Add function_method.
3566         * c-exp.y (exp): New production for calls with no arguments.
3567         (function_method, function_method_void_or_typelist): New
3568         productions.
3569         (exp): New production for "method()::static_var".
3570         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
3571         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3572         Handle OP_FUNC_STATIC_VAR.
3573         * parse.c (operator_length_standard):
3574         Handle OP_FUNC_STATIC_VAR.
3575
3576 2017-09-04  Pedro Alves  <palves@redhat.com>
3577
3578         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
3579         handling.
3580         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3581         Ditto.
3582         * parse.c (operator_length_standard, operator_check_standard):
3583         Ditto.
3584         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
3585
3586 2017-09-04  Pedro Alves  <palves@redhat.com>
3587
3588         * ax-gdb.c: Include "typeprint.h".
3589         (gen_expr_for_cast): New function.
3590         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
3591         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
3592         type is unknown.
3593         * dwarf2read.c (new_symbol_full): Fallback to int instead of
3594         nodebug_data_symbol.
3595         * eval.c: Include "typeprint.h".
3596         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
3597         Error out if symbol has unknown type.
3598         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
3599         evaluate_subexp_for_cast.
3600         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
3601         OP_VAR_MSYM_VALUE.
3602         (evaluate_subexp_for_cast): New function.
3603         * gdbtypes.c (init_nodebug_var_type): New function.
3604         (objfile_type): Use it to initialize types of variables with no
3605         debug info.
3606         * typeprint.c (error_unknown_type): New.
3607         * typeprint.h (error_unknown_type): New declaration.
3608         * compile/compile-c-types.c (convert_type_basic): Handle
3609         TYPE_CODE_ERROR; warn and fallback to int for variables with
3610         unknown type.
3611
3612 2017-09-04  Pedro Alves  <palves@redhat.com>
3613
3614         * eval.c (evaluate_var_value): New function, factored out from ...
3615         (evaluate_subexp_standard): ... here.
3616
3617 2017-09-04  Pedro Alves  <palves@redhat.com>
3618
3619         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
3620         Remove useless assignments to 'op'.
3621
3622 2017-09-04  Pedro Alves  <palves@redhat.com>
3623
3624         * eval.c (eval_skip_value): New function.
3625         (evaluate_subexp_standard): Use it.
3626
3627 2017-09-04  Pedro Alves  <palves@redhat.com>
3628
3629         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
3630         function name from symbol/minsym and pass it to
3631         error_call_unknown_return_type.
3632
3633 2017-09-04  Pedro Alves  <palves@redhat.com>
3634
3635         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
3636         * ax-gdb.c (gen_msym_var_ref): New function.
3637         (gen_expr): Handle OP_VAR_MSYM_VALUE.
3638         * eval.c (evaluate_var_msym_value): New function.
3639         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
3640         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
3641         to call_function_by_hand.
3642         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
3643         Handle OP_VAR_MSYM_VALUE.
3644         (union exp_element) <msymbol>: New field.
3645         * minsyms.h (struct type): Forward declare.
3646         (find_minsym_type_and_address): Declare.
3647         * parse.c (write_exp_elt_msym): New function.
3648         (write_exp_msymbol): Delete, refactored as ...
3649         (find_minsym_type_and_address): ... this new function.
3650         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
3651         (operator_length_standard, operator_check_standard): Handle
3652         OP_VAR_MSYM_VALUE.
3653         * std-operator.def (OP_VAR_MSYM_VALUE): New.
3654
3655 2017-09-04  Pedro Alves  <palves@redhat.com>
3656
3657         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
3658         TYPE_GNU_IFUNC specially here.  Throw error if return type is
3659         unknown.
3660         * ada-typeprint.c (print_func_type): Handle functions with unknown
3661         return type.
3662         * c-typeprint.c (c_type_print_base): Handle functions and methods
3663         with unknown return type.
3664         * compile/compile-c-symbols.c (convert_symbol_bmsym)
3665         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
3666         * compile/compile-c-types.c: Include "objfiles.h".
3667         (convert_func): For functions with unknown return type, warn and
3668         default to int.
3669         * compile/compile-object-run.c (compile_object_run): Adjust call
3670         to call_function_by_hand_dummy.
3671         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
3672         call_function_by_hand.
3673         * eval.c (evaluate_subexp_standard): Adjust calls to
3674         call_function_by_hand.  Handle functions and methods with unknown
3675         return type.  Pass expect_type to call_function_by_hand.
3676         * f-typeprint.c (f_type_print_base): Handle functions with unknown
3677         return type.
3678         * gcore.c (call_target_sbrk): Adjust call to
3679         call_function_by_hand.
3680         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
3681         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
3682         an integer address type instead of nodebug.
3683         * guile/scm-value.c (gdbscm_value_call): Adjust call to
3684         call_function_by_hand.
3685         * infcall.c (error_call_unknown_return_type): New function.
3686         (call_function_by_hand): New "default_return_type" parameter.
3687         Pass it down.
3688         (call_function_by_hand_dummy): New "default_return_type"
3689         parameter.  Use it instead of defaulting to int.  If there's no
3690         default and the return type is unknown, throw an error.  If
3691         there's a default return type, and the called function has no
3692         debug info, then assume the function is prototyped.
3693         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
3694         New "default_return_type" parameter.
3695         (error_call_unknown_return_type): New declaration.
3696         * linux-fork.c (call_lseek): Cast return type of lseek.
3697         (inferior_call_waitpid, checkpoint_command): Adjust calls to
3698         call_function_by_hand.
3699         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
3700         calls to call_function_by_hand.
3701         * m2-typeprint.c (m2_procedure): Handle functions with unknown
3702         return type.
3703         * objc-lang.c (lookup_objc_class, lookup_child_selector)
3704         (value_nsstring, print_object_command): Adjust calls to
3705         call_function_by_hand.
3706         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
3707         functions with unknown return type.
3708         (pascal_type_print_func_varspec_suffix): New function.
3709         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
3710         TYPE_CODE_METHOD>: Use it.
3711         * python/py-value.c (valpy_call): Adjust call to
3712         call_function_by_hand.
3713         * rust-lang.c (rust_evaluate_funcall): Adjust call to
3714         call_function_by_hand.
3715         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
3716         call_function_by_hand.
3717         * valops.c (value_allocate_space_in_inferior): Adjust call to
3718         call_function_by_hand.
3719         * typeprint.c (type_print_unknown_return_type): New function.
3720         * typeprint.h (type_print_unknown_return_type): New declaration.
3721
3722 2017-09-04  Pedro Alves  <palves@redhat.com>
3723
3724         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
3725         types with more than one parameter as prototyped.
3726
3727 2017-09-04  Pedro Alves  <palves@redhat.com>
3728
3729         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
3730         (disassemble_command): Use gdb_disassembly_flags instead of bare
3731         int.
3732         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
3733         (dump_insns, do_mixed_source_and_assembly_deprecated)
3734         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
3735         Use gdb_disassembly_flags instead of bare int.
3736         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
3737         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
3738         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
3739         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
3740         (enum gdb_disassembly_flag): ... values of this new enumeration.
3741         (gdb_disassembly_flags): Define.
3742         (gdb_disassembly)
3743         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
3744         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
3745         gdb_disassembly_flags instead of bare int.
3746         * record-btrace.c (btrace_insn_history)
3747         (record_btrace_insn_history, record_btrace_insn_history_range)
3748         (record_btrace_insn_history_from): Use gdb_disassembly_flags
3749         instead of bare int.
3750         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
3751         Use gdb_disassembly_flags instead of bare int.
3752         * target-debug.h (target_debug_print_gdb_disassembly_flags):
3753         Define.
3754         * target-delegates.c: Regenerate.
3755         * target.c (target_insn_history, target_insn_history_from)
3756         (target_insn_history_range): Use gdb_disassembly_flags instead of
3757         bare int.
3758         * target.h: Include "disasm.h".
3759         (struct target_ops) <to_insn_history, to_insn_history_from,
3760         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
3761         int.
3762         (target_insn_history, target_insn_history_from)
3763         (target_insn_history_range): Use gdb_disassembly_flags instead of
3764         bare int.
3765
3766 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3767
3768         * cli/cli-script.c (build_command_line): For if/while commands,
3769         check whether args is empty.
3770
3771 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3772
3773         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
3774         (enum command_control_type): Likewise.
3775         (struct command_line): Likewise.
3776         (free_command_lines): Likewise.
3777         (struct command_lines_deleter): Likewise.
3778         (command_line_up): Likewise.
3779         (read_command_lines): Likewise.
3780         (read_command_lines_1): Likewise.
3781         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
3782         (enum command_control_type): Likewise.
3783         (struct command_line): Likewise.
3784         (free_command_lines): Likewise.
3785         (struct command_lines_deleter): Likewise.
3786         (command_line_up): Likewise.
3787         (read_command_lines): Likewise.
3788         (read_command_lines_1): Likewise.
3789         * breakpoint.h: Include cli/cli-script.h.
3790         * extension-priv.h: Likewise.
3791         * gdbcmd.h: Likewise.
3792
3793 2017-09-04  Pedro Alves  <palves@redhat.com>
3794
3795         * ada-lang.c (is_known_support_routine): Move sal declaration to
3796         where it is initialized.
3797         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
3798         (parse_breakpoint_sals, decode_static_tracepoint_spec)
3799         (clear_command, update_static_tracepoint): Remove init_sal
3800         references.  Move declarations closer to initializations.
3801         * cli/cli-cmds.c (list_command): Move sal declarations closer to
3802         initializations.
3803         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
3804         references.  Move sal declarations closer to initializations.
3805         * frame.c (find_frame_sal): Return a symtab_and_line via function
3806         return instead of output parameter.  Remove init_sal references.
3807         * frame.h (find_frame_sal): Return a symtab_and_line via function
3808         return instead of output parameter.
3809         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
3810         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
3811         instead of memset.
3812         (gdbscm_find_pc_line): Remove init_sal reference.
3813         * infcall.c (call_function_by_hand_dummy): Remove init_sal
3814         references.  Move declarations closer to initializations.
3815         * infcmd.c (set_step_frame): Update.  Move declarations closer to
3816         initializations.
3817         (finish_backward): Remove init_sal references.  Move declarations
3818         closer to initializations.
3819         * infrun.c (process_event_stop_test, handle_step_into_function)
3820         (insert_hp_step_resume_breakpoint_at_frame)
3821         (insert_step_resume_breakpoint_at_caller): Likewise.
3822         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
3823         (symbol_to_sal): Likewise.
3824         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
3825         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
3826         to its initialization.
3827         * reverse.c (save_bookmark_command): Use new/delete.  Remove
3828         init_sal references.  Move declarations closer to initializations.
3829         * source.c (get_current_source_symtab_and_line): Remove brace
3830         initialization.
3831         (set_current_source_symtab_and_line): Now takes the sal by const
3832         reference.  Remove brace initialization.
3833         (line_info): Remove init_sal reference.
3834         * source.h (set_current_source_symtab_and_line): Now takes a
3835         symtab_and_line via const reference.
3836         * stack.c (set_current_sal_from_frame): Adjust.
3837         (print_frame_info): Adjust.
3838         (get_last_displayed_sal): Return the sal via function return
3839         instead of via output parameter.  Simplify.
3840         (frame_info): Adjust.
3841         * stack.h (get_last_displayed_sal): Return the sal via function
3842         return instead of via output parameter.
3843         * symtab.c (init_sal): Delete.
3844         (find_pc_sect_line): Remove init_sal references.  Move
3845         declarations closer to initializations.
3846         (find_function_start_sal): Remove init_sal references.  Move
3847         declarations closer to initializations.
3848         * symtab.h (struct symtab_and_line): In-class initialize all
3849         fields.
3850         * tracepoint.c (set_traceframe_context)
3851         (print_one_static_tracepoint_marker): Remove init_sal references.
3852         Move declarations closer to initializations.
3853         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
3854         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
3855         declarations closer to initializations.
3856         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
3857         init_sal references.  Adjust.
3858
3859 2017-09-04  Pedro Alves  <palves@redhat.com>
3860
3861         * ax-gdb.c (agent_command_1): Use range-for.
3862         * break-catch-throw.c (re_set_exception_catchpoint): Update.
3863         * breakpoint.c: Include "common/array-view.h".
3864         (init_breakpoint_sal, create_breakpoint_sal): Change sals
3865         parameter from struct symtabs_and_lines to
3866         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
3867         (breakpoint_sals_to_pc): Change sals parameter from struct
3868         symtabs_and_lines to std::vector reference.
3869         (check_fast_tracepoint_sals): Change sals parameter from struct
3870         symtabs_and_lines to std::array_view.  Use range-for.
3871         (decode_static_tracepoint_spec): Return a std::vector instead of
3872         symtabs_and_lines.  Update.
3873         (create_breakpoint): Update.
3874         (break_range_command, until_break_command, clear_command): Update.
3875         (base_breakpoint_decode_location, bkpt_decode_location)
3876         (bkpt_probe_create_sals_from_location)
3877         (bkpt_probe_decode_location, tracepoint_decode_location)
3878         (tracepoint_probe_decode_location)
3879         (strace_marker_create_sals_from_location): Return a std::vector
3880         instead of symtabs_and_lines.
3881         (strace_marker_create_breakpoints_sal): Update.
3882         (strace_marker_decode_location): Return a std::vector instead of
3883         symtabs_and_lines.  Update.
3884         (update_breakpoint_locations): Change struct symtabs_and_lines
3885         parameters to gdb::array_view.  Adjust.
3886         (location_to_sals): Return a std::vector instead of
3887         symtabs_and_lines.  Update.
3888         (breakpoint_re_set_default): Use std::vector instead of struct
3889         symtabs_and_lines.
3890         (decode_location_default): Return a std::vector instead of
3891         symtabs_and_lines.  Update.
3892         * breakpoint.h: Include "common/array-view.h".
3893         (struct breakpoint_ops) <decode_location>: Now returns a
3894         std::vector instead of returning a symtabs_and_lines via output
3895         parameter.
3896         (update_breakpoint_locations): Change sals parameters to use
3897         gdb::array_view.
3898         * cli/cli-cmds.c (edit_command, list_command): Update to use
3899         std::vector and gdb::array_view.
3900         (ambiguous_line_spec): Adjust to use gdb::array_view and
3901         range-for.
3902         (compare_symtabs): Rename to ...
3903         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
3904         const reference and adjust.
3905         (filter_sals): Rewrite using std::vector and standard algorithms.
3906         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
3907         (jump_command): Update to use std::vector.
3908         * linespec.c (struct linespec_state) <canonical_names>: Update
3909         comment.
3910         (add_sal_to_sals_basic): Delete.
3911         (add_sal_to_sals, filter_results, convert_results_to_lsals)
3912         (decode_line_2, create_sals_line_offset)
3913         (convert_address_location_to_sals, convert_linespec_to_sals)
3914         (convert_explicit_location_to_sals, parse_linespec)
3915         (event_location_to_sals, decode_line_full, decode_line_1)
3916         (decode_line_with_current_source)
3917         (decode_line_with_last_displayed, decode_objc)
3918         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
3919         (linespec_result::~linespec_result): Adjust to use std::vector
3920         instead of symtabs_and_lines.
3921         * linespec.h (linespec_sals::sals): Now a std::vector.
3922         (struct linespec_result): Use std::vector, bool, and in-class
3923         initialization.
3924         (decode_line_1, decode_line_with_current_source)
3925         (decode_line_with_last_displayed): Return std::vector.
3926         * macrocmd.c (info_macros_command): Use std::vector.
3927         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
3928         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
3929         std::vector.
3930         * probe.h (parse_probes): Return a std::vector.
3931         * python/python.c (gdbpy_decode_line): Use std::vector and
3932         gdb::array_view.
3933         * source.c (select_source_symtab, line_info): Use std::vector.
3934         * stack.c (func_command): Use std::vector.
3935         * symtab.h (struct symtabs_and_lines): Delete.
3936         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
3937
3938 2017-09-04  Pedro Alves  <palves@redhat.com>
3939
3940         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3941         unittests/array-view-selftests.c.
3942         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
3943         * common/array-view.h: New file.
3944         * unittests/array-view-selftests.c: New file.
3945
3946 2017-09-04  Pedro Alves  <palves@redhat.com>
3947
3948         * cli/cli-cmds.c (edit_command): Pass message to
3949         ambiguous_line_spec.
3950         (list_command): Pass message to ambiguous_line_spec.  Say
3951         "first"/"last" instead of "start" and "end" to be consistent with
3952         the manual.
3953         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
3954         them to print formatted message.
3955
3956 2017-09-04  Pedro Alves  <palves@redhat.com>
3957
3958         * btrace.c (ftrace_add_pt): Pass btrace_insn to
3959         ftrace_update_insns by reference instead of pointer.
3960
3961 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3962
3963         * i386-go32-tdep.c: Include x86-xstate.h.
3964         (i386_go32_init_abi): Call i386_target_description.
3965         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
3966         if xcr0 is X86_XSTATE_X87_MASK.
3967         * i386-tdep.h (tdesc_i386): Remove the declaration.
3968         (tdesc_i386_mmx): Likewise.
3969
3970 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3971
3972         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
3973         X86_XSTATE_SSE_MASK instead of 0.
3974
3975 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3976
3977         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
3978         i386_target_description.
3979         * i386-fbsd-nat.c (i386fbsd_read_description): Call
3980         i386_target_description.
3981         * i386-tdep.c (i386_gdbarch_init): Likewise.
3982
3983 2017-09-04  Yao Qi  <yao.qi@linaro.org>
3984
3985         * amd64-darwin-tdep.c: Include "x86-xstate.h".
3986         (x86_darwin_init_abi_64): Call amd64_target_description.
3987         * amd64-dicos-tdep.c: Likewise.
3988         * amd64-fbsd-nat.c: Likewise.
3989         * amd64-fbsd-tdep.c: Likewise.
3990         * amd64-nbsd-tdep.c: Likewise.
3991         * amd64-obsd-tdep.c: Likewise.
3992         * amd64-sol2-tdep.c: Likewise.
3993         * amd64-windows-tdep.c: Likewise.
3994         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
3995
3996 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
3997
3998         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
3999         (btrace_function) <insn>: Change type to use std::vector.
4000         * btrace.c (ftrace_debug, ftrace_call_num_insn,
4001         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4002         ftrace_update_insns, ftrace_compute_global_level_offset,
4003         btrace_stitch_bts, btrace_clear, btrace_insn_get,
4004         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4005         change to std::vector.
4006         (ftrace_update_insns): Adjust to change to std::vector, change
4007         type of INSN parameter.
4008         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4009         * record-btrace.c (btrace_call_history_insn_range,
4010         btrace_compute_src_line_range,
4011         record_btrace_frame_prev_register): Adjust to change to
4012         std::vector.
4013         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4014         to change to std::vector.
4015
4016 2017-09-03  Tom Tromey  <tom@tromey.com>
4017
4018         * corefile.c (reopen_exec_file): Use std::string.
4019
4020 2017-09-03  Tom Tromey  <tom@tromey.com>
4021
4022         * compile/compile.c (compile_register_name_mangled): Return
4023         std::string.
4024         * compile/compile-loc2c.c (pushf_register_address): Update.
4025         (pushf_register): Update.
4026         * compile/compile-c-types.c (convert_array): Update.
4027         * compile/compile-c-symbols.c (generate_vla_size): Update.
4028         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
4029         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
4030         (convert_one_symbol): Update.
4031         (generate_c_for_for_one_variable): Update.
4032         * compile/compile-c-support.c (c_get_range_decl_name): Return a
4033         std::string.
4034         (generate_register_struct): Update.
4035         * compile/compile-internal.h (c_get_range_decl_name): Return a
4036         std::string.
4037         (compile_register_name_mangled): Return std::string.
4038
4039 2017-09-03  Tom Tromey  <tom@tromey.com>
4040
4041         * utils.c (perror_string): Return a std::string.
4042         (throw_perror_with_name, perror_warning_with_name): Update.
4043
4044 2017-09-03  Tom Tromey  <tom@tromey.com>
4045
4046         * demangle.c (demangle_command): Use std::string,
4047         unique_xmalloc_ptr.
4048
4049 2017-09-03  Tom Tromey  <tom@tromey.com>
4050
4051         * cli/cli-setshow.c (do_set_command): Use std::string.
4052
4053 2017-09-03  Tom Tromey  <tom@tromey.com>
4054
4055         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
4056
4057 2017-09-03  Tom Tromey  <tom@tromey.com>
4058
4059         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
4060
4061 2017-09-03  Tom Tromey  <tom@tromey.com>
4062
4063         * mi/mi-cmd-env.c (env_execute_cli_command): Use
4064         gdb::unique_xmalloc_ptr.
4065
4066 2017-09-03  Tom Tromey  <tom@tromey.com>
4067
4068         * thread.c (print_thread_info_1): Use string_printf.
4069         (thread_apply_command, thread_apply_all_command): Use
4070         std::string.
4071
4072 2017-09-03  Tom Tromey  <tom@tromey.com>
4073
4074         * valprint.c (val_print_string): Update.
4075         * gdbcore.h (memory_error_message): Return std::string.
4076         * corefile.c (memory_error_message): Return std::string.
4077         (memory_error): Update.
4078         * breakpoint.c (insert_bp_location): Update.
4079
4080 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
4081
4082         * target/waitstatus.h (target_waitstatus_to_string): Change
4083         return type to std::string.
4084         * target/waitstatus.c (target_waitstatus_to_string): Return
4085         std::string.
4086         * target.h (target_waitstatus_to_string): Remove declaration.
4087         * infrun.c (resume, clear_proceed_status_thread,
4088         print_target_wait_results, do_target_wait, save_waitstatus,
4089         stop_all_threads): Adjust.
4090         * record-btrace.c (record_btrace_wait): Adjust.
4091         * target-debug.h
4092         (target_debug_print_struct_target_waitstatus_p): Adjust.
4093
4094 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4095
4096         PR gdb/22046
4097         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
4098         detection.
4099
4100 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
4101
4102         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
4103         for setting/unsetting environment variables on the remote target.
4104         (New remote packets): Add entries for QEnvironmentHexEncoded,
4105         QEnvironmentUnset and QEnvironmentReset.
4106         * common/environ.c (gdb_environ::operator=): Extend method to
4107         handle m_user_set_env_list and m_user_unset_env_list.
4108         (gdb_environ::clear): Likewise.
4109         (match_var_in_string): Change type of first parameter from 'char
4110         *' to 'const char *'.
4111         (gdb_environ::set): Extend method to handle
4112         m_user_set_env_list and m_user_unset_env_list.
4113         (gdb_environ::unset): Likewise.
4114         (gdb_environ::clear_user_set_env): New method.
4115         (gdb_environ::user_set_envp): Likewise.
4116         (gdb_environ::user_unset_envp): Likewise.
4117         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
4118         m_user_unset_env_list on move constructor/assignment.
4119         (unset): Add new default parameter 'update_unset_list = true'.
4120         (clear_user_set_env): New method.
4121         (user_set_envp): Likewise.
4122         (user_unset_envp): Likewise.
4123         (m_user_set_env_list): New std::set.
4124         (m_user_unset_env_list): Likewise.
4125         * common/rsp-low.c (hex2str): New function.
4126         (bin2hex): New overload for bin2hex function.
4127         * common/rsp-low.c (hex2str): New prototype.
4128         (str2hex): New overload prototype.
4129         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
4130         QEnvironmentUnset and QEnvironmentReset.
4131         (remote_protocol_features): Add QEnvironmentHexEncoded,
4132         QEnvironmentUnset and QEnvironmentReset packets.
4133         (send_environment_packet): New function.
4134         (extended_remote_environment_support): Likewise.
4135         (extended_remote_create_inferior): Call
4136         extended_remote_environment_support.
4137         (_initialize_remote): Add QEnvironmentHexEncoded,
4138         QEnvironmentUnset and QEnvironmentReset packet configs.
4139         * unittests/environ-selftests.c (gdb_selftest_env_var):
4140         New variable.
4141         (test_vector_initialization): New function.
4142         (test_init_from_host_environ): Likewise.
4143         (test_reinit_from_host_environ): Likewise.
4144         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
4145         Likewise.
4146         (test_unset_set_empty_vector): Likewise.
4147         (test_vector_clear): Likewise.
4148         (test_std_move): Likewise.
4149         (test_move_constructor):
4150         (test_self_move): Likewise.
4151         (test_set_unset_reset): Likewise.
4152         (run_tests): Rewrite in terms of the functions above.
4153
4154 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
4155
4156         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
4157         (adi_available): Use a temp variable of type CORE_ADDR as argument
4158         3 when calling target_auxv_search.
4159         (adi_normalize_address): Use masks and xor operators to calculate
4160         normalized address.
4161         (adi_read_versions, adi_write_versions, adi_print_versions)
4162         (do_examine, do_assign): Use paddress.
4163
4164 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
4165
4166         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
4167         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
4168         out of loop and add supply of FIR.
4169         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
4170         add collect of FIR.
4171
4172 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
4173
4174         PR gdb/21827
4175         * cli/cli-script.c (define_command): Don't convert command name
4176         to lower case.
4177
4178 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
4179
4180         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
4181         Update all callers accordingly. Remove all code blocks handling
4182         the case where DISPP is not NULL.
4183
4184 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4185
4186         PR symtab/22003
4187         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
4188         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4189         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
4190
4191 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
4192
4193         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
4194         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
4195         (read_comp_units_from_section): New parameter abbrev_section, use
4196         read_and_check_comp_unit_head, allocate signatured_type if needed.
4197         (create_all_comp_units): Update read_comp_units_from_section caller.
4198
4199 2017-08-23  Pedro Alves  <palves@redhat.com>
4200
4201         PR remote/21852
4202         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
4203         to null_ptid and switch to thread without reading the registers
4204         after adding the inferior.
4205
4206 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4207
4208         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
4209         compile-gcc.
4210         * compile/compile.c (compile_gcc, show_compile_gcc): New.
4211         (compile_to_object): Implement compile_gcc.
4212         (_initialize_compile): Install "set compile-gcc".  Initialize
4213         compile_gcc.
4214
4215 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
4216
4217         * compile/compile.c (compile_to_object): Conditionally call
4218         set_verbose.  Conditionally call compile or compile_v0.
4219
4220 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
4221
4222         * sparc64-tdep.h: (adi_normalize_address): New export.
4223         * sparc-nat.h: (open_adi_tag_fd): New export.
4224         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
4225         * sparc64-linux-tdep.c:
4226         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
4227         (sparc64_linux_handle_segmentation_fault): New function.
4228         (sparc64_linux_init_abi): Register
4229         sparc64_linux_handle_segmentation_fault
4230         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
4231         (sparc64_addr_bits_remove): New function.
4232         (sparc64_init_abi): Register sparc64_addr_bits_remove.
4233         (MAX_PROC_NAME_SIZE): New macro.
4234         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
4235         (sparc64adilist): New variable.
4236         (adi_proc_list): New variable.
4237         (find_adi_info): New function.
4238         (add_adi_info): New function.
4239         (get_adi_info_proc): New function.
4240         (get_adi_info): New function.
4241         (info_adi_command): New function.
4242         (read_maps_entry): New function.
4243         (adi_available): New function.
4244         (adi_normalize_address): New function.
4245         (adi_align_address): New function.
4246         (adi_convert_byte_count): New function.
4247         (adi_tag_fd): New function.
4248         (adi_is_addr_mapped): New function.
4249         (adi_read_versions): New function.
4250         (adi_write_versions): New function.
4251         (adi_print_versions): New function.
4252         (do_examine): New function.
4253         (do_assign): New function.
4254         (adi_examine_command): New function.
4255         (adi_assign_command): New function.
4256         (_initialize_sparc64_adi_tdep): New function.
4257
4258 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
4259
4260         * breakpoint.c (breakpoints_info): Rename to ...
4261         (info_breakpoints_command): ... this.
4262         (watchpoints_info): Rename to ...
4263         (info_watchpoints_command): ... this.
4264         (tracepoints_info): Rename to ...
4265         (info_tracepoints_command): ... this.
4266         (_initialize_breakpoint): Adjust.
4267         * dcache.c (dcache_info): Rename to ...
4268         (info_display_command): ... this.
4269         (_initialize_dcache): Adjust.
4270         * frame.h (args_info): Rename to ...
4271         (info_args_command): ... this.
4272         (locals_info): Rename to ...
4273         (info_locals_command): ... this.
4274         * infcmd.c (nofp_registers_info): Rename to ...
4275         (info_registers_command): ... this.
4276         (float_info): Rename to ...
4277         (info_float_command): ... this.
4278         (program_info): Rename to ...
4279         (info_program_command): ... this.
4280         (all_registers_info): Rename to ...
4281         (info_all_registers_command): ... this.
4282         (vector_info): Rename to ...
4283         (info_vector_command): ... this.
4284         (float_info): Rename to ...
4285         (info_float_command): ... this.
4286         (_initialize_infcmd): Adjust.
4287         * inferior.h (term_info): Rename to ...
4288         (info_terminal_command): ... this.
4289         * inflow.c (term_info): Rename to ...
4290         (info_terminal_command): ... this.
4291         (_initialize_inflow): Adjust.
4292         * infrun.c (signals_info): Rename to ...
4293         (info_signals_command): ... this.
4294         (_initialize_infrun): Adjust.
4295         * objc-lang.c (classes_info): Rename to ...
4296         (info_classes_command): ... this.
4297         (selectors_info): Rename to ...
4298         (info_selectors_command): ... this.
4299         (_initialize_objc_language): Adjust.
4300         * printcmd.c (sym_info): Rename to ...
4301         (info_symbol_command): ... this.
4302         (address_info): Rename to ...
4303         (info_address_command): ... this.
4304         (display_info): Rename to ...
4305         (info_display_command): ... this.
4306         (_initialize_printcmd): Adjust.
4307         * reverse.c (bookmarks_info): Rename to ...
4308         (info_breakpoints_command): ... this.
4309         (_initialize_reverse): Adjust.
4310         * ser-go32.c (dos_info): Rename to ...
4311         (info_serial_command): ... this.
4312         (_initialize_ser_dos): Adjust.
4313         * skip.c (skip_info): Rename to ...
4314         (info_skip_command): ... this.
4315         (_initialize_step_skip): Adjust.
4316         * source.c (line_info): Rename to ...
4317         (info_line_command): ... this.
4318         (source_info): Rename to ...
4319         (info_source_command)
4320         * stack.c (frame_info): Rename to ...
4321         (info_frame_command): ... this.
4322         (locals_info): Rename to ...
4323         (info_locals_command): ... this.
4324         (args_info): Rename to ...
4325         (info_args_command): ... this.
4326         (_initialize_stack): Adjust.
4327         * symtab.c (sources_info): Rename to ...
4328         (info_sources_command): ... this.
4329         (variables_info): Rename to ...
4330         (info_variables_command): ... this.
4331         (functions_info): Rename to ...
4332         (info_functions_command): ... this.
4333         (types_info): Rename to ...
4334         (info_types_command): ... this.
4335         (_initialize_symtab): Adjust.
4336         * target.c (target_info): Rename to ...
4337         (info_target_command): ... this.
4338         (initialize_targets): Adjust.
4339         * tracepoint.c (tvariables_info): Rename to ...
4340         (info_tvariables_command): ... this.
4341         (scope_info): Rename to ...
4342         (info_scope_command): ... this.
4343         (trace_dump_actions): Adjust.
4344         (_initialize_tracepoint): Adjust.
4345
4346 2017-08-22  Tom Tromey  <tom@tromey.com>
4347
4348         * breakpoint.h (install_breakpoint): Update.
4349         * breakpoint.c (add_solib_catchpoint): Update.
4350         (install_breakpoint): Change argument to a std::unique_ptr.
4351         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
4352         (create_breakpoint_sal, create_breakpoint): Update.
4353         (watch_command_1, catch_exec_command_1)
4354         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
4355         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
4356         Return the breakpoint.
4357         (set_raw_breakpoint_without_location, set_raw_breakpoint)
4358         (new_single_step_breakpoint): Update.
4359         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
4360         std::unique_ptr.
4361         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4362         std::unique_ptr.
4363         * break-catch-sig.c (create_signal_catchpoint): Use
4364         std::unique_ptr.
4365         * ada-lang.c (create_ada_exception_catchpoint): Use
4366         std::unique_ptr.
4367
4368 2017-08-22  Tom Tromey  <tom@tromey.com>
4369
4370         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
4371
4372 2017-08-22  Tom Tromey  <tom@tromey.com>
4373
4374         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
4375         (lookup_partial_symbol): Update.
4376
4377 2017-08-22  Tom Tromey  <tom@tromey.com>
4378
4379         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
4380         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
4381         (find_and_open_source, symtab_to_fullname): Update.
4382         * psymtab.c (psymtab_to_fullname): Update.
4383
4384 2017-08-22  Tom Tromey  <tom@tromey.com>
4385
4386         * exec.c (exec_file_attach): Update.
4387         * linux-thread-db.c (try_thread_db_load): Update.
4388         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
4389         * utils.c (gdb_realpath): Change return type.
4390         (gdb_realpath_keepfile): Update.
4391         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
4392         (_initialize_utils): Register the new self test.
4393         * source.c (openp): Update.
4394         (find_and_open_source): Update.
4395         * nto-tdep.c (nto_find_and_open_solib): Update.
4396         * main.c (set_gdb_data_directory): Update.
4397         (captured_main_1): Update.
4398         * dwarf2read.c (dwarf2_get_dwz_file): Update
4399         (dw2_map_symbol_filenames): Update.
4400         * auto-load.c (auto_load_safe_path_vec_update): Update.
4401         (filename_is_in_auto_load_safe_path_vec): Change type of
4402         "filename_realp".
4403         (auto_load_objfile_script): Update.
4404         (file_is_auto_load_safe): Update.  Use std::string.
4405         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
4406
4407 2017-08-22  Tom Tromey  <tom@tromey.com>
4408
4409         * utils.c (gdb_realpath_keepfile): Return a
4410         gdb::unique_xmalloc_ptr.
4411         * exec.c (exec_file_attach): Update.
4412         * utils.h (gdb_realpath_keepfile): Return a
4413         gdb::unique_xmalloc_ptr.
4414
4415 2017-08-22  Tom Tromey  <tom@tromey.com>
4416
4417         * compile/compile.c (compile_file_command): Use
4418         gdb::unique_xmalloc_ptr, std::string.
4419         * utils.c (gdb_abspath): Change return type.
4420         * source.c (openp): Update.
4421         * objfiles.c (allocate_objfile): Update.
4422         * main.c (set_gdb_data_directory): Update.
4423         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
4424
4425 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
4426
4427         * cli-cmds.c (list_commands): List actual code around more than
4428         one location.
4429
4430 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
4431
4432         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
4433
4434 2017-08-21  Pedro Alves  <palves@redhat.com>
4435
4436         PR gdb/19487
4437         * c-exp.y (variable production): Handle function aliases.
4438         * minsyms.c (msymbol_is_text): New function.
4439         * minsyms.h (msymbol_is_text): Declare.
4440         * symtab.c (find_function_alias_target): New function.
4441         * symtab.h (find_function_alias_target): Declare.
4442
4443 2017-08-21  Pedro Alves  <palves@redhat.com>
4444
4445         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
4446         typedefs.
4447         * typeprint.c (whatis_exp): If handling "whatis", and expression
4448         is OP_TYPE, strip one typedef level.  Otherwise don't strip
4449         typedefs here.
4450         * valops.c (value_cast): Save "to" type before resolving
4451         stubs/typedefs.  Use that type as resulting value's type.
4452
4453 2017-08-18  Tom Tromey  <tom@tromey.com>
4454             Pedro Alves  <palves@redhat.com>
4455
4456         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
4457         * sol-thread.c (sol_thread_resume, sol_thread_wait)
4458         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
4459         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
4460         * proc-service.c (ps_xfer_memory): Use scoped_restore.
4461         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
4462         (linux_get_siginfo_data): Add "thread" argument.  Use
4463         scoped_restore.
4464         * linux-nat.c (linux_child_follow_fork)
4465         (check_stopped_by_watchpoint): Use scoped_restore.
4466         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
4467         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
4468         (restore_inferior_ptid, save_inferior_ptid): Remove.
4469         * btrace.c (btrace_fetch): Use scoped_restore.
4470         * bsd-uthread.c (bsd_uthread_fetch_registers)
4471         (bsd_uthread_store_registers): Use scoped_restore.
4472         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
4473         scoped_restore.
4474         * aix-thread.c (aix_thread_resume, aix_thread_wait)
4475         (aix_thread_xfer_partial): Use scoped_restore.
4476         * inferior.h (save_inferior_ptid): Remove.
4477
4478 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4479
4480         PR tdep/21818
4481         * arm-tdep.c (gdb_print_insn_arm): Mark
4482         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
4483
4484 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4485
4486         * NEWS: Mention GDBserver's new option "--selftest".
4487         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
4488         * selftest.c: Move it to common/selftest.c.
4489         * selftest.h: Move it to common/selftest.h.
4490         * selftest-arch.c (reset): New function.
4491         (tests_with_arch): Call reset.
4492
4493 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4494
4495         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
4496         instead of exception_fprintf and printf_filtered.
4497
4498 2017-08-18  Yao Qi  <yao.qi@linaro.org>
4499
4500         * selftest.c (register_self_test): Rename it to
4501         selftests::register_test.
4502         (run_self_tests): selftest::run_tests.
4503         * selftest.h: Update declarations.
4504         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
4505         selftests::register_test_foreach_arch.
4506         * selftest-arch.h: Update declaration.
4507         * aarch64-tdep.c: Update.
4508         * arm-tdep.c: Likewise.
4509         * disasm-selftests.c: Likewise.
4510         * dwarf2loc.c: Likewise.
4511         * dwarf2-frame.c: Likewise.
4512         * findvar.c: Likewise.
4513         * gdbarch-selftests.c: Likewise.
4514         * maint.c (maintenance_selftest): Likewise.
4515         * regcache.c: Likewise.
4516         * rust-exp.y: Likewise.
4517         * selftest-arch.c: Likewise.
4518         * unittests/environ-selftests.c: Likewise.
4519         * unittests/function-view-selftests.c: Likewise.
4520         * unittests/offset-type-selftests.c: Likewise.
4521         * unittests/optional-selftests.c: Likewise.
4522         * unittests/scoped_restore-selftests.c: Likewise.
4523         * utils-selftests.c: Likewise.
4524
4525 2017-08-17  Pedro Alves  <palves@redhat.com>
4526
4527         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
4528         local.
4529
4530 2017-08-17  Pedro Alves  <palves@redhat.com>
4531
4532         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
4533         field.
4534         (reset_die_in_process): Delete, replaced by ...
4535         (process_die_scope): ... this new class.  Make it responsible for
4536         freeing cu->line_header too.
4537         (process_die): Use process_die_scope.
4538         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
4539         cu->line_header_die_owner.  Don't release the line header if it's
4540         owned by the CU.
4541         (setup_type_unit_groups): Make the CU/DIE own the line header.
4542         Don't release the line header here.
4543
4544 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
4545
4546         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
4547
4548 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4549
4550         * NEWS: Mention new shortcuts for nexti and stepi in TUI
4551         Single-Key mode
4552
4553 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4554
4555         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
4556         mode command list.
4557
4558 2017-08-15  Stafford Horne  <shorne@gmail.com>
4559
4560         * MAINTAINERS (Write After Approval): Add Stafford Horne.
4561
4562 2017-08-15  Stafford Horne  <shorne@gmail.com>
4563
4564         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
4565
4566 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4567
4568         PR gdb/21954
4569         * infcmd.c (unset_environment_command): Use the 'clear' method on
4570         the environment instead of resetting it.
4571
4572 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
4573
4574         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
4575         platforms.
4576
4577 2017-08-14  Tom Tromey  <tom@tromey.com>
4578
4579         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
4580         (print_binary_chars): Likewise.
4581         (BITS_IN_BYTES): Remove.
4582
4583 2017-08-14  Tom Tromey  <tom@tromey.com>
4584
4585         PR gdb/21675
4586         * valprint.c (LOW_ZERO): Change value to 034.
4587         (print_octal_chars): Add static_asserts for octal constants.
4588         * printcmd.c (print_scalar_formatted): Add 'd' case.
4589
4590 2017-08-11  Tom Tromey  <tom@tromey.com>
4591
4592         * symfile.c (add_symbol_file_command): Use std::vector.
4593
4594 2017-08-14  Tom Tromey  <tom@tromey.com>
4595
4596         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
4597         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
4598         std::move.
4599         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
4600
4601 2017-08-11  Pedro Alves  <palves@redhat.com>
4602
4603         * infrun.c (process_event_stop_test): Adjust
4604         function_name_is_marked_for_skip call.
4605         * skip.c: Include <list>.
4606         (skiplist_entry): Make it a class with private fields, and
4607         getters/setters.
4608         (skiplist_entry_chain): Delete.
4609         (skiplist_entries): New.
4610         (skiplist_entry_count): Delete.
4611         (highest_skiplist_entry_num): New.
4612         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
4613         (add_skiplist_entry): Delete.
4614         (skiplist_entry::skiplist_entry): New.
4615         (skiplist_entry::add_entry): New.
4616         (skip_file_command, skip_function): Adjust.
4617         (compile_skip_regexp): Delete.
4618         (skip_command): Don't compile regexp here.  Adjust to use
4619         skiplist_entry::add_entry.
4620         (skip_info): Adjust to use range-for and getters.
4621         (skip_enable_command, skip_disable_command): Adjust to use
4622         range-for and setters.
4623         (skip_delete_command): Adjust to use std::list.
4624         (add_skiplist_entry): Delete.
4625         (skip_file_p): Delete, refactored as ...
4626         (skiplist_entry::do_skip_file_p): ... this new method.
4627         (skip_gfile_p): Delete, refactored as ...
4628         (skiplist_entry::do_gskip_file_p): ... this new method.
4629         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
4630         (skiplist_entry::skip_function_p): ... this new method.
4631         (function_name_is_marked_for_skip): Now returns bool, and takes
4632         the function sal by const reference.  Adjust to use range-for and
4633         skiplist_entry methods.
4634         (_initialize_step_skip): Remove references to
4635         skiplist_entry_chain, skiplist_entry_count.
4636         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
4637         takes the function sal by const reference.
4638
4639 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4640
4641         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
4642         (dwarf2_frame_cache): Remove reset_cache_cleanup.
4643         (dwarf2_frame_cache):
4644         * frame-unwind.c (frame_unwind_try_unwinder): Catch
4645         RETURN_MASK_ALL and set *this_case to NULL.
4646         * frame-unwind.h: Update comments.
4647
4648 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4649
4650         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
4651         (dwarf2_frame_state_copy_regs): Remove.
4652         (dwarf2_frame_state_free_regs): Remove.
4653         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
4654         (dwarf2_restore_rule): Call method .alloc_regs instead of
4655         dwarf2_frame_state_alloc_regs.
4656         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
4657         constructor.  Call std::move.
4658         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
4659         (dwarf2_frame_cache): Likewise.
4660
4661         [GDB_SELF_TEST]: Include selftest.h and
4662         selftest-arch.h.
4663         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
4664         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
4665         execute_cfa_program_test.
4666
4667         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
4668         copy ctor, assignment operator, move assignment.
4669         <alloc_regs>: New method.
4670         <swap>: New method.
4671         (struct dwarf2_frame_state): Delete dtor.
4672         (dwarf2_frame_state_alloc_regs): Remove declaration.
4673         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
4674         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
4675
4676 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4677
4678         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
4679         (dwarf2_frame_state::dwarf2_frame_state): New.
4680         (dwarf2_frame_state::~dwarf2_frame_state): New.
4681         (dwarf2_fetch_cfa_info): Update.
4682         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
4683         rather than a pointer.  Update code.
4684         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
4685         dtor.
4686         <data_align, code_align, retaddr_column>: Change them to const.
4687         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
4688         to bool.
4689
4690 2017-08-11  Yao Qi  <yao.qi@linaro.org>
4691
4692         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
4693         <loc.exp>: New field.
4694         * dwarf2-frame.c (execute_cfa_program): Update.
4695         (dwarf2_frame_prev_register): Update.
4696
4697 2017-08-10  Pedro Alves  <palves@redhat.com>
4698
4699         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
4700
4701 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4702
4703         * fbsd-nat.c (struct fbsd_fork_info): Remove.
4704         (fbsd_pending_children): Use std::list.
4705         (fbsd_remember_child): Likewise.
4706         (fbsd_is_child_pending): Likewise.
4707         (fbsd_pending_vfork_done): Use std::forward_list.
4708         (fbsd_add_vfork_done): Likewise.
4709         (fbsd_is_vfork_done_pending): Likewise.
4710         (fbsd_next_vfork_done): Likewise.
4711
4712 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4713
4714         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
4715         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
4716         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
4717         for `mapfilename'.
4718         (fbsd_xfer_partial): Use gdb::byte_vector.
4719         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
4720
4721 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
4722
4723         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
4724         "filestuff.h".
4725         (fbsd_find_memory_regions): Fix `mapfile' initialization.
4726
4727 2017-08-09  Tom Tromey  <tom@tromey.com>
4728
4729         * skip.c (skiplist_entry): New constructor.
4730         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
4731         (skiplist_entry::file_is_glob): Now bool.
4732         (skiplist_entry::file, skiplist_entry::function): Now
4733         std::string.
4734         (make_skip_entry): Return a unique_ptr.  Use new.
4735         (free_skiplist_entry, free_skiplist_entry_cleanup)
4736         (make_free_skiplist_entry_cleanup): Remove.
4737         (skip_command, skip_disable_command, add_skiplist_entry)
4738         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
4739         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
4740         (function_name_is_marked_for_skip): Update.
4741         (skip_delete_command): Update.  Use delete.
4742
4743 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
4744
4745         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
4746         (aarch64_linux_core_read_description): New function.
4747         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
4748
4749 2017-08-09  Pedro Alves  <palves@redhat.com>
4750
4751         * cp-name-parser.y (cp_comp_to_string): Return a
4752         gdb::unique_xmalloc_ptr<char>.
4753         * cp-support.c (replace_typedefs_qualified_name)
4754         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
4755         (cp_canonicalize_string_full): Use op= instead of explicit
4756         convertion.
4757         (cp_class_name_from_physname, method_name_from_physname)
4758         (cp_func_name, cp_remove_params): Adjust to use
4759         gdb::unique_xmalloc_ptr<char>.
4760         * cp-support.h (cp_comp_to_string): Return a
4761         gdb::unique_xmalloc_ptr<char>.
4762         * python/py-type.c (typy_lookup_type): Adjust to use
4763         gdb::unique_xmalloc_ptr<char>.
4764
4765 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
4766
4767         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4768
4769 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
4770             Yao Qi  <yao.qi@linaro.org>
4771
4772         * cp-support.c (cp_canonicalize_string_full): Use
4773         gdb::unique_xmalloc_ptr<char>.
4774         (cp_canonicalize_string): Likewise.
4775
4776 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4777
4778         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
4779         * regformats/i386/amd64-avx-avx512.dat: Remove.
4780         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
4781         * regformats/i386/amd64-avx-mpx.dat:Remove.
4782         * regformats/i386/amd64-avx.dat: Remove.
4783         * regformats/i386/amd64-mpx.dat: Remove.
4784         * regformats/i386/i386-avx-avx512.dat: Remove.
4785         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
4786         * regformats/i386/i386-avx-mpx.dat: Remove.
4787         * regformats/i386/i386-mmx.dat: Remove.
4788         * regformats/i386/i386-mpx.dat: Remove.
4789
4790 2017-08-09  Yao Qi  <yao.qi@linaro.org>
4791
4792         * amd64-tdep.h (tdesc_x32): Remove the declaration.
4793         * amd64-tdep.c: Don't include features/i386/x32*.c.
4794         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
4795         functions.
4796         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
4797         and i386/x32-avx-avx512.
4798         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
4799         and i386/x32.xml.
4800         * features/i386/x32-avx-avx512.c: Removed.
4801         * features/i386/x32-avx-avx512.xml: Removed.
4802         * features/i386/x32-avx.c: Removed.
4803         * features/i386/x32-avx.xml: Removed.
4804         * features/i386/x32.c: Removed.
4805         * features/i386/x32.xml: Removed.
4806         * regformats/i386/x32-avx-avx512.dat: Removed.
4807         * regformats/i386/x32-avx.dat: Removed.
4808         * regformats/i386/x32.dat: Removed.
4809
4810 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4811
4812         PR breakpoints/21886
4813         * mem-break.c (default_memory_insert_breakpoint): Use
4814         `->placed_address' rather than `->reqstd_address' for the
4815         breakpoint location.
4816
4817 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4818
4819         * arch-utils.c (default_print_insn): Remove arch/mach/endian
4820         assertions.
4821
4822 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
4823
4824         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
4825         a union of `tdep_info', `tdesc_data' and `id'.
4826         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
4827         rather than `info.tdep_info'.
4828         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
4829         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4830         * i386-tdep.c (i386_gdbarch_init): Likewise.
4831         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
4832         * mips-tdep.c (mips_gdbarch_init): Likewise.
4833         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4834         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4835         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
4836         `info.tdep_info'.
4837         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
4838         `info.tdep_info'.
4839         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4840         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
4841         `info.tdep_info'.
4842         * spu-tdep.c (spu_gdbarch_init): Likewise.
4843         * gdbarch.h: Regenerate.
4844
4845 2017-08-07  Leszek Swirski  <leszeks@google.com>
4846
4847         PR symtab/20899
4848         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
4849
4850 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4851
4852         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
4853         (gdbsim_open): Rename gdb_argv args object to argv.
4854
4855 2017-08-05  Tom Tromey  <tom@tromey.com>
4856
4857         * compile/compile-object-load.c (compile_object_load): Use
4858         gdb::unique_xmalloc_ptr.
4859         * cli/cli-dump.c (scan_filename): Rename from
4860         scan_filename_with_cleanup.  Change return type.
4861         (scan_expression): Rename from scan_expression_with_cleanup.
4862         Change return type.
4863         (dump_memory_to_file, dump_value_to_file, restore_command):
4864         Use gdb::unique_xmalloc_ptr.  Update.
4865         * cli/cli-cmds.c (find_and_open_script): Use
4866         gdb::unique_xmalloc_ptr.
4867         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
4868         * symmisc.c (maintenance_print_symbols)
4869         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
4870         * symfile.c (symfile_bfd_open, generic_load)
4871         (add_symbol_file_command, remove_symbol_file_command): Use
4872         gdb::unique_xmalloc_ptr.
4873         * source.c (openp): Use gdb::unique_xmalloc_ptr.
4874         * psymtab.c (maintenance_print_psymbols): Use
4875         gdb::unique_xmalloc_ptr.
4876         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
4877         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
4878         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
4879         (reload_shared_libraries_1): Likewise.
4880
4881 2017-08-05  Tom Tromey  <tom@tromey.com>
4882
4883         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
4884         (rust_op_vector, rust_set_vector): New typedefs.
4885         (current_parser): New global.
4886         (work_obstack): Change to pointer type.  Update all users.
4887         (rust_ast, pstate): Remove globals.
4888         (struct rust_parser): New.
4889         (%union) <params, field_inits>: Change type.
4890         (start, tuple_expr, unit_expr, struct_expr_list, literal)
4891         (field_expr, expr_list, maybe_expr_list, type_list): Update.
4892         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
4893         (convert_params_to_types, convert_params_to_expression): Change
4894         type of "params".
4895         (ast_string): Change type of "fields".
4896         (rust_parse): Make a rust_parser.  Remove cleanups.
4897         (rust_lex_tests): Make and install an auto_obstack.
4898
4899 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4900
4901         * configure.srv (ipa_x32_linux_regobj): New.
4902         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
4903         instead of X86_TDESC_AVX512.
4904         (initialize_low_tracepoint): Call
4905         init_registers_x32_avx_avx512_linux.
4906
4907 2017-08-04  Yao Qi  <yao.qi@linaro.org>
4908
4909         * utils.h (gdb_argv): Add namespace std for nullptr_t.
4910
4911 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
4912
4913         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
4914
4915 2017-08-03  Tom Tromey  <tom@tromey.com>
4916
4917         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
4918         Remove.
4919         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
4920
4921 2017-08-03  Tom Tromey  <tom@tromey.com>
4922
4923         * python/py-param.c (compute_enum_values): Use gdb_argv.
4924
4925 2017-08-03  Tom Tromey  <tom@tromey.com>
4926
4927         * utils.h (struct gdb_argv_deleter): New.
4928         (gdb_argv): New class.
4929         * utils.c (gdb_argv::reset): New method.
4930         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
4931         * tracefile.c (tsave_command): Use gdb_argv.
4932         * top.c (new_ui_command): Use gdb_argv.
4933         * symmisc.c (maintenance_print_symbols)
4934         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
4935         * symfile.c (symbol_file_command, generic_load)
4936         (remove_symbol_file_command): Use gdb_argv.
4937         * stack.c (backtrace_command): Use gdb_argv.
4938         * source.c (add_path, show_substitute_path_command)
4939         (unset_substitute_path_command, set_substitute_path_command):
4940         Use gdb_argv.
4941         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
4942         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
4943         * remote.c (extended_remote_run, remote_put_command)
4944         (remote_get_command, remote_delete_command): Use gdb_argv.
4945         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
4946         (gdbsim_open): Use gdb_argv.
4947         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
4948         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
4949         * procfs.c (procfs_info_proc): Use gdb_argv.
4950         * interps.c (interpreter_exec_cmd): Use gdb_argv.
4951         * infrun.c (handle_command): Use gdb_argv.
4952         * inferior.c (add_inferior_command, clone_inferior_command):
4953         Use gdb_argv.
4954         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
4955         * exec.c (exec_file_command): Use gdb_argv.
4956         * cli/cli-cmds.c (alias_command): Use gdb_argv.
4957         * compile/compile.c (build_argc_argv): Use gdb_argv.
4958
4959 2017-08-03  Tom Tromey  <tom@tromey.com>
4960
4961         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
4962
4963 2017-08-03  Tom Tromey  <tom@tromey.com>
4964
4965         * python/python.c (compute_python_string): Return std::string.
4966         (gdbpy_eval_from_control_command): Update.
4967         (do_start_initialization): Use std::string.
4968         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
4969         xstrprintf.
4970         * python/py-breakpoint.c (local_setattro): Use string_printf, not
4971         xstrprintf.
4972
4973 2017-08-03  Tom Tromey  <tom@tromey.com>
4974
4975         * top.h (do_restore_instream_cleanup): Remove.
4976         * top.c (do_restore_instream_cleanup): Remove.
4977         (read_command_file): Use scoped_restore.
4978         * cli/cli-script.c (execute_user_command): Use scoped_restore.
4979
4980 2017-08-03  Tom Tromey  <tom@tromey.com>
4981
4982         * cli/cli-script.c (execute_user_command)
4983         (execute_control_command): Use scoped_restore.
4984
4985 2017-08-03  Tom Tromey  <tom@tromey.com>
4986
4987         * cli/cli-script.c (do_restore_user_call_depth): Remove.
4988         (execute_user_command): Remove user_call_depth; use
4989         user_args_stack's size instead.
4990
4991 2017-08-03  Tom Tromey  <tom@tromey.com>
4992
4993         * top.h (in_user_command): Remove.
4994         * top.c (in_user_command): Remove.
4995         * cli/cli-script.c (do_restore_user_call_depth)
4996         (execute_user_command): Update.
4997
4998 2017-08-03  Tom Tromey  <tom@tromey.com>
4999
5000         * valops.c (search_struct_method): Use gdb::byte_vector.
5001         * valarith.c (value_concat): Use std::vector.
5002         * target.c (memory_xfer_partial): Use gdb::byte_vector.
5003         (simple_search_memory): Likewise.
5004         * printcmd.c (find_string_backward): Use gdb::byte_vector.
5005         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5006         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5007         * elfread.c (elf_rel_plt_read): Use std::string.
5008         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5009         * cli/cli-dump.c (restore_section_callback): Use
5010         gdb::byte_vector.
5011
5012 2017-08-03  Tom Tromey  <tom@tromey.com>
5013
5014         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5015
5016 2017-08-03  Tom Tromey  <tom@tromey.com>
5017
5018         * tui/tui-regs.c (tui_restore_gdbout): Remove.
5019         (tui_register_format): Use scoped_restore.
5020
5021 2017-08-03  Tom Tromey  <tom@tromey.com>
5022
5023         * reverse.c (exec_direction_default): Remove.
5024         (exec_reverse_once): Use scoped_restore.
5025         * remote.c (restore_remote_timeout): Remove.
5026         (remote_flash_erase, remote_flash_write, remote_flash_done)
5027         (readchar, remote_serial_write): Use scoped_restore.
5028         * cli/cli-script.c (struct source_cleanup_lines_args)
5029         (source_cleanup_lines): Remove.
5030         (script_from_file): Use scoped_restore.
5031         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
5032         (source_command): Use scoped_restore.
5033
5034 2017-08-03  Tom Tromey  <tom@tromey.com>
5035
5036         * utils.h (make_cleanup_free_so): Remove.
5037         * utils.c (do_free_so, make_cleanup_free_so): Remove.
5038         * solist.h (struct so_deleter): New.
5039         (so_list_up): New typedef.
5040         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
5041
5042 2017-08-03  Tom Tromey  <tom@tromey.com>
5043
5044         * utils.h (make_cleanup_restore_current_language): Remove.
5045         * utils.c (do_restore_current_language)
5046         (make_cleanup_restore_current_language): Remove.
5047         * parse.c (parse_exp_in_context_1)
5048         (parse_expression_with_language): Use
5049         scoped_restore_current_language.
5050         * mi/mi-main.c (mi_cmd_execute): Use
5051         scoped_restore_current_language.
5052         * language.h (scoped_restore_current_language): New class.
5053
5054 2017-08-03  Tom Tromey  <tom@tromey.com>
5055
5056         * compile/compile.c (cleanup_unlink_file): Remove.
5057         (compile_to_object): Use gdb::unlinker.
5058         (eval_compile_command): Likewise.
5059
5060 2017-08-03  Tom Tromey  <tom@tromey.com>
5061
5062         * utils.h (make_cleanup_fclose): Remove.
5063         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
5064
5065 2017-08-03  Tom Tromey  <tom@tromey.com>
5066
5067         * top.c (open_terminal_stream): Return gdb_file_up.
5068         (new_ui_command): Update.
5069
5070 2017-08-03  Tom Tromey  <tom@tromey.com>
5071
5072         * source.c (print_source_lines_base, forward_search_command)
5073         (reverse_search_command): Use gdb_file_up.
5074
5075 2017-08-03  Tom Tromey  <tom@tromey.com>
5076
5077         * fbsd-nat.c (fbsd_find_memory_regions): Update.
5078
5079 2017-08-03  Tom Tromey  <tom@tromey.com>
5080
5081         * cli/cli-cmds.c (find_and_open_script): Change return type.
5082         Remove "streamp" and "full_path" parameters.
5083         (source_script_with_search): Update.
5084         * auto-load.c (source_script_file): Update.
5085         * cli/cli-cmds.h (find_and_open_script): Change type.
5086         (open_script): New struct.
5087
5088 2017-08-03  Tom Tromey  <tom@tromey.com>
5089
5090         * xml-support.c (xml_fetch_content_from_file): Update.
5091         * ui-file.c (stdio_file::open): Update.
5092         * tracefile-tfile.c (tfile_start): Update.
5093         * remote.c (remote_file_put, remote_file_get): Update.
5094         * nat/linux-procfs.c (linux_proc_get_int)
5095         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
5096         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
5097         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
5098         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
5099         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
5100         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
5101         * linux-nat.c (linux_proc_pending_signals): Update.
5102         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
5103         (file_closer): Remove.
5104         * compile/compile.c (compile_to_object): Update.
5105         * common/filestuff.h (struct gdb_file_deleter): New.
5106         (gdb_file_up): New typedef.
5107         (gdb_fopen_cloexec): Change return type.
5108         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
5109         * cli/cli-dump.c (fopen_with_cleanup): Remove.
5110         (dump_binary_file, restore_binary_file): Update.
5111         * auto-load.c (auto_load_objfile_script_1): Update.
5112
5113 2017-08-03  Tom Tromey  <tom@tromey.com>
5114
5115         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
5116         (info_static_tracepoint_markers_command): Likewise.
5117         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
5118         * skip.c (skip_info): Use ui_out_emit_table.
5119         * progspace.c (print_program_space): Use ui_out_emit_table.
5120         * osdata.c (info_osdata): Use ui_out_emit_table.
5121         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
5122         ui_out_emit_table.
5123         * linux-thread-db.c (info_auto_load_libthread_db): Use
5124         ui_out_emit_table.
5125         * inferior.c (print_inferior): Use ui_out_emit_table.
5126         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
5127         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
5128         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
5129         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
5130         * ui-out.h (class ui_out_emit_table): New.
5131
5132 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
5133
5134         * mips-tdep.c (mips_fpu_type_str): New function.
5135         (mips_dump_tdep): Call it.
5136
5137 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
5138
5139         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
5140         `->mips_fpu_type'.
5141
5142 2017-07-31  Xavier Roirand  <roirand@adacore.com>
5143
5144         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
5145
5146 2017-07-27  Xavier Roirand  <roirand@adacore.com>
5147
5148         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
5149
5150 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5151
5152         * cli/cli-cmds.c (maintenancechecklist): New variable.
5153         * gdbcmd.h (maintenancechecklist): Declare it.
5154         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
5155         Call i386_linux_read_description with different masks.
5156         * maint.c (maintenance_check_command): New function.
5157         (_initialize_maint_cmds): Call add_prefix_cmd.
5158         * target-descriptions.c (tdesc_reg): override operator != and ==.
5159         (tdesc_type): Likewise.
5160         (tdesc_feature): Likewise.
5161         (target_desc): Likewise.
5162         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
5163         (maintenance_check_xml_descriptions): New function.
5164         (_initialize_target_descriptions) Add command "xml-descriptions".
5165         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
5166
5167 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5168
5169         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
5170         Include features/i386/32bit-*.c.
5171         (i386_linux_read_description): Generate target description if it
5172         doesn't exist.
5173         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
5174         functions.
5175         * features/i386/32bit-linux.c: Re-generated.
5176         * features/i386/32bit-sse.c: Likewise.
5177         * target-descriptions.c (print_c_feature::visit): Print code to
5178         set register number if needed.
5179         (print_c_feature) <m_next_regnum>: New field.
5180
5181 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5182
5183         * features/Makefile (CFILES): Rename with TDESC_CFILES.
5184         (FEATURE_XMLFILES): New.
5185         (FEATURE_CFILES): New.
5186         New rules.
5187         (clean-cfiles): Remove generated c files.
5188         * features/i386/32bit-avx.c: Generated.
5189         * features/i386/32bit-avx512.c: Generated.
5190         * features/i386/32bit-core.c: Generated.
5191         * features/i386/32bit-linux.c: Generated.
5192         * features/i386/32bit-mpx.c: Generated.
5193         * features/i386/32bit-pkeys.c: Generated.
5194         * features/i386/32bit-sse.c: Generated.
5195         * target-descriptions.c: Include algorithm.
5196         (tdesc_element_visitor): Add method visit_end.
5197         (print_c_tdesc): Implement visit_end.
5198         (print_c_tdesc:: m_filename_after_features): Move it to
5199         protected.
5200         (print_c_feature): New class.
5201         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
5202         name starts with "i386/32bit-".
5203
5204 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5205
5206         * target-descriptions.c (tdesc_element_visitor): New class.
5207         (tdesc_element): New class.
5208         (tdesc_reg): Inherit from tdesc_element.
5209         (tdesc_reg::accept): New function.
5210         (tdesc_type): Inherit from tdesc_element.
5211         (tdesc_type::accept): New function.
5212         (tdesc_feature): Inherit from tdesc_element.
5213         (tdesc_feature::accept): New function.
5214         (target_desc): Inherit from tdesc_element.
5215         (target_desc::target_desc): New.
5216         (target_desc::~target_desc): New.
5217         (target_desc::accept): New.
5218         (allocate_target_description): Use new.
5219         (free_target_description): Use delete.
5220         (print_c_tdesc): New class.
5221         (maint_print_c_tdesc_cmd): Adjust.
5222
5223         * features/aarch64.c: Re-generated.
5224         * features/arc-arcompact.c: Re-generated.
5225         * features/arc-v2.c: Re-generated.
5226         * features/arm/arm-with-iwmmxt.c: Re-generated.
5227         * features/arm/arm-with-m.c: Re-generated.
5228         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
5229         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
5230         * features/arm/arm-with-neon.c: Re-generated.
5231         * features/arm/arm-with-vfpv2.c: Re-generated.
5232         * features/arm/arm-with-vfpv3.c: Re-generated.
5233         * features/i386/amd64-avx-avx512.c: Re-generated.
5234         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
5235         * features/i386/amd64-avx.c: Re-generated.
5236         * features/i386/amd64-avx-linux.c: Re-generated.
5237         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
5238         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
5239         * features/i386/amd64-avx-mpx.c: Re-generated.
5240         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
5241         * features/i386/amd64.c: Re-generated.
5242         * features/i386/amd64-linux.c: Re-generated.
5243         * features/i386/amd64-mpx.c: Re-generated.
5244         * features/i386/amd64-mpx-linux.c: Re-generated.
5245         * features/i386/i386-avx-avx512.c: Re-generated.
5246         * features/i386/i386-avx-avx512-linux.c: Re-generated.
5247         * features/i386/i386-avx.c: Re-generated.
5248         * features/i386/i386-avx-linux.c: Re-generated.
5249         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
5250         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
5251         * features/i386/i386-avx-mpx.c: Re-generated.
5252         * features/i386/i386-avx-mpx-linux.c: Re-generated.
5253         * features/i386/i386.c: Re-generated.
5254         * features/i386/i386-linux.c: Re-generated.
5255         * features/i386/i386-mmx.c: Re-generated.
5256         * features/i386/i386-mmx-linux.c: Re-generated.
5257         * features/i386/i386-mpx.c: Re-generated.
5258         * features/i386/i386-mpx-linux.c: Re-generated.
5259         * features/i386/x32-avx-avx512.c: Re-generated.
5260         * features/i386/x32-avx-avx512-linux.c: Re-generated.
5261         * features/i386/x32-avx.c: Re-generated.
5262         * features/i386/x32-avx-linux.c: Re-generated.
5263         * features/i386/x32.c: Re-generated.
5264         * features/i386/x32-linux.c: Re-generated.
5265         * features/microblaze.c: Re-generated.
5266         * features/microblaze-with-stack-protect.c: Re-generated.
5267         * features/mips64-dsp-linux.c: Re-generated.
5268         * features/mips64-linux.c: Re-generated.
5269         * features/mips-dsp-linux.c: Re-generated.
5270         * features/mips-linux.c: Re-generated.
5271         * features/nds32.c: Re-generated.
5272         * features/nios2.c: Re-generated.
5273         * features/nios2-linux.c: Re-generated.
5274         * features/rs6000/powerpc-32.c: Re-generated.
5275         * features/rs6000/powerpc-32l.c: Re-generated.
5276         * features/rs6000/powerpc-403.c: Re-generated.
5277         * features/rs6000/powerpc-403gc.c : Re-generated.
5278         * features/rs6000/powerpc-405.c: Re-generated.
5279         * features/rs6000/powerpc-505.c: Re-generated.
5280         * features/rs6000/powerpc-601.c: Re-generated.
5281         * features/rs6000/powerpc-602.c: Re-generated.
5282         * features/rs6000/powerpc-603.c: Re-generated.
5283         * features/rs6000/powerpc-604.c: Re-generated.
5284         * features/rs6000/powerpc-64.c: Re-generated.
5285         * features/rs6000/powerpc-64l.c: Re-generated.
5286         * features/rs6000/powerpc-7400.c: Re-generated.
5287         * features/rs6000/powerpc-750.c: Re-generated.
5288         * features/rs6000/powerpc-860.c: Re-generated.
5289         * features/rs6000/powerpc-altivec32.c: Re-generated.
5290         * features/rs6000/powerpc-altivec32l.c: Re-generated.
5291         * features/rs6000/powerpc-altivec64.c: Re-generated.
5292         * features/rs6000/powerpc-altivec64l.c: Re-generated.
5293         * features/rs6000/powerpc-cell32l.c: Re-generated.
5294         * features/rs6000/powerpc-cell64l.c: Re-generated.
5295         * features/rs6000/powerpc-e500.c: Re-generated.
5296         * features/rs6000/powerpc-e500l.c: Re-generated.
5297         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
5298         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
5299         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
5300         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
5301         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
5302         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
5303         * features/rs6000/powerpc-vsx32.c: Re-generated.
5304         * features/rs6000/powerpc-vsx32l.c: Re-generated.
5305         * features/rs6000/powerpc-vsx64.c: Re-generated.
5306         * features/rs6000/powerpc-vsx64l.c: Re-generated.
5307         * features/rs6000/rs6000.c: Re-generated.
5308         * features/s390-linux32.c: Re-generated.
5309         * features/s390-linux32v1.c: Re-generated.
5310         * features/s390-linux32v2.c: Re-generated.
5311         * features/s390-linux64.c: Re-generated.
5312         * features/s390-linux64v1.c: Re-generated.
5313         * features/s390-linux64v2.c: Re-generated.
5314         * features/s390-te-linux64.c: Re-generated.
5315         * features/s390-tevx-linux64.c: Re-generated.
5316         * features/s390-vx-linux64.c: Re-generated.
5317         * features/s390x-linux64.c: Re-generated.
5318         * features/s390x-linux64v1.c: Re-generated.
5319         * features/s390x-linux64v2.c: Re-generated.
5320         * features/s390x-te-linux64.c: Re-generated.
5321         * features/s390x-tevx-linux64.c: Re-generated.
5322         * features/s390x-vx-linux64.c: Re-generated.
5323         * features/sparc/sparc32-solaris.c: Re-generated.
5324         * features/sparc/sparc64-solaris.c: Re-generated.
5325         * features/tic6x-c62x.c: Re-generated.
5326         * features/tic6x-c62x-linux.c: Re-generated.
5327         * features/tic6x-c64x.c: Re-generated.
5328         * features/tic6x-c64x-linux.c: Re-generated.
5329         * features/tic6x-c64xp.c: Re-generated.
5330         * features/tic6x-c64xp-linux.c: Re-generated.
5331
5332 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5333
5334         * i386-linux-tdep.c (i386_linux_read_description): New function.
5335         (i386_linux_core_read_description): Call
5336         i386_linux_read_description.
5337         * i386-linux-tdep.h (i386_linux_read_description): Declare.
5338         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
5339         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
5340         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
5341         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
5342         * x86-linux-nat.c (x86_linux_read_description): Call
5343         i386_linux_read_description.
5344
5345 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5346
5347         * NEWS: Mention it.
5348         * features/Makefile (%.c: %.xml): Pass the xml file name to
5349         command "maint print c-tdesc".
5350         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
5351         name from 'arg'.
5352
5353 2017-07-26  Yao Qi  <yao.qi@linaro.org>
5354
5355         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
5356         in-class initialization.
5357         (tdesc_create_feature): Call new instead of XCNEW.
5358         (free_target_description): Ue delete.
5359
5360 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
5361
5362         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
5363
5364 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5365
5366         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
5367         constant.
5368         (amd64_x32_init_abi): Likewise.
5369         * amd64-tdep.h (amd64_init_abi): Update declaration.
5370         (amd64_x32_init_abi): Likewise.
5371
5372 2017-07-25  Yao Qi  <yao.qi@linaro.org>
5373
5374         PR tdep/21717
5375         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
5376         condition for FPSCR.
5377         (arm_linux_store_inferior_registers): Likewise.
5378
5379 2017-07-22  Tom Tromey  <tom@tromey.com>
5380
5381         * break-catch-syscall.c (struct catch_syscall_inferior_data)
5382         <syscalls_counts>: Now a std::vector.
5383         (get_catch_syscall_inferior_data): Use "new".
5384         (catch_syscall_inferior_data_cleanup): Use "delete".
5385         (insert_catch_syscall, remove_catch_syscall)
5386         (clear_syscall_counts): Update.
5387
5388 2017-07-22  Tom Tromey  <tom@tromey.com>
5389
5390         * break-catch-syscall.c (syscall_catchpoint)
5391         <syscalls_to_be_caught>: Now a std::vector<int>
5392         (~syscall_catchpoint): Remove.
5393         (insert_catch_syscall, remove_catch_syscall)
5394         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
5395         (print_mention_catch_syscall, print_recreate_catch_syscall):
5396         Update.
5397         (create_syscall_event_catchpoint): Change type of "filter"
5398         parameter.
5399         (catch_syscall_split_args): Return a std::vector.
5400         (catch_syscall_command_1, catching_syscall_number_1): Update.
5401
5402 2017-07-22  Tom Tromey  <tom@tromey.com>
5403
5404         * break-catch-throw.c (struct exception_catchpoint)
5405         <exception_rx>: Now a std::string.
5406         (~exception_catchpoint): Remove.
5407         (print_one_detail_exception_catchpoint): Update.
5408         (handle_gnu_v3_exceptions): Change type of except_rx.
5409         (extract_exception_regexp): Return a std::string.
5410         (catch_exception_command_1): Update.
5411
5412 2017-07-22  Tom Tromey  <tom@tromey.com>
5413
5414         * break-catch-sig.c (gdb_signal_type): Remove typedef.
5415         (struct signal_catchpoint) <signals_to_be_caught>: Now a
5416         std::vector.
5417         <catch_all>: Now a bool.
5418         (~signal_catchpoint): Remove.
5419         (signal_catchpoint_insert_location)
5420         (signal_catchpoint_remove_location)
5421         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
5422         (signal_catchpoint_print_mention)
5423         (signal_catchpoint_print_recreate)
5424         (signal_catchpoint_explains_signal): Update.
5425         (create_signal_catchpoint): Change type of "filter" and
5426         "catch_all".
5427         (catch_signal_split_args): Return a std::vector.  Change type of
5428         "catch_all".
5429         (catch_signal_command): Update.
5430
5431 2017-07-20  Pedro Alves  <palves@redhat.com>
5432
5433         * ada-lang.c (ada_language_defn): Make extern.
5434         (_initialize_ada_language): Remove add_language call.
5435         * c-lang.c (c_language_defn, cplus_language_defn)
5436         (asm_language_defn, minimal_language_defn): Make extern.
5437         (_initialize_c_language): Delete.
5438         * completer.c (compare_cstrings): Delete, moved to utils.h.
5439         * d-lang.c (d_language_defn): Make extern.
5440         (_initialize_d_language): Remove add_language calls.
5441         * defs.h (enum language): Add comment.
5442         * f-lang.c (f_language_defn): Make extern.
5443         (_initialize_f_language): Remove add_language call.
5444         * go-lang.c (go_language_defn): Make extern.
5445         (_initialize_go_language): Remove add_language call.
5446         * language.c: Include <algorithm>.
5447         (languages): Redefine as const array.
5448         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
5449         (set_language_command): Handle "local".  Use for-range loop.
5450         (set_language): Remove loop.
5451         (language_enum): Rewrite.
5452         (language_def, language_str): Remove loops.
5453         (add_language): Delete.
5454         (add_set_language_command): New, based on add_languages.
5455         (skip_language_trampoline): Adjust.
5456         (local_language_defn): Delete.
5457         (language_gdbarch_post_init): Adjust.
5458         (_initialize_language): Remove add_language calls.  Call
5459         add_set_language_command.
5460         * language.h (add_language): Delete.
5461         (auto_language_defn)
5462         (unknown_language_defn, minimal_language_defn, ada_language_defn)
5463         (asm_language_defn, c_language_defn, cplus_language_defn)
5464         (d_language_defn, f_language_defn, go_language_defn)
5465         (m2_language_defn, objc_language_defn, opencl_language_defn)
5466         (pascal_language_defn, rust_language_defn): Declare.
5467         * m2-lang.c (m2_language_defn): Make extern.
5468         (_initialize_m2_language): Remove add_language call.
5469         * objc-lang.c (objc_language_defn): Make extern.
5470         (_initialize_objc_language): Remove add_language call.
5471         * opencl-lang.c (opencl_language_defn): Make extern.
5472         (_initialize_opencl_language): Remove add_language call.
5473         * p-lang.c (pascal_language_defn): Make extern.
5474         (_initialize_pascal_language): Delete.
5475         * rust-lang.c (rust_language_defn): Make extern.
5476         (_initialize_rust_language): Delete.
5477         * utils.h (compare_cstrings): New static inline function.
5478
5479 2017-07-20  Pedro Alves  <palves@redhat.com>
5480
5481         * ada-lang.c (ada_to_fixed_type_1): Adjust.
5482         (get_var_value): Constify parameters.
5483         (get_int_var_value): Change prototype.
5484         (to_fixed_range_type): Adjust.
5485         * ada-lang.h (get_int_var_value): Change prototype.
5486
5487 2017-07-20  Pedro Alves  <palves@redhat.com>
5488
5489         * dwarf2read.c (dw2_lookup_symbol): Use
5490         SYMBOL_MATCHES_SEARCH_NAME.
5491         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
5492
5493 2017-07-20  Pedro Alves  <palves@redhat.com>
5494
5495         * block.c (block_iter_name_step, block_iter_name_first)
5496         (block_iter_name_next): Delete.
5497         (block_lookup_symbol_primary): Adjust to use
5498         dict_iter_match_first/dict_iter_match_next.
5499         * block.h (block_iter_name_first, block_iter_name_next): Delete
5500         declarations.
5501         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
5502         dict_iter_match_first/dict_iter_match_next.
5503
5504 2017-07-20  Pedro Alves  <palves@redhat.com>
5505
5506         * cp-support.c (cp_find_first_component_aux): Add missing case for
5507         end of string.
5508
5509 2017-07-18  David Blaikie  <dblaikie@gmail.com>
5510
5511         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
5512         of dwo_cu's dwo_file.
5513
5514 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5515
5516         * remote.c (store_registers_using_G): Remove one line comment.
5517
5518 2017-07-18  Yao Qi  <yao.qi@linaro.org>
5519
5520         * regcache.c (regcache_cpy): Simplify it.
5521         (regcache::cpy_no_passthrough): Remove it.
5522         * regcache.h (cpy_no_passthrough): Remove it.
5523         (regcache_dup, regcache_cpy): Update comments.
5524
5525 2017-07-18  Pedro Alves  <palves@redhat.com>
5526
5527         * remote-sim.c (sim_command_completer): Adjust to work with a
5528         completion_tracker instead of a VEC.
5529
5530 2017-07-17  Pedro Alves  <palves@redhat.com>
5531
5532         * completer.c (complete_source_filenames): New function.
5533         (complete_address_and_linespec_locations): New function.
5534         (location_completer): Use complete_address_and_linespec_locations.
5535         (completion_tracker::build_completion_result): Honor the tracker's
5536         request to suppress append.
5537         * completer.h (completion_tracker::suppress_append_ws)
5538         (completion_tracker::set_suppress_append_ws): New methods.
5539         (completion_tracker::m_suppress_append_ws): New field.
5540         (complete_source_filenames): New declaration.
5541         * linespec.c (linespec_complete_what): New.
5542         (struct ls_parser) <complete_what, completion_word,
5543         completion_quote_char, completion_quote_end, completion_tracker>:
5544         New fields.
5545         (string_find_incomplete_keyword_at_end): New.
5546         (linespec_lexer_lex_string): Record quote char.  If in completion
5547         mode, don't throw.
5548         (linespec_lexer_consume_token): Advance the completion word point.
5549         (linespec_lexer_peek_token): Save/restore completion info.
5550         (save_stream_and_consume_token): New.
5551         (set_completion_after_number): New.
5552         (linespec_parse_basic): Set what to complete next depending on
5553         token.  Handle function and label completions specially.
5554         (parse_linespec): Disable objc shortcut in completion mode.  Set
5555         what to complete next depending on token type.  Skip keyword if in
5556         completion mode.
5557         (complete_linespec_component, linespec_complete): New.
5558         * linespec.h (linespec_complete): Declare.
5559
5560 2017-07-17  Pedro Alves  <palves@redhat.com>
5561
5562         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
5563         Handle 'operator<' / 'operator<<'.
5564
5565 2017-07-17  Pedro Alves  <palves@redhat.com>
5566
5567         * completer.c (collect_explicit_location_matches): Handle
5568         MATCH_LABEL.
5569         (convert_explicit_location_to_linespec): New, factored out from
5570         ...
5571         (convert_explicit_location_to_sals): ... this.
5572         (complete_label): New.
5573         (linespec_complete_label, find_label_symbols_in_block): New.
5574         (find_label_symbols): Add completion_mode parameter and adjust to
5575         call find_label_symbols_in_block.
5576         * linespec.h (linespec_complete_label): Declare.
5577
5578 2017-07-17  Pedro Alves  <palves@redhat.com>
5579
5580         * ada-lang.c (ada_collect_symbol_completion_matches): Add
5581         complete_symbol_mode parameter.
5582         * cli/cli-cmds.c (complete_command): Get the completion result out
5583         of the handle_brkchars tracker if used a custom word point.
5584         * completer.c: Include "linespec.h".
5585         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
5586         (advance_to_expression_complete_word_point): New.
5587         (completion_tracker::completes_to_completion_word): New.
5588         (complete_files_symbols): Pass down
5589         complete_symbol_mode::EXPRESSION.
5590         (explicit_options, probe_options): New.
5591         (collect_explicit_location_matches): Complete on the
5592         explictit_loc->foo instead of word.  Use
5593         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
5594         keyword and options completions.
5595         (backup_text_ptr): Delete.
5596         (skip_keyword): New.
5597         (complete_explicit_location): Remove 'word' parameter.  Add
5598         language, quoted_arg_start and quoted_arg_end parameters.
5599         Rewrite, parsing left to right.
5600         (location_completer): Rewrite.
5601         (location_completer_handle_brkchars): New function.
5602         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
5603         (enum complete_line_internal_reason): Adjust comments.
5604         (completion_tracker::discard_completions): New.
5605         (completer_handle_brkchars_func_for_completer): Handle
5606         location_completer.
5607         (gdb_custom_word_point_brkchars)
5608         (gdb_org_rl_basic_quote_characters): New.
5609         (gdb_completion_word_break_characters_throw)
5610         (completion_find_completion_word): Handle trackers that use a
5611         custom word point.
5612         (completion_tracker::advance_custom_word_point_by): New.
5613         (completion_tracker::build_completion_result): Don't rely on
5614         readline appending the quote char.
5615         (gdb_rl_attempted_completion_function_throw): Handle trackers that
5616         use a custom word point.
5617         (gdb_rl_attempted_completion_function): Restore
5618         rl_basic_quote_characters.
5619         * completer.h (class completion_tracker): Extend intro comment.
5620         (completion_tracker::set_quote_char)
5621         (completion_tracker::quote_char)
5622         (completion_tracker::set_use_custom_word_point)
5623         (completion_tracker::use_custom_word_point)
5624         (completion_tracker::custom_word_point)
5625         (completion_tracker::set_custom_word_point)
5626         (completion_tracker::advance_custom_word_point_by)
5627         (completion_tracker::completes_to_completion_word)
5628         (completion_tracker::discard_completions): New methods.
5629         (completion_tracker::m_quote_char)
5630         (completion_tracker::m_use_custom_word_point)
5631         (completion_tracker::m_custom_word_point): New fields.
5632         (advance_to_expression_complete_word_point): Declare.
5633         * f-lang.c (f_collect_symbol_completion_matches): Add
5634         complete_symbol_mode parameter.
5635         * language.h (struct language_defn)
5636         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
5637         parameter.
5638         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
5639         (linespec_complete_function): New function.
5640         (linespec_lexer_lex_keyword): Adjust.
5641         * linespec.h (linespec_keywords, linespec_complete_function): New
5642         declarations.
5643         * location.c (find_end_quote): New function.
5644         (explicit_location_lex_one): Add explicit_completion_info
5645         parameter.  Save quoting info.  Don't throw if being called for
5646         completion.  Don't handle Ada operators here.
5647         (is_cp_operator, skip_op_false_positives, first_of)
5648         (explicit_location_lex_one_function): New function.
5649         (string_to_explicit_location): Replace 'dont_throw' parameter with
5650         an explicit_completion_info pointer parameter.  Handle it.  Don't
5651         use explicit_location_lex_one to lex function names.  Use
5652         explicit_location_lex_one_function instead.
5653         * location.h (struct explicit_completion_info): New.
5654         (string_to_explicit_location): Replace 'dont_throw' parameter with
5655         an explicit_completion_info pointer parameter.
5656         * symtab.c (default_collect_symbol_completion_matches_break_on):
5657         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
5658         (default_collect_symbol_completion_matches)
5659         (collect_symbol_completion_matches): Add complete_symbol_mode
5660         parameter.
5661         (collect_symbol_completion_matches_type): Pass down
5662         complete_symbol_mode::EXPRESSION.
5663         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5664         parameter.  Handle LINESPEC mode.
5665         * symtab.h (complete_symbol_mode): New.
5666         (default_collect_symbol_completion_matches_break_on)
5667         (default_collect_symbol_completion_matches)
5668         (collect_symbol_completion_matches)
5669         (collect_file_symbol_completion_matches): Add complete_symbol_mode
5670         parameter.
5671
5672 2017-07-17  Pedro Alves  <palves@redhat.com>
5673
5674         * utils.c (enum class strncmp_iw_mode): New.
5675         (strcmp_iw): Rename to ...
5676         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
5677         parameters.  Handle them.
5678         (strncmp_iw): New.
5679         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
5680         * utils.h (strncmp_iw): Declare.
5681         (strcmp_iw): Move describing comments here.
5682
5683 2017-07-17  Pedro Alves  <palves@redhat.com>
5684
5685         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
5686         CP_OPERATOR_STR.
5687         * c-typeprint.c (is_type_conversion_operator): Use
5688         CP_OPERATOR_STR.
5689         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
5690         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
5691         CP_OPERATOR_LEN.
5692         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
5693         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
5694         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
5695         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
5696         CP_OPERATOR_STR.
5697         * location.c: Include "cp-support.h".
5698         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
5699         CP_OPERATOR_STR.
5700         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
5701         CP_OPERATOR_LEN.
5702
5703 2017-07-17  Pedro Alves  <palves@redhat.com>
5704
5705         * cli/cli-cmds.c (complete_command): Use a completion tracker
5706         along with completion_find_completion_word for handle_brkchars
5707         phase.
5708         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
5709         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
5710         (struct gdb_rl_completion_word_info): New.
5711         (gdb_rl_find_completion_word): New.
5712         (completion_find_completion_word): New.
5713         * completer.h (completion_find_completion_word): Declare.
5714
5715 2017-07-17  Pedro Alves  <palves@redhat.com>
5716
5717         * ada-lang.c (symbol_completion_match): Adjust comments.
5718         (symbol_completion_add): Replace vector parameter with
5719         completion_tracker parameter.  Use it.
5720         (ada_make_symbol_completion_list): Rename to...
5721         (ada_collect_symbol_completion_matches): ... this.  Add
5722         completion_tracker parameter and use it.
5723         (ada_language_defn): Adjust.
5724         * break-catch-syscall.c (catch_syscall_completer): Adjust
5725         prototype and work with completion_tracker instead of VEC.
5726         * breakpoint.c (condition_completer): Adjust prototype and work
5727         with completion_tracker instead of VEC.
5728         * c-lang.c (c_language_defn, cplus_language_defn)
5729         (asm_language_defn, minimal_language_defn): Adjust to renames.
5730         * cli/cli-cmds.c (complete_command): Rework using
5731         completion_tracker.  Catch exceptions when completing.
5732         * cli/cli-decode.c (integer_unlimited_completer)
5733         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
5734         with completion_tracker instead of VEC.
5735         * command.h (struct completion_tracker): Forward declare.
5736         (completer_ftype, completer_handle_brkchars_ftype): Change
5737         types.
5738         (complete_on_cmdlist, complete_on_enum): Adjust.
5739         * completer.c: Include <algorithm>.
5740         (struct gdb_completer_state): New.
5741         (current_completion): New global.
5742         (readline_line_completion_function): Delete.
5743         (noop_completer, filename_completer)
5744         (filename_completer_handle_brkchars, complete_files_symbols)
5745         (linespec_location_completer): Adjust to work with a
5746         completion_tracker instead of a VEC.
5747         (string_or_empty): New.
5748         (collect_explicit_location_matches): Adjust to work with a
5749         completion_tracker instead of a VEC.
5750         (explicit_location_completer): Rename to ...
5751         (complete_explicit_location): ... this and adjust to work with a
5752         completion_tracker instead of a VEC.
5753         (location_completer): Adjust to work with a completion_tracker
5754         instead of a VEC.
5755         (add_struct_fields): Adjust to work with a completion_list instead
5756         of VEC.
5757         (expression_completer): Rename to ...
5758         (complete_expression): ... this and adjust to work with a
5759         completion_tracker instead of a VEC.  Use complete_files_symbols.
5760         (expression_completer): Reimplement on top of complete_expression.
5761         (symbol_completer): Adjust to work with a completion_tracker
5762         instead of a VEC.
5763         (enum complete_line_internal_reason): Add describing comments.
5764         (complete_line_internal_normal_command): Adjust to work with a
5765         completion_tracker instead of a VEC.
5766         (complete_line_internal): Rename to ...
5767         (complete_line_internal_1): ... this and adjust to work with a
5768         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
5769         handle_brkchars phase.
5770         (new_completion_tracker): Delete.
5771         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
5772         complete_line_internal_1.
5773         (free_completion_tracker): Delete.
5774         (INITIAL_COMPLETION_HTAB_SIZE): New.
5775         (completion_tracker::completion_tracker)
5776         (completion_tracker::~completion_tracker): New.
5777         (maybe_add_completion): Delete.
5778         (completion_tracker::maybe_add_completion)
5779         (completion_tracker::add_completion)
5780         (completion_tracker::add_completions): New.
5781         (throw_max_completions_reached_error): Delete.
5782         (complete_line): Adjust to work with a completion_tracker instead
5783         of a VEC.  Don't create a completion_tracker_t or check for max
5784         completions here.
5785         (command_completer, command_completer_handle_brkchars)
5786         (signal_completer, reg_or_group_completer_1)
5787         (reg_or_group_completer, default_completer_handle_brkchars):
5788         Adjust to work with a completion_tracker.
5789         (gdb_completion_word_break_characters_throw): New.
5790         (gdb_completion_word_break_characters): Reimplement.
5791         (line_completion_function): Delete.
5792         (completion_tracker::recompute_lowest_common_denominator)
5793         (expand_preserving_ws)
5794         (completion_tracker::build_completion_result)
5795         (completion_result::completion_result)
5796         (completion_result::completion_result)
5797         (completion_result::~completion_result)
5798         (completion_result::completion_result)
5799         (completion_result::release_match_list, compare_cstrings)
5800         (completion_result::sort_match_list)
5801         (completion_result::reset_match_list)
5802         (gdb_rl_attempted_completion_function_throw)
5803         (gdb_rl_attempted_completion_function): New.
5804         * completer.h (completion_list, struct completion_result)
5805         (class completion_tracker): New.
5806         (complete_line): Add completion_tracker parameter.
5807         (readline_line_completion_function): Delete.
5808         (gdb_rl_attempted_completion_function): New.
5809         (noop_completer, filename_completer, expression_completer)
5810         (location_completer, symbol_completer, command_completer)
5811         (signal_completer, reg_or_group_completer): Update prototypes.
5812         (completion_tracker_t, new_completion_tracker)
5813         (make_cleanup_free_completion_tracker): Delete.
5814         (enum maybe_add_completion_enum): Delete.
5815         (maybe_add_completion): Delete.
5816         (throw_max_completions_reached_error): Delete.
5817         * corefile.c (complete_set_gnutarget): Adjust to work with a
5818         completion_tracker instead of a VEC.
5819         * cp-abi.c (cp_abi_completer): Adjust to work with a
5820         completion_tracker instead of a VEC.
5821         * d-lang.c (d_language_defn): Adjust.
5822         * disasm.c (disassembler_options_completer): Adjust to work with a
5823         completion_tracker instead of a VEC.
5824         * f-lang.c (f_make_symbol_completion_list): Rename to ...
5825         (f_collect_symbol_completion_matches): ... this.  Adjust to work
5826         with a completion_tracker instead of a VEC.
5827         (f_language_defn): Adjust.
5828         * go-lang.c (go_language_defn): Adjust.
5829         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
5830         Adjust to work with a completion_tracker instead of a VEC.
5831         * infrun.c (handle_completer): Likewise.
5832         * interps.c (interpreter_completer): Likewise.
5833         * interps.h (interpreter_completer): Likewise.
5834         * language.c (unknown_language_defn, auto_language_defn)
5835         (local_language_defn): Adjust.
5836         * language.h (language_defn::la_make_symbol_completion_list):
5837         Rename to ...
5838         (language_defn::la_collect_symbol_completion_matches): ... this
5839         and adjust to work with a completion_tracker instead of a VEC.
5840         * m2-lang.c (m2_language_defn): Adjust.
5841         * objc-lang.c (objc_language_defn): Adjust.
5842         * opencl-lang.c (opencl_language_defn): Adjust.
5843         * p-lang.c (pascal_language_defn): Adjust.
5844         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
5845         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
5846         with a completion_tracker.
5847         * rust-lang.c (rust_language_defn): Adjust.
5848         * symtab.c (free_completion_list, do_free_completion_list)
5849         (return_val, completion_tracker): Delete.
5850         (completion_list_add_name, completion_list_add_symbol)
5851         (completion_list_add_msymbol, completion_list_objc_symbol)
5852         (completion_list_add_fields, add_symtab_completions): Add
5853         completion_tracker parameter and use it.
5854         (default_make_symbol_completion_list_break_on_1): Rename to...
5855         (default_collect_symbol_completion_matches_break_on): ... this.
5856         Add completion_tracker parameter and use it instead of allocating
5857         a completion tracker here.
5858         (default_make_symbol_completion_list_break_on): Delete old
5859         implementation.
5860         (default_make_symbol_completion_list): Delete.
5861         (default_collect_symbol_completion_matches): New.
5862         (make_symbol_completion_list): Delete.
5863         (collect_symbol_completion_matches): New.
5864         (make_symbol_completion_type): Rename to ...
5865         (collect_symbol_completion_matches_type): ... this.  Add
5866         completion_tracker parameter and use it instead of VEC.
5867         (make_file_symbol_completion_list_1): Rename to...
5868         (collect_file_symbol_completion_matches): ... this.  Add
5869         completion_tracker parameter and use it instead of VEC.
5870         (make_file_symbol_completion_list): Delete.
5871         (add_filename_to_list): Use completion_list instead of a VEC.
5872         (add_partial_filename_data::list): Now a completion_list.
5873         (make_source_files_completion_list): Work with a completion_list
5874         instead of a VEC.
5875         * symtab.h: Include "completer.h".
5876         (default_make_symbol_completion_list_break_on)
5877         (default_make_symbol_completion_list, make_symbol_completion_list)
5878         (make_symbol_completion_type, make_file_symbol_completion_list)
5879         (make_source_files_completion_list): Delete.
5880         (default_collect_symbol_completion_matches_break_on)
5881         (default_collect_symbol_completion_matches)
5882         (collect_symbol_completion_matches)
5883         (collect_symbol_completion_matches_type)
5884         (collect_file_symbol_completion_matches)
5885         (make_source_files_completion_list): New.
5886         * top.c (init_main): Don't install a rl_completion_entry_function
5887         hook.  Install a rl_attempted_completion_function hook instead.
5888         * tui/tui-layout.c (layout_completer): Adjust to work with a
5889         completion_tracker.
5890         * tui/tui-regs.c (tui_reggroup_completer):
5891         * tui/tui-win.c (window_name_completer, focus_completer)
5892         (winheight_completer): Adjust to work with a completion_tracker.
5893         * value.c: Include "completer.h".
5894         (complete_internalvar): Adjust to work with a completion_tracker.
5895         * value.h (complete_internalvar): Likewise.
5896
5897 2017-07-17  Pedro Alves  <palves@redhat.com>
5898
5899         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
5900         renames.
5901         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
5902         comments to completer_ftype's declaration.
5903         <completer_handle_brkchars>: Change type to
5904         completer_handle_brkchars_ftype.
5905         * command.h (completer_ftype): Add describing comment and give
5906         names to parameters.
5907         (completer_ftype_void): Rename to ...
5908         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
5909         (set_cmd_completer_handle_brkchars): Adjust.
5910         * completer.c (filename_completer_handle_brkchars): New function.
5911         (complete_line_internal_normal_command): New function, factored
5912         out from ...
5913         (complete_line_internal): ... here.
5914         (command_completer_handle_brkchars)
5915         (default_completer_handle_brkchars)
5916         (completer_handle_brkchars_func_for_completer): New functions.
5917         * completer.h (set_gdb_completion_word_break_characters): Delete
5918         declaration.
5919         (completer_handle_brkchars_func_for_completer): New declaration.
5920         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
5921         completer_handle_brkchars_func_for_completer.
5922
5923 2017-07-17  Pedro Alves  <palves@redhat.com>
5924
5925         * completer.c (symbol_completer): New function, based on
5926         make_symbol_completion_list_fn.
5927         * completer.h (symbol_completer): New declaration.
5928         * guile/scm-cmd.c (cmdscm_completers): Adjust.
5929         * python/py-cmd.c (completers): Adjust.
5930         * symtab.c (make_symbol_completion_list_fn): Delete.
5931         * symtab.h (make_symbol_completion_list_fn): Delete.
5932         * cli/cli-decode.c (add_cmd): Adjust.
5933
5934 2017-07-17  Pedro Alves  <palves@redhat.com>
5935
5936         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
5937         * dwarf2read.c: Include "filename-seen-cache.h".
5938         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
5939         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
5940         * filename-seen-cache.c: New file.
5941         * filename-seen-cache.h: New file.
5942         * symtab.c: Include "filename-seen-cache.h".
5943         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
5944         (create_filename_seen_cache, clear_filename_seen_cache)
5945         (delete_filename_seen_cache, filename_seen): Delete, parts moved
5946         to filename-seen-cache.h/filename-seen-cache.c.
5947         (output_source_filename, sources_info)
5948         (maybe_add_partial_symtab_filename)
5949         (make_source_files_completion_list): Adjust to use
5950         filename_seen_cache.
5951
5952 2017-07-17  Pedro Alves  <palves@redhat.com>
5953
5954         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
5955         fields.
5956         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
5957         dwarf2_debug_sections*)): New.
5958         (dwarf2_per_objfile::dwarf2_per_objfile(const
5959         dwarf2_per_objfile&)): Declare as deleted.
5960         (dwarf2_per_objfile::operator=): Declare as deleted.
5961         (dwarf2_per_objfile::dwarf2_per_objfile)
5962         (dwarf2_per_objfile::~dwarf2_per_objfile)
5963         (dwarf2_per_objfile::free_cached_comp_units): New.
5964         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
5965         ctor.  Call dwarf2_per_objfile's ctor manually.
5966         (dwarf2_locate_sections): Deleted/refactored as ...
5967         (dwarf2_per_objfile::locate_sections): ... this new method.
5968         (free_cached_comp_units): Defer to
5969         dwarf2_per_objfile::free_cached_comp_units.
5970         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
5971
5972 2017-07-14  Tom Tromey  <tom@tromey.com>
5973
5974         PR rust/21764:
5975         * rust-exp.y (convert_ast_to_expression): Add "want_type"
5976         parameter.
5977         <UNOP_SIZEOF>: Split into separate case.
5978         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
5979
5980 2017-07-14  Tom Tromey  <tom@tromey.com>
5981
5982         PR rust/21763:
5983         * symtab.c (symbol_matches_domain): Add language_rust to special
5984         case.
5985         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
5986         treat LOC_TYPEDEF symbols as variables.
5987
5988 2017-07-14  Pedro Alves  <palves@redhat.com>
5989
5990         * symtab.c (make_file_symbol_completion_list_1): Iterate over
5991         symtabs matching all symtabs with SRCFILE as file name instead of
5992         only considering the first hit, with lookup_symtab.
5993
5994 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
5995
5996         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
5997         operator_name parameters.
5998         (gen_expr): Update function call.
5999
6000 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6001
6002         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6003         parameter.
6004         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6005         Likewise.
6006         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6007         parameter, use agent_expr::gdbarch instead, update function
6008         calls.
6009         (locexpr_tracepoint_var_ref): Likewise.
6010         (loclist_tracepoint_var_ref): Likewise.
6011         * ax-gdb.c (gen_trace_static_fields): Likewise.
6012         (gen_traced_pop): Likewise.
6013         (gen_frame_args_address): Likewise.
6014         (gen_frame_locals_address): Likewise.
6015         (gen_var_ref): Likewise.
6016         (gen_struct_ref_recursive): Likewise.
6017         (gen_static_field): Likewise.
6018         (gen_maybe_namespace_elt): Likewise.
6019         (gen_expr): Likewise.
6020         (gen_trace_for_var): Likewise.
6021         (gen_trace_for_expr): Likewise.
6022         (gen_trace_for_return_address): Likewise.
6023
6024 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6025
6026         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
6027         parameter.
6028         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
6029
6030 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
6031
6032         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
6033         from ax, update calls.
6034         (gen_usual_arithmetic): Likewise.
6035         (gen_integral_promotions): Likewise.
6036         (gen_bitfield_ref): Likewise.
6037         (gen_primitive_field): Likewise.
6038         (gen_struct_ref_recursive): Likewise.
6039         (gen_struct_ref): Likewise.
6040         (gen_maybe_namespace_elt): Likewise.
6041         (gen_struct_elt_for_reference): Likewise.
6042         (gen_namespace_elt): Likewise.
6043         (gen_aggregate_elt_ref): Likewise.
6044         (gen_expr): Get gdbarch from ax, update calls.
6045         (gen_expr_binop_rest): Likewise.
6046
6047 2017-07-13  Pedro Alves  <palves@redhat.com>
6048
6049         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
6050         as default tdesc.
6051         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
6052         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
6053         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
6054         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
6055         tdep.
6056         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
6057         Get final tdesc from the tdep.
6058         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
6059         default tdesc.
6060         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6061         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6062         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
6063         Use it as default tdesc.
6064         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
6065         down to amd_init_abi.  No longer handle fallback tdesc here.
6066         * amd64-tdep.h (tdesc_x32): Declare.
6067         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
6068         parameter.
6069         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
6070         as default tdesc.
6071
6072 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6073
6074         * s390-linux-tdep.c (s390_process_record): Add support for
6075         instructions new in arch12.
6076
6077 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6078
6079         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
6080         PT_GETFSBASE and PT_GETGSBASE.
6081         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
6082         PT_SETGSBASE.
6083
6084 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
6085
6086         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
6087         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
6088         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
6089         those rules.
6090         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
6091         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
6092         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
6093         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
6094         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
6095         * features/i386/amd64.xml: Add 64bit-segments.xml.
6096         * features/i386/amd64-avx-avx512.c: Regenerated.
6097         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
6098         * features/i386/amd64-avx-mpx.c: Regenerated.
6099         * features/i386/amd64-avx.c: Regenerated.
6100         * features/i386/amd64-mpx.c: Regenerated.
6101         * features/i386/amd64.c: Regenerated.
6102         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
6103         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6104         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
6105         * regformats/i386/amd64-avx.dat: Regenerated.
6106         * regformats/i386/amd64-mpx.dat: Regenerated.
6107         * regformats/i386/amd64.dat: Regenerated.
6108
6109 2017-07-10  Yao Qi  <yao.qi@linaro.org>
6110
6111         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6112         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6113
6114 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
6115
6116         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
6117         unsetenv.
6118         * gnulib/aclocal.m4: Regenerate.
6119         * gnulib/config.in: Regenerate.
6120         * gnulib/configure: Regenerate.
6121         * gnulib/import/Makefile.am: Regenerate.
6122         * gnulib/import/Makefile.in: Regenerate.
6123         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6124         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6125         * gnulib/import/m4/environ.m4: New file.
6126         * gnulib/import/m4/setenv.m4: New file.
6127         * gnulib/import/setenv.c: New file.
6128         * gnulib/import/unsetenv.c: New file.
6129
6130 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
6131
6132         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
6133         address when op is DW_OP_addr.
6134
6135 2017-07-09  Tom Tromey  <tom@tromey.com>
6136
6137         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
6138         check and apply to outer type.
6139
6140 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6141
6142         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
6143         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
6144         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
6145         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
6146
6147 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6148
6149         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
6150
6151 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6152
6153         * corelow.c (get_core_siginfo): Remove.
6154         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
6155         instead of get_core_siginfo.
6156         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
6157         * gdbarch.h: Re-generate.
6158         * gdbarch.c: Re-generate.
6159         * linux-tdep.c (linux_core_xfer_siginfo): New.
6160         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
6161
6162 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6163
6164         * corelow.c (thread_section_name): Move to ...
6165         * gdbcore.h (thread_section_name): ... here.
6166
6167 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6168
6169         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
6170         (struct siginfo32): New.
6171         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
6172         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
6173         via ptrace(PT_LWPINFO).
6174
6175 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
6176
6177         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
6178         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
6179         (fbsd_get_siginfo_type): New.
6180         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
6181         (_initialize_fbsd_tdep): New.
6182
6183 2017-07-06  David Blaikie  <dblaikie@gmail.com>
6184
6185         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
6186         a singular dwo_unit*) to support multiple CUs in the same way that
6187         multiple TUs are supported.
6188         (create_cus_hash_table): Replace create_dwo_cu with a function for
6189         parsing multiple CUs from a DWO file.
6190         (open_and_init_dwo_file): Use create_cus_hash_table rather than
6191         create_dwo_cu.
6192         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
6193         htab_find, rather than comparing the signature to a singleton CU in
6194         the dwo_file.
6195
6196 2017-07-06  Pedro Alves  <palves@redhat.com>
6197
6198         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
6199
6200 2017-07-04  Pedro Alves  <palves@redhat.com>
6201
6202         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
6203         * gdbtypes.h (TYPE_STATIC): Delete.
6204         (struct fn_field) <is_public, is_abstract, is_static, is_final,
6205         is_synchronized, is_native>: Delete.
6206         <dummy>: Bump.
6207         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
6208         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
6209         (TYPE_FN_FIELD_ABSTRACT): Delete.
6210
6211 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
6212
6213         * buffer.h (buffer_finish): Fix spelling mistakes.
6214
6215 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
6216
6217         * .dir-locals.el: Automatically switch to C-style comments in
6218         versions of Emacs that support the feature.
6219
6220 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6221             Pedro Alves  <palves@redhat.com>
6222
6223         PR cli/21688
6224         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
6225         (process_next_line): New variable 'inline_cmd'.
6226         Adjust 'if' clauses for "python", "compile" and "guile" to use
6227         'command_name_equals' and check for '!inline_cmd'.
6228
6229 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
6230
6231         PR cli/21688
6232         * cli/cli-script.c (command_name_equals_not_inline): New function.
6233         (process_next_line): Adjust 'if' clauses for "python", "compile"
6234         and "guile" to use command_name_equals_not_inline.
6235
6236 2017-06-29  Pedro Alves  <palves@redhat.com>
6237
6238         * completer.c (expression_completer): Call
6239         linespec_location_completer instead of location_completer.
6240
6241 2017-06-29  Pedro Alves  <palves@redhat.com>
6242
6243         * completer.c (expression_completer): Remove code that recomputes
6244         'text' from 'word'.
6245
6246 2017-06-29  Yao Qi  <yao.qi@linaro.org>
6247
6248         * regformats/regdat.sh: Generate code with
6249         "ifndef IN_PROCESS_AGENT".
6250
6251 2017-06-28  Pedro Alves  <palves@redhat.com>
6252
6253         * command.h: Include "common/scoped_restore.h".
6254
6255 2017-06-28  Yao Qi  <yao.qi@linaro.org>
6256
6257         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
6258         instead of obstack_grow.
6259
6260 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
6261
6262         PR gdb/21337
6263         * symfile.c (reread_symbols): Call objfiles_changed just before
6264         read_symbols.
6265
6266 2017-06-27  Pedro Alves  <palves@redhat.com>
6267
6268         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
6269         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
6270         (completion_list_add_symbol, completion_list_add_msymbol):
6271         ... these new functions.
6272         (add_symtab_completions)
6273         (default_make_symbol_completion_list_break_on_1): Adjust.
6274
6275 2017-06-27  Pedro Alves  <palves@redhat.com>
6276
6277         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
6278         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
6279         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
6280         dtor.
6281         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
6282         'storage_obstack' field an auto_obstack.  In-class initialize all
6283         non-bitfield fields.  Make minsyms_read bool.
6284         * symfile.c (read_symbols): Adjust.
6285
6286 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
6287
6288         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
6289         (gdbsim_store_register): Likewise.
6290
6291 2017-06-27  Pedro Alves  <palves@redhat.com>
6292
6293         * c-exp.y (name_obstack): Now an auto_obstack.
6294         (yylex): Use auto_obstack::clear.
6295         (c_parse): Use auto_obstack::clear instead of reinitializing and
6296         freeing the obstack.
6297         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
6298         * d-exp.y (name_obstack): Now an auto_obstack.
6299         (yylex): Use auto_obstack::clear.
6300         (d_parse): Use auto_obstack::clear instead of reinitializing and
6301         freeing the obstack.
6302         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
6303         auto_obstack.
6304         * dwarf2read.c (create_addrmap_from_index)
6305         (dwarf2_build_psymtabs_hard)
6306         (update_enumeration_type_from_children): Likewise.
6307         * gdb_obstack.h (auto_obstack): New type.
6308         * go-exp.y (name_obstack): Now an auto_obstack.
6309         (build_packaged_name): Use auto_obstack::clear.
6310         (go_parse): Use auto_obstack::clear instead of reinitializing and
6311         freeing the obstack.
6312         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
6313         auto_obstack.
6314         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
6315         * rust-exp.y (work_obstack): Now an auto_obstack.
6316         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
6317         reinitializing and freeing the obstack.
6318         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
6319         (host_char_to_target): Use auto_obstack.
6320         * utils.h (make_cleanup_obstack_free): Delete declaration.
6321         * valprint.c (generic_emit_char, generic_printstr): Use
6322         auto_obstack.
6323
6324 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6325
6326         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
6327         thread.
6328         (darwin_init_thread_list): Don't update dummy thread.
6329         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
6330
6331 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6332
6333         * record-full.c (netorder16): Remove.
6334
6335 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6336
6337         * common/diagnostics.h: Define macros for GCC.
6338         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
6339         * common/vec.h: Include diagnostics.h.
6340         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
6341         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
6342         warning.
6343
6344 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
6345
6346         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
6347         New macro.
6348         * ada-lex.l: Ignore deprecated register warnings.
6349
6350 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6351
6352         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
6353         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
6354
6355 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6356
6357         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
6358         its own line.
6359
6360 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
6361
6362         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
6363
6364 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
6365
6366         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
6367         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
6368         (xtensa_register_read_masked): Likewise.
6369
6370 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6371
6372         * common/environ.c (gdb_environ::unset): Update comment.
6373
6374 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6375
6376         * python/py-unwind.c (pyuw_sniffer): Allocate space for
6377         registers.
6378
6379 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6380
6381         * record-full.c (record_full_exec_insn): Use byte_vector.
6382
6383 2017-06-22  Yao Qi  <yao.qi@linaro.org>
6384
6385         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
6386         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
6387
6388 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
6389
6390         * remote.c (cached_reg): Move from here...
6391         * regcache.h (cached_reg): ...to here.
6392         * python/py-unwind.c (struct reg_info): Remove.
6393         (cached_frame_info): Use cached_reg_t.
6394         (pyuw_prev_register): Likewise.
6395         (pyuw_sniffer): Use cached_reg_t and allocate registers.
6396         (pyuw_dealloc_cache): Free all registers.
6397
6398 2017-06-22  Pedro Alves  <palves@redhat.com>
6399             Simon Marchi  <simon.marchi@ericsson.com>
6400
6401         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
6402         warning.
6403         * common/diagnostics.h: New file.
6404
6405 2017-06-22  Pedro Alves  <palves@redhat.com>
6406
6407         * common/agent.h: Add include guards.
6408
6409 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
6410
6411         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
6412         talk about addressable units instead of bytes.
6413
6414 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6415
6416         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
6417         of '::const_iterator'.
6418
6419 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
6420
6421         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6422         'unittests/environ-selftests.c'.
6423         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
6424         * charset.c (find_charset_names): Declare object 'iconv_env'.
6425         Update code to use 'iconv_env' object.  Remove call to
6426         'free_environ'.
6427         * common/environ.c: Include <utility>.
6428         (make_environ): Delete function.
6429         (free_environ): Delete function.
6430         (gdb_environ::clear): New function.
6431         (gdb_environ::operator=): New function.
6432         (gdb_environ::get): Likewise.
6433         (environ_vector): Delete function.
6434         (set_in_environ): Delete function.
6435         (gdb_environ::set): New function.
6436         (unset_in_environ): Delete function.
6437         (gdb_environ::unset): New function.
6438         (gdb_environ::envp): Likewise.
6439         * common/environ.h: Include <vector>.
6440         (struct gdb_environ): Delete; transform into...
6441         (class gdb_environ): ... this class.
6442         (free_environ): Delete prototype.
6443         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
6444         environ_vector): Likewise.
6445         * infcmd.c (run_command_1): Update code to call
6446         'envp' from 'gdb_environ' class.
6447         (environment_info): Update code to call methods from 'gdb_environ'
6448         class.
6449         (unset_environment_command): Likewise.
6450         (path_info): Likewise.
6451         (path_command): Likewise.
6452         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
6453         (inferior::inferior): Initialize 'environment' using the host's
6454         information.
6455         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
6456         Include "environ.h".
6457         (class inferior) <environment>: Change type from 'struct
6458         gdb_environ' to 'gdb_environ'.
6459         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
6460         methods from 'gdb_environ' class.
6461         * solib.c (solib_find_1): Likewise
6462         * unittests/environ-selftests.c: New file.
6463
6464 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6465
6466         * features/i386/i386-linux.xml: Exchange the order of including
6467         32bit-linux.xml and 32bit-sse.xml.
6468         * features/i386/i386-linux.c: Regenerated.
6469
6470 2017-06-20  Yao Qi  <yao.qi@linaro.org>
6471
6472         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
6473         Delete copy ctor and assignment operator.
6474         (tdesc_type): Likewise.
6475         (tdesc_feature): Likewise.
6476         (tdesc_free_reg): Remove.
6477         (tdesc_create_reg): Use new.
6478         (tdesc_free_type): Remove.
6479         (tdesc_create_vector): Use new.
6480         (tdesc_create_union): Likewise.
6481         (tdesc_create_flags): Likewise.
6482         (tdesc_create_enum): Likewise.
6483         (tdesc_free_feature): Delete.
6484         (free_target_description): Use delete.
6485
6486 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
6487
6488         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
6489         registers.
6490
6491 2017-06-19  Pedro Alves  <palves@redhat.com>
6492
6493         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
6494         after gdb::unlinker.
6495
6496 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
6497
6498         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
6499         gdb_environ to access an environment variable.
6500
6501 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
6502
6503         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
6504         gdb_byte*.
6505
6506 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6507
6508         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
6509
6510 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6511
6512         * configure: Re-generate.
6513         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
6514
6515 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6516
6517         * configure: Re-generate.
6518         * warning.m4: Pass -Werror to compiler when checking for
6519         supported warning flags.
6520
6521 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
6522
6523         * Makefile.in (COMPILE.pre): Add "-x c++".
6524
6525 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
6526             Pedro Alves  <palves@redhat.com>
6527             Yao Qi  <yao.qi@linaro.org>
6528
6529         * defs.h (RequireLongest): New.
6530         (extract_integer): Declare function template.
6531         (extract_signed_integer): Remove the declaration, but define it
6532         static inline.
6533         (extract_unsigned_integer): Likewise.
6534         (store_integer): Declare function template.
6535         (store_signed_integer): Remove the declaration, but define it
6536         static inline.
6537         (store_unsigned_integer): Likewise.
6538         * findvar.c (extract_integer): New function template.
6539         (extract_signed_integer): Remove.
6540         (extract_unsigned_integer): Remove.
6541         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
6542         instantiations.
6543         (store_integer): New function template.
6544         (store_signed_integer): Remove.
6545         (store_unsigned_integer): Remove.
6546         (store_integer): Explicit instantiations.
6547         * regcache.c (regcache_raw_read_signed): Update.
6548         (regcache::raw_read): New function.
6549         (regcache::raw_read_signed): Remove.
6550         (regcache::raw_read_unsigned): Remove.
6551         (regcache_raw_read_unsigned): Update.
6552         (regcache_raw_write_unsigned): Update.
6553         (regcache::raw_write_signed): Remove.
6554         (regcache::raw_write): New function.
6555         (regcache_cooked_read_signed): Update.
6556         (regcache::raw_write_unsigned): Remove.
6557         (regcache::cooked_read_signed): Remove.
6558         (regcache_cooked_read_unsigned): Update.
6559         (regcache::cooked_read_unsigned): Remove.
6560         (regcache_cooked_write_signed): Update.
6561         (regcache_cooked_write_unsigned): Update.
6562         * regcache.h (regcache) <raw_read_signed>: Remove.
6563         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
6564         <raw_read, raw_write>: New.
6565         <cooked_read_signed, cooked_write_signed>: Remove.
6566         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
6567         <cooked_read, cooked_write>: New.
6568         * sh64-tdep.c (sh64_pseudo_register_read): Update.
6569         (sh64_pseudo_register_write): Update.
6570
6571 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
6572
6573         * arc-tdep.c (arc_disassembler_options): New variable.
6574         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
6575         of default_print_insn.
6576         (arc_delayed_print_insn): Set info->section when needed,
6577         use default_print_insn to retrieve a disassembler.
6578
6579 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
6580
6581         PR gdb/21574
6582         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
6583         to mention $SHELL and startup-with-shell.
6584
6585 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
6586
6587         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
6588
6589 2017-06-14  Yao Qi  <yao.qi@linaro.org>
6590
6591         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
6592         default_print_insn instead of print_insn_aarch64.
6593         * arm-tdep.c (gdb_print_insn_arm): Call
6594         default_print_insn instead of print_insn_big_arm
6595         and print_insn_little_arm.
6596         * i386-tdep.c (i386_print_insn): Call default_print_insn
6597         instead of print_insn_i386.
6598         * ia64-tdep.c (ia64_print_insn): Call
6599         default_print_insn instead of print_insn_ia64.
6600         * mips-tdep.c (gdb_print_insn_mips): Call
6601         default_print_insn instead of print_insn_big_mips
6602         and print_insn_little_mips.
6603         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
6604         instead of print_insn_spu.
6605
6606 2017-06-14  Pedro Alves  <palves@redhat.com>
6607
6608         * ada-lang.c: Include "common/byte-vector.h".
6609         (ada_value_primitive_packed_val): Use gdb::byte_vector.
6610         * charset.c (wchar_iterator::iterate): Resize the vector instead
6611         of reserving it.
6612         * common/byte-vector.h: Include "common/def-vector.h".
6613         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
6614         * cli/cli-dump.c: Include "common/byte-vector.h".
6615         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
6616         * common/byte-vector.h: New file.
6617         * common/def-vector.h: New file.
6618         * common/default-init-alloc.h: New file.
6619         * dwarf2loc.c: Include "common/byte-vector.h".
6620         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
6621         instead of reserving it.
6622         * dwarf2read.c: Include "common/byte-vector.h".
6623         (data_buf::m_vec): Now a gdb::byte_vector.
6624         * gdb_regex.c: Include "common/def-vector.h".
6625         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
6626         * mi/mi-main.c: Include "common/byte-vector.h".
6627         (mi_cmd_data_read_memory): Use gdb::byte_vector.
6628         * printcmd.c: Include "common/byte-vector.h".
6629         (print_scalar_formatted): Use gdb::byte_vector.
6630         * valprint.c: Include "common/byte-vector.h".
6631         (maybe_negate_by_bytes, print_decimal_chars): Use
6632         gdb::byte_vector.
6633
6634 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6635
6636         * darwin-nat.c: Include "nat/fork-inferior.h".
6637
6638 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6639
6640         * configure.nat: Factor out Darwin bits that are not
6641         architecture-specific.  Add fork-inferior.o.
6642
6643 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6644
6645         * configure.nat: Factor out AIX bits that are not
6646         architecture-specific.  Add fork-inferior.o.
6647
6648 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6649
6650         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
6651         (read_pieced_value, write_pieced_value): ...here.  Reduce to
6652         wrappers that just call rw_pieced_value.
6653
6654 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6655
6656         * dwarf2loc.c (write_pieced_value): When writing the data for a
6657         memory piece, use write_memory_with_notification instead of
6658         write_memory.
6659
6660 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6661
6662         * valops.c (read_value_memory): Change embedded_offset to
6663         represent a bit offset instead of a byte offset.
6664         * value.h (read_value_memory): Adjust comment.
6665
6666 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6667
6668         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
6669         dest_offset_bits and source_offset_bits.
6670         (write_pieced_value): Likewise.
6671
6672 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6673
6674         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
6675         given by DW_OP_bit_piece.
6676         (write_pieced_value): Likewise.
6677
6678 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6679
6680         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
6681         some other preparations to the places where sufficient information
6682         is available.
6683         (write_pieced_value): Likewise.
6684
6685 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6686
6687         * dwarf2loc.c (bits_to_bytes): New function.
6688         (read_pieced_value): Fix offset calculations for register pieces
6689         on big-endian targets.
6690         (write_pieced_value): Likewise.
6691
6692 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6693
6694         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
6695         (write_pieced_value): Likewise.
6696
6697 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6698
6699         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
6700         transfer the source value's least significant bits, instead of its
6701         lowest-addressed ones.  Rename type_len to max_offset.
6702         (read_pieced_value): Mirror above changes to write_pieced_value as
6703         applicable.
6704
6705 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6706
6707         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
6708         truncate full bytes from dest_offset_bits before using it as an
6709         offset into the buffer.
6710
6711 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6712
6713         * dwarf2loc.c (write_pieced_value): Include transfer size in
6714         byte-wise check.
6715
6716 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6717
6718         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
6719         calculation of this_size.
6720
6721 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6722
6723         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
6724         when targeting a bit-field.
6725         (write_pieced_value): Likewise.
6726
6727 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6728
6729         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
6730         (allocate_piece_closure): Drop addr_size parameter.
6731         (dwarf2_evaluate_loc_desc_full): Adjust call to
6732         allocate_piece_closure.
6733
6734 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6735
6736         PR gdb/21226
6737         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
6738         the LSB end, independent of endianness.
6739
6740 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6741
6742         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
6743         size capping.
6744
6745 2017-06-13  Yao Qi  <yao.qi@linaro.org>
6746
6747         * mips-linux-nat.c: Move include features/mips*-linux.c to
6748         mips-linux-tdep.c.
6749         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
6750         to mips-linux-tdep.c.
6751         * mips-linux-tdep.c: Include features/mips*-linux.c
6752         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
6753         functions.
6754         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
6755         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
6756         (tdesc_mips64_dsp_linux): Declare.
6757
6758 2017-06-12  Tom Tromey  <tom@tromey.com>
6759
6760         * valprint.h (val_print_type_code_int): Remove.
6761         * valprint.c (generic_val_print_int): Always call
6762         val_print_scalar_formatted.
6763         (val_print_type_code_int): Remove.
6764         * printcmd.c (print_scalar_formatted): Handle options->format==0.
6765         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
6766         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
6767         * ada-valprint.c (ada_val_print_num): Use
6768         val_print_scalar_formatted.
6769
6770 2017-06-12  Tom Tromey  <tom@tromey.com>
6771
6772         * printcmd.c (print_scalar_formatted): Unify the two switches.
6773         Don't convert scalars to LONGEST.
6774
6775 2017-06-12  Tom Tromey  <tom@tromey.com>
6776
6777         PR exp/16225:
6778         * valprint.h (print_decimal_chars): Update.
6779         * valprint.c (maybe_negate_by_bytes): New function.
6780         (print_decimal_chars): Add "is_signed" argument.
6781         * printcmd.c (print_scalar_formatted): Update.
6782
6783 2017-06-12  Tom Tromey  <tom@tromey.com>
6784
6785         PR exp/16225:
6786         * valprint.h (print_binary_chars, print_hex_chars): Update.
6787         * valprint.c (val_print_type_code_int): Update.
6788         (print_binary_chars): Add "zero_pad" argument.
6789         (emit_octal_digit): New function.
6790         (print_octal_chars): Don't zero-pad.
6791         (print_decimal_chars): Likewise.
6792         (print_hex_chars): Add "zero_pad" argument.
6793         * sh64-tdep.c (sh64_do_fp_register): Update.
6794         * regcache.c (regcache::dump): Update.
6795         * printcmd.c (print_scalar_formatted): Update.
6796         * infcmd.c (default_print_one_register_info): Update.
6797
6798 2017-06-12  Pedro Alves  <palves@redhat.com>
6799             Alan Hayward  <alan.hayward@arm.com>
6800
6801         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
6802         (mips_eabi_push_dummy_call): Rename local 'regsize' to
6803         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
6804         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
6805         Assert that abi_regsize bytes fit in 'ref_valbuf'.
6806
6807 2017-06-12  Pedro Alves  <palves@redhat.com>
6808
6809         * dwarf2read.c (mapped_symtab::data): Now a vector of
6810         symtab_index_entry instead of vector of
6811         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
6812         whether an element's name is NULL instead of checking whether the
6813         element itself is NULL.
6814         (find_slot): Change return type.  Adjust.
6815         (hash_expand, , add_index_entry, uniquify_cu_indices)
6816         (write_hash_table): Adjust.
6817
6818 2017-06-12  Pedro Alves  <palves@redhat.com>
6819
6820         * dwarf2read.c (recursively_count_psymbols): New function.
6821         (write_psymtabs_to_index): Call it to compute number of psyms and
6822         pass estimate size of psyms_seen to unordered_set's ctor.
6823
6824 2017-06-12  Pedro Alves  <palves@redhat.com>
6825
6826         * dwarf2read.c (write_hash_table): Check if key already exists
6827         before emplacing.
6828
6829 2017-06-12  Pedro Alves  <palves@redhat.com>
6830
6831         * dwarf2read.c (data_buf::append_space): Rename to...
6832         (data_buf::grow): ... this, and make private.  Adjust all callers.
6833         (data_buf::append_uint): New method.
6834         (add_address_entry, write_one_signatured_type)
6835         (write_psymtabs_to_index): Use it.
6836
6837 2017-06-12  Pedro Alves  <palves@redhat.com>
6838
6839         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
6840         (file_write (FILE *, const std::vector<Elem>&)): Delete.
6841         (data_buf::file_write): Call ::fwrite directly.
6842
6843 2017-06-12  Pedro Alves  <palves@redhat.com>
6844
6845         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
6846         std::vector::erase.
6847
6848 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
6849
6850         Code cleanup: C++ify .gdb_index producer.
6851         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
6852         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
6853         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
6854         (create_strtab, add_string): Remove.
6855         (file_write, data_buf): New.
6856         (struct symtab_index_entry): Use std::vector for cu_indices.
6857         (struct mapped_symtab): Use std::vector for data.
6858         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
6859         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
6860         Remove.
6861         (find_slot): Change return type.  Update it to the new data structures.
6862         (hash_expand, add_index_entry): Update it to the new data structures.
6863         (offset_type_compare): Remove.
6864         (uniquify_cu_indices): Update it to the new data structures.
6865         (c_str_view, c_str_view_hasher, vector_hasher): New.
6866         (add_indices_to_cpool): Remove.
6867         (write_hash_table): Update it to the new data structures.
6868         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
6869         (eq_psymtab_cu_index): Remove.
6870         (psym_index_map): New typedef.
6871         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
6872         reference and std::unordered_map for cu_index_htab.
6873         (add_address_entry, add_address_entry_worker, write_address_map)
6874         (write_psymbols): Update it to the new data structures.
6875         (write_obstack): Remove.
6876         (struct signatured_type_index_data): Change types_list to a data_buf
6877         reference and psyms_seen to a std::unordered_set reference.
6878         (write_one_signatured_type, recursively_write_psymbols)
6879         (write_psymtabs_to_index): Update it to the new data structures.
6880
6881 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6882
6883         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
6884         separate-debug-file commands.
6885         * symfile.h (separate_debug_file_debug): New global.
6886         * symfile.c (separate_debug_file_debug): New global.
6887         (separate_debug_file_exists, find_separate_debug_file): Add
6888         debug output.
6889         (_initialize_symfile): Add "set debug separate-debug-file"
6890         command.
6891         * build-id.c (build_id_to_debug_bfd,
6892         find_separate_debug_file_by_buildid): Add debug output.
6893
6894 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6895
6896         * gdbarch.sh (displaced_step_free_closure): Remove.
6897         * gdbarch.h, gdbarch.c: Re-generate.
6898         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
6899         displaced_step_free_closure.
6900         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
6901         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
6902         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6903         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6904         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6905         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
6906         * arch-utils.h (simple_displaced_step_free_closure): Remove.
6907         * arch-utils.c (simple_displaced_step_free_closure): Remove.
6908         * infrun.c (displaced_step_clear): Call xfree instead of
6909         gdbarch_displaced_step_free_closure.
6910
6911 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
6912
6913         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
6914         NULL".
6915
6916 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
6917
6918         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
6919         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
6920         (mn10300_push_dummy_call): Likewise.
6921
6922 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6923
6924         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
6925
6926 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
6927
6928         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
6929
6930 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6931
6932         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
6933         able to start inferiors using a shell.
6934         (New remote packets): Announce new packet "QStartupWithShell".
6935         * remote.c: Add PACKET_QStartupWithShell.
6936         (extended_remote_create_inferior): Handle new
6937         PACKET_QStartupWithShell.
6938         (remote_protocol_features) <QStartupWithShell>: New entry for
6939         PACKET_QStartupWithShell.
6940         (_initialize_remote): Call "add_packet_config_cmd" for
6941         QStartupShell.
6942
6943 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
6944             Pedro Alves  <palves@redhat.com>
6945
6946         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
6947         and "nat/fork-inferior.h".
6948         * common/common-inferior.h: New file, with contents from
6949         "gdb/inferior.h".
6950         * commom/common-utils.c: Include "common-utils.h".
6951         (stringify_argv): New function.
6952         * common/common-utils.h (stringify_argv): New prototype.
6953         * configure.nat: Add "fork-inferior.o" as a dependency for
6954         "*linux*", "fbsd*" and "nbsd*" hosts.
6955         * corefile.c (get_exec_file): Update comment.
6956         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
6957         instead of "startup_inferior".
6958         (darwin_create_inferior): Call "add_thread_silent" after
6959         "fork_inferior".
6960         * fork-child.c: Cleanup unnecessary includes.
6961         (SHELL_FILE): Move to "common/common-fork-child.c".
6962         (environ): Likewise.
6963         (exec_wrapper): Initialize.
6964         (get_exec_wrapper): New function.
6965         (breakup_args): Move to "common/common-fork-child.c"; rename to
6966         "breakup_args_for_exec".
6967         (escape_bang_in_quoted_argument): Move to
6968         "common/common-fork-child.c".
6969         (saved_ui): New variable.
6970         (prefork_hook): New function.
6971         (postfork_hook): Likewise.
6972         (postfork_child_hook): Likewise.
6973         (gdb_startup_inferior): Likewise.
6974         (fork_inferior): Move to "common/common-fork-child.c".  Update
6975         function to support gdbserver.
6976         (startup_inferior): Likewise.
6977         * gdbcore.h (get_exec_file): Remove declaration.
6978         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
6979         instead of "startup_inferior".  Call "add_thread_silent" after
6980         "fork_inferior".
6981         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
6982         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
6983         instead of "startup_inferior".  Call "add_thread_silent" after
6984         "fork_inferior".
6985         * inferior.h: Include "common-inferior.h".
6986         (trace_start_error): Move to "common/common-utils.h".
6987         (trace_start_error_with_name): Likewise.
6988         (fork_inferior): Move prototype to "nat/fork-inferior.h".
6989         (startup_inferior): Likewise.
6990         (gdb_startup_inferior): New prototype.
6991         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
6992         * nat/fork-inferior.h: New file.
6993         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
6994         instead of "startup_inferior".  Call "add_thread_silent" after
6995         "fork_inferior".
6996         * target.h (target_terminal_init): Move prototype to
6997         "target/target.h".
6998         (target_terminal_inferior): Likewise.
6999         (target_terminal_ours): Likewise.
7000         * target/target.h (target_terminal_init): New prototype, moved
7001         from "target.h".
7002         (target_terminal_inferior): Likewise.
7003         (target_terminal_ours): Likewise.
7004         * utils.c (gdb_flush_out_err): New function.
7005
7006 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7007
7008         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7009         * common/common-gdbthread.h: New file, with parts from
7010         "gdb/gdbthread.h".
7011         * gdbthread.h: Include "common-gdbthread.h".
7012         (switch_to_thread): Moved to "common/common-gdbthread.h".
7013
7014 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
7015
7016         * Makefile.in (SFILES): Add "common/job-control.c".
7017         (HFILES_NO_SRCDIR): Add "common/job-control.h".
7018         (COMMON_OBS): Add "job-control.o".
7019         * common/job-control.c: New file, with contents from
7020         "gdb/inflow.c".
7021         * common/job-control.h: New file, with contents from "terminal.h".
7022         * fork-child.c: Include "job-control.h".
7023         * inflow.c: Include "job-control.h".
7024         (gdb_setpgid): Move to "common/common-inflow.c".
7025         (_initialize_inflow): Move setting of "job_control" to
7026         "handle_job_control".
7027         * terminal.h (job_control): Moved to "common/common-terminal.h".
7028         (gdb_setpgid): Likewise.
7029         * top.c: Include "job_control.h".
7030         * utils.c: Likewise.
7031         (job_control): Moved to "job-control.c".
7032
7033 2017-06-07  Pedro Alves  <palves@redhat.com>
7034
7035         * Makefile.in (SFILES): Add gdb_regex.c.
7036         (COMMON_OBS): Add gdb_regex.o.
7037         * ada-lang.c (ada_add_standard_exceptions)
7038         (ada_add_exceptions_from_frame, name_matches_regex)
7039         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
7040         parameter type to compiled_regex.  Adjust.
7041         (ada_exceptions_list): Use compiled_regex.
7042         * break-catch-throw.c (exception_catchpoint::pattern): Now a
7043         std::unique_ptr<compiled_regex>.
7044         (exception_catchpoint::~exception_catchpoint): Remove regfree
7045         call.
7046         (check_status_exception_catchpoint): Adjust to use compiled_regex.
7047         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
7048         * breakpoint.c (solib_catchpoint::compiled): Now a
7049         std::unique_ptr<compiled_regex>.
7050         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
7051         (check_status_catch_solib): Adjust to use compiled_regex.
7052         (add_solib_catchpoint): Adjust to use compiled_regex.
7053         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
7054         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
7055         compiled_regex reference.  Adjust to use it.
7056         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
7057         declaration.  Include "gdb_regex.h".
7058         (apropos_cmd): Change regex parameter to compiled_regex reference.
7059         * gdb_regex.c: New file.
7060         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
7061         declarations.
7062         (class compiled_regex): New.
7063         * linux-tdep.c: Include "common/gdb_optional.h".
7064         (struct mapping_regexes): New, factored out from
7065         mapping_is_anonymous_p, and adjusted to use compiled_regex.
7066         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
7067         gdb::optional and remove cleanups.  Adjust to compiled_regex.
7068         * probe.c: Include "common/gdb_optional.h".
7069         (collect_probes): Use compiled_regex and gdb::optional and remove
7070         cleanups.
7071         * skip.c: Include "common/gdb_optional.h".
7072         (skiplist_entry::compiled_function_regexp): Now a
7073         gdb::optional<compiled_regex>.
7074         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
7075         (free_skiplist_entry): Remove regfree call.
7076         (compile_skip_regexp, skip_rfunction_p): Adjust to use
7077         compiled_regex and gdb::optional.
7078         * symtab.c: Include "common/gdb_optional.h".
7079         (search_symbols): Use compiled_regex and gdb::optional.
7080         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
7081         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
7082         to gdb_regex.c.
7083
7084 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7085
7086         * regcache.c (regcache::save): Avoid buffer use.
7087         (regcache::dump): Likewise.
7088
7089 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7090
7091         * sh-tdep.c (sh_pseudo_register_read): Remove
7092         MAX_REGISTER_SIZE.
7093         (sh_pseudo_register_write): Likewise.
7094         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
7095         (sh64_pseudo_register_write): Likewise
7096
7097 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
7098
7099         * aarch64-tdep.c (aarch64_store_return_value): Use
7100         V_REGISTER_SIZE.
7101         (aarch64_pseudo_read_value): Likewise.
7102         (aarch64_pseudo_write): Likewise.
7103
7104 2017-06-06  Yao Qi  <yao.qi@linaro.org>
7105
7106         * regformats/regdef.h (set_register_cache): Remove the
7107         declaration.
7108
7109 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
7110
7111         * frame.c (frame_unwind_register_signed): Use
7112         frame_unwind_register_value.
7113
7114 2017-06-06  Pedro Alves  <palves@redhat.com>
7115
7116         PR breakpoints/21553
7117         * breakpoint.c (create_breakpoints_sal_default)
7118         (init_breakpoint_sal, create_breakpoint_sal): Use
7119         gdb::unique_xmalloc_ptr for string parameters.
7120         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7121         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
7122         (base_breakpoint_create_breakpoints_sal)
7123         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
7124         (strace_marker_create_breakpoints_sal)
7125         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
7126         string parameters.
7127         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
7128         gdb::unique_xmalloc_ptr for string parameters.
7129         (create_breakpoint): Constify 'extra_string' and 'cond_string'
7130         parameters.
7131
7132 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7133
7134         * alpha-tdep.c (alpha_register_to_value): Use
7135         get_frame_register_value.
7136         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
7137
7138 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
7139
7140         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
7141         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
7142         (ia64_value_to_register): Likewise.
7143         (ia64_extract_return_value): Likewise.
7144         (ia64_store_return_value): Likewise.
7145         (ia64_push_dummy_call): Likewise.
7146
7147 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
7148
7149         GDB 8.0 released.
7150
7151 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
7152
7153         * x86-linux-nat.c (struct arch_lwp_info): Remove.
7154
7155 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
7156
7157         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
7158         parameter.
7159         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
7160
7161 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7162
7163         * event-loop.c (poll_timers): Unallocate timer using delete
7164         instead of xfree.
7165
7166 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7167
7168         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
7169         (struct breakpoint) <~breakpoint>: New.
7170         (struct watchpoint): Inherit from breakpoint.
7171         <~watchpoint>: New.
7172         <base>: Remove.
7173         (struct tracepoint): Inherit from breakpoint.
7174         <base>: Remove.
7175         * breakpoint.c (longjmp_breakpoint_ops): Remove.
7176         (struct longjmp_breakpoint): Inherit from breakpoint.
7177         <~longjmp_breakpoint>: New.
7178         <base>: Remove.
7179         (new_breakpoint_from_type): Remove casts.
7180         (watchpoint_in_thread_scope): Remove reference to base field.
7181         (watchpoint_del_at_next_stop): Likewise.
7182         (update_watchpoint): Likewise.
7183         (watchpoint_check): Likewise.
7184         (bpstat_check_watchpoint): Likewise.
7185         (set_longjmp_breakpoint): Likewise.
7186         (struct fork_catchpoint): Inherit from breakpoint.
7187         <base>: Remove.
7188         (struct solib_catchpoint): Inherit from breakpoint.
7189         <~solib_catchpoint>: New.
7190         <base>: Remove.
7191         (dtor_catch_solib): Change to ...
7192         (solib_catchpoint::~solib_catchpoint): ... this.
7193         (breakpoint_hit_catch_solib): Remove reference to base field.
7194         (add_solib_catchpoint): Likewise.
7195         (create_fork_vfork_event_catchpoint): Likewise.
7196         (struct exec_catchpoint): Inherit from breakpoint.
7197         <~exec_catchpoint>: New.
7198         <base>: Remove.
7199         (dtor_catch_exec): Change to ...
7200         (exec_catchpoint::~exec_catchpoint): ... this.
7201         (dtor_watchpoint): Change to ...
7202         (watchpoint::~watchpoint): ... this.
7203         (watch_command_1): Remove reference to base field.
7204         (catch_exec_command_1): Likewise.
7205         (base_breakpoint_dtor): Change to ...
7206         (breakpoint::~breakpoint): ... this.
7207         (base_breakpoint_ops): Remove dtor field value.
7208         (longjmp_bkpt_dtor): Change to ...
7209         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
7210         (strace_marker_create_breakpoints_sal): Remove reference to base
7211         field.
7212         (delete_breakpoint): Don't manually call breakpoint destructor.
7213         (create_tracepoint_from_upload): Remove reference to base field.
7214         (trace_pass_set_count): Likewise.
7215         (initialize_breakpoint_ops): Don't initialize
7216         momentary_breakpoint_ops, don't set dtors.
7217         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
7218         <~ada_catchpoint>: New.
7219         <base>: Remove.
7220         (create_excep_cond_exprs): Remove reference to base field.
7221         (dtor_exception): Change to ...
7222         (ada_catchpoint::~ada_catchpoint): ... this.
7223         (dtor_catch_exception): Remove.
7224         (dtor_catch_exception_unhandled): Remove.
7225         (dtor_catch_assert): Remove.
7226         (create_ada_exception_catchpoint): Remove reference to base
7227         field.
7228         (initialize_ada_catchpoint_ops): Don't set dtors.
7229         * break-catch-sig.c (struct signal_catchpoint): Inherit from
7230         breakpoint.
7231         <~signal_catchpoint>: New.
7232         <base>: Remove.
7233         (signal_catchpoint_dtor): Change to ...
7234         (signal_catchpoint::~signal_catchpoint): ... this.
7235         (create_signal_catchpoint): Remove reference to base field.
7236         (initialize_signal_catchpoint_ops): Don't set dtor.
7237         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
7238         from breakpoint.
7239         <~syscall_catchpoint>: New.
7240         <base>: Remove.
7241         (dtor_catch_syscall): Change to ...
7242         (syscall_catchpoint::~syscall_catchpoint): ... this.
7243         (create_syscall_event_catchpoint): Remove reference to base
7244         field.
7245         (initialize_syscall_catchpoint_ops): Don't set dtor.
7246         * break-catch-throw.c (struct exception_catchpoint): Inherit
7247         from breakpoint.
7248         <~exception_catchpoint>: New.
7249         <base>: Remove.
7250         (dtor_exception_catchpoint): Change to ...
7251         (exception_catchpoint::~exception_catchpoint): ... this.
7252         (handle_gnu_v3_exceptions): Remove reference to base field.
7253         (initialize_throw_catchpoint_ops): Don't set dtor.
7254         * ctf.c (ctf_get_traceframe_address): Remove reference to base
7255         field.
7256         * remote.c (remote_get_tracepoint_status): Likewise.
7257         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
7258         * tracefile.c (tracefile_fetch_registers): Likewise.
7259         * tracepoint.c (actions_command): Likewise.
7260         (validate_actionline): Likewise.
7261         (tfind_1): Likewise.
7262         (get_traceframe_location): Likewise.
7263         (find_matching_tracepoint_location): Likewise.
7264         (parse_tracepoint_status): Likewise.
7265         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
7266
7267 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7268
7269         * breakpoint.c (struct longjmp_breakpoint): New struct.
7270         (is_tracepoint_type): Change return type to bool.
7271         (is_longjmp_type): New function.
7272         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
7273         (set_raw_breakpoint_without_location): Use
7274         new_breakpoint_from_type.
7275         (set_raw_breakpoint): Likewise.
7276
7277 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
7278
7279         * breakpoint.c (new_breakpoint_from_type): New function.
7280         (create_breakpoint_sal): Use new_breakpoint_from_type and
7281         unique_ptr.
7282         (create_breakpoint): Likewise.
7283
7284 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
7285
7286         * memattr.c (mem_info_command): Rename to ...
7287         (info_mem_command): ... this.
7288         (mem_enable_command): Rename to ...
7289         (enable_mem_command): ... this.
7290         (mem_disable_command): Rename to ...
7291         (disable_mem_command): ... this.
7292         (mem_delete_command): Rename to ...
7293         (delete_mem_command): ... this.
7294         (_initialize_mem): Adjust function names.
7295
7296 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7297
7298         * btrace.c (handle_pt_insn_events): New.
7299         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
7300         STATUS.  Split into this and ...
7301         (handle_pt_insn_event_flags): ... this.
7302
7303 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
7304
7305         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
7306         and struct pt_insn.resynced.
7307         * configure: Regenerated.
7308         * config.in: Regenerated.
7309
7310 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7311
7312         * btrace.c (ftrace_find_call_by_number): New function.
7313         (ftrace_new_function): Store objects, not pointers.
7314         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
7315         ftrace_new_gap, ftrace_update_function,
7316         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
7317         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
7318         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
7319         btrace_ends_with_single_insn, btrace_call_get): Account for
7320         btrace_thread_info::functions now storing objects.
7321         * btrace.h (struct btrace_thread_info): Add constructor.
7322         (struct btrace_thread_info) <functions>: Make std::vector.
7323         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
7324         Initialize with default values.
7325         * record-btrace.c (record_btrace_frame_sniffer): Account for
7326         btrace_thread_info::functions now storing objects.
7327
7328 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7329
7330         * btrace.c: Remove typedef bfun_s.
7331         (ftrace_new_gap): Directly add gaps to the list of gaps.
7332         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
7333         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
7334         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
7335         instead of gdb VEC.
7336
7337 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7338
7339         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
7340         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
7341         with btrace_thread_info::next_segment and
7342         btrace_thread_info::prev_segment.
7343         * btrace.h: Remove struct btrace_func_link.
7344         (struct btrace_function): Replace pair of function segment pointers
7345         with pair of indices.
7346         * python/py-record-btrace.c (btpy_call_prev_sibling,
7347         btpy_call_next_sibling): Replace references to
7348         btrace_thread_info::segment with btrace_thread_info::next_segment and
7349         btrace_thread_info::prev_segment.
7350         * record-btrace.c (record_btrace_frame_this_id): Use
7351         btrace_find_call_by_number.
7352
7353 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7354
7355         * btrace.c (ftrace_new_function, ftrace_fixup_level,
7356         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
7357         btrace_insn_next, btrace_insn_prev): Remove references to
7358         btrace_thread_info::flow.
7359         * btrace.h (struct btrace_function): Remove FLOW.
7360
7361 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7362
7363         * btrace.c (ftrace_find_call_by_number): New function.
7364         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
7365         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
7366         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
7367         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
7368         index.
7369         * btrace.h (struct btrace_function): Turn UP into an index.
7370         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
7371         as an index.
7372         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
7373         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
7374         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
7375
7376 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7377
7378         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7379         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7380         ftrace_update_function, ftrace_compute_global_level_offset,
7381         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
7382         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
7383         btrace_insn_end, btrace_is_empty): Remove references to
7384         btrace_thread_info::begin and btrace_thread_info::end.
7385         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
7386         (struct btrace_thread_info) <functions>: Adjust comment.
7387         * record-btrace.c (record_btrace_start_replaying): Remove reference to
7388         btrace_thread_info::begin.
7389
7390 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7391
7392         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
7393         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
7394         ftrace_update_function): Remove arguments that implicitly were always
7395         BTINFO->END.
7396         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
7397         Don't pass BTINFO->END.
7398
7399 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7400
7401         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
7402         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
7403         btrace_find_insn_by_number): Replace function segment pointer with
7404         index.
7405         (btrace_insn_cmp): Simplify.
7406         * btrace.h: (struct btrace_insn_iterator) Rename index to
7407         insn_index.  Replace function segment pointer with index into function
7408         segment vector.
7409         * record-btrace.c (record_btrace_call_history): Replace function
7410         segment pointer use with index.
7411         (record_btrace_frame_sniffer): Retrieve function call segment through
7412         vector.
7413         (record_btrace_set_replay): Remove defunc't safety check.
7414
7415 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7416
7417         * btrace.c (btrace_ends_with_single_insn): New function.
7418         (btrace_call_get, btrace_call_number, btrace_call_begin,
7419         btrace_call_end, btrace_call_next, btrace_call_prev,
7420         btrace_find_call_by_number): Use index into call segment vector
7421         instead of pointer.
7422         (btrace_call_cmp): Simplify.
7423         * btrace.h (struct btrace_call_iterator): Replace function call segment
7424         pointer with index into vector.
7425         * record-btrace.c (record_btrace_call_history): Use index instead of
7426         pointer.
7427
7428 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7429
7430         * btrace.c (btrace_insn_begin, btrace_insn_end,
7431         btrace_find_insn_by_number): Add btinfo to iterator.
7432         * btrace.h (struct btrace_insn_iterator): Add btinfo.
7433
7434 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7435
7436         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
7437         and save pointers directly.
7438         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
7439         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
7440         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
7441         changed signature of functions.
7442         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
7443         (btrace_fetch): Remove code that adds btrace_function pointers to
7444         vector of btrace_functions.
7445         (btrace_clear): Simplify freeing vector of btrace_functions.
7446
7447 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
7448
7449         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
7450         Replace VEC_* with std::vector functions.
7451         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
7452         (struct btrace_thread_info)<functions>: Change type to std::vector.
7453
7454 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7455
7456         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
7457         "Removed targets and native configurations" up.  Merge duplicate
7458         "New commands" sub-sections.  Add "New options" sub-sections.
7459
7460 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
7461
7462         * defs.h (copy_integer_to_size): New declaration.
7463         * findvar.c (copy_integer_to_size): New function.
7464         (do_cint_test): New selftest function.
7465         (copy_integer_to_size_test): Likewise.
7466         (_initialize_findvar): Likewise.
7467         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
7468         (mips_fbsd_collect_reg): Use raw_collect_integer.
7469         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
7470         (mips64_fill_gregset): Use raw_collect_integer
7471         (mips64_fill_fpregset): Use raw_supply_integer.
7472         * regcache.c (regcache::raw_supply_integer): New function.
7473         (regcache::raw_collect_integer): Likewise.
7474         * regcache.h: (regcache::raw_supply_integer): New declaration.
7475         (regcache::raw_collect_integer): Likewise.
7476
7477 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7478
7479         * Makefile.in (SFILES): Add gdbarch-selftests.c.
7480         (COMMON_OBS): Add gdbarch-selftests.o.
7481         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
7482         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
7483         * gdbarch-selftests.c: New file.
7484         * regcache.h (regcache) <~regcache>: Mark it virtual if
7485         GDB_SELF_TEST.
7486         <raw_write>: Likewise.
7487
7488 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7489
7490         * regcache.c (current_regcache): Change it to
7491         regcache::current_regcache.
7492         (regcache_observer_target_changed): Update.
7493         (regcache_thread_ptid_changed): Make it a regcache static
7494         method.
7495         (regcache_thread_ptid_changed): Update.
7496         (class regcache_access): New.
7497         (current_regcache_test): Update.
7498         (_initialize_regcache): Update.
7499         * regcache.h: Include forward_list.
7500         (regcache): Declare regcache_thread_ptid_changed and declare
7501         registers_changed_ptid as friend.
7502
7503 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7504
7505         * i387-tdep.c (i387_register_to_value): Use register_size
7506         instead of TYPE_LENGTH.
7507         * m68k-tdep.c (m68k_register_to_value): Likewise.
7508
7509 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7510
7511         * i387-tdep.c (i387_convert_register_p): Return false if type
7512         code isn't TYPE_CODE_FLT.
7513
7514 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7515
7516         * alpha-tdep.c (alpha_convert_register_p): Return true if type
7517         length is 4.
7518         (alpha_register_to_value): Remove type length check.
7519         (alpha_value_to_register): Likewise.
7520
7521 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7522
7523         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
7524         TYPE_CODE_FLT.
7525
7526 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7527
7528         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
7529         TYPE_CODE_FLT or not.
7530
7531 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7532
7533         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
7534         * avr-tdep.c (avr_gdbarch_init): Likewise.
7535         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7536         * cris-tdep.c (cris_gdbarch_init): Likewise.
7537         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7538         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7539         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7540         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
7541         * mep-tdep.c (mep_gdbarch_init): Likewise.
7542         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7543         * mips-tdep.c (mips_gdbarch_init): Likewise.
7544         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7545         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7546         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7547         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7548         * v850-tdep.c (v850_gdbarch_init): Likewise.
7549
7550 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7551
7552         * selftest-arch.c (tests_with_arch): Call registers_changed
7553         and reinit_frame_cache.
7554         * selftest.c (run_self_tests): Likewise.
7555
7556 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7557
7558         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
7559         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
7560
7561 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7562
7563         * rl78-tdep.c (rl78_gdbarch_init): Don't call
7564         set_gdbarch_print_insn.
7565
7566 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7567
7568         * h8300-tdep.c (h8300_gdbarch_init): Don't call
7569         set_gdbarch_print_insn.
7570
7571 2017-05-24  Yao Qi  <yao.qi@linaro.org>
7572
7573         * alpha-tdep.c (alpha_gdbarch_init): Don't call
7574         set_gdbarch_print_insn.
7575         * arc-tdep.c (arc_gdbarch_init): Likewise.
7576         * arch-utils.c: include dis-asm.h.
7577         (default_print_insn): New function.
7578         * arch-utils.h (default_print_insn): Declare.
7579         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
7580         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
7581         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
7582         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
7583         * frv-tdep.c (frv_gdbarch_init): Likewise.
7584         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
7585         * gdbarch.sh (print_insn): Use default_print_insn.
7586         * gdbarch.c: Regenerated.
7587         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
7588         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
7589         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
7590         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
7591         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
7592         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
7593         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
7594         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
7595         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
7596         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
7597         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
7598         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
7599         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
7600         * mt-tdep.c (mt_gdbarch_init): Likewise.
7601         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7602         * nios2-tdep.c (nios2_print_insn): Remove.
7603         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
7604         * rx-tdep.c (rx_gdbarch_init): Likewise.
7605         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7606         * score-tdep.c (score_print_insn): Remove.
7607         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
7608         * sh-tdep.c (sh_gdbarch_init): Likewise.
7609         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
7610         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7611         * tic6x-tdep.c (tic6x_print_insn): Remove.
7612         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
7613         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
7614         * v850-tdep.c (v850_gdbarch_init): Likewise.
7615         * vax-tdep.c (vax_gdbarch_init): Likewise.
7616         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
7617         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
7618
7619 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7620
7621         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
7622         (MIPS_FP0_REGNUM): Remove.
7623         (MIPS_FSR_REGNUM): Remove.
7624         (mips_fbsd_supply_fpregs): Use mips_regnum.
7625         (mips_fbsd_supply_gregs): Likewise.
7626         (mips_fbsd_collect_fpregs): Likewise.
7627         (mips_fbsd_collect_gregs): Likewise.
7628
7629 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
7630
7631         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
7632         (getpfpregs_supplies): New function.
7633         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
7634         getfpregs_supplies.
7635         (mips_fbsd_store_inferior_registers): Likewise.
7636
7637 2017-05-22  Pedro Alves <palves@redhat.com>
7638
7639         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
7640         maintainer.
7641
7642 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
7643
7644         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
7645         (store_register): Likewise.
7646         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
7647         (get_decimal_float_return_value): Likewise.
7648         (do_ppc_sysv_return_value): Likewise.
7649         (ppc64_sysv_abi_push_integer): Likewise.
7650         (ppc64_sysv_abi_push_freg): Likewise.
7651         (ppc64_sysv_abi_return_value_base): Likewise.
7652         (ppc64_sysv_abi_return_value): Likewise.
7653         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
7654         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
7655         * rs6000-nat.c: Likewise.
7656         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
7657         (rs6000_value_to_register): Likewise.
7658         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
7659
7660 2017-05-21  Tom Tromey  <tom@tromey.com>
7661
7662         PR rust/21466:
7663         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
7664         arrays as "[T]", not "[T; ]".
7665
7666 2017-05-19  Tom Tromey  <tom@tromey.com>
7667
7668         PR rust/21484:
7669         * rust-lang.c (exp_descriptor_rust): New function.
7670         (rust_language_defn): Use it.
7671         * p-lang.c (pascal_language_defn): Update.
7672         * opencl-lang.c (opencl_language_defn): Update.
7673         * objc-lang.c (objc_language_defn): Update.
7674         * m2-lang.c (m2_language_defn): Update.
7675         * language.h (struct language_defn)
7676         <la_watch_location_expression>: New member.
7677         * language.c (unknown_language_defn, auto_language_defn)
7678         (local_language_defn): Update.
7679         * go-lang.c (go_language_defn): Update.
7680         * f-lang.c (f_language_defn): Update.
7681         * d-lang.c (d_language_defn): Update.
7682         * c-lang.h (c_watch_location_expression): Declare.
7683         * c-lang.c (c_watch_location_expression): New function.
7684         (c_language_defn, cplus_language_defn, asm_language_defn)
7685         (minimal_language_defn): Use it.
7686         * breakpoint.c (watch_command_1): Call
7687         la_watch_location_expression.
7688         * ada-lang.c (ada_language_defn): Update.
7689
7690 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7691
7692         PR tui/21482
7693         * gdb_curses.h (NOMACROS): Define.
7694         (NCURSES_NOMACROS): Define.
7695
7696 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7697
7698         PR tui/21482
7699         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
7700         arg to char *.
7701         * tui/tui-wingeneral.c (box_win): Likewise.
7702         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
7703         (tui_show_source_line): Likewise.
7704         (tui_show_exec_info_content): Likewise.
7705
7706 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
7707
7708         * sparc-tdep.c (sparc_structure_return_p)
7709         (sparc_arg_on_registers_p): New functions.
7710         (sparc32_store_arguments): Use them.
7711         * sparc64-tdep.c (sparc64_16_byte_align_p)
7712         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
7713         Handle TYPE_CODE_ARRAY.
7714
7715 2017-05-17  Yao Qi  <yao.qi@linaro.org>
7716
7717         * cli/cli-decode.c (add_alias_cmd): New function.
7718         * command.h (add_alias_cmd): Declare.
7719         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
7720         instead call add_alias_cmd.
7721
7722 2017-05-17  Pedro Alves  <palves@redhat.com>
7723
7724         * Makefile.in (nat_extra_makefile_frag): Rename to ...
7725         (nat_makefile_frag): ... this.  All references updated.
7726         * configure.ac: Likewise.
7727         * configure.nat: Likewise.  Enhance comments.
7728         * configure: Regenerate.
7729
7730 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7731
7732         * procfs.c (procfs_create_inferior): Change prototype to match
7733         definition.
7734
7735 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
7736
7737         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
7738         C++ compiler warning.
7739
7740 2017-05-12  Tom Tromey  <tom@tromey.com>
7741
7742         PR rust/21483:
7743         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
7744         recurse, just call value_struct_elt directly.
7745
7746 2017-05-12  Tom Tromey  <tom@tromey.com>
7747
7748         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
7749         OP_RUST_ARRAY>: Fix.
7750
7751 2017-05-12  Tom Tromey  <tom@tromey.com>
7752
7753         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
7754
7755 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7756
7757         * regcache.c: Include <forward_list>.
7758         (struct regcache_list): Remove.
7759         (current_regcache): Update.
7760         (get_thread_arch_aspace_regcache): Update for std::forward_list.
7761         (regcache_thread_ptid_changed): Likewise.
7762         (registers_changed_ptid): Likewise.
7763         (current_regcache_size): Likewise.
7764
7765 2017-05-09  Yao Qi  <yao.qi@linaro.org>
7766
7767         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
7768         (current_regcache_size): New function.
7769         (current_regcache_test): New function.
7770         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
7771
7772 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7773
7774         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
7775         (print_gp_register_row): Use get_frame_register_value.
7776
7777 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7778
7779         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
7780         (mips_supply_fpregset): Likewise.
7781         (mips64_supply_gregset): Likewise.
7782
7783 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
7784
7785         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
7786         regcache->raw_supply_zeroed.
7787
7788 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7789
7790         * configure.nat: Rearrange 'case' statements to match
7791         host before cpu.
7792
7793 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7794
7795         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
7796         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
7797         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
7798         "@nat_extra_makefile_frag@".
7799         (Makefile): Remove dependency on "@frags@".
7800         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
7801         (data-directory/Makefile): Likewise.
7802         * config/aarch64/linux.mh: Deleted; moved contents to
7803         "gdb/configure.nat".
7804         * config/alpha/alpha-linux.mh: Likewise.
7805         * config/alpha/nbsd.mh: Likewise.
7806         * config/arm/linux.mh: Likewise.
7807         * config/arm/nbsdelf.mh: Likewise.
7808         * config/i386/cygwin.mh: Likewise.
7809         * config/i386/cygwin64.mh: Likewise.
7810         * config/i386/darwin.mh: Likewise.
7811         * config/i386/fbsd.mh: Likewise.
7812         * config/i386/fbsd64.mh: Likewise.
7813         * config/i386/go32.mh: Likewise.
7814         * config/i386/i386gnu.mh: Likewise.
7815         * config/i386/i386sol2.mh: Likewise.
7816         * config/i386/linux.mh: Likewise.
7817         * config/i386/linux64.mh: Likewise.
7818         * config/i386/mingw.mh: Likewise.
7819         * config/i386/mingw64.mh: Likewise.
7820         * config/i386/nbsd64.mh: Likewise.
7821         * config/i386/nbsdelf.mh: Likewise.
7822         * config/i386/nto.mh: Likewise.
7823         * config/i386/obsd.mh: Likewise.
7824         * config/i386/obsd64.mh: Likewise.
7825         * config/i386/sol2-64.mh: Likewise.
7826         * config/ia64/linux.mh: Likewise.
7827         * config/m32r/linux.mh: Likewise.
7828         * config/m68k/linux.mh: Likewise.
7829         * config/m68k/nbsdelf.mh: Likewise.
7830         * config/m68k/obsd.mh: Likewise.
7831         * config/m88k/obsd.mh: Likewise.
7832         * config/mips/fbsd.mh: Likewise.
7833         * config/mips/linux.mh: Likewise.
7834         * config/mips/nbsd.mh: Likewise.
7835         * config/mips/obsd64.mh: Likewise.
7836         * config/pa/linux.mh: Likewise.
7837         * config/pa/nbsd.mh: Likewise.
7838         * config/pa/obsd.mh: Likewise.
7839         * config/powerpc/aix.mh: Likewise.
7840         * config/powerpc/fbsd.mh: Likewise.
7841         * config/powerpc/linux.mh: Likewise.
7842         * config/powerpc/nbsd.mh: Likewise.
7843         * config/powerpc/obsd.mh: Likewise.
7844         * config/powerpc/ppc64-linux.mh: Likewise.
7845         * config/powerpc/spu-linux.mh: Likewise.
7846         * config/s390/linux.mh: Likewise.
7847         * config/sh/nbsd.mh: Likewise.
7848         * config/sparc/fbsd.mh: Likewise.
7849         * config/sparc/linux.mh: Likewise.
7850         * config/sparc/linux64.mh: Likewise.
7851         * config/sparc/nbsd64.mh: Likewise.
7852         * config/sparc/nbsdelf.mh: Likewise.
7853         * config/sparc/obsd64.mh: Likewise.
7854         * config/sparc/sol2.mh: Likewise.
7855         * config/tilegx/linux.mh: Likewise.
7856         * config/vax/nbsdelf.mh: Likewise.
7857         * config/vax/obsd.mh: Likewise.
7858         * config/xtensa/linux.mh: Likewise.
7859         * config/i386/i386gnu.mn: New file, with excerpts from
7860         "config/i386/i386gnu.mh".
7861         * configure: Regenerate.
7862         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
7863         *.mh files under "gdb/config".
7864         * configure.nat: New file, with contents from the
7865         "gdb/config/*/*.mh" files.
7866
7867 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
7868
7869         * btrace.c (btrace_clear): Free insn vector.
7870
7871 2017-05-05  Pedro Alves  <palves@redhat.com>
7872
7873         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
7874         * configure: Regenerate.
7875
7876 2017-05-04  Pedro Alves  <palves@redhat.com>
7877
7878         * Makefile.in (SFILES): Add progspace-and-thread.c.
7879         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
7880         (COMMON_OBS): Add progspace-and-thread.o.
7881         * breakpoint.c: Include "progspace-and-thread.h".
7882         (update_inserted_breakpoint_locations)
7883         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
7884         Use scoped_restore_current_pspace_and_thread.
7885         (create_std_terminate_master_breakpoint): Use
7886         scoped_restore_current_program_space.
7887         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
7888         (print_breakpoint_location): Use
7889         scoped_restore_current_program_space.
7890         (bp_loc_is_permanent): Use
7891         scoped_restore_current_pspace_and_thread.
7892         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
7893         (download_tracepoint_locations): Use
7894         scoped_restore_current_pspace_and_thread.
7895         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
7896         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
7897         (enum step_over_calls_kind): Moved from inferior.h.
7898         (class scoped_restore_current_thread): New class.
7899         * gdbthread.h (make_cleanup_restore_current_thread): Delete
7900         declaration.
7901         (scoped_restore_current_thread): New class.
7902         * infcmd.c: Include "common/gdb_optional.h".
7903         (continue_1, proceed_after_attach): Use
7904         scoped_restore_current_thread.
7905         (notice_new_inferior): Use scoped_restore_current_thread.
7906         * inferior.c: Include "progspace-and-thread.h".
7907         (restore_inferior, save_current_inferior): Delete.
7908         (add_inferior_command, clone_inferior_command): Use
7909         scoped_restore_current_pspace_and_thread.
7910         * inferior.h (scoped_restore_current_inferior): New class.
7911         * infrun.c: Include "progspace-and-thread.h" and
7912         "common/gdb_optional.h".
7913         (follow_fork_inferior): Use
7914         scoped_restore_current_pspace_and_thread.
7915         (scoped_restore_exited_inferior): New class.
7916         (handle_vfork_child_exec_or_exit): Use
7917         scoped_restore_exited_inferior,
7918         scoped_restore_current_pspace_and_thread,
7919         scoped_restore_current_thread and scoped_restore.
7920         (fetch_inferior_event): Use scoped_restore_current_thread.
7921         * linespec.c (decode_line_full, decode_line_1): Use
7922         scoped_restore_current_program_space.
7923         * mi/mi-main.c: Include "progspace-and-thread.h".
7924         (exec_continue): Use scoped_restore_current_thread.
7925         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
7926         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
7927         * proc-service.c (ps_pglobal_lookup): Use
7928         scoped_restore_current_program_space.
7929         * progspace-and-thread.c: New file.
7930         * progspace-and-thread.h: New file.
7931         * progspace.c (release_program_space, clone_program_space): Use
7932         scoped_restore_current_program_space.
7933         (restore_program_space, save_current_program_space)
7934         (save_current_space_and_thread): Delete.
7935         (switch_to_program_space_and_thread): Moved to
7936         progspace-and-thread.c.
7937         * progspace.h (save_current_program_space)
7938         (save_current_space_and_thread): Delete declarations.
7939         (scoped_restore_current_program_space): New class.
7940         * remote.c (remote_btrace_maybe_reopen): Use
7941         scoped_restore_current_thread.
7942         * symtab.c: Include "progspace-and-thread.h".
7943         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
7944         * thread.c (print_thread_info_1): Use
7945         scoped_restore_current_thread.
7946         (struct current_thread_cleanup): Delete.
7947         (do_restore_current_thread_cleanup)
7948         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
7949         (scoped_restore_current_thread::~scoped_restore_current_thread):
7950         ... this new dtor.
7951         (make_cleanup_restore_current_thread): Rename/convert to ...
7952         (scoped_restore_current_thread::scoped_restore_current_thread):
7953         ... this new ctor.
7954         (thread_apply_all_command): Use scoped_restore_current_thread.
7955         (thread_apply_command): Use scoped_restore_current_thread.
7956         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
7957         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
7958
7959 2017-05-04  Pedro Alves  <palves@redhat.com>
7960
7961         * thread.c (make_cleanup_restore_current_thread): Move
7962         find_thread_ptid call before the is_stopped call.  Assert that the
7963         thread is found.  Replace is_stopped call by checking the thread's
7964         state directly.  Remove unnecessary NULL-thread check.
7965
7966 2017-05-04  Pedro Alves  <palves@redhat.com>
7967
7968         * corelow.c (thread_section_name): New class.
7969         (get_core_register_section, get_core_siginfo): Use it.
7970
7971 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7972
7973         * corelow.c (sniff_core_bfd): Remove extra semicolon.
7974         (get_core_register_section): Remove xfree of NULL pointer.
7975
7976 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
7977
7978         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
7979         * regcache.c (regcache::raw_supply_zeroed): New function.
7980         * regcache.h (regcache::raw_supply_zeroed): New declaration.
7981
7982 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7983
7984         * gdbarch.sh: Remove commented out definition of
7985         TARGET_CHAR_BIT.
7986         * gdbarch.h: Re-generate.
7987
7988 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
7989
7990         * configure: Regenerate.
7991
7992 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
7993
7994         * solib-target.c (solib_target_relocate_section_addresses):
7995         Remove num_section_bases, num_bases, segment_bases variables.
7996
7997 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
7998
7999         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8000
8001 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8002
8003         * solib-target.c: Include <vector>
8004         (struct lm_info_target) <~lm_info_target>: Remove.
8005         <segment_bases, section_bases>: Change type to
8006         std::vector<CORE_ADDR>.
8007         (library_list_start_segment, library_list_start_section,
8008         library_list_end_library,
8009         solib_target_relocate_section_addresses): Adjust.
8010
8011 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8012
8013         * gdbarch.sh (software_single_step): Change return type to
8014         std::vector<CORE_ADDR>.
8015         * gdbarch.c, gdbarch.h: Re-generate.
8016         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8017         Adjust.
8018         (arm_deal_with_atomic_sequence_raw): Adjust.
8019         (thumb_get_next_pcs_raw): Adjust.
8020         (arm_get_next_pcs_raw): Adjust.
8021         (arm_get_next_pcs): Adjust.
8022         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8023         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
8024         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
8025         (alpha_software_single_step): Adjust.
8026         * alpha-tdep.h (alpha_software_single_step): Adjust.
8027         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
8028         * arm-tdep.c (arm_software_single_step): Adjust.
8029         (arm_breakpoint_kind_from_current_state): Adjust.
8030         * arm-tdep.h (arm_software_single_step): Adjust.
8031         * breakpoint.c (insert_single_step_breakpoint): Adjust.
8032         * cris-tdep.c (cris_software_single_step): Adjust.
8033         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
8034         (micromips_deal_with_atomic_sequence): Adjust.
8035         (deal_with_atomic_sequence): Adjust.
8036         (mips_software_single_step): Adjust.
8037         * mips-tdep.h (mips_software_single_step): Adjust.
8038         * moxie-tdep.c (moxie_software_single_step): Adjust.
8039         * nios2-tdep.c (nios2_software_single_step): Adjust.
8040         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
8041         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
8042         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
8043         * s390-linux-tdep.c (s390_software_single_step): Adjust.
8044         * sparc-tdep.c (sparc_software_single_step): Adjust.
8045         * spu-tdep.c (spu_software_single_step): Adjust.
8046         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
8047
8048 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
8049
8050         * gdbarch.sh: Use semi-colon as field separator instead of colon.
8051         * gdbarch.h: Re-generate.
8052
8053 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8054
8055         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
8056         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
8057         * python/py-instruction.c, python/py-instruction.h: New file.
8058         * python/py-record.c: Add py-instruction.h include.
8059         (gdbpy_initialize_record): Make gdb.Instruction a super class of
8060         gdb.RecordInstruction.
8061         * python/python-internal.h: Add gdbpy_initialize_instruction
8062         declaration.
8063         * python/python.c (do_start_initialization): Add
8064         gdbpy_initialize_instruction.
8065
8066 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8067
8068         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
8069         Remove.
8070         (btrace_func_from_recpy_func): New function.
8071         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
8072         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
8073         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
8074         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
8075         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
8076         Also, use new helper functions.
8077         (btpy_list_item): Use new helper functions.
8078         (recpy_bt_function_call_history): Use new type name.
8079         (btpy_call_getset): Remove.
8080         (gdbpy_initialize_btrace): Remove code to initialize
8081         gdb.BtraceFunctionCall.
8082         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
8083         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
8084         recpy_bt_func_prev, recpy_bt_func_next): New export.
8085         * python/py-record.c (recpy_func_type): New static object.
8086         (recpy_func_new, recpy_func_level, recpy_func_symbol,
8087         recpy_func_instructions, recpy_func_up, recpy_func_prev,
8088         recpy_func_next): New function.
8089         (recpy_element_hash, recpy_element_richcompare): Updated comment.
8090         (recpy_func_getset): New static object.
8091         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
8092         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
8093
8094 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8095
8096         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
8097         (btpy_object, btpy_insn_type, btpy_new): Remove.
8098         (btpy_list_object): Use gdb.RecordInstruction type instead of
8099         gdb.BtraceInstruction type.
8100         (btrace_insn_from_recpy_insn): New function.
8101         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
8102         btpy_new.
8103         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
8104         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
8105         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
8106         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
8107         instead of btpy_object.
8108         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8109         btpy_insn_data, btpy_insn_decode): Rename to ...
8110         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
8111         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
8112         recpy_bt_insn_decode): This.  Also, use new helper functions.
8113         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
8114         recpy_insn_type.
8115         (btpy_insn_getset): Remove.
8116         (gdbpy_initialize_btrace): Remove code to initialize
8117         gdb.BtraceInstruction.  Use recpy_element_object.
8118         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
8119         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
8120         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
8121         * python/py-record.c (recpy_insn_type): New static object.
8122         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
8123         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
8124         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
8125         New function.
8126         (recpy_insn_getset): New static object.
8127         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
8128         * python/py-record.h (recpy_element_object): New typedef.
8129         (recpy_insn_type, recpy_insn_new): New export.
8130
8131 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8132
8133         * py-record-btrace.c (btpy_insn_new): Removed.
8134         (btpy_insn_or_gap_new): New function.
8135         (btpy_insn_error): Removed.
8136         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
8137         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
8138         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
8139         btpy_insn_or_gap_new instead of btpy_insn_new.
8140         (btpy_insn_getset): Remove btpy_insn_error.
8141         * py-record.c (recpy_gap_type): New static object.
8142         (recpy_gap_object): New typedef.
8143         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
8144         recpy_gap_reason_string): New function.
8145         (recpy_gap_getset): New static object.
8146         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
8147         * py-record.h (recpy_gap_new): New export.
8148
8149 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8150
8151         * python/py-record.c (recpy_ptid): Remove.
8152         (recpy_record_getset): Remove recpy_ptid.
8153
8154 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8155
8156         * btrace.c (btrace_fetch): Set inferior_ptid.
8157         * python/py-record-btrace.c: Add "py-record.h" include.
8158         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
8159         recpy_bt_end, recpy_bt_instruction_history,
8160         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
8161         in gdb.Record object instead of current ptid.
8162         * python/py-record.c: Include new "py-record.h" file.
8163         (recpy_record_object): Moved to py-record.h.
8164         * python/py-record.h: New file.
8165
8166 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
8167
8168         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
8169         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
8170         indentation.
8171
8172 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
8173
8174         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
8175         the past maintainers section.
8176
8177 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8178
8179         * infcmd.c (get_return_value): Use regcache ctor, and remove
8180         cleanup.
8181
8182 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8183             Pedro Alves  <palves@redhat.com>
8184
8185         * regcache.c (regcache::regcache): New tag dispatch ctor.
8186         (do_cooked_read): Moved above.
8187         (regcache_dup): Use the tag dispatch ctor..
8188         * regcache.h (regcache): Declare ctor, delete copy ctor and
8189         assignment operator, remove friend regcache_dup.
8190
8191 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8192
8193         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
8194         call method save instead of regcache_cpy.
8195         * regcache.h (struct regcache): Make regcache_dup a friend.
8196
8197 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8198
8199         * regcache.c (struct regcache): Move to regcache.h
8200         (regcache::arch): New method.
8201         (regcache_get_ptid): Update.
8202         (get_regcache_arch): Call arch method.
8203         (get_regcache_aspace): Call method aspace.
8204         (register_buffer): Change it to method.
8205         (regcache_save): Change it to regcache::save.
8206         (regcache_restore): Likewise.
8207         (regcache_cpy_no_passthrough): Remove the declaration.
8208         (regcache_cpy): Call methods restore and cpy_no_passthrough.
8209         (regcache_cpy_no_passthrough): Change it to method
8210         cpy_no_passthrough.
8211         (regcache_register_status): Change it to method
8212         get_register_status.
8213         (regcache_invalidate): Change it to method invalidate.
8214         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
8215         (regcache_raw_update): Change it to method raw_update.
8216         (regcache_raw_read): Likewise.
8217         (regcache_raw_read_signed): Likewise.
8218         (regcache_raw_read_unsigned): Likewise.
8219         (regcache_raw_write_signed): Likewise.
8220         (regcache_raw_write_unsigned): Likewise.
8221         (regcache_cooked_read): Likewise.
8222         (regcache_cooked_read_value): Likewise.
8223         (regcache_cooked_read_signed): Likewise.
8224         (regcache_cooked_read_unsigned): Likewise.
8225         (regcache_cooked_write_signed): Likewise.
8226         (regcache_cooked_write_unsigned): Likewise.
8227         (regcache_raw_set_cached_value): Likewise.
8228         (regcache_raw_write): Likewise.
8229         (regcache_cooked_write): Likewise.
8230         (regcache_xfer_part): Likewise.
8231         (regcache_raw_read_part): Likewise.
8232         (regcache_raw_write_part): Likewise.
8233         (regcache_cooked_read_part): Likewise.
8234         (regcache_cooked_write_part): Likewise.
8235         (regcache_raw_supply): Likewise.
8236         (regcache_raw_collect): Likewise.
8237         (regcache_transfer_regset): Likewise.
8238         (regcache_supply_regset): Likewise.
8239         (regcache_collect_regset): Likewise.
8240         (regcache_debug_print_register): Likewise.
8241         (enum regcache_dump_what): Move it to regcache.h.
8242         (regcache_dump): Change it to method dump.
8243         * regcache.h (enum regcache_dump_what): New.
8244         (class regcache): New.
8245         * target.c (target_fetch_registers): Call method
8246         debug_print_register.
8247         (target_store_registers): Likewise.
8248
8249 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8250
8251         * windows-nat.c (struct lm_info_windows): Initialize field.
8252         (windows_make_so): Allocate lm_info_windows with new.
8253         (windows_free_so): Free lm_info_windows with delete.
8254
8255 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8256
8257         * solib-darwin.c (struct lm_info_darwin): Initialize field.
8258         (darwin_current_sos): Allocate lm_info_darwin with new, remove
8259         cleanup.
8260         (darwin_free_so): Free lm_info_darwin with delete.
8261
8262 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8263
8264         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
8265         <l_addr_p>: Change type to bool.
8266         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
8267         (svr4_free_so): Free lm_info_svr4 with delete.
8268         (svr4_copy_library_list): Replace memcpy with call to copy
8269         constructor.
8270         (library_list_start_library, svr4_default_sos): Allocate
8271         lm_info_svr4 with new.
8272
8273 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8274
8275         * solib-target.c (struct lm_info_target): Add destructor,
8276         initialize fields.
8277         <name>: Change type to std::string.
8278         (library_list_start_library): Allocate lm_info_target with new.
8279         (solib_target_free_library_list): Free lm_info_target with
8280         delete.
8281         (solib_target_current_sos): Adapt to std::string.
8282         (solib_target_free_so): Free lm_info_target with delete.
8283
8284 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8285
8286         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
8287         fields.
8288         (frv_current_sos): Allocate lm_info_frv with new.
8289         (frv_relocate_main_executable): Free lm_info_frv with delete,
8290         allocate with new.
8291         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
8292
8293 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8294
8295         * solib-frv.c (struct lm_info_frv): Fix indentation.
8296
8297 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8298
8299         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
8300         map field.
8301         (dsbt_current_sos): Allocate lm_info_dsbt with new.
8302         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
8303         and allocate with new.
8304         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
8305
8306 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8307
8308         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
8309         <filename, member_name>: Change type to std::string.
8310         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
8311         (library_list_start_library): Allocate lm_info_aix with new.
8312         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
8313         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
8314         with copy constructor.
8315
8316 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8317
8318         * solist.h (struct lm_info): Remove.
8319         (struct lm_info_base): New class.
8320         (struct so_list) <lm_info>: Change type to lm_info_base *.
8321         * nto-tdep.c (struct lm_info): Remove.
8322         (lm_addr): Adjust.
8323         * solib-aix.c (struct lm_info): Rename to ...
8324         (struct lm_info_aix): ... this.  Extend lm_info_base.
8325         (lm_info_p): Rename to ...
8326         (lm_info_aix_p): ... this, and adjust.
8327         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
8328         solib_aix_parse_libraries, library_list_start_library,
8329         solib_aix_free_library_list, solib_aix_parse_libraries,
8330         solib_aix_get_library_list,
8331         solib_aix_relocate_section_addresses, solib_aix_free_so,
8332         solib_aix_get_section_offsets,
8333         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
8334         Adjust.
8335         (struct solib_aix_inferior_data) <library_list>: Adjust.
8336         * solib-darwin.c (struct lm_info): Rename to ...
8337         (struct lm_info_darwin): ... this.  Extend lm_info_base.
8338         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
8339         * solib-dsbt.c (struct lm_info): Rename to ...
8340         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
8341         (struct dsbt_info) <main_executable_lm_info): Adjust.
8342         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
8343         dsbt_relocate_section_addresses): Adjust.
8344         * solib-frv.c (struct lm_info): Rename to ...
8345         (struct lm_info_frv): ... this.  Extend lm_info_base.
8346         (main_executable_lm_info): Adjust.
8347         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
8348         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
8349         find_canonical_descriptor_in_load_object,
8350         frv_fdpic_find_canonical_descriptor): Adjust.
8351         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
8352         to lm_info_svr4.
8353         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
8354         svr4_clear_so, svr4_copy_library_list,
8355         library_list_start_library, svr4_default_sos, svr4_read_so_list,
8356         svr4_current_sos, svr4_fetch_objfile_link_map,
8357         solist_update_incremental): Adjust.
8358         * solib-svr4.h (struct lm_info_svr4): Move here from
8359         solib-svr4.c.
8360         * solib-target.c (struct lm_info): Rename to ...
8361         (struct lm_info_target): ... this.  Extend lm_info_base.
8362         (lm_info_p): Rename to ...
8363         (lm_info_target_p): ... this.
8364         (solib_target_parse_libraries, library_list_start_segment,
8365         library_list_start_section, library_list_start_library,
8366         library_list_end_library, solib_target_free_library_list,
8367         solib_target_current_sos, solib_target_free_so,
8368         solib_target_relocate_section_addresses): Adjust.
8369         * windows-nat.c (struct lm_info): Rename to ...
8370         (struct lm_info_windows): ... this.  Extend lm_info_base.
8371         (windows_make_so, handle_load_dll, handle_unload_dll,
8372         windows_xfer_shared_libraries): Adjust.
8373
8374 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
8375
8376         * solib-darwin.c (struct darwin_so_list): Remove.
8377         (darwin_current_sos): Allocate an so_list object instead of a
8378         darwin_so_list, separately allocate an lm_info object.
8379         (darwin_free_so): Free lm_info.
8380
8381 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
8382
8383         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
8384         with fprintf_filtered.
8385
8386 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8387
8388         * regcache.c (regcache::regcache): New function.
8389         (regcache::~regcache): New function.
8390         (regcache_xmalloc_1): Remove.
8391         (regcache_xmalloc): Call new regcache.
8392         (regcache_xfree): Call delete regcache.
8393         (get_thread_arch_aspace_regcache): Call new regcache.
8394
8395 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8396
8397         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
8398         lwp instead of ptid_get_lwp.
8399
8400 2017-04-28  Yao Qi  <yao.qi@linaro.org>
8401
8402         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
8403         lwp_info instead of getting from inferior_ptid.
8404
8405 2017-04-27  Keith Seitz  <keiths@redhat.com>
8406
8407         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
8408         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
8409         (CV_CONVERSION_BADNESS): Define.
8410         (rank_one_type): Remove overly restrictive rvalue reference
8411         rank checks.
8412         Add cv-qualifier checks and subranks for type equality.
8413         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
8414         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
8415         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
8416
8417 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
8418
8419         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
8420         count when creating the object.
8421
8422 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
8423             Ulrich Weigand  <uweigand@de.ibm.com>
8424
8425         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
8426         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
8427         is used in AIX.
8428         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
8429         (process_xcoff_symbol): Likewise.
8430         (scan_xcoff_symtab): Likewise.
8431
8432 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8433
8434         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
8435         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
8436         (ia64_access_reg): Use get_frame_register_unsigned.
8437         (ia64_access_rse_reg): Likewise.
8438         (ia64_libunwind_frame_prev_register): Likewise.
8439
8440 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
8441
8442         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
8443         * gdbarch.c: Regenerated.
8444         * gdbarch.h: Regenerated.
8445         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
8446         visibility external.
8447         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
8448         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
8449         (enum cfa_how_kind): Move to ...
8450         (struct dwarf2_frame_state_reg_info): Likewise.
8451         (struct dwarf2_frame_state): Likewise.
8452         * dwarf2-frame.h: ... here.
8453         (dwarf2_frame_state_alloc_regs): New declaration.
8454         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
8455         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
8456
8457 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8458
8459         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
8460         regcache_raw_read_unsigned.
8461         (xtensa_pseudo_register_write): Likewise.
8462
8463 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
8464
8465         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
8466         (nds32_pseudo_register_write): Likewise.
8467
8468 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8469
8470         * regcache.c (struct regcache) <readonly_p>: Change its type
8471         to bool.
8472         (regcache_xmalloc_1): Update parameter type and callers update.
8473
8474 2017-04-25  Yao Qi  <yao.qi@linaro.org>
8475
8476         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
8477         set_gdbarch_wchar_bit.
8478         * arm-tdep.c (arm_gdbarch_init): Likewise.
8479
8480 2017-04-25  Pedro Alves  <palves@redhat.com>
8481
8482         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
8483         (BothAreRelocatable, memcopy, memmove): Don't define.
8484         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
8485         macros.
8486
8487 2017-04-25  Pedro Alves  <palves@redhat.com>
8488
8489         * common/common-defs.h: Include "common/poison.h".
8490         * common/function-view.h: (Not, Or, Requires): Move to traits.h
8491         and adjust.
8492         * common/poison.h: New file.
8493         * common/traits.h: Include <type_traits>.
8494         (Not, Or, Requires): New, moved from common/function-view.h.
8495
8496 2017-04-25  Pedro Alves  <palves@redhat.com>
8497
8498         * breakpoint.h (struct breakpoint): In-class initialize all
8499         fields.  Make boolean fields "bool".
8500         * breakpoint.c (init_raw_breakpoint_without_location): Remove
8501         memset call and initializations no longer necessary.
8502
8503 2017-04-25  Pedro Alves  <palves@redhat.com>
8504
8505         * btrace.c (pt_btrace_insn_flags): Change parameter type to
8506         reference.
8507         (pt_btrace_insn): New function.
8508         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
8509
8510 2017-04-25  Pedro Alves  <palves@redhat.com>
8511
8512         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
8513         "base" field and inherit from "bp_location" instead.  Add
8514         non-default ctor.
8515         (allocate_location_exception): Use new non-default ctor.
8516         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
8517         (init_bp_location): Convert to ...
8518         (bp_location::bp_location): ... this new ctor, and remove memset
8519         call.
8520         (base_breakpoint_allocate_location): Use the new non-default ctor.
8521         * breakpoint.h (bp_location): Now a class.  Declare default and
8522         non-default ctors.  In-class initialize all members.
8523         (init_bp_location): Remove declaration.
8524
8525 2017-04-25  Pedro Alves  <palves@redhat.com>
8526
8527         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
8528         assignment operator.
8529
8530 2017-04-24  Yao Qi  <yao.qi@linaro.org>
8531
8532         * doublest.c (convert_doublest_to_floatformat): Call
8533         floatformat_totalsize_bytes.
8534
8535 2017-04-22  Tom Tromey  <tom@tromey.com>
8536
8537         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8538         ui_out_emit_list.
8539         * stack.c (print_frame): Use ui_out_emit_list.
8540         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8541         ui_out_emit_list.
8542         * mi/mi-main.c (print_one_inferior)
8543         (mi_cmd_data_list_register_names)
8544         (mi_cmd_data_list_register_values, mi_cmd_list_features)
8545         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
8546         ui_out_emit_list.
8547         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
8548         (mi_output_solib_attribs): Use ui_out_emit_list,
8549         ui_out_emit_tuple.
8550         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
8551         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
8552         (mi_cmd_stack_list_args, list_args_or_locals): Use
8553         ui_out_emit_list.
8554         * disasm.c (do_assembly_only): Use ui_out_emit_list.
8555         * breakpoint.c (print_solib_event, output_thread_groups): Use
8556         ui_out_emit_list.
8557
8558 2017-04-22  Tom Tromey  <tom@tromey.com>
8559
8560         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
8561         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
8562         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
8563
8564 2017-04-22  Tom Tromey  <tom@tromey.com>
8565
8566         * tracepoint.c (tvariables_info_1)
8567         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
8568
8569 2017-04-22  Tom Tromey  <tom@tromey.com>
8570
8571         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
8572         annotate_arg_emitter.
8573         * breakpoint.c (print_mention_watchpoint)
8574         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
8575         * annotate.h (struct annotate_arg_emitter): New.
8576
8577 2017-04-22  Tom Tromey  <tom@tromey.com>
8578
8579         * record-btrace.c (record_btrace_insn_history)
8580         (record_btrace_insn_history_range, record_btrace_call_history)
8581         (record_btrace_call_history_range): Use ui_out_emit_tuple.
8582         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
8583         ui_out_emit_tuple.
8584         * stack.c (print_frame_info): Use ui_out_emit_tuple.
8585         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
8586         * skip.c (skip_info): Use ui_out_emit_tuple.
8587         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
8588         * progspace.c (print_program_space): Use ui_out_emit_tuple.
8589         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
8590         * osdata.c (info_osdata): Use ui_out_emit_tuple.
8591         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
8592         ui_out_emit_tuple.
8593         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
8594         (output_register, mi_cmd_data_read_memory)
8595         (mi_cmd_data_read_memory_bytes, mi_load_progress)
8596         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
8597         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
8598         Use ui_out_emit_tuple.
8599         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
8600         ui_out_emit_tuple.
8601         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
8602         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
8603         * linux-thread-db.c (info_auto_load_libthread_db): Use
8604         ui_out_emit_tuple.
8605         * inferior.c (print_inferior): Use ui_out_emit_tuple.
8606         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
8607         * disasm.c (do_mixed_source_and_assembly_deprecated)
8608         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
8609         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
8610         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
8611         * breakpoint.c (print_one_breakpoint_location)
8612         (print_one_breakpoint): Use ui_out_emit_tuple.
8613         * auto-load.c (print_script, info_auto_load_cmd): Use
8614         ui_out_emit_tuple.
8615         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
8616
8617 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
8618
8619         * thread.c (print_thread_info_1): Remove dead code.
8620
8621 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8622
8623         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
8624         GDB_SELF_TEST.
8625         * arm-tdep.c (selftests::arm_record_test): Likewise.
8626
8627 2017-04-21  Yao Qi  <yao.qi@linaro.org>
8628
8629         * regcache.c (regcache_restore): Remove argument 2.  Replace
8630         argument 3 with regcache.  Get register status from
8631         src->register_status and get register contents from
8632         register_buffer (src, regnum).
8633         (regcache_cpy): Update.
8634
8635 2017-04-19  Pedro Alves  <palves@redhat.com>
8636
8637         * gdbthread.h (thread): Add missing closing parenthesis in
8638         comment.
8639
8640 2017-04-19  Pedro Alves  <palves@redhat.com>
8641
8642         * common/refcounted-object.h: New file.
8643         * gdbthread.h: Include "common/refcounted-object.h".
8644         (thread_info): Inherit from refcounted_object and add comments.
8645         (thread_info::incref, thread_info::decref)
8646         (thread_info::m_refcount): Delete.
8647         (thread_info::deletable): Use the refcounted_object::refcount()
8648         method.
8649         * inferior.c (current_inferior_): Add comment.
8650         (set_current_inferior): Increment/decrement refcounts.
8651         (prune_inferiors, remove_inferior_command): Skip inferiors marked
8652         not-deletable instead of comparing with the current inferior.
8653         (initialize_inferiors): Increment the initial inferior's refcount.
8654         * inferior.h (struct inferior): Forward declare.
8655         Include "common/refcounted-object.h".
8656         (current_inferior, set_current_inferior): Move declaration to
8657         before struct inferior's definition, and fix comment.
8658         (inferior): Inherit from refcounted_object.  Add comments.
8659         * thread.c (switch_to_thread_no_regs): Reference the thread's
8660         inferior pointer directly instead of doing a ptid lookup.
8661         (switch_to_no_thread): New function.
8662         (switch_to_thread(thread_info *)): New function, factored out
8663         from ...
8664         (switch_to_thread(ptid_t)): ... this.
8665         (restore_current_thread): Delete.
8666         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
8667         fields, and add 'inf' field.
8668         (do_restore_current_thread_cleanup): Check whether old->inf is
8669         alive instead of looking up an inferior by ptid.  Use
8670         switch_to_thread and switch_to_no_thread.
8671         (restore_current_thread_cleanup_dtor): Use old->inf directly
8672         instead of lookup up an inferior by id.  Decref the inferior.
8673         Don't restore 'removable'.
8674         (make_cleanup_restore_current_thread): Same the inferior pointer
8675         in old, instead of the inferior number.  Incref the inferior.
8676         Don't save/clear 'removable'.
8677
8678 2017-04-19  Pedro Alves  <palves@redhat.com>
8679
8680         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8681         unittests/scoped_restore-selftests.c.
8682         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
8683         * common/scoped_restore.h (scoped_restore_base): Make "class".
8684         (scoped_restore_base::release): New public method.
8685         (scoped_restore_base::scoped_restore_base): New protected ctor.
8686         (scoped_restore_base::m_saved_var): New protected field.
8687         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
8688         scoped_restore_base base class instead of m_saved_var directly.
8689         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
8690         (scoped_restore_tmpl::scoped_restore_tmpl(const
8691         scoped_restore_tmpl<T>&)): Likewise.
8692         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
8693         method.
8694         (scoped_restore_tmpl::saved_var): New method.
8695         (scoped_restore_tmpl::m_saved_var): Delete.
8696         * inferior.h (inferior::detaching): Now a bool.
8697         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
8698         cleanup.
8699         * unittests/scoped_restore-selftests.c: New file.
8700
8701 2017-04-19  Pedro Alves  <palves@redhat.com>
8702
8703         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
8704         Re-sort in alphabetic order.
8705
8706 2017-04-18  Pedro Alves  <palves@redhat.com>
8707
8708         * xml-support.c (obstack_xml_printf): Delete.
8709         * xml-support.h (obstack_xml_printf): Delete.
8710
8711 2017-04-18  Pedro Alves  <palves@redhat.com>
8712
8713         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
8714         vdebug, verror, body_text, start_element, end_element, name,
8715         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
8716         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
8717         is_xinclude>: Make private and add m_ prefix.
8718         (gdb_xml_parser::body_text): New method, based on ...
8719         (gdb_xml_body_text): ... this.  Adjust.
8720         (gdb_xml_parser::vdebug): New method, based on ...
8721         (gdb_xml_debug): ... this.  Adjust.
8722         (gdb_xml_parser::verror): New method, based on ...
8723         (gdb_xml_error): ... this.  Adjust.
8724         (gdb_xml_parser::start_element): New method, based on ...
8725         (gdb_xml_start_element): ... this.  Adjust.
8726         (gdb_xml_start_element_wrapper): Defer to
8727         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
8728         (gdb_xml_parser::end_element): New method, based on ...
8729         (gdb_xml_end_element_wrapper): ... this.  Adjust.
8730         (gdb_xml_parser::~gdb_xml_parser): Adjust.
8731         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
8732         (gdb_xml_parser::use_dtd): New method, based on ...
8733         (gdb_xml_use_dtd): ... this.  Adjust.
8734         (gdb_xml_parser::parse): New method, based on ...
8735         (gdb_xml_parse): ... this.  Adjust.
8736         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
8737         (xinclude_start_include): Adjust to call the parser's name method.
8738         (xml_xinclude_default, xml_xinclude_start_doctype)
8739         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
8740         method.
8741         (xml_process_xincludes): Adjust to call parser methods.
8742         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
8743         declarations.
8744
8745 2017-04-18  Pedro Alves  <palves@redhat.com>
8746
8747         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
8748         gdb::optional<std::string>.
8749         * xml-support.c: Include <string>.
8750         (scope_level::scope_level(scope_level &&))
8751         (scope_level::~scope_level): Delete.
8752         (scope_level::body): Now a std::string.
8753         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
8754         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
8755         parameter.
8756         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
8757         (xinclude_parsing_data::output): Now a std::string reference.
8758         (xinclude_start_include): Adjust.
8759         (xml_xinclude_default): Adjust.
8760         (xml_process_xincludes): Add 'output' parameter, and return bool.
8761         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
8762         and return bool.
8763         * xml-tdesc.c: Include <unordered_map> and <string>.
8764         (tdesc_xml_cache): Delete.
8765         (tdesc_xml_cache_s): Delete.
8766         (xml_cache): Now an std::unordered_map.
8767         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
8768         (target_fetch_description_xml): Change return type to
8769         gdb::optional<std::string>, and adjust.
8770         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
8771         (target_fetch_description_xml): Change return type to
8772         gdb::optional<std::string>.
8773
8774 2017-04-18  Pedro Alves  <palves@redhat.com>
8775
8776         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8777         unittests/optional-selftests.c.
8778         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
8779         * unittests/optional-selftests.c: New file.
8780         * unittests/optional/assignment/1.cc: New file.
8781         * unittests/optional/assignment/2.cc: New file.
8782         * unittests/optional/assignment/3.cc: New file.
8783         * unittests/optional/assignment/4.cc: New file.
8784         * unittests/optional/assignment/5.cc: New file.
8785         * unittests/optional/assignment/6.cc: New file.
8786         * unittests/optional/assignment/7.cc: New file.
8787         * unittests/optional/cons/copy.cc: New file.
8788         * unittests/optional/cons/default.cc: New file.
8789         * unittests/optional/cons/move.cc: New file.
8790         * unittests/optional/cons/value.cc: New file.
8791         * unittests/optional/in_place.cc: New file.
8792         * unittests/optional/observers/1.cc: New file.
8793         * unittests/optional/observers/2.cc: New file.
8794
8795 2017-04-18  Pedro Alves  <palves@redhat.com>
8796
8797         * common/gdb_optional.h: Include common/traits.h.
8798         (in_place_t): New type.
8799         (in_place): New constexpr variable.
8800         (optional::optional): Remove member initialization of
8801         m_instantiated.
8802         (optional::optional(in_place_t...)): New constructor.
8803         (optional::~optional): Use reset.
8804         (optional::optional(const optional&)): New.
8805         (optional::optional(const optional&&)): New.
8806         (optional::optional(T &)): New.
8807         (optional::optional(T &&)): New.
8808         (operator::operator=(const optional &)): New.
8809         (operator::operator=(optional &&)): New.
8810         (operator::operator= (const T &))
8811         (operator::operator= (T &&))
8812         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
8813         (operator::reset): New.
8814         (operator::m_instantiated):: Add in-class initializer.
8815         * common/traits.h: Include <type_traits>.
8816         (struct And): New types.
8817
8818 2017-04-18  Pedro Alves  <palves@redhat.com>
8819
8820         * xml-support.c: Include <vector>.
8821         (scope_level::scope_level(const gdb_xml_element *))
8822         (scope_level::scope_level(scope_level&&)): New.
8823         (scope_level::~scope_level): New.
8824         (scope_level_s): Delete.
8825         (gdb_xml_parser::scopes): Now a std::vector.
8826         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
8827         Use std::vector.
8828         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
8829         scope cleanup code.
8830         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
8831         of the scopes member.  Use std::vector::emplace_back.
8832
8833 2017-04-18  Pedro Alves  <palves@redhat.com>
8834
8835         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
8836         a bool.
8837         (gdb_xml_end_element): Change type of first parameter.
8838         (gdb_xml_cleanup): Rename to ...
8839         (gdb_xml_parser::~gdb_xml_parser): ... this.
8840         (gdb_xml_create_parser_and_cleanup): Delete with ...
8841         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
8842         to this new ctor.
8843         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
8844         using gdb_xml_create_parser_and_cleanup.
8845         (xinclude_parsing_data): Add ctor/dtor.
8846         (xml_xinclude_cleanup): Delete.
8847         (xml_process_xincludes): Create a local xinclude_parsing_data
8848         instead of heap-allocating one.  Create a local gdb_xml_parser
8849         instead of heap-allocating one with
8850         gdb_xml_create_parser_and_cleanup.
8851
8852 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
8853
8854         PR threads/20743
8855         * fbsd-nat.c (resume_one_thread_cb): Remove.
8856         (resume_all_threads_cb): Remove.
8857         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
8858         iterate_over_threads.
8859
8860 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8861
8862         * NEWS: Create a new section for the next release branch.
8863         Rename the section of the current branch, now that it has
8864         been cut.
8865
8866 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
8867
8868         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
8869         * version.in: Bump version to 8.0.50.DATE-git.
8870
8871 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
8872
8873         PR gdb/21385
8874         * windows-nat.c (windows_create_inferior): Declare 'allargs'
8875         independently of the host, and fix build breakage on Cygwin.
8876
8877 2017-04-13  Pedro Alves  <palves@redhat.com>
8878
8879         * inferior.c (free_inferior): Convert to ...
8880         (inferior::~inferior): ... this dtor.
8881         (inferior::inferior): New ctor, factored out from ...
8882         (add_inferior_silent): ... here.  Allocate the inferior with a new
8883         expression.
8884         (delete_inferior): Call delete instead of free_inferior.
8885         * inferior.h (gdb_environ, continuation): Forward declare.
8886         (inferior): Now a class.  Add in-class initialization to all
8887         members.  Make boolean fields bool, except 'detaching'.
8888         (inferior::inferior): New explicit ctor.
8889         (inferior::~inferior): New.
8890
8891 2017-04-13  Pedro Alves  <palves@redhat.com>
8892
8893         * inferior.c (init_inferior_list): Delete.
8894         * inferior.h (init_inferior_list): Delete.
8895
8896 2017-04-13  Pedro Alves  <palves@redhat.com>
8897
8898         PR threads/13217
8899         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
8900         (top level): Call it twice, with different thread sets.
8901
8902 2017-04-13  Pedro Alves  <palves@redhat.com>
8903
8904         * thread.c: Include <algorithm>.
8905         (thread_array_cleanup): Delete.
8906         (scoped_inc_dec_ref): New class.
8907         (live_threads_count): New function.
8908         (set_thread_refcount): Delete.
8909         (tp_array_compar_ascending): Now a bool.
8910         (tp_array_compar): Convert to a std::sort comparison function.
8911         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
8912         and live_threads_count.
8913
8914 2017-04-13  Pedro Alves  <palves@redhat.com>
8915
8916         * infrun.c (follow_fork_inferior): Also switch the current
8917         inferior.
8918
8919 2017-04-13  Pedro Alves  <palves@redhat.com>
8920
8921         * breakpoint.c (watch_command_1): Save watchpoint-frame info
8922         before calling create_internal_breakpoint.
8923
8924 2017-04-13  Pedro Alves  <palves@redhat.com>
8925
8926         * fork-child.c (execv_argv): New class.
8927         (breakup_args): Refactored as ...
8928         (execv_argv::init_for_no_shell): .. this method of execv_argv.
8929         Copy arguments to storage and replace separators with NULL
8930         terminators in place.
8931         (escape_bang_in_quoted_argument): Adjust to return bool.
8932         (execv_argv::execv_argv): New ctor.
8933         (execv_argv::init_for_shell): New method, factored out from
8934         fork_inferior.  Don't strdup strings into the vector.
8935         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
8936         Remove free_vector_argv call.
8937
8938 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8939
8940         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
8941         tdep->rx_psw_type.
8942
8943 2017-04-13  Yao Qi  <yao.qi@linaro.org>
8944
8945         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
8946         * rx-tdep.c (rx_gdbarch_init): Likewise.
8947
8948 2017-04-13  Pedro Alves  <palves@redhat.com>
8949
8950         * breakpoint.h (struct breakpoint): Reindent.
8951
8952 2017-04-13  Pedro Alves  <palves@redhat.com>
8953
8954         * breakpoint.c (bp_location): Rename to ...
8955         (bp_locations): ... this.  All references updated.
8956         (bp_location_count): Rename to ...
8957         (bp_locations_count): ... this.  All references updated.
8958         (bp_location_placed_address_before_address_max): Rename to ...
8959         (bp_locations_placed_address_before_address_max): ... this.  All
8960         references updated.
8961         (bp_location_shadow_len_after_address_max): Rename to ...
8962         (bp_locations_shadow_len_after_address_max): ... this.  All
8963         references updated.
8964         (bp_location_compare_addrs): Rename to ...
8965         (bp_locations_compare_addrs): ... this.  All references updated.
8966         (bp_location_compare):Rename to ...
8967         (bp_locations_compare): ... this.  All references updated.
8968         (bp_location_target_extensions_update): Rename to ...
8969         (bp_locations_target_extensions_update): ... this.  All references
8970         updated.
8971
8972 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8973
8974         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
8975         * common/common.m4: Check headers 'termios.h', 'termio.h' and
8976         'sgtty.h'.
8977         * common/gdb_termios.h: New file, with parts of "terminal.h".
8978         * inflow.c: Include "gdb_termios.h".
8979         * ser-unix.c: Include "gdb_termios.h".
8980         * terminal.h: Move terminal-related defines to
8981         "common/gdb_termios.h".
8982
8983 2017-04-12  Tom Tromey  <tom@tromey.com>
8984
8985         * probe.c (parse_probes): Update.
8986         * location.h (delete_event_location): Don't declare.
8987         (event_location_deleter::operator()): Update.
8988         * location.c (event_location_deleter::operator()): Rename from
8989         delete_event_location.
8990         * linespec.h (linespec_result) <location>: Change type to
8991         event_location_up.
8992         * linespec.c (canonicalize_linespec, event_location_to_sals)
8993         (decode_objc): Update.
8994         (linespec_result): Don't call delete_event_location.
8995         * breakpoint.c (create_breakpoints_sal)
8996         (bkpt_probe_create_sals_from_location)
8997         (strace_marker_create_sals_from_location): Update.
8998
8999 2017-04-12  Tom Tromey  <tom@tromey.com>
9000
9001         * linespec.h (struct linespec_result): Add constructor and
9002         destructor.
9003         (init_linespec_result, destroy_linespec_result)
9004         (make_cleanup_destroy_linespec_result): Don't declare.
9005         * linespec.c (init_linespec_result): Remove.
9006         (linespec_result::~linespec_result): Rename from
9007         destroy_linespec_result.  Update.
9008         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9009         Remove.
9010         * breakpoint.c (create_breakpoint, break_range_command)
9011         (decode_location_default): Update.
9012         * ax-gdb.c (agent_command_1): Update.
9013
9014 2017-04-12  Tom Tromey  <tom@tromey.com>
9015
9016         * remote.c (remote_download_tracepoint): Update.
9017         * python/py-breakpoint.c (bppy_get_location): Update.
9018         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9019         (gdbscm_breakpoint_location): Update.
9020         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9021         * breakpoint.h (struct breakpoint) <location, location_range_end>:
9022         Change type to event_location_up.
9023         * breakpoint.c (create_overlay_event_breakpoint)
9024         (create_longjmp_master_breakpoint)
9025         (create_std_terminate_master_breakpoint)
9026         (create_exception_master_breakpoint)
9027         (breakpoint_event_location_empty_p, print_breakpoint_location)
9028         (print_one_breakpoint_location, create_thread_event_breakpoint)
9029         (init_breakpoint_sal, create_breakpoint)
9030         (print_recreate_ranged_breakpoint, break_range_command)
9031         (init_ada_exception_breakpoint, say_where): Update.
9032         (base_breakpoint_dtor): Don't call delete_event_location.
9033         (bkpt_print_recreate, tracepoint_print_recreate)
9034         (dprintf_print_recreate, update_static_tracepoint)
9035         (breakpoint_re_set_default): Update.
9036
9037 2017-04-12  Tom Tromey  <tom@tromey.com>
9038
9039         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
9040         type of "to_do".  Update.
9041         (compute_stack_depth): Use std::vector.
9042
9043 2017-04-12  Tom Tromey  <tom@tromey.com>
9044
9045         * printcmd.c (find_instruction_backward): Use std::vector.
9046
9047 2017-04-12  Tom Tromey  <tom@tromey.com>
9048
9049         * symfile.c (objfilep): Remove typedef.
9050         (reread_symbols): Use a std::vector.
9051
9052 2017-04-12  Tom Tromey  <tom@tromey.com>
9053
9054         * mi/mi-main.c (exec_direction_forward): Remove.
9055         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
9056         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
9057         scoped_restore.
9058         * guile/guile.c (guile_repl_command, guile_command)
9059         (gdbscm_execute_gdb_command): Use scoped_restore.
9060         * go-exp.y (go_parse): Use scoped_restore.
9061         * d-exp.y (d_parse): Use scoped_restore.
9062         * cli/cli-decode.c (cmd_func): Use scoped_restore.
9063         * c-exp.y (c_parse): Use scoped_restore.
9064
9065 2017-04-12  Tom Tromey  <tom@tromey.com>
9066
9067         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
9068         (mi_parse): Update return type.
9069         (mi_parse_free): Remove.
9070         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
9071         (mi_parse::~mi_parse): Rename from mi_parse_free.
9072         (mi_parse_cleanup): Remove.
9073         (mi_parse): Return a unique_ptr.  Use new.
9074         * mi/mi-main.c (mi_execute_command): Update.
9075
9076 2017-04-12  Tom Tromey  <tom@tromey.com>
9077
9078         * location.c (explicit_location_lex_one): Return a
9079         unique_xmalloc_ptr.
9080         (string_to_explicit_location): Update.  Remove cleanups.
9081
9082 2017-04-12  Tom Tromey  <tom@tromey.com>
9083
9084         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
9085         (compare_value_and_voffset): Change type.  Update.
9086         (compute_vtable_size): Change type of "offset_vec".
9087         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
9088         (gnuv3_get_typeid): Remove extraneous declaration.
9089
9090 2017-04-12  Tom Tromey  <tom@tromey.com>
9091
9092         * charset.h (wchar_iterator): Fix comment.
9093
9094 2017-04-12  Tom Tromey  <tom@tromey.com>
9095
9096         * charset.c (iconv_wrapper): New class.
9097         (cleanup_iconv): Remove.
9098         (convert_between_encodings): Use it.
9099
9100 2017-04-12  Tom Tromey  <tom@tromey.com>
9101
9102         * symfile.h (increment_reading_symtab): Update type.
9103         * symfile.c (decrement_reading_symtab): Remove.
9104         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
9105         * psymtab.c (psymtab_to_symtab): Update.
9106         * dwarf2read.c (dw2_instantiate_symtab): Update.
9107
9108 2017-04-12  Tom Tromey  <tom@tromey.com>
9109
9110         * jit.c (struct jit_reader): Declare separately.  Add constructor
9111         and destructor.  Change type of "handle".
9112         (loaded_jit_reader): Define separately.
9113         (jit_reader_load): Update.  New "new".
9114         (jit_reader_unload_command): Use "delete".
9115         * gdb-dlfcn.h (struct dlclose_deleter): New.
9116         (gdb_dlhandle_up): New typedef.
9117         (gdb_dlopen, gdb_dlsym): Update types.
9118         (gdb_dlclose): Remove.
9119         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
9120         (gdb_dlsym): Change type of "handle".
9121         (make_cleanup_dlclose): Remove.
9122         (dlclose_deleter::operator()): Rename from gdb_dlclose.
9123         * compile/compile-c-support.c (load_libcc): Update.
9124
9125 2017-04-12  Tom Tromey  <tom@tromey.com>
9126
9127         * symtab.h (find_pcs_for_symtab_line): Change return type.
9128         * symtab.c (find_pcs_for_symtab_line): Change return type.
9129         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
9130         type of "vec".  Update.
9131         (ltpy_get_pcs_for_line): Update.
9132         * linespec.c (decode_digits_ordinary): Update.
9133
9134 2017-04-12  Tom Tromey  <tom@tromey.com>
9135
9136         * tracepoint.c (actions_command): Update.
9137         * python/python.c (python_command, python_interactive_command):
9138         Update.
9139         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9140         * guile/guile.c (guile_command): Update.
9141         * defs.h (read_command_lines, read_command_lines_1): Return
9142         command_line_up.
9143         (command_lines_deleter): New struct.
9144         (command_line_up): New typedef.
9145         * compile/compile.c (compile_code_command)
9146         (compile_print_command): Update.
9147         * cli/cli-script.h (get_command_line, copy_command_lines): Return
9148         command_line_up.
9149         (make_cleanup_free_command_lines): Remove.
9150         * cli/cli-script.c (get_command_line, read_command_lines_1)
9151         (copy_command_lines): Return command_line_up.
9152         (while_command, if_command, read_command_lines, define_command)
9153         (document_command): Update.
9154         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
9155         Remove.
9156         * breakpoint.h (breakpoint_set_commands): Change type of
9157         "commands".
9158         * breakpoint.c (breakpoint_set_commands): Change type of
9159         "commands".  Update.
9160         (do_map_commands_command, update_dprintf_command_list)
9161         (create_tracepoint_from_upload): Update.
9162
9163 2017-04-12  Tom Tromey  <tom@tromey.com>
9164
9165         * tracepoint.c (scope_info): Update.
9166         * spu-tdep.c (spu_catch_start): Update.
9167         * python/python.c (gdbpy_decode_line): Update.
9168         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
9169         * python/py-breakpoint.c (bppy_init): Update.
9170         * probe.c (parse_probes): Update.
9171         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
9172         * location.h (event_location_deleter): New struct.
9173         (event_location_up): New typedef.
9174         (new_linespec_location, new_address_location, new_probe_location)
9175         (new_explicit_location, copy_event_location)
9176         (string_to_event_location, string_to_event_location_basic)
9177         (string_to_explicit_location): Update return type.
9178         (make_cleanup_delete_event_location): Remove.
9179         * location.c (new_linespec_location, new_address_location)
9180         (new_probe_location, new_explicit_location, copy_event_location):
9181         Return event_location_up.
9182         (delete_event_location_cleanup)
9183         (make_cleanup_delete_event_location): Remove.
9184         (string_to_explicit_location, string_to_event_location_basic)
9185         (string_to_event_location): Return event_location_up.
9186         * linespec.c (canonicalize_linespec, event_location_to_sals)
9187         (decode_line_with_current_source)
9188         (decode_line_with_last_displayed, decode_objc): Update.
9189         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
9190         * completer.c (location_completer): Update.
9191         * cli/cli-cmds.c (edit_command, list_command): Update.
9192         * breakpoint.c (create_overlay_event_breakpoint)
9193         (create_longjmp_master_breakpoint)
9194         (create_std_terminate_master_breakpoint)
9195         (create_exception_master_breakpoint)
9196         (create_thread_event_breakpoint): Update.
9197         (init_breakpoint_sal): Update.  Remove some dead code.
9198         (create_breakpoint_sal): Change type of "location".  Update.
9199         (create_breakpoints_sal, create_breakpoint, break_command_1)
9200         (dprintf_command, break_range_command, until_break_command)
9201         (init_ada_exception_breakpoint)
9202         (strace_marker_create_sals_from_location)
9203         (update_static_tracepoint, trace_command, ftrace_command)
9204         (strace_command, create_tracepoint_from_upload): Update.
9205         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9206         * ax-gdb.c (agent_command_1): Update.
9207
9208 2017-04-12  Pedro Alves  <palves@redhat.com>
9209
9210         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
9211         * configure.tgt: Handle i[34567]86-*-go32* and
9212         i[34567]86-*-msdosdjgpp*.
9213         * i386-tdep.c (i386_svr4_reg_to_regnum):
9214         Make extern.
9215         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
9216         i386-go32-tdep.c.
9217         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
9218         * i386-go32-tdep.c: New file.
9219         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
9220         declarations.
9221
9222 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
9223
9224         * aix-thread.c (pd_status2str): Change return type to const char *.
9225
9226 2017-04-12  Pedro Alves  <palves@redhat.com>
9227
9228         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
9229         calls to set_gdbarch_gnu_triplet_regexp.
9230
9231 2017-04-12  Pedro Alves  <palves@redhat.com>
9232
9233         PR gdb/21323
9234         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
9235         New enum value.
9236         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
9237         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
9238         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
9239         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
9240         * gdbarch.h, gdbarch.c: Regenerate.
9241         * aarch64-tdep.c (aarch64_gdbarch_init): Override
9242         gdbarch_wchar_bit and gdbarch_wchar_signed.
9243         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
9244         * arm-tdep.c (arm_gdbarch_init): Likewise.
9245         * avr-tdep.c (avr_gdbarch_init): Likewise.
9246         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
9247         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
9248         * i386-tdep.c (i386_go32_init_abi): Likewise.
9249         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
9250         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
9251         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9252         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9253         * sh-tdep.c (sh_gdbarch_init): Likewise.
9254         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9255         * sparc64-tdep.c (sparc64_init_abi): Likewise.
9256         * windows-tdep.c (windows_init_abi): Likewise.
9257         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
9258
9259 2017-04-12  Pedro Alves  <palves@redhat.com>
9260
9261         PR c++/21323
9262         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
9263         cplus_primitive_type_char32_t>: New enum values.
9264         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
9265         and cplus_primitive_type_char32_t.
9266         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
9267         32, use the archtecture's built-in type for char16_t and char32_t,
9268         respectively.  Otherwise, fallback to init_integer_type as before,
9269         but make the type unsigned, and issue a complaint.
9270         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
9271
9272 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
9273
9274         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
9275         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
9276
9277 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9278
9279         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
9280         'const char *'.
9281
9282 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
9283
9284         * common/common-utils.c (free_vector_argv): New function.
9285         * common/common-utils.h: Include <vector>.
9286         (free_vector_argv): New prototype.
9287         * darwin-nat.c (darwin_create_inferior): Rewrite function
9288         prototype in order to constify "exec_file" and accept a
9289         "std::string" for "allargs".
9290         * fork-child.c: Include <vector>.
9291         (breakup_args): Rewrite function, using C++.
9292         (fork_inferior): Rewrite function header, constify "exec_file_arg"
9293         and accept "std::string" for "allargs".  Update the code to
9294         calculate "argv" based on "allargs".  Update calls to "exec_fun"
9295         and "execvp".
9296         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
9297         order to constify "exec_file" and accept a "std::string" for
9298         "allargs".
9299         * go32-nat.c (go32_create_inferior): Likewise.
9300         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
9301         * infcmd.c (run_command_1): Constify "exec_file".  Use
9302         "std::string" for inferior arguments.
9303         * inferior.h (fork_inferior): Update prototype.
9304         * linux-nat.c (linux_nat_create_inferior): Rewrite function
9305         prototype in order to constify "exec_file" and accept a
9306         "std::string" for "allargs".
9307         * nto-procfs.c (procfs_create_inferior): Likewise.
9308         * procfs.c (procfs_create_inferior): Likewise.
9309         * remote-sim.c (gdbsim_create_inferior): Likewise.
9310         * remote.c (extended_remote_run): Update code to accept
9311         "std::string" as argument.
9312         (extended_remote_create_inferior): Rewrite function prototype in
9313         order to constify "exec_file" and accept a "std::string" for
9314         "allargs".
9315         * rs6000-nat.c (super_create_inferior): Likewise.
9316         (rs6000_create_inferior): Likewise.
9317         * target.h (struct target_ops) <to_create_inferior>: Likewise.
9318         * windows-nat.c (windows_create_inferior): Likewise.
9319
9320 2017-04-11  Pedro Alves  <palves@redhat.com>
9321
9322         * thread.c: Fix whitespace throughout.
9323
9324 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
9325
9326         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
9327
9328 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
9329
9330         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
9331
9332 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
9333
9334         PR gdb/21364
9335         * osdata.c (info_osdata): Check if 'type' is an empty string
9336         instead of NULL.
9337
9338 2017-04-10  Pedro Alves  <palves@redhat.com>
9339
9340         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
9341         (ptid_to_global_thread_id, in_thread_list)
9342         (do_captured_list_thread_ids, set_resumed, set_running)
9343         (set_executing, set_stop_requested, finish_thread_state)
9344         (validate_registers_access, can_access_registers_ptid)
9345         (print_thread_info_1, switch_to_thread)
9346         (do_restore_current_thread_cleanup)
9347         (make_cleanup_restore_current_thread, thread_command)
9348         (thread_name_command): Use operator== instead of ptid_equal.
9349
9350 2017-04-10  Pedro Alves  <palves@redhat.com>
9351
9352         * thread.c (struct current_thread_cleanup) <next>: Delete field.
9353         (current_thread_cleanup_chain): Delete.
9354         (restore_current_thread_cleanup_dtor)
9355         (make_cleanup_restore_current_thread): Remove references to
9356         current_thread_cleanup_chain.
9357
9358 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
9359
9360         * msp430-tdep.c (msp430_pseudo_register_read): Never return
9361         REG_UNKNOWN.
9362
9363 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9364
9365         PR gdb/19942
9366         * gdbthread.h (thread_info::deletable): New method.
9367         (thread_info::incref): New method.
9368         (thread_info::decref): New method.
9369         (thread_info::refcount): Move it to private.
9370         * infrun.c (save_stop_context): Call inc_refcount.
9371         (release_stop_context_cleanup): Likewise.
9372         * thread.c (set_thread_exited): New function.
9373         (init_thread_list): Delete "tp" only it is deletable, otherwise
9374         call set_thread_exited.
9375         (delete_thread_1): Call set_thread_exited.
9376         (current_thread_cleanup) <inferior_pid>: Remove.
9377         <thread>: New field.
9378         (restore_current_thread_ptid_changed): Removed.
9379         (do_restore_current_thread_cleanup): Adjust.
9380         (restore_current_thread_cleanup_dtor): Don't call
9381         find_thread_ptid.
9382         (set_thread_refcount): Use dec_refcount.
9383         (make_cleanup_restore_current_thread): Adjust.
9384         (thread_apply_all_command): Call inc_refcount.
9385         (_initialize_thread): Don't call
9386         observer_attach_thread_ptid_changed.
9387
9388 2017-04-10  Yao Qi  <yao.qi@linaro.org>
9389
9390         * thread.c (delete_thread_1): Hoist code on marking thread as
9391         exited.
9392
9393 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9394
9395         * windows-nat.c (windows_detach): Initialize ptid with
9396         minus_one_ptid.
9397
9398 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9399
9400         * unittests/ptid-selftests.c: Fix erroneous assert messages.
9401
9402 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
9403
9404         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
9405         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
9406         (bfin_pseudo_register_write): Likewise
9407
9408 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
9409
9410         * common/ptid.h (struct ptid): Change to...
9411         (class ptid_t): ... this.
9412         <ptid_t>: New constructors.
9413         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
9414         matches>: New methods.
9415         <make_null, make_minus_one>: New static methods.
9416         <pid>: Rename to...
9417         <m_pid>: ...this.
9418         <lwp>: Rename to...
9419         <m_lwp>: ...this.
9420         <tid>: Rename to...
9421         <m_tid>: ...this.
9422         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
9423         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
9424         as references, move comment to class ptid_t.
9425         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
9426         ptid_t static methods.
9427         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
9428         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
9429         Take ptid arguments as references, implement using ptid_t methods.
9430         * unittests/ptid-selftests.c: New file.
9431         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9432         unittests/ptid-selftests.c.
9433         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
9434
9435 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
9436
9437         * python/python.c (python_run_simple_file): Cast mode literal to
9438         non-const char pointer as expected by PyFile_FromString.
9439
9440 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
9441
9442         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
9443         minus_one_ptid and null_ptid.
9444
9445 2017-04-05  Pedro Alves  <palves@redhat.com>
9446
9447         * warning.m4 (build_warnings): Remove -Wno-write-strings.
9448         * configure: Regenerate.
9449
9450 2017-04-05  Pedro Alves  <palves@redhat.com>
9451
9452         * ada-exp.y (yyerror): Constify.
9453         * ada-lang.c (bound_name, get_selections)
9454         (ada_variant_discrim_type)
9455         (ada_variant_discrim_name, ada_value_struct_elt)
9456         (ada_lookup_struct_elt_type, is_unchecked_variant)
9457         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
9458         (catch_ada_exception_command_split)
9459         (catch_ada_assert_command_split, catch_assert_command)
9460         (ada_op_name): Constify.
9461         * ada-lang.h (ada_yyerror, get_selections)
9462         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
9463         * arc-tdep.c (arc_print_frame_cache): Constify.
9464         * arm-tdep.c (arm_skip_stub): Constify.
9465         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
9466         (gen_aggregate_elt_ref): Constify.
9467         * bcache.c (print_bcache_statistics): Constify.
9468         * bcache.h (print_bcache_statistics): Constify.
9469         * break-catch-throw.c (catch_exception_command_1):
9470         * breakpoint.c (struct ep_type_description::description):
9471         Constify.
9472         (add_solib_catchpoint): Constify.
9473         (catch_fork_command_1): Add cast.
9474         (add_catch_command): Constify.
9475         * breakpoint.h (add_catch_command, add_solib_catchpoint):
9476         Constify.
9477         * bsd-uthread.c (bsd_uthread_state): Constify.
9478         * buildsym.c (patch_subfile_names): Constify.
9479         * buildsym.h (next_symbol_text_func, patch_subfile_names):
9480         Constify.
9481         * c-exp.y (yyerror): Constify.
9482         (token::oper): Constify.
9483         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
9484         * c-varobj.c (cplus_describe_child): Constify.
9485         * charset.c (find_charset_names): Add cast.
9486         (find_charset_names): Constify array and add const_cast.
9487         * cli/cli-cmds.c (complete_command, cd_command): Constify.
9488         (edit_command): Constify.
9489         * cli/cli-decode.c (lookup_cmd): Constify.
9490         * cli/cli-dump.c (dump_memory_command, dump_value_command):
9491         Constify.
9492         (struct dump_context): Constify.
9493         (add_dump_command, restore_command): Constify.
9494         * cli/cli-script.c (get_command_line): Constify.
9495         * cli/cli-script.h (get_command_line): Constify.
9496         * cli/cli-utils.c (check_for_argument): Constify.
9497         * cli/cli-utils.h (check_for_argument): Constify.
9498         * coff-pe-read.c (struct read_pe_section_data): Constify.
9499         * command.h (lookup_cmd): Constify.
9500         * common/print-utils.c (decimal2str): Constify.
9501         * completer.c (gdb_print_filename): Constify.
9502         * corefile.c (set_gnutarget): Constify.
9503         * cp-name-parser.y (yyerror): Constify.
9504         * cp-valprint.c (cp_print_class_member): Constify.
9505         * cris-tdep.c (cris_register_name, crisv32_register_name):
9506         Constify.
9507         * d-exp.y (yyerror): Constify.
9508         (struct token::oper): Constify.
9509         * d-lang.h (d_yyerror): Constify.
9510         * dbxread.c (struct header_file_location::name): Constify.
9511         (add_old_header_file, add_new_header_file, last_function_name)
9512         (dbx_next_symbol_text, add_bincl_to_list)
9513         (find_corresponding_bincl_psymtab, set_namestring)
9514         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
9515         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
9516         * defs.h (command_line_input, print_address_symbolic)
9517         (deprecated_readline_begin_hook): Constify.
9518         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
9519         Constify.
9520         * event-top.c (handle_line_of_input): Constify and add cast.
9521         * exceptions.c (catch_errors): Constify.
9522         * exceptions.h (catch_errors): Constify.
9523         * expprint.c (print_subexp_standard, op_string, op_name)
9524         (op_name_standard, dump_raw_expression, dump_raw_expression):
9525         * expression.h (op_name, op_string, dump_raw_expression):
9526         Constify.
9527         * f-exp.y (yyerror): Constify.
9528         (struct token::oper): Constify.
9529         (struct f77_boolean_val::name): Constify.
9530         * f-lang.c (f_word_break_characters): Constify.
9531         * f-lang.h (f_yyerror): Constify.
9532         * fork-child.c (fork_inferior): Add cast.
9533         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
9534         (new_variant): Constify.
9535         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
9536         * gdbarch.c: Regenerate.
9537         * gdbcore.h (set_gnutarget): Constify.
9538         * go-exp.y (yyerror): Constify.
9539         (token::oper): Constify.
9540         * go-lang.h (go_yyerror): Constify.
9541         * go32-nat.c (go32_sysinfo): Constify.
9542         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
9543         * guile/scm-cmd.c (cmdscm_function): Constify.
9544         * guile/scm-param.c (pascm_param_value): Constify.
9545         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
9546         (h8300sx_register_name): Constify.
9547         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
9548         Constify.
9549         * ia64-tdep.c (ia64_register_names): Constify.
9550         * infcmd.c (construct_inferior_arguments): Constify.
9551         (path_command, attach_post_wait): Constify.
9552         * language.c (show_range_command, show_case_command)
9553         (unk_lang_error): Constify.
9554         * language.h (language_defn::la_error)
9555         (language_defn::la_name_of_this): Constify.
9556         * linespec.c (decode_line_2): Constify.
9557         * linux-thread-db.c (thread_db_err_str): Constify.
9558         * lm32-tdep.c (lm32_register_name): Constify.
9559         * m2-exp.y (yyerror): Constify.
9560         * m2-lang.h (m2_yyerror): Constify.
9561         * m32r-tdep.c (m32r_register_names): Constify and make static.
9562         * m68hc11-tdep.c (m68hc11_register_names): Constify.
9563         * m88k-tdep.c (m88k_register_name): Constify.
9564         * macroexp.c (appendmem): Constify.
9565         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
9566         (upgrade_type, parse_external, parse_partial_symbols)
9567         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
9568         (new_symbol): Constify.
9569         * memattr.c (mem_info_command): Constify.
9570         * mep-tdep.c (register_name_from_keyword): Constify.
9571         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
9572         Constify.
9573         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
9574         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
9575         * mi/mi-main.c (captured_mi_execute_command): Constify and add
9576         cast.
9577         (mi_execute_async_cli_command): Constify.
9578         * mips-tdep.c (mips_register_name): Constify.
9579         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
9580         (am33_register_name, am33_2_register_name)
9581         * moxie-tdep.c (moxie_register_names): Constify.
9582         * nat/linux-osdata.c (osdata_type): Constify fields.
9583         * nto-tdep.c (nto_parse_redirection): Constify.
9584         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
9585         (lookup_child_selector): Constify.
9586         (objc_methcall::name): Constify.
9587         * objc-lang.h (lookup_objc_class, lookup_child_selector)
9588         (lookup_struct_typedef): Constify.
9589         * objfiles.c (pc_in_section): Constify.
9590         * objfiles.h (pc_in_section): Constify.
9591         * p-exp.y (struct token::oper): Constify.
9592         (yyerror): Constify.
9593         * p-lang.h (pascal_yyerror): Constify.
9594         * parser-defs.h (op_name_standard): Constify.
9595         (op_print::string): Constify.
9596         (exp_descriptor::op_name): Constify.
9597         * printcmd.c (print_address_symbolic): Constify.
9598         * psymtab.c (print_partial_symbols): Constify.
9599         * python/py-breakpoint.c (stop_func): Constify.
9600         (bppy_get_expression): Constify.
9601         * python/py-cmd.c (cmdpy_completer::name): Constify.
9602         (cmdpy_function): Constify.
9603         * python/py-event.c (evpy_add_attribute)
9604         (gdbpy_initialize_event_generic): Constify.
9605         * python/py-event.h (evpy_add_attribute)
9606         (gdbpy_initialize_event_generic): Constify.
9607         * python/py-evts.c (add_new_registry): Constify.
9608         * python/py-finishbreakpoint.c (outofscope_func): Constify.
9609         * python/py-framefilter.c (get_py_iter_from_func): Constify.
9610         * python/py-inferior.c (get_buffer): Add cast.
9611         * python/py-param.c (parm_constant::name): Constify.
9612         * python/py-unwind.c (fprint_frame_id): Constify.
9613         * python/python.c (gdbpy_parameter_value): Constify.
9614         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
9615         * remote.c (memory_packet_config::name): Constify.
9616         (show_packet_config_cmd, remote_write_bytes)
9617         (remote_buffer_add_string):
9618         * reverse.c (exec_reverse_once): Constify.
9619         * rs6000-tdep.c (variant::name, variant::description): Constify.
9620         * rust-exp.y (rustyyerror): Constify.
9621         * rust-lang.c (rust_op_name): Constify.
9622         * rust-lang.h (rustyyerror): Constify.
9623         * serial.h (serial_ops::name): Constify.
9624         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
9625         (sh_sh3e_register_name, sh_sh2e_register_name)
9626         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
9627         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
9628         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
9629         (sh_sh4al_dsp_register_name): Constify.
9630         * sh64-tdep.c (sh64_register_name): Constify.
9631         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
9632         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
9633         * stabsread.c (patch_block_stabs, read_type_number)
9634         (ref_map::stabs, ref_add, process_reference)
9635         (symbol_reference_defined, define_symbol, define_symbol)
9636         (error_type, read_type, read_member_functions, read_cpp_abbrev)
9637         (read_one_struct_field, read_struct_fields, read_baseclasses)
9638         (read_tilde_fields, read_struct_type, read_array_type)
9639         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
9640         (read_huge_number, read_range_type, read_args, common_block_start)
9641         (find_name_end): Constify.
9642         * stabsread.h (common_block_start, define_symbol)
9643         (process_one_symbol, symbol_reference_defined, ref_add):
9644         * symfile.c (get_section_index, add_symbol_file_command):
9645         * symfile.h (get_section_index): Constify.
9646         * target-descriptions.c (tdesc_type::name): Constify.
9647         (tdesc_free_type): Add cast.
9648         * target.c (find_default_run_target):
9649         (add_deprecated_target_alias, find_default_run_target)
9650         (target_announce_detach): Constify.
9651         (do_option): Constify.
9652         * target.h (add_deprecated_target_alias): Constify.
9653         * thread.c (print_thread_info_1): Constify.
9654         * top.c (deprecated_readline_begin_hook, command_line_input):
9655         Constify.
9656         (init_main): Add casts.
9657         * top.h (handle_line_of_input): Constify.
9658         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
9659         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
9660         (tfind_command): Rename to ...
9661         (tfind_command_1): ... this and constify.
9662         (tfind_command): New function.
9663         (tfind_end_command, tfind_start_command): Adjust.
9664         (encode_source_string): Constify.
9665         * tracepoint.h (encode_source_string): Constify.
9666         * tui/tui-data.c (tui_partial_win_by_name): Constify.
9667         * tui/tui-data.h (tui_partial_win_by_name): Constify.
9668         * tui/tui-source.c (tui_set_source_content_nil): Constify.
9669         * tui/tui-source.h (tui_set_source_content_nil): Constify.
9670         * tui/tui-win.c (parse_scrolling_args): Constify.
9671         * tui/tui-windata.c (tui_erase_data_content): Constify.
9672         * tui/tui-windata.h (tui_erase_data_content): Constify.
9673         * tui/tui-winsource.c (tui_erase_source_content): Constify.
9674         * tui/tui.c (tui_enable): Add cast.
9675         * utils.c (defaulted_query): Constify.
9676         (init_page_info): Add cast.
9677         (puts_debug, subset_compare): Constify.
9678         * utils.h (subset_compare): Constify.
9679         * varobj.c (varobj_format_string): Constify.
9680         * varobj.h (varobj_format_string): Constify.
9681         * vax-tdep.c (vax_register_name): Constify.
9682         * windows-nat.c (windows_detach): Constify.
9683         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
9684         * xml-support.c (gdb_xml_end_element): Constify.
9685         * xml-tdesc.c (tdesc_start_reg): Constify.
9686         * xstormy16-tdep.c (xstormy16_register_name): Constify.
9687         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
9688         * xtensa-tdep.h (xtensa_register_t::name): Constify.
9689
9690 2017-04-05  Pedro Alves  <palves@redhat.com>
9691
9692         * proc-api.c (struct trans): Constify.
9693         (procfs_note): Constify.
9694         * proc-events.c (struct trans, syscall_table):
9695         * proc-flags.c (struct trans): Constify.
9696         * proc-utils.h (procfs_note): Constify.
9697         * proc-why.c (struct trans): Constify.
9698         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
9699         (procfs_detach): Constify.
9700         * sol-thread.c (struct string_map): Constify.
9701         (td_err_string, td_state_string): Constify.
9702
9703 2017-04-05  Pedro Alves  <palves@redhat.com>
9704
9705         * proc-api.c (procfs_filename): Don't initialize
9706         procfs_filename.
9707         (prepare_to_trace): Assume procfs_filename is non-NULL.
9708         (_initialize_proc_api): Give procfs_filename a default value here.
9709
9710 2017-04-05  Pedro Alves  <palves@redhat.com>
9711
9712         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
9713         'cond_string' parameter.
9714         (extract_exception_regexp): Constify 'string' parameter.
9715         (catch_exception_command_1): Constify.
9716         * breakpoint.c (init_catchpoint)
9717         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
9718         parameter.
9719         (ep_parse_optional_if_clause, catch_fork_command_1)
9720         (catch_exec_command_1): Constify.
9721         * breakpoint.h (init_catchpoint): Constify 'cond_string'
9722         parameter.
9723         (ep_parse_optional_if_clause): Constify.
9724         * cli/cli-utils.c (remove_trailing_whitespace)
9725         (check_for_argument): Constify.
9726         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
9727         non-const overload.
9728         (check_for_argument): Likewise.
9729
9730 2017-04-05  Pedro Alves  <palves@redhat.com>
9731
9732         * event-top.c (command_line_handler): Add cast to execute_command
9733         call.
9734         * record-btrace.c (cmd_record_btrace_bts_start)
9735         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
9736         (cmd_record_btrace_start): Add cast to execute_command call.
9737         * record-full.c (record_full_goto_insn):
9738         * record.c (record_start, record_stop): Add cast to
9739         execute_command_to_string calls.
9740         (cmd_record_start): Add cast to execute_command calls.
9741
9742 2017-04-05  Pedro Alves  <palves@redhat.com>
9743
9744         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
9745         static inline function.
9746         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
9747         array and use gdb_PyArg_ParseTupleAndKeywords.
9748         * python/py-cmd.c (cmdpy_init): Likewise.
9749         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
9750         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
9751         (infpy_search_memory): Likewise.
9752         * python/py-objfile.c (objfpy_add_separate_debug_file)
9753         (gdbpy_lookup_objfile): Likewise.
9754         * python/py-symbol.c (gdbpy_lookup_symbol)
9755         (gdbpy_lookup_global_symbol): Likewise.
9756         * python/py-type.c (gdbpy_lookup_type): Likewise.
9757         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
9758         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
9759         Likewise.
9760
9761 2017-04-05  Pedro Alves  <palves@redhat.com>
9762
9763         * python/python-internal.h (gdb_PyGetSetDef): New type.
9764         * python/py-block.c (block_object_getset)
9765         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
9766         * python/py-event.c (event_object_getset)
9767         (finish_breakpoint_object_getset): Likewise.
9768         * python/py-inferior.c (inferior_object_getset): Likewise.
9769         * python/py-infthread.c (thread_object_getset): Likewise.
9770         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
9771         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
9772         * python/py-objfile.c (objfile_getset): Likewise.
9773         * python/py-progspace.c (pspace_getset): Likewise.
9774         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
9775         Likewise.
9776         * python/py-record.c (recpy_record_getset): Likewise.
9777         * python/py-symbol.c (symbol_object_getset): Likewise.
9778         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
9779         Likewise.
9780         * python/py-type.c (type_object_getset, field_object_getset):
9781         Likewise.
9782         * python/py-value.c (value_object_getset): Likewise.
9783
9784 2017-04-05  Pedro Alves  <palves@redhat.com>
9785
9786         * python/python-internal.h (gdb_PyObject_CallMethod)
9787         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
9788         New functions.
9789         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
9790         (PySys_GetObject, PySys_SetPath): New macros.
9791
9792 2017-04-05  Pedro Alves  <palves@redhat.com>
9793
9794         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
9795         info_osdata_command.
9796         * osdata.c (info_osdata_command): Rename to ...
9797         (info_osdata): ... this.  Constify 'type' parameter, and remove
9798         the 'from_tty' parameter.  Accept NULL TYPE.
9799         (info_osdata_command): New function.
9800         * osdata.h (info_osdata_command): Remove declaration.
9801         (info_osdata): New declaration.
9802
9803 2017-04-05  Pedro Alves  <palves@redhat.com>
9804
9805         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
9806         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
9807         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
9808         parameter.
9809         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
9810         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
9811         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
9812         parameter.
9813         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
9814         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
9815         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
9816         (mi_cmd_file_list_exec_source_files)
9817         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
9818         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9819         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
9820         parameter.
9821         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
9822         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
9823         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
9824         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
9825         (mi_cmd_stack_info_frame): Constify 'command' parameter.
9826         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
9827         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
9828         'command' parameter.
9829         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
9830         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
9831         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
9832         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
9833         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
9834         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
9835         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
9836         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
9837         (mi_cmd_var_set_update_range): Constify 'command' parameter.
9838         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
9839         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
9840         parameter.
9841         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
9842         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
9843         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
9844         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
9845         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
9846         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
9847         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
9848         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
9849         (mi_cmd_data_list_changed_registers)
9850         (mi_cmd_data_write_register_values)
9851         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
9852         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
9853         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
9854         (mi_cmd_list_features, mi_cmd_list_target_features)
9855         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
9856         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
9857         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
9858         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
9859         (mi_cmd_trace_frame_collected): Constify 'command'
9860         parameter.
9861         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
9862         'command' parameter.
9863
9864 2017-04-05  Pedro Alves  <palves@redhat.com>
9865
9866         * ada-lang.c (ada_completer_word_break_characters): Now a const
9867         array.
9868         (ada_get_gdb_completer_word_break_characters): Constify.
9869         * completer.c (gdb_completer_command_word_break_characters)
9870         (gdb_completer_file_name_break_characters)
9871         (gdb_completer_quote_characters): Now const arrays.
9872         (get_gdb_completer_quote_characters): Constify.
9873         (set_rl_completer_word_break_characters): New function.
9874         (set_gdb_completion_word_break_characters)
9875         (complete_line_internal): Use it.
9876         * completer.h (get_gdb_completer_quote_characters): Constify.
9877         (set_rl_completer_word_break_characters): Declare.
9878         * f-lang.c (f_word_break_characters): Constify.
9879         * language.c (default_word_break_characters): Constify.
9880         * language.h (language_defn::la_word_break_characters): Constify.
9881         (default_word_break_characters): Constify.
9882         * top.c (init_main): Use set_rl_completer_word_break_characters.
9883
9884 2017-04-05  Pedro Alves  <palves@redhat.com>
9885
9886         * aix-thread.c (aix_thread_pid_to_str)
9887         (aix_thread_extra_thread_info): Constify.
9888         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
9889         * bsd-uthread.c (bsd_uthread_extra_thread_info)
9890         (bsd_uthread_pid_to_str): Constify.
9891         * corelow.c (core_pid_to_str): Constify.
9892         * darwin-nat.c (darwin_pid_to_str): Constify.
9893         * fbsd-nat.c (fbsd_pid_to_str): Constify.
9894         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
9895         Constify.
9896         * gnu-nat.c (gnu_pid_to_str): Constify.
9897         * go32-nat.c (go32_pid_to_str): Constify.
9898         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
9899         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
9900         * inferior.c (inferior_pid_to_str): Constify.
9901         * linux-nat.c (linux_nat_pid_to_str): Constify.
9902         * linux-tdep.c (linux_core_pid_to_str): Constify.
9903         * linux-thread-db.c (thread_db_pid_to_str)
9904         (thread_db_extra_thread_info): Constify.
9905         * nto-tdep.c (nto_extra_thread_info): Constify.
9906         * nto-tdep.h (nto_extra_thread_info): Constify.
9907         * obsd-nat.c (obsd_pid_to_str): Constify.
9908         * procfs.c (procfs_pid_to_str): Constify.
9909         * ravenscar-thread.c (ravenscar_extra_thread_info)
9910         (ravenscar_pid_to_str): Constify.
9911         * remote-sim.c (gdbsim_pid_to_str): Constify.
9912         * remote.c (remote_threads_extra_info, remote_pid_to_str):
9913         Constify.
9914         * sol-thread.c (solaris_pid_to_str): Constify.
9915         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
9916         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
9917         * target.c (default_pid_to_str, target_pid_to_str)
9918         (normal_pid_to_str, default_pid_to_str): Constify.
9919         * target.h (target_ops::to_pid_to_str)
9920         (target_ops::to_extra_thread_info): Constify.
9921         (target_pid_to_str, normal_pid_to_str): Constify.
9922         * windows-nat.c (windows_pid_to_str): Constify.
9923         * gdbarch.sh (core_pid_to_str): Constify.
9924         * target-delegates.c: Regenerate.
9925         * gdbarch.h, gdbarch.c: Regenerate.
9926
9927 2017-04-05  Pedro Alves  <palves@redhat.com>
9928
9929         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
9930         the memory of the temporary warning_pre_print override.
9931         * utils.c (warning_pre_print): Constify.
9932         * utils.h (warning_pre_print): Constify.
9933
9934 2017-04-05  Pedro Alves  <palves@redhat.com>
9935
9936         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
9937         (shell_command): New function.
9938         (make_command): Use std::string.
9939         (init_cli_cmds): Register shell_command instead of shell_escape.
9940
9941 2017-04-05  Pedro Alves  <palves@redhat.com>
9942
9943         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
9944         * tracepoint.c (default_collect): Don't initialize.
9945
9946 2017-04-05  Pedro Alves  <palves@redhat.com>
9947
9948         * macroexp.c (macro_buffer::shared): Now a bool.
9949         (init_buffer): Update.
9950         (init_shared_buffer): Constify 'addr' parameter.
9951         (substitute_args, expand, macro_expand, macro_expand_next): Remove
9952         casts.
9953
9954 2017-04-05  Pedro Alves  <palves@redhat.com>
9955
9956         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
9957         * disasm.c (set_disassembler_options): Constify local.
9958         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
9959
9960 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
9961
9962         PR gdb/21352
9963         * tracefile.c (tsave_command): Fix argument parsing for '-r'
9964         option.
9965
9966 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9967
9968         * frame.c (frame_unwind_register_unsigned): Call
9969         frame_unwind_register_value.
9970
9971 2017-04-05  Yao Qi  <yao.qi@linaro.org>
9972
9973         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
9974         Use gdb_test_multiple, and don't match anchor.
9975
9976 2017-04-05  Pedro Alves  <palves@redhat.com>
9977
9978         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
9979         (Write After Approval): Remove Simon Marchi.
9980
9981 2017-04-05  Pedro Alves  <palves@redhat.com>
9982
9983         * common/gdb_optional.h (optional::optional): Make constexpr and
9984         initialize m_dummy.
9985
9986 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
9987
9988         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9989         (amd64fbsd_jmp_buf_reg_offset): Remove.
9990         (amd64fbsd_supply_uthread): Remove function.
9991         (amd64fbsd_collect_uthread): Remove function.
9992         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
9993         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
9994         (x86_64-*-freebsd*): Remove bsd-uthread.o.
9995         (fbsd-nat.c): Update comment.
9996         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
9997         (i386fbsd_jmp_buf_reg_offset): Remove.
9998         (i386fbsd_supply_uthread): Remove function.
9999         (i386fbsd_collect_uthread): Remove function.
10000         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10001
10002 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10003
10004         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10005         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10006         * NEWS: Mention that support for FreeBSD/alpha was removed.
10007         * alpha-fbsd-tdep.c: Delete file.
10008         * config/alpha/fbsd.mh: Delete file.
10009         * configure.host: Delete alpha*-*-freebsd* and
10010         alpha*-*-kfreebsd*-gnu.
10011         * configure.tgt: Delete alpha*-*-freebsd* and
10012         alpha*-*-kfreebsd*-gnu.
10013
10014 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
10015
10016         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10017         amd64bsd_store_inferior_registers): Use ptid from regcache.
10018
10019 2017-04-04  Pedro Alves  <palves@redhat.com>
10020
10021         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
10022         data fields, make them private and add "m_" prefixes.
10023         (lnp_state_machine::lnp_state_machine): New ctor.
10024         (record_line, check_line_address, handle_set_discriminator)
10025         (handle_set_address, handle_advance_pc, handle_special_opcode)
10026         (handle_advance_line, handle_set_file, handle_negate_stmt)
10027         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
10028         (end_sequence, advance_line): New methods.
10029         (m_gdbarch, m_record_lines_p): New fields.
10030         (lnp_reader_state): Delete.
10031         (dwarf_record_line): Rename to ...
10032         (lnp_state_machine::record_line): ... adjust.
10033         (init_lnp_state_machine): Delete.
10034         (lnp_state_machine::lnp_state_machine): New.
10035         (check_line_address): Rename to ...
10036         (lnp_state_machine::check_line_address): This.
10037         (dwarf_decode_lines_1): Remove reference to "reader_state".
10038         Adjust lnp_state_machine having a non-default ctor.  Use bool.
10039         State machine internal state manipulation moved to
10040         lnp_state_machine methods.
10041
10042 2017-04-04  Pedro Alves  <palves@redhat.com>
10043
10044         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10045         unittests/offset-type-selftests.c.
10046         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
10047         * common/offset-type.h: New file.
10048         * common/preprocessor.h: New file.
10049         * common/traits.h: New file.
10050         * common/valid-expr.h: New file.
10051         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
10052         sect_offset and cu_offset strong typedefs throughout.
10053         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
10054         typedefs throughout.
10055         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
10056         sect_offset and cu_offset strong typedefs throughout.
10057         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
10058         typedefs throughout.
10059         * gdbtypes.h: Include "common/offset-type.h".
10060         (cu_offset): Now an offset type (strong typedef) instead of a
10061         struct.
10062         (sect_offset): Likewise.
10063         (union call_site_parameter_u): Rename "param_offset" field to
10064         "param_cu_off".
10065         * unittests/offset-type-selftests.c: New file.
10066
10067 2017-04-04  Pedro Alves  <palves@redhat.com>
10068
10069         * common/underlying.h: New file.
10070         * dwarf2read.c: Include "common/gdb_optional.h" and
10071         "common/underlying.h".
10072         (dir_index, file_name_index): New types.
10073         (file_entry): Use them.
10074         (file_entry::include): Use to_underlying.
10075         (line_header::add_file_name): Use dir_index.
10076         (read_formatted_entries): Use gdb::optional.  Read form before
10077         writting to file_entry.
10078         (dwarf_decode_line_header): Use dir_index.
10079         (lnp_state_machine::current_file): Use to_underlying.
10080         (lnp_state_machine::file): Change type to file_name_index.
10081         (dwarf_record_line): Use to_underlying.
10082         (init_lnp_state_machine): Use file_name_index.
10083         (dwarf_decode_lines_1): Use dir_index and file_name_index.
10084
10085 2017-04-04  Pedro Alves  <palves@redhat.com>
10086
10087         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
10088         operator bool, has_value and get methods.
10089
10090 2017-04-04  Pedro Alves  <palves@redhat.com>
10091
10092         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
10093         fields.
10094         (line_header): Initialize all data fields.  Change type of
10095         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
10096         Change type of include_dirs to std::vector<const char *>.  Remove
10097         num_include_dirs, include_dirs_size.  Change type of file_names to
10098         std::vector<file_entry>.  Remove num_file_names, file_names_size.
10099         (line_header::line_header): New.
10100         (line_header::add_include_dir, line_header::add_file_name): New
10101         methods.
10102         (line_header::include_dir_at): Remove NULL check.
10103         (line_header::file_name_at): Add const overload.
10104         (line_header_up): New unique_ptr typedef.
10105         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
10106         std::vector.  Remove free_line_header call.
10107         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
10108         free_line_header call.
10109         (free_cu_line_header): Delete.
10110         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
10111         (setup_type_unit_groups): Use line_header_up instead of cleanups.
10112         Adjust to use std::vector.
10113         (free_line_header): Delete.
10114         (free_line_header_voidp): Use delete.
10115         (add_include_dir): Replace with ...
10116         (line_header::add_include_dir): ... this method.  Use std::vector.
10117         (add_file_name): Replace with ...
10118         (line_header::add_file_name): ... this method.  Use std::vector.
10119         (add_include_dir_stub): Delete.
10120         (read_formatted_entries): Remove memset.
10121         (dwarf_decode_line_header): Return a line_header_up instead of a
10122         raw pointer.  Remove cleanup handling.  Pass lambdas to
10123         read_formatted_entries.  Adjust to use line_header methods.
10124         (dwarf_decode_lines_1): Adjust to use line_header methods.
10125         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
10126         use std::vector.
10127
10128 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
10129
10130         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
10131         instead of struct ptid.
10132
10133 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
10134
10135         * frame.c (get_frame_register_bytes): Unwind using value.
10136         (put_frame_register_bytes): Likewise.
10137
10138 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
10139
10140         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
10141         aggregate-like.
10142
10143 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
10144
10145         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
10146
10147 2017-03-29  Yao Qi  <yao.qi@linaro.org>
10148
10149         * gdbthread.h (struct thread_info): Declare constructor and
10150         destructor.  Add some in-class member initializers.
10151         * thread.c (free_thread): Remove.
10152         (init_thread_list): Call delete instead of free_thread.
10153         (new_thread): Call thread_info constructor.
10154         (thread_info::thread_info): New function.
10155         (thread_info::~thread_info): New function.
10156         (delete_thread_1): Call delete instead of free_thread.
10157         (make_cleanup_restore_current_thread): Move tp and frame to
10158         inner block.
10159
10160 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10161
10162         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
10163         (arc_skip_prologue): Likewise.
10164         (arc_make_frame_cache): Likewise.
10165         (arc_pv_get_operand): New function.
10166         (arc_is_in_prologue): Likewise.
10167         (arc_analyze_prologue): Likewise.
10168         (arc_print_frame_cache): Likewise.
10169         (MAX_PROLOGUE_LENGTH): New constant.
10170
10171 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10172
10173         * configure.tgt: Add arc-insn.o.
10174         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
10175         (dump_arc_instruction_command): New function.
10176         (arc_fprintf_disasm): Likewise.
10177         (arc_disassemble_info): Likewise.
10178         (arc_insn_get_operand_value): Likewise.
10179         (arc_insn_get_operand_value_signed): Likewise.
10180         (arc_insn_get_memory_base_reg): Likewise.
10181         (arc_insn_get_memory_offset): Likewise.
10182         (arc_insn_get_branch_target): Likewise.
10183         (arc_insn_dump): Likewise.
10184         (arc_insn_get_linear_next_pc): Likewise.
10185         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
10186         (arc_disassemble_info): Likewise.
10187         (arc_insn_get_branch_target): Likewise.
10188         (arc_insn_get_linear_next_pc): Likewise.
10189         * NEWS: Mention new "maint print arc arc-instruction".
10190
10191 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10192
10193         * arc-tdep (maintenance_print_arc_list): New variable.
10194         (maintenance_print_arc_command): New function.
10195
10196 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
10197
10198         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
10199         Add "limm" and "reserved".
10200         (arc_cannot_fetch_register, arc_cannot_store_register): Add
10201         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
10202         * arc-tdep.h (arc_regnum): Likewise.
10203
10204 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10205
10206         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10207         for THREADPTR register.
10208         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
10209         register.
10210         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
10211         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
10212         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
10213
10214 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10215
10216         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
10217         registers above gdbarch_num_regs (gdbarch) as privileged in
10218         call0 ABI.
10219
10220 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10221
10222         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
10223         for a single specified register or for all registers in
10224         a0_base..a0_base + C0_NREGS range.
10225         (supply_gregset_reg): Call regcache_raw_supply for a single
10226         specified register or for all registers in a0_base..a0_base +
10227         C0_NREGS range.
10228
10229 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10230
10231         * arch/xtensa.h (C0_NREGS): Add definition.
10232         * xtensa-tdep.c (C0_NREGS): Remove definition.
10233
10234 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
10235
10236         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
10237         Drop xtensa_default_isa initialization.
10238         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
10239
10240 2017-03-27  Pedro Alves  <palves@redhat.com>
10241
10242         * dwarf2read.c (file_entry) <dir_index>: Add comment.
10243         (file_entry::include_dir): New method.
10244         (line_header::include_dir_at, line_header::file_name_at): New
10245         methods.
10246         (setup_type_unit_groups, setup_type_unit_groups)
10247         (psymtab_include_file_name): Simplify using the new methods.
10248         (lnp_state_machine) <the_line_header>: New field.
10249         <file>: Add comment.
10250         (lnp_state_machine::current_file): New method.
10251         (dwarf_record_line): Simplify using the new methods.
10252         (init_lnp_state_machine): Initialize the "the_line_header" field.
10253         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
10254         Simplify using the new methods.
10255
10256 2017-03-27  Pedro Alves  <palves@redhat.com>
10257
10258         * cp-name-parser.y (make_empty): Delete.
10259         (demangler_special, nested_name, ptr_operator, array_indicator)
10260         (direct_declarator, declarator_1): Use fill_comp instead of
10261         make_empty.
10262
10263 2017-03-27  Pedro Alves  <palves@redhat.com>
10264
10265         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
10266         to ATTRIBUTE_PRINTF.
10267         * solib-target.c (library_list_start_list): Print "string" not
10268         "version".
10269         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
10270         gdb_xml_error call.
10271
10272 2017-03-27  Pedro Alves  <palves@redhat.com>
10273
10274         * dwarf2read.c (struct file_and_directory): New.
10275         (dwarf2_get_dwz_file): Adjust to use std::string.
10276         (dw2_get_file_names_reader): Adjust to use file_and_directory.
10277         (find_file_and_directory): Adjust to return a file_and_directory
10278         object.
10279         (read_file_scope): Adjust to use file_and_directory.  Remove
10280         make_cleanup/do_cleanups calls.
10281         (open_and_init_dwp_file): Adjust to use std::string.  Remove
10282         make_cleanup/do_cleanups calls.
10283         * python/python.c (do_start_initialization): Adjust to ldirname
10284         returning a std::string.
10285         * utils.c (ldirname): Now returns a std::string.
10286         * utils.h (ldirname): Change return type to std::string.
10287         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
10288         returning a std::string.
10289         * xml-tdesc.c (file_read_description_xml): Likewise.
10290
10291 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
10292
10293         * regcache.c (regcache_debug_print_register): New function.
10294         * regcache.h (regcache_debug_print_register): New declaration.
10295         * target.c (debug_print_register): Remove.
10296         (target_fetch_registers): Call regcache_debug_print_register.
10297         (target_store_registers): Likewise.
10298
10299 2017-03-24  Pádraig Brady  <pbrady@fb.com>
10300
10301         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
10302         reference beyond the 'lh->include_dirs' array before accessing to
10303         it.
10304         (psymtab_include_file_name): Likewise.
10305         (dwarf_decode_lines_1): Likewise.
10306         (dwarf_decode_lines): Likewise.
10307         (file_file_name): Likewise.
10308
10309 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
10310
10311         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
10312         inferior_ptid.
10313         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10314         ps_lsetfpregs): Likewise.
10315         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
10316         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
10317         ps_lsetfpregs): Likewise.
10318         * target.c (target_fetch_registers, target_store_registers):
10319         Remove asserts.
10320
10321 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
10322
10323         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
10324
10325 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10326
10327         * aarch64-tdep.c (aarch64_process_record_test): Declare.
10328         (_initialize_aarch64_tdep): Register it.
10329         (aarch64_record_load_store): Handle PRFM instruction.
10330         (aarch64_process_record_test): New function.
10331
10332 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10333
10334         * aarch64-tdep.c (aarch64_record_load_store): Fix code
10335         indentation.
10336
10337 2017-03-23  Yao Qi  <yao.qi@linaro.org>
10338
10339         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
10340
10341 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
10342
10343         python/python.c (do_start_initialization): Fix memory leak.
10344
10345 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10346
10347         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
10348         using get_ptrace_pid.
10349         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
10350         inferior_ptid.
10351         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
10352         inferior_ptid instead of pid.
10353
10354 2017-03-22  Yao Qi  <yao.qi@linaro.org>
10355
10356         * aarch64-tdep.c: Wrap locally used classes in anonymous
10357         namespace.
10358         * arm-tdep.c: Likewise.
10359         * linespec.c: Likewise.
10360         * ui-out.c: Likewise.
10361
10362 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
10363
10364         PR gdb/19637
10365         * python/lib/gdb/printer/bound_registers.py: Import sys.
10366
10367 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10368
10369         * windows-nat.c (do_windows_fetch_inferior_registers): Add
10370         windows_thread_info parameter and use it instead of
10371         current_thread.
10372         (windows_fetch_inferior_registers): Don't set current_thread,
10373         pass the thread to do_windows_fetch_inferior_registers.  Use
10374         ptid from regcache instead of inferior_ptid.
10375         (do_windows_store_inferior_registers): Add windows_thread_info
10376         parameter and use it instead of current_thread.
10377         (windows_store_inferior_registers): Don't set current_thread,
10378         pass the thread to do_windows_store_inferior_registers.  Use
10379         ptid from regcache instead of inferior_ptid.
10380
10381 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
10382
10383         * ser-mingw.c (ser_windows_raw): Remove reference to
10384         struct serial::current_timeout.
10385
10386 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
10387
10388         PR tdep/20928
10389         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
10390         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
10391         (sparc64_fsr_type): Fix %fsr decoding.
10392
10393 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
10394
10395         * python/py-record-btrace.c (btpy_insn_data): Change return type
10396         for Python 2.
10397
10398 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10399
10400         * spu-linux-nat.c (spu_fetch_inferior_registers,
10401         spu_store_inferior_registers): Use ptid from regcache, set and
10402         restore inferior_ptid.
10403         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
10404         Likewise.
10405
10406 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
10407
10408         * i386-linux-nat.c (fetch_register, store_register,
10409         i386_linux_fetch_inferior_registers,
10410         i386_linux_store_inferior_registers): Use ptid from regcache.
10411         * ia64-linux-nat.c (ia64_linux_fetch_register,
10412         ia64_linux_store_register): Likewise.
10413         * inf-ptrace.c (inf_ptrace_fetch_register,
10414         inf_ptrace_store_register): Likewise.
10415         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
10416         m32r_linux_store_inferior_registers): Likewise.
10417         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
10418         m68kbsd_store_inferior_registers): Likewise.
10419         * m68k-linux-nat.c (fetch_register, store_register,
10420         m68k_linux_fetch_inferior_registers,
10421         m68k_linux_store_inferior_registers): Likewise.
10422         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
10423         m88kbsd_store_inferior_registers): Likewise.
10424         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
10425         mips_fbsd_store_inferior_registers): Likewise.
10426         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
10427         mips64_linux_regsets_store_registers): Likewise.
10428         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
10429         mipsnbsd_store_inferior_registers): Likewise.
10430         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
10431         mips64obsd_store_inferior_registers): Likewise.
10432         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
10433         Likewise.
10434         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
10435         ppcfbsd_store_inferior_registers): Likewise.
10436         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
10437         ppc_linux_store_inferior_registers): Likewise.
10438         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
10439         ppcnbsd_store_inferior_registers): Likewise.
10440         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
10441         ppcobsd_store_registers): Likewise.
10442         * procfs.c (procfs_fetch_registers, procfs_store_registers):
10443         Likewise.
10444         * ravenscar-thread.c (ravenscar_fetch_registers,
10445         ravenscar_store_registers, ravenscar_prepare_to_store):
10446         Likewise.
10447         * record-btrace.c (record_btrace_fetch_registers,
10448         record_btrace_store_registers, record_btrace_prepare_to_store):
10449         Likewise.
10450         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
10451         Lookup inferior using ptid from regcache, instead of
10452         current_inferior.
10453         * remote.c (remote_fetch_registers, remote_store_registers): Use
10454         ptid from regcache.
10455         * rs6000-nat.c (fetch_register, store_register): Likewise.
10456         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
10457         s390_linux_store_inferior_registers): Likewise.
10458         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
10459         shnbsd_store_inferior_registers): Likewise.
10460         * sol-thread.c (sol_thread_fetch_registers,
10461         sol_thread_store_registers): Likewise.
10462         * sparc-nat.c (sparc_fetch_inferior_registers,
10463         sparc_store_inferior_registers): Likewise.
10464         * tilegx-linux-nat.c (fetch_inferior_registers,
10465         store_inferior_registers): Likewise.
10466         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
10467         vaxbsd_store_inferior_registers): Likewise.
10468         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
10469         store_xtregs): Likewise.
10470
10471 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10472
10473         PR gdb/14441
10474         * NEWS: Mention support for rvalue references in GDB and python.
10475         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
10476         supports both lvalue and rvalue references.
10477
10478 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10479
10480         PR gdb/14441
10481         * gdbtypes.c (rank_one_type): Implement overloading
10482         resolution rules regarding rvalue references.
10483
10484 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10485
10486         PR gdb/14441
10487         * aarch64-tdep.c (aarch64_type_align)
10488         (aarch64_extract_return_value, aarch64_store_return_value): Change
10489         lvalue reference type checks to general reference type checks.
10490         * amd64-tdep.c (amd64_classify): Likewise.
10491         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
10492         Likewise.
10493         * arm-tdep.c (arm_type_align, arm_extract_return_value)
10494         (arm_store_return_value): Likewise.
10495         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
10496         * c-typeprint.c (c_print_type): Likewise.
10497         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
10498         (cplus_number_of_children, cplus_describe_child): Likewise.
10499         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
10500         * completer.c (expression_completer): Likewise.
10501         * cp-support.c (make_symbol_overload_list_adl_namespace):
10502         Likewise.
10503         * darwin-nat-info.c (info_mach_region_command): Likewise.
10504         * dwarf2loc.c (entry_data_value_coerce_ref)
10505         (value_of_dwarf_reg_entry): Likewise.
10506         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
10507         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
10508         Likewise.
10509         * findvar.c (extract_typed_address, store_typed_address):
10510         Likewise.
10511         * gdbtypes.c (rank_one_type): Likewise.
10512         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
10513         * infcall.c (value_arg_coerce): Likewise.
10514         * language.c (pointer_type): Likewise.
10515         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
10516         Likewise.
10517         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
10518         * mn10300-tdep.c (mn10300_type_align): Likewise.
10519         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
10520         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
10521         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
10522         Likewise.
10523         * printcmd.c (print_formatted, x_command): Likewise.
10524         * python/py-type.c (typy_get_composite, typy_template_argument):
10525         Likewise.
10526         * python/py-value.c (valpy_referenced_value)
10527         (valpy_get_dynamic_type, value_has_field): Likewise.
10528         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
10529         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
10530         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
10531         * spu-tdep.c (spu_scalar_value_p): Likewise.
10532         * symtab.c (lookup_symbol_aux): Likewise.
10533         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
10534         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
10535         Likewise.
10536         * valops.c (value_cast_pointers, value_cast)
10537         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
10538         (value_struct_elt, value_struct_elt_bitpos)
10539         (value_find_oload_method_list, find_overload_match)
10540         (value_rtti_indirect_type): Likewise.
10541         * valprint.c (val_print_scalar_type_p, generic_val_print):
10542         Likewise.
10543         * value.c (value_actual_type, value_as_address, unpack_long)
10544         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
10545         (coerce_ref): Likewise.
10546         * varobj.c (varobj_get_value_type): Likewise.
10547
10548 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10549
10550         PR gdb/14441
10551         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
10552         table of constants.
10553         * python/lib/gdb/command/explore.py: Support exploring values
10554         of rvalue reference types.
10555         * python/lib/gdb/types.py: Implement get_basic_type() for
10556         rvalue reference types.
10557         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
10558         constant.
10559         * python/py-value.c (valpy_getitem): Add an rvalue reference
10560         check.
10561         (valpy_reference_value): Add new parameter "refcode".
10562         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
10563         New wrappers for valpy_reference_value().
10564         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10565         (gdbpy_invoke_xmethod): Likewise.
10566
10567 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10568
10569         PR gdb/14441
10570         * dwarf2read.c (process_die, read_type_die_1): Handle the
10571         DW_TAG_rvalue_reference_type DIE.
10572         (read_tag_reference_type): Add new parameter "refcode".
10573
10574 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10575
10576         PR gdb/14441
10577         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
10578         (c_type_print_modifier, c_type_print_varspec_suffix)
10579         (c_type_print_base): Support printing rvalue reference types.
10580         * c-valprint.c (c_val_print, c_value_print): Support printing
10581         rvalue reference values.
10582
10583 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10584
10585         PR gdb/14441
10586         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
10587         typename.
10588         * cp-support.c (replace_typedefs): Handle
10589         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
10590         * python/py-type.c (typy_lookup_type): Likewise.
10591
10592 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10593
10594         PR gdb/14441
10595         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
10596         * parse.c (insert_type): Change assert statement.
10597         (follow_types): Handle rvalue reference types.
10598         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
10599         constant.
10600
10601 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10602
10603         PR gdb/14441
10604         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
10605         value_ref() interface.
10606         * c-valprint.c (c_value_print): Likewise.
10607         * infcall.c (value_arg_coerce): Likewise.
10608         * python/py-value.c (valpy_reference_value): Likewise.
10609         * valops.c (value_cast, value_reinterpret_cast)
10610         (value_dynamic_cast, typecmp): Likewise.
10611         (value_ref): Parameterize by kind of return value reference type.
10612         * value.h (value_ref): Add new parameter "refcode".
10613
10614 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10615
10616         PR gdb/14441
10617         * dwarf2read.c (read_tag_reference_type): Use
10618         lookup_lvalue_reference_type() instead of lookup_reference_type().
10619         * eval.c (evaluate_subexp_standard): Likewise.
10620         * f-exp.y: Likewise.
10621         * gdbtypes.c (make_reference_type, lookup_reference_type):
10622         Generalize with rvalue reference types.
10623         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
10624         convenience wrappers for lookup_reference_type().
10625         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
10626         reference kind parameter.
10627         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
10628         wrappers for lookup_reference_type().
10629         * guile/scm-type.c (gdbscm_type_reference): Use
10630         lookup_lvalue_reference_type() instead of lookup_reference_type().
10631         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
10632         * parse.c (follow_types): Likewise.
10633         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
10634         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
10635         Likewise.
10636         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
10637         (gdbpy_invoke_xmethod): Likewise.
10638         * stabsread.c: Provide extra argument to make_reference_type()
10639         call.
10640         * valops.c (value_ref, value_rtti_indirect_type): Use
10641         lookup_lvalue_reference_type() instead of lookup_reference_type().
10642
10643 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
10644
10645         PR gdb/14441
10646         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
10647         (TYPE_IS_REFERENCE): New macro.
10648         (struct type): Add rvalue_reference_type field.
10649         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
10650
10651 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10652
10653         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
10654         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
10655         New function definition.
10656         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
10657         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
10658         New function declaration.
10659         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
10660         * mi/mi-interp.h: New file.
10661         * solib.c (info_sharedlibrary_command): Replace for loop with
10662         ALL_SO_LIBS macro
10663         * solib.h (update_solib_list): New function declaration.
10664         (so_list_head): Move macro.
10665         * solist.h (ALL_SO_LIBS): New macro.
10666
10667 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
10668
10669         * infcmd.c (post_create_inferior): Remove unused argument in
10670         call to solib_add.
10671         * remote.c (remote_start_remote): Likewise.
10672         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
10673         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
10674         (enable_break): Likewise.
10675         * solib.c (update_solib_list): Remove unused target argument
10676         and its documentation.
10677         (solib_add): Remove unused target argument.  Remove unused
10678         argument in call to update_solib_list.
10679         (info_sharedlibrary_command): Remove unused argument in call
10680         to update_solib_list.
10681         (sharedlibrary_command): Remove unused argument in call to
10682         solib_add.
10683         (handle_solib_event): Likewise.
10684         (reload_shared_libraries): Likewise.
10685         * solib.h (solib_add): Remove unused target argument.
10686
10687 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10688
10689         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
10690         (s390_displaced_step_fixup): Cover relative branches with the
10691         default fixup handling.  This fixes lack of support for some
10692         relative branch instructions.
10693
10694 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10695
10696         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
10697         ptid from regcache.
10698
10699 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10700
10701         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
10702         i386_darwin_store_inferior_registers): Use ptid from regcache.
10703
10704 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10705
10706         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
10707         i386bsd_store_inferior_registers): Use ptid from regcache.
10708
10709 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10710
10711         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
10712         hppaobsd_store_registers): Use ptid from regcache.
10713
10714 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10715
10716         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
10717         hppanbsd_store_registers): Use ptid from regcache.
10718
10719 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10720
10721         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
10722         from regcache.  Use get_ptrace_pid.
10723
10724 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10725
10726         * corelow.c (get_core_register_section): Use ptid from regcache,
10727         update doc.
10728
10729 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10730
10731         * bsd-uthread.c (bsd_uthread_fetch_registers,
10732         bsd_uthread_store_registers): Use ptid from regcache, set and
10733         restore inferior_ptid.
10734
10735 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10736
10737         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
10738         fetch_fp_regs, store_register, store_regs, store_fp_register,
10739         store_fp_regs): Use ptid from regcache.
10740
10741 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
10742
10743         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
10744         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
10745         store_vfp_regs): Use ptid from regcache.
10746
10747 2017-03-17  Pedro Alves  <palves@redhat.com>
10748
10749         PR remote/21188
10750         * ser-base.c (ser_base_wait_for): Add comment.
10751         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
10752         version.
10753         * ser-unix.c (hardwire_raw): Remove reference to
10754         scb->current_timeout.
10755         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
10756         (hardwire_ops): Install ser_base_readchar instead of
10757         hardwire_readchar.
10758         * serial.h (struct serial) <current_timeout, timeout_remaining>:
10759         Remove fields.
10760
10761 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
10762
10763         PR gdb/19637
10764         * python/lib/gdb/printer/bound_registers.py: Add support for
10765         Python 3.
10766
10767 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10768
10769         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
10770         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
10771         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
10772         byte_offset to subobj_byte_offset.  Fix the handling of
10773         DWARF_VALUE_STACK on big-endian targets when coming via an
10774         implicit pointer.
10775         (dwarf2_evaluate_loc_desc): Adjust call to
10776         dwarf2_evaluate_loc_desc_full.
10777         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
10778         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
10779
10780 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10781
10782         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
10783         and REVSH instructions.
10784
10785 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10786
10787         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
10788         (arm_record_test): Declare.
10789         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
10790         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
10791         align with the manual.
10792         (thumb_record_misc): Adjust the code order to align with the
10793         manual.
10794         (thumb2_record_decode_insn_handler): Fix instruction matching.
10795         (instruction_reader_thumb): New class.
10796         (arm_record_test): New function.
10797
10798 2017-03-16  Yao Qi  <yao.qi@linaro.org>
10799
10800         * arm-tdep.c (abstract_memory_reader): New class.
10801         (instruction_reader): New class.
10802         (extract_arm_insn): Add argument 'reader'.  Callers updated.
10803         (decode_insn): Likewise.
10804
10805 2017-03-16  Doug Evans  <dje@google.com>
10806
10807         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
10808         member.  Change type of TYPE member to SCM.  All uses updated.
10809         (lsscm_make_lazy_string_smob): Add assert.
10810         (lsscm_make_lazy_string): Flag bad length values.
10811         (lsscm_elt_type): New function.
10812         (gdbscm_lazy_string_to_value): Rewrite to use
10813         lsscm_safe_lazy_string_to_value.
10814         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
10815         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
10816         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
10817         in incoming type.
10818         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10819         * guile/scm-type.c (tyscm_scm_to_type): New function.
10820
10821 2017-03-15  Doug Evans  <dje@google.com>
10822
10823         PR python/17728, python/18439, python/18779
10824         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
10825         member.  Change type of TYPE member to PyObject *.  All uses updated.
10826         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
10827         (gdbpy_create_lazy_string_object): Flag bad length values.
10828         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
10829         Handle typedefs in incoming type.
10830         (stpy_lazy_string_elt_type): New function.
10831         (gdbpy_extract_lazy_string): Call it.
10832         * python/py-value.c (valpy_lazy_string): Flag bad length values.
10833         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
10834         typedefs in incoming type.
10835
10836 2017-03-16  Doug Evans  <dje@google.com>
10837
10838         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
10839         * guile/scm-type.c (tyscm_scm_to_type): New function.
10840
10841 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
10842
10843         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
10844         "ULONGEST" for "skip".
10845
10846 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10847
10848         PR gdb/21220
10849         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
10850         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
10851         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
10852         over ptrace peek/poke until end of buffer or error.
10853
10854 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
10855
10856         * parse.c (length_of_subexp): Make static.
10857         * parser-defs.h (length_of_subexp): Remove.
10858
10859 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10860
10861         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
10862         as well.
10863
10864 2017-03-14  Pedro Alves  <palves@redhat.com>
10865
10866         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
10867         (main): Use std::unique_ptr.  Remove calls to
10868         cp_demangled_name_parse_free.
10869
10870 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10871
10872         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
10873         alphabsd_store_inferior_registers): Use regcache->ptid instead
10874         of inferior_ptid.
10875
10876 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10877
10878         * aix-thread.c (aix_thread_fetch_registers,
10879         aix_thread_store_registers): Use regcache->ptid instead of
10880         inferior_ptid.
10881
10882 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10883
10884         * aarch64-linux-nat.c (fetch_gregs_from_thread,
10885         store_gregs_to_thread, fetch_fpregs_from_thread,
10886         store_fpregs_to_thread): Use regcache->ptid instead of
10887         inferior_ptid.
10888
10889 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10890
10891         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
10892         amd64_linux_fetch_inferior_registers): Use regcache->ptid
10893         instead of inferior_ptid.
10894
10895 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10896
10897         * target.c (target_fetch_registers, target_store_registers): Add
10898         assert.
10899
10900 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
10901
10902         * regcache.h (regcache_get_ptid): New function.
10903         * regcache.c (regcache_get_ptid): New function.
10904
10905 2017-03-13  Mark Wielaard  <mark@klomp.org>
10906
10907         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
10908
10909 2017-03-10  Keith Seitz  <keiths@redhat.com>
10910
10911         PR c++/8218
10912         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
10913
10914 2017-03-08  Pedro Alves  <palves@redhat.com>
10915
10916         PR gdb/18360
10917         * infrun.c (start_step_over, do_target_resume, resume)
10918         (restart_threads): Assert we're not resuming a thread that is
10919         meant to be stopped.
10920         (infrun_thread_stop_requested_callback): Delete.
10921         (infrun_thread_stop_requested): If the thread is internally
10922         stopped, queue a pending stop event and clear the thread's
10923         inline-frame state.
10924         (handle_stop_requested): New function.
10925         (handle_syscall_event, handle_inferior_event_1): Use
10926         handle_stop_requested.
10927         (handle_stop_requested): New function.
10928         (handle_signal_stop): Set the thread's stop_signal here instead of
10929         at caller.
10930         (finish_step_over): Clear step over info unconditionally.
10931         (handle_signal_stop): If the user had interrupted the event
10932         thread, consider the stop a random signal.
10933         (handle_signal_stop) <signal arrived while stepping over
10934         breakpoint>: Don't restart threads here.
10935         (stop_waiting): Don't clear step-over info here.
10936
10937 2017-03-08  Pedro Alves  <palves@redhat.com>
10938
10939         PR 21206
10940         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
10941         goes to argument 2, not 1.
10942
10943 2017-03-08  Pedro Alves  <palves@redhat.com>
10944
10945         PR cli/21218
10946         * top.c (gdb_readline_wrapper): Avoid passing NULL to
10947         display_gdb_prompt.
10948         (command_line_input): Add comment.
10949
10950 2017-03-08  Pedro Alves  <palves@redhat.com>
10951
10952         PR tui/21216
10953         * tui/tui-file.c (tui_file::write): New.
10954         * tui/tui-file.h (tui_file): Override "write".
10955         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
10956         factored out from ...
10957         (tui_puts): ... here.
10958         (tui_putc): Use them.
10959         (tui_write): New function.
10960         * tui/tui-io.h (tui_write): Declare.
10961
10962 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
10963
10964         * Makefile.in (SFILES): Replace "environ.c" with
10965         "common/environ.c".
10966         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
10967         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
10968         to...
10969         * common/environ.c: ... here.
10970         * environ.h: Moved to...
10971         * common/environ.h: ... here.
10972
10973 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10974
10975         * gdbarch.sh (pstring_ptr): New static function.
10976         (gdbarch_disassembler_options): Use it.
10977         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
10978         not valid_disassembler_option->name.
10979         * gdbarch.c: Regenerate.
10980
10981 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
10982
10983         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
10984
10985 2017-03-07  Pedro Alves  <palves@redhat.com>
10986
10987         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
10988
10989 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
10990
10991         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
10992         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
10993         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
10994         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
10995
10996 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
10997
10998         * xtensa-linux-nat.c (fetch_gregs): Remove const.
10999
11000 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
11001
11002         * remote.c (remote_add_target_side_commands): Use range-based
11003         for loop.
11004
11005 2017-03-03  Yao Qi  <yao.qi@linaro.org>
11006
11007         PR gdb/21165
11008         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11009         value is lazy.
11010         * valprint.c (common_val_print): Likewise.
11011
11012 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
11013
11014         * NEWS: Mention new set/show disassembler-options commands.
11015         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11016         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11017         (prospective_options): New static variable.
11018         (gdb_disassembler::gdb_disassembler): Initialize
11019         m_di.disassembler_options.
11020         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11021         (get_disassembler_options): New function.
11022         (set_disassembler_options): Likewise.
11023         (set_disassembler_options_sfunc): Likewise.
11024         (show_disassembler_options_sfunc): Likewise.
11025         (disassembler_options_completer): Likewise.
11026         (_initialize_disasm): Likewise.
11027         * disasm.h (get_disassembler_options): New prototype.
11028         (set_disassembler_options): Likewise.
11029         * gdbarch.sh (gdbarch_disassembler_options): New variable.
11030         (gdbarch_verify_disassembler_options): Likewise.
11031         * gdbarch.c: Regenerate.
11032         * gdbarch.h: Likewise.
11033         * arm-tdep.c (num_disassembly_options): Delete.
11034         (set_disassembly_style): Likewise.
11035         (arm_disassembler_options): New static variable.
11036         (set_disassembly_style_sfunc): Convert short style name into long
11037         option name.  Call set_disassembler_options.
11038         (show_disassembly_style_sfunc): New function.
11039         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
11040         set_gdbarch_verify_disassembler_options.
11041         (_initialize_arm_tdep): Delete regnames variable and update callers.
11042         (arm_disassembler_options): Initialize.
11043         (disasm_options): New variable.
11044         (num_disassembly_options): Rename from this...
11045         (num_disassembly_styles): ...to this.  Compute by scanning through
11046         disasm_options.
11047         (valid_disassembly_styles): Initialize using disasm_options.
11048         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
11049         set_arm_regname_option.
11050         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
11051         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
11052         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
11053         set_gdbarch_verify_disassembler_options.
11054         * s390-tdep.c (s390_disassembler_options): New static variable.
11055         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
11056         set_gdbarch_verify_disassembler_options.
11057
11058 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11059
11060         * remote.c (remote_add_target_side_condition): Remove "struct"
11061         keyword from range-based for loop.
11062
11063 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
11064
11065         * remote.c (remote_add_target_side_condition): Use range-based
11066         for loop.  Update comment.
11067
11068 2017-02-27  Yao Qi  <yao.qi@linaro.org>
11069
11070         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
11071
11072 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
11073
11074         * regcache.c (regcache_raw_update): New function.
11075         (regcache_raw_read): Move code to regcache_raw_update.
11076         * regcache.h (regcache_raw_update): New declaration.
11077         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
11078
11079 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
11080
11081         * dwarf2read.c (create_debug_type_hash_table): Initialize
11082         header.signature and header.type_offset_in_tu.
11083
11084 2017-02-24  Pedro Alves  <palves@redhat.com>
11085
11086         * symtab.c (make_file_symbol_completion_list_1): Use
11087         add_symtab_completions.
11088
11089 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11090
11091         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
11092
11093 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
11094
11095         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
11096         I386_MAX_REGISTER_SIZE.
11097         (i386_pseudo_register_write): Likewise.
11098         (i386_process_record): Likewise.
11099         * i387-tdep.c (i387_supply_xsave): Likewise.
11100         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
11101         (store_register): Likewise.
11102
11103 2017-02-23  Pedro Alves  <palves@redhat.com>
11104
11105         * ada-lang.c: Include "common/function-view.h".
11106         (ada_iterate_over_symbols): Adjust to use function_view as
11107         callback type.
11108         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
11109         (ada_make_symbol_completion_list): Use a lambda.
11110         (ada_exc_search_name_matches): Delete.
11111         (name_matches_regex): New.
11112         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
11113         * compile/compile-c-support.c: Include "common/function-view.h".
11114         (print_one_macro): Change prototype to accept a ui_file pointer.
11115         (write_macro_definitions): Use a lambda.
11116         * dwarf2read.c: Include "common/function-view.h".
11117         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
11118         (dw2_expand_symtabs_matching): Adjust to use function_view as
11119         callback type.
11120         * language.h: Include "common/function-view.h".
11121         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
11122         function_view as callback type.
11123         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
11124         * linespec.c: Include "common/function-view.h".
11125         (collect_info::add_symbol): New method.
11126         (struct symbol_and_data_callback, iterate_inline_only, struct
11127         symbol_matcher_data, iterate_name_matcher): Delete.
11128         (iterate_over_all_matching_symtabs): Adjust to use function_view
11129         as callback type and lambdas.
11130         (iterate_over_file_blocks): Adjust to use function_view as
11131         callback type.
11132         (decode_compound_collector): Now a class with private fields.
11133         (decode_compound_collector::release_symbols): New method.
11134         (collect_one_symbol): Rename to...
11135         (decode_compound_collector::operator()): ... this and adjust.
11136         (lookup_prefix_sym): decode_compound_collector construction bits
11137         move to decode_compound_collector ctor.  Pass the
11138         decode_compound_collector object directly as callback.  Remove
11139         cleanups and use decode_compound_collector::release_symbols
11140         instead.
11141         (symtab_collector): Now a class with private fields.
11142         (symtab_collector::release_symtabs): New method.
11143         (add_symtabs_to_list): Rename to...
11144         (symtab_collector::operator()): ... this and adjust.
11145         (collect_symtabs_from_filename): symtab_collector construction
11146         bits move to symtab_collector ctor.  Pass the symtab_collector
11147         object directly as callback.  Remove cleanups and use
11148         symtab_collector::release_symtabs instead.
11149         (collect_symbols): Delete.
11150         (add_matching_symbols_to_info): Use lambdas.
11151         * macrocmd.c (print_macro_callback): Delete.
11152         (info_macro_command): Use a lambda.
11153         (info_macros_command): Pass print_macro_definition as callable
11154         directly.
11155         (print_one_macro): Remove 'ignore' parameter.
11156         (macro_list_command): Adjust.
11157         * macrotab.c (macro_for_each_data::fn): Now a function_view.
11158         (macro_for_each_data::user_data): Delete field.
11159         (foreach_macro): Adjust to call the function_view.
11160         (macro_for_each): Adjust to use function_view as callback type.
11161         (foreach_macro_in_scope): Adjust to call the function_view.
11162         (macro_for_each_in_scope): Adjust to use function_view as callback
11163         type.
11164         * macrotab.h: Include "common/function-view.h".
11165         (macro_callback_fn): Declare a prototype instead of a pointer.
11166         Remove "user_data" parameter.
11167         (macro_for_each, macro_for_each_in_scope): Adjust to use
11168         function_view as callback type.
11169         * psymtab.c (partial_map_expand_apply)
11170         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
11171         Adjust to use function_view as callback type and to return bool.
11172         (psym_expand_symtabs_matching): Adjust to use function_view as
11173         callback types.
11174         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
11175         to use function_view as callback type and to return bool.
11176         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
11177         callback types.
11178         * symfile.c (expand_symtabs_matching): Adjust to use function_view
11179         as callback types.
11180         * symfile.h: Include "common/function-view.h".
11181         (expand_symtabs_file_matcher_ftype)
11182         (expand_symtabs_symbol_matcher_ftype)
11183         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
11184         return bool.
11185         (quick_symbol_functions::map_symtabs_matching_filename)
11186         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
11187         function_view as callback type and return bool.
11188         (expand_symtabs_matching): Adjust to use function_view as callback
11189         type.
11190         (maintenance_expand_name_matcher)
11191         (maintenance_expand_file_matcher): Delete.
11192         (maintenance_expand_symtabs): Use lambdas.
11193         * symtab.c (iterate_over_some_symtabs): Adjust to use
11194         function_view as callback types and return bool.
11195         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
11196         of a cleanup.
11197         (lookup_symtab_callback): Delete.
11198         (lookup_symtab): Use a lambda.
11199         (iterate_over_symbols): Adjust to use function_view as callback
11200         type.
11201         (struct search_symbols_data, search_symbols_file_matches)
11202         (search_symbols_name_matches): Delete.
11203         (search_symbols): Use a pair of lambdas.
11204         (struct add_name_data, add_macro_name, symbol_completion_matcher)
11205         (symtab_expansion_callback): Delete.
11206         (default_make_symbol_completion_list_break_on_1): Use lambdas.
11207         * symtab.h: Include "common/function-view.h".
11208         (iterate_over_some_symtabs): Adjust to use function_view as
11209         callback type and return bool.
11210         (iterate_over_symtabs): Adjust to use function_view as callback
11211         type.
11212         (symbol_found_callback_ftype): Remove 'data' parameter and return
11213         bool.
11214         (iterate_over_symbols): Adjust to use function_view as callback
11215         type.
11216
11217 2017-02-23  Pedro Alves  <palves@redhat.com>
11218
11219         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
11220         (%.o) <unittests/%.c>: New pattern.
11221         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
11222         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
11223         * common/function-view.h: New file.
11224         * unittests/function-view-selftests.c: New file.
11225         * configure: Regenerate.
11226
11227 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
11228
11229         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
11230         inferior_ptid.
11231         * go32-nat.c (go32_thread_alive): Likewise.
11232
11233 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11234
11235         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
11236         delete.
11237
11238 2017-02-23  Yao Qi  <yao.qi@linaro.org>
11239
11240         * varobj.c (varobj_clear_saved_item): Use delete instead of
11241         xfree.
11242         (update_dynamic_varobj_children): Likewise.
11243
11244 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11245
11246         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
11247
11248 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
11249
11250         * common/enum-flags.h (enum_flags::enum_flags): Initialize
11251         m_enum_value to 0 in default constructor.
11252
11253 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
11254
11255         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
11256         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
11257         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
11258         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
11259         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
11260         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
11261         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
11262         IS_STORE_CONDITIONAL_INSN.
11263
11264 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11265
11266         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
11267
11268 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11269
11270         * NEWS (Changes since GDB 7.12): Add DWARF-5.
11271
11272 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11273
11274         * dwarf2read.c (skip_one_die, read_attribute_value)
11275         (dwarf2_const_value_attr, dump_die_shallow)
11276         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
11277         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
11278
11279 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11280
11281         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
11282         (dwarf_parse_macro_header): Accept DWARF version 5.
11283         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
11284
11285 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11286
11287         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
11288         DW_AT_GNU_*.
11289         * common/common-exceptions.h (enum errors): Likewise.
11290         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
11291         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
11292         (dwarf_expr_context::execute_stack_op): Likewise.
11293         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
11294         Likewise.
11295         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
11296         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
11297         (show_entry_values_debug, call_site_to_target_addr)
11298         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
11299         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
11300         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
11301         (value_of_dwarf_block_entry, indirect_pieced_value)
11302         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
11303         (disassemble_dwarf_expression): Likewise.
11304         * dwarf2read.c (process_die, inherit_abstract_dies)
11305         (read_call_site_scope): Likewise.
11306         * gdbtypes.h (struct func_type, struct call_site_parameter)
11307         (struct call_site): Likewise.
11308         * stack.c (read_frame_arg): Likewise.
11309         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
11310
11311 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11312
11313         * defs.h (read_unsigned_leb128): New declaration.
11314         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
11315         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
11316         (dwarf2_find_location_expression): Call also
11317         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
11318         * dwarf2loc.h (dwarf2_version): New declaration.
11319         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
11320         rnglists.
11321         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
11322         .debug_rnglists.
11323         (struct dwop_section_names): Add loclists_dwo.
11324         (dwop_section_names): Add .debug_loclists.dwo.
11325         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
11326         (struct dwarf2_per_cu_data): Add dwarf_version.
11327         (struct dwo_sections): Add loclists.
11328         (struct attr_abbrev): Add implicit_const.
11329         (read_indirect_line_string): New declaration.
11330         (read_unsigned_leb128): Delete declaration.
11331         (rcuh_kind): New definition.
11332         (read_and_check_comp_unit_head): Change parameter
11333         is_debug_types_section to section_kind.
11334         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
11335         (read_comp_unit_head): Change parameter abfd to section, add parameter
11336         section_kind.  Handle DWARF-5.
11337         (error_check_comp_unit_head): Accept also DWARF version 5.
11338         (read_and_check_comp_unit_head): Change parameter
11339         is_debug_types_section to section_kind.
11340         (read_and_check_type_unit_head): Delete function.
11341         (read_abbrev_offset): Handle DWARF-5.
11342         (create_debug_type_hash_table): Add parameter section_kind.  Process
11343         only DW_UT_type.  Use signature and type_offset_in_tu from struct
11344         comp_unit_head.
11345         (create_debug_types_hash_table): Update create_debug_type_hash_table
11346         caller.
11347         (create_all_type_units): Call create_debug_type_hash_table.
11348         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
11349         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
11350         caller.
11351         (skip_one_die): Handle DW_FORM_implicit_const.
11352         (dwarf2_rnglists_process): New function.
11353         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
11354         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
11355         (read_attribute_value): Handle DW_FORM_implicit_const,
11356         DW_FORM_line_strp.
11357         (read_attribute): Handle DW_FORM_implicit_const.
11358         (read_indirect_string_at_offset_from): New function from
11359         read_indirect_string_at_offset.
11360         (read_indirect_string_at_offset): Call
11361         read_indirect_string_at_offset_from.
11362         (read_indirect_line_string_at_offset): New function.
11363         (read_indirect_string): New function comment.
11364         (read_indirect_line_string): New function.
11365         (read_unsigned_leb128): Make it global.
11366         (dwarf2_string_attr): Handle DWARF-5.
11367         (add_include_dir_stub, read_formatted_entries): New functions.
11368         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
11369         Handle DWARF-5.
11370         (per_cu_header_read_in): Update read_comp_unit_head caller.
11371         (dwarf2_version): New function.
11372         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
11373         rnglists.
11374         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
11375         fields.
11376
11377 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11378
11379         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
11380
11381 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11382
11383         * dwarf2read.c (dwarf2_ranges_process): New function from
11384         dwarf2_ranges_read.
11385         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
11386         dwarf2_ranges_process.
11387
11388 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
11389
11390         * dwarf2read.c (create_debug_type_hash_table): New function from
11391         create_debug_types_hash_table.
11392         (create_debug_types_hash_table): Call create_debug_type_hash_table.
11393         (create_all_type_units, open_and_init_dwo_file): Update
11394         create_debug_types_hash_table callers.
11395
11396 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11397
11398         PR gdb/16188
11399         * fork-child.c (trace_start_error): Fix thinko.  va_end should
11400         refer to 'ap', not 'args'.
11401
11402 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11403             Pedro Alves  <palves@redhat.com>
11404
11405         PR gdb/16188
11406         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
11407         calls succeeded.
11408         * fork-child.c (trace_start_error): New function.
11409         (trace_start_error_with_name): Likewise.
11410         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
11411         * inf-ptrace.c (inf_ptrace_me): Likewise.
11412         * inferior.h (trace_start_error): New prototype.
11413         (trace_start_error_with_name): Likewise.
11414
11415 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
11416
11417         PR gdb/21164
11418         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
11419         NULL before using it.
11420         * symmisc.c (maintenance_print_symbols): Likewise.
11421         (maintenance_print_msymbols): Likewise.
11422
11423 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11424
11425         * NEWS: Add record Python bindings entry.
11426
11427 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11428
11429         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
11430         py-record-full.o.
11431         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
11432         * python/py-record-btrace.c, python/py-record-btrace.h,
11433         python/py-record-full.c, python/py-record-full.h: New file.
11434         * python/py-record.c: Add include for py-record-btrace.h and
11435         py-record-full.h.
11436         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
11437         recpy_instruction_history, recpy_function_call_history, recpy_begin,
11438         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
11439         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
11440         New definition.
11441         (gdbpy_initialize_btrace): New export.
11442         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
11443
11444 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11445
11446         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
11447         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
11448         * python/py-record.c: New file.
11449         * python/python-internal.h (gdbpy_start_recording,
11450         gdbpy_current_recording, gdpy_stop_recording,
11451         gdbpy_initialize_record): New export.
11452         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
11453         (python_GdbMethods): Add gdbpy_start_recording,
11454         gdbpy_current_recording and gdbpy_stop_recording.
11455
11456 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11457
11458         * record-btrace.c (record_btrace_record_method): New function.
11459         (init_record_btrace_ops): Initialize to_record_method.
11460         * record-full.c (record_full_record_method): New function.
11461         (init_record_full_ops, init_record_full_core_ops): Add
11462         record_full_record_method.
11463         * record.h (enum record_method): New enum.
11464         * target-debug.h (target_debug_print_enum_record_method: New define.
11465         * target-delegates.c: Regenerate.
11466         * target.c (target_record_method): New function.
11467         * target.h: Include record.h.
11468         (struct target_ops) <to_record_method>: New field.
11469         (target_record_method): New export.
11470
11471 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11472
11473         * record.h (record_start, record_stop): New export.
11474         * record.c (record_start, record_stop): New function.
11475
11476 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11477
11478         * btrace.c (btrace_fetch): Copy function call segments pointer
11479         into a vector.
11480         (btrace_clear): Clear the vector.
11481         (btrace_find_insn_by_number): Use binary search to find the correct
11482         function call segment.
11483         * btrace.h (brace_fun_p): New typedef.
11484         (struct btrace_thread_info) <functions>: New field.
11485
11486 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11487
11488         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
11489         * btrace.c (btrace_decode_error): ... here.  New function.
11490         * btrace.h (btrace_decode_error): New export.
11491
11492 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
11493
11494         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
11495         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
11496         btrace_find_insn_by_number): Remove special case for gaps.
11497         * btrace.h (btrace_insn_get_error): New export.
11498         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
11499         * record-btrace.c (btrace_insn_history): Print number for gaps.
11500         (record_btrace_info, record_btrace_goto): Handle gaps.
11501
11502 2017-02-14  Tom Tromey  <tom@tromey.com>
11503
11504         PR python/13598:
11505         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
11506         event.
11507         * python/py-evts.c (gdbpy_initialize_py_events): Add
11508         before_prompt registry.
11509         * python/py-events.h (events_object) <before_prompt>: New field.
11510
11511 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
11512
11513         * btrace.c (ftrace_new_switch): Preserve up link and flags.
11514
11515 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
11516
11517         * symfile (_initialize_symfile): Add usage text to the load command's
11518         help text.
11519
11520 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
11521
11522         * utils.c (defaulted_query): Don't query on secondary UIs.
11523
11524 2017-02-10  Tom Tromey  <tom@tromey.com>
11525
11526         * rust-lang.c (rust_get_disr_info): Remove unused variable.
11527
11528 2017-02-10  Tom Tromey  <tom@tromey.com>
11529
11530         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
11531         "cleanup" local.
11532         * python/py-type.c (typy_legacy_template_argument): Remove
11533         unnecessary "cleanup" local.
11534
11535 2017-02-10  Tom Tromey  <tom@tromey.com>
11536
11537         * python/python.c (do_start_initialization): New function, from
11538         _initialize_python.
11539         (_initialize_python): Call do_start_initialization.
11540         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
11541         goto.
11542
11543 2017-02-10  Tom Tromey  <tom@tromey.com>
11544
11545         * python/py-prettyprint.c (pretty_print_one_value): Use
11546         gdbpy_ref.
11547
11548 2017-02-10  Tom Tromey  <tom@tromey.com>
11549
11550         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
11551         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
11552         gdbpy_ref.
11553         * python/py-type.c (field_new): Use gdbpy_ref.
11554         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
11555         gdbpy_ref.
11556         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
11557         (py_free_pspace): Likewise.
11558         (pspace_to_pspace_object): Likewise.
11559         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
11560         (py_free_objfile): Likewise.
11561         (objfile_to_objfile_object): Likewise.
11562         * python/py-inferior.c (delete_thread_object): Use
11563         gdbpy_ref.
11564         (infpy_read_memory): Likewise.
11565         (py_free_inferior): Likewise.
11566         * python/py-evtregistry.c (create_eventregistry_object): Use
11567         gdbpy_ref.
11568         * python/py-event.c (create_event_object): Use gdbpy_ref.
11569
11570 2017-02-10  Tom Tromey  <tom@tromey.com>
11571
11572         * python/py-ref.h (gdbpy_ref_policy): Now a template.
11573         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
11574         used.
11575         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
11576         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
11577         python/py-exitedevent.c, python/py-finishbreakpoint.c,
11578         python/py-framefilter.c, python/py-function.c,
11579         python/py-inferior.c, python/py-infevents.c,
11580         python/py-linetable.c, python/py-newobjfileevent.c,
11581         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
11582         python/py-signalevent.c, python/py-stopevent.c,
11583         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
11584         python/py-unwind.c, python/py-utils.c, python/py-value.c,
11585         python/py-varobj.c, python/py-xmethods.c, python/python.c,
11586         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
11587
11588 2017-02-10  Tom Tromey  <tom@tromey.com>
11589
11590         * ui-out.h (ui_out_emit_type): New class.
11591         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
11592         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
11593         and ui_out_emit_tuple.
11594         (enumerate_locals): Likewise.
11595         (py_mi_print_variables, py_print_locals, py_print_args): Use
11596         ui_out_emit_list.
11597         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
11598         ui_out_emit_list.
11599         * common/gdb_optional.h: New file.
11600
11601 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11602
11603         * MAINTAINERS (Write After Approval): Update my e-mail address.
11604
11605 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
11606
11607         PR gdb/21122
11608         * breakpoint.c (_initialize_breakpoint): Update the help description
11609         of the 'commands' command to indicate that it takes a list argument.
11610
11611 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
11612
11613         * interps.c (current_interp_set_logging): Remove "return".
11614
11615 2017-02-09  Gary Benson  <gbenson@redhat.com>
11616
11617         * symtab.c (add_symtab_completions): Prevent NULL pointer
11618         dereference.
11619
11620 2017-02-08  Pedro Alves  <palves@redhat.com>
11621
11622         * interps.c (interp::interp): Remove reference to quiet_p.
11623         (interp_set): Make static.  Remove dead "Switching to" output
11624         code.
11625         (interp_quiet_p, interp_set_quiet): Delete.
11626         (interpreter_exec_cmd): Don't set the interpreter quiet.
11627         * interps.h (interp_quiet_p): Make static.
11628         (class interp) <quiet_p>: Remove field
11629
11630 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11631
11632         * cli/cli-decode.c (find_command_name_length): Make it extern.
11633         * cli/cli-decode.h (find_command_name_length): Declare.
11634         * cli/cli-script.c (command_name_equals, line_first_arg):
11635         New functions.
11636         (process_next_line): Use cli-decode to parse command names.
11637         (build_command_line): Make args a constant pointer.
11638
11639 2017-02-08  Jerome Guitton  <guitton@adacore.com>
11640
11641         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
11642         Remove case-insensitive search.
11643
11644 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
11645
11646         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
11647         at the end of the line.  Avoids an ARI warning.
11648
11649 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
11650
11651         * NEWS: Mention support for record/replay of Intel 64 rdrand and
11652         rdseed instructions.
11653         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
11654
11655 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
11656
11657         PR tdep/20936
11658         Provide and use sparc32 and sparc64 target description XML files.
11659         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
11660         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
11661         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
11662         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
11663         * features/sparc/sparc32-solaris.xml: New file.
11664         * features/sparc/sparc64-solaris.xml: New file.
11665         * features/sparc/sparc32-solaris.c: Generated.
11666         * features/sparc/sparc64-solaris.c: Generated.
11667         * sparc-tdep.h: Account for differences in target descriptions.
11668         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
11669         (sparc32_register_type): Use target provided registers.
11670         (validate_tdesc_registers): New function.
11671         (sparc32_gdbarch_init): Use tdesc_has_registers.
11672         Set pseudoregister functions.
11673         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
11674         (sparc64_register_type): Use target provided registers.
11675         (sparc64_init_abi): Set pseudoregister functions.
11676
11677 2017-02-03  Tom Tromey  <tom@tromey.com>
11678
11679         PR rust/21097:
11680         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
11681         with a single member.
11682
11683 2017-02-03  Pedro Alves  <palves@redhat.com>
11684
11685         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
11686         (cli_interp_base::~cli_interp_base): New.
11687         (cli_interp): New struct.
11688         (as_cli_interp): Cast the interp itself to cli_interp.
11689         (cli_interpreter_pre_command_loop): Rename to ...
11690         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
11691         parameter.
11692         (cli_interpreter_init): Rename to ...
11693         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
11694         boolean.  Make extern.
11695         (cli_interpreter_resume): Rename to ...
11696         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
11697         extern.
11698         (cli_interpreter_suspend): Rename to ...
11699         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
11700         extern.
11701         (cli_interpreter_exec): Rename to ...
11702         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
11703         extern.
11704         (cli_interpreter_supports_command_editing): Rename to ...
11705         (cli_interp_base::supports_command_editing): ... this.  Remove
11706         'interp' parameter.  Make extern.
11707         (cli_ui_out): Rename to ...
11708         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
11709         Make extern.
11710         (cli_set_logging): Rename to ...
11711         (cli_interp_base::set_logging): ... this.  Remove 'interp'
11712         parameter.  Make extern.
11713         (cli_interp_procs): Delete.
11714         (cli_interp_factory): Adjust to use "new".
11715         * cli/cli-interp.h: Include "interps.h".
11716         (struct cli_interp_base): New struct.
11717         * interps.c (struct interp): Delete.  Fields moved to interps.h.
11718         (interp_new): Delete.
11719         (interp::interp, interp::~interp): New.
11720         (interp_set): Use bool, and return void.  Assume the interpreter
11721         has suspend, init and resume methods, and that the all return
11722         void.
11723         (set_top_level_interpreter): interp_set returns void.
11724         (interp_ui_out): Adapt.
11725         (current_interp_set_logging): Adapt.
11726         (interp_data): Delete.
11727         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
11728         (interp_exec): Adapt.
11729         (top_level_interpreter_data): Delete.
11730         * interps.h (interp_init_ftype, interp_resume_ftype)
11731         (interp_suspend_ftype, interp_exec_ftype)
11732         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
11733         (class interp): New.
11734         (interp_new): Delete.
11735         (interp_set): Now returns void.  Use bool.
11736         (interp_data, top_level_interpreter_data): Delete.
11737         * mi/mi-common.h: Include interps.h.
11738         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
11739         init, resume, suspect, exec, interp_ui_out, set_logging and
11740         pre_command_loop methods.
11741         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
11742         (mi_interpreter_init): Rename to ...
11743         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
11744         bool, return void and make extern.  Adjust.
11745         (mi_interpreter_resume): ... Rename to ...
11746         (mi_interp::resume): ... this.  Remove the 'data' parameter,
11747         return void and make extern.  Adjust.
11748         (mi_interpreter_suspend): ... Rename to ...
11749         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
11750         return void and make extern.  Adjust.
11751         (mi_interpreter_exec): ... Rename to ...
11752         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
11753         extern.  Adjust.
11754         (mi_interpreter_pre_command_loop): ... Rename to ...
11755         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
11756         parameter and make extern.
11757         (mi_on_normal_stop_1): Adjust.
11758         (mi_ui_out): Rename to ...
11759         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
11760         parameter and make extern.  Adjust.
11761         (mi_set_logging): Rename to ...
11762         (mi_interp::set_logging): ... this.  Remove the 'interp'
11763         parameter and make extern.  Adjust.
11764         (mi_interp_procs): Delete.
11765         (mi_interp_factory): Adjust to use 'new'.
11766         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
11767         (mi_print_exception, mi_execute_command, mi_load_progress):
11768         Adjust.
11769         * tui/tui-interp.c (tui_interp): New class.
11770         (as_tui_interp): Return a tui_interp pointer.
11771         (tui_on_normal_stop, tui_on_signal_received)
11772         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
11773         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
11774         to use interp::interp_ui_out.
11775         (tui_init): Rename to ...
11776         (tui_interp::init): ... this.  Remove the 'self' parameter, use
11777         bool, return void and make extern.  Adjust.
11778         (tui_resume): Rename to ...
11779         (tui_interp::resume): ... this.  Remove the 'data' parameter,
11780         return void and make extern.  Adjust.
11781         (tui_suspend): Rename to ...
11782         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
11783         return void and make extern.  Adjust.
11784         (tui_ui_out): Rename to ...
11785         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
11786         parameter, and make extern.  Adjust.
11787         (tui_exec): Rename to ...
11788         (tui_interp::exec): ... this.  Remove the 'data' parameter and
11789         make extern.
11790         (tui_interp_procs): Delete.
11791         (tui_interp_factory): Use "new".
11792
11793 2017-02-02  Tom Tromey  <tom@tromey.com>
11794
11795         * rust-exp.y (ends_raw_string, space_then_number)
11796         (rust_identifier_start_p): Return bool.
11797         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
11798         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
11799         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
11800         (rust_chartype_p): Return bool.
11801         (val_print_struct, rust_print_struct_def, rust_print_type):
11802         Update.
11803         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
11804         Return bool.
11805
11806 2017-02-02  Tom Tromey  <tom@tromey.com>
11807
11808         * rust-lang.c: Reindent.
11809
11810 2017-02-02  Tom Tromey  <tom@tromey.com>
11811
11812         * rust-lang.h (rust_crate_for_block): Update.
11813         * rust-lang.c (rust_crate_for_block): Return std::string.
11814         (rust_get_disr_info): Use std:;string, not
11815         gdb::unique_xmalloc_ptr.
11816         * rust-exp.y (crate_name): Update.
11817
11818 2017-02-02  Pedro Alves  <palves@redhat.com>
11819
11820         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
11821         field out of gdb_disassembler_test and make it static.
11822
11823 2017-02-02  Pedro Alves  <palves@redhat.com>
11824
11825         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
11826         mi1_interp and mi_interp fields.
11827
11828 2017-02-02  Pedro Alves  <palves@redhat.com>
11829
11830         * cli/cli-interp.c (struct saved_output_files, saved_output):
11831         Moved from cli/cli-logging.c.
11832         (cli_set_logging): New function.
11833         (cli_interp_procs): Install cli_set_logging.
11834         * cli/cli-interp.h (make_logging_output, cli_set_logging):
11835         Declare.
11836         * cli/cli-logging.c (struct saved_output_files, saved_output):
11837         Moved to cli/cli-interp.c.
11838         (pop_output_files): Don't save outputs here.
11839         (make_logging_output): New function.
11840         (handle_redirections): Don't build tee nor save previous outputs
11841         here.
11842         * interps.c (current_interp_set_logging): Change prototype.
11843         Assume there's always a set_logging_proc method installed.
11844         * interps.h (interp_set_logging_ftype): Change prototype.
11845         (current_interp_set_logging): Change prototype and adjust comment.
11846         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
11847         use make_logging_output.
11848         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
11849 2017-02-02  Pedro Alves  <palves@redhat.com>
11850
11851         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
11852         from ...
11853         (set_logging_overwrite): ... here.
11854         (logging_no_redirect_file): Delete.
11855         (set_logging_redirect): Don't handle redirection on the fly.
11856         Instead warn that "logging off" / "logging on" is necessary.
11857         (pop_output_files): Delete references to logging_no_redirect_file.
11858         (show_logging_command): Always speak in terms of what will happen
11859         once logging is reenabled.
11860
11861 2017-02-02  Pedro Alves  <palves@redhat.com>
11862
11863         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
11864
11865 2017-02-02  Pedro Alves  <palves@redhat.com>
11866
11867         * disasm.c (gdb_pretty_print_insn): Rename to ...
11868         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
11869         Remove gdbarch parameter.  Adapt to clear the object's buffers
11870         instead of allocating new buffers, and to print using the object's
11871         gdb_disassembler instead of calling gdb_print_insn.
11872         (dump_insns): Use gdb_pretty_print_disassembler.
11873         * disasm.h (gdb_pretty_print_insn): Delete declaration.
11874         (gdb_pretty_print_disassembler): New class.
11875         * record-btrace.c (btrace_insn_history): Use
11876         gdb_pretty_print_disassembler.
11877
11878 2017-02-02  Pedro Alves  <palves@redhat.com>
11879
11880         * ada-lang.c (type_as_string): Use string_file.
11881         * ada-valprint.c (ada_print_floating): Use string_file.
11882         * ada-varobj.c (ada_varobj_scalar_image)
11883         (ada_varobj_get_value_image): Use string_file.
11884         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
11885         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
11886         * breakpoint.c (update_inserted_breakpoint_locations)
11887         (insert_breakpoint_locations, reattach_breakpoints)
11888         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
11889         (print_it_watchpoint): Use string_file.
11890         (save_breakpoints): Use stdio_file.
11891         * c-exp.y (oper): Use string_file.
11892         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
11893         tee_file.
11894         (pop_output_files): Use delete.
11895         (handle_redirections): Use stdio_file and tee_file.
11896         * cli/cli-setshow.c (do_show_command): Use string_file.
11897         * compile/compile-c-support.c (c_compute_program): Use
11898         string_file.
11899         * compile/compile-c-symbols.c (generate_vla_size): Take a
11900         'string_file &' instead of a 'ui_file *'.
11901         (generate_c_for_for_one_variable): Take a 'string_file &' instead
11902         of a 'ui_file *'.  Use string_file.
11903         (generate_c_for_variable_locations): Take a 'string_file &'
11904         instead of a 'ui_file *'.
11905         * compile/compile-internal.h (generate_c_for_for_one_variable):
11906         Take a 'string_file &' instead of a 'ui_file *'.
11907         * compile/compile-loc2c.c (push, pushf, unary, binary)
11908         (print_label, pushf_register_address, pushf_register)
11909         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
11910         'ui_file *'.  Adjust.
11911         * compile/compile.c (compile_to_object): Use string_file.
11912         * compile/compile.h (compile_dwarf_expr_to_c)
11913         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
11914         'ui_file *'.
11915         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
11916         (replace_typedefs_qualified_name): Use string_file and
11917         obstack_copy0.
11918         * disasm.c (gdb_pretty_print_insn): Use string_file.
11919         (gdb_disassembly): Adjust reference the null_stream global.
11920         (do_ui_file_delete): Delete.
11921         (gdb_insn_length): Use null_stream.
11922         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
11923         * dwarf2loc.c (dwarf2_compile_property_to_c)
11924         (locexpr_generate_c_location, loclist_generate_c_location): Take a
11925         'string_file &' instead of a 'ui_file *'.
11926         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
11927         * dwarf2read.c (do_ui_file_peek_last): Delete.
11928         (dwarf2_compute_name): Use string_file.
11929         * event-top.c (gdb_setup_readline): Use stdio_file.
11930         * gdbarch.sh (verify_gdbarch): Use string_file.
11931         * gdbtypes.c (safe_parse_type): Use null_stream.
11932         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
11933         string_file.
11934         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
11935         'string_file *' instead of a 'ui_file *'.
11936         (gdbscm_arch_disassemble): Use string_file.
11937         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
11938         * guile/scm-ports.c (class ioscm_file_port): Now a class that
11939         inherits from ui_file.
11940         (ioscm_file_port_delete, ioscm_file_port_rewind)
11941         (ioscm_file_port_put): Delete.
11942         (ioscm_file_port_write): Rename to ...
11943         (ioscm_file_port::write): ... this.  Remove file_port_magic
11944         checks.
11945         (ioscm_file_port_new): Delete.
11946         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
11947         ui_file_up.
11948         * guile/scm-type.c (tyscm_type_name): Use string_file.
11949         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
11950         Use string_file.
11951         * infcmd.c (print_return_value_1): Use string_file.
11952         * infrun.c (print_target_wait_results): Use string_file.
11953         * language.c (add_language): Use string_file.
11954         * location.c (explicit_to_string_internal): Use string_file.
11955         * main.c (captured_main_1): Use null_file.
11956         * maint.c (maintenance_print_architecture): Use stdio_file.
11957         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
11958         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
11959         event_channel>: Change type to mi_console_file pointer.
11960         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
11961         (mi_console_file_delete): Delete.
11962         (struct mi_console_file): Delete.
11963         (mi_console_file_magic): Delete.
11964         (mi_console_file_new): Delete.
11965         (mi_console_file::mi_console_file): New.
11966         (mi_console_file_delete): Delete.
11967         (mi_console_file_fputs): Delete.
11968         (mi_console_file::write): New.
11969         (mi_console_raw_packet): Delete.
11970         (mi_console_file::flush): New.
11971         (mi_console_file_flush): Delete.
11972         (mi_console_set_raw): Rename to ...
11973         (mi_console_file::set_raw): ... this.
11974         * mi/mi-console.h (class mi_console_file): New class.
11975         (mi_console_file_new, mi_console_set_raw): Delete.
11976         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
11977         (mi_set_logging): Use delete and tee_file.  Adjust.
11978         * mi/mi-main.c (output_register): Use string_file.
11979         (mi_cmd_data_evaluate_expression): Use string_file.
11980         (mi_cmd_data_read_memory): Use string_file.
11981         (mi_cmd_execute, print_variable_or_computed): Use string_file.
11982         * mi/mi-out.c (mi_ui_out::main_stream): New.
11983         (mi_ui_out::rewind): Use main_stream and
11984         string_file.
11985         (mi_ui_out::put): Use main_stream and string_file.
11986         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11987         Allocate a 'string_file' instead.
11988         (mi_out_new): Don't allocate a mem_fileopen stream here.
11989         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
11990         (mi_ui_out::main_stream): Declare method.
11991         * printcmd.c (eval_command): Use string_file.
11992         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
11993         * python/py-arch.c (archpy_disassemble): Use string_file.
11994         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
11995         * python/py-frame.c (frapy_str): Use string_file.
11996         * python/py-framefilter.c (py_print_type, py_print_single_arg):
11997         Use string_file.
11998         * python/py-type.c (typy_str): Use string_file.
11999         * python/py-unwind.c (unwind_infopy_str): Use string_file.
12000         * python/py-value.c (valpy_str): Use string_file.
12001         * record-btrace.c (btrace_insn_history): Use string_file.
12002         * regcache.c (regcache_print): Use stdio_file.
12003         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12004         * remote.c (escape_buffer): Use string_file.
12005         * rust-lang.c (rust_get_disr_info): Use string_file.
12006         * serial.c (serial_open_ops_1): Use stdio_file.
12007         (do_serial_close): Use delete.
12008         * stack.c (print_frame_arg): Use string_file.
12009         (print_frame_args): Remove local mem_fileopen stream, not used.
12010         (print_frame): Use string_file.
12011         * symmisc.c (maintenance_print_symbols): Use stdio_file.
12012         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12013         Take a 'string_file *' instead of a 'ui_file *'.
12014         * top.c (new_ui): Use stdio_file and stderr_file.
12015         (free_ui): Use delete.
12016         (execute_command_to_string): Use string_file.
12017         (quit_confirm): Use string_file.
12018         * tracepoint.c (collection_list::append_exp): Use string_file.
12019         * tui/tui-disasm.c (tui_disassemble): Use string_file.
12020         * tui/tui-file.c: Don't include "ui-file.h".
12021         (enum streamtype, struct tui_stream): Delete.
12022         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12023         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
12024         (tui_file::tui_file): New method.
12025         (tui_file_fputs): Delete.
12026         (tui_file_get_strbuf): Delete.
12027         (tui_file::puts): New method.
12028         (tui_file_adjust_strbuf): Delete.
12029         (tui_file_flush): Delete.
12030         (tui_file::flush): New method.
12031         * tui/tui-file.h: Tweak intro comment.
12032         Include ui-file.h.
12033         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
12034         (tui_file_adjust_strbuf): Delete declarations.
12035         (class tui_file): New class.
12036         * tui/tui-io.c (tui_initialize_io): Use tui_file.
12037         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
12038         (tui_register_format): Use string_stream.
12039         * tui/tui-stack.c (tui_make_status_line): Use string_file.
12040         (tui_get_function_from_frame): Use string_file.
12041         * typeprint.c (type_to_string): Use string_file.
12042         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
12043         (null_stream): New global.
12044         (ui_file_delete): Delete.
12045         (ui_file::ui_file): New.
12046         (null_file_isatty): Delete.
12047         (ui_file::~ui_file): New.
12048         (null_file_rewind): Delete.
12049         (ui_file::printf): New.
12050         (null_file_put): Delete.
12051         (null_file_flush): Delete.
12052         (ui_file::putstr): New.
12053         (null_file_write): Delete.
12054         (ui_file::putstrn): New.
12055         (null_file_read): Delete.
12056         (ui_file::putc): New.
12057         (null_file_fputs): Delete.
12058         (null_file_write_async_safe): Delete.
12059         (ui_file::vprintf): New.
12060         (null_file_delete): Delete.
12061         (null_file::write): New.
12062         (null_file_fseek): Delete.
12063         (null_file::puts): New.
12064         (ui_file_data): Delete.
12065         (null_file::write_async_safe): New.
12066         (gdb_flush, ui_file_isatty): Adjust.
12067         (ui_file_put, ui_file_rewind): Delete.
12068         (ui_file_write): Adjust.
12069         (ui_file_write_for_put): Delete.
12070         (ui_file_write_async_safe, ui_file_read): Adjust.
12071         (ui_file_fseek): Delete.
12072         (fputs_unfiltered): Adjust.
12073         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
12074         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
12075         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
12076         (set_ui_file_data): Delete.
12077         (string_file::~string_file, string_file::write)
12078         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
12079         (do_ui_file_as_string, ui_file_as_string): Delete.
12080         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
12081         (struct mem_file): Delete.
12082         (mem_file_new): Delete.
12083         (stdio_file::stdio_file): New.
12084         (mem_file_delete): Delete.
12085         (stdio_file::stdio_file): New.
12086         (mem_fileopen): Delete.
12087         (stdio_file::~stdio_file): New.
12088         (mem_file_rewind): Delete.
12089         (stdio_file::set_stream): New.
12090         (mem_file_put): Delete.
12091         (stdio_file::open): New.
12092         (mem_file_write): Delete.
12093         (stdio_file_magic, struct stdio_file): Delete.
12094         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
12095         (stdio_file::flush): New.
12096         (stdio_file_read): Rename to ...
12097         (stdio_file::read): ... this.  Adjust.
12098         (stdio_file_write): Rename to ...
12099         (stdio_file::write): ... this.  Adjust.
12100         (stdio_file_write_async_safe): Rename to ...
12101         (stdio_file::write_async_safe) ... this.  Adjust.
12102         (stdio_file_fputs): Rename to ...
12103         (stdio_file::puts) ... this.  Adjust.
12104         (stdio_file_isatty): Delete.
12105         (stdio_file_fseek): Delete.
12106         (stdio_file::isatty): New.
12107         (stderr_file_write): Rename to ...
12108         (stderr_file::write) ... this.  Adjust.
12109         (stderr_file_fputs): Rename to ...
12110         (stderr_file::puts) ... this.  Adjust.
12111         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
12112         (stderr_file::stderr_file): New.
12113         (tee_file_magic): Delete.
12114         (struct tee_file): Delete.
12115         (tee_file::tee_file): New.
12116         (tee_file_new): Delete.
12117         (tee_file::~tee_file): New.
12118         (tee_file_delete): Delete.
12119         (tee_file_flush): Rename to ...
12120         (tee_file::flush): ... this.  Adjust.
12121         (tee_file_write): Rename to ...
12122         (tee_file::write): ... this.  Adjust.
12123         (tee_file::write_async_safe): New.
12124         (tee_file_fputs): Rename to ...
12125         (tee_file::puts): ... this.  Adjust.
12126         (tee_file_isatty): Rename to ...
12127         (tee_file::isatty): ... this.  Adjust.
12128         * ui-file.h (struct obstack, struct ui_file): Don't
12129         forward-declare.
12130         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
12131         (ui_file_write_ftype)
12132         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
12133         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
12134         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
12135         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
12136         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
12137         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
12138         (set_ui_file_fseek): Delete.
12139         (ui_file_data, ui_file_delete, ui_file_rewind)
12140         (struct ui_file): New.
12141         (ui_file_up): New.
12142         (class null_file): New.
12143         (null_stream): Declare.
12144         (ui_file_write_for_put, ui_file_put): Delete.
12145         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
12146         Delete.
12147         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
12148         (gdb_fopen, tee_file_new): Delete.
12149         (struct string_file): New.
12150         (struct stdio_file): New.
12151         (stdio_file_up): New.
12152         (struct stderr_file): New.
12153         (class tee_file): New.
12154         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
12155         of a 'ui_file *'.  Adjust.
12156         * ui-out.h (class ui_out) <field_stream>: Likewise.
12157         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
12158         (null_stream): Delete.
12159         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
12160         Adjust.
12161         * utils.h (struct ui_file): Delete forward declaration..
12162         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
12163         (error_stream): Take a 'string_file &' instead of a
12164         'ui_file *'.
12165         * varobj.c (varobj_value_get_print_value): Use string_file.
12166         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
12167         * gdbarch.c: Regenerate.
12168
12169 2017-02-02  Pedro Alves  <palves@redhat.com>
12170
12171         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
12172         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
12173         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
12174         Adjust to call gdb_print_insn instead of
12175         gdb_disassembler::print_insn.
12176         (dump_insns, do_mixed_source_and_assembly_deprecated)
12177         (do_mixed_source_and_assembly, do_assembly_only): Add back a
12178         'gdbarch' parameter.  Remove gdb_disassembler parameter.
12179         (gdb_disassembly): Don't allocate a gdb_disassembler here.
12180         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
12181         declaration.
12182         (gdb_pretty_print_insn): Re-add declaration.
12183         * record-btrace.c (btrace_insn_history): Don't allocate a
12184         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
12185
12186 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
12187
12188         * disasm.h (gdb_disassembly): Remove file_string parameter.
12189         * disasm.c (gdb_disassembly): Likewise.
12190         * cli/cli-cmds.c (print_disassembly): Adapt.
12191         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
12192         * stack.c (do_gdb_disassembly): Likewise.
12193
12194 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12195
12196         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
12197         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
12198         targets.  And if the implicit value is longer than needed, extract
12199         the first bytes instead of the "least significant" ones.
12200
12201 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12202
12203         * btrace.c (btrace_enable): Do not call btrace_add_pc for
12204         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
12205         (btrace_fetch): Assert can_access_registers_ptid.
12206         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
12207         validate_registers_access.
12208
12209 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
12210
12211         * gdbthread.h (can_access_registers_ptid): New.
12212         * thread.c (can_access_registers_ptid): New.
12213
12214 2017-02-01  Pedro Alves  <palves@redhat.com>
12215
12216         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
12217
12218 2017-01-31  Pedro Alves  <palves@redhat.com>
12219
12220         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
12221         Fix typos.
12222
12223 2017-01-31  Pedro Alves  <palves@redhat.com>
12224
12225         * stack.c (print_frame_args): Remove local mem_fileopen stream,
12226         not used.
12227
12228 2017-01-31  Pedro Alves  <palves@redhat.com>
12229
12230         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
12231
12232 2017-01-31  Pedro Alves  <palves@redhat.com>
12233
12234         * common/scoped_restore.h
12235         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
12236         change the value's parameter type to T2.
12237         (make_scoped_restore): Likewise.
12238
12239 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12240             Richard Henderson  <rth@redhat.com>
12241
12242         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
12243         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
12244         GS_BASE for older kernels.
12245         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
12246         GS_BASE for older kernels.
12247         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
12248         and GS_BASE to the offset table.
12249         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
12250         system register group.
12251         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
12252         for older kernels.
12253         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
12254         amd64 ABI.
12255         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
12256         AMD64_GSBASE_REGNUM.
12257         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
12258         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
12259         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
12260         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
12261         i386/64bit-segments.xml in those rules.
12262         * features/i386/64bit-segments.xml: New file.
12263         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
12264         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
12265         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
12266         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
12267         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
12268         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
12269         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
12270         * features/i386/amd64-avx-linux.c: Regenerated.
12271         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
12272         * features/i386/amd64-avx-mpx.c: Regenerated.
12273         * features/i386/amd64-avx512-linux.c: Regenerated.
12274         * features/i386/amd64-linux.c: Regenerated.
12275         * features/i386/amd64-mpx-linux.c: Regenerated.
12276         * features/i386/i386-avx-mpx-linux.c: Regenerated.
12277         * features/i386/i386-avx-mpx.c: Regenerated.
12278         * features/i386/x32-avx-linux.c: Regenerated.
12279         * features/i386/x32-avx512-linux.c: Regenerated.
12280         * regformats/i386/amd64-avx-linux.dat: Regenerated.
12281         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
12282         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
12283         * regformats/i386/amd64-linux.dat: Regenerated.
12284         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
12285         * regformats/i386/x32-avx-linux.dat: Regenerated.
12286         * regformats/i386/x32-avx512-linux.dat: Regenerated.
12287         * regformats/i386/x32-linux.dat: Regenerated.
12288
12289 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12290
12291         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
12292         Set to AMD64_NUM_REGS.
12293
12294 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
12295
12296         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
12297         that checks validity of a register number.
12298
12299 2017-01-27  Kees Cook  <keescook@google.com>
12300
12301         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
12302         fetch_fpregs if target has fpa registers.
12303         (arm_linux_store_inferior_registers): Call store_fpregs if target
12304         has fpa registers.
12305
12306 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12307
12308         * cris-tdep.c (cris_gdbarch_init): Remove check for
12309         info.byte_order and force it to BFD_ENDIAN_LITTLE.
12310
12311 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
12312
12313         * corelow.c (get_core_register_section): Check for regset
12314         existence before checking for REGSET_VARIABLE_SIZE.
12315
12316 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12317             Pedro Alves  <palves@redhat.com>
12318
12319         PR gdb/20939
12320         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
12321         call memory_error, save memaddr instead.
12322         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
12323         negative, cal memory_error.
12324         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
12325
12326 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12327
12328         * disasm-selftests.c (memory_error_test): New function.
12329         (_initialize_disasm_selftests): Register memory_error_test.
12330
12331 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12332
12333         * Makefile.in (SFILES): Add disasm-selftests.c and
12334         selftest-arch.c.
12335         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
12336         * disasm-selftests.c: New file.
12337         * selftest-arch.c: New file.
12338         * selftest-arch.h: New file.
12339
12340 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12341
12342         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
12343         to bfd_arch_mep.  Don't return 0 if section is not
12344         found.  Call print_insn_mep.
12345
12346 2017-01-26  Pedro Alves  <palves@redhat.com>
12347             Yao Qi  <yao.qi@linaro.org>
12348
12349         * arm-tdep.c: Include "disasm.h".
12350         (gdb_print_insn_arm): Update code to get gdbarch.
12351         * disasm.c (dis_asm_read_memory): Change it to
12352         gdb_disassembler::dis_asm_read_memory.
12353         (dis_asm_memory_error): Likewise.
12354         (dis_asm_print_address): Likewise.
12355         (gdb_pretty_print_insn): Change it to
12356         gdb_disassembler::pretty_print_insn.
12357         (dump_insns): Add one argument gdb_disassemlber.  All
12358         callers updated.
12359         (do_mixed_source_and_assembly_deprecated): Likewise.
12360         (do_mixed_source_and_assembly): Likewise.
12361         (do_assembly_only): Likewise.
12362         (gdb_disassembler::gdb_disassembler): New.
12363         (gdb_disassembler::print_insn): New.
12364         * disasm.h (class gdb_disassembler): New.
12365         (gdb_pretty_print_insn): Remove declaration.
12366         (gdb_disassemble_info): Likewise.
12367         * guile/scm-disasm.c (class gdbscm_disassembler): New.
12368         (gdbscm_disasm_read_memory_worker): Update.
12369         (gdbscm_disasm_read_memory): Update.
12370         (gdbscm_disasm_memory_error): Remove.
12371         (gdbscm_disasm_print_address): Remove.
12372         (gdbscm_disassembler::gdbscm_disassembler): New.
12373         (gdbscm_print_insn_from_port): Update.
12374         * mips-tdep.c: Include disasm.h.
12375         (gdb_print_insn_mips): Update code to get gdbarch.
12376         * record-btrace.c (btrace_insn_history): Update.
12377         * spu-tdep.c: Include disasm.h.
12378         (struct spu_dis_asm_data): Remove.
12379         (struct spu_dis_asm_info): New.
12380         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
12381         SPU id.
12382         (gdb_print_insn_spu): Cast disassemble_info to
12383         spu_dis_asm_info.
12384
12385 2017-01-26  Yao Qi  <yao.qi@linaro.org>
12386
12387         * disasm.c (do_ui_file_delete): Delete.
12388         (gdb_insn_length): Move code creating stream to ...
12389         * utils.c (null_stream): ... here.  New function.
12390         * utils.h (null_stream): Declare.
12391
12392 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
12393
12394         * python/py-inferior.c (find_thread_object): Return directly
12395         from the loop.  Remove "found" variable.
12396
12397 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
12398
12399         GDB 7.12.1 released.
12400
12401 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12402
12403         * python/py-function.c (fnpy_call): Reorder declarations to have
12404         the gdbpy_enter object declared first.
12405         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
12406
12407 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
12408
12409         PR python/21068
12410         * python/python-internal.h (PyMem_RawMalloc): Define for
12411         Python < 3.4.
12412         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
12413         PyMem_RawMalloc instead of PyMem_Malloc.
12414
12415 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
12416             Luis Machado  <lgustavo@codesourcery.com>
12417
12418         * NEWS (New commands): Mention flash-erase.
12419         (New MI commands): Mention target-flash-erase.
12420         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
12421         command.
12422         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
12423         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
12424         * target.c (flash_erase_command): New function.
12425         (initialize_targets): Add new flash-erase command.
12426         * target.h (flash_erase_command): New declaration.
12427
12428 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
12429
12430         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
12431         HAVE_SYS_PROCFS_H is defined.
12432
12433 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12434
12435         * remote.c (struct cached_reg): Change data into a pointer.
12436         * (stop_reply_dtr): Free data pointers before deleting vector.
12437         (process_stop_reply): Likewise.
12438         (remote_parse_stop_reply): Allocate space for data
12439
12440 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
12441
12442         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
12443         MAX_REGISTER_SIZE.
12444         (amd64_pseudo_register_read_value): Likewise.
12445         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
12446         (store_register_using_P): Likewise.
12447         * regcache.c (regcache_xfer_part): Likewise.
12448
12449 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
12450
12451         Split real and pseudo registers.
12452         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
12453         (sparc32_pseudo_regnum): New enum.
12454         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
12455         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
12456         (SPARC32_CP0_REGISTERS): New macro.
12457         (sparc32_pseudo_register_name): New function.
12458         (sparc32_register_name): Use sparc32_pseudo_register_name.
12459         (sparc32_pseudo_register_type): New function.
12460         (sparc32_register_type): Use sparc32_pseudo_register_type.
12461         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
12462         pseudo register numbers.
12463         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
12464         (SPARC64_CP0_REGISTERS): New macro.
12465         (sparc64_pseudo_register_name): New function.
12466         (sparc64_register_name): Use sparc64_pseudo_register_name.
12467         (sparc64_pseudo_register_type): New function.
12468         (sparc64_register_type): Use sparc64_pseudo_register_type.
12469         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
12470         pseudo register numbers.
12471         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
12472         sparc64_store_arguments): Handle pseudo register numbers.
12473
12474 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12475
12476         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
12477         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
12478         output.
12479         (getpkt_or_notif_sane_1): Likewise.
12480
12481 2017-01-13  Yao Qi  <yao.qi@linaro.org>
12482
12483         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
12484         of CC.  Pass "-x c++-header" instead of "-x c".
12485
12486 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12487
12488         * remote.c (remote_can_async_p): Update comment.
12489
12490 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12491
12492         * linux-nat.c (linux_nat_can_async_p): Update comment.
12493
12494 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
12495
12496         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
12497
12498 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
12499
12500         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
12501
12502 2017-01-10  Tom Tromey  <tom@tromey.com>
12503
12504         * python/py-type.c (typy_legacy_template_argument): Update.
12505         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
12506         ~demangle_parse_info): Declare new members.
12507         (cp_demangled_name_to_comp): Return unique_ptr.
12508         (cp_demangled_name_parse_free)
12509         (make_cleanup_cp_demangled_name_parse_free)
12510         (cp_new_demangle_parse_info): Remove.
12511         * cp-support.c (do_demangled_name_parse_free_cleanup)
12512         (make_cleanup_cp_demangled_name_parse_free): Remove.
12513         (inspect_type, cp_canonicalize_string_full)
12514         (cp_canonicalize_string): Update.
12515         (mangled_name_to_comp): Change return type.
12516         (cp_class_name_from_physname, method_name_from_physname)
12517         (cp_func_name, cp_remove_params): Update.
12518         * cp-name-parser.y (demangle_parse_info): New constructor, from
12519         cp_new_demangle_parse_info.
12520         (~demangle_parse_info): New destructor, from
12521         cp_demangled_name_parse_free.
12522         (cp_merge_demangle_parse_infos): Update.
12523         (cp_demangled_name_to_comp): Change return type.
12524
12525 2017-01-10  Tom Tromey  <tom@tromey.com>
12526
12527         * top.c (prevent_dont_repeat): Change return type.
12528         * python/python.c (execute_gdb_command): Use std::string.
12529         Update.
12530         * guile/guile.c (gdbscm_execute_gdb_command): Update.
12531         * command.h (prevent_dont_repeat): Change return type.
12532         * breakpoint.c (bpstat_do_actions_1): Update.
12533
12534 2017-01-10  Tom Tromey  <tom@tromey.com>
12535
12536         * value.h (scoped_value_mark::~scoped_value_mark): Call
12537         free_to_mark.
12538         (scoped_value_mark::free_to_mark): New method.
12539         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
12540         scoped_value_mark.
12541
12542 2017-01-10  Tom Tromey  <tom@tromey.com>
12543
12544         * python/py-value.c (valpy_dereference, valpy_referenced_value)
12545         (valpy_reference_value, valpy_const_value, valpy_get_address)
12546         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
12547         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
12548         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
12549         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
12550         scoped_value_mark.
12551         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
12552         * value.h (scoped_value_mark): New class.
12553
12554 2017-01-10  Tom Tromey  <tom@tromey.com>
12555
12556         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
12557         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
12558         * psymtab.c (discard_psymtabs_upto): Remove.
12559         (make_cleanup_discard_psymtabs): Remove.
12560         (struct psymtab_state): Remove.
12561
12562 2017-01-10  Tom Tromey  <tom@tromey.com>
12563
12564         * record-full.c (record_full_save_cleanups): Remove.
12565         (record_full_save): Use gdb::unlinker.
12566         * gcore.c (do_bfd_delete_cleanup): Remove.
12567         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
12568         cleanups.
12569         * dwarf2read.c (unlink_if_set): Remove.
12570         (write_psymtabs_to_index): Use gdb::unlinker.
12571         * common/gdb_unlinker.h: New file.
12572
12573 2017-01-10  Tom Tromey  <tom@tromey.com>
12574
12575         * windows-tdep.c (windows_xfer_shared_library): Update.
12576         * windows-nat.c (windows_make_so): Update.
12577         * utils.h (make_cleanup_bfd_unref): Remove.
12578         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
12579         * symfile.h (symfile_bfd_open)
12580         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
12581         * symfile.c (read_symbols, symbol_file_add)
12582         (separate_debug_file_exists): Update.
12583         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
12584         (generic_load, reread_symbols): Update.
12585         * symfile-mem.c (symbol_file_add_from_memory): Update.
12586         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
12587         (spu_symbol_file_add_from_memory): Update.
12588         * solist.h (struct target_so_ops) <bfd_open>: Return
12589         gdb_bfd_ref_ptr.
12590         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
12591         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
12592         gdb_bfd_ref_ptr.
12593         (solib_map_sections, reload_shared_libraries_1): Update.
12594         * solib-svr4.c (enable_break): Update.
12595         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
12596         * solib-frv.c (enable_break2): Update.
12597         * solib-dsbt.c (enable_break): Update.
12598         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
12599         gdb_bfd_ref_ptr.
12600         (darwin_solib_get_all_image_info_addr_at_init): Update.
12601         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
12602         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
12603         * record-full.c (record_full_save): Update.
12604         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
12605         * procfs.c (insert_dbx_link_bpt_in_file): Update.
12606         * minidebug.c (find_separate_debug_file_in_section): Return
12607         gdb_bfd_ref_ptr.
12608         * machoread.c (macho_add_oso_symfile): Change abfd to
12609         gdb_bfd_ref_ptr.
12610         (macho_symfile_read_all_oso): Update.
12611         (macho_check_dsym): Return gdb_bfd_ref_ptr.
12612         (macho_symfile_read): Update.
12613         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
12614         (jit_bfd_try_read_symtab): Update.
12615         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12616         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12617         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12618         gdb_bfd_ref_ptr.
12619         (gdb_bfd_ref_policy): New struct.
12620         (gdb_bfd_ref_ptr): New typedef.
12621         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
12622         (gdb_bfd_openw, gdb_bfd_openr_iovec)
12623         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
12624         gdb_bfd_ref_ptr.
12625         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12626         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
12627         (gcore_command): Update.
12628         * exec.c (exec_file_attach): Update.
12629         * elfread.c (elf_symfile_read): Update.
12630         * dwarf2read.c (dwarf2_get_dwz_file): Update.
12631         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
12632         (open_and_init_dwo_file): Update.
12633         (open_dwp_file): Return gdb_bfd_ref_ptr.
12634         (open_and_init_dwp_file): Update.
12635         * corelow.c (core_open): Update.
12636         * compile/compile-object-load.c (compile_object_load): Update.
12637         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
12638         * coffread.c (coff_symfile_read): Update.
12639         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
12640         gdb_bfd_ref_ptr.  Rename.
12641         (dump_bfd_file, restore_command): Update.
12642         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12643         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
12644         (find_separate_debug_file_by_buildid): Update.
12645
12646 2017-01-10  Tom Tromey  <tom@tromey.com>
12647
12648         * common/gdb_ref_ptr.h: New file.
12649         * python/py-ref.h (struct gdbpy_ref_policy): New.
12650         (gdbpy_ref): Now a typedef.
12651
12652 2017-01-10  Tom Tromey  <tom@tromey.com>
12653
12654         * utils.h (make_cleanup_htab_delete): Don't declare.
12655         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
12656         Remove.
12657         * linespec.c (decode_compound_collector): Add constructor,
12658         destructor.
12659         (lookup_prefix_sym): Remove cleanup.
12660         (symtab_collector): Add constructor, destructor.
12661         (collect_symtabs_from_filename): Remove cleanup.
12662         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
12663         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
12664         Use htab_up.
12665         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
12666         * dwarf2read.c (dw2_expand_symtabs_matching)
12667         (dw2_map_symbol_filenames, dwarf_decode_macros)
12668         (write_psymtabs_to_index): Use htab_up.
12669         * dwarf2loc.c (func_verify_no_selftailcall)
12670         (call_site_find_chain_1, func_verify_no_selftailcall)
12671         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
12672         std::vector, gdb::unique_xmalloc_ptr.
12673         (call_sitep): Remove typedef.
12674         (dwarf2_locexpr_baton_eval): Remove unused variable.
12675
12676 2017-01-10  Tom Tromey  <tom@tromey.com>
12677
12678         * python/python-internal.h (make_cleanup_py_decref)
12679         (make_cleanup_py_xdecref): Don't declare.
12680         * python/py-utils.c (py_decref, make_cleanup_py_decref)
12681         (py_xdecref, make_cleanup_py_xdecref): Remove.
12682
12683 2017-01-10  Tom Tromey  <tom@tromey.com>
12684
12685         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
12686         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
12687
12688 2017-01-10  Tom Tromey  <tom@tromey.com>
12689
12690         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
12691
12692 2017-01-10  Tom Tromey  <tom@tromey.com>
12693
12694         * python/py-utils.c (unicode_to_encoded_string)
12695         (python_string_to_target_string)
12696         (python_string_to_target_python_string)
12697         (python_string_to_host_string, gdbpy_obj_to_string)
12698         (get_addr_from_python): Use gdbpy_ref.
12699
12700 2017-01-10  Tom Tromey  <tom@tromey.com>
12701
12702         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
12703         gdbpy_ref.
12704
12705 2017-01-10  Tom Tromey  <tom@tromey.com>
12706
12707         * python/python.c (eval_python_command, gdbpy_decode_line)
12708         (gdbpy_run_events, gdbpy_start_type_printers)
12709         (gdbpy_apply_type_printers): Use gdbpy_ref.
12710
12711 2017-01-10  Tom Tromey  <tom@tromey.com>
12712
12713         * python/py-param.c (get_doc_string, compute_enum_values): Use
12714         gdbpy_ref.
12715
12716 2017-01-10  Tom Tromey  <tom@tromey.com>
12717
12718         * python/py-inferior.c (find_thread_object, build_inferior_list):
12719         Use gdbpy_ref.
12720
12721 2017-01-10  Tom Tromey  <tom@tromey.com>
12722
12723         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12724
12725 2017-01-10  Tom Tromey  <tom@tromey.com>
12726
12727         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
12728         gdbpy_ref.
12729
12730 2017-01-10  Tom Tromey  <tom@tromey.com>
12731
12732         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
12733         extra incref.
12734         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
12735         Use gdbpy_ref.
12736
12737 2017-01-10  Tom Tromey  <tom@tromey.com>
12738
12739         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12740         gdbpy_ref.
12741
12742 2017-01-10  Tom Tromey  <tom@tromey.com>
12743
12744         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
12745         decref results of PyArg_ParseTupleAndKeywords.
12746
12747 2017-01-10  Tom Tromey  <tom@tromey.com>
12748
12749         * python/python.c (python_run_simple_file): Use
12750         unique_xmalloc_ptr, gdbpy_ref.
12751
12752 2017-01-10  Tom Tromey  <tom@tromey.com>
12753
12754         * python/py-prettyprint.c (print_stack_unless_memory_error)
12755         (print_string_repr, print_children): Use gdbpy_ref.
12756         (dummy_python_frame): New class.
12757         (dummy_python_frame::dummy_python_frame): Rename from
12758         push_dummy_python_frame.
12759         (py_restore_tstate): Remove.
12760
12761 2017-01-10  Tom Tromey  <tom@tromey.com>
12762
12763         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
12764
12765 2017-01-10  Tom Tromey  <tom@tromey.com>
12766
12767         * python/python.c (ensure_python_env, restore_python_env):
12768         Remove.
12769         * python/python-internal.h (ensure_python_env): Don't declare.
12770         * varobj.h (varobj_ensure_python_env): Don't declare.
12771         * varobj.c (varobj_ensure_python_env): Remove.
12772
12773 2017-01-10  Tom Tromey  <tom@tromey.com>
12774
12775         * varobj.c (varobj_value_get_print_value): Use
12776         gdbpy_enter_varobj.
12777
12778 2017-01-10  Tom Tromey  <tom@tromey.com>
12779
12780         * python/py-prettyprint.c (print_string_repr, print_children):
12781         Update.
12782         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
12783         of "encoding".
12784         * varobj.c (varobj_value_get_print_value): Update.
12785         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
12786
12787 2017-01-10  Tom Tromey  <tom@tromey.com>
12788
12789         * varobj.c (varobj_get_display_hint)
12790         (dynamic_varobj_has_child_method, install_new_value_visualizer)
12791         (varobj_set_visualizer, free_variable): Use
12792         gdbpy_enter_varobj.
12793
12794 2017-01-10  Tom Tromey  <tom@tromey.com>
12795
12796         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
12797         (do_finish_initialization): New function.  Use gdbpy_ref.
12798         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
12799         do_finish_initialization.
12800
12801 2017-01-10  Tom Tromey  <tom@tromey.com>
12802
12803         * python/py-param.c (get_set_value, get_show_value): Use
12804         gdbpy_enter, gdbpy_ref.
12805
12806 2017-01-10  Tom Tromey  <tom@tromey.com>
12807
12808         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
12809
12810 2017-01-10  Tom Tromey  <tom@tromey.com>
12811
12812         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
12813
12814 2017-01-10  Tom Tromey  <tom@tromey.com>
12815
12816         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
12817         Use gdbpy_enter_varobj.
12818
12819 2017-01-10  Tom Tromey  <tom@tromey.com>
12820
12821         * varobj.c (gdbpy_enter_varobj): New constructor.
12822         * python/python-internal.h (gdbpy_enter_varobj): New class.
12823         * python/py-varobj.c (py_varobj_get_iterator): Use
12824         gdbpy_enter_varobj.
12825
12826 2017-01-10  Tom Tromey  <tom@tromey.com>
12827
12828         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
12829         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12830         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
12831         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
12832         unique_xmalloc_ptr.
12833         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
12834
12835 2017-01-10  Tom Tromey  <tom@tromey.com>
12836
12837         * python/py-xmethods.c (invoke_match_method): Use
12838         gdbpy_ref.
12839
12840 2017-01-10  Tom Tromey  <tom@tromey.com>
12841
12842         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
12843         gdbpy_enter, gdbpy_ref.
12844
12845 2017-01-10  Tom Tromey  <tom@tromey.com>
12846
12847         * python/python.c (python_interactive_command): Use gdbpy_enter.
12848
12849 2017-01-10  Tom Tromey  <tom@tromey.com>
12850
12851         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
12852         gdbpy_ref.
12853
12854 2017-01-10  Tom Tromey  <tom@tromey.com>
12855
12856         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
12857         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
12858
12859 2017-01-10  Tom Tromey  <tom@tromey.com>
12860
12861         * utils.h (htab_deleter): New struct.
12862         (htab_up): New typedef.
12863         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
12864         gdbpy_enter, gdbpy_ref, htab_up.
12865
12866 2017-01-10  Tom Tromey  <tom@tromey.com>
12867
12868         * python/py-unwind.c (pending_frame_invalidate): Remove.
12869         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
12870
12871 2017-01-10  Tom Tromey  <tom@tromey.com>
12872
12873         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
12874         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
12875
12876 2017-01-10  Tom Tromey  <tom@tromey.com>
12877
12878         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
12879
12880 2017-01-10  Tom Tromey  <tom@tromey.com>
12881
12882         * python/python.c (gdbpy_eval_from_control_command)
12883         (gdbpy_source_script, gdbpy_run_events)
12884         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
12885         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
12886         gdbpy_enter.
12887
12888 2017-01-10  Tom Tromey  <tom@tromey.com>
12889
12890         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
12891
12892 2017-01-10  Tom Tromey  <tom@tromey.com>
12893
12894         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
12895
12896 2017-01-10  Tom Tromey  <tom@tromey.com>
12897
12898         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
12899         (python_on_inferior_call_pre, python_on_inferior_call_post)
12900         (python_on_memory_change, python_on_register_change)
12901         (python_inferior_exit, python_new_objfile, add_thread_object)
12902         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
12903
12904 2017-01-10  Tom Tromey  <tom@tromey.com>
12905
12906         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
12907         (bpfinishpy_handle_exit): Use gdbpy_enter.
12908
12909 2017-01-10  Tom Tromey  <tom@tromey.com>
12910
12911         * python/py-cmd.c (cmdpy_destroyer)
12912         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
12913         gdbpy_enter.
12914
12915 2017-01-10  Tom Tromey  <tom@tromey.com>
12916
12917         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
12918         gdbpy_enter.
12919         (gdbpy_breakpoint_has_cond): Likewise.
12920
12921 2017-01-10  Tom Tromey  <tom@tromey.com>
12922
12923         * python/python.c (gdbpy_enter): New constructor.
12924         (~gdbpy_enter): New destructor.
12925         (restore_python_env, ensure_python_env): Rewrite.
12926         * python/python-internal.h (gdbpy_enter): New class.
12927
12928 2017-01-10  Tom Tromey  <tom@tromey.com>
12929
12930         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
12931
12932 2017-01-10  Tom Tromey  <tom@tromey.com>
12933
12934         * python/py-value.c (value_has_field, get_field_flag)
12935         (get_field_type, valpy_getitem, convert_value_from_python): Use
12936         gdbpy_ref.
12937
12938 2017-01-10  Tom Tromey  <tom@tromey.com>
12939
12940         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
12941         gdbpy_ref.
12942
12943 2017-01-10  Tom Tromey  <tom@tromey.com>
12944
12945         * python/py-prettyprint.c (search_pp_list)
12946         (find_pretty_printer_from_objfiles)
12947         (find_pretty_printer_from_progspace)
12948         (find_pretty_printer_from_gdb, find_pretty_printer)
12949         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
12950         gdbpy_ref.
12951
12952 2017-01-10  Tom Tromey  <tom@tromey.com>
12953
12954         * python/py-param.c (call_doc_function): Use gdbpy_ref.
12955
12956 2017-01-10  Tom Tromey  <tom@tromey.com>
12957
12958         * python/py-linetable.c (build_line_table_tuple_from_pcs)
12959         (ltpy_get_all_source_lines): Use gdbpy_ref.
12960
12961 2017-01-10  Tom Tromey  <tom@tromey.com>
12962
12963         * python/py-framefilter.c (extract_sym, extract_value)
12964         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
12965         gdbpy_ref.
12966
12967 2017-01-10  Tom Tromey  <tom@tromey.com>
12968
12969         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
12970
12971 2017-01-10  Tom Tromey  <tom@tromey.com>
12972
12973         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
12974
12975 2017-01-10  Tom Tromey  <tom@tromey.com>
12976
12977         * python/py-function.c (convert_values_to_python, fnpy_init): Use
12978         gdbpy_ref.
12979
12980 2017-01-10  Tom Tromey  <tom@tromey.com>
12981
12982         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
12983
12984 2017-01-10  Tom Tromey  <tom@tromey.com>
12985
12986         * python/py-type.c (convert_field, make_fielditem, typy_fields)
12987         (typy_range): Use gdbpy_ref.
12988
12989 2017-01-10  Tom Tromey  <tom@tromey.com>
12990
12991         * python/py-threadevent.c (create_thread_event_object): Use
12992         gdbpy_ref.
12993         * python/py-stopevent.c (create_stop_event_object): Simplify.
12994         (emit_stop_event): Use gdbpy_ref.
12995         * python/py-signalevent.c (create_signal_event_object): Use
12996         gdbpy_ref.
12997         * python/py-newobjfileevent.c (create_new_objfile_event_object)
12998         (emit_new_objfile_event, create_clear_objfiles_event_object)
12999         (emit_clear_objfiles_event): Use gdbpy_ref.
13000         * python/py-infevents.c (create_inferior_call_event_object)
13001         (create_register_changed_event_object)
13002         (create_memory_changed_event_object, emit_inferior_call_event)
13003         (emit_memory_changed_event, emit_register_changed_event): Use
13004         gdbpy_ref.
13005         * python/py-exitedevent.c (create_exited_event_object)
13006         (emit_exited_event): Use gdbpy_ref.
13007         * python/py-event.h (evpy_emit_event): Remove
13008         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13009         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13010         * python/py-continueevent.c (emit_continue_event): Use
13011         gdbpy_ref.
13012         * python/py-breakpoint.c (gdbpy_breakpoint_created)
13013         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13014         gdbpy_ref.
13015         * python/py-bpevent.c (create_breakpoint_event_object): Use
13016         gdbpy_ref.
13017
13018 2017-01-10  Tom Tromey  <tom@tromey.com>
13019
13020         * python/py-ref.h: New file.
13021
13022 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13023
13024         * cli-out.c (cli_ui_out::do_redirect): Change return type to
13025         void.
13026         * cli-out.h (cli_ui_out::do_redirect): Likewise.
13027         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
13028         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
13029         * ui-out.c (ui_out::redirect): Likewise.
13030         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
13031         * cli/cli-logging.c (set_logging_redirect): Update call site of
13032         ui_out::redirect.
13033         (handle_redirections): Likewise.
13034         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
13035         * top.c (execute_command_to_string): Likewise.
13036         * utils.c (do_ui_out_redirect_pop): Likewise.
13037
13038 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
13039
13040         * stack.c (_initialize_stack): Update "frame" command help message.
13041
13042 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
13043
13044         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
13045
13046 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13047
13048         * x86-linux-nat.h: Include gdb_proc_service.h.
13049
13050 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13051
13052         * ser-base.h: Include serial.h.
13053
13054 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13055
13056         * ppc-linux-tdep.h: Include ppc-tdep.h.
13057
13058 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13059
13060         * nat/amd64-linux-siginfo.h: Include signal.h.
13061
13062 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13063
13064         * nat/aarch64-linux-hw-point.h: Include break-common.h.
13065
13066 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13067
13068         * mi/mi-parse.h: Include mi-cmds.h.
13069
13070 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13071
13072         * inf-loop.c: Don't include "target.h".
13073         * inf-loop.h: Include it here.
13074
13075 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13076
13077         * dfp.h: Include "dboulest.h" and "expression.h".
13078
13079 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13080
13081         * ax-gdb.h: Include "ax.h".
13082
13083 2017-01-06  Yao Qi  <yao.qi@linaro.org>
13084
13085         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
13086         with nat/gdb_ptrace.h.
13087
13088 2017-01-05  Yao Qi  <yao.qi@linaro.org>
13089
13090         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
13091         new line.
13092         (mips64_fbsd_sigframe_init): Likewise.
13093
13094 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13095
13096         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
13097         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
13098
13099 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13100
13101         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
13102         * NEWS: Mention new FreeBSD/mips native configuration.
13103         * config/mips/fbsd.mh: New file.
13104         * configure.host: Add mips*-*-freebsd*.
13105         * mips-fbsd-nat.c: New file.
13106
13107 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
13108
13109         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
13110         (ALLDEPFILES): Add mips-fbsd-tdep.c.
13111         * NEWS: Mention new FreeBSD/mips target.
13112         * configure.tgt: Add mips*-*-freebsd*.
13113         * mips-fbsd-tdep.c: New file.
13114         * mips-fbsd-tdep.h: New file.
13115
13116 2017-01-04  Yao Qi  <yao.qi@linaro.org>
13117
13118         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
13119         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
13120
13121 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13122
13123         Update copyright year range in all GDB files.
13124
13125 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
13126
13127         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
13128
13129 For older changes see ChangeLog-2016.
13130 \f
13131 Local Variables:
13132 mode: change-log
13133 left-margin: 8
13134 fill-column: 74
13135 version-control: never
13136 coding: utf-8
13137 End: