Remove make_cleanup_ui_out_table_begin_end
[external/binutils.git] / gdb / ChangeLog
1 2017-09-09  Tom Tromey  <tom@tromey.com>
2
3         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4         (class ui_out_emit_table): Update comment.
5         * ui-out.c (do_cleanup_table_end)
6         (make_cleanup_ui_out_table_begin_end): Remove.
7         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
8         (info_spu_dma_cmdlist): Likewise.
9         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
10         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
11         ui_out_emit_table.
12
13 2017-09-09  Tom Tromey  <tom@tromey.com>
14
15         * thread.c (print_thread_info_1): Use ui_out_emit_table,
16         ui_out_emit_list, gdb::optional.
17
18 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
19
20         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
21         prototype.
22         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
23         prototype.
24         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
25         prototype.
26         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
27         * ada-exp.y: Remove _initialize_ada_exp prototype.
28         * ada-lang.c: Remove _initialize_ada_language prototype.
29         * ada-tasks.c: Remove _initialize_tasks prototype.
30         * addrmap.c: Remove _initialize_addrmap prototype.
31         * agent.c: Remove _initialize_agent prototype.
32         * aix-thread.c: Remove _initialize_aix_thread prototype.
33         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
34         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
35         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
36         prototype.
37         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
38         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
39         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
40         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
41         prototype.
42         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
43         prototype.
44         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
45         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
46         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
47         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
48         prototype.
49         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
50         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
51         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
52         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
53         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
54         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
55         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
56         prototype.
57         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
58         prototype.
59         * annotate.c: Remove _initialize_annotate prototype.
60         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
61         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
62         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
63         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
64         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
65         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
66         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
67         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
68         prototype.
69         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
70         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
71         * auto-load.c: Remove _initialize_auto_load prototype.
72         * auxv.c: Remove _initialize_auxv prototype.
73         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
74         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
75         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
76         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
77         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
78         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
79         prototype.
80         * break-catch-throw.c: Remove _initialize_break_catch_throw
81         prototype.
82         * breakpoint.c: Remove _initialize_breakpoint prototype.
83         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
84         * btrace.c: Remove _initialize_btrace prototype.
85         * charset.c: Remove _initialize_charset prototype.
86         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
87         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
88         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
89         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
90         * cli/cli-script.c: Remove _initialize_cli_script prototype.
91         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
92         * coffread.c: Remove _initialize_coffread prototype.
93         * compile/compile.c: Remove _initialize_compile prototype.
94         * complaints.c: Remove _initialize_complaints prototype.
95         * completer.c: Remove _initialize_completer prototype.
96         * copying.awk: Remove _initialize_copying prototype.
97         * copying.c: Regenerate.
98         * core-regset.c: Remove _initialize_core_regset prototype.
99         * corefile.c: Remove _initialize_core prototype.
100         * corelow.c: Remove _initialize_corelow prototype.
101         * cp-abi.c: Remove _initialize_cp_abi prototype.
102         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
103         * cp-support.c: Remove _initialize_cp_support prototype.
104         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
105         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
106         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
107         * ctf.c: Remove _initialize_ctf prototype.
108         * d-lang.c: Remove _initialize_d_language prototype.
109         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
110         prototype.
111         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
112         * dbxread.c: Remove _initialize_dbxread prototype.
113         * dcache.c: Remove _initialize_dcache prototype.
114         * demangle.c: Remove _initialize_demangler prototype.
115         * disasm-selftests.c: Remove _initialize_disasm_selftests
116         prototype.
117         * disasm.c: Remove _initialize_disasm prototype.
118         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
119         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
120         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
121         prototype.
122         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
123         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
124         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
125         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
126         * elfread.c: Remove _initialize_elfread prototype.
127         * exec.c: Remove _initialize_exec prototype.
128         * extension.c: Remove _initialize_extension prototype.
129         * f-lang.c: Remove _initialize_f_language prototype.
130         * f-valprint.c: Remove _initialize_f_valprint prototype.
131         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
132         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
133         * filesystem.c: Remove _initialize_filesystem prototype.
134         * findcmd.c: Remove _initialize_mem_search prototype.
135         * fork-child.c: Remove _initialize_fork_child prototype.
136         * frame-base.c: Remove _initialize_frame_base prototype.
137         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
138         * frame.c: Remove _initialize_frame prototype.
139         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
140         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
141         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
142         * gcore.c: Remove _initialize_gcore prototype.
143         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
144         * gdbarch.c: Regenerate.
145         * gdbarch.sh: Remove _initialize_gdbarch prototype.
146         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
147         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
148         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
149         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
150         * go-lang.c: Remove _initialize_go_language prototype.
151         * go32-nat.c: Remove _initialize_go32_nat prototype.
152         * guile/guile.c: Remove _initialize_guile prototype.
153         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
154         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
155         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
156         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
157         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
158         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
159         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
160         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
161         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
162         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
163         prototype.
164         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
165         prototype.
166         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
167         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
168         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
169         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
170         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
171         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
172         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
173         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
174         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
175         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
176         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
177         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
178         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
179         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
180         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
181         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
182         prototype.
183         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
184         prototype.
185         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
186         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
187         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
188         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
189         * infcall.c: Remove _initialize_infcall prototype.
190         * infcmd.c: Remove _initialize_infcmd prototype.
191         * inferior.c: Remove _initialize_inferiors prototype.
192         * inflow.c: Remove _initialize_inflow prototype.
193         * infrun.c: Remove _initialize_infrun prototype.
194         * interps.c: Remove _initialize_interpreter prototype.
195         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
196         * jit.c: Remove _initialize_jit prototype.
197         * language.c: Remove _initialize_language prototype.
198         * linux-fork.c: Remove _initialize_linux_fork prototype.
199         * linux-nat.c: Remove _initialize_linux_nat prototype.
200         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
201         * linux-thread-db.c: Remove _initialize_thread_db prototype.
202         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
203         * m2-lang.c: Remove _initialize_m2_language prototype.
204         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
205         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
206         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
207         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
208         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
209         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
210         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
211         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
212         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
213         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
214         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
215         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
216         * machoread.c: Remove _initialize_machoread prototype.
217         * macrocmd.c: Remove _initialize_macrocmd prototype.
218         * macroscope.c: Remove _initialize_macroscope prototype.
219         * maint.c: Remove _initialize_maint_cmds prototype.
220         * mdebugread.c: Remove _initialize_mdebugread prototype.
221         * memattr.c: Remove _initialize_mem prototype.
222         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
223         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
224         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
225         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
226         * mi/mi-main.c: Remove _initialize_mi_main prototype.
227         * microblaze-linux-tdep.c: Remove
228         _initialize_microblaze_linux_tdep prototype.
229         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
230         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
231         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
232         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
233         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
234         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
235         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
236         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
237         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
238         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
239         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
240         prototype.
241         * mipsread.c: Remove _initialize_mipsread prototype.
242         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
243         prototype.
244         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
245         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
246         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
247         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
248         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
249         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
250         prototype.
251         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
252         * nto-procfs.c: Remove _initialize_procfs prototype.
253         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
254         * objc-lang.c: Remove _initialize_objc_language prototype.
255         * objfiles.c: Remove _initialize_objfiles prototype.
256         * observer.c: Remove observer_test_first_notification_function,
257         observer_test_second_notification_function,
258         observer_test_third_notification_function, and
259         _initialize_observer prototypes.
260         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
261         * osabi.c: Remove _initialize_gdb_osabi prototype.
262         * osdata.c: Remove _initialize_osdata prototype.
263         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
264         * parse.c: Remove _initialize_parse prototype.
265         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
266         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
267         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
268         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
269         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
270         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
271         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
272         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
273         * printcmd.c: Remove _initialize_printcmd prototype.
274         * probe.c: Remove _initialize_probe prototype.
275         * proc-api.c: Remove _initialize_proc_api prototype.
276         * proc-events.c: Remove _initialize_proc_events prototype.
277         * proc-service.c: Remove _initialize_proc_service prototype.
278         * procfs.c: Remove _initialize_procfs prototype.
279         * psymtab.c: Remove _initialize_psymtab prototype.
280         * python/python.c: Remove _initialize_python prototype.
281         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
282         * record-btrace.c: Remove _initialize_record_btrace prototype.
283         * record-full.c: Remove _initialize_record_full prototype.
284         * record.c: Remove _initialize_record prototype.
285         * regcache.c: Remove _initialize_regcache prototype.
286         * reggroups.c: Remove _initialize_reggroup prototype.
287         * remote-notif.c: Remove _initialize_notif prototype.
288         * remote-sim.c: Remove _initialize_remote_sim prototype.
289         * remote.c: Remove _initialize_remote prototype.
290         * reverse.c: Remove _initialize_reverse prototype.
291         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
292         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
293         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
294         prototype.
295         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
296         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
297         * rust-exp.y: Remove _initialize_rust_exp prototype.
298         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
299         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
300         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
301         * score-tdep.c: Remove _initialize_score_tdep prototype.
302         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
303         prototype.
304         * ser-go32.c: Remove _initialize_ser_dos prototype.
305         * ser-mingw.c: Remove _initialize_ser_windows prototype.
306         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
307         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
308         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
309         * serial.c: Remove _initialize_serial prototype.
310         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
311         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
312         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
313         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
314         * skip.c: Remove _initialize_step_skip prototype.
315         * sol-thread.c: Remove _initialize_sol_thread prototype.
316         * solib-aix.c: Remove _initialize_solib_aix prototype.
317         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
318         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
319         * solib-frv.c: Remove _initialize_frv_solib prototype.
320         * solib-spu.c: Remove _initialize_spu_solib prototype.
321         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
322         * solib-target.c: Remove _initialize_solib_target prototype.
323         * solib.c: Remove _initialize_solib prototype.
324         * source.c: Remove _initialize_source prototype.
325         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
326         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
327         prototype.
328         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
329         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
330         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
331         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
332         prototype.
333         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
334         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
335         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
336         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
337         prototype.
338         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
339         prototype.
340         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
341         prototype.
342         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
343         prototype.
344         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
345         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
346         prototype.
347         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
348         prototype.
349         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
350         prototype.
351         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
352         prototype.
353         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
354         prototype.
355         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
356         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
357         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
358         * stabsread.c: Remove _initialize_stabsread prototype.
359         * stack.c: Remove _initialize_stack prototype.
360         * stap-probe.c: Remove _initialize_stap_probe prototype.
361         * std-regs.c: Remove _initialize_frame_reg prototype.
362         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
363         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
364         * symfile.c: Remove _initialize_symfile prototype.
365         * symmisc.c: Remove _initialize_symmisc prototype.
366         * symtab.c: Remove _initialize_symtab prototype.
367         * target-dcache.c: Remove _initialize_target_dcache prototype.
368         * target-descriptions.c: Remove _initialize_target_descriptions
369         prototype.
370         * thread.c: Remove _initialize_thread prototype.
371         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
372         prototype.
373         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
374         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
375         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
376         prototype.
377         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
378         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
379         * tracefile.c: Remove _initialize_tracefile prototype.
380         * tracepoint.c: Remove _initialize_tracepoint prototype.
381         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
382         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
383         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
384         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
385         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
386         * tui/tui-win.c: Remove _initialize_tui_win prototype.
387         * tui/tui.c: Remove _initialize_tui prototype.
388         * typeprint.c: Remove _initialize_typeprint prototype.
389         * user-regs.c: Remove _initialize_user_regs prototype.
390         * utils.c: Remove _initialize_utils prototype.
391         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
392         * valarith.c: Remove _initialize_valarith prototype.
393         * valops.c: Remove _initialize_valops prototype.
394         * valprint.c: Remove _initialize_valprint prototype.
395         * value.c: Remove _initialize_values prototype.
396         * varobj.c: Remove _initialize_varobj prototype.
397         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
398         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
399         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
400         * windows-nat.c: Remove _initialize_windows_nat,
401         _initialize_check_for_gdb_ini, and _initialize_loadable
402         prototypes.
403         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
404         * xcoffread.c: Remove _initialize_xcoffread prototype.
405         * xml-support.c: Remove _initialize_xml_support prototype.
406         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
407         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
408         prototype.
409         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
410         prototype.
411         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
412
413 2017-09-08  Keith Seitz  <keiths@redhat.com>
414
415         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
416         field.
417
418 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
419
420         * f-valprint.c (f_val_print): Remove check for one byte
421         sized integers. Remove printing of character type.
422
423 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
424             Christoph Weinmann  <christoph.t.weinmann@intel.com>
425             Bernhard Heckel  <bernhard.heckel@intel.com>
426
427         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
428         to maintain proper indentation when printing pointers/refs.
429
430 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
431
432         GDB 8.0.1 released.
433
434 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
435
436         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
437
438 2017-09-05  Tom Tromey  <tom@tromey.com>
439
440         * parse.c (funcall_chain): Now a std::vector.
441         (start_arglist, end_arglist): Simplify.
442         (free_funcalls): Remove.
443         (parse_exp_in_context_1): Remove cleanup.
444
445 2017-09-05  Tom Tromey  <tom@tromey.com>
446
447         * go-exp.y (go_parse): Don't create a cleanup.
448
449 2017-09-05  Tom Tromey  <tom@tromey.com>
450
451         * d-exp.y (PrimaryExpression): Use std::string.
452         (d_parse): Don't create a cleanup.
453
454 2017-09-05  Tom Tromey  <tom@tromey.com>
455
456         * utils.c (do_clear_parser_state): Remove.
457         (make_cleanup_clear_parser_state): Remove.
458         * p-exp.y (pascal_parse): Use scoped_restore.
459         * m2-exp.y (m2_parse): Use scoped_restore.
460         * f-exp.y (f_parse): Use scoped_restore.
461         * d-exp.y (d_parse): Use scoped_restore.
462         * c-exp.y (c_parse): Use scoped_restore.
463         * ada-exp.y (ada_parse): Use scoped_restore.
464         * utils.h (make_cleanup_clear_parser_state): Remove.
465
466 2017-09-06  Keith Seitz  <keiths@redhat.com>
467
468         * dwarf2read.c (dw2_linkage_name_attr): New function.
469         (dw2_linkage_name): New function.
470         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
471         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
472         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
473
474 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
475
476         * config/djgpp/djconfig.sh: Correct shell portability issue.
477
478 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
479
480         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
481
482 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
483
484         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
485         * NEWS: Mention new FreeBSD/mips native configuration.
486         * configure.host: Add aarch64*-*-freebsd*.
487         * configure.nat: Likewise.
488         * aarch64-fbsd-nat.c: New file.
489
490 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
491
492         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
493         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
494         * NEWS: Mention new FreeBSD/aarch64 target.
495         * configure.tgt: Add aarch64*-*-freebsd*.
496         * aarch64-fbsd-tdep.c: New file.
497         * aarch64-fbsd-tdep.h: New file.
498
499 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
500
501         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
502
503 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
504
505         * parse.c (find_minsym_type_and_address): Don't relocate addresses
506         of TLS symbols.
507
508 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
509
510         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
511         call.
512
513 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
514
515         * infrun.c (follow_exec): Call add_thread after
516         target_find_description.
517
518 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
519
520         * infrun.c (handle_inferior_event_1): When exec'ing, read
521         stop_pc after follow_exec.
522
523 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
524
525         * remote.c (process_g_packet): Update error message.
526
527 2017-09-05  Yao Qi  <yao.qi@linaro.org>
528
529         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
530         targets.
531
532 2017-09-05  Pedro Alves  <palves@redhat.com>
533
534         * eval.c (eval_call, evaluate_funcall): New functions, factored
535         out from ...
536         (evaluate_subexp_standard): ... this.
537
538 2017-09-05  Yao Qi  <yao.qi@linaro.org>
539
540         * amd64-tdep.c (amd64_target_description): Create target
541         descriptions.
542         (_initialize_amd64_tdep): Don't call functions
543         initialize_tdesc_amd64_*.  Add self tests.
544         * arch/amd64.c (amd64_create_target_description): Add parameter
545         is_linux.  Call set_tdesc_osabi if is_linux is true.
546         * arch/amd64.h (amd64_create_target_description): Update the
547         declaration.
548         * arch/i386.c (i386_create_target_description): Add parameter
549         is_linux.  Call set_tdesc_osabi if is_linux is true.
550         * arch/i386.h (i386_create_target_description): Update
551         declaration.
552         * configure.tgt: Add i386.o to gdb_target_obs.
553         * features/Makefile (XMLTOC): Remove i386/*.xml.
554         * features/i386/amd64-avx-avx512.c: Remove.
555         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
556         * features/i386/amd64-avx-mpx.c: Remove.
557         * features/i386/amd64-avx.c: Remove.
558         * features/i386/amd64-mpx.c: Remove.
559         * features/i386/amd64.c: Remove.
560         * features/i386/i386-avx-avx512.c: Remove.
561         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
562         * features/i386/i386-avx-mpx.c: Remove.
563         * features/i386/i386-avx.c: Remove.
564         * features/i386/i386-mmx.c: Remove.
565         * features/i386/i386-mpx.c: Remove.
566         * features/i386/i386.c: Remove.
567         * i386-tdep.c: Don't include features/i386/i386*.c., include
568         target-descriptions.h and arch/i386.h.
569         (i386_target_description): Create target descriptions.
570         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
571         functions.  Do self tests.
572
573 2017-09-05  Yao Qi  <yao.qi@linaro.org>
574
575         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
576         * features/i386/amd64-avx-avx512-linux.c: Removed.
577         * features/i386/amd64-avx-linux.c: Removed.
578         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
579         * features/i386/amd64-avx-mpx-linux.c: Removed.
580         * features/i386/amd64-linux.c: Removed.
581         * features/i386/amd64-mpx-linux.c: Removed.
582         * features/i386/x32-avx-avx512-linux.c: Removed.
583         * features/i386/x32-avx-linux.c: Removed.
584         * features/i386/x32-linux.c: Removed.
585
586 2017-09-05  Yao Qi  <yao.qi@linaro.org>
587
588         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
589         features/i386/*.c.
590         (amd64_linux_read_description): Call
591         amd64_create_target_description.
592         * arch/amd64.c: New file.
593         * arch/amd64.h: New file.
594         * configure.tgt (x86_64-*-linux*): Append amd64.o.
595         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
596
597 2017-09-05  Yao Qi  <yao.qi@linaro.org>
598
599         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
600         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
601         (amd64_linux_read_description): Create target descriptions.
602         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
603         functions.  Add unit tests.
604         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
605         x32-core.xml.
606         * features/i386/64bit-avx.c: Generated.
607         * features/i386/64bit-avx512.c: Generated.
608         * features/i386/64bit-core.c: Generated.
609         * features/i386/64bit-linux.c: Generated.
610         * features/i386/64bit-mpx.c: Generated.
611         * features/i386/64bit-pkeys.c: Generated.
612         * features/i386/64bit-segments.c: Generated.
613         * features/i386/64bit-sse.c: Generated.
614         * features/i386/x32-core.c: Generated.
615         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
616         c files for amd64-linux and x32-linux.
617
618 2017-09-05  Yao Qi  <yao.qi@linaro.org>
619
620         * amd64-linux-tdep.c (amd64_linux_read_description): New
621         function.
622         (amd64_linux_core_read_description): Call
623         amd64_linux_read_description.
624         (amd64_linux_init_abi): Likewise.
625         (amd64_x32_linux_init_abi): Likewise.
626         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
627         * x86-linux-nat.c (x86_linux_read_description): Call
628         amd64_linux_read_description.
629
630 2017-09-05  Yao Qi  <yao.qi@linaro.org>
631
632         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
633         comments.
634
635 2017-09-05  Yao Qi  <yao.qi@linaro.org>
636
637         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
638         * features/i386/i386-avx-avx512-linux.c: Remove.
639         * features/i386/i386-avx-linux.c: Remove.
640         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
641         * features/i386/i386-avx-mpx-linux.c: Remove.
642         * features/i386/i386-linux.c: Remove.
643         * features/i386/i386-mmx-linux.c: Remove.
644         * features/i386/i386-mpx-linux.c: Remove.
645
646 2017-09-05  Yao Qi  <yao.qi@linaro.org>
647
648         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
649         (SFILES): Add arch/i386.c.
650         (HFILES_NO_SRCDIR): Add arch/i386.h.
651         * arch/i386.c: New file.
652         * arch/i386.h: New file.
653         * arch/tdesc.h (allocate_target_description): Declare.
654         (set_tdesc_architecture): Declare.
655         (set_tdesc_osabi): Declare.
656         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
657         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
658         include arch/i386.h.
659         (i386_linux_read_description): Remove code and call
660         i386_create_target_description.
661         (set_tdesc_architecture): New function.
662         (set_tdesc_osabi): New function.
663         * target-descriptions.h (allocate_target_description): Remove.
664
665 2017-09-05  Yao Qi  <yao.qi@linaro.org>
666
667         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
668         * target-descriptions.c (tdesc_create_feature): Likewise, and
669         adjust code.
670         * features/i386/32bit-avx.c: Re-generated.
671         * features/i386/32bit-avx512.c: Re-generated.
672         * features/i386/32bit-core.c: Re-generated.
673         * features/i386/32bit-linux.c: Re-generated.
674         * features/i386/32bit-mpx.c: Re-generated.
675         * features/i386/32bit-pkeys.c: Re-generated.
676         * features/i386/32bit-sse.c: Re-generated.
677
678 2017-09-05  Yao Qi  <yao.qi@linaro.org>
679
680         * regformats/regdef.h (struct reg): Override operator == and !=.
681
682 2017-09-05  Yao Qi  <yao.qi@linaro.org>
683
684         * arch/tdesc.h: New file.
685         * regformats/regdat.sh: Generate code using tdesc_create_reg.
686         * target-descriptions.c: Update comments.
687         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
688         declarations.
689         * features/i386/32bit-avx.c: Re-generated.
690         * features/i386/32bit-avx512.c: Re-generated.
691         * features/i386/32bit-core.c: Re-generated.
692         * features/i386/32bit-linux.c: Re-generated.
693         * features/i386/32bit-mpx.c: Re-generated.
694         * features/i386/32bit-pkeys.c: Re-generated.
695         * features/i386/32bit-sse.c: Re-generated.
696
697 2017-09-05  Yao Qi  <yao.qi@linaro.org>
698
699         * regformats/regdat.sh: Update generated code.
700
701 2017-09-05  Yao Qi  <yao.qi@linaro.org>
702
703         * regformats/regdat.sh: Adjust code order.
704
705 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
706
707         * expprint.c (dump_subexp_body_standard): Use constant format
708         string in fprintf_filtered call.
709
710 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
711
712         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
713         NetBSD/i386.
714         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
715
716 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
717
718         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
719
720 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
721
722         * bsd-kvm.o: Define _KMEMUSER.
723         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
724         * configure: Regenerate.
725
726 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
727
728         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
729         * i386-fbsd-nat.c: Likewise.
730
731 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
732
733         * unittests/array-view-selftests.c: Add include of <array>.
734
735 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
736
737         * spu-tdep.c (flush_ea_cache): Add missing argument to
738         call_function_by_hand.
739
740 2017-09-04  Pedro Alves  <palves@redhat.com>
741
742         * NEWS (Safer support for debugging with no debug info): New.
743
744 2017-09-04  Pedro Alves  <palves@redhat.com>
745
746         * c-exp.y (function_method, function_method_void): Add current
747         instance flags to TYPE_INSTANCE.
748         * dwarf2read.c (check_modifier): New.
749         (compute_delayed_physnames): Assert that only C++ adds delayed
750         physnames.  Mark fn_fields as const/volatile depending on
751         physname.
752         * eval.c (make_params): New type_instance_flags parameter.  Use
753         it as the new type's instance flags.
754         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
755         flags element and pass it to make_params.
756         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
757         instance flags element.
758         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
759         * gdbtypes.h: Include "enum-flags.h".
760         (type_instance_flags): New enum-flags type.
761         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
762         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
763         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
764         (follow_type_instance_flags): New function.
765         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
766         * parser-defs.h (follow_type_instance_flags): Declare.
767         * valops.c (value_struct_elt_for_reference): const/volatile must
768         match too.
769
770 2017-09-04  Pedro Alves  <palves@redhat.com>
771
772         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
773         function/method scopes; lookup the nested name as a function local
774         static variable.
775
776 2017-09-04  Pedro Alves  <palves@redhat.com>
777
778         (%type <voidval>): Add function_method.
779         * c-exp.y (exp): New production for calls with no arguments.
780         (function_method, function_method_void_or_typelist): New
781         productions.
782         (exp): New production for "method()::static_var".
783         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
784         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
785         Handle OP_FUNC_STATIC_VAR.
786         * parse.c (operator_length_standard):
787         Handle OP_FUNC_STATIC_VAR.
788
789 2017-09-04  Pedro Alves  <palves@redhat.com>
790
791         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
792         handling.
793         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
794         Ditto.
795         * parse.c (operator_length_standard, operator_check_standard):
796         Ditto.
797         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
798
799 2017-09-04  Pedro Alves  <palves@redhat.com>
800
801         * ax-gdb.c: Include "typeprint.h".
802         (gen_expr_for_cast): New function.
803         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
804         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
805         type is unknown.
806         * dwarf2read.c (new_symbol_full): Fallback to int instead of
807         nodebug_data_symbol.
808         * eval.c: Include "typeprint.h".
809         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
810         Error out if symbol has unknown type.
811         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
812         evaluate_subexp_for_cast.
813         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
814         OP_VAR_MSYM_VALUE.
815         (evaluate_subexp_for_cast): New function.
816         * gdbtypes.c (init_nodebug_var_type): New function.
817         (objfile_type): Use it to initialize types of variables with no
818         debug info.
819         * typeprint.c (error_unknown_type): New.
820         * typeprint.h (error_unknown_type): New declaration.
821         * compile/compile-c-types.c (convert_type_basic): Handle
822         TYPE_CODE_ERROR; warn and fallback to int for variables with
823         unknown type.
824
825 2017-09-04  Pedro Alves  <palves@redhat.com>
826
827         * eval.c (evaluate_var_value): New function, factored out from ...
828         (evaluate_subexp_standard): ... here.
829
830 2017-09-04  Pedro Alves  <palves@redhat.com>
831
832         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
833         Remove useless assignments to 'op'.
834
835 2017-09-04  Pedro Alves  <palves@redhat.com>
836
837         * eval.c (eval_skip_value): New function.
838         (evaluate_subexp_standard): Use it.
839
840 2017-09-04  Pedro Alves  <palves@redhat.com>
841
842         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
843         function name from symbol/minsym and pass it to
844         error_call_unknown_return_type.
845
846 2017-09-04  Pedro Alves  <palves@redhat.com>
847
848         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
849         * ax-gdb.c (gen_msym_var_ref): New function.
850         (gen_expr): Handle OP_VAR_MSYM_VALUE.
851         * eval.c (evaluate_var_msym_value): New function.
852         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
853         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
854         to call_function_by_hand.
855         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
856         Handle OP_VAR_MSYM_VALUE.
857         (union exp_element) <msymbol>: New field.
858         * minsyms.h (struct type): Forward declare.
859         (find_minsym_type_and_address): Declare.
860         * parse.c (write_exp_elt_msym): New function.
861         (write_exp_msymbol): Delete, refactored as ...
862         (find_minsym_type_and_address): ... this new function.
863         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
864         (operator_length_standard, operator_check_standard): Handle
865         OP_VAR_MSYM_VALUE.
866         * std-operator.def (OP_VAR_MSYM_VALUE): New.
867
868 2017-09-04  Pedro Alves  <palves@redhat.com>
869
870         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
871         TYPE_GNU_IFUNC specially here.  Throw error if return type is
872         unknown.
873         * ada-typeprint.c (print_func_type): Handle functions with unknown
874         return type.
875         * c-typeprint.c (c_type_print_base): Handle functions and methods
876         with unknown return type.
877         * compile/compile-c-symbols.c (convert_symbol_bmsym)
878         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
879         * compile/compile-c-types.c: Include "objfiles.h".
880         (convert_func): For functions with unknown return type, warn and
881         default to int.
882         * compile/compile-object-run.c (compile_object_run): Adjust call
883         to call_function_by_hand_dummy.
884         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
885         call_function_by_hand.
886         * eval.c (evaluate_subexp_standard): Adjust calls to
887         call_function_by_hand.  Handle functions and methods with unknown
888         return type.  Pass expect_type to call_function_by_hand.
889         * f-typeprint.c (f_type_print_base): Handle functions with unknown
890         return type.
891         * gcore.c (call_target_sbrk): Adjust call to
892         call_function_by_hand.
893         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
894         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
895         an integer address type instead of nodebug.
896         * guile/scm-value.c (gdbscm_value_call): Adjust call to
897         call_function_by_hand.
898         * infcall.c (error_call_unknown_return_type): New function.
899         (call_function_by_hand): New "default_return_type" parameter.
900         Pass it down.
901         (call_function_by_hand_dummy): New "default_return_type"
902         parameter.  Use it instead of defaulting to int.  If there's no
903         default and the return type is unknown, throw an error.  If
904         there's a default return type, and the called function has no
905         debug info, then assume the function is prototyped.
906         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
907         New "default_return_type" parameter.
908         (error_call_unknown_return_type): New declaration.
909         * linux-fork.c (call_lseek): Cast return type of lseek.
910         (inferior_call_waitpid, checkpoint_command): Adjust calls to
911         call_function_by_hand.
912         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
913         calls to call_function_by_hand.
914         * m2-typeprint.c (m2_procedure): Handle functions with unknown
915         return type.
916         * objc-lang.c (lookup_objc_class, lookup_child_selector)
917         (value_nsstring, print_object_command): Adjust calls to
918         call_function_by_hand.
919         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
920         functions with unknown return type.
921         (pascal_type_print_func_varspec_suffix): New function.
922         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
923         TYPE_CODE_METHOD>: Use it.
924         * python/py-value.c (valpy_call): Adjust call to
925         call_function_by_hand.
926         * rust-lang.c (rust_evaluate_funcall): Adjust call to
927         call_function_by_hand.
928         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
929         call_function_by_hand.
930         * valops.c (value_allocate_space_in_inferior): Adjust call to
931         call_function_by_hand.
932         * typeprint.c (type_print_unknown_return_type): New function.
933         * typeprint.h (type_print_unknown_return_type): New declaration.
934
935 2017-09-04  Pedro Alves  <palves@redhat.com>
936
937         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
938         types with more than one parameter as prototyped.
939
940 2017-09-04  Pedro Alves  <palves@redhat.com>
941
942         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
943         (disassemble_command): Use gdb_disassembly_flags instead of bare
944         int.
945         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
946         (dump_insns, do_mixed_source_and_assembly_deprecated)
947         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
948         Use gdb_disassembly_flags instead of bare int.
949         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
950         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
951         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
952         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
953         (enum gdb_disassembly_flag): ... values of this new enumeration.
954         (gdb_disassembly_flags): Define.
955         (gdb_disassembly)
956         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
957         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
958         gdb_disassembly_flags instead of bare int.
959         * record-btrace.c (btrace_insn_history)
960         (record_btrace_insn_history, record_btrace_insn_history_range)
961         (record_btrace_insn_history_from): Use gdb_disassembly_flags
962         instead of bare int.
963         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
964         Use gdb_disassembly_flags instead of bare int.
965         * target-debug.h (target_debug_print_gdb_disassembly_flags):
966         Define.
967         * target-delegates.c: Regenerate.
968         * target.c (target_insn_history, target_insn_history_from)
969         (target_insn_history_range): Use gdb_disassembly_flags instead of
970         bare int.
971         * target.h: Include "disasm.h".
972         (struct target_ops) <to_insn_history, to_insn_history_from,
973         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
974         int.
975         (target_insn_history, target_insn_history_from)
976         (target_insn_history_range): Use gdb_disassembly_flags instead of
977         bare int.
978
979 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
980
981         * cli/cli-script.c (build_command_line): For if/while commands,
982         check whether args is empty.
983
984 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
985
986         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
987         (enum command_control_type): Likewise.
988         (struct command_line): Likewise.
989         (free_command_lines): Likewise.
990         (struct command_lines_deleter): Likewise.
991         (command_line_up): Likewise.
992         (read_command_lines): Likewise.
993         (read_command_lines_1): Likewise.
994         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
995         (enum command_control_type): Likewise.
996         (struct command_line): Likewise.
997         (free_command_lines): Likewise.
998         (struct command_lines_deleter): Likewise.
999         (command_line_up): Likewise.
1000         (read_command_lines): Likewise.
1001         (read_command_lines_1): Likewise.
1002         * breakpoint.h: Include cli/cli-script.h.
1003         * extension-priv.h: Likewise.
1004         * gdbcmd.h: Likewise.
1005
1006 2017-09-04  Pedro Alves  <palves@redhat.com>
1007
1008         * ada-lang.c (is_known_support_routine): Move sal declaration to
1009         where it is initialized.
1010         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
1011         (parse_breakpoint_sals, decode_static_tracepoint_spec)
1012         (clear_command, update_static_tracepoint): Remove init_sal
1013         references.  Move declarations closer to initializations.
1014         * cli/cli-cmds.c (list_command): Move sal declarations closer to
1015         initializations.
1016         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
1017         references.  Move sal declarations closer to initializations.
1018         * frame.c (find_frame_sal): Return a symtab_and_line via function
1019         return instead of output parameter.  Remove init_sal references.
1020         * frame.h (find_frame_sal): Return a symtab_and_line via function
1021         return instead of output parameter.
1022         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
1023         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
1024         instead of memset.
1025         (gdbscm_find_pc_line): Remove init_sal reference.
1026         * infcall.c (call_function_by_hand_dummy): Remove init_sal
1027         references.  Move declarations closer to initializations.
1028         * infcmd.c (set_step_frame): Update.  Move declarations closer to
1029         initializations.
1030         (finish_backward): Remove init_sal references.  Move declarations
1031         closer to initializations.
1032         * infrun.c (process_event_stop_test, handle_step_into_function)
1033         (insert_hp_step_resume_breakpoint_at_frame)
1034         (insert_step_resume_breakpoint_at_caller): Likewise.
1035         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
1036         (symbol_to_sal): Likewise.
1037         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
1038         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
1039         to its initialization.
1040         * reverse.c (save_bookmark_command): Use new/delete.  Remove
1041         init_sal references.  Move declarations closer to initializations.
1042         * source.c (get_current_source_symtab_and_line): Remove brace
1043         initialization.
1044         (set_current_source_symtab_and_line): Now takes the sal by const
1045         reference.  Remove brace initialization.
1046         (line_info): Remove init_sal reference.
1047         * source.h (set_current_source_symtab_and_line): Now takes a
1048         symtab_and_line via const reference.
1049         * stack.c (set_current_sal_from_frame): Adjust.
1050         (print_frame_info): Adjust.
1051         (get_last_displayed_sal): Return the sal via function return
1052         instead of via output parameter.  Simplify.
1053         (frame_info): Adjust.
1054         * stack.h (get_last_displayed_sal): Return the sal via function
1055         return instead of via output parameter.
1056         * symtab.c (init_sal): Delete.
1057         (find_pc_sect_line): Remove init_sal references.  Move
1058         declarations closer to initializations.
1059         (find_function_start_sal): Remove init_sal references.  Move
1060         declarations closer to initializations.
1061         * symtab.h (struct symtab_and_line): In-class initialize all
1062         fields.
1063         * tracepoint.c (set_traceframe_context)
1064         (print_one_static_tracepoint_marker): Remove init_sal references.
1065         Move declarations closer to initializations.
1066         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
1067         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
1068         declarations closer to initializations.
1069         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
1070         init_sal references.  Adjust.
1071
1072 2017-09-04  Pedro Alves  <palves@redhat.com>
1073
1074         * ax-gdb.c (agent_command_1): Use range-for.
1075         * break-catch-throw.c (re_set_exception_catchpoint): Update.
1076         * breakpoint.c: Include "common/array-view.h".
1077         (init_breakpoint_sal, create_breakpoint_sal): Change sals
1078         parameter from struct symtabs_and_lines to
1079         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
1080         (breakpoint_sals_to_pc): Change sals parameter from struct
1081         symtabs_and_lines to std::vector reference.
1082         (check_fast_tracepoint_sals): Change sals parameter from struct
1083         symtabs_and_lines to std::array_view.  Use range-for.
1084         (decode_static_tracepoint_spec): Return a std::vector instead of
1085         symtabs_and_lines.  Update.
1086         (create_breakpoint): Update.
1087         (break_range_command, until_break_command, clear_command): Update.
1088         (base_breakpoint_decode_location, bkpt_decode_location)
1089         (bkpt_probe_create_sals_from_location)
1090         (bkpt_probe_decode_location, tracepoint_decode_location)
1091         (tracepoint_probe_decode_location)
1092         (strace_marker_create_sals_from_location): Return a std::vector
1093         instead of symtabs_and_lines.
1094         (strace_marker_create_breakpoints_sal): Update.
1095         (strace_marker_decode_location): Return a std::vector instead of
1096         symtabs_and_lines.  Update.
1097         (update_breakpoint_locations): Change struct symtabs_and_lines
1098         parameters to gdb::array_view.  Adjust.
1099         (location_to_sals): Return a std::vector instead of
1100         symtabs_and_lines.  Update.
1101         (breakpoint_re_set_default): Use std::vector instead of struct
1102         symtabs_and_lines.
1103         (decode_location_default): Return a std::vector instead of
1104         symtabs_and_lines.  Update.
1105         * breakpoint.h: Include "common/array-view.h".
1106         (struct breakpoint_ops) <decode_location>: Now returns a
1107         std::vector instead of returning a symtabs_and_lines via output
1108         parameter.
1109         (update_breakpoint_locations): Change sals parameters to use
1110         gdb::array_view.
1111         * cli/cli-cmds.c (edit_command, list_command): Update to use
1112         std::vector and gdb::array_view.
1113         (ambiguous_line_spec): Adjust to use gdb::array_view and
1114         range-for.
1115         (compare_symtabs): Rename to ...
1116         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
1117         const reference and adjust.
1118         (filter_sals): Rewrite using std::vector and standard algorithms.
1119         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
1120         (jump_command): Update to use std::vector.
1121         * linespec.c (struct linespec_state) <canonical_names>: Update
1122         comment.
1123         (add_sal_to_sals_basic): Delete.
1124         (add_sal_to_sals, filter_results, convert_results_to_lsals)
1125         (decode_line_2, create_sals_line_offset)
1126         (convert_address_location_to_sals, convert_linespec_to_sals)
1127         (convert_explicit_location_to_sals, parse_linespec)
1128         (event_location_to_sals, decode_line_full, decode_line_1)
1129         (decode_line_with_current_source)
1130         (decode_line_with_last_displayed, decode_objc)
1131         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
1132         (linespec_result::~linespec_result): Adjust to use std::vector
1133         instead of symtabs_and_lines.
1134         * linespec.h (linespec_sals::sals): Now a std::vector.
1135         (struct linespec_result): Use std::vector, bool, and in-class
1136         initialization.
1137         (decode_line_1, decode_line_with_current_source)
1138         (decode_line_with_last_displayed): Return std::vector.
1139         * macrocmd.c (info_macros_command): Use std::vector.
1140         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
1141         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
1142         std::vector.
1143         * probe.h (parse_probes): Return a std::vector.
1144         * python/python.c (gdbpy_decode_line): Use std::vector and
1145         gdb::array_view.
1146         * source.c (select_source_symtab, line_info): Use std::vector.
1147         * stack.c (func_command): Use std::vector.
1148         * symtab.h (struct symtabs_and_lines): Delete.
1149         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
1150
1151 2017-09-04  Pedro Alves  <palves@redhat.com>
1152
1153         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1154         unittests/array-view-selftests.c.
1155         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
1156         * common/array-view.h: New file.
1157         * unittests/array-view-selftests.c: New file.
1158
1159 2017-09-04  Pedro Alves  <palves@redhat.com>
1160
1161         * cli/cli-cmds.c (edit_command): Pass message to
1162         ambiguous_line_spec.
1163         (list_command): Pass message to ambiguous_line_spec.  Say
1164         "first"/"last" instead of "start" and "end" to be consistent with
1165         the manual.
1166         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
1167         them to print formatted message.
1168
1169 2017-09-04  Pedro Alves  <palves@redhat.com>
1170
1171         * btrace.c (ftrace_add_pt): Pass btrace_insn to
1172         ftrace_update_insns by reference instead of pointer.
1173
1174 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1175
1176         * i386-go32-tdep.c: Include x86-xstate.h.
1177         (i386_go32_init_abi): Call i386_target_description.
1178         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
1179         if xcr0 is X86_XSTATE_X87_MASK.
1180         * i386-tdep.h (tdesc_i386): Remove the declaration.
1181         (tdesc_i386_mmx): Likewise.
1182
1183 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1184
1185         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
1186         X86_XSTATE_SSE_MASK instead of 0.
1187
1188 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1189
1190         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
1191         i386_target_description.
1192         * i386-fbsd-nat.c (i386fbsd_read_description): Call
1193         i386_target_description.
1194         * i386-tdep.c (i386_gdbarch_init): Likewise.
1195
1196 2017-09-04  Yao Qi  <yao.qi@linaro.org>
1197
1198         * amd64-darwin-tdep.c: Include "x86-xstate.h".
1199         (x86_darwin_init_abi_64): Call amd64_target_description.
1200         * amd64-dicos-tdep.c: Likewise.
1201         * amd64-fbsd-nat.c: Likewise.
1202         * amd64-fbsd-tdep.c: Likewise.
1203         * amd64-nbsd-tdep.c: Likewise.
1204         * amd64-obsd-tdep.c: Likewise.
1205         * amd64-sol2-tdep.c: Likewise.
1206         * amd64-windows-tdep.c: Likewise.
1207         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
1208
1209 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1210
1211         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
1212         (btrace_function) <insn>: Change type to use std::vector.
1213         * btrace.c (ftrace_debug, ftrace_call_num_insn,
1214         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
1215         ftrace_update_insns, ftrace_compute_global_level_offset,
1216         btrace_stitch_bts, btrace_clear, btrace_insn_get,
1217         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
1218         change to std::vector.
1219         (ftrace_update_insns): Adjust to change to std::vector, change
1220         type of INSN parameter.
1221         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
1222         * record-btrace.c (btrace_call_history_insn_range,
1223         btrace_compute_src_line_range,
1224         record_btrace_frame_prev_register): Adjust to change to
1225         std::vector.
1226         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
1227         to change to std::vector.
1228
1229 2017-09-03  Tom Tromey  <tom@tromey.com>
1230
1231         * corefile.c (reopen_exec_file): Use std::string.
1232
1233 2017-09-03  Tom Tromey  <tom@tromey.com>
1234
1235         * compile/compile.c (compile_register_name_mangled): Return
1236         std::string.
1237         * compile/compile-loc2c.c (pushf_register_address): Update.
1238         (pushf_register): Update.
1239         * compile/compile-c-types.c (convert_array): Update.
1240         * compile/compile-c-symbols.c (generate_vla_size): Update.
1241         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
1242         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
1243         (convert_one_symbol): Update.
1244         (generate_c_for_for_one_variable): Update.
1245         * compile/compile-c-support.c (c_get_range_decl_name): Return a
1246         std::string.
1247         (generate_register_struct): Update.
1248         * compile/compile-internal.h (c_get_range_decl_name): Return a
1249         std::string.
1250         (compile_register_name_mangled): Return std::string.
1251
1252 2017-09-03  Tom Tromey  <tom@tromey.com>
1253
1254         * utils.c (perror_string): Return a std::string.
1255         (throw_perror_with_name, perror_warning_with_name): Update.
1256
1257 2017-09-03  Tom Tromey  <tom@tromey.com>
1258
1259         * demangle.c (demangle_command): Use std::string,
1260         unique_xmalloc_ptr.
1261
1262 2017-09-03  Tom Tromey  <tom@tromey.com>
1263
1264         * cli/cli-setshow.c (do_set_command): Use std::string.
1265
1266 2017-09-03  Tom Tromey  <tom@tromey.com>
1267
1268         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
1269
1270 2017-09-03  Tom Tromey  <tom@tromey.com>
1271
1272         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
1273
1274 2017-09-03  Tom Tromey  <tom@tromey.com>
1275
1276         * mi/mi-cmd-env.c (env_execute_cli_command): Use
1277         gdb::unique_xmalloc_ptr.
1278
1279 2017-09-03  Tom Tromey  <tom@tromey.com>
1280
1281         * thread.c (print_thread_info_1): Use string_printf.
1282         (thread_apply_command, thread_apply_all_command): Use
1283         std::string.
1284
1285 2017-09-03  Tom Tromey  <tom@tromey.com>
1286
1287         * valprint.c (val_print_string): Update.
1288         * gdbcore.h (memory_error_message): Return std::string.
1289         * corefile.c (memory_error_message): Return std::string.
1290         (memory_error): Update.
1291         * breakpoint.c (insert_bp_location): Update.
1292
1293 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1294
1295         * target/waitstatus.h (target_waitstatus_to_string): Change
1296         return type to std::string.
1297         * target/waitstatus.c (target_waitstatus_to_string): Return
1298         std::string.
1299         * target.h (target_waitstatus_to_string): Remove declaration.
1300         * infrun.c (resume, clear_proceed_status_thread,
1301         print_target_wait_results, do_target_wait, save_waitstatus,
1302         stop_all_threads): Adjust.
1303         * record-btrace.c (record_btrace_wait): Adjust.
1304         * target-debug.h
1305         (target_debug_print_struct_target_waitstatus_p): Adjust.
1306
1307 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
1308
1309         PR gdb/22046
1310         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
1311         detection.
1312
1313 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1314
1315         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
1316         for setting/unsetting environment variables on the remote target.
1317         (New remote packets): Add entries for QEnvironmentHexEncoded,
1318         QEnvironmentUnset and QEnvironmentReset.
1319         * common/environ.c (gdb_environ::operator=): Extend method to
1320         handle m_user_set_env_list and m_user_unset_env_list.
1321         (gdb_environ::clear): Likewise.
1322         (match_var_in_string): Change type of first parameter from 'char
1323         *' to 'const char *'.
1324         (gdb_environ::set): Extend method to handle
1325         m_user_set_env_list and m_user_unset_env_list.
1326         (gdb_environ::unset): Likewise.
1327         (gdb_environ::clear_user_set_env): New method.
1328         (gdb_environ::user_set_envp): Likewise.
1329         (gdb_environ::user_unset_envp): Likewise.
1330         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
1331         m_user_unset_env_list on move constructor/assignment.
1332         (unset): Add new default parameter 'update_unset_list = true'.
1333         (clear_user_set_env): New method.
1334         (user_set_envp): Likewise.
1335         (user_unset_envp): Likewise.
1336         (m_user_set_env_list): New std::set.
1337         (m_user_unset_env_list): Likewise.
1338         * common/rsp-low.c (hex2str): New function.
1339         (bin2hex): New overload for bin2hex function.
1340         * common/rsp-low.c (hex2str): New prototype.
1341         (str2hex): New overload prototype.
1342         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
1343         QEnvironmentUnset and QEnvironmentReset.
1344         (remote_protocol_features): Add QEnvironmentHexEncoded,
1345         QEnvironmentUnset and QEnvironmentReset packets.
1346         (send_environment_packet): New function.
1347         (extended_remote_environment_support): Likewise.
1348         (extended_remote_create_inferior): Call
1349         extended_remote_environment_support.
1350         (_initialize_remote): Add QEnvironmentHexEncoded,
1351         QEnvironmentUnset and QEnvironmentReset packet configs.
1352         * unittests/environ-selftests.c (gdb_selftest_env_var):
1353         New variable.
1354         (test_vector_initialization): New function.
1355         (test_init_from_host_environ): Likewise.
1356         (test_reinit_from_host_environ): Likewise.
1357         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
1358         Likewise.
1359         (test_unset_set_empty_vector): Likewise.
1360         (test_vector_clear): Likewise.
1361         (test_std_move): Likewise.
1362         (test_move_constructor):
1363         (test_self_move): Likewise.
1364         (test_set_unset_reset): Likewise.
1365         (run_tests): Rewrite in terms of the functions above.
1366
1367 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
1368
1369         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
1370         (adi_available): Use a temp variable of type CORE_ADDR as argument
1371         3 when calling target_auxv_search.
1372         (adi_normalize_address): Use masks and xor operators to calculate
1373         normalized address.
1374         (adi_read_versions, adi_write_versions, adi_print_versions)
1375         (do_examine, do_assign): Use paddress.
1376
1377 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
1378
1379         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
1380         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
1381         out of loop and add supply of FIR.
1382         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
1383         add collect of FIR.
1384
1385 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1386
1387         PR gdb/21827
1388         * cli/cli-script.c (define_command): Don't convert command name
1389         to lower case.
1390
1391 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
1392
1393         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
1394         Update all callers accordingly. Remove all code blocks handling
1395         the case where DISPP is not NULL.
1396
1397 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1398
1399         PR symtab/22003
1400         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
1401         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
1402         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
1403
1404 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
1405
1406         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
1407         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
1408         (read_comp_units_from_section): New parameter abbrev_section, use
1409         read_and_check_comp_unit_head, allocate signatured_type if needed.
1410         (create_all_comp_units): Update read_comp_units_from_section caller.
1411
1412 2017-08-23  Pedro Alves  <palves@redhat.com>
1413
1414         PR remote/21852
1415         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
1416         to null_ptid and switch to thread without reading the registers
1417         after adding the inferior.
1418
1419 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1420
1421         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
1422         compile-gcc.
1423         * compile/compile.c (compile_gcc, show_compile_gcc): New.
1424         (compile_to_object): Implement compile_gcc.
1425         (_initialize_compile): Install "set compile-gcc".  Initialize
1426         compile_gcc.
1427
1428 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1429
1430         * compile/compile.c (compile_to_object): Conditionally call
1431         set_verbose.  Conditionally call compile or compile_v0.
1432
1433 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
1434
1435         * sparc64-tdep.h: (adi_normalize_address): New export.
1436         * sparc-nat.h: (open_adi_tag_fd): New export.
1437         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
1438         * sparc64-linux-tdep.c:
1439         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
1440         (sparc64_linux_handle_segmentation_fault): New function.
1441         (sparc64_linux_init_abi): Register
1442         sparc64_linux_handle_segmentation_fault
1443         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
1444         (sparc64_addr_bits_remove): New function.
1445         (sparc64_init_abi): Register sparc64_addr_bits_remove.
1446         (MAX_PROC_NAME_SIZE): New macro.
1447         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
1448         (sparc64adilist): New variable.
1449         (adi_proc_list): New variable.
1450         (find_adi_info): New function.
1451         (add_adi_info): New function.
1452         (get_adi_info_proc): New function.
1453         (get_adi_info): New function.
1454         (info_adi_command): New function.
1455         (read_maps_entry): New function.
1456         (adi_available): New function.
1457         (adi_normalize_address): New function.
1458         (adi_align_address): New function.
1459         (adi_convert_byte_count): New function.
1460         (adi_tag_fd): New function.
1461         (adi_is_addr_mapped): New function.
1462         (adi_read_versions): New function.
1463         (adi_write_versions): New function.
1464         (adi_print_versions): New function.
1465         (do_examine): New function.
1466         (do_assign): New function.
1467         (adi_examine_command): New function.
1468         (adi_assign_command): New function.
1469         (_initialize_sparc64_adi_tdep): New function.
1470
1471 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
1472
1473         * breakpoint.c (breakpoints_info): Rename to ...
1474         (info_breakpoints_command): ... this.
1475         (watchpoints_info): Rename to ...
1476         (info_watchpoints_command): ... this.
1477         (tracepoints_info): Rename to ...
1478         (info_tracepoints_command): ... this.
1479         (_initialize_breakpoint): Adjust.
1480         * dcache.c (dcache_info): Rename to ...
1481         (info_display_command): ... this.
1482         (_initialize_dcache): Adjust.
1483         * frame.h (args_info): Rename to ...
1484         (info_args_command): ... this.
1485         (locals_info): Rename to ...
1486         (info_locals_command): ... this.
1487         * infcmd.c (nofp_registers_info): Rename to ...
1488         (info_registers_command): ... this.
1489         (float_info): Rename to ...
1490         (info_float_command): ... this.
1491         (program_info): Rename to ...
1492         (info_program_command): ... this.
1493         (all_registers_info): Rename to ...
1494         (info_all_registers_command): ... this.
1495         (vector_info): Rename to ...
1496         (info_vector_command): ... this.
1497         (float_info): Rename to ...
1498         (info_float_command): ... this.
1499         (_initialize_infcmd): Adjust.
1500         * inferior.h (term_info): Rename to ...
1501         (info_terminal_command): ... this.
1502         * inflow.c (term_info): Rename to ...
1503         (info_terminal_command): ... this.
1504         (_initialize_inflow): Adjust.
1505         * infrun.c (signals_info): Rename to ...
1506         (info_signals_command): ... this.
1507         (_initialize_infrun): Adjust.
1508         * objc-lang.c (classes_info): Rename to ...
1509         (info_classes_command): ... this.
1510         (selectors_info): Rename to ...
1511         (info_selectors_command): ... this.
1512         (_initialize_objc_language): Adjust.
1513         * printcmd.c (sym_info): Rename to ...
1514         (info_symbol_command): ... this.
1515         (address_info): Rename to ...
1516         (info_address_command): ... this.
1517         (display_info): Rename to ...
1518         (info_display_command): ... this.
1519         (_initialize_printcmd): Adjust.
1520         * reverse.c (bookmarks_info): Rename to ...
1521         (info_breakpoints_command): ... this.
1522         (_initialize_reverse): Adjust.
1523         * ser-go32.c (dos_info): Rename to ...
1524         (info_serial_command): ... this.
1525         (_initialize_ser_dos): Adjust.
1526         * skip.c (skip_info): Rename to ...
1527         (info_skip_command): ... this.
1528         (_initialize_step_skip): Adjust.
1529         * source.c (line_info): Rename to ...
1530         (info_line_command): ... this.
1531         (source_info): Rename to ...
1532         (info_source_command)
1533         * stack.c (frame_info): Rename to ...
1534         (info_frame_command): ... this.
1535         (locals_info): Rename to ...
1536         (info_locals_command): ... this.
1537         (args_info): Rename to ...
1538         (info_args_command): ... this.
1539         (_initialize_stack): Adjust.
1540         * symtab.c (sources_info): Rename to ...
1541         (info_sources_command): ... this.
1542         (variables_info): Rename to ...
1543         (info_variables_command): ... this.
1544         (functions_info): Rename to ...
1545         (info_functions_command): ... this.
1546         (types_info): Rename to ...
1547         (info_types_command): ... this.
1548         (_initialize_symtab): Adjust.
1549         * target.c (target_info): Rename to ...
1550         (info_target_command): ... this.
1551         (initialize_targets): Adjust.
1552         * tracepoint.c (tvariables_info): Rename to ...
1553         (info_tvariables_command): ... this.
1554         (scope_info): Rename to ...
1555         (info_scope_command): ... this.
1556         (trace_dump_actions): Adjust.
1557         (_initialize_tracepoint): Adjust.
1558
1559 2017-08-22  Tom Tromey  <tom@tromey.com>
1560
1561         * breakpoint.h (install_breakpoint): Update.
1562         * breakpoint.c (add_solib_catchpoint): Update.
1563         (install_breakpoint): Change argument to a std::unique_ptr.
1564         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
1565         (create_breakpoint_sal, create_breakpoint): Update.
1566         (watch_command_1, catch_exec_command_1)
1567         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
1568         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
1569         Return the breakpoint.
1570         (set_raw_breakpoint_without_location, set_raw_breakpoint)
1571         (new_single_step_breakpoint): Update.
1572         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
1573         std::unique_ptr.
1574         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1575         std::unique_ptr.
1576         * break-catch-sig.c (create_signal_catchpoint): Use
1577         std::unique_ptr.
1578         * ada-lang.c (create_ada_exception_catchpoint): Use
1579         std::unique_ptr.
1580
1581 2017-08-22  Tom Tromey  <tom@tromey.com>
1582
1583         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
1584
1585 2017-08-22  Tom Tromey  <tom@tromey.com>
1586
1587         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
1588         (lookup_partial_symbol): Update.
1589
1590 2017-08-22  Tom Tromey  <tom@tromey.com>
1591
1592         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
1593         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
1594         (find_and_open_source, symtab_to_fullname): Update.
1595         * psymtab.c (psymtab_to_fullname): Update.
1596
1597 2017-08-22  Tom Tromey  <tom@tromey.com>
1598
1599         * exec.c (exec_file_attach): Update.
1600         * linux-thread-db.c (try_thread_db_load): Update.
1601         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
1602         * utils.c (gdb_realpath): Change return type.
1603         (gdb_realpath_keepfile): Update.
1604         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
1605         (_initialize_utils): Register the new self test.
1606         * source.c (openp): Update.
1607         (find_and_open_source): Update.
1608         * nto-tdep.c (nto_find_and_open_solib): Update.
1609         * main.c (set_gdb_data_directory): Update.
1610         (captured_main_1): Update.
1611         * dwarf2read.c (dwarf2_get_dwz_file): Update
1612         (dw2_map_symbol_filenames): Update.
1613         * auto-load.c (auto_load_safe_path_vec_update): Update.
1614         (filename_is_in_auto_load_safe_path_vec): Change type of
1615         "filename_realp".
1616         (auto_load_objfile_script): Update.
1617         (file_is_auto_load_safe): Update.  Use std::string.
1618         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
1619
1620 2017-08-22  Tom Tromey  <tom@tromey.com>
1621
1622         * utils.c (gdb_realpath_keepfile): Return a
1623         gdb::unique_xmalloc_ptr.
1624         * exec.c (exec_file_attach): Update.
1625         * utils.h (gdb_realpath_keepfile): Return a
1626         gdb::unique_xmalloc_ptr.
1627
1628 2017-08-22  Tom Tromey  <tom@tromey.com>
1629
1630         * compile/compile.c (compile_file_command): Use
1631         gdb::unique_xmalloc_ptr, std::string.
1632         * utils.c (gdb_abspath): Change return type.
1633         * source.c (openp): Update.
1634         * objfiles.c (allocate_objfile): Update.
1635         * main.c (set_gdb_data_directory): Update.
1636         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
1637
1638 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
1639
1640         * cli-cmds.c (list_commands): List actual code around more than
1641         one location.
1642
1643 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
1644
1645         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
1646
1647 2017-08-21  Pedro Alves  <palves@redhat.com>
1648
1649         PR gdb/19487
1650         * c-exp.y (variable production): Handle function aliases.
1651         * minsyms.c (msymbol_is_text): New function.
1652         * minsyms.h (msymbol_is_text): Declare.
1653         * symtab.c (find_function_alias_target): New function.
1654         * symtab.h (find_function_alias_target): Declare.
1655
1656 2017-08-21  Pedro Alves  <palves@redhat.com>
1657
1658         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
1659         typedefs.
1660         * typeprint.c (whatis_exp): If handling "whatis", and expression
1661         is OP_TYPE, strip one typedef level.  Otherwise don't strip
1662         typedefs here.
1663         * valops.c (value_cast): Save "to" type before resolving
1664         stubs/typedefs.  Use that type as resulting value's type.
1665
1666 2017-08-18  Tom Tromey  <tom@tromey.com>
1667             Pedro Alves  <palves@redhat.com>
1668
1669         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
1670         * sol-thread.c (sol_thread_resume, sol_thread_wait)
1671         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
1672         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
1673         * proc-service.c (ps_xfer_memory): Use scoped_restore.
1674         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
1675         (linux_get_siginfo_data): Add "thread" argument.  Use
1676         scoped_restore.
1677         * linux-nat.c (linux_child_follow_fork)
1678         (check_stopped_by_watchpoint): Use scoped_restore.
1679         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
1680         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
1681         (restore_inferior_ptid, save_inferior_ptid): Remove.
1682         * btrace.c (btrace_fetch): Use scoped_restore.
1683         * bsd-uthread.c (bsd_uthread_fetch_registers)
1684         (bsd_uthread_store_registers): Use scoped_restore.
1685         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
1686         scoped_restore.
1687         * aix-thread.c (aix_thread_resume, aix_thread_wait)
1688         (aix_thread_xfer_partial): Use scoped_restore.
1689         * inferior.h (save_inferior_ptid): Remove.
1690
1691 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1692
1693         PR tdep/21818
1694         * arm-tdep.c (gdb_print_insn_arm): Mark
1695         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
1696
1697 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1698
1699         * NEWS: Mention GDBserver's new option "--selftest".
1700         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
1701         * selftest.c: Move it to common/selftest.c.
1702         * selftest.h: Move it to common/selftest.h.
1703         * selftest-arch.c (reset): New function.
1704         (tests_with_arch): Call reset.
1705
1706 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1707
1708         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
1709         instead of exception_fprintf and printf_filtered.
1710
1711 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1712
1713         * selftest.c (register_self_test): Rename it to
1714         selftests::register_test.
1715         (run_self_tests): selftest::run_tests.
1716         * selftest.h: Update declarations.
1717         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
1718         selftests::register_test_foreach_arch.
1719         * selftest-arch.h: Update declaration.
1720         * aarch64-tdep.c: Update.
1721         * arm-tdep.c: Likewise.
1722         * disasm-selftests.c: Likewise.
1723         * dwarf2loc.c: Likewise.
1724         * dwarf2-frame.c: Likewise.
1725         * findvar.c: Likewise.
1726         * gdbarch-selftests.c: Likewise.
1727         * maint.c (maintenance_selftest): Likewise.
1728         * regcache.c: Likewise.
1729         * rust-exp.y: Likewise.
1730         * selftest-arch.c: Likewise.
1731         * unittests/environ-selftests.c: Likewise.
1732         * unittests/function-view-selftests.c: Likewise.
1733         * unittests/offset-type-selftests.c: Likewise.
1734         * unittests/optional-selftests.c: Likewise.
1735         * unittests/scoped_restore-selftests.c: Likewise.
1736         * utils-selftests.c: Likewise.
1737
1738 2017-08-17  Pedro Alves  <palves@redhat.com>
1739
1740         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
1741         local.
1742
1743 2017-08-17  Pedro Alves  <palves@redhat.com>
1744
1745         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
1746         field.
1747         (reset_die_in_process): Delete, replaced by ...
1748         (process_die_scope): ... this new class.  Make it responsible for
1749         freeing cu->line_header too.
1750         (process_die): Use process_die_scope.
1751         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
1752         cu->line_header_die_owner.  Don't release the line header if it's
1753         owned by the CU.
1754         (setup_type_unit_groups): Make the CU/DIE own the line header.
1755         Don't release the line header here.
1756
1757 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
1758
1759         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
1760
1761 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1762
1763         * NEWS: Mention new shortcuts for nexti and stepi in TUI
1764         Single-Key mode
1765
1766 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
1767
1768         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
1769         mode command list.
1770
1771 2017-08-15  Stafford Horne  <shorne@gmail.com>
1772
1773         * MAINTAINERS (Write After Approval): Add Stafford Horne.
1774
1775 2017-08-15  Stafford Horne  <shorne@gmail.com>
1776
1777         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
1778
1779 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
1780
1781         PR gdb/21954
1782         * infcmd.c (unset_environment_command): Use the 'clear' method on
1783         the environment instead of resetting it.
1784
1785 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
1786
1787         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
1788         platforms.
1789
1790 2017-08-14  Tom Tromey  <tom@tromey.com>
1791
1792         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
1793         (print_binary_chars): Likewise.
1794         (BITS_IN_BYTES): Remove.
1795
1796 2017-08-14  Tom Tromey  <tom@tromey.com>
1797
1798         PR gdb/21675
1799         * valprint.c (LOW_ZERO): Change value to 034.
1800         (print_octal_chars): Add static_asserts for octal constants.
1801         * printcmd.c (print_scalar_formatted): Add 'd' case.
1802
1803 2017-08-11  Tom Tromey  <tom@tromey.com>
1804
1805         * symfile.c (add_symbol_file_command): Use std::vector.
1806
1807 2017-08-14  Tom Tromey  <tom@tromey.com>
1808
1809         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
1810         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
1811         std::move.
1812         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
1813
1814 2017-08-11  Pedro Alves  <palves@redhat.com>
1815
1816         * infrun.c (process_event_stop_test): Adjust
1817         function_name_is_marked_for_skip call.
1818         * skip.c: Include <list>.
1819         (skiplist_entry): Make it a class with private fields, and
1820         getters/setters.
1821         (skiplist_entry_chain): Delete.
1822         (skiplist_entries): New.
1823         (skiplist_entry_count): Delete.
1824         (highest_skiplist_entry_num): New.
1825         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
1826         (add_skiplist_entry): Delete.
1827         (skiplist_entry::skiplist_entry): New.
1828         (skiplist_entry::add_entry): New.
1829         (skip_file_command, skip_function): Adjust.
1830         (compile_skip_regexp): Delete.
1831         (skip_command): Don't compile regexp here.  Adjust to use
1832         skiplist_entry::add_entry.
1833         (skip_info): Adjust to use range-for and getters.
1834         (skip_enable_command, skip_disable_command): Adjust to use
1835         range-for and setters.
1836         (skip_delete_command): Adjust to use std::list.
1837         (add_skiplist_entry): Delete.
1838         (skip_file_p): Delete, refactored as ...
1839         (skiplist_entry::do_skip_file_p): ... this new method.
1840         (skip_gfile_p): Delete, refactored as ...
1841         (skiplist_entry::do_gskip_file_p): ... this new method.
1842         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
1843         (skiplist_entry::skip_function_p): ... this new method.
1844         (function_name_is_marked_for_skip): Now returns bool, and takes
1845         the function sal by const reference.  Adjust to use range-for and
1846         skiplist_entry methods.
1847         (_initialize_step_skip): Remove references to
1848         skiplist_entry_chain, skiplist_entry_count.
1849         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
1850         takes the function sal by const reference.
1851
1852 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1853
1854         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
1855         (dwarf2_frame_cache): Remove reset_cache_cleanup.
1856         (dwarf2_frame_cache):
1857         * frame-unwind.c (frame_unwind_try_unwinder): Catch
1858         RETURN_MASK_ALL and set *this_case to NULL.
1859         * frame-unwind.h: Update comments.
1860
1861 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1862
1863         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
1864         (dwarf2_frame_state_copy_regs): Remove.
1865         (dwarf2_frame_state_free_regs): Remove.
1866         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
1867         (dwarf2_restore_rule): Call method .alloc_regs instead of
1868         dwarf2_frame_state_alloc_regs.
1869         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
1870         constructor.  Call std::move.
1871         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
1872         (dwarf2_frame_cache): Likewise.
1873
1874         [GDB_SELF_TEST]: Include selftest.h and
1875         selftest-arch.h.
1876         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
1877         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
1878         execute_cfa_program_test.
1879
1880         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
1881         copy ctor, assignment operator, move assignment.
1882         <alloc_regs>: New method.
1883         <swap>: New method.
1884         (struct dwarf2_frame_state): Delete dtor.
1885         (dwarf2_frame_state_alloc_regs): Remove declaration.
1886         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
1887         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
1888
1889 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1890
1891         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
1892         (dwarf2_frame_state::dwarf2_frame_state): New.
1893         (dwarf2_frame_state::~dwarf2_frame_state): New.
1894         (dwarf2_fetch_cfa_info): Update.
1895         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
1896         rather than a pointer.  Update code.
1897         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
1898         dtor.
1899         <data_align, code_align, retaddr_column>: Change them to const.
1900         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
1901         to bool.
1902
1903 2017-08-11  Yao Qi  <yao.qi@linaro.org>
1904
1905         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
1906         <loc.exp>: New field.
1907         * dwarf2-frame.c (execute_cfa_program): Update.
1908         (dwarf2_frame_prev_register): Update.
1909
1910 2017-08-10  Pedro Alves  <palves@redhat.com>
1911
1912         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
1913
1914 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
1915
1916         * fbsd-nat.c (struct fbsd_fork_info): Remove.
1917         (fbsd_pending_children): Use std::list.
1918         (fbsd_remember_child): Likewise.
1919         (fbsd_is_child_pending): Likewise.
1920         (fbsd_pending_vfork_done): Use std::forward_list.
1921         (fbsd_add_vfork_done): Likewise.
1922         (fbsd_is_vfork_done_pending): Likewise.
1923         (fbsd_next_vfork_done): Likewise.
1924
1925 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
1926
1927         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
1928         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
1929         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
1930         for `mapfilename'.
1931         (fbsd_xfer_partial): Use gdb::byte_vector.
1932         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
1933
1934 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
1935
1936         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
1937         "filestuff.h".
1938         (fbsd_find_memory_regions): Fix `mapfile' initialization.
1939
1940 2017-08-09  Tom Tromey  <tom@tromey.com>
1941
1942         * skip.c (skiplist_entry): New constructor.
1943         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
1944         (skiplist_entry::file_is_glob): Now bool.
1945         (skiplist_entry::file, skiplist_entry::function): Now
1946         std::string.
1947         (make_skip_entry): Return a unique_ptr.  Use new.
1948         (free_skiplist_entry, free_skiplist_entry_cleanup)
1949         (make_free_skiplist_entry_cleanup): Remove.
1950         (skip_command, skip_disable_command, add_skiplist_entry)
1951         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
1952         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
1953         (function_name_is_marked_for_skip): Update.
1954         (skip_delete_command): Update.  Use delete.
1955
1956 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
1957
1958         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
1959         (aarch64_linux_core_read_description): New function.
1960         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
1961
1962 2017-08-09  Pedro Alves  <palves@redhat.com>
1963
1964         * cp-name-parser.y (cp_comp_to_string): Return a
1965         gdb::unique_xmalloc_ptr<char>.
1966         * cp-support.c (replace_typedefs_qualified_name)
1967         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
1968         (cp_canonicalize_string_full): Use op= instead of explicit
1969         convertion.
1970         (cp_class_name_from_physname, method_name_from_physname)
1971         (cp_func_name, cp_remove_params): Adjust to use
1972         gdb::unique_xmalloc_ptr<char>.
1973         * cp-support.h (cp_comp_to_string): Return a
1974         gdb::unique_xmalloc_ptr<char>.
1975         * python/py-type.c (typy_lookup_type): Adjust to use
1976         gdb::unique_xmalloc_ptr<char>.
1977
1978 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
1979
1980         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
1981
1982 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
1983             Yao Qi  <yao.qi@linaro.org>
1984
1985         * cp-support.c (cp_canonicalize_string_full): Use
1986         gdb::unique_xmalloc_ptr<char>.
1987         (cp_canonicalize_string): Likewise.
1988
1989 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1990
1991         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
1992         * regformats/i386/amd64-avx-avx512.dat: Remove.
1993         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
1994         * regformats/i386/amd64-avx-mpx.dat:Remove.
1995         * regformats/i386/amd64-avx.dat: Remove.
1996         * regformats/i386/amd64-mpx.dat: Remove.
1997         * regformats/i386/i386-avx-avx512.dat: Remove.
1998         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
1999         * regformats/i386/i386-avx-mpx.dat: Remove.
2000         * regformats/i386/i386-mmx.dat: Remove.
2001         * regformats/i386/i386-mpx.dat: Remove.
2002
2003 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2004
2005         * amd64-tdep.h (tdesc_x32): Remove the declaration.
2006         * amd64-tdep.c: Don't include features/i386/x32*.c.
2007         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
2008         functions.
2009         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
2010         and i386/x32-avx-avx512.
2011         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
2012         and i386/x32.xml.
2013         * features/i386/x32-avx-avx512.c: Removed.
2014         * features/i386/x32-avx-avx512.xml: Removed.
2015         * features/i386/x32-avx.c: Removed.
2016         * features/i386/x32-avx.xml: Removed.
2017         * features/i386/x32.c: Removed.
2018         * features/i386/x32.xml: Removed.
2019         * regformats/i386/x32-avx-avx512.dat: Removed.
2020         * regformats/i386/x32-avx.dat: Removed.
2021         * regformats/i386/x32.dat: Removed.
2022
2023 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2024
2025         PR breakpoints/21886
2026         * mem-break.c (default_memory_insert_breakpoint): Use
2027         `->placed_address' rather than `->reqstd_address' for the
2028         breakpoint location.
2029
2030 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2031
2032         * arch-utils.c (default_print_insn): Remove arch/mach/endian
2033         assertions.
2034
2035 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
2036
2037         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
2038         a union of `tdep_info', `tdesc_data' and `id'.
2039         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
2040         rather than `info.tdep_info'.
2041         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
2042         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2043         * i386-tdep.c (i386_gdbarch_init): Likewise.
2044         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
2045         * mips-tdep.c (mips_gdbarch_init): Likewise.
2046         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2047         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2048         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
2049         `info.tdep_info'.
2050         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
2051         `info.tdep_info'.
2052         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2053         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
2054         `info.tdep_info'.
2055         * spu-tdep.c (spu_gdbarch_init): Likewise.
2056         * gdbarch.h: Regenerate.
2057
2058 2017-08-07  Leszek Swirski  <leszeks@google.com>
2059
2060         PR symtab/20899
2061         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
2062
2063 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2064
2065         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
2066         (gdbsim_open): Rename gdb_argv args object to argv.
2067
2068 2017-08-05  Tom Tromey  <tom@tromey.com>
2069
2070         * compile/compile-object-load.c (compile_object_load): Use
2071         gdb::unique_xmalloc_ptr.
2072         * cli/cli-dump.c (scan_filename): Rename from
2073         scan_filename_with_cleanup.  Change return type.
2074         (scan_expression): Rename from scan_expression_with_cleanup.
2075         Change return type.
2076         (dump_memory_to_file, dump_value_to_file, restore_command):
2077         Use gdb::unique_xmalloc_ptr.  Update.
2078         * cli/cli-cmds.c (find_and_open_script): Use
2079         gdb::unique_xmalloc_ptr.
2080         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
2081         * symmisc.c (maintenance_print_symbols)
2082         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
2083         * symfile.c (symfile_bfd_open, generic_load)
2084         (add_symbol_file_command, remove_symbol_file_command): Use
2085         gdb::unique_xmalloc_ptr.
2086         * source.c (openp): Use gdb::unique_xmalloc_ptr.
2087         * psymtab.c (maintenance_print_psymbols): Use
2088         gdb::unique_xmalloc_ptr.
2089         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
2090         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
2091         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
2092         (reload_shared_libraries_1): Likewise.
2093
2094 2017-08-05  Tom Tromey  <tom@tromey.com>
2095
2096         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
2097         (rust_op_vector, rust_set_vector): New typedefs.
2098         (current_parser): New global.
2099         (work_obstack): Change to pointer type.  Update all users.
2100         (rust_ast, pstate): Remove globals.
2101         (struct rust_parser): New.
2102         (%union) <params, field_inits>: Change type.
2103         (start, tuple_expr, unit_expr, struct_expr_list, literal)
2104         (field_expr, expr_list, maybe_expr_list, type_list): Update.
2105         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
2106         (convert_params_to_types, convert_params_to_expression): Change
2107         type of "params".
2108         (ast_string): Change type of "fields".
2109         (rust_parse): Make a rust_parser.  Remove cleanups.
2110         (rust_lex_tests): Make and install an auto_obstack.
2111
2112 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2113
2114         * configure.srv (ipa_x32_linux_regobj): New.
2115         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
2116         instead of X86_TDESC_AVX512.
2117         (initialize_low_tracepoint): Call
2118         init_registers_x32_avx_avx512_linux.
2119
2120 2017-08-04  Yao Qi  <yao.qi@linaro.org>
2121
2122         * utils.h (gdb_argv): Add namespace std for nullptr_t.
2123
2124 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
2125
2126         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
2127
2128 2017-08-03  Tom Tromey  <tom@tromey.com>
2129
2130         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
2131         Remove.
2132         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
2133
2134 2017-08-03  Tom Tromey  <tom@tromey.com>
2135
2136         * python/py-param.c (compute_enum_values): Use gdb_argv.
2137
2138 2017-08-03  Tom Tromey  <tom@tromey.com>
2139
2140         * utils.h (struct gdb_argv_deleter): New.
2141         (gdb_argv): New class.
2142         * utils.c (gdb_argv::reset): New method.
2143         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
2144         * tracefile.c (tsave_command): Use gdb_argv.
2145         * top.c (new_ui_command): Use gdb_argv.
2146         * symmisc.c (maintenance_print_symbols)
2147         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
2148         * symfile.c (symbol_file_command, generic_load)
2149         (remove_symbol_file_command): Use gdb_argv.
2150         * stack.c (backtrace_command): Use gdb_argv.
2151         * source.c (add_path, show_substitute_path_command)
2152         (unset_substitute_path_command, set_substitute_path_command):
2153         Use gdb_argv.
2154         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
2155         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
2156         * remote.c (extended_remote_run, remote_put_command)
2157         (remote_get_command, remote_delete_command): Use gdb_argv.
2158         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
2159         (gdbsim_open): Use gdb_argv.
2160         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
2161         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
2162         * procfs.c (procfs_info_proc): Use gdb_argv.
2163         * interps.c (interpreter_exec_cmd): Use gdb_argv.
2164         * infrun.c (handle_command): Use gdb_argv.
2165         * inferior.c (add_inferior_command, clone_inferior_command):
2166         Use gdb_argv.
2167         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
2168         * exec.c (exec_file_command): Use gdb_argv.
2169         * cli/cli-cmds.c (alias_command): Use gdb_argv.
2170         * compile/compile.c (build_argc_argv): Use gdb_argv.
2171
2172 2017-08-03  Tom Tromey  <tom@tromey.com>
2173
2174         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
2175
2176 2017-08-03  Tom Tromey  <tom@tromey.com>
2177
2178         * python/python.c (compute_python_string): Return std::string.
2179         (gdbpy_eval_from_control_command): Update.
2180         (do_start_initialization): Use std::string.
2181         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
2182         xstrprintf.
2183         * python/py-breakpoint.c (local_setattro): Use string_printf, not
2184         xstrprintf.
2185
2186 2017-08-03  Tom Tromey  <tom@tromey.com>
2187
2188         * top.h (do_restore_instream_cleanup): Remove.
2189         * top.c (do_restore_instream_cleanup): Remove.
2190         (read_command_file): Use scoped_restore.
2191         * cli/cli-script.c (execute_user_command): Use scoped_restore.
2192
2193 2017-08-03  Tom Tromey  <tom@tromey.com>
2194
2195         * cli/cli-script.c (execute_user_command)
2196         (execute_control_command): Use scoped_restore.
2197
2198 2017-08-03  Tom Tromey  <tom@tromey.com>
2199
2200         * cli/cli-script.c (do_restore_user_call_depth): Remove.
2201         (execute_user_command): Remove user_call_depth; use
2202         user_args_stack's size instead.
2203
2204 2017-08-03  Tom Tromey  <tom@tromey.com>
2205
2206         * top.h (in_user_command): Remove.
2207         * top.c (in_user_command): Remove.
2208         * cli/cli-script.c (do_restore_user_call_depth)
2209         (execute_user_command): Update.
2210
2211 2017-08-03  Tom Tromey  <tom@tromey.com>
2212
2213         * valops.c (search_struct_method): Use gdb::byte_vector.
2214         * valarith.c (value_concat): Use std::vector.
2215         * target.c (memory_xfer_partial): Use gdb::byte_vector.
2216         (simple_search_memory): Likewise.
2217         * printcmd.c (find_string_backward): Use gdb::byte_vector.
2218         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
2219         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
2220         * elfread.c (elf_rel_plt_read): Use std::string.
2221         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
2222         * cli/cli-dump.c (restore_section_callback): Use
2223         gdb::byte_vector.
2224
2225 2017-08-03  Tom Tromey  <tom@tromey.com>
2226
2227         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
2228
2229 2017-08-03  Tom Tromey  <tom@tromey.com>
2230
2231         * tui/tui-regs.c (tui_restore_gdbout): Remove.
2232         (tui_register_format): Use scoped_restore.
2233
2234 2017-08-03  Tom Tromey  <tom@tromey.com>
2235
2236         * reverse.c (exec_direction_default): Remove.
2237         (exec_reverse_once): Use scoped_restore.
2238         * remote.c (restore_remote_timeout): Remove.
2239         (remote_flash_erase, remote_flash_write, remote_flash_done)
2240         (readchar, remote_serial_write): Use scoped_restore.
2241         * cli/cli-script.c (struct source_cleanup_lines_args)
2242         (source_cleanup_lines): Remove.
2243         (script_from_file): Use scoped_restore.
2244         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
2245         (source_command): Use scoped_restore.
2246
2247 2017-08-03  Tom Tromey  <tom@tromey.com>
2248
2249         * utils.h (make_cleanup_free_so): Remove.
2250         * utils.c (do_free_so, make_cleanup_free_so): Remove.
2251         * solist.h (struct so_deleter): New.
2252         (so_list_up): New typedef.
2253         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
2254
2255 2017-08-03  Tom Tromey  <tom@tromey.com>
2256
2257         * utils.h (make_cleanup_restore_current_language): Remove.
2258         * utils.c (do_restore_current_language)
2259         (make_cleanup_restore_current_language): Remove.
2260         * parse.c (parse_exp_in_context_1)
2261         (parse_expression_with_language): Use
2262         scoped_restore_current_language.
2263         * mi/mi-main.c (mi_cmd_execute): Use
2264         scoped_restore_current_language.
2265         * language.h (scoped_restore_current_language): New class.
2266
2267 2017-08-03  Tom Tromey  <tom@tromey.com>
2268
2269         * compile/compile.c (cleanup_unlink_file): Remove.
2270         (compile_to_object): Use gdb::unlinker.
2271         (eval_compile_command): Likewise.
2272
2273 2017-08-03  Tom Tromey  <tom@tromey.com>
2274
2275         * utils.h (make_cleanup_fclose): Remove.
2276         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
2277
2278 2017-08-03  Tom Tromey  <tom@tromey.com>
2279
2280         * top.c (open_terminal_stream): Return gdb_file_up.
2281         (new_ui_command): Update.
2282
2283 2017-08-03  Tom Tromey  <tom@tromey.com>
2284
2285         * source.c (print_source_lines_base, forward_search_command)
2286         (reverse_search_command): Use gdb_file_up.
2287
2288 2017-08-03  Tom Tromey  <tom@tromey.com>
2289
2290         * fbsd-nat.c (fbsd_find_memory_regions): Update.
2291
2292 2017-08-03  Tom Tromey  <tom@tromey.com>
2293
2294         * cli/cli-cmds.c (find_and_open_script): Change return type.
2295         Remove "streamp" and "full_path" parameters.
2296         (source_script_with_search): Update.
2297         * auto-load.c (source_script_file): Update.
2298         * cli/cli-cmds.h (find_and_open_script): Change type.
2299         (open_script): New struct.
2300
2301 2017-08-03  Tom Tromey  <tom@tromey.com>
2302
2303         * xml-support.c (xml_fetch_content_from_file): Update.
2304         * ui-file.c (stdio_file::open): Update.
2305         * tracefile-tfile.c (tfile_start): Update.
2306         * remote.c (remote_file_put, remote_file_get): Update.
2307         * nat/linux-procfs.c (linux_proc_get_int)
2308         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
2309         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
2310         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
2311         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
2312         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
2313         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
2314         * linux-nat.c (linux_proc_pending_signals): Update.
2315         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
2316         (file_closer): Remove.
2317         * compile/compile.c (compile_to_object): Update.
2318         * common/filestuff.h (struct gdb_file_deleter): New.
2319         (gdb_file_up): New typedef.
2320         (gdb_fopen_cloexec): Change return type.
2321         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
2322         * cli/cli-dump.c (fopen_with_cleanup): Remove.
2323         (dump_binary_file, restore_binary_file): Update.
2324         * auto-load.c (auto_load_objfile_script_1): Update.
2325
2326 2017-08-03  Tom Tromey  <tom@tromey.com>
2327
2328         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
2329         (info_static_tracepoint_markers_command): Likewise.
2330         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
2331         * skip.c (skip_info): Use ui_out_emit_table.
2332         * progspace.c (print_program_space): Use ui_out_emit_table.
2333         * osdata.c (info_osdata): Use ui_out_emit_table.
2334         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
2335         ui_out_emit_table.
2336         * linux-thread-db.c (info_auto_load_libthread_db): Use
2337         ui_out_emit_table.
2338         * inferior.c (print_inferior): Use ui_out_emit_table.
2339         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
2340         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
2341         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
2342         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
2343         * ui-out.h (class ui_out_emit_table): New.
2344
2345 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
2346
2347         * mips-tdep.c (mips_fpu_type_str): New function.
2348         (mips_dump_tdep): Call it.
2349
2350 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
2351
2352         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
2353         `->mips_fpu_type'.
2354
2355 2017-07-31  Xavier Roirand  <roirand@adacore.com>
2356
2357         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
2358
2359 2017-07-27  Xavier Roirand  <roirand@adacore.com>
2360
2361         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
2362
2363 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2364
2365         * cli/cli-cmds.c (maintenancechecklist): New variable.
2366         * gdbcmd.h (maintenancechecklist): Declare it.
2367         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
2368         Call i386_linux_read_description with different masks.
2369         * maint.c (maintenance_check_command): New function.
2370         (_initialize_maint_cmds): Call add_prefix_cmd.
2371         * target-descriptions.c (tdesc_reg): override operator != and ==.
2372         (tdesc_type): Likewise.
2373         (tdesc_feature): Likewise.
2374         (target_desc): Likewise.
2375         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
2376         (maintenance_check_xml_descriptions): New function.
2377         (_initialize_target_descriptions) Add command "xml-descriptions".
2378         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
2379
2380 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2381
2382         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
2383         Include features/i386/32bit-*.c.
2384         (i386_linux_read_description): Generate target description if it
2385         doesn't exist.
2386         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
2387         functions.
2388         * features/i386/32bit-linux.c: Re-generated.
2389         * features/i386/32bit-sse.c: Likewise.
2390         * target-descriptions.c (print_c_feature::visit): Print code to
2391         set register number if needed.
2392         (print_c_feature) <m_next_regnum>: New field.
2393
2394 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2395
2396         * features/Makefile (CFILES): Rename with TDESC_CFILES.
2397         (FEATURE_XMLFILES): New.
2398         (FEATURE_CFILES): New.
2399         New rules.
2400         (clean-cfiles): Remove generated c files.
2401         * features/i386/32bit-avx.c: Generated.
2402         * features/i386/32bit-avx512.c: Generated.
2403         * features/i386/32bit-core.c: Generated.
2404         * features/i386/32bit-linux.c: Generated.
2405         * features/i386/32bit-mpx.c: Generated.
2406         * features/i386/32bit-pkeys.c: Generated.
2407         * features/i386/32bit-sse.c: Generated.
2408         * target-descriptions.c: Include algorithm.
2409         (tdesc_element_visitor): Add method visit_end.
2410         (print_c_tdesc): Implement visit_end.
2411         (print_c_tdesc:: m_filename_after_features): Move it to
2412         protected.
2413         (print_c_feature): New class.
2414         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
2415         name starts with "i386/32bit-".
2416
2417 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2418
2419         * target-descriptions.c (tdesc_element_visitor): New class.
2420         (tdesc_element): New class.
2421         (tdesc_reg): Inherit from tdesc_element.
2422         (tdesc_reg::accept): New function.
2423         (tdesc_type): Inherit from tdesc_element.
2424         (tdesc_type::accept): New function.
2425         (tdesc_feature): Inherit from tdesc_element.
2426         (tdesc_feature::accept): New function.
2427         (target_desc): Inherit from tdesc_element.
2428         (target_desc::target_desc): New.
2429         (target_desc::~target_desc): New.
2430         (target_desc::accept): New.
2431         (allocate_target_description): Use new.
2432         (free_target_description): Use delete.
2433         (print_c_tdesc): New class.
2434         (maint_print_c_tdesc_cmd): Adjust.
2435
2436         * features/aarch64.c: Re-generated.
2437         * features/arc-arcompact.c: Re-generated.
2438         * features/arc-v2.c: Re-generated.
2439         * features/arm/arm-with-iwmmxt.c: Re-generated.
2440         * features/arm/arm-with-m.c: Re-generated.
2441         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
2442         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
2443         * features/arm/arm-with-neon.c: Re-generated.
2444         * features/arm/arm-with-vfpv2.c: Re-generated.
2445         * features/arm/arm-with-vfpv3.c: Re-generated.
2446         * features/i386/amd64-avx-avx512.c: Re-generated.
2447         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
2448         * features/i386/amd64-avx.c: Re-generated.
2449         * features/i386/amd64-avx-linux.c: Re-generated.
2450         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
2451         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
2452         * features/i386/amd64-avx-mpx.c: Re-generated.
2453         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
2454         * features/i386/amd64.c: Re-generated.
2455         * features/i386/amd64-linux.c: Re-generated.
2456         * features/i386/amd64-mpx.c: Re-generated.
2457         * features/i386/amd64-mpx-linux.c: Re-generated.
2458         * features/i386/i386-avx-avx512.c: Re-generated.
2459         * features/i386/i386-avx-avx512-linux.c: Re-generated.
2460         * features/i386/i386-avx.c: Re-generated.
2461         * features/i386/i386-avx-linux.c: Re-generated.
2462         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
2463         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
2464         * features/i386/i386-avx-mpx.c: Re-generated.
2465         * features/i386/i386-avx-mpx-linux.c: Re-generated.
2466         * features/i386/i386.c: Re-generated.
2467         * features/i386/i386-linux.c: Re-generated.
2468         * features/i386/i386-mmx.c: Re-generated.
2469         * features/i386/i386-mmx-linux.c: Re-generated.
2470         * features/i386/i386-mpx.c: Re-generated.
2471         * features/i386/i386-mpx-linux.c: Re-generated.
2472         * features/i386/x32-avx-avx512.c: Re-generated.
2473         * features/i386/x32-avx-avx512-linux.c: Re-generated.
2474         * features/i386/x32-avx.c: Re-generated.
2475         * features/i386/x32-avx-linux.c: Re-generated.
2476         * features/i386/x32.c: Re-generated.
2477         * features/i386/x32-linux.c: Re-generated.
2478         * features/microblaze.c: Re-generated.
2479         * features/microblaze-with-stack-protect.c: Re-generated.
2480         * features/mips64-dsp-linux.c: Re-generated.
2481         * features/mips64-linux.c: Re-generated.
2482         * features/mips-dsp-linux.c: Re-generated.
2483         * features/mips-linux.c: Re-generated.
2484         * features/nds32.c: Re-generated.
2485         * features/nios2.c: Re-generated.
2486         * features/nios2-linux.c: Re-generated.
2487         * features/rs6000/powerpc-32.c: Re-generated.
2488         * features/rs6000/powerpc-32l.c: Re-generated.
2489         * features/rs6000/powerpc-403.c: Re-generated.
2490         * features/rs6000/powerpc-403gc.c : Re-generated.
2491         * features/rs6000/powerpc-405.c: Re-generated.
2492         * features/rs6000/powerpc-505.c: Re-generated.
2493         * features/rs6000/powerpc-601.c: Re-generated.
2494         * features/rs6000/powerpc-602.c: Re-generated.
2495         * features/rs6000/powerpc-603.c: Re-generated.
2496         * features/rs6000/powerpc-604.c: Re-generated.
2497         * features/rs6000/powerpc-64.c: Re-generated.
2498         * features/rs6000/powerpc-64l.c: Re-generated.
2499         * features/rs6000/powerpc-7400.c: Re-generated.
2500         * features/rs6000/powerpc-750.c: Re-generated.
2501         * features/rs6000/powerpc-860.c: Re-generated.
2502         * features/rs6000/powerpc-altivec32.c: Re-generated.
2503         * features/rs6000/powerpc-altivec32l.c: Re-generated.
2504         * features/rs6000/powerpc-altivec64.c: Re-generated.
2505         * features/rs6000/powerpc-altivec64l.c: Re-generated.
2506         * features/rs6000/powerpc-cell32l.c: Re-generated.
2507         * features/rs6000/powerpc-cell64l.c: Re-generated.
2508         * features/rs6000/powerpc-e500.c: Re-generated.
2509         * features/rs6000/powerpc-e500l.c: Re-generated.
2510         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
2511         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
2512         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
2513         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
2514         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
2515         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
2516         * features/rs6000/powerpc-vsx32.c: Re-generated.
2517         * features/rs6000/powerpc-vsx32l.c: Re-generated.
2518         * features/rs6000/powerpc-vsx64.c: Re-generated.
2519         * features/rs6000/powerpc-vsx64l.c: Re-generated.
2520         * features/rs6000/rs6000.c: Re-generated.
2521         * features/s390-linux32.c: Re-generated.
2522         * features/s390-linux32v1.c: Re-generated.
2523         * features/s390-linux32v2.c: Re-generated.
2524         * features/s390-linux64.c: Re-generated.
2525         * features/s390-linux64v1.c: Re-generated.
2526         * features/s390-linux64v2.c: Re-generated.
2527         * features/s390-te-linux64.c: Re-generated.
2528         * features/s390-tevx-linux64.c: Re-generated.
2529         * features/s390-vx-linux64.c: Re-generated.
2530         * features/s390x-linux64.c: Re-generated.
2531         * features/s390x-linux64v1.c: Re-generated.
2532         * features/s390x-linux64v2.c: Re-generated.
2533         * features/s390x-te-linux64.c: Re-generated.
2534         * features/s390x-tevx-linux64.c: Re-generated.
2535         * features/s390x-vx-linux64.c: Re-generated.
2536         * features/sparc/sparc32-solaris.c: Re-generated.
2537         * features/sparc/sparc64-solaris.c: Re-generated.
2538         * features/tic6x-c62x.c: Re-generated.
2539         * features/tic6x-c62x-linux.c: Re-generated.
2540         * features/tic6x-c64x.c: Re-generated.
2541         * features/tic6x-c64x-linux.c: Re-generated.
2542         * features/tic6x-c64xp.c: Re-generated.
2543         * features/tic6x-c64xp-linux.c: Re-generated.
2544
2545 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2546
2547         * i386-linux-tdep.c (i386_linux_read_description): New function.
2548         (i386_linux_core_read_description): Call
2549         i386_linux_read_description.
2550         * i386-linux-tdep.h (i386_linux_read_description): Declare.
2551         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
2552         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
2553         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
2554         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
2555         * x86-linux-nat.c (x86_linux_read_description): Call
2556         i386_linux_read_description.
2557
2558 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2559
2560         * NEWS: Mention it.
2561         * features/Makefile (%.c: %.xml): Pass the xml file name to
2562         command "maint print c-tdesc".
2563         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
2564         name from 'arg'.
2565
2566 2017-07-26  Yao Qi  <yao.qi@linaro.org>
2567
2568         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
2569         in-class initialization.
2570         (tdesc_create_feature): Call new instead of XCNEW.
2571         (free_target_description): Ue delete.
2572
2573 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
2574
2575         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
2576
2577 2017-07-25  Yao Qi  <yao.qi@linaro.org>
2578
2579         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
2580         constant.
2581         (amd64_x32_init_abi): Likewise.
2582         * amd64-tdep.h (amd64_init_abi): Update declaration.
2583         (amd64_x32_init_abi): Likewise.
2584
2585 2017-07-25  Yao Qi  <yao.qi@linaro.org>
2586
2587         PR tdep/21717
2588         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
2589         condition for FPSCR.
2590         (arm_linux_store_inferior_registers): Likewise.
2591
2592 2017-07-22  Tom Tromey  <tom@tromey.com>
2593
2594         * break-catch-syscall.c (struct catch_syscall_inferior_data)
2595         <syscalls_counts>: Now a std::vector.
2596         (get_catch_syscall_inferior_data): Use "new".
2597         (catch_syscall_inferior_data_cleanup): Use "delete".
2598         (insert_catch_syscall, remove_catch_syscall)
2599         (clear_syscall_counts): Update.
2600
2601 2017-07-22  Tom Tromey  <tom@tromey.com>
2602
2603         * break-catch-syscall.c (syscall_catchpoint)
2604         <syscalls_to_be_caught>: Now a std::vector<int>
2605         (~syscall_catchpoint): Remove.
2606         (insert_catch_syscall, remove_catch_syscall)
2607         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
2608         (print_mention_catch_syscall, print_recreate_catch_syscall):
2609         Update.
2610         (create_syscall_event_catchpoint): Change type of "filter"
2611         parameter.
2612         (catch_syscall_split_args): Return a std::vector.
2613         (catch_syscall_command_1, catching_syscall_number_1): Update.
2614
2615 2017-07-22  Tom Tromey  <tom@tromey.com>
2616
2617         * break-catch-throw.c (struct exception_catchpoint)
2618         <exception_rx>: Now a std::string.
2619         (~exception_catchpoint): Remove.
2620         (print_one_detail_exception_catchpoint): Update.
2621         (handle_gnu_v3_exceptions): Change type of except_rx.
2622         (extract_exception_regexp): Return a std::string.
2623         (catch_exception_command_1): Update.
2624
2625 2017-07-22  Tom Tromey  <tom@tromey.com>
2626
2627         * break-catch-sig.c (gdb_signal_type): Remove typedef.
2628         (struct signal_catchpoint) <signals_to_be_caught>: Now a
2629         std::vector.
2630         <catch_all>: Now a bool.
2631         (~signal_catchpoint): Remove.
2632         (signal_catchpoint_insert_location)
2633         (signal_catchpoint_remove_location)
2634         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
2635         (signal_catchpoint_print_mention)
2636         (signal_catchpoint_print_recreate)
2637         (signal_catchpoint_explains_signal): Update.
2638         (create_signal_catchpoint): Change type of "filter" and
2639         "catch_all".
2640         (catch_signal_split_args): Return a std::vector.  Change type of
2641         "catch_all".
2642         (catch_signal_command): Update.
2643
2644 2017-07-20  Pedro Alves  <palves@redhat.com>
2645
2646         * ada-lang.c (ada_language_defn): Make extern.
2647         (_initialize_ada_language): Remove add_language call.
2648         * c-lang.c (c_language_defn, cplus_language_defn)
2649         (asm_language_defn, minimal_language_defn): Make extern.
2650         (_initialize_c_language): Delete.
2651         * completer.c (compare_cstrings): Delete, moved to utils.h.
2652         * d-lang.c (d_language_defn): Make extern.
2653         (_initialize_d_language): Remove add_language calls.
2654         * defs.h (enum language): Add comment.
2655         * f-lang.c (f_language_defn): Make extern.
2656         (_initialize_f_language): Remove add_language call.
2657         * go-lang.c (go_language_defn): Make extern.
2658         (_initialize_go_language): Remove add_language call.
2659         * language.c: Include <algorithm>.
2660         (languages): Redefine as const array.
2661         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
2662         (set_language_command): Handle "local".  Use for-range loop.
2663         (set_language): Remove loop.
2664         (language_enum): Rewrite.
2665         (language_def, language_str): Remove loops.
2666         (add_language): Delete.
2667         (add_set_language_command): New, based on add_languages.
2668         (skip_language_trampoline): Adjust.
2669         (local_language_defn): Delete.
2670         (language_gdbarch_post_init): Adjust.
2671         (_initialize_language): Remove add_language calls.  Call
2672         add_set_language_command.
2673         * language.h (add_language): Delete.
2674         (auto_language_defn)
2675         (unknown_language_defn, minimal_language_defn, ada_language_defn)
2676         (asm_language_defn, c_language_defn, cplus_language_defn)
2677         (d_language_defn, f_language_defn, go_language_defn)
2678         (m2_language_defn, objc_language_defn, opencl_language_defn)
2679         (pascal_language_defn, rust_language_defn): Declare.
2680         * m2-lang.c (m2_language_defn): Make extern.
2681         (_initialize_m2_language): Remove add_language call.
2682         * objc-lang.c (objc_language_defn): Make extern.
2683         (_initialize_objc_language): Remove add_language call.
2684         * opencl-lang.c (opencl_language_defn): Make extern.
2685         (_initialize_opencl_language): Remove add_language call.
2686         * p-lang.c (pascal_language_defn): Make extern.
2687         (_initialize_pascal_language): Delete.
2688         * rust-lang.c (rust_language_defn): Make extern.
2689         (_initialize_rust_language): Delete.
2690         * utils.h (compare_cstrings): New static inline function.
2691
2692 2017-07-20  Pedro Alves  <palves@redhat.com>
2693
2694         * ada-lang.c (ada_to_fixed_type_1): Adjust.
2695         (get_var_value): Constify parameters.
2696         (get_int_var_value): Change prototype.
2697         (to_fixed_range_type): Adjust.
2698         * ada-lang.h (get_int_var_value): Change prototype.
2699
2700 2017-07-20  Pedro Alves  <palves@redhat.com>
2701
2702         * dwarf2read.c (dw2_lookup_symbol): Use
2703         SYMBOL_MATCHES_SEARCH_NAME.
2704         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
2705
2706 2017-07-20  Pedro Alves  <palves@redhat.com>
2707
2708         * block.c (block_iter_name_step, block_iter_name_first)
2709         (block_iter_name_next): Delete.
2710         (block_lookup_symbol_primary): Adjust to use
2711         dict_iter_match_first/dict_iter_match_next.
2712         * block.h (block_iter_name_first, block_iter_name_next): Delete
2713         declarations.
2714         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
2715         dict_iter_match_first/dict_iter_match_next.
2716
2717 2017-07-20  Pedro Alves  <palves@redhat.com>
2718
2719         * cp-support.c (cp_find_first_component_aux): Add missing case for
2720         end of string.
2721
2722 2017-07-18  David Blaikie  <dblaikie@gmail.com>
2723
2724         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
2725         of dwo_cu's dwo_file.
2726
2727 2017-07-18  Yao Qi  <yao.qi@linaro.org>
2728
2729         * remote.c (store_registers_using_G): Remove one line comment.
2730
2731 2017-07-18  Yao Qi  <yao.qi@linaro.org>
2732
2733         * regcache.c (regcache_cpy): Simplify it.
2734         (regcache::cpy_no_passthrough): Remove it.
2735         * regcache.h (cpy_no_passthrough): Remove it.
2736         (regcache_dup, regcache_cpy): Update comments.
2737
2738 2017-07-18  Pedro Alves  <palves@redhat.com>
2739
2740         * remote-sim.c (sim_command_completer): Adjust to work with a
2741         completion_tracker instead of a VEC.
2742
2743 2017-07-17  Pedro Alves  <palves@redhat.com>
2744
2745         * completer.c (complete_source_filenames): New function.
2746         (complete_address_and_linespec_locations): New function.
2747         (location_completer): Use complete_address_and_linespec_locations.
2748         (completion_tracker::build_completion_result): Honor the tracker's
2749         request to suppress append.
2750         * completer.h (completion_tracker::suppress_append_ws)
2751         (completion_tracker::set_suppress_append_ws): New methods.
2752         (completion_tracker::m_suppress_append_ws): New field.
2753         (complete_source_filenames): New declaration.
2754         * linespec.c (linespec_complete_what): New.
2755         (struct ls_parser) <complete_what, completion_word,
2756         completion_quote_char, completion_quote_end, completion_tracker>:
2757         New fields.
2758         (string_find_incomplete_keyword_at_end): New.
2759         (linespec_lexer_lex_string): Record quote char.  If in completion
2760         mode, don't throw.
2761         (linespec_lexer_consume_token): Advance the completion word point.
2762         (linespec_lexer_peek_token): Save/restore completion info.
2763         (save_stream_and_consume_token): New.
2764         (set_completion_after_number): New.
2765         (linespec_parse_basic): Set what to complete next depending on
2766         token.  Handle function and label completions specially.
2767         (parse_linespec): Disable objc shortcut in completion mode.  Set
2768         what to complete next depending on token type.  Skip keyword if in
2769         completion mode.
2770         (complete_linespec_component, linespec_complete): New.
2771         * linespec.h (linespec_complete): Declare.
2772
2773 2017-07-17  Pedro Alves  <palves@redhat.com>
2774
2775         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
2776         Handle 'operator<' / 'operator<<'.
2777
2778 2017-07-17  Pedro Alves  <palves@redhat.com>
2779
2780         * completer.c (collect_explicit_location_matches): Handle
2781         MATCH_LABEL.
2782         (convert_explicit_location_to_linespec): New, factored out from
2783         ...
2784         (convert_explicit_location_to_sals): ... this.
2785         (complete_label): New.
2786         (linespec_complete_label, find_label_symbols_in_block): New.
2787         (find_label_symbols): Add completion_mode parameter and adjust to
2788         call find_label_symbols_in_block.
2789         * linespec.h (linespec_complete_label): Declare.
2790
2791 2017-07-17  Pedro Alves  <palves@redhat.com>
2792
2793         * ada-lang.c (ada_collect_symbol_completion_matches): Add
2794         complete_symbol_mode parameter.
2795         * cli/cli-cmds.c (complete_command): Get the completion result out
2796         of the handle_brkchars tracker if used a custom word point.
2797         * completer.c: Include "linespec.h".
2798         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
2799         (advance_to_expression_complete_word_point): New.
2800         (completion_tracker::completes_to_completion_word): New.
2801         (complete_files_symbols): Pass down
2802         complete_symbol_mode::EXPRESSION.
2803         (explicit_options, probe_options): New.
2804         (collect_explicit_location_matches): Complete on the
2805         explictit_loc->foo instead of word.  Use
2806         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
2807         keyword and options completions.
2808         (backup_text_ptr): Delete.
2809         (skip_keyword): New.
2810         (complete_explicit_location): Remove 'word' parameter.  Add
2811         language, quoted_arg_start and quoted_arg_end parameters.
2812         Rewrite, parsing left to right.
2813         (location_completer): Rewrite.
2814         (location_completer_handle_brkchars): New function.
2815         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
2816         (enum complete_line_internal_reason): Adjust comments.
2817         (completion_tracker::discard_completions): New.
2818         (completer_handle_brkchars_func_for_completer): Handle
2819         location_completer.
2820         (gdb_custom_word_point_brkchars)
2821         (gdb_org_rl_basic_quote_characters): New.
2822         (gdb_completion_word_break_characters_throw)
2823         (completion_find_completion_word): Handle trackers that use a
2824         custom word point.
2825         (completion_tracker::advance_custom_word_point_by): New.
2826         (completion_tracker::build_completion_result): Don't rely on
2827         readline appending the quote char.
2828         (gdb_rl_attempted_completion_function_throw): Handle trackers that
2829         use a custom word point.
2830         (gdb_rl_attempted_completion_function): Restore
2831         rl_basic_quote_characters.
2832         * completer.h (class completion_tracker): Extend intro comment.
2833         (completion_tracker::set_quote_char)
2834         (completion_tracker::quote_char)
2835         (completion_tracker::set_use_custom_word_point)
2836         (completion_tracker::use_custom_word_point)
2837         (completion_tracker::custom_word_point)
2838         (completion_tracker::set_custom_word_point)
2839         (completion_tracker::advance_custom_word_point_by)
2840         (completion_tracker::completes_to_completion_word)
2841         (completion_tracker::discard_completions): New methods.
2842         (completion_tracker::m_quote_char)
2843         (completion_tracker::m_use_custom_word_point)
2844         (completion_tracker::m_custom_word_point): New fields.
2845         (advance_to_expression_complete_word_point): Declare.
2846         * f-lang.c (f_collect_symbol_completion_matches): Add
2847         complete_symbol_mode parameter.
2848         * language.h (struct language_defn)
2849         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
2850         parameter.
2851         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
2852         (linespec_complete_function): New function.
2853         (linespec_lexer_lex_keyword): Adjust.
2854         * linespec.h (linespec_keywords, linespec_complete_function): New
2855         declarations.
2856         * location.c (find_end_quote): New function.
2857         (explicit_location_lex_one): Add explicit_completion_info
2858         parameter.  Save quoting info.  Don't throw if being called for
2859         completion.  Don't handle Ada operators here.
2860         (is_cp_operator, skip_op_false_positives, first_of)
2861         (explicit_location_lex_one_function): New function.
2862         (string_to_explicit_location): Replace 'dont_throw' parameter with
2863         an explicit_completion_info pointer parameter.  Handle it.  Don't
2864         use explicit_location_lex_one to lex function names.  Use
2865         explicit_location_lex_one_function instead.
2866         * location.h (struct explicit_completion_info): New.
2867         (string_to_explicit_location): Replace 'dont_throw' parameter with
2868         an explicit_completion_info pointer parameter.
2869         * symtab.c (default_collect_symbol_completion_matches_break_on):
2870         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
2871         (default_collect_symbol_completion_matches)
2872         (collect_symbol_completion_matches): Add complete_symbol_mode
2873         parameter.
2874         (collect_symbol_completion_matches_type): Pass down
2875         complete_symbol_mode::EXPRESSION.
2876         (collect_file_symbol_completion_matches): Add complete_symbol_mode
2877         parameter.  Handle LINESPEC mode.
2878         * symtab.h (complete_symbol_mode): New.
2879         (default_collect_symbol_completion_matches_break_on)
2880         (default_collect_symbol_completion_matches)
2881         (collect_symbol_completion_matches)
2882         (collect_file_symbol_completion_matches): Add complete_symbol_mode
2883         parameter.
2884
2885 2017-07-17  Pedro Alves  <palves@redhat.com>
2886
2887         * utils.c (enum class strncmp_iw_mode): New.
2888         (strcmp_iw): Rename to ...
2889         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
2890         parameters.  Handle them.
2891         (strncmp_iw): New.
2892         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
2893         * utils.h (strncmp_iw): Declare.
2894         (strcmp_iw): Move describing comments here.
2895
2896 2017-07-17  Pedro Alves  <palves@redhat.com>
2897
2898         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
2899         CP_OPERATOR_STR.
2900         * c-typeprint.c (is_type_conversion_operator): Use
2901         CP_OPERATOR_STR.
2902         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
2903         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
2904         CP_OPERATOR_LEN.
2905         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
2906         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
2907         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
2908         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
2909         CP_OPERATOR_STR.
2910         * location.c: Include "cp-support.h".
2911         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
2912         CP_OPERATOR_STR.
2913         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
2914         CP_OPERATOR_LEN.
2915
2916 2017-07-17  Pedro Alves  <palves@redhat.com>
2917
2918         * cli/cli-cmds.c (complete_command): Use a completion tracker
2919         along with completion_find_completion_word for handle_brkchars
2920         phase.
2921         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
2922         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
2923         (struct gdb_rl_completion_word_info): New.
2924         (gdb_rl_find_completion_word): New.
2925         (completion_find_completion_word): New.
2926         * completer.h (completion_find_completion_word): Declare.
2927
2928 2017-07-17  Pedro Alves  <palves@redhat.com>
2929
2930         * ada-lang.c (symbol_completion_match): Adjust comments.
2931         (symbol_completion_add): Replace vector parameter with
2932         completion_tracker parameter.  Use it.
2933         (ada_make_symbol_completion_list): Rename to...
2934         (ada_collect_symbol_completion_matches): ... this.  Add
2935         completion_tracker parameter and use it.
2936         (ada_language_defn): Adjust.
2937         * break-catch-syscall.c (catch_syscall_completer): Adjust
2938         prototype and work with completion_tracker instead of VEC.
2939         * breakpoint.c (condition_completer): Adjust prototype and work
2940         with completion_tracker instead of VEC.
2941         * c-lang.c (c_language_defn, cplus_language_defn)
2942         (asm_language_defn, minimal_language_defn): Adjust to renames.
2943         * cli/cli-cmds.c (complete_command): Rework using
2944         completion_tracker.  Catch exceptions when completing.
2945         * cli/cli-decode.c (integer_unlimited_completer)
2946         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
2947         with completion_tracker instead of VEC.
2948         * command.h (struct completion_tracker): Forward declare.
2949         (completer_ftype, completer_handle_brkchars_ftype): Change
2950         types.
2951         (complete_on_cmdlist, complete_on_enum): Adjust.
2952         * completer.c: Include <algorithm>.
2953         (struct gdb_completer_state): New.
2954         (current_completion): New global.
2955         (readline_line_completion_function): Delete.
2956         (noop_completer, filename_completer)
2957         (filename_completer_handle_brkchars, complete_files_symbols)
2958         (linespec_location_completer): Adjust to work with a
2959         completion_tracker instead of a VEC.
2960         (string_or_empty): New.
2961         (collect_explicit_location_matches): Adjust to work with a
2962         completion_tracker instead of a VEC.
2963         (explicit_location_completer): Rename to ...
2964         (complete_explicit_location): ... this and adjust to work with a
2965         completion_tracker instead of a VEC.
2966         (location_completer): Adjust to work with a completion_tracker
2967         instead of a VEC.
2968         (add_struct_fields): Adjust to work with a completion_list instead
2969         of VEC.
2970         (expression_completer): Rename to ...
2971         (complete_expression): ... this and adjust to work with a
2972         completion_tracker instead of a VEC.  Use complete_files_symbols.
2973         (expression_completer): Reimplement on top of complete_expression.
2974         (symbol_completer): Adjust to work with a completion_tracker
2975         instead of a VEC.
2976         (enum complete_line_internal_reason): Add describing comments.
2977         (complete_line_internal_normal_command): Adjust to work with a
2978         completion_tracker instead of a VEC.
2979         (complete_line_internal): Rename to ...
2980         (complete_line_internal_1): ... this and adjust to work with a
2981         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
2982         handle_brkchars phase.
2983         (new_completion_tracker): Delete.
2984         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
2985         complete_line_internal_1.
2986         (free_completion_tracker): Delete.
2987         (INITIAL_COMPLETION_HTAB_SIZE): New.
2988         (completion_tracker::completion_tracker)
2989         (completion_tracker::~completion_tracker): New.
2990         (maybe_add_completion): Delete.
2991         (completion_tracker::maybe_add_completion)
2992         (completion_tracker::add_completion)
2993         (completion_tracker::add_completions): New.
2994         (throw_max_completions_reached_error): Delete.
2995         (complete_line): Adjust to work with a completion_tracker instead
2996         of a VEC.  Don't create a completion_tracker_t or check for max
2997         completions here.
2998         (command_completer, command_completer_handle_brkchars)
2999         (signal_completer, reg_or_group_completer_1)
3000         (reg_or_group_completer, default_completer_handle_brkchars):
3001         Adjust to work with a completion_tracker.
3002         (gdb_completion_word_break_characters_throw): New.
3003         (gdb_completion_word_break_characters): Reimplement.
3004         (line_completion_function): Delete.
3005         (completion_tracker::recompute_lowest_common_denominator)
3006         (expand_preserving_ws)
3007         (completion_tracker::build_completion_result)
3008         (completion_result::completion_result)
3009         (completion_result::completion_result)
3010         (completion_result::~completion_result)
3011         (completion_result::completion_result)
3012         (completion_result::release_match_list, compare_cstrings)
3013         (completion_result::sort_match_list)
3014         (completion_result::reset_match_list)
3015         (gdb_rl_attempted_completion_function_throw)
3016         (gdb_rl_attempted_completion_function): New.
3017         * completer.h (completion_list, struct completion_result)
3018         (class completion_tracker): New.
3019         (complete_line): Add completion_tracker parameter.
3020         (readline_line_completion_function): Delete.
3021         (gdb_rl_attempted_completion_function): New.
3022         (noop_completer, filename_completer, expression_completer)
3023         (location_completer, symbol_completer, command_completer)
3024         (signal_completer, reg_or_group_completer): Update prototypes.
3025         (completion_tracker_t, new_completion_tracker)
3026         (make_cleanup_free_completion_tracker): Delete.
3027         (enum maybe_add_completion_enum): Delete.
3028         (maybe_add_completion): Delete.
3029         (throw_max_completions_reached_error): Delete.
3030         * corefile.c (complete_set_gnutarget): Adjust to work with a
3031         completion_tracker instead of a VEC.
3032         * cp-abi.c (cp_abi_completer): Adjust to work with a
3033         completion_tracker instead of a VEC.
3034         * d-lang.c (d_language_defn): Adjust.
3035         * disasm.c (disassembler_options_completer): Adjust to work with a
3036         completion_tracker instead of a VEC.
3037         * f-lang.c (f_make_symbol_completion_list): Rename to ...
3038         (f_collect_symbol_completion_matches): ... this.  Adjust to work
3039         with a completion_tracker instead of a VEC.
3040         (f_language_defn): Adjust.
3041         * go-lang.c (go_language_defn): Adjust.
3042         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
3043         Adjust to work with a completion_tracker instead of a VEC.
3044         * infrun.c (handle_completer): Likewise.
3045         * interps.c (interpreter_completer): Likewise.
3046         * interps.h (interpreter_completer): Likewise.
3047         * language.c (unknown_language_defn, auto_language_defn)
3048         (local_language_defn): Adjust.
3049         * language.h (language_defn::la_make_symbol_completion_list):
3050         Rename to ...
3051         (language_defn::la_collect_symbol_completion_matches): ... this
3052         and adjust to work with a completion_tracker instead of a VEC.
3053         * m2-lang.c (m2_language_defn): Adjust.
3054         * objc-lang.c (objc_language_defn): Adjust.
3055         * opencl-lang.c (opencl_language_defn): Adjust.
3056         * p-lang.c (pascal_language_defn): Adjust.
3057         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
3058         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
3059         with a completion_tracker.
3060         * rust-lang.c (rust_language_defn): Adjust.
3061         * symtab.c (free_completion_list, do_free_completion_list)
3062         (return_val, completion_tracker): Delete.
3063         (completion_list_add_name, completion_list_add_symbol)
3064         (completion_list_add_msymbol, completion_list_objc_symbol)
3065         (completion_list_add_fields, add_symtab_completions): Add
3066         completion_tracker parameter and use it.
3067         (default_make_symbol_completion_list_break_on_1): Rename to...
3068         (default_collect_symbol_completion_matches_break_on): ... this.
3069         Add completion_tracker parameter and use it instead of allocating
3070         a completion tracker here.
3071         (default_make_symbol_completion_list_break_on): Delete old
3072         implementation.
3073         (default_make_symbol_completion_list): Delete.
3074         (default_collect_symbol_completion_matches): New.
3075         (make_symbol_completion_list): Delete.
3076         (collect_symbol_completion_matches): New.
3077         (make_symbol_completion_type): Rename to ...
3078         (collect_symbol_completion_matches_type): ... this.  Add
3079         completion_tracker parameter and use it instead of VEC.
3080         (make_file_symbol_completion_list_1): Rename to...
3081         (collect_file_symbol_completion_matches): ... this.  Add
3082         completion_tracker parameter and use it instead of VEC.
3083         (make_file_symbol_completion_list): Delete.
3084         (add_filename_to_list): Use completion_list instead of a VEC.
3085         (add_partial_filename_data::list): Now a completion_list.
3086         (make_source_files_completion_list): Work with a completion_list
3087         instead of a VEC.
3088         * symtab.h: Include "completer.h".
3089         (default_make_symbol_completion_list_break_on)
3090         (default_make_symbol_completion_list, make_symbol_completion_list)
3091         (make_symbol_completion_type, make_file_symbol_completion_list)
3092         (make_source_files_completion_list): Delete.
3093         (default_collect_symbol_completion_matches_break_on)
3094         (default_collect_symbol_completion_matches)
3095         (collect_symbol_completion_matches)
3096         (collect_symbol_completion_matches_type)
3097         (collect_file_symbol_completion_matches)
3098         (make_source_files_completion_list): New.
3099         * top.c (init_main): Don't install a rl_completion_entry_function
3100         hook.  Install a rl_attempted_completion_function hook instead.
3101         * tui/tui-layout.c (layout_completer): Adjust to work with a
3102         completion_tracker.
3103         * tui/tui-regs.c (tui_reggroup_completer):
3104         * tui/tui-win.c (window_name_completer, focus_completer)
3105         (winheight_completer): Adjust to work with a completion_tracker.
3106         * value.c: Include "completer.h".
3107         (complete_internalvar): Adjust to work with a completion_tracker.
3108         * value.h (complete_internalvar): Likewise.
3109
3110 2017-07-17  Pedro Alves  <palves@redhat.com>
3111
3112         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
3113         renames.
3114         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
3115         comments to completer_ftype's declaration.
3116         <completer_handle_brkchars>: Change type to
3117         completer_handle_brkchars_ftype.
3118         * command.h (completer_ftype): Add describing comment and give
3119         names to parameters.
3120         (completer_ftype_void): Rename to ...
3121         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
3122         (set_cmd_completer_handle_brkchars): Adjust.
3123         * completer.c (filename_completer_handle_brkchars): New function.
3124         (complete_line_internal_normal_command): New function, factored
3125         out from ...
3126         (complete_line_internal): ... here.
3127         (command_completer_handle_brkchars)
3128         (default_completer_handle_brkchars)
3129         (completer_handle_brkchars_func_for_completer): New functions.
3130         * completer.h (set_gdb_completion_word_break_characters): Delete
3131         declaration.
3132         (completer_handle_brkchars_func_for_completer): New declaration.
3133         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
3134         completer_handle_brkchars_func_for_completer.
3135
3136 2017-07-17  Pedro Alves  <palves@redhat.com>
3137
3138         * completer.c (symbol_completer): New function, based on
3139         make_symbol_completion_list_fn.
3140         * completer.h (symbol_completer): New declaration.
3141         * guile/scm-cmd.c (cmdscm_completers): Adjust.
3142         * python/py-cmd.c (completers): Adjust.
3143         * symtab.c (make_symbol_completion_list_fn): Delete.
3144         * symtab.h (make_symbol_completion_list_fn): Delete.
3145         * cli/cli-decode.c (add_cmd): Adjust.
3146
3147 2017-07-17  Pedro Alves  <palves@redhat.com>
3148
3149         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
3150         * dwarf2read.c: Include "filename-seen-cache.h".
3151         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
3152         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
3153         * filename-seen-cache.c: New file.
3154         * filename-seen-cache.h: New file.
3155         * symtab.c: Include "filename-seen-cache.h".
3156         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
3157         (create_filename_seen_cache, clear_filename_seen_cache)
3158         (delete_filename_seen_cache, filename_seen): Delete, parts moved
3159         to filename-seen-cache.h/filename-seen-cache.c.
3160         (output_source_filename, sources_info)
3161         (maybe_add_partial_symtab_filename)
3162         (make_source_files_completion_list): Adjust to use
3163         filename_seen_cache.
3164
3165 2017-07-17  Pedro Alves  <palves@redhat.com>
3166
3167         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
3168         fields.
3169         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
3170         dwarf2_debug_sections*)): New.
3171         (dwarf2_per_objfile::dwarf2_per_objfile(const
3172         dwarf2_per_objfile&)): Declare as deleted.
3173         (dwarf2_per_objfile::operator=): Declare as deleted.
3174         (dwarf2_per_objfile::dwarf2_per_objfile)
3175         (dwarf2_per_objfile::~dwarf2_per_objfile)
3176         (dwarf2_per_objfile::free_cached_comp_units): New.
3177         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
3178         ctor.  Call dwarf2_per_objfile's ctor manually.
3179         (dwarf2_locate_sections): Deleted/refactored as ...
3180         (dwarf2_per_objfile::locate_sections): ... this new method.
3181         (free_cached_comp_units): Defer to
3182         dwarf2_per_objfile::free_cached_comp_units.
3183         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
3184
3185 2017-07-14  Tom Tromey  <tom@tromey.com>
3186
3187         PR rust/21764:
3188         * rust-exp.y (convert_ast_to_expression): Add "want_type"
3189         parameter.
3190         <UNOP_SIZEOF>: Split into separate case.
3191         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
3192
3193 2017-07-14  Tom Tromey  <tom@tromey.com>
3194
3195         PR rust/21763:
3196         * symtab.c (symbol_matches_domain): Add language_rust to special
3197         case.
3198         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
3199         treat LOC_TYPEDEF symbols as variables.
3200
3201 2017-07-14  Pedro Alves  <palves@redhat.com>
3202
3203         * symtab.c (make_file_symbol_completion_list_1): Iterate over
3204         symtabs matching all symtabs with SRCFILE as file name instead of
3205         only considering the first hit, with lookup_symtab.
3206
3207 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3208
3209         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
3210         operator_name parameters.
3211         (gen_expr): Update function call.
3212
3213 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3214
3215         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
3216         parameter.
3217         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
3218         Likewise.
3219         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
3220         parameter, use agent_expr::gdbarch instead, update function
3221         calls.
3222         (locexpr_tracepoint_var_ref): Likewise.
3223         (loclist_tracepoint_var_ref): Likewise.
3224         * ax-gdb.c (gen_trace_static_fields): Likewise.
3225         (gen_traced_pop): Likewise.
3226         (gen_frame_args_address): Likewise.
3227         (gen_frame_locals_address): Likewise.
3228         (gen_var_ref): Likewise.
3229         (gen_struct_ref_recursive): Likewise.
3230         (gen_static_field): Likewise.
3231         (gen_maybe_namespace_elt): Likewise.
3232         (gen_expr): Likewise.
3233         (gen_trace_for_var): Likewise.
3234         (gen_trace_for_expr): Likewise.
3235         (gen_trace_for_return_address): Likewise.
3236
3237 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3238
3239         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
3240         parameter.
3241         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
3242
3243 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
3244
3245         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
3246         from ax, update calls.
3247         (gen_usual_arithmetic): Likewise.
3248         (gen_integral_promotions): Likewise.
3249         (gen_bitfield_ref): Likewise.
3250         (gen_primitive_field): Likewise.
3251         (gen_struct_ref_recursive): Likewise.
3252         (gen_struct_ref): Likewise.
3253         (gen_maybe_namespace_elt): Likewise.
3254         (gen_struct_elt_for_reference): Likewise.
3255         (gen_namespace_elt): Likewise.
3256         (gen_aggregate_elt_ref): Likewise.
3257         (gen_expr): Get gdbarch from ax, update calls.
3258         (gen_expr_binop_rest): Likewise.
3259
3260 2017-07-13  Pedro Alves  <palves@redhat.com>
3261
3262         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
3263         as default tdesc.
3264         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
3265         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
3266         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
3267         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
3268         tdep.
3269         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
3270         Get final tdesc from the tdep.
3271         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
3272         default tdesc.
3273         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3274         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3275         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
3276         Use it as default tdesc.
3277         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
3278         down to amd_init_abi.  No longer handle fallback tdesc here.
3279         * amd64-tdep.h (tdesc_x32): Declare.
3280         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
3281         parameter.
3282         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
3283         as default tdesc.
3284
3285 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3286
3287         * s390-linux-tdep.c (s390_process_record): Add support for
3288         instructions new in arch12.
3289
3290 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3291
3292         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
3293         PT_GETFSBASE and PT_GETGSBASE.
3294         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
3295         PT_SETGSBASE.
3296
3297 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
3298
3299         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
3300         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
3301         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
3302         those rules.
3303         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
3304         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
3305         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
3306         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
3307         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
3308         * features/i386/amd64.xml: Add 64bit-segments.xml.
3309         * features/i386/amd64-avx-avx512.c: Regenerated.
3310         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
3311         * features/i386/amd64-avx-mpx.c: Regenerated.
3312         * features/i386/amd64-avx.c: Regenerated.
3313         * features/i386/amd64-mpx.c: Regenerated.
3314         * features/i386/amd64.c: Regenerated.
3315         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
3316         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3317         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
3318         * regformats/i386/amd64-avx.dat: Regenerated.
3319         * regformats/i386/amd64-mpx.dat: Regenerated.
3320         * regformats/i386/amd64.dat: Regenerated.
3321
3322 2017-07-10  Yao Qi  <yao.qi@linaro.org>
3323
3324         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
3325         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
3326
3327 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3328
3329         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
3330         unsetenv.
3331         * gnulib/aclocal.m4: Regenerate.
3332         * gnulib/config.in: Regenerate.
3333         * gnulib/configure: Regenerate.
3334         * gnulib/import/Makefile.am: Regenerate.
3335         * gnulib/import/Makefile.in: Regenerate.
3336         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3337         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3338         * gnulib/import/m4/environ.m4: New file.
3339         * gnulib/import/m4/setenv.m4: New file.
3340         * gnulib/import/setenv.c: New file.
3341         * gnulib/import/unsetenv.c: New file.
3342
3343 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
3344
3345         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
3346         address when op is DW_OP_addr.
3347
3348 2017-07-09  Tom Tromey  <tom@tromey.com>
3349
3350         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
3351         check and apply to outer type.
3352
3353 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3354
3355         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
3356         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
3357         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
3358         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
3359
3360 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3361
3362         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
3363
3364 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3365
3366         * corelow.c (get_core_siginfo): Remove.
3367         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
3368         instead of get_core_siginfo.
3369         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
3370         * gdbarch.h: Re-generate.
3371         * gdbarch.c: Re-generate.
3372         * linux-tdep.c (linux_core_xfer_siginfo): New.
3373         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
3374
3375 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3376
3377         * corelow.c (thread_section_name): Move to ...
3378         * gdbcore.h (thread_section_name): ... here.
3379
3380 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3381
3382         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
3383         (struct siginfo32): New.
3384         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
3385         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
3386         via ptrace(PT_LWPINFO).
3387
3388 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
3389
3390         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
3391         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
3392         (fbsd_get_siginfo_type): New.
3393         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
3394         (_initialize_fbsd_tdep): New.
3395
3396 2017-07-06  David Blaikie  <dblaikie@gmail.com>
3397
3398         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
3399         a singular dwo_unit*) to support multiple CUs in the same way that
3400         multiple TUs are supported.
3401         (create_cus_hash_table): Replace create_dwo_cu with a function for
3402         parsing multiple CUs from a DWO file.
3403         (open_and_init_dwo_file): Use create_cus_hash_table rather than
3404         create_dwo_cu.
3405         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
3406         htab_find, rather than comparing the signature to a singleton CU in
3407         the dwo_file.
3408
3409 2017-07-06  Pedro Alves  <palves@redhat.com>
3410
3411         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
3412
3413 2017-07-04  Pedro Alves  <palves@redhat.com>
3414
3415         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
3416         * gdbtypes.h (TYPE_STATIC): Delete.
3417         (struct fn_field) <is_public, is_abstract, is_static, is_final,
3418         is_synchronized, is_native>: Delete.
3419         <dummy>: Bump.
3420         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
3421         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
3422         (TYPE_FN_FIELD_ABSTRACT): Delete.
3423
3424 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
3425
3426         * buffer.h (buffer_finish): Fix spelling mistakes.
3427
3428 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
3429
3430         * .dir-locals.el: Automatically switch to C-style comments in
3431         versions of Emacs that support the feature.
3432
3433 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3434             Pedro Alves  <palves@redhat.com>
3435
3436         PR cli/21688
3437         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
3438         (process_next_line): New variable 'inline_cmd'.
3439         Adjust 'if' clauses for "python", "compile" and "guile" to use
3440         'command_name_equals' and check for '!inline_cmd'.
3441
3442 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
3443
3444         PR cli/21688
3445         * cli/cli-script.c (command_name_equals_not_inline): New function.
3446         (process_next_line): Adjust 'if' clauses for "python", "compile"
3447         and "guile" to use command_name_equals_not_inline.
3448
3449 2017-06-29  Pedro Alves  <palves@redhat.com>
3450
3451         * completer.c (expression_completer): Call
3452         linespec_location_completer instead of location_completer.
3453
3454 2017-06-29  Pedro Alves  <palves@redhat.com>
3455
3456         * completer.c (expression_completer): Remove code that recomputes
3457         'text' from 'word'.
3458
3459 2017-06-29  Yao Qi  <yao.qi@linaro.org>
3460
3461         * regformats/regdat.sh: Generate code with
3462         "ifndef IN_PROCESS_AGENT".
3463
3464 2017-06-28  Pedro Alves  <palves@redhat.com>
3465
3466         * command.h: Include "common/scoped_restore.h".
3467
3468 2017-06-28  Yao Qi  <yao.qi@linaro.org>
3469
3470         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
3471         instead of obstack_grow.
3472
3473 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
3474
3475         PR gdb/21337
3476         * symfile.c (reread_symbols): Call objfiles_changed just before
3477         read_symbols.
3478
3479 2017-06-27  Pedro Alves  <palves@redhat.com>
3480
3481         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
3482         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
3483         (completion_list_add_symbol, completion_list_add_msymbol):
3484         ... these new functions.
3485         (add_symtab_completions)
3486         (default_make_symbol_completion_list_break_on_1): Adjust.
3487
3488 2017-06-27  Pedro Alves  <palves@redhat.com>
3489
3490         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
3491         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
3492         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
3493         dtor.
3494         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
3495         'storage_obstack' field an auto_obstack.  In-class initialize all
3496         non-bitfield fields.  Make minsyms_read bool.
3497         * symfile.c (read_symbols): Adjust.
3498
3499 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
3500
3501         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
3502         (gdbsim_store_register): Likewise.
3503
3504 2017-06-27  Pedro Alves  <palves@redhat.com>
3505
3506         * c-exp.y (name_obstack): Now an auto_obstack.
3507         (yylex): Use auto_obstack::clear.
3508         (c_parse): Use auto_obstack::clear instead of reinitializing and
3509         freeing the obstack.
3510         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
3511         * d-exp.y (name_obstack): Now an auto_obstack.
3512         (yylex): Use auto_obstack::clear.
3513         (d_parse): Use auto_obstack::clear instead of reinitializing and
3514         freeing the obstack.
3515         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
3516         auto_obstack.
3517         * dwarf2read.c (create_addrmap_from_index)
3518         (dwarf2_build_psymtabs_hard)
3519         (update_enumeration_type_from_children): Likewise.
3520         * gdb_obstack.h (auto_obstack): New type.
3521         * go-exp.y (name_obstack): Now an auto_obstack.
3522         (build_packaged_name): Use auto_obstack::clear.
3523         (go_parse): Use auto_obstack::clear instead of reinitializing and
3524         freeing the obstack.
3525         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
3526         auto_obstack.
3527         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
3528         * rust-exp.y (work_obstack): Now an auto_obstack.
3529         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
3530         reinitializing and freeing the obstack.
3531         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
3532         (host_char_to_target): Use auto_obstack.
3533         * utils.h (make_cleanup_obstack_free): Delete declaration.
3534         * valprint.c (generic_emit_char, generic_printstr): Use
3535         auto_obstack.
3536
3537 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
3538
3539         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
3540         thread.
3541         (darwin_init_thread_list): Don't update dummy thread.
3542         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
3543
3544 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
3545
3546         * record-full.c (netorder16): Remove.
3547
3548 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
3549
3550         * common/diagnostics.h: Define macros for GCC.
3551         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
3552         * common/vec.h: Include diagnostics.h.
3553         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
3554         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
3555         warning.
3556
3557 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
3558
3559         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
3560         New macro.
3561         * ada-lex.l: Ignore deprecated register warnings.
3562
3563 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
3564
3565         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
3566         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
3567
3568 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
3569
3570         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
3571         its own line.
3572
3573 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
3574
3575         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
3576
3577 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
3578
3579         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
3580         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
3581         (xtensa_register_read_masked): Likewise.
3582
3583 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
3584
3585         * common/environ.c (gdb_environ::unset): Update comment.
3586
3587 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3588
3589         * python/py-unwind.c (pyuw_sniffer): Allocate space for
3590         registers.
3591
3592 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3593
3594         * record-full.c (record_full_exec_insn): Use byte_vector.
3595
3596 2017-06-22  Yao Qi  <yao.qi@linaro.org>
3597
3598         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
3599         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
3600
3601 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
3602
3603         * remote.c (cached_reg): Move from here...
3604         * regcache.h (cached_reg): ...to here.
3605         * python/py-unwind.c (struct reg_info): Remove.
3606         (cached_frame_info): Use cached_reg_t.
3607         (pyuw_prev_register): Likewise.
3608         (pyuw_sniffer): Use cached_reg_t and allocate registers.
3609         (pyuw_dealloc_cache): Free all registers.
3610
3611 2017-06-22  Pedro Alves  <palves@redhat.com>
3612             Simon Marchi  <simon.marchi@ericsson.com>
3613
3614         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
3615         warning.
3616         * common/diagnostics.h: New file.
3617
3618 2017-06-22  Pedro Alves  <palves@redhat.com>
3619
3620         * common/agent.h: Add include guards.
3621
3622 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
3623
3624         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
3625         talk about addressable units instead of bytes.
3626
3627 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3628
3629         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
3630         of '::const_iterator'.
3631
3632 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
3633
3634         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3635         'unittests/environ-selftests.c'.
3636         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
3637         * charset.c (find_charset_names): Declare object 'iconv_env'.
3638         Update code to use 'iconv_env' object.  Remove call to
3639         'free_environ'.
3640         * common/environ.c: Include <utility>.
3641         (make_environ): Delete function.
3642         (free_environ): Delete function.
3643         (gdb_environ::clear): New function.
3644         (gdb_environ::operator=): New function.
3645         (gdb_environ::get): Likewise.
3646         (environ_vector): Delete function.
3647         (set_in_environ): Delete function.
3648         (gdb_environ::set): New function.
3649         (unset_in_environ): Delete function.
3650         (gdb_environ::unset): New function.
3651         (gdb_environ::envp): Likewise.
3652         * common/environ.h: Include <vector>.
3653         (struct gdb_environ): Delete; transform into...
3654         (class gdb_environ): ... this class.
3655         (free_environ): Delete prototype.
3656         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
3657         environ_vector): Likewise.
3658         * infcmd.c (run_command_1): Update code to call
3659         'envp' from 'gdb_environ' class.
3660         (environment_info): Update code to call methods from 'gdb_environ'
3661         class.
3662         (unset_environment_command): Likewise.
3663         (path_info): Likewise.
3664         (path_command): Likewise.
3665         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
3666         (inferior::inferior): Initialize 'environment' using the host's
3667         information.
3668         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
3669         Include "environ.h".
3670         (class inferior) <environment>: Change type from 'struct
3671         gdb_environ' to 'gdb_environ'.
3672         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
3673         methods from 'gdb_environ' class.
3674         * solib.c (solib_find_1): Likewise
3675         * unittests/environ-selftests.c: New file.
3676
3677 2017-06-20  Yao Qi  <yao.qi@linaro.org>
3678
3679         * features/i386/i386-linux.xml: Exchange the order of including
3680         32bit-linux.xml and 32bit-sse.xml.
3681         * features/i386/i386-linux.c: Regenerated.
3682
3683 2017-06-20  Yao Qi  <yao.qi@linaro.org>
3684
3685         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
3686         Delete copy ctor and assignment operator.
3687         (tdesc_type): Likewise.
3688         (tdesc_feature): Likewise.
3689         (tdesc_free_reg): Remove.
3690         (tdesc_create_reg): Use new.
3691         (tdesc_free_type): Remove.
3692         (tdesc_create_vector): Use new.
3693         (tdesc_create_union): Likewise.
3694         (tdesc_create_flags): Likewise.
3695         (tdesc_create_enum): Likewise.
3696         (tdesc_free_feature): Delete.
3697         (free_target_description): Use delete.
3698
3699 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
3700
3701         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
3702         registers.
3703
3704 2017-06-19  Pedro Alves  <palves@redhat.com>
3705
3706         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
3707         after gdb::unlinker.
3708
3709 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
3710
3711         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
3712         gdb_environ to access an environment variable.
3713
3714 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
3715
3716         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
3717         gdb_byte*.
3718
3719 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3720
3721         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
3722
3723 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3724
3725         * configure: Re-generate.
3726         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
3727
3728 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3729
3730         * configure: Re-generate.
3731         * warning.m4: Pass -Werror to compiler when checking for
3732         supported warning flags.
3733
3734 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
3735
3736         * Makefile.in (COMPILE.pre): Add "-x c++".
3737
3738 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
3739             Pedro Alves  <palves@redhat.com>
3740             Yao Qi  <yao.qi@linaro.org>
3741
3742         * defs.h (RequireLongest): New.
3743         (extract_integer): Declare function template.
3744         (extract_signed_integer): Remove the declaration, but define it
3745         static inline.
3746         (extract_unsigned_integer): Likewise.
3747         (store_integer): Declare function template.
3748         (store_signed_integer): Remove the declaration, but define it
3749         static inline.
3750         (store_unsigned_integer): Likewise.
3751         * findvar.c (extract_integer): New function template.
3752         (extract_signed_integer): Remove.
3753         (extract_unsigned_integer): Remove.
3754         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
3755         instantiations.
3756         (store_integer): New function template.
3757         (store_signed_integer): Remove.
3758         (store_unsigned_integer): Remove.
3759         (store_integer): Explicit instantiations.
3760         * regcache.c (regcache_raw_read_signed): Update.
3761         (regcache::raw_read): New function.
3762         (regcache::raw_read_signed): Remove.
3763         (regcache::raw_read_unsigned): Remove.
3764         (regcache_raw_read_unsigned): Update.
3765         (regcache_raw_write_unsigned): Update.
3766         (regcache::raw_write_signed): Remove.
3767         (regcache::raw_write): New function.
3768         (regcache_cooked_read_signed): Update.
3769         (regcache::raw_write_unsigned): Remove.
3770         (regcache::cooked_read_signed): Remove.
3771         (regcache_cooked_read_unsigned): Update.
3772         (regcache::cooked_read_unsigned): Remove.
3773         (regcache_cooked_write_signed): Update.
3774         (regcache_cooked_write_unsigned): Update.
3775         * regcache.h (regcache) <raw_read_signed>: Remove.
3776         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
3777         <raw_read, raw_write>: New.
3778         <cooked_read_signed, cooked_write_signed>: Remove.
3779         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
3780         <cooked_read, cooked_write>: New.
3781         * sh64-tdep.c (sh64_pseudo_register_read): Update.
3782         (sh64_pseudo_register_write): Update.
3783
3784 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
3785
3786         * arc-tdep.c (arc_disassembler_options): New variable.
3787         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
3788         of default_print_insn.
3789         (arc_delayed_print_insn): Set info->section when needed,
3790         use default_print_insn to retrieve a disassembler.
3791
3792 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
3793
3794         PR gdb/21574
3795         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
3796         to mention $SHELL and startup-with-shell.
3797
3798 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
3799
3800         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
3801
3802 2017-06-14  Yao Qi  <yao.qi@linaro.org>
3803
3804         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
3805         default_print_insn instead of print_insn_aarch64.
3806         * arm-tdep.c (gdb_print_insn_arm): Call
3807         default_print_insn instead of print_insn_big_arm
3808         and print_insn_little_arm.
3809         * i386-tdep.c (i386_print_insn): Call default_print_insn
3810         instead of print_insn_i386.
3811         * ia64-tdep.c (ia64_print_insn): Call
3812         default_print_insn instead of print_insn_ia64.
3813         * mips-tdep.c (gdb_print_insn_mips): Call
3814         default_print_insn instead of print_insn_big_mips
3815         and print_insn_little_mips.
3816         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
3817         instead of print_insn_spu.
3818
3819 2017-06-14  Pedro Alves  <palves@redhat.com>
3820
3821         * ada-lang.c: Include "common/byte-vector.h".
3822         (ada_value_primitive_packed_val): Use gdb::byte_vector.
3823         * charset.c (wchar_iterator::iterate): Resize the vector instead
3824         of reserving it.
3825         * common/byte-vector.h: Include "common/def-vector.h".
3826         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
3827         * cli/cli-dump.c: Include "common/byte-vector.h".
3828         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
3829         * common/byte-vector.h: New file.
3830         * common/def-vector.h: New file.
3831         * common/default-init-alloc.h: New file.
3832         * dwarf2loc.c: Include "common/byte-vector.h".
3833         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
3834         instead of reserving it.
3835         * dwarf2read.c: Include "common/byte-vector.h".
3836         (data_buf::m_vec): Now a gdb::byte_vector.
3837         * gdb_regex.c: Include "common/def-vector.h".
3838         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
3839         * mi/mi-main.c: Include "common/byte-vector.h".
3840         (mi_cmd_data_read_memory): Use gdb::byte_vector.
3841         * printcmd.c: Include "common/byte-vector.h".
3842         (print_scalar_formatted): Use gdb::byte_vector.
3843         * valprint.c: Include "common/byte-vector.h".
3844         (maybe_negate_by_bytes, print_decimal_chars): Use
3845         gdb::byte_vector.
3846
3847 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3848
3849         * darwin-nat.c: Include "nat/fork-inferior.h".
3850
3851 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3852
3853         * configure.nat: Factor out Darwin bits that are not
3854         architecture-specific.  Add fork-inferior.o.
3855
3856 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
3857
3858         * configure.nat: Factor out AIX bits that are not
3859         architecture-specific.  Add fork-inferior.o.
3860
3861 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3862
3863         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
3864         (read_pieced_value, write_pieced_value): ...here.  Reduce to
3865         wrappers that just call rw_pieced_value.
3866
3867 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3868
3869         * dwarf2loc.c (write_pieced_value): When writing the data for a
3870         memory piece, use write_memory_with_notification instead of
3871         write_memory.
3872
3873 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3874
3875         * valops.c (read_value_memory): Change embedded_offset to
3876         represent a bit offset instead of a byte offset.
3877         * value.h (read_value_memory): Adjust comment.
3878
3879 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3880
3881         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
3882         dest_offset_bits and source_offset_bits.
3883         (write_pieced_value): Likewise.
3884
3885 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3886
3887         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
3888         given by DW_OP_bit_piece.
3889         (write_pieced_value): Likewise.
3890
3891 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3892
3893         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
3894         some other preparations to the places where sufficient information
3895         is available.
3896         (write_pieced_value): Likewise.
3897
3898 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3899
3900         * dwarf2loc.c (bits_to_bytes): New function.
3901         (read_pieced_value): Fix offset calculations for register pieces
3902         on big-endian targets.
3903         (write_pieced_value): Likewise.
3904
3905 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3906
3907         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
3908         (write_pieced_value): Likewise.
3909
3910 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3911
3912         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
3913         transfer the source value's least significant bits, instead of its
3914         lowest-addressed ones.  Rename type_len to max_offset.
3915         (read_pieced_value): Mirror above changes to write_pieced_value as
3916         applicable.
3917
3918 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3919
3920         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
3921         truncate full bytes from dest_offset_bits before using it as an
3922         offset into the buffer.
3923
3924 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3925
3926         * dwarf2loc.c (write_pieced_value): Include transfer size in
3927         byte-wise check.
3928
3929 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3930
3931         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
3932         calculation of this_size.
3933
3934 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3935
3936         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
3937         when targeting a bit-field.
3938         (write_pieced_value): Likewise.
3939
3940 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3941
3942         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
3943         (allocate_piece_closure): Drop addr_size parameter.
3944         (dwarf2_evaluate_loc_desc_full): Adjust call to
3945         allocate_piece_closure.
3946
3947 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3948
3949         PR gdb/21226
3950         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
3951         the LSB end, independent of endianness.
3952
3953 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3954
3955         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
3956         size capping.
3957
3958 2017-06-13  Yao Qi  <yao.qi@linaro.org>
3959
3960         * mips-linux-nat.c: Move include features/mips*-linux.c to
3961         mips-linux-tdep.c.
3962         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
3963         to mips-linux-tdep.c.
3964         * mips-linux-tdep.c: Include features/mips*-linux.c
3965         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
3966         functions.
3967         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
3968         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
3969         (tdesc_mips64_dsp_linux): Declare.
3970
3971 2017-06-12  Tom Tromey  <tom@tromey.com>
3972
3973         * valprint.h (val_print_type_code_int): Remove.
3974         * valprint.c (generic_val_print_int): Always call
3975         val_print_scalar_formatted.
3976         (val_print_type_code_int): Remove.
3977         * printcmd.c (print_scalar_formatted): Handle options->format==0.
3978         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
3979         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
3980         * ada-valprint.c (ada_val_print_num): Use
3981         val_print_scalar_formatted.
3982
3983 2017-06-12  Tom Tromey  <tom@tromey.com>
3984
3985         * printcmd.c (print_scalar_formatted): Unify the two switches.
3986         Don't convert scalars to LONGEST.
3987
3988 2017-06-12  Tom Tromey  <tom@tromey.com>
3989
3990         PR exp/16225:
3991         * valprint.h (print_decimal_chars): Update.
3992         * valprint.c (maybe_negate_by_bytes): New function.
3993         (print_decimal_chars): Add "is_signed" argument.
3994         * printcmd.c (print_scalar_formatted): Update.
3995
3996 2017-06-12  Tom Tromey  <tom@tromey.com>
3997
3998         PR exp/16225:
3999         * valprint.h (print_binary_chars, print_hex_chars): Update.
4000         * valprint.c (val_print_type_code_int): Update.
4001         (print_binary_chars): Add "zero_pad" argument.
4002         (emit_octal_digit): New function.
4003         (print_octal_chars): Don't zero-pad.
4004         (print_decimal_chars): Likewise.
4005         (print_hex_chars): Add "zero_pad" argument.
4006         * sh64-tdep.c (sh64_do_fp_register): Update.
4007         * regcache.c (regcache::dump): Update.
4008         * printcmd.c (print_scalar_formatted): Update.
4009         * infcmd.c (default_print_one_register_info): Update.
4010
4011 2017-06-12  Pedro Alves  <palves@redhat.com>
4012             Alan Hayward  <alan.hayward@arm.com>
4013
4014         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
4015         (mips_eabi_push_dummy_call): Rename local 'regsize' to
4016         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
4017         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
4018         Assert that abi_regsize bytes fit in 'ref_valbuf'.
4019
4020 2017-06-12  Pedro Alves  <palves@redhat.com>
4021
4022         * dwarf2read.c (mapped_symtab::data): Now a vector of
4023         symtab_index_entry instead of vector of
4024         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
4025         whether an element's name is NULL instead of checking whether the
4026         element itself is NULL.
4027         (find_slot): Change return type.  Adjust.
4028         (hash_expand, , add_index_entry, uniquify_cu_indices)
4029         (write_hash_table): Adjust.
4030
4031 2017-06-12  Pedro Alves  <palves@redhat.com>
4032
4033         * dwarf2read.c (recursively_count_psymbols): New function.
4034         (write_psymtabs_to_index): Call it to compute number of psyms and
4035         pass estimate size of psyms_seen to unordered_set's ctor.
4036
4037 2017-06-12  Pedro Alves  <palves@redhat.com>
4038
4039         * dwarf2read.c (write_hash_table): Check if key already exists
4040         before emplacing.
4041
4042 2017-06-12  Pedro Alves  <palves@redhat.com>
4043
4044         * dwarf2read.c (data_buf::append_space): Rename to...
4045         (data_buf::grow): ... this, and make private.  Adjust all callers.
4046         (data_buf::append_uint): New method.
4047         (add_address_entry, write_one_signatured_type)
4048         (write_psymtabs_to_index): Use it.
4049
4050 2017-06-12  Pedro Alves  <palves@redhat.com>
4051
4052         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
4053         (file_write (FILE *, const std::vector<Elem>&)): Delete.
4054         (data_buf::file_write): Call ::fwrite directly.
4055
4056 2017-06-12  Pedro Alves  <palves@redhat.com>
4057
4058         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
4059         std::vector::erase.
4060
4061 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
4062
4063         Code cleanup: C++ify .gdb_index producer.
4064         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
4065         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
4066         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
4067         (create_strtab, add_string): Remove.
4068         (file_write, data_buf): New.
4069         (struct symtab_index_entry): Use std::vector for cu_indices.
4070         (struct mapped_symtab): Use std::vector for data.
4071         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
4072         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
4073         Remove.
4074         (find_slot): Change return type.  Update it to the new data structures.
4075         (hash_expand, add_index_entry): Update it to the new data structures.
4076         (offset_type_compare): Remove.
4077         (uniquify_cu_indices): Update it to the new data structures.
4078         (c_str_view, c_str_view_hasher, vector_hasher): New.
4079         (add_indices_to_cpool): Remove.
4080         (write_hash_table): Update it to the new data structures.
4081         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
4082         (eq_psymtab_cu_index): Remove.
4083         (psym_index_map): New typedef.
4084         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
4085         reference and std::unordered_map for cu_index_htab.
4086         (add_address_entry, add_address_entry_worker, write_address_map)
4087         (write_psymbols): Update it to the new data structures.
4088         (write_obstack): Remove.
4089         (struct signatured_type_index_data): Change types_list to a data_buf
4090         reference and psyms_seen to a std::unordered_set reference.
4091         (write_one_signatured_type, recursively_write_psymbols)
4092         (write_psymtabs_to_index): Update it to the new data structures.
4093
4094 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
4095
4096         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
4097         separate-debug-file commands.
4098         * symfile.h (separate_debug_file_debug): New global.
4099         * symfile.c (separate_debug_file_debug): New global.
4100         (separate_debug_file_exists, find_separate_debug_file): Add
4101         debug output.
4102         (_initialize_symfile): Add "set debug separate-debug-file"
4103         command.
4104         * build-id.c (build_id_to_debug_bfd,
4105         find_separate_debug_file_by_buildid): Add debug output.
4106
4107 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
4108
4109         * gdbarch.sh (displaced_step_free_closure): Remove.
4110         * gdbarch.h, gdbarch.c: Re-generate.
4111         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
4112         displaced_step_free_closure.
4113         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
4114         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
4115         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
4116         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4117         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
4118         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4119         * arch-utils.h (simple_displaced_step_free_closure): Remove.
4120         * arch-utils.c (simple_displaced_step_free_closure): Remove.
4121         * infrun.c (displaced_step_clear): Call xfree instead of
4122         gdbarch_displaced_step_free_closure.
4123
4124 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
4125
4126         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
4127         NULL".
4128
4129 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
4130
4131         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
4132         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
4133         (mn10300_push_dummy_call): Likewise.
4134
4135 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4136
4137         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
4138
4139 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
4140
4141         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
4142
4143 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4144
4145         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
4146         able to start inferiors using a shell.
4147         (New remote packets): Announce new packet "QStartupWithShell".
4148         * remote.c: Add PACKET_QStartupWithShell.
4149         (extended_remote_create_inferior): Handle new
4150         PACKET_QStartupWithShell.
4151         (remote_protocol_features) <QStartupWithShell>: New entry for
4152         PACKET_QStartupWithShell.
4153         (_initialize_remote): Call "add_packet_config_cmd" for
4154         QStartupShell.
4155
4156 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4157             Pedro Alves  <palves@redhat.com>
4158
4159         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
4160         and "nat/fork-inferior.h".
4161         * common/common-inferior.h: New file, with contents from
4162         "gdb/inferior.h".
4163         * commom/common-utils.c: Include "common-utils.h".
4164         (stringify_argv): New function.
4165         * common/common-utils.h (stringify_argv): New prototype.
4166         * configure.nat: Add "fork-inferior.o" as a dependency for
4167         "*linux*", "fbsd*" and "nbsd*" hosts.
4168         * corefile.c (get_exec_file): Update comment.
4169         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
4170         instead of "startup_inferior".
4171         (darwin_create_inferior): Call "add_thread_silent" after
4172         "fork_inferior".
4173         * fork-child.c: Cleanup unnecessary includes.
4174         (SHELL_FILE): Move to "common/common-fork-child.c".
4175         (environ): Likewise.
4176         (exec_wrapper): Initialize.
4177         (get_exec_wrapper): New function.
4178         (breakup_args): Move to "common/common-fork-child.c"; rename to
4179         "breakup_args_for_exec".
4180         (escape_bang_in_quoted_argument): Move to
4181         "common/common-fork-child.c".
4182         (saved_ui): New variable.
4183         (prefork_hook): New function.
4184         (postfork_hook): Likewise.
4185         (postfork_child_hook): Likewise.
4186         (gdb_startup_inferior): Likewise.
4187         (fork_inferior): Move to "common/common-fork-child.c".  Update
4188         function to support gdbserver.
4189         (startup_inferior): Likewise.
4190         * gdbcore.h (get_exec_file): Remove declaration.
4191         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
4192         instead of "startup_inferior".  Call "add_thread_silent" after
4193         "fork_inferior".
4194         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
4195         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
4196         instead of "startup_inferior".  Call "add_thread_silent" after
4197         "fork_inferior".
4198         * inferior.h: Include "common-inferior.h".
4199         (trace_start_error): Move to "common/common-utils.h".
4200         (trace_start_error_with_name): Likewise.
4201         (fork_inferior): Move prototype to "nat/fork-inferior.h".
4202         (startup_inferior): Likewise.
4203         (gdb_startup_inferior): New prototype.
4204         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
4205         * nat/fork-inferior.h: New file.
4206         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
4207         instead of "startup_inferior".  Call "add_thread_silent" after
4208         "fork_inferior".
4209         * target.h (target_terminal_init): Move prototype to
4210         "target/target.h".
4211         (target_terminal_inferior): Likewise.
4212         (target_terminal_ours): Likewise.
4213         * target/target.h (target_terminal_init): New prototype, moved
4214         from "target.h".
4215         (target_terminal_inferior): Likewise.
4216         (target_terminal_ours): Likewise.
4217         * utils.c (gdb_flush_out_err): New function.
4218
4219 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4220
4221         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
4222         * common/common-gdbthread.h: New file, with parts from
4223         "gdb/gdbthread.h".
4224         * gdbthread.h: Include "common-gdbthread.h".
4225         (switch_to_thread): Moved to "common/common-gdbthread.h".
4226
4227 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
4228
4229         * Makefile.in (SFILES): Add "common/job-control.c".
4230         (HFILES_NO_SRCDIR): Add "common/job-control.h".
4231         (COMMON_OBS): Add "job-control.o".
4232         * common/job-control.c: New file, with contents from
4233         "gdb/inflow.c".
4234         * common/job-control.h: New file, with contents from "terminal.h".
4235         * fork-child.c: Include "job-control.h".
4236         * inflow.c: Include "job-control.h".
4237         (gdb_setpgid): Move to "common/common-inflow.c".
4238         (_initialize_inflow): Move setting of "job_control" to
4239         "handle_job_control".
4240         * terminal.h (job_control): Moved to "common/common-terminal.h".
4241         (gdb_setpgid): Likewise.
4242         * top.c: Include "job_control.h".
4243         * utils.c: Likewise.
4244         (job_control): Moved to "job-control.c".
4245
4246 2017-06-07  Pedro Alves  <palves@redhat.com>
4247
4248         * Makefile.in (SFILES): Add gdb_regex.c.
4249         (COMMON_OBS): Add gdb_regex.o.
4250         * ada-lang.c (ada_add_standard_exceptions)
4251         (ada_add_exceptions_from_frame, name_matches_regex)
4252         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
4253         parameter type to compiled_regex.  Adjust.
4254         (ada_exceptions_list): Use compiled_regex.
4255         * break-catch-throw.c (exception_catchpoint::pattern): Now a
4256         std::unique_ptr<compiled_regex>.
4257         (exception_catchpoint::~exception_catchpoint): Remove regfree
4258         call.
4259         (check_status_exception_catchpoint): Adjust to use compiled_regex.
4260         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
4261         * breakpoint.c (solib_catchpoint::compiled): Now a
4262         std::unique_ptr<compiled_regex>.
4263         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
4264         (check_status_catch_solib): Adjust to use compiled_regex.
4265         (add_solib_catchpoint): Adjust to use compiled_regex.
4266         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
4267         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
4268         compiled_regex reference.  Adjust to use it.
4269         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
4270         declaration.  Include "gdb_regex.h".
4271         (apropos_cmd): Change regex parameter to compiled_regex reference.
4272         * gdb_regex.c: New file.
4273         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
4274         declarations.
4275         (class compiled_regex): New.
4276         * linux-tdep.c: Include "common/gdb_optional.h".
4277         (struct mapping_regexes): New, factored out from
4278         mapping_is_anonymous_p, and adjusted to use compiled_regex.
4279         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
4280         gdb::optional and remove cleanups.  Adjust to compiled_regex.
4281         * probe.c: Include "common/gdb_optional.h".
4282         (collect_probes): Use compiled_regex and gdb::optional and remove
4283         cleanups.
4284         * skip.c: Include "common/gdb_optional.h".
4285         (skiplist_entry::compiled_function_regexp): Now a
4286         gdb::optional<compiled_regex>.
4287         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
4288         (free_skiplist_entry): Remove regfree call.
4289         (compile_skip_regexp, skip_rfunction_p): Adjust to use
4290         compiled_regex and gdb::optional.
4291         * symtab.c: Include "common/gdb_optional.h".
4292         (search_symbols): Use compiled_regex and gdb::optional.
4293         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
4294         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
4295         to gdb_regex.c.
4296
4297 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4298
4299         * regcache.c (regcache::save): Avoid buffer use.
4300         (regcache::dump): Likewise.
4301
4302 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4303
4304         * sh-tdep.c (sh_pseudo_register_read): Remove
4305         MAX_REGISTER_SIZE.
4306         (sh_pseudo_register_write): Likewise.
4307         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
4308         (sh64_pseudo_register_write): Likewise
4309
4310 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
4311
4312         * aarch64-tdep.c (aarch64_store_return_value): Use
4313         V_REGISTER_SIZE.
4314         (aarch64_pseudo_read_value): Likewise.
4315         (aarch64_pseudo_write): Likewise.
4316
4317 2017-06-06  Yao Qi  <yao.qi@linaro.org>
4318
4319         * regformats/regdef.h (set_register_cache): Remove the
4320         declaration.
4321
4322 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
4323
4324         * frame.c (frame_unwind_register_signed): Use
4325         frame_unwind_register_value.
4326
4327 2017-06-06  Pedro Alves  <palves@redhat.com>
4328
4329         PR breakpoints/21553
4330         * breakpoint.c (create_breakpoints_sal_default)
4331         (init_breakpoint_sal, create_breakpoint_sal): Use
4332         gdb::unique_xmalloc_ptr for string parameters.
4333         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4334         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
4335         (base_breakpoint_create_breakpoints_sal)
4336         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
4337         (strace_marker_create_breakpoints_sal)
4338         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
4339         string parameters.
4340         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
4341         gdb::unique_xmalloc_ptr for string parameters.
4342         (create_breakpoint): Constify 'extra_string' and 'cond_string'
4343         parameters.
4344
4345 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4346
4347         * alpha-tdep.c (alpha_register_to_value): Use
4348         get_frame_register_value.
4349         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
4350
4351 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
4352
4353         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
4354         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
4355         (ia64_value_to_register): Likewise.
4356         (ia64_extract_return_value): Likewise.
4357         (ia64_store_return_value): Likewise.
4358         (ia64_push_dummy_call): Likewise.
4359
4360 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
4361
4362         GDB 8.0 released.
4363
4364 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
4365
4366         * x86-linux-nat.c (struct arch_lwp_info): Remove.
4367
4368 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
4369
4370         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
4371         parameter.
4372         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
4373
4374 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
4375
4376         * event-loop.c (poll_timers): Unallocate timer using delete
4377         instead of xfree.
4378
4379 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4380
4381         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
4382         (struct breakpoint) <~breakpoint>: New.
4383         (struct watchpoint): Inherit from breakpoint.
4384         <~watchpoint>: New.
4385         <base>: Remove.
4386         (struct tracepoint): Inherit from breakpoint.
4387         <base>: Remove.
4388         * breakpoint.c (longjmp_breakpoint_ops): Remove.
4389         (struct longjmp_breakpoint): Inherit from breakpoint.
4390         <~longjmp_breakpoint>: New.
4391         <base>: Remove.
4392         (new_breakpoint_from_type): Remove casts.
4393         (watchpoint_in_thread_scope): Remove reference to base field.
4394         (watchpoint_del_at_next_stop): Likewise.
4395         (update_watchpoint): Likewise.
4396         (watchpoint_check): Likewise.
4397         (bpstat_check_watchpoint): Likewise.
4398         (set_longjmp_breakpoint): Likewise.
4399         (struct fork_catchpoint): Inherit from breakpoint.
4400         <base>: Remove.
4401         (struct solib_catchpoint): Inherit from breakpoint.
4402         <~solib_catchpoint>: New.
4403         <base>: Remove.
4404         (dtor_catch_solib): Change to ...
4405         (solib_catchpoint::~solib_catchpoint): ... this.
4406         (breakpoint_hit_catch_solib): Remove reference to base field.
4407         (add_solib_catchpoint): Likewise.
4408         (create_fork_vfork_event_catchpoint): Likewise.
4409         (struct exec_catchpoint): Inherit from breakpoint.
4410         <~exec_catchpoint>: New.
4411         <base>: Remove.
4412         (dtor_catch_exec): Change to ...
4413         (exec_catchpoint::~exec_catchpoint): ... this.
4414         (dtor_watchpoint): Change to ...
4415         (watchpoint::~watchpoint): ... this.
4416         (watch_command_1): Remove reference to base field.
4417         (catch_exec_command_1): Likewise.
4418         (base_breakpoint_dtor): Change to ...
4419         (breakpoint::~breakpoint): ... this.
4420         (base_breakpoint_ops): Remove dtor field value.
4421         (longjmp_bkpt_dtor): Change to ...
4422         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
4423         (strace_marker_create_breakpoints_sal): Remove reference to base
4424         field.
4425         (delete_breakpoint): Don't manually call breakpoint destructor.
4426         (create_tracepoint_from_upload): Remove reference to base field.
4427         (trace_pass_set_count): Likewise.
4428         (initialize_breakpoint_ops): Don't initialize
4429         momentary_breakpoint_ops, don't set dtors.
4430         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
4431         <~ada_catchpoint>: New.
4432         <base>: Remove.
4433         (create_excep_cond_exprs): Remove reference to base field.
4434         (dtor_exception): Change to ...
4435         (ada_catchpoint::~ada_catchpoint): ... this.
4436         (dtor_catch_exception): Remove.
4437         (dtor_catch_exception_unhandled): Remove.
4438         (dtor_catch_assert): Remove.
4439         (create_ada_exception_catchpoint): Remove reference to base
4440         field.
4441         (initialize_ada_catchpoint_ops): Don't set dtors.
4442         * break-catch-sig.c (struct signal_catchpoint): Inherit from
4443         breakpoint.
4444         <~signal_catchpoint>: New.
4445         <base>: Remove.
4446         (signal_catchpoint_dtor): Change to ...
4447         (signal_catchpoint::~signal_catchpoint): ... this.
4448         (create_signal_catchpoint): Remove reference to base field.
4449         (initialize_signal_catchpoint_ops): Don't set dtor.
4450         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
4451         from breakpoint.
4452         <~syscall_catchpoint>: New.
4453         <base>: Remove.
4454         (dtor_catch_syscall): Change to ...
4455         (syscall_catchpoint::~syscall_catchpoint): ... this.
4456         (create_syscall_event_catchpoint): Remove reference to base
4457         field.
4458         (initialize_syscall_catchpoint_ops): Don't set dtor.
4459         * break-catch-throw.c (struct exception_catchpoint): Inherit
4460         from breakpoint.
4461         <~exception_catchpoint>: New.
4462         <base>: Remove.
4463         (dtor_exception_catchpoint): Change to ...
4464         (exception_catchpoint::~exception_catchpoint): ... this.
4465         (handle_gnu_v3_exceptions): Remove reference to base field.
4466         (initialize_throw_catchpoint_ops): Don't set dtor.
4467         * ctf.c (ctf_get_traceframe_address): Remove reference to base
4468         field.
4469         * remote.c (remote_get_tracepoint_status): Likewise.
4470         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
4471         * tracefile.c (tracefile_fetch_registers): Likewise.
4472         * tracepoint.c (actions_command): Likewise.
4473         (validate_actionline): Likewise.
4474         (tfind_1): Likewise.
4475         (get_traceframe_location): Likewise.
4476         (find_matching_tracepoint_location): Likewise.
4477         (parse_tracepoint_status): Likewise.
4478         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
4479
4480 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4481
4482         * breakpoint.c (struct longjmp_breakpoint): New struct.
4483         (is_tracepoint_type): Change return type to bool.
4484         (is_longjmp_type): New function.
4485         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
4486         (set_raw_breakpoint_without_location): Use
4487         new_breakpoint_from_type.
4488         (set_raw_breakpoint): Likewise.
4489
4490 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
4491
4492         * breakpoint.c (new_breakpoint_from_type): New function.
4493         (create_breakpoint_sal): Use new_breakpoint_from_type and
4494         unique_ptr.
4495         (create_breakpoint): Likewise.
4496
4497 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
4498
4499         * memattr.c (mem_info_command): Rename to ...
4500         (info_mem_command): ... this.
4501         (mem_enable_command): Rename to ...
4502         (enable_mem_command): ... this.
4503         (mem_disable_command): Rename to ...
4504         (disable_mem_command): ... this.
4505         (mem_delete_command): Rename to ...
4506         (delete_mem_command): ... this.
4507         (_initialize_mem): Adjust function names.
4508
4509 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
4510
4511         * btrace.c (handle_pt_insn_events): New.
4512         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
4513         STATUS.  Split into this and ...
4514         (handle_pt_insn_event_flags): ... this.
4515
4516 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
4517
4518         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
4519         and struct pt_insn.resynced.
4520         * configure: Regenerated.
4521         * config.in: Regenerated.
4522
4523 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4524
4525         * btrace.c (ftrace_find_call_by_number): New function.
4526         (ftrace_new_function): Store objects, not pointers.
4527         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
4528         ftrace_new_gap, ftrace_update_function,
4529         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
4530         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
4531         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
4532         btrace_ends_with_single_insn, btrace_call_get): Account for
4533         btrace_thread_info::functions now storing objects.
4534         * btrace.h (struct btrace_thread_info): Add constructor.
4535         (struct btrace_thread_info) <functions>: Make std::vector.
4536         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
4537         Initialize with default values.
4538         * record-btrace.c (record_btrace_frame_sniffer): Account for
4539         btrace_thread_info::functions now storing objects.
4540
4541 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4542
4543         * btrace.c: Remove typedef bfun_s.
4544         (ftrace_new_gap): Directly add gaps to the list of gaps.
4545         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
4546         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
4547         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
4548         instead of gdb VEC.
4549
4550 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4551
4552         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
4553         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
4554         with btrace_thread_info::next_segment and
4555         btrace_thread_info::prev_segment.
4556         * btrace.h: Remove struct btrace_func_link.
4557         (struct btrace_function): Replace pair of function segment pointers
4558         with pair of indices.
4559         * python/py-record-btrace.c (btpy_call_prev_sibling,
4560         btpy_call_next_sibling): Replace references to
4561         btrace_thread_info::segment with btrace_thread_info::next_segment and
4562         btrace_thread_info::prev_segment.
4563         * record-btrace.c (record_btrace_frame_this_id): Use
4564         btrace_find_call_by_number.
4565
4566 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4567
4568         * btrace.c (ftrace_new_function, ftrace_fixup_level,
4569         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
4570         btrace_insn_next, btrace_insn_prev): Remove references to
4571         btrace_thread_info::flow.
4572         * btrace.h (struct btrace_function): Remove FLOW.
4573
4574 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4575
4576         * btrace.c (ftrace_find_call_by_number): New function.
4577         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
4578         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
4579         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
4580         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
4581         index.
4582         * btrace.h (struct btrace_function): Turn UP into an index.
4583         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
4584         as an index.
4585         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
4586         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
4587         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
4588
4589 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4590
4591         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4592         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4593         ftrace_update_function, ftrace_compute_global_level_offset,
4594         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
4595         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
4596         btrace_insn_end, btrace_is_empty): Remove references to
4597         btrace_thread_info::begin and btrace_thread_info::end.
4598         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
4599         (struct btrace_thread_info) <functions>: Adjust comment.
4600         * record-btrace.c (record_btrace_start_replaying): Remove reference to
4601         btrace_thread_info::begin.
4602
4603 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4604
4605         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
4606         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
4607         ftrace_update_function): Remove arguments that implicitly were always
4608         BTINFO->END.
4609         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
4610         Don't pass BTINFO->END.
4611
4612 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4613
4614         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
4615         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
4616         btrace_find_insn_by_number): Replace function segment pointer with
4617         index.
4618         (btrace_insn_cmp): Simplify.
4619         * btrace.h: (struct btrace_insn_iterator) Rename index to
4620         insn_index.  Replace function segment pointer with index into function
4621         segment vector.
4622         * record-btrace.c (record_btrace_call_history): Replace function
4623         segment pointer use with index.
4624         (record_btrace_frame_sniffer): Retrieve function call segment through
4625         vector.
4626         (record_btrace_set_replay): Remove defunc't safety check.
4627
4628 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4629
4630         * btrace.c (btrace_ends_with_single_insn): New function.
4631         (btrace_call_get, btrace_call_number, btrace_call_begin,
4632         btrace_call_end, btrace_call_next, btrace_call_prev,
4633         btrace_find_call_by_number): Use index into call segment vector
4634         instead of pointer.
4635         (btrace_call_cmp): Simplify.
4636         * btrace.h (struct btrace_call_iterator): Replace function call segment
4637         pointer with index into vector.
4638         * record-btrace.c (record_btrace_call_history): Use index instead of
4639         pointer.
4640
4641 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4642
4643         * btrace.c (btrace_insn_begin, btrace_insn_end,
4644         btrace_find_insn_by_number): Add btinfo to iterator.
4645         * btrace.h (struct btrace_insn_iterator): Add btinfo.
4646
4647 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4648
4649         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
4650         and save pointers directly.
4651         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
4652         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
4653         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
4654         changed signature of functions.
4655         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
4656         (btrace_fetch): Remove code that adds btrace_function pointers to
4657         vector of btrace_functions.
4658         (btrace_clear): Simplify freeing vector of btrace_functions.
4659
4660 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
4661
4662         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
4663         Replace VEC_* with std::vector functions.
4664         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
4665         (struct btrace_thread_info)<functions>: Change type to std::vector.
4666
4667 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
4668
4669         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
4670         "Removed targets and native configurations" up.  Merge duplicate
4671         "New commands" sub-sections.  Add "New options" sub-sections.
4672
4673 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
4674
4675         * defs.h (copy_integer_to_size): New declaration.
4676         * findvar.c (copy_integer_to_size): New function.
4677         (do_cint_test): New selftest function.
4678         (copy_integer_to_size_test): Likewise.
4679         (_initialize_findvar): Likewise.
4680         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
4681         (mips_fbsd_collect_reg): Use raw_collect_integer.
4682         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
4683         (mips64_fill_gregset): Use raw_collect_integer
4684         (mips64_fill_fpregset): Use raw_supply_integer.
4685         * regcache.c (regcache::raw_supply_integer): New function.
4686         (regcache::raw_collect_integer): Likewise.
4687         * regcache.h: (regcache::raw_supply_integer): New declaration.
4688         (regcache::raw_collect_integer): Likewise.
4689
4690 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4691
4692         * Makefile.in (SFILES): Add gdbarch-selftests.c.
4693         (COMMON_OBS): Add gdbarch-selftests.o.
4694         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
4695         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
4696         * gdbarch-selftests.c: New file.
4697         * regcache.h (regcache) <~regcache>: Mark it virtual if
4698         GDB_SELF_TEST.
4699         <raw_write>: Likewise.
4700
4701 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4702
4703         * regcache.c (current_regcache): Change it to
4704         regcache::current_regcache.
4705         (regcache_observer_target_changed): Update.
4706         (regcache_thread_ptid_changed): Make it a regcache static
4707         method.
4708         (regcache_thread_ptid_changed): Update.
4709         (class regcache_access): New.
4710         (current_regcache_test): Update.
4711         (_initialize_regcache): Update.
4712         * regcache.h: Include forward_list.
4713         (regcache): Declare regcache_thread_ptid_changed and declare
4714         registers_changed_ptid as friend.
4715
4716 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4717
4718         * i387-tdep.c (i387_register_to_value): Use register_size
4719         instead of TYPE_LENGTH.
4720         * m68k-tdep.c (m68k_register_to_value): Likewise.
4721
4722 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4723
4724         * i387-tdep.c (i387_convert_register_p): Return false if type
4725         code isn't TYPE_CODE_FLT.
4726
4727 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4728
4729         * alpha-tdep.c (alpha_convert_register_p): Return true if type
4730         length is 4.
4731         (alpha_register_to_value): Remove type length check.
4732         (alpha_value_to_register): Likewise.
4733
4734 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4735
4736         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
4737         TYPE_CODE_FLT.
4738
4739 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4740
4741         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
4742         TYPE_CODE_FLT or not.
4743
4744 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4745
4746         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
4747         * avr-tdep.c (avr_gdbarch_init): Likewise.
4748         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4749         * cris-tdep.c (cris_gdbarch_init): Likewise.
4750         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4751         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4752         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4753         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
4754         * mep-tdep.c (mep_gdbarch_init): Likewise.
4755         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4756         * mips-tdep.c (mips_gdbarch_init): Likewise.
4757         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4758         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4759         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4760         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4761         * v850-tdep.c (v850_gdbarch_init): Likewise.
4762
4763 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4764
4765         * selftest-arch.c (tests_with_arch): Call registers_changed
4766         and reinit_frame_cache.
4767         * selftest.c (run_self_tests): Likewise.
4768
4769 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4770
4771         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
4772         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
4773
4774 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4775
4776         * rl78-tdep.c (rl78_gdbarch_init): Don't call
4777         set_gdbarch_print_insn.
4778
4779 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4780
4781         * h8300-tdep.c (h8300_gdbarch_init): Don't call
4782         set_gdbarch_print_insn.
4783
4784 2017-05-24  Yao Qi  <yao.qi@linaro.org>
4785
4786         * alpha-tdep.c (alpha_gdbarch_init): Don't call
4787         set_gdbarch_print_insn.
4788         * arc-tdep.c (arc_gdbarch_init): Likewise.
4789         * arch-utils.c: include dis-asm.h.
4790         (default_print_insn): New function.
4791         * arch-utils.h (default_print_insn): Declare.
4792         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
4793         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
4794         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
4795         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
4796         * frv-tdep.c (frv_gdbarch_init): Likewise.
4797         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4798         * gdbarch.sh (print_insn): Use default_print_insn.
4799         * gdbarch.c: Regenerated.
4800         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
4801         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
4802         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
4803         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
4804         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4805         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
4806         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
4807         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
4808         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
4809         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
4810         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
4811         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4812         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
4813         * mt-tdep.c (mt_gdbarch_init): Likewise.
4814         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4815         * nios2-tdep.c (nios2_print_insn): Remove.
4816         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
4817         * rx-tdep.c (rx_gdbarch_init): Likewise.
4818         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
4819         * score-tdep.c (score_print_insn): Remove.
4820         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
4821         * sh-tdep.c (sh_gdbarch_init): Likewise.
4822         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
4823         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4824         * tic6x-tdep.c (tic6x_print_insn): Remove.
4825         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
4826         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
4827         * v850-tdep.c (v850_gdbarch_init): Likewise.
4828         * vax-tdep.c (vax_gdbarch_init): Likewise.
4829         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4830         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
4831
4832 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
4833
4834         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
4835         (MIPS_FP0_REGNUM): Remove.
4836         (MIPS_FSR_REGNUM): Remove.
4837         (mips_fbsd_supply_fpregs): Use mips_regnum.
4838         (mips_fbsd_supply_gregs): Likewise.
4839         (mips_fbsd_collect_fpregs): Likewise.
4840         (mips_fbsd_collect_gregs): Likewise.
4841
4842 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
4843
4844         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
4845         (getpfpregs_supplies): New function.
4846         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
4847         getfpregs_supplies.
4848         (mips_fbsd_store_inferior_registers): Likewise.
4849
4850 2017-05-22  Pedro Alves <palves@redhat.com>
4851
4852         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
4853         maintainer.
4854
4855 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
4856
4857         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
4858         (store_register): Likewise.
4859         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
4860         (get_decimal_float_return_value): Likewise.
4861         (do_ppc_sysv_return_value): Likewise.
4862         (ppc64_sysv_abi_push_integer): Likewise.
4863         (ppc64_sysv_abi_push_freg): Likewise.
4864         (ppc64_sysv_abi_return_value_base): Likewise.
4865         (ppc64_sysv_abi_return_value): Likewise.
4866         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
4867         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
4868         * rs6000-nat.c: Likewise.
4869         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
4870         (rs6000_value_to_register): Likewise.
4871         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
4872
4873 2017-05-21  Tom Tromey  <tom@tromey.com>
4874
4875         PR rust/21466:
4876         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
4877         arrays as "[T]", not "[T; ]".
4878
4879 2017-05-19  Tom Tromey  <tom@tromey.com>
4880
4881         PR rust/21484:
4882         * rust-lang.c (exp_descriptor_rust): New function.
4883         (rust_language_defn): Use it.
4884         * p-lang.c (pascal_language_defn): Update.
4885         * opencl-lang.c (opencl_language_defn): Update.
4886         * objc-lang.c (objc_language_defn): Update.
4887         * m2-lang.c (m2_language_defn): Update.
4888         * language.h (struct language_defn)
4889         <la_watch_location_expression>: New member.
4890         * language.c (unknown_language_defn, auto_language_defn)
4891         (local_language_defn): Update.
4892         * go-lang.c (go_language_defn): Update.
4893         * f-lang.c (f_language_defn): Update.
4894         * d-lang.c (d_language_defn): Update.
4895         * c-lang.h (c_watch_location_expression): Declare.
4896         * c-lang.c (c_watch_location_expression): New function.
4897         (c_language_defn, cplus_language_defn, asm_language_defn)
4898         (minimal_language_defn): Use it.
4899         * breakpoint.c (watch_command_1): Call
4900         la_watch_location_expression.
4901         * ada-lang.c (ada_language_defn): Update.
4902
4903 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4904
4905         PR tui/21482
4906         * gdb_curses.h (NOMACROS): Define.
4907         (NCURSES_NOMACROS): Define.
4908
4909 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4910
4911         PR tui/21482
4912         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
4913         arg to char *.
4914         * tui/tui-wingeneral.c (box_win): Likewise.
4915         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
4916         (tui_show_source_line): Likewise.
4917         (tui_show_exec_info_content): Likewise.
4918
4919 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4920
4921         * sparc-tdep.c (sparc_structure_return_p)
4922         (sparc_arg_on_registers_p): New functions.
4923         (sparc32_store_arguments): Use them.
4924         * sparc64-tdep.c (sparc64_16_byte_align_p)
4925         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
4926         Handle TYPE_CODE_ARRAY.
4927
4928 2017-05-17  Yao Qi  <yao.qi@linaro.org>
4929
4930         * cli/cli-decode.c (add_alias_cmd): New function.
4931         * command.h (add_alias_cmd): Declare.
4932         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
4933         instead call add_alias_cmd.
4934
4935 2017-05-17  Pedro Alves  <palves@redhat.com>
4936
4937         * Makefile.in (nat_extra_makefile_frag): Rename to ...
4938         (nat_makefile_frag): ... this.  All references updated.
4939         * configure.ac: Likewise.
4940         * configure.nat: Likewise.  Enhance comments.
4941         * configure: Regenerate.
4942
4943 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4944
4945         * procfs.c (procfs_create_inferior): Change prototype to match
4946         definition.
4947
4948 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
4949
4950         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
4951         C++ compiler warning.
4952
4953 2017-05-12  Tom Tromey  <tom@tromey.com>
4954
4955         PR rust/21483:
4956         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
4957         recurse, just call value_struct_elt directly.
4958
4959 2017-05-12  Tom Tromey  <tom@tromey.com>
4960
4961         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
4962         OP_RUST_ARRAY>: Fix.
4963
4964 2017-05-12  Tom Tromey  <tom@tromey.com>
4965
4966         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
4967
4968 2017-05-09  Yao Qi  <yao.qi@linaro.org>
4969
4970         * regcache.c: Include <forward_list>.
4971         (struct regcache_list): Remove.
4972         (current_regcache): Update.
4973         (get_thread_arch_aspace_regcache): Update for std::forward_list.
4974         (regcache_thread_ptid_changed): Likewise.
4975         (registers_changed_ptid): Likewise.
4976         (current_regcache_size): Likewise.
4977
4978 2017-05-09  Yao Qi  <yao.qi@linaro.org>
4979
4980         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
4981         (current_regcache_size): New function.
4982         (current_regcache_test): New function.
4983         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
4984
4985 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4986
4987         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
4988         (print_gp_register_row): Use get_frame_register_value.
4989
4990 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4991
4992         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
4993         (mips_supply_fpregset): Likewise.
4994         (mips64_supply_gregset): Likewise.
4995
4996 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
4997
4998         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
4999         regcache->raw_supply_zeroed.
5000
5001 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5002
5003         * configure.nat: Rearrange 'case' statements to match
5004         host before cpu.
5005
5006 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5007
5008         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
5009         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
5010         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
5011         "@nat_extra_makefile_frag@".
5012         (Makefile): Remove dependency on "@frags@".
5013         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
5014         (data-directory/Makefile): Likewise.
5015         * config/aarch64/linux.mh: Deleted; moved contents to
5016         "gdb/configure.nat".
5017         * config/alpha/alpha-linux.mh: Likewise.
5018         * config/alpha/nbsd.mh: Likewise.
5019         * config/arm/linux.mh: Likewise.
5020         * config/arm/nbsdelf.mh: Likewise.
5021         * config/i386/cygwin.mh: Likewise.
5022         * config/i386/cygwin64.mh: Likewise.
5023         * config/i386/darwin.mh: Likewise.
5024         * config/i386/fbsd.mh: Likewise.
5025         * config/i386/fbsd64.mh: Likewise.
5026         * config/i386/go32.mh: Likewise.
5027         * config/i386/i386gnu.mh: Likewise.
5028         * config/i386/i386sol2.mh: Likewise.
5029         * config/i386/linux.mh: Likewise.
5030         * config/i386/linux64.mh: Likewise.
5031         * config/i386/mingw.mh: Likewise.
5032         * config/i386/mingw64.mh: Likewise.
5033         * config/i386/nbsd64.mh: Likewise.
5034         * config/i386/nbsdelf.mh: Likewise.
5035         * config/i386/nto.mh: Likewise.
5036         * config/i386/obsd.mh: Likewise.
5037         * config/i386/obsd64.mh: Likewise.
5038         * config/i386/sol2-64.mh: Likewise.
5039         * config/ia64/linux.mh: Likewise.
5040         * config/m32r/linux.mh: Likewise.
5041         * config/m68k/linux.mh: Likewise.
5042         * config/m68k/nbsdelf.mh: Likewise.
5043         * config/m68k/obsd.mh: Likewise.
5044         * config/m88k/obsd.mh: Likewise.
5045         * config/mips/fbsd.mh: Likewise.
5046         * config/mips/linux.mh: Likewise.
5047         * config/mips/nbsd.mh: Likewise.
5048         * config/mips/obsd64.mh: Likewise.
5049         * config/pa/linux.mh: Likewise.
5050         * config/pa/nbsd.mh: Likewise.
5051         * config/pa/obsd.mh: Likewise.
5052         * config/powerpc/aix.mh: Likewise.
5053         * config/powerpc/fbsd.mh: Likewise.
5054         * config/powerpc/linux.mh: Likewise.
5055         * config/powerpc/nbsd.mh: Likewise.
5056         * config/powerpc/obsd.mh: Likewise.
5057         * config/powerpc/ppc64-linux.mh: Likewise.
5058         * config/powerpc/spu-linux.mh: Likewise.
5059         * config/s390/linux.mh: Likewise.
5060         * config/sh/nbsd.mh: Likewise.
5061         * config/sparc/fbsd.mh: Likewise.
5062         * config/sparc/linux.mh: Likewise.
5063         * config/sparc/linux64.mh: Likewise.
5064         * config/sparc/nbsd64.mh: Likewise.
5065         * config/sparc/nbsdelf.mh: Likewise.
5066         * config/sparc/obsd64.mh: Likewise.
5067         * config/sparc/sol2.mh: Likewise.
5068         * config/tilegx/linux.mh: Likewise.
5069         * config/vax/nbsdelf.mh: Likewise.
5070         * config/vax/obsd.mh: Likewise.
5071         * config/xtensa/linux.mh: Likewise.
5072         * config/i386/i386gnu.mn: New file, with excerpts from
5073         "config/i386/i386gnu.mh".
5074         * configure: Regenerate.
5075         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
5076         *.mh files under "gdb/config".
5077         * configure.nat: New file, with contents from the
5078         "gdb/config/*/*.mh" files.
5079
5080 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
5081
5082         * btrace.c (btrace_clear): Free insn vector.
5083
5084 2017-05-05  Pedro Alves  <palves@redhat.com>
5085
5086         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
5087         * configure: Regenerate.
5088
5089 2017-05-04  Pedro Alves  <palves@redhat.com>
5090
5091         * Makefile.in (SFILES): Add progspace-and-thread.c.
5092         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
5093         (COMMON_OBS): Add progspace-and-thread.o.
5094         * breakpoint.c: Include "progspace-and-thread.h".
5095         (update_inserted_breakpoint_locations)
5096         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
5097         Use scoped_restore_current_pspace_and_thread.
5098         (create_std_terminate_master_breakpoint): Use
5099         scoped_restore_current_program_space.
5100         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
5101         (print_breakpoint_location): Use
5102         scoped_restore_current_program_space.
5103         (bp_loc_is_permanent): Use
5104         scoped_restore_current_pspace_and_thread.
5105         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
5106         (download_tracepoint_locations): Use
5107         scoped_restore_current_pspace_and_thread.
5108         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
5109         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
5110         (enum step_over_calls_kind): Moved from inferior.h.
5111         (class scoped_restore_current_thread): New class.
5112         * gdbthread.h (make_cleanup_restore_current_thread): Delete
5113         declaration.
5114         (scoped_restore_current_thread): New class.
5115         * infcmd.c: Include "common/gdb_optional.h".
5116         (continue_1, proceed_after_attach): Use
5117         scoped_restore_current_thread.
5118         (notice_new_inferior): Use scoped_restore_current_thread.
5119         * inferior.c: Include "progspace-and-thread.h".
5120         (restore_inferior, save_current_inferior): Delete.
5121         (add_inferior_command, clone_inferior_command): Use
5122         scoped_restore_current_pspace_and_thread.
5123         * inferior.h (scoped_restore_current_inferior): New class.
5124         * infrun.c: Include "progspace-and-thread.h" and
5125         "common/gdb_optional.h".
5126         (follow_fork_inferior): Use
5127         scoped_restore_current_pspace_and_thread.
5128         (scoped_restore_exited_inferior): New class.
5129         (handle_vfork_child_exec_or_exit): Use
5130         scoped_restore_exited_inferior,
5131         scoped_restore_current_pspace_and_thread,
5132         scoped_restore_current_thread and scoped_restore.
5133         (fetch_inferior_event): Use scoped_restore_current_thread.
5134         * linespec.c (decode_line_full, decode_line_1): Use
5135         scoped_restore_current_program_space.
5136         * mi/mi-main.c: Include "progspace-and-thread.h".
5137         (exec_continue): Use scoped_restore_current_thread.
5138         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
5139         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
5140         * proc-service.c (ps_pglobal_lookup): Use
5141         scoped_restore_current_program_space.
5142         * progspace-and-thread.c: New file.
5143         * progspace-and-thread.h: New file.
5144         * progspace.c (release_program_space, clone_program_space): Use
5145         scoped_restore_current_program_space.
5146         (restore_program_space, save_current_program_space)
5147         (save_current_space_and_thread): Delete.
5148         (switch_to_program_space_and_thread): Moved to
5149         progspace-and-thread.c.
5150         * progspace.h (save_current_program_space)
5151         (save_current_space_and_thread): Delete declarations.
5152         (scoped_restore_current_program_space): New class.
5153         * remote.c (remote_btrace_maybe_reopen): Use
5154         scoped_restore_current_thread.
5155         * symtab.c: Include "progspace-and-thread.h".
5156         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
5157         * thread.c (print_thread_info_1): Use
5158         scoped_restore_current_thread.
5159         (struct current_thread_cleanup): Delete.
5160         (do_restore_current_thread_cleanup)
5161         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
5162         (scoped_restore_current_thread::~scoped_restore_current_thread):
5163         ... this new dtor.
5164         (make_cleanup_restore_current_thread): Rename/convert to ...
5165         (scoped_restore_current_thread::scoped_restore_current_thread):
5166         ... this new ctor.
5167         (thread_apply_all_command): Use scoped_restore_current_thread.
5168         (thread_apply_command): Use scoped_restore_current_thread.
5169         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
5170         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
5171
5172 2017-05-04  Pedro Alves  <palves@redhat.com>
5173
5174         * thread.c (make_cleanup_restore_current_thread): Move
5175         find_thread_ptid call before the is_stopped call.  Assert that the
5176         thread is found.  Replace is_stopped call by checking the thread's
5177         state directly.  Remove unnecessary NULL-thread check.
5178
5179 2017-05-04  Pedro Alves  <palves@redhat.com>
5180
5181         * corelow.c (thread_section_name): New class.
5182         (get_core_register_section, get_core_siginfo): Use it.
5183
5184 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5185
5186         * corelow.c (sniff_core_bfd): Remove extra semicolon.
5187         (get_core_register_section): Remove xfree of NULL pointer.
5188
5189 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
5190
5191         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
5192         * regcache.c (regcache::raw_supply_zeroed): New function.
5193         * regcache.h (regcache::raw_supply_zeroed): New declaration.
5194
5195 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
5196
5197         * gdbarch.sh: Remove commented out definition of
5198         TARGET_CHAR_BIT.
5199         * gdbarch.h: Re-generate.
5200
5201 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
5202
5203         * configure: Regenerate.
5204
5205 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
5206
5207         * solib-target.c (solib_target_relocate_section_addresses):
5208         Remove num_section_bases, num_bases, segment_bases variables.
5209
5210 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5211
5212         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
5213
5214 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5215
5216         * solib-target.c: Include <vector>
5217         (struct lm_info_target) <~lm_info_target>: Remove.
5218         <segment_bases, section_bases>: Change type to
5219         std::vector<CORE_ADDR>.
5220         (library_list_start_segment, library_list_start_section,
5221         library_list_end_library,
5222         solib_target_relocate_section_addresses): Adjust.
5223
5224 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5225
5226         * gdbarch.sh (software_single_step): Change return type to
5227         std::vector<CORE_ADDR>.
5228         * gdbarch.c, gdbarch.h: Re-generate.
5229         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
5230         Adjust.
5231         (arm_deal_with_atomic_sequence_raw): Adjust.
5232         (thumb_get_next_pcs_raw): Adjust.
5233         (arm_get_next_pcs_raw): Adjust.
5234         (arm_get_next_pcs): Adjust.
5235         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
5236         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
5237         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
5238         (alpha_software_single_step): Adjust.
5239         * alpha-tdep.h (alpha_software_single_step): Adjust.
5240         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
5241         * arm-tdep.c (arm_software_single_step): Adjust.
5242         (arm_breakpoint_kind_from_current_state): Adjust.
5243         * arm-tdep.h (arm_software_single_step): Adjust.
5244         * breakpoint.c (insert_single_step_breakpoint): Adjust.
5245         * cris-tdep.c (cris_software_single_step): Adjust.
5246         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
5247         (micromips_deal_with_atomic_sequence): Adjust.
5248         (deal_with_atomic_sequence): Adjust.
5249         (mips_software_single_step): Adjust.
5250         * mips-tdep.h (mips_software_single_step): Adjust.
5251         * moxie-tdep.c (moxie_software_single_step): Adjust.
5252         * nios2-tdep.c (nios2_software_single_step): Adjust.
5253         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
5254         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
5255         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
5256         * s390-linux-tdep.c (s390_software_single_step): Adjust.
5257         * sparc-tdep.c (sparc_software_single_step): Adjust.
5258         * spu-tdep.c (spu_software_single_step): Adjust.
5259         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
5260
5261 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
5262
5263         * gdbarch.sh: Use semi-colon as field separator instead of colon.
5264         * gdbarch.h: Re-generate.
5265
5266 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5267
5268         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
5269         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
5270         * python/py-instruction.c, python/py-instruction.h: New file.
5271         * python/py-record.c: Add py-instruction.h include.
5272         (gdbpy_initialize_record): Make gdb.Instruction a super class of
5273         gdb.RecordInstruction.
5274         * python/python-internal.h: Add gdbpy_initialize_instruction
5275         declaration.
5276         * python/python.c (do_start_initialization): Add
5277         gdbpy_initialize_instruction.
5278
5279 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5280
5281         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
5282         Remove.
5283         (btrace_func_from_recpy_func): New function.
5284         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
5285         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
5286         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
5287         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
5288         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
5289         Also, use new helper functions.
5290         (btpy_list_item): Use new helper functions.
5291         (recpy_bt_function_call_history): Use new type name.
5292         (btpy_call_getset): Remove.
5293         (gdbpy_initialize_btrace): Remove code to initialize
5294         gdb.BtraceFunctionCall.
5295         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
5296         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
5297         recpy_bt_func_prev, recpy_bt_func_next): New export.
5298         * python/py-record.c (recpy_func_type): New static object.
5299         (recpy_func_new, recpy_func_level, recpy_func_symbol,
5300         recpy_func_instructions, recpy_func_up, recpy_func_prev,
5301         recpy_func_next): New function.
5302         (recpy_element_hash, recpy_element_richcompare): Updated comment.
5303         (recpy_func_getset): New static object.
5304         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
5305         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
5306
5307 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5308
5309         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
5310         (btpy_object, btpy_insn_type, btpy_new): Remove.
5311         (btpy_list_object): Use gdb.RecordInstruction type instead of
5312         gdb.BtraceInstruction type.
5313         (btrace_insn_from_recpy_insn): New function.
5314         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
5315         btpy_new.
5316         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
5317         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
5318         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
5319         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
5320         instead of btpy_object.
5321         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5322         btpy_insn_data, btpy_insn_decode): Rename to ...
5323         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
5324         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
5325         recpy_bt_insn_decode): This.  Also, use new helper functions.
5326         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
5327         recpy_insn_type.
5328         (btpy_insn_getset): Remove.
5329         (gdbpy_initialize_btrace): Remove code to initialize
5330         gdb.BtraceInstruction.  Use recpy_element_object.
5331         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
5332         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
5333         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
5334         * python/py-record.c (recpy_insn_type): New static object.
5335         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
5336         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
5337         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
5338         New function.
5339         (recpy_insn_getset): New static object.
5340         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
5341         * python/py-record.h (recpy_element_object): New typedef.
5342         (recpy_insn_type, recpy_insn_new): New export.
5343
5344 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5345
5346         * py-record-btrace.c (btpy_insn_new): Removed.
5347         (btpy_insn_or_gap_new): New function.
5348         (btpy_insn_error): Removed.
5349         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
5350         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
5351         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
5352         btpy_insn_or_gap_new instead of btpy_insn_new.
5353         (btpy_insn_getset): Remove btpy_insn_error.
5354         * py-record.c (recpy_gap_type): New static object.
5355         (recpy_gap_object): New typedef.
5356         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
5357         recpy_gap_reason_string): New function.
5358         (recpy_gap_getset): New static object.
5359         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
5360         * py-record.h (recpy_gap_new): New export.
5361
5362 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5363
5364         * python/py-record.c (recpy_ptid): Remove.
5365         (recpy_record_getset): Remove recpy_ptid.
5366
5367 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5368
5369         * btrace.c (btrace_fetch): Set inferior_ptid.
5370         * python/py-record-btrace.c: Add "py-record.h" include.
5371         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
5372         recpy_bt_end, recpy_bt_instruction_history,
5373         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
5374         in gdb.Record object instead of current ptid.
5375         * python/py-record.c: Include new "py-record.h" file.
5376         (recpy_record_object): Moved to py-record.h.
5377         * python/py-record.h: New file.
5378
5379 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
5380
5381         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
5382         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
5383         indentation.
5384
5385 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
5386
5387         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
5388         the past maintainers section.
5389
5390 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5391
5392         * infcmd.c (get_return_value): Use regcache ctor, and remove
5393         cleanup.
5394
5395 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5396             Pedro Alves  <palves@redhat.com>
5397
5398         * regcache.c (regcache::regcache): New tag dispatch ctor.
5399         (do_cooked_read): Moved above.
5400         (regcache_dup): Use the tag dispatch ctor..
5401         * regcache.h (regcache): Declare ctor, delete copy ctor and
5402         assignment operator, remove friend regcache_dup.
5403
5404 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5405
5406         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
5407         call method save instead of regcache_cpy.
5408         * regcache.h (struct regcache): Make regcache_dup a friend.
5409
5410 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5411
5412         * regcache.c (struct regcache): Move to regcache.h
5413         (regcache::arch): New method.
5414         (regcache_get_ptid): Update.
5415         (get_regcache_arch): Call arch method.
5416         (get_regcache_aspace): Call method aspace.
5417         (register_buffer): Change it to method.
5418         (regcache_save): Change it to regcache::save.
5419         (regcache_restore): Likewise.
5420         (regcache_cpy_no_passthrough): Remove the declaration.
5421         (regcache_cpy): Call methods restore and cpy_no_passthrough.
5422         (regcache_cpy_no_passthrough): Change it to method
5423         cpy_no_passthrough.
5424         (regcache_register_status): Change it to method
5425         get_register_status.
5426         (regcache_invalidate): Change it to method invalidate.
5427         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
5428         (regcache_raw_update): Change it to method raw_update.
5429         (regcache_raw_read): Likewise.
5430         (regcache_raw_read_signed): Likewise.
5431         (regcache_raw_read_unsigned): Likewise.
5432         (regcache_raw_write_signed): Likewise.
5433         (regcache_raw_write_unsigned): Likewise.
5434         (regcache_cooked_read): Likewise.
5435         (regcache_cooked_read_value): Likewise.
5436         (regcache_cooked_read_signed): Likewise.
5437         (regcache_cooked_read_unsigned): Likewise.
5438         (regcache_cooked_write_signed): Likewise.
5439         (regcache_cooked_write_unsigned): Likewise.
5440         (regcache_raw_set_cached_value): Likewise.
5441         (regcache_raw_write): Likewise.
5442         (regcache_cooked_write): Likewise.
5443         (regcache_xfer_part): Likewise.
5444         (regcache_raw_read_part): Likewise.
5445         (regcache_raw_write_part): Likewise.
5446         (regcache_cooked_read_part): Likewise.
5447         (regcache_cooked_write_part): Likewise.
5448         (regcache_raw_supply): Likewise.
5449         (regcache_raw_collect): Likewise.
5450         (regcache_transfer_regset): Likewise.
5451         (regcache_supply_regset): Likewise.
5452         (regcache_collect_regset): Likewise.
5453         (regcache_debug_print_register): Likewise.
5454         (enum regcache_dump_what): Move it to regcache.h.
5455         (regcache_dump): Change it to method dump.
5456         * regcache.h (enum regcache_dump_what): New.
5457         (class regcache): New.
5458         * target.c (target_fetch_registers): Call method
5459         debug_print_register.
5460         (target_store_registers): Likewise.
5461
5462 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5463
5464         * windows-nat.c (struct lm_info_windows): Initialize field.
5465         (windows_make_so): Allocate lm_info_windows with new.
5466         (windows_free_so): Free lm_info_windows with delete.
5467
5468 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5469
5470         * solib-darwin.c (struct lm_info_darwin): Initialize field.
5471         (darwin_current_sos): Allocate lm_info_darwin with new, remove
5472         cleanup.
5473         (darwin_free_so): Free lm_info_darwin with delete.
5474
5475 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5476
5477         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
5478         <l_addr_p>: Change type to bool.
5479         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
5480         (svr4_free_so): Free lm_info_svr4 with delete.
5481         (svr4_copy_library_list): Replace memcpy with call to copy
5482         constructor.
5483         (library_list_start_library, svr4_default_sos): Allocate
5484         lm_info_svr4 with new.
5485
5486 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5487
5488         * solib-target.c (struct lm_info_target): Add destructor,
5489         initialize fields.
5490         <name>: Change type to std::string.
5491         (library_list_start_library): Allocate lm_info_target with new.
5492         (solib_target_free_library_list): Free lm_info_target with
5493         delete.
5494         (solib_target_current_sos): Adapt to std::string.
5495         (solib_target_free_so): Free lm_info_target with delete.
5496
5497 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5498
5499         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
5500         fields.
5501         (frv_current_sos): Allocate lm_info_frv with new.
5502         (frv_relocate_main_executable): Free lm_info_frv with delete,
5503         allocate with new.
5504         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
5505
5506 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5507
5508         * solib-frv.c (struct lm_info_frv): Fix indentation.
5509
5510 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5511
5512         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
5513         map field.
5514         (dsbt_current_sos): Allocate lm_info_dsbt with new.
5515         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
5516         and allocate with new.
5517         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
5518
5519 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5520
5521         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
5522         <filename, member_name>: Change type to std::string.
5523         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
5524         (library_list_start_library): Allocate lm_info_aix with new.
5525         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
5526         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
5527         with copy constructor.
5528
5529 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5530
5531         * solist.h (struct lm_info): Remove.
5532         (struct lm_info_base): New class.
5533         (struct so_list) <lm_info>: Change type to lm_info_base *.
5534         * nto-tdep.c (struct lm_info): Remove.
5535         (lm_addr): Adjust.
5536         * solib-aix.c (struct lm_info): Rename to ...
5537         (struct lm_info_aix): ... this.  Extend lm_info_base.
5538         (lm_info_p): Rename to ...
5539         (lm_info_aix_p): ... this, and adjust.
5540         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
5541         solib_aix_parse_libraries, library_list_start_library,
5542         solib_aix_free_library_list, solib_aix_parse_libraries,
5543         solib_aix_get_library_list,
5544         solib_aix_relocate_section_addresses, solib_aix_free_so,
5545         solib_aix_get_section_offsets,
5546         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
5547         Adjust.
5548         (struct solib_aix_inferior_data) <library_list>: Adjust.
5549         * solib-darwin.c (struct lm_info): Rename to ...
5550         (struct lm_info_darwin): ... this.  Extend lm_info_base.
5551         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
5552         * solib-dsbt.c (struct lm_info): Rename to ...
5553         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
5554         (struct dsbt_info) <main_executable_lm_info): Adjust.
5555         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
5556         dsbt_relocate_section_addresses): Adjust.
5557         * solib-frv.c (struct lm_info): Rename to ...
5558         (struct lm_info_frv): ... this.  Extend lm_info_base.
5559         (main_executable_lm_info): Adjust.
5560         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
5561         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
5562         find_canonical_descriptor_in_load_object,
5563         frv_fdpic_find_canonical_descriptor): Adjust.
5564         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
5565         to lm_info_svr4.
5566         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
5567         svr4_clear_so, svr4_copy_library_list,
5568         library_list_start_library, svr4_default_sos, svr4_read_so_list,
5569         svr4_current_sos, svr4_fetch_objfile_link_map,
5570         solist_update_incremental): Adjust.
5571         * solib-svr4.h (struct lm_info_svr4): Move here from
5572         solib-svr4.c.
5573         * solib-target.c (struct lm_info): Rename to ...
5574         (struct lm_info_target): ... this.  Extend lm_info_base.
5575         (lm_info_p): Rename to ...
5576         (lm_info_target_p): ... this.
5577         (solib_target_parse_libraries, library_list_start_segment,
5578         library_list_start_section, library_list_start_library,
5579         library_list_end_library, solib_target_free_library_list,
5580         solib_target_current_sos, solib_target_free_so,
5581         solib_target_relocate_section_addresses): Adjust.
5582         * windows-nat.c (struct lm_info): Rename to ...
5583         (struct lm_info_windows): ... this.  Extend lm_info_base.
5584         (windows_make_so, handle_load_dll, handle_unload_dll,
5585         windows_xfer_shared_libraries): Adjust.
5586
5587 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
5588
5589         * solib-darwin.c (struct darwin_so_list): Remove.
5590         (darwin_current_sos): Allocate an so_list object instead of a
5591         darwin_so_list, separately allocate an lm_info object.
5592         (darwin_free_so): Free lm_info.
5593
5594 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
5595
5596         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
5597         with fprintf_filtered.
5598
5599 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5600
5601         * regcache.c (regcache::regcache): New function.
5602         (regcache::~regcache): New function.
5603         (regcache_xmalloc_1): Remove.
5604         (regcache_xmalloc): Call new regcache.
5605         (regcache_xfree): Call delete regcache.
5606         (get_thread_arch_aspace_regcache): Call new regcache.
5607
5608 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5609
5610         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
5611         lwp instead of ptid_get_lwp.
5612
5613 2017-04-28  Yao Qi  <yao.qi@linaro.org>
5614
5615         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
5616         lwp_info instead of getting from inferior_ptid.
5617
5618 2017-04-27  Keith Seitz  <keiths@redhat.com>
5619
5620         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
5621         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
5622         (CV_CONVERSION_BADNESS): Define.
5623         (rank_one_type): Remove overly restrictive rvalue reference
5624         rank checks.
5625         Add cv-qualifier checks and subranks for type equality.
5626         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
5627         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
5628         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
5629
5630 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
5631
5632         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
5633         count when creating the object.
5634
5635 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
5636             Ulrich Weigand  <uweigand@de.ibm.com>
5637
5638         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
5639         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
5640         is used in AIX.
5641         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
5642         (process_xcoff_symbol): Likewise.
5643         (scan_xcoff_symtab): Likewise.
5644
5645 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5646
5647         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
5648         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
5649         (ia64_access_reg): Use get_frame_register_unsigned.
5650         (ia64_access_rse_reg): Likewise.
5651         (ia64_libunwind_frame_prev_register): Likewise.
5652
5653 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
5654
5655         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
5656         * gdbarch.c: Regenerated.
5657         * gdbarch.h: Regenerated.
5658         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
5659         visibility external.
5660         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
5661         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
5662         (enum cfa_how_kind): Move to ...
5663         (struct dwarf2_frame_state_reg_info): Likewise.
5664         (struct dwarf2_frame_state): Likewise.
5665         * dwarf2-frame.h: ... here.
5666         (dwarf2_frame_state_alloc_regs): New declaration.
5667         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
5668         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
5669
5670 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5671
5672         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
5673         regcache_raw_read_unsigned.
5674         (xtensa_pseudo_register_write): Likewise.
5675
5676 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
5677
5678         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
5679         (nds32_pseudo_register_write): Likewise.
5680
5681 2017-04-25  Yao Qi  <yao.qi@linaro.org>
5682
5683         * regcache.c (struct regcache) <readonly_p>: Change its type
5684         to bool.
5685         (regcache_xmalloc_1): Update parameter type and callers update.
5686
5687 2017-04-25  Yao Qi  <yao.qi@linaro.org>
5688
5689         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
5690         set_gdbarch_wchar_bit.
5691         * arm-tdep.c (arm_gdbarch_init): Likewise.
5692
5693 2017-04-25  Pedro Alves  <palves@redhat.com>
5694
5695         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
5696         (BothAreRelocatable, memcopy, memmove): Don't define.
5697         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
5698         macros.
5699
5700 2017-04-25  Pedro Alves  <palves@redhat.com>
5701
5702         * common/common-defs.h: Include "common/poison.h".
5703         * common/function-view.h: (Not, Or, Requires): Move to traits.h
5704         and adjust.
5705         * common/poison.h: New file.
5706         * common/traits.h: Include <type_traits>.
5707         (Not, Or, Requires): New, moved from common/function-view.h.
5708
5709 2017-04-25  Pedro Alves  <palves@redhat.com>
5710
5711         * breakpoint.h (struct breakpoint): In-class initialize all
5712         fields.  Make boolean fields "bool".
5713         * breakpoint.c (init_raw_breakpoint_without_location): Remove
5714         memset call and initializations no longer necessary.
5715
5716 2017-04-25  Pedro Alves  <palves@redhat.com>
5717
5718         * btrace.c (pt_btrace_insn_flags): Change parameter type to
5719         reference.
5720         (pt_btrace_insn): New function.
5721         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
5722
5723 2017-04-25  Pedro Alves  <palves@redhat.com>
5724
5725         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
5726         "base" field and inherit from "bp_location" instead.  Add
5727         non-default ctor.
5728         (allocate_location_exception): Use new non-default ctor.
5729         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
5730         (init_bp_location): Convert to ...
5731         (bp_location::bp_location): ... this new ctor, and remove memset
5732         call.
5733         (base_breakpoint_allocate_location): Use the new non-default ctor.
5734         * breakpoint.h (bp_location): Now a class.  Declare default and
5735         non-default ctors.  In-class initialize all members.
5736         (init_bp_location): Remove declaration.
5737
5738 2017-04-25  Pedro Alves  <palves@redhat.com>
5739
5740         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
5741         assignment operator.
5742
5743 2017-04-24  Yao Qi  <yao.qi@linaro.org>
5744
5745         * doublest.c (convert_doublest_to_floatformat): Call
5746         floatformat_totalsize_bytes.
5747
5748 2017-04-22  Tom Tromey  <tom@tromey.com>
5749
5750         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5751         ui_out_emit_list.
5752         * stack.c (print_frame): Use ui_out_emit_list.
5753         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5754         ui_out_emit_list.
5755         * mi/mi-main.c (print_one_inferior)
5756         (mi_cmd_data_list_register_names)
5757         (mi_cmd_data_list_register_values, mi_cmd_list_features)
5758         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
5759         ui_out_emit_list.
5760         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
5761         (mi_output_solib_attribs): Use ui_out_emit_list,
5762         ui_out_emit_tuple.
5763         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
5764         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
5765         (mi_cmd_stack_list_args, list_args_or_locals): Use
5766         ui_out_emit_list.
5767         * disasm.c (do_assembly_only): Use ui_out_emit_list.
5768         * breakpoint.c (print_solib_event, output_thread_groups): Use
5769         ui_out_emit_list.
5770
5771 2017-04-22  Tom Tromey  <tom@tromey.com>
5772
5773         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
5774         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
5775         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
5776
5777 2017-04-22  Tom Tromey  <tom@tromey.com>
5778
5779         * tracepoint.c (tvariables_info_1)
5780         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
5781
5782 2017-04-22  Tom Tromey  <tom@tromey.com>
5783
5784         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
5785         annotate_arg_emitter.
5786         * breakpoint.c (print_mention_watchpoint)
5787         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
5788         * annotate.h (struct annotate_arg_emitter): New.
5789
5790 2017-04-22  Tom Tromey  <tom@tromey.com>
5791
5792         * record-btrace.c (record_btrace_insn_history)
5793         (record_btrace_insn_history_range, record_btrace_call_history)
5794         (record_btrace_call_history_range): Use ui_out_emit_tuple.
5795         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
5796         ui_out_emit_tuple.
5797         * stack.c (print_frame_info): Use ui_out_emit_tuple.
5798         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
5799         * skip.c (skip_info): Use ui_out_emit_tuple.
5800         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
5801         * progspace.c (print_program_space): Use ui_out_emit_tuple.
5802         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
5803         * osdata.c (info_osdata): Use ui_out_emit_tuple.
5804         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
5805         ui_out_emit_tuple.
5806         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
5807         (output_register, mi_cmd_data_read_memory)
5808         (mi_cmd_data_read_memory_bytes, mi_load_progress)
5809         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
5810         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
5811         Use ui_out_emit_tuple.
5812         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
5813         ui_out_emit_tuple.
5814         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5815         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
5816         * linux-thread-db.c (info_auto_load_libthread_db): Use
5817         ui_out_emit_tuple.
5818         * inferior.c (print_inferior): Use ui_out_emit_tuple.
5819         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
5820         * disasm.c (do_mixed_source_and_assembly_deprecated)
5821         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
5822         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
5823         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
5824         * breakpoint.c (print_one_breakpoint_location)
5825         (print_one_breakpoint): Use ui_out_emit_tuple.
5826         * auto-load.c (print_script, info_auto_load_cmd): Use
5827         ui_out_emit_tuple.
5828         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
5829
5830 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
5831
5832         * thread.c (print_thread_info_1): Remove dead code.
5833
5834 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5835
5836         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
5837         GDB_SELF_TEST.
5838         * arm-tdep.c (selftests::arm_record_test): Likewise.
5839
5840 2017-04-21  Yao Qi  <yao.qi@linaro.org>
5841
5842         * regcache.c (regcache_restore): Remove argument 2.  Replace
5843         argument 3 with regcache.  Get register status from
5844         src->register_status and get register contents from
5845         register_buffer (src, regnum).
5846         (regcache_cpy): Update.
5847
5848 2017-04-19  Pedro Alves  <palves@redhat.com>
5849
5850         * gdbthread.h (thread): Add missing closing parenthesis in
5851         comment.
5852
5853 2017-04-19  Pedro Alves  <palves@redhat.com>
5854
5855         * common/refcounted-object.h: New file.
5856         * gdbthread.h: Include "common/refcounted-object.h".
5857         (thread_info): Inherit from refcounted_object and add comments.
5858         (thread_info::incref, thread_info::decref)
5859         (thread_info::m_refcount): Delete.
5860         (thread_info::deletable): Use the refcounted_object::refcount()
5861         method.
5862         * inferior.c (current_inferior_): Add comment.
5863         (set_current_inferior): Increment/decrement refcounts.
5864         (prune_inferiors, remove_inferior_command): Skip inferiors marked
5865         not-deletable instead of comparing with the current inferior.
5866         (initialize_inferiors): Increment the initial inferior's refcount.
5867         * inferior.h (struct inferior): Forward declare.
5868         Include "common/refcounted-object.h".
5869         (current_inferior, set_current_inferior): Move declaration to
5870         before struct inferior's definition, and fix comment.
5871         (inferior): Inherit from refcounted_object.  Add comments.
5872         * thread.c (switch_to_thread_no_regs): Reference the thread's
5873         inferior pointer directly instead of doing a ptid lookup.
5874         (switch_to_no_thread): New function.
5875         (switch_to_thread(thread_info *)): New function, factored out
5876         from ...
5877         (switch_to_thread(ptid_t)): ... this.
5878         (restore_current_thread): Delete.
5879         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
5880         fields, and add 'inf' field.
5881         (do_restore_current_thread_cleanup): Check whether old->inf is
5882         alive instead of looking up an inferior by ptid.  Use
5883         switch_to_thread and switch_to_no_thread.
5884         (restore_current_thread_cleanup_dtor): Use old->inf directly
5885         instead of lookup up an inferior by id.  Decref the inferior.
5886         Don't restore 'removable'.
5887         (make_cleanup_restore_current_thread): Same the inferior pointer
5888         in old, instead of the inferior number.  Incref the inferior.
5889         Don't save/clear 'removable'.
5890
5891 2017-04-19  Pedro Alves  <palves@redhat.com>
5892
5893         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5894         unittests/scoped_restore-selftests.c.
5895         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
5896         * common/scoped_restore.h (scoped_restore_base): Make "class".
5897         (scoped_restore_base::release): New public method.
5898         (scoped_restore_base::scoped_restore_base): New protected ctor.
5899         (scoped_restore_base::m_saved_var): New protected field.
5900         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
5901         scoped_restore_base base class instead of m_saved_var directly.
5902         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
5903         (scoped_restore_tmpl::scoped_restore_tmpl(const
5904         scoped_restore_tmpl<T>&)): Likewise.
5905         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
5906         method.
5907         (scoped_restore_tmpl::saved_var): New method.
5908         (scoped_restore_tmpl::m_saved_var): Delete.
5909         * inferior.h (inferior::detaching): Now a bool.
5910         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
5911         cleanup.
5912         * unittests/scoped_restore-selftests.c: New file.
5913
5914 2017-04-19  Pedro Alves  <palves@redhat.com>
5915
5916         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
5917         Re-sort in alphabetic order.
5918
5919 2017-04-18  Pedro Alves  <palves@redhat.com>
5920
5921         * xml-support.c (obstack_xml_printf): Delete.
5922         * xml-support.h (obstack_xml_printf): Delete.
5923
5924 2017-04-18  Pedro Alves  <palves@redhat.com>
5925
5926         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
5927         vdebug, verror, body_text, start_element, end_element, name,
5928         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
5929         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
5930         is_xinclude>: Make private and add m_ prefix.
5931         (gdb_xml_parser::body_text): New method, based on ...
5932         (gdb_xml_body_text): ... this.  Adjust.
5933         (gdb_xml_parser::vdebug): New method, based on ...
5934         (gdb_xml_debug): ... this.  Adjust.
5935         (gdb_xml_parser::verror): New method, based on ...
5936         (gdb_xml_error): ... this.  Adjust.
5937         (gdb_xml_parser::start_element): New method, based on ...
5938         (gdb_xml_start_element): ... this.  Adjust.
5939         (gdb_xml_start_element_wrapper): Defer to
5940         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
5941         (gdb_xml_parser::end_element): New method, based on ...
5942         (gdb_xml_end_element_wrapper): ... this.  Adjust.
5943         (gdb_xml_parser::~gdb_xml_parser): Adjust.
5944         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
5945         (gdb_xml_parser::use_dtd): New method, based on ...
5946         (gdb_xml_use_dtd): ... this.  Adjust.
5947         (gdb_xml_parser::parse): New method, based on ...
5948         (gdb_xml_parse): ... this.  Adjust.
5949         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
5950         (xinclude_start_include): Adjust to call the parser's name method.
5951         (xml_xinclude_default, xml_xinclude_start_doctype)
5952         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
5953         method.
5954         (xml_process_xincludes): Adjust to call parser methods.
5955         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
5956         declarations.
5957
5958 2017-04-18  Pedro Alves  <palves@redhat.com>
5959
5960         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
5961         gdb::optional<std::string>.
5962         * xml-support.c: Include <string>.
5963         (scope_level::scope_level(scope_level &&))
5964         (scope_level::~scope_level): Delete.
5965         (scope_level::body): Now a std::string.
5966         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
5967         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
5968         parameter.
5969         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
5970         (xinclude_parsing_data::output): Now a std::string reference.
5971         (xinclude_start_include): Adjust.
5972         (xml_xinclude_default): Adjust.
5973         (xml_process_xincludes): Add 'output' parameter, and return bool.
5974         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
5975         and return bool.
5976         * xml-tdesc.c: Include <unordered_map> and <string>.
5977         (tdesc_xml_cache): Delete.
5978         (tdesc_xml_cache_s): Delete.
5979         (xml_cache): Now an std::unordered_map.
5980         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
5981         (target_fetch_description_xml): Change return type to
5982         gdb::optional<std::string>, and adjust.
5983         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
5984         (target_fetch_description_xml): Change return type to
5985         gdb::optional<std::string>.
5986
5987 2017-04-18  Pedro Alves  <palves@redhat.com>
5988
5989         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5990         unittests/optional-selftests.c.
5991         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
5992         * unittests/optional-selftests.c: New file.
5993         * unittests/optional/assignment/1.cc: New file.
5994         * unittests/optional/assignment/2.cc: New file.
5995         * unittests/optional/assignment/3.cc: New file.
5996         * unittests/optional/assignment/4.cc: New file.
5997         * unittests/optional/assignment/5.cc: New file.
5998         * unittests/optional/assignment/6.cc: New file.
5999         * unittests/optional/assignment/7.cc: New file.
6000         * unittests/optional/cons/copy.cc: New file.
6001         * unittests/optional/cons/default.cc: New file.
6002         * unittests/optional/cons/move.cc: New file.
6003         * unittests/optional/cons/value.cc: New file.
6004         * unittests/optional/in_place.cc: New file.
6005         * unittests/optional/observers/1.cc: New file.
6006         * unittests/optional/observers/2.cc: New file.
6007
6008 2017-04-18  Pedro Alves  <palves@redhat.com>
6009
6010         * common/gdb_optional.h: Include common/traits.h.
6011         (in_place_t): New type.
6012         (in_place): New constexpr variable.
6013         (optional::optional): Remove member initialization of
6014         m_instantiated.
6015         (optional::optional(in_place_t...)): New constructor.
6016         (optional::~optional): Use reset.
6017         (optional::optional(const optional&)): New.
6018         (optional::optional(const optional&&)): New.
6019         (optional::optional(T &)): New.
6020         (optional::optional(T &&)): New.
6021         (operator::operator=(const optional &)): New.
6022         (operator::operator=(optional &&)): New.
6023         (operator::operator= (const T &))
6024         (operator::operator= (T &&))
6025         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
6026         (operator::reset): New.
6027         (operator::m_instantiated):: Add in-class initializer.
6028         * common/traits.h: Include <type_traits>.
6029         (struct And): New types.
6030
6031 2017-04-18  Pedro Alves  <palves@redhat.com>
6032
6033         * xml-support.c: Include <vector>.
6034         (scope_level::scope_level(const gdb_xml_element *))
6035         (scope_level::scope_level(scope_level&&)): New.
6036         (scope_level::~scope_level): New.
6037         (scope_level_s): Delete.
6038         (gdb_xml_parser::scopes): Now a std::vector.
6039         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
6040         Use std::vector.
6041         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
6042         scope cleanup code.
6043         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
6044         of the scopes member.  Use std::vector::emplace_back.
6045
6046 2017-04-18  Pedro Alves  <palves@redhat.com>
6047
6048         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
6049         a bool.
6050         (gdb_xml_end_element): Change type of first parameter.
6051         (gdb_xml_cleanup): Rename to ...
6052         (gdb_xml_parser::~gdb_xml_parser): ... this.
6053         (gdb_xml_create_parser_and_cleanup): Delete with ...
6054         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
6055         to this new ctor.
6056         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
6057         using gdb_xml_create_parser_and_cleanup.
6058         (xinclude_parsing_data): Add ctor/dtor.
6059         (xml_xinclude_cleanup): Delete.
6060         (xml_process_xincludes): Create a local xinclude_parsing_data
6061         instead of heap-allocating one.  Create a local gdb_xml_parser
6062         instead of heap-allocating one with
6063         gdb_xml_create_parser_and_cleanup.
6064
6065 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
6066
6067         PR threads/20743
6068         * fbsd-nat.c (resume_one_thread_cb): Remove.
6069         (resume_all_threads_cb): Remove.
6070         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
6071         iterate_over_threads.
6072
6073 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6074
6075         * NEWS: Create a new section for the next release branch.
6076         Rename the section of the current branch, now that it has
6077         been cut.
6078
6079 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
6080
6081         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
6082         * version.in: Bump version to 8.0.50.DATE-git.
6083
6084 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
6085
6086         PR gdb/21385
6087         * windows-nat.c (windows_create_inferior): Declare 'allargs'
6088         independently of the host, and fix build breakage on Cygwin.
6089
6090 2017-04-13  Pedro Alves  <palves@redhat.com>
6091
6092         * inferior.c (free_inferior): Convert to ...
6093         (inferior::~inferior): ... this dtor.
6094         (inferior::inferior): New ctor, factored out from ...
6095         (add_inferior_silent): ... here.  Allocate the inferior with a new
6096         expression.
6097         (delete_inferior): Call delete instead of free_inferior.
6098         * inferior.h (gdb_environ, continuation): Forward declare.
6099         (inferior): Now a class.  Add in-class initialization to all
6100         members.  Make boolean fields bool, except 'detaching'.
6101         (inferior::inferior): New explicit ctor.
6102         (inferior::~inferior): New.
6103
6104 2017-04-13  Pedro Alves  <palves@redhat.com>
6105
6106         * inferior.c (init_inferior_list): Delete.
6107         * inferior.h (init_inferior_list): Delete.
6108
6109 2017-04-13  Pedro Alves  <palves@redhat.com>
6110
6111         PR threads/13217
6112         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
6113         (top level): Call it twice, with different thread sets.
6114
6115 2017-04-13  Pedro Alves  <palves@redhat.com>
6116
6117         * thread.c: Include <algorithm>.
6118         (thread_array_cleanup): Delete.
6119         (scoped_inc_dec_ref): New class.
6120         (live_threads_count): New function.
6121         (set_thread_refcount): Delete.
6122         (tp_array_compar_ascending): Now a bool.
6123         (tp_array_compar): Convert to a std::sort comparison function.
6124         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
6125         and live_threads_count.
6126
6127 2017-04-13  Pedro Alves  <palves@redhat.com>
6128
6129         * infrun.c (follow_fork_inferior): Also switch the current
6130         inferior.
6131
6132 2017-04-13  Pedro Alves  <palves@redhat.com>
6133
6134         * breakpoint.c (watch_command_1): Save watchpoint-frame info
6135         before calling create_internal_breakpoint.
6136
6137 2017-04-13  Pedro Alves  <palves@redhat.com>
6138
6139         * fork-child.c (execv_argv): New class.
6140         (breakup_args): Refactored as ...
6141         (execv_argv::init_for_no_shell): .. this method of execv_argv.
6142         Copy arguments to storage and replace separators with NULL
6143         terminators in place.
6144         (escape_bang_in_quoted_argument): Adjust to return bool.
6145         (execv_argv::execv_argv): New ctor.
6146         (execv_argv::init_for_shell): New method, factored out from
6147         fork_inferior.  Don't strdup strings into the vector.
6148         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
6149         Remove free_vector_argv call.
6150
6151 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6152
6153         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
6154         tdep->rx_psw_type.
6155
6156 2017-04-13  Yao Qi  <yao.qi@linaro.org>
6157
6158         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
6159         * rx-tdep.c (rx_gdbarch_init): Likewise.
6160
6161 2017-04-13  Pedro Alves  <palves@redhat.com>
6162
6163         * breakpoint.h (struct breakpoint): Reindent.
6164
6165 2017-04-13  Pedro Alves  <palves@redhat.com>
6166
6167         * breakpoint.c (bp_location): Rename to ...
6168         (bp_locations): ... this.  All references updated.
6169         (bp_location_count): Rename to ...
6170         (bp_locations_count): ... this.  All references updated.
6171         (bp_location_placed_address_before_address_max): Rename to ...
6172         (bp_locations_placed_address_before_address_max): ... this.  All
6173         references updated.
6174         (bp_location_shadow_len_after_address_max): Rename to ...
6175         (bp_locations_shadow_len_after_address_max): ... this.  All
6176         references updated.
6177         (bp_location_compare_addrs): Rename to ...
6178         (bp_locations_compare_addrs): ... this.  All references updated.
6179         (bp_location_compare):Rename to ...
6180         (bp_locations_compare): ... this.  All references updated.
6181         (bp_location_target_extensions_update): Rename to ...
6182         (bp_locations_target_extensions_update): ... this.  All references
6183         updated.
6184
6185 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6186
6187         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
6188         * common/common.m4: Check headers 'termios.h', 'termio.h' and
6189         'sgtty.h'.
6190         * common/gdb_termios.h: New file, with parts of "terminal.h".
6191         * inflow.c: Include "gdb_termios.h".
6192         * ser-unix.c: Include "gdb_termios.h".
6193         * terminal.h: Move terminal-related defines to
6194         "common/gdb_termios.h".
6195
6196 2017-04-12  Tom Tromey  <tom@tromey.com>
6197
6198         * probe.c (parse_probes): Update.
6199         * location.h (delete_event_location): Don't declare.
6200         (event_location_deleter::operator()): Update.
6201         * location.c (event_location_deleter::operator()): Rename from
6202         delete_event_location.
6203         * linespec.h (linespec_result) <location>: Change type to
6204         event_location_up.
6205         * linespec.c (canonicalize_linespec, event_location_to_sals)
6206         (decode_objc): Update.
6207         (linespec_result): Don't call delete_event_location.
6208         * breakpoint.c (create_breakpoints_sal)
6209         (bkpt_probe_create_sals_from_location)
6210         (strace_marker_create_sals_from_location): Update.
6211
6212 2017-04-12  Tom Tromey  <tom@tromey.com>
6213
6214         * linespec.h (struct linespec_result): Add constructor and
6215         destructor.
6216         (init_linespec_result, destroy_linespec_result)
6217         (make_cleanup_destroy_linespec_result): Don't declare.
6218         * linespec.c (init_linespec_result): Remove.
6219         (linespec_result::~linespec_result): Rename from
6220         destroy_linespec_result.  Update.
6221         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
6222         Remove.
6223         * breakpoint.c (create_breakpoint, break_range_command)
6224         (decode_location_default): Update.
6225         * ax-gdb.c (agent_command_1): Update.
6226
6227 2017-04-12  Tom Tromey  <tom@tromey.com>
6228
6229         * remote.c (remote_download_tracepoint): Update.
6230         * python/py-breakpoint.c (bppy_get_location): Update.
6231         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
6232         (gdbscm_breakpoint_location): Update.
6233         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
6234         * breakpoint.h (struct breakpoint) <location, location_range_end>:
6235         Change type to event_location_up.
6236         * breakpoint.c (create_overlay_event_breakpoint)
6237         (create_longjmp_master_breakpoint)
6238         (create_std_terminate_master_breakpoint)
6239         (create_exception_master_breakpoint)
6240         (breakpoint_event_location_empty_p, print_breakpoint_location)
6241         (print_one_breakpoint_location, create_thread_event_breakpoint)
6242         (init_breakpoint_sal, create_breakpoint)
6243         (print_recreate_ranged_breakpoint, break_range_command)
6244         (init_ada_exception_breakpoint, say_where): Update.
6245         (base_breakpoint_dtor): Don't call delete_event_location.
6246         (bkpt_print_recreate, tracepoint_print_recreate)
6247         (dprintf_print_recreate, update_static_tracepoint)
6248         (breakpoint_re_set_default): Update.
6249
6250 2017-04-12  Tom Tromey  <tom@tromey.com>
6251
6252         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
6253         type of "to_do".  Update.
6254         (compute_stack_depth): Use std::vector.
6255
6256 2017-04-12  Tom Tromey  <tom@tromey.com>
6257
6258         * printcmd.c (find_instruction_backward): Use std::vector.
6259
6260 2017-04-12  Tom Tromey  <tom@tromey.com>
6261
6262         * symfile.c (objfilep): Remove typedef.
6263         (reread_symbols): Use a std::vector.
6264
6265 2017-04-12  Tom Tromey  <tom@tromey.com>
6266
6267         * mi/mi-main.c (exec_direction_forward): Remove.
6268         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
6269         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
6270         scoped_restore.
6271         * guile/guile.c (guile_repl_command, guile_command)
6272         (gdbscm_execute_gdb_command): Use scoped_restore.
6273         * go-exp.y (go_parse): Use scoped_restore.
6274         * d-exp.y (d_parse): Use scoped_restore.
6275         * cli/cli-decode.c (cmd_func): Use scoped_restore.
6276         * c-exp.y (c_parse): Use scoped_restore.
6277
6278 2017-04-12  Tom Tromey  <tom@tromey.com>
6279
6280         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
6281         (mi_parse): Update return type.
6282         (mi_parse_free): Remove.
6283         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
6284         (mi_parse::~mi_parse): Rename from mi_parse_free.
6285         (mi_parse_cleanup): Remove.
6286         (mi_parse): Return a unique_ptr.  Use new.
6287         * mi/mi-main.c (mi_execute_command): Update.
6288
6289 2017-04-12  Tom Tromey  <tom@tromey.com>
6290
6291         * location.c (explicit_location_lex_one): Return a
6292         unique_xmalloc_ptr.
6293         (string_to_explicit_location): Update.  Remove cleanups.
6294
6295 2017-04-12  Tom Tromey  <tom@tromey.com>
6296
6297         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
6298         (compare_value_and_voffset): Change type.  Update.
6299         (compute_vtable_size): Change type of "offset_vec".
6300         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
6301         (gnuv3_get_typeid): Remove extraneous declaration.
6302
6303 2017-04-12  Tom Tromey  <tom@tromey.com>
6304
6305         * charset.h (wchar_iterator): Fix comment.
6306
6307 2017-04-12  Tom Tromey  <tom@tromey.com>
6308
6309         * charset.c (iconv_wrapper): New class.
6310         (cleanup_iconv): Remove.
6311         (convert_between_encodings): Use it.
6312
6313 2017-04-12  Tom Tromey  <tom@tromey.com>
6314
6315         * symfile.h (increment_reading_symtab): Update type.
6316         * symfile.c (decrement_reading_symtab): Remove.
6317         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
6318         * psymtab.c (psymtab_to_symtab): Update.
6319         * dwarf2read.c (dw2_instantiate_symtab): Update.
6320
6321 2017-04-12  Tom Tromey  <tom@tromey.com>
6322
6323         * jit.c (struct jit_reader): Declare separately.  Add constructor
6324         and destructor.  Change type of "handle".
6325         (loaded_jit_reader): Define separately.
6326         (jit_reader_load): Update.  New "new".
6327         (jit_reader_unload_command): Use "delete".
6328         * gdb-dlfcn.h (struct dlclose_deleter): New.
6329         (gdb_dlhandle_up): New typedef.
6330         (gdb_dlopen, gdb_dlsym): Update types.
6331         (gdb_dlclose): Remove.
6332         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
6333         (gdb_dlsym): Change type of "handle".
6334         (make_cleanup_dlclose): Remove.
6335         (dlclose_deleter::operator()): Rename from gdb_dlclose.
6336         * compile/compile-c-support.c (load_libcc): Update.
6337
6338 2017-04-12  Tom Tromey  <tom@tromey.com>
6339
6340         * symtab.h (find_pcs_for_symtab_line): Change return type.
6341         * symtab.c (find_pcs_for_symtab_line): Change return type.
6342         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
6343         type of "vec".  Update.
6344         (ltpy_get_pcs_for_line): Update.
6345         * linespec.c (decode_digits_ordinary): Update.
6346
6347 2017-04-12  Tom Tromey  <tom@tromey.com>
6348
6349         * tracepoint.c (actions_command): Update.
6350         * python/python.c (python_command, python_interactive_command):
6351         Update.
6352         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6353         * guile/guile.c (guile_command): Update.
6354         * defs.h (read_command_lines, read_command_lines_1): Return
6355         command_line_up.
6356         (command_lines_deleter): New struct.
6357         (command_line_up): New typedef.
6358         * compile/compile.c (compile_code_command)
6359         (compile_print_command): Update.
6360         * cli/cli-script.h (get_command_line, copy_command_lines): Return
6361         command_line_up.
6362         (make_cleanup_free_command_lines): Remove.
6363         * cli/cli-script.c (get_command_line, read_command_lines_1)
6364         (copy_command_lines): Return command_line_up.
6365         (while_command, if_command, read_command_lines, define_command)
6366         (document_command): Update.
6367         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
6368         Remove.
6369         * breakpoint.h (breakpoint_set_commands): Change type of
6370         "commands".
6371         * breakpoint.c (breakpoint_set_commands): Change type of
6372         "commands".  Update.
6373         (do_map_commands_command, update_dprintf_command_list)
6374         (create_tracepoint_from_upload): Update.
6375
6376 2017-04-12  Tom Tromey  <tom@tromey.com>
6377
6378         * tracepoint.c (scope_info): Update.
6379         * spu-tdep.c (spu_catch_start): Update.
6380         * python/python.c (gdbpy_decode_line): Update.
6381         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
6382         * python/py-breakpoint.c (bppy_init): Update.
6383         * probe.c (parse_probes): Update.
6384         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
6385         * location.h (event_location_deleter): New struct.
6386         (event_location_up): New typedef.
6387         (new_linespec_location, new_address_location, new_probe_location)
6388         (new_explicit_location, copy_event_location)
6389         (string_to_event_location, string_to_event_location_basic)
6390         (string_to_explicit_location): Update return type.
6391         (make_cleanup_delete_event_location): Remove.
6392         * location.c (new_linespec_location, new_address_location)
6393         (new_probe_location, new_explicit_location, copy_event_location):
6394         Return event_location_up.
6395         (delete_event_location_cleanup)
6396         (make_cleanup_delete_event_location): Remove.
6397         (string_to_explicit_location, string_to_event_location_basic)
6398         (string_to_event_location): Return event_location_up.
6399         * linespec.c (canonicalize_linespec, event_location_to_sals)
6400         (decode_line_with_current_source)
6401         (decode_line_with_last_displayed, decode_objc): Update.
6402         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
6403         * completer.c (location_completer): Update.
6404         * cli/cli-cmds.c (edit_command, list_command): Update.
6405         * breakpoint.c (create_overlay_event_breakpoint)
6406         (create_longjmp_master_breakpoint)
6407         (create_std_terminate_master_breakpoint)
6408         (create_exception_master_breakpoint)
6409         (create_thread_event_breakpoint): Update.
6410         (init_breakpoint_sal): Update.  Remove some dead code.
6411         (create_breakpoint_sal): Change type of "location".  Update.
6412         (create_breakpoints_sal, create_breakpoint, break_command_1)
6413         (dprintf_command, break_range_command, until_break_command)
6414         (init_ada_exception_breakpoint)
6415         (strace_marker_create_sals_from_location)
6416         (update_static_tracepoint, trace_command, ftrace_command)
6417         (strace_command, create_tracepoint_from_upload): Update.
6418         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6419         * ax-gdb.c (agent_command_1): Update.
6420
6421 2017-04-12  Pedro Alves  <palves@redhat.com>
6422
6423         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
6424         * configure.tgt: Handle i[34567]86-*-go32* and
6425         i[34567]86-*-msdosdjgpp*.
6426         * i386-tdep.c (i386_svr4_reg_to_regnum):
6427         Make extern.
6428         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
6429         i386-go32-tdep.c.
6430         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
6431         * i386-go32-tdep.c: New file.
6432         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
6433         declarations.
6434
6435 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
6436
6437         * aix-thread.c (pd_status2str): Change return type to const char *.
6438
6439 2017-04-12  Pedro Alves  <palves@redhat.com>
6440
6441         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
6442         calls to set_gdbarch_gnu_triplet_regexp.
6443
6444 2017-04-12  Pedro Alves  <palves@redhat.com>
6445
6446         PR gdb/21323
6447         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
6448         New enum value.
6449         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
6450         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
6451         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
6452         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
6453         * gdbarch.h, gdbarch.c: Regenerate.
6454         * aarch64-tdep.c (aarch64_gdbarch_init): Override
6455         gdbarch_wchar_bit and gdbarch_wchar_signed.
6456         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
6457         * arm-tdep.c (arm_gdbarch_init): Likewise.
6458         * avr-tdep.c (avr_gdbarch_init): Likewise.
6459         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
6460         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
6461         * i386-tdep.c (i386_go32_init_abi): Likewise.
6462         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
6463         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
6464         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6465         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
6466         * sh-tdep.c (sh_gdbarch_init): Likewise.
6467         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6468         * sparc64-tdep.c (sparc64_init_abi): Likewise.
6469         * windows-tdep.c (windows_init_abi): Likewise.
6470         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
6471
6472 2017-04-12  Pedro Alves  <palves@redhat.com>
6473
6474         PR c++/21323
6475         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
6476         cplus_primitive_type_char32_t>: New enum values.
6477         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
6478         and cplus_primitive_type_char32_t.
6479         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
6480         32, use the archtecture's built-in type for char16_t and char32_t,
6481         respectively.  Otherwise, fallback to init_integer_type as before,
6482         but make the type unsigned, and issue a complaint.
6483         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
6484
6485 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
6486
6487         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
6488         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
6489
6490 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6491
6492         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
6493         'const char *'.
6494
6495 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
6496
6497         * common/common-utils.c (free_vector_argv): New function.
6498         * common/common-utils.h: Include <vector>.
6499         (free_vector_argv): New prototype.
6500         * darwin-nat.c (darwin_create_inferior): Rewrite function
6501         prototype in order to constify "exec_file" and accept a
6502         "std::string" for "allargs".
6503         * fork-child.c: Include <vector>.
6504         (breakup_args): Rewrite function, using C++.
6505         (fork_inferior): Rewrite function header, constify "exec_file_arg"
6506         and accept "std::string" for "allargs".  Update the code to
6507         calculate "argv" based on "allargs".  Update calls to "exec_fun"
6508         and "execvp".
6509         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
6510         order to constify "exec_file" and accept a "std::string" for
6511         "allargs".
6512         * go32-nat.c (go32_create_inferior): Likewise.
6513         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
6514         * infcmd.c (run_command_1): Constify "exec_file".  Use
6515         "std::string" for inferior arguments.
6516         * inferior.h (fork_inferior): Update prototype.
6517         * linux-nat.c (linux_nat_create_inferior): Rewrite function
6518         prototype in order to constify "exec_file" and accept a
6519         "std::string" for "allargs".
6520         * nto-procfs.c (procfs_create_inferior): Likewise.
6521         * procfs.c (procfs_create_inferior): Likewise.
6522         * remote-sim.c (gdbsim_create_inferior): Likewise.
6523         * remote.c (extended_remote_run): Update code to accept
6524         "std::string" as argument.
6525         (extended_remote_create_inferior): Rewrite function prototype in
6526         order to constify "exec_file" and accept a "std::string" for
6527         "allargs".
6528         * rs6000-nat.c (super_create_inferior): Likewise.
6529         (rs6000_create_inferior): Likewise.
6530         * target.h (struct target_ops) <to_create_inferior>: Likewise.
6531         * windows-nat.c (windows_create_inferior): Likewise.
6532
6533 2017-04-11  Pedro Alves  <palves@redhat.com>
6534
6535         * thread.c: Fix whitespace throughout.
6536
6537 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
6538
6539         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
6540
6541 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
6542
6543         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
6544
6545 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
6546
6547         PR gdb/21364
6548         * osdata.c (info_osdata): Check if 'type' is an empty string
6549         instead of NULL.
6550
6551 2017-04-10  Pedro Alves  <palves@redhat.com>
6552
6553         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
6554         (ptid_to_global_thread_id, in_thread_list)
6555         (do_captured_list_thread_ids, set_resumed, set_running)
6556         (set_executing, set_stop_requested, finish_thread_state)
6557         (validate_registers_access, can_access_registers_ptid)
6558         (print_thread_info_1, switch_to_thread)
6559         (do_restore_current_thread_cleanup)
6560         (make_cleanup_restore_current_thread, thread_command)
6561         (thread_name_command): Use operator== instead of ptid_equal.
6562
6563 2017-04-10  Pedro Alves  <palves@redhat.com>
6564
6565         * thread.c (struct current_thread_cleanup) <next>: Delete field.
6566         (current_thread_cleanup_chain): Delete.
6567         (restore_current_thread_cleanup_dtor)
6568         (make_cleanup_restore_current_thread): Remove references to
6569         current_thread_cleanup_chain.
6570
6571 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
6572
6573         * msp430-tdep.c (msp430_pseudo_register_read): Never return
6574         REG_UNKNOWN.
6575
6576 2017-04-10  Yao Qi  <yao.qi@linaro.org>
6577
6578         PR gdb/19942
6579         * gdbthread.h (thread_info::deletable): New method.
6580         (thread_info::incref): New method.
6581         (thread_info::decref): New method.
6582         (thread_info::refcount): Move it to private.
6583         * infrun.c (save_stop_context): Call inc_refcount.
6584         (release_stop_context_cleanup): Likewise.
6585         * thread.c (set_thread_exited): New function.
6586         (init_thread_list): Delete "tp" only it is deletable, otherwise
6587         call set_thread_exited.
6588         (delete_thread_1): Call set_thread_exited.
6589         (current_thread_cleanup) <inferior_pid>: Remove.
6590         <thread>: New field.
6591         (restore_current_thread_ptid_changed): Removed.
6592         (do_restore_current_thread_cleanup): Adjust.
6593         (restore_current_thread_cleanup_dtor): Don't call
6594         find_thread_ptid.
6595         (set_thread_refcount): Use dec_refcount.
6596         (make_cleanup_restore_current_thread): Adjust.
6597         (thread_apply_all_command): Call inc_refcount.
6598         (_initialize_thread): Don't call
6599         observer_attach_thread_ptid_changed.
6600
6601 2017-04-10  Yao Qi  <yao.qi@linaro.org>
6602
6603         * thread.c (delete_thread_1): Hoist code on marking thread as
6604         exited.
6605
6606 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
6607
6608         * windows-nat.c (windows_detach): Initialize ptid with
6609         minus_one_ptid.
6610
6611 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
6612
6613         * unittests/ptid-selftests.c: Fix erroneous assert messages.
6614
6615 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
6616
6617         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
6618         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
6619         (bfin_pseudo_register_write): Likewise
6620
6621 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
6622
6623         * common/ptid.h (struct ptid): Change to...
6624         (class ptid_t): ... this.
6625         <ptid_t>: New constructors.
6626         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
6627         matches>: New methods.
6628         <make_null, make_minus_one>: New static methods.
6629         <pid>: Rename to...
6630         <m_pid>: ...this.
6631         <lwp>: Rename to...
6632         <m_lwp>: ...this.
6633         <tid>: Rename to...
6634         <m_tid>: ...this.
6635         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
6636         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
6637         as references, move comment to class ptid_t.
6638         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
6639         ptid_t static methods.
6640         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
6641         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
6642         Take ptid arguments as references, implement using ptid_t methods.
6643         * unittests/ptid-selftests.c: New file.
6644         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6645         unittests/ptid-selftests.c.
6646         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
6647
6648 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6649
6650         * python/python.c (python_run_simple_file): Cast mode literal to
6651         non-const char pointer as expected by PyFile_FromString.
6652
6653 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
6654
6655         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
6656         minus_one_ptid and null_ptid.
6657
6658 2017-04-05  Pedro Alves  <palves@redhat.com>
6659
6660         * warning.m4 (build_warnings): Remove -Wno-write-strings.
6661         * configure: Regenerate.
6662
6663 2017-04-05  Pedro Alves  <palves@redhat.com>
6664
6665         * ada-exp.y (yyerror): Constify.
6666         * ada-lang.c (bound_name, get_selections)
6667         (ada_variant_discrim_type)
6668         (ada_variant_discrim_name, ada_value_struct_elt)
6669         (ada_lookup_struct_elt_type, is_unchecked_variant)
6670         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
6671         (catch_ada_exception_command_split)
6672         (catch_ada_assert_command_split, catch_assert_command)
6673         (ada_op_name): Constify.
6674         * ada-lang.h (ada_yyerror, get_selections)
6675         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
6676         * arc-tdep.c (arc_print_frame_cache): Constify.
6677         * arm-tdep.c (arm_skip_stub): Constify.
6678         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
6679         (gen_aggregate_elt_ref): Constify.
6680         * bcache.c (print_bcache_statistics): Constify.
6681         * bcache.h (print_bcache_statistics): Constify.
6682         * break-catch-throw.c (catch_exception_command_1):
6683         * breakpoint.c (struct ep_type_description::description):
6684         Constify.
6685         (add_solib_catchpoint): Constify.
6686         (catch_fork_command_1): Add cast.
6687         (add_catch_command): Constify.
6688         * breakpoint.h (add_catch_command, add_solib_catchpoint):
6689         Constify.
6690         * bsd-uthread.c (bsd_uthread_state): Constify.
6691         * buildsym.c (patch_subfile_names): Constify.
6692         * buildsym.h (next_symbol_text_func, patch_subfile_names):
6693         Constify.
6694         * c-exp.y (yyerror): Constify.
6695         (token::oper): Constify.
6696         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
6697         * c-varobj.c (cplus_describe_child): Constify.
6698         * charset.c (find_charset_names): Add cast.
6699         (find_charset_names): Constify array and add const_cast.
6700         * cli/cli-cmds.c (complete_command, cd_command): Constify.
6701         (edit_command): Constify.
6702         * cli/cli-decode.c (lookup_cmd): Constify.
6703         * cli/cli-dump.c (dump_memory_command, dump_value_command):
6704         Constify.
6705         (struct dump_context): Constify.
6706         (add_dump_command, restore_command): Constify.
6707         * cli/cli-script.c (get_command_line): Constify.
6708         * cli/cli-script.h (get_command_line): Constify.
6709         * cli/cli-utils.c (check_for_argument): Constify.
6710         * cli/cli-utils.h (check_for_argument): Constify.
6711         * coff-pe-read.c (struct read_pe_section_data): Constify.
6712         * command.h (lookup_cmd): Constify.
6713         * common/print-utils.c (decimal2str): Constify.
6714         * completer.c (gdb_print_filename): Constify.
6715         * corefile.c (set_gnutarget): Constify.
6716         * cp-name-parser.y (yyerror): Constify.
6717         * cp-valprint.c (cp_print_class_member): Constify.
6718         * cris-tdep.c (cris_register_name, crisv32_register_name):
6719         Constify.
6720         * d-exp.y (yyerror): Constify.
6721         (struct token::oper): Constify.
6722         * d-lang.h (d_yyerror): Constify.
6723         * dbxread.c (struct header_file_location::name): Constify.
6724         (add_old_header_file, add_new_header_file, last_function_name)
6725         (dbx_next_symbol_text, add_bincl_to_list)
6726         (find_corresponding_bincl_psymtab, set_namestring)
6727         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
6728         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
6729         * defs.h (command_line_input, print_address_symbolic)
6730         (deprecated_readline_begin_hook): Constify.
6731         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
6732         Constify.
6733         * event-top.c (handle_line_of_input): Constify and add cast.
6734         * exceptions.c (catch_errors): Constify.
6735         * exceptions.h (catch_errors): Constify.
6736         * expprint.c (print_subexp_standard, op_string, op_name)
6737         (op_name_standard, dump_raw_expression, dump_raw_expression):
6738         * expression.h (op_name, op_string, dump_raw_expression):
6739         Constify.
6740         * f-exp.y (yyerror): Constify.
6741         (struct token::oper): Constify.
6742         (struct f77_boolean_val::name): Constify.
6743         * f-lang.c (f_word_break_characters): Constify.
6744         * f-lang.h (f_yyerror): Constify.
6745         * fork-child.c (fork_inferior): Add cast.
6746         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
6747         (new_variant): Constify.
6748         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
6749         * gdbarch.c: Regenerate.
6750         * gdbcore.h (set_gnutarget): Constify.
6751         * go-exp.y (yyerror): Constify.
6752         (token::oper): Constify.
6753         * go-lang.h (go_yyerror): Constify.
6754         * go32-nat.c (go32_sysinfo): Constify.
6755         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
6756         * guile/scm-cmd.c (cmdscm_function): Constify.
6757         * guile/scm-param.c (pascm_param_value): Constify.
6758         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
6759         (h8300sx_register_name): Constify.
6760         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
6761         Constify.
6762         * ia64-tdep.c (ia64_register_names): Constify.
6763         * infcmd.c (construct_inferior_arguments): Constify.
6764         (path_command, attach_post_wait): Constify.
6765         * language.c (show_range_command, show_case_command)
6766         (unk_lang_error): Constify.
6767         * language.h (language_defn::la_error)
6768         (language_defn::la_name_of_this): Constify.
6769         * linespec.c (decode_line_2): Constify.
6770         * linux-thread-db.c (thread_db_err_str): Constify.
6771         * lm32-tdep.c (lm32_register_name): Constify.
6772         * m2-exp.y (yyerror): Constify.
6773         * m2-lang.h (m2_yyerror): Constify.
6774         * m32r-tdep.c (m32r_register_names): Constify and make static.
6775         * m68hc11-tdep.c (m68hc11_register_names): Constify.
6776         * m88k-tdep.c (m88k_register_name): Constify.
6777         * macroexp.c (appendmem): Constify.
6778         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
6779         (upgrade_type, parse_external, parse_partial_symbols)
6780         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
6781         (new_symbol): Constify.
6782         * memattr.c (mem_info_command): Constify.
6783         * mep-tdep.c (register_name_from_keyword): Constify.
6784         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
6785         Constify.
6786         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
6787         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
6788         * mi/mi-main.c (captured_mi_execute_command): Constify and add
6789         cast.
6790         (mi_execute_async_cli_command): Constify.
6791         * mips-tdep.c (mips_register_name): Constify.
6792         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
6793         (am33_register_name, am33_2_register_name)
6794         * moxie-tdep.c (moxie_register_names): Constify.
6795         * nat/linux-osdata.c (osdata_type): Constify fields.
6796         * nto-tdep.c (nto_parse_redirection): Constify.
6797         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
6798         (lookup_child_selector): Constify.
6799         (objc_methcall::name): Constify.
6800         * objc-lang.h (lookup_objc_class, lookup_child_selector)
6801         (lookup_struct_typedef): Constify.
6802         * objfiles.c (pc_in_section): Constify.
6803         * objfiles.h (pc_in_section): Constify.
6804         * p-exp.y (struct token::oper): Constify.
6805         (yyerror): Constify.
6806         * p-lang.h (pascal_yyerror): Constify.
6807         * parser-defs.h (op_name_standard): Constify.
6808         (op_print::string): Constify.
6809         (exp_descriptor::op_name): Constify.
6810         * printcmd.c (print_address_symbolic): Constify.
6811         * psymtab.c (print_partial_symbols): Constify.
6812         * python/py-breakpoint.c (stop_func): Constify.
6813         (bppy_get_expression): Constify.
6814         * python/py-cmd.c (cmdpy_completer::name): Constify.
6815         (cmdpy_function): Constify.
6816         * python/py-event.c (evpy_add_attribute)
6817         (gdbpy_initialize_event_generic): Constify.
6818         * python/py-event.h (evpy_add_attribute)
6819         (gdbpy_initialize_event_generic): Constify.
6820         * python/py-evts.c (add_new_registry): Constify.
6821         * python/py-finishbreakpoint.c (outofscope_func): Constify.
6822         * python/py-framefilter.c (get_py_iter_from_func): Constify.
6823         * python/py-inferior.c (get_buffer): Add cast.
6824         * python/py-param.c (parm_constant::name): Constify.
6825         * python/py-unwind.c (fprint_frame_id): Constify.
6826         * python/python.c (gdbpy_parameter_value): Constify.
6827         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
6828         * remote.c (memory_packet_config::name): Constify.
6829         (show_packet_config_cmd, remote_write_bytes)
6830         (remote_buffer_add_string):
6831         * reverse.c (exec_reverse_once): Constify.
6832         * rs6000-tdep.c (variant::name, variant::description): Constify.
6833         * rust-exp.y (rustyyerror): Constify.
6834         * rust-lang.c (rust_op_name): Constify.
6835         * rust-lang.h (rustyyerror): Constify.
6836         * serial.h (serial_ops::name): Constify.
6837         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
6838         (sh_sh3e_register_name, sh_sh2e_register_name)
6839         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
6840         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
6841         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
6842         (sh_sh4al_dsp_register_name): Constify.
6843         * sh64-tdep.c (sh64_register_name): Constify.
6844         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
6845         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
6846         * stabsread.c (patch_block_stabs, read_type_number)
6847         (ref_map::stabs, ref_add, process_reference)
6848         (symbol_reference_defined, define_symbol, define_symbol)
6849         (error_type, read_type, read_member_functions, read_cpp_abbrev)
6850         (read_one_struct_field, read_struct_fields, read_baseclasses)
6851         (read_tilde_fields, read_struct_type, read_array_type)
6852         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
6853         (read_huge_number, read_range_type, read_args, common_block_start)
6854         (find_name_end): Constify.
6855         * stabsread.h (common_block_start, define_symbol)
6856         (process_one_symbol, symbol_reference_defined, ref_add):
6857         * symfile.c (get_section_index, add_symbol_file_command):
6858         * symfile.h (get_section_index): Constify.
6859         * target-descriptions.c (tdesc_type::name): Constify.
6860         (tdesc_free_type): Add cast.
6861         * target.c (find_default_run_target):
6862         (add_deprecated_target_alias, find_default_run_target)
6863         (target_announce_detach): Constify.
6864         (do_option): Constify.
6865         * target.h (add_deprecated_target_alias): Constify.
6866         * thread.c (print_thread_info_1): Constify.
6867         * top.c (deprecated_readline_begin_hook, command_line_input):
6868         Constify.
6869         (init_main): Add casts.
6870         * top.h (handle_line_of_input): Constify.
6871         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
6872         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
6873         (tfind_command): Rename to ...
6874         (tfind_command_1): ... this and constify.
6875         (tfind_command): New function.
6876         (tfind_end_command, tfind_start_command): Adjust.
6877         (encode_source_string): Constify.
6878         * tracepoint.h (encode_source_string): Constify.
6879         * tui/tui-data.c (tui_partial_win_by_name): Constify.
6880         * tui/tui-data.h (tui_partial_win_by_name): Constify.
6881         * tui/tui-source.c (tui_set_source_content_nil): Constify.
6882         * tui/tui-source.h (tui_set_source_content_nil): Constify.
6883         * tui/tui-win.c (parse_scrolling_args): Constify.
6884         * tui/tui-windata.c (tui_erase_data_content): Constify.
6885         * tui/tui-windata.h (tui_erase_data_content): Constify.
6886         * tui/tui-winsource.c (tui_erase_source_content): Constify.
6887         * tui/tui.c (tui_enable): Add cast.
6888         * utils.c (defaulted_query): Constify.
6889         (init_page_info): Add cast.
6890         (puts_debug, subset_compare): Constify.
6891         * utils.h (subset_compare): Constify.
6892         * varobj.c (varobj_format_string): Constify.
6893         * varobj.h (varobj_format_string): Constify.
6894         * vax-tdep.c (vax_register_name): Constify.
6895         * windows-nat.c (windows_detach): Constify.
6896         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
6897         * xml-support.c (gdb_xml_end_element): Constify.
6898         * xml-tdesc.c (tdesc_start_reg): Constify.
6899         * xstormy16-tdep.c (xstormy16_register_name): Constify.
6900         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
6901         * xtensa-tdep.h (xtensa_register_t::name): Constify.
6902
6903 2017-04-05  Pedro Alves  <palves@redhat.com>
6904
6905         * proc-api.c (struct trans): Constify.
6906         (procfs_note): Constify.
6907         * proc-events.c (struct trans, syscall_table):
6908         * proc-flags.c (struct trans): Constify.
6909         * proc-utils.h (procfs_note): Constify.
6910         * proc-why.c (struct trans): Constify.
6911         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
6912         (procfs_detach): Constify.
6913         * sol-thread.c (struct string_map): Constify.
6914         (td_err_string, td_state_string): Constify.
6915
6916 2017-04-05  Pedro Alves  <palves@redhat.com>
6917
6918         * proc-api.c (procfs_filename): Don't initialize
6919         procfs_filename.
6920         (prepare_to_trace): Assume procfs_filename is non-NULL.
6921         (_initialize_proc_api): Give procfs_filename a default value here.
6922
6923 2017-04-05  Pedro Alves  <palves@redhat.com>
6924
6925         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
6926         'cond_string' parameter.
6927         (extract_exception_regexp): Constify 'string' parameter.
6928         (catch_exception_command_1): Constify.
6929         * breakpoint.c (init_catchpoint)
6930         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
6931         parameter.
6932         (ep_parse_optional_if_clause, catch_fork_command_1)
6933         (catch_exec_command_1): Constify.
6934         * breakpoint.h (init_catchpoint): Constify 'cond_string'
6935         parameter.
6936         (ep_parse_optional_if_clause): Constify.
6937         * cli/cli-utils.c (remove_trailing_whitespace)
6938         (check_for_argument): Constify.
6939         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
6940         non-const overload.
6941         (check_for_argument): Likewise.
6942
6943 2017-04-05  Pedro Alves  <palves@redhat.com>
6944
6945         * event-top.c (command_line_handler): Add cast to execute_command
6946         call.
6947         * record-btrace.c (cmd_record_btrace_bts_start)
6948         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
6949         (cmd_record_btrace_start): Add cast to execute_command call.
6950         * record-full.c (record_full_goto_insn):
6951         * record.c (record_start, record_stop): Add cast to
6952         execute_command_to_string calls.
6953         (cmd_record_start): Add cast to execute_command calls.
6954
6955 2017-04-05  Pedro Alves  <palves@redhat.com>
6956
6957         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
6958         static inline function.
6959         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
6960         array and use gdb_PyArg_ParseTupleAndKeywords.
6961         * python/py-cmd.c (cmdpy_init): Likewise.
6962         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
6963         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
6964         (infpy_search_memory): Likewise.
6965         * python/py-objfile.c (objfpy_add_separate_debug_file)
6966         (gdbpy_lookup_objfile): Likewise.
6967         * python/py-symbol.c (gdbpy_lookup_symbol)
6968         (gdbpy_lookup_global_symbol): Likewise.
6969         * python/py-type.c (gdbpy_lookup_type): Likewise.
6970         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
6971         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
6972         Likewise.
6973
6974 2017-04-05  Pedro Alves  <palves@redhat.com>
6975
6976         * python/python-internal.h (gdb_PyGetSetDef): New type.
6977         * python/py-block.c (block_object_getset)
6978         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
6979         * python/py-event.c (event_object_getset)
6980         (finish_breakpoint_object_getset): Likewise.
6981         * python/py-inferior.c (inferior_object_getset): Likewise.
6982         * python/py-infthread.c (thread_object_getset): Likewise.
6983         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
6984         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
6985         * python/py-objfile.c (objfile_getset): Likewise.
6986         * python/py-progspace.c (pspace_getset): Likewise.
6987         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
6988         Likewise.
6989         * python/py-record.c (recpy_record_getset): Likewise.
6990         * python/py-symbol.c (symbol_object_getset): Likewise.
6991         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
6992         Likewise.
6993         * python/py-type.c (type_object_getset, field_object_getset):
6994         Likewise.
6995         * python/py-value.c (value_object_getset): Likewise.
6996
6997 2017-04-05  Pedro Alves  <palves@redhat.com>
6998
6999         * python/python-internal.h (gdb_PyObject_CallMethod)
7000         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
7001         New functions.
7002         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
7003         (PySys_GetObject, PySys_SetPath): New macros.
7004
7005 2017-04-05  Pedro Alves  <palves@redhat.com>
7006
7007         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
7008         info_osdata_command.
7009         * osdata.c (info_osdata_command): Rename to ...
7010         (info_osdata): ... this.  Constify 'type' parameter, and remove
7011         the 'from_tty' parameter.  Accept NULL TYPE.
7012         (info_osdata_command): New function.
7013         * osdata.h (info_osdata_command): Remove declaration.
7014         (info_osdata): New declaration.
7015
7016 2017-04-05  Pedro Alves  <palves@redhat.com>
7017
7018         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
7019         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
7020         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
7021         parameter.
7022         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
7023         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
7024         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
7025         parameter.
7026         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
7027         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
7028         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
7029         (mi_cmd_file_list_exec_source_files)
7030         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
7031         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
7032         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
7033         parameter.
7034         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
7035         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
7036         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
7037         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
7038         (mi_cmd_stack_info_frame): Constify 'command' parameter.
7039         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
7040         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
7041         'command' parameter.
7042         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
7043         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
7044         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
7045         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
7046         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
7047         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
7048         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
7049         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
7050         (mi_cmd_var_set_update_range): Constify 'command' parameter.
7051         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
7052         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
7053         parameter.
7054         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
7055         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
7056         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
7057         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
7058         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
7059         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
7060         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
7061         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
7062         (mi_cmd_data_list_changed_registers)
7063         (mi_cmd_data_write_register_values)
7064         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
7065         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
7066         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
7067         (mi_cmd_list_features, mi_cmd_list_target_features)
7068         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
7069         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
7070         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
7071         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
7072         (mi_cmd_trace_frame_collected): Constify 'command'
7073         parameter.
7074         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
7075         'command' parameter.
7076
7077 2017-04-05  Pedro Alves  <palves@redhat.com>
7078
7079         * ada-lang.c (ada_completer_word_break_characters): Now a const
7080         array.
7081         (ada_get_gdb_completer_word_break_characters): Constify.
7082         * completer.c (gdb_completer_command_word_break_characters)
7083         (gdb_completer_file_name_break_characters)
7084         (gdb_completer_quote_characters): Now const arrays.
7085         (get_gdb_completer_quote_characters): Constify.
7086         (set_rl_completer_word_break_characters): New function.
7087         (set_gdb_completion_word_break_characters)
7088         (complete_line_internal): Use it.
7089         * completer.h (get_gdb_completer_quote_characters): Constify.
7090         (set_rl_completer_word_break_characters): Declare.
7091         * f-lang.c (f_word_break_characters): Constify.
7092         * language.c (default_word_break_characters): Constify.
7093         * language.h (language_defn::la_word_break_characters): Constify.
7094         (default_word_break_characters): Constify.
7095         * top.c (init_main): Use set_rl_completer_word_break_characters.
7096
7097 2017-04-05  Pedro Alves  <palves@redhat.com>
7098
7099         * aix-thread.c (aix_thread_pid_to_str)
7100         (aix_thread_extra_thread_info): Constify.
7101         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
7102         * bsd-uthread.c (bsd_uthread_extra_thread_info)
7103         (bsd_uthread_pid_to_str): Constify.
7104         * corelow.c (core_pid_to_str): Constify.
7105         * darwin-nat.c (darwin_pid_to_str): Constify.
7106         * fbsd-nat.c (fbsd_pid_to_str): Constify.
7107         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
7108         Constify.
7109         * gnu-nat.c (gnu_pid_to_str): Constify.
7110         * go32-nat.c (go32_pid_to_str): Constify.
7111         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
7112         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
7113         * inferior.c (inferior_pid_to_str): Constify.
7114         * linux-nat.c (linux_nat_pid_to_str): Constify.
7115         * linux-tdep.c (linux_core_pid_to_str): Constify.
7116         * linux-thread-db.c (thread_db_pid_to_str)
7117         (thread_db_extra_thread_info): Constify.
7118         * nto-tdep.c (nto_extra_thread_info): Constify.
7119         * nto-tdep.h (nto_extra_thread_info): Constify.
7120         * obsd-nat.c (obsd_pid_to_str): Constify.
7121         * procfs.c (procfs_pid_to_str): Constify.
7122         * ravenscar-thread.c (ravenscar_extra_thread_info)
7123         (ravenscar_pid_to_str): Constify.
7124         * remote-sim.c (gdbsim_pid_to_str): Constify.
7125         * remote.c (remote_threads_extra_info, remote_pid_to_str):
7126         Constify.
7127         * sol-thread.c (solaris_pid_to_str): Constify.
7128         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
7129         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
7130         * target.c (default_pid_to_str, target_pid_to_str)
7131         (normal_pid_to_str, default_pid_to_str): Constify.
7132         * target.h (target_ops::to_pid_to_str)
7133         (target_ops::to_extra_thread_info): Constify.
7134         (target_pid_to_str, normal_pid_to_str): Constify.
7135         * windows-nat.c (windows_pid_to_str): Constify.
7136         * gdbarch.sh (core_pid_to_str): Constify.
7137         * target-delegates.c: Regenerate.
7138         * gdbarch.h, gdbarch.c: Regenerate.
7139
7140 2017-04-05  Pedro Alves  <palves@redhat.com>
7141
7142         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
7143         the memory of the temporary warning_pre_print override.
7144         * utils.c (warning_pre_print): Constify.
7145         * utils.h (warning_pre_print): Constify.
7146
7147 2017-04-05  Pedro Alves  <palves@redhat.com>
7148
7149         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
7150         (shell_command): New function.
7151         (make_command): Use std::string.
7152         (init_cli_cmds): Register shell_command instead of shell_escape.
7153
7154 2017-04-05  Pedro Alves  <palves@redhat.com>
7155
7156         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
7157         * tracepoint.c (default_collect): Don't initialize.
7158
7159 2017-04-05  Pedro Alves  <palves@redhat.com>
7160
7161         * macroexp.c (macro_buffer::shared): Now a bool.
7162         (init_buffer): Update.
7163         (init_shared_buffer): Constify 'addr' parameter.
7164         (substitute_args, expand, macro_expand, macro_expand_next): Remove
7165         casts.
7166
7167 2017-04-05  Pedro Alves  <palves@redhat.com>
7168
7169         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
7170         * disasm.c (set_disassembler_options): Constify local.
7171         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
7172
7173 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
7174
7175         PR gdb/21352
7176         * tracefile.c (tsave_command): Fix argument parsing for '-r'
7177         option.
7178
7179 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7180
7181         * frame.c (frame_unwind_register_unsigned): Call
7182         frame_unwind_register_value.
7183
7184 2017-04-05  Yao Qi  <yao.qi@linaro.org>
7185
7186         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
7187         Use gdb_test_multiple, and don't match anchor.
7188
7189 2017-04-05  Pedro Alves  <palves@redhat.com>
7190
7191         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
7192         (Write After Approval): Remove Simon Marchi.
7193
7194 2017-04-05  Pedro Alves  <palves@redhat.com>
7195
7196         * common/gdb_optional.h (optional::optional): Make constexpr and
7197         initialize m_dummy.
7198
7199 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7200
7201         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7202         (amd64fbsd_jmp_buf_reg_offset): Remove.
7203         (amd64fbsd_supply_uthread): Remove function.
7204         (amd64fbsd_collect_uthread): Remove function.
7205         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
7206         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
7207         (x86_64-*-freebsd*): Remove bsd-uthread.o.
7208         (fbsd-nat.c): Update comment.
7209         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
7210         (i386fbsd_jmp_buf_reg_offset): Remove.
7211         (i386fbsd_supply_uthread): Remove function.
7212         (i386fbsd_collect_uthread): Remove function.
7213         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
7214
7215 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7216
7217         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
7218         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
7219         * NEWS: Mention that support for FreeBSD/alpha was removed.
7220         * alpha-fbsd-tdep.c: Delete file.
7221         * config/alpha/fbsd.mh: Delete file.
7222         * configure.host: Delete alpha*-*-freebsd* and
7223         alpha*-*-kfreebsd*-gnu.
7224         * configure.tgt: Delete alpha*-*-freebsd* and
7225         alpha*-*-kfreebsd*-gnu.
7226
7227 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
7228
7229         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
7230         amd64bsd_store_inferior_registers): Use ptid from regcache.
7231
7232 2017-04-04  Pedro Alves  <palves@redhat.com>
7233
7234         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
7235         data fields, make them private and add "m_" prefixes.
7236         (lnp_state_machine::lnp_state_machine): New ctor.
7237         (record_line, check_line_address, handle_set_discriminator)
7238         (handle_set_address, handle_advance_pc, handle_special_opcode)
7239         (handle_advance_line, handle_set_file, handle_negate_stmt)
7240         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
7241         (end_sequence, advance_line): New methods.
7242         (m_gdbarch, m_record_lines_p): New fields.
7243         (lnp_reader_state): Delete.
7244         (dwarf_record_line): Rename to ...
7245         (lnp_state_machine::record_line): ... adjust.
7246         (init_lnp_state_machine): Delete.
7247         (lnp_state_machine::lnp_state_machine): New.
7248         (check_line_address): Rename to ...
7249         (lnp_state_machine::check_line_address): This.
7250         (dwarf_decode_lines_1): Remove reference to "reader_state".
7251         Adjust lnp_state_machine having a non-default ctor.  Use bool.
7252         State machine internal state manipulation moved to
7253         lnp_state_machine methods.
7254
7255 2017-04-04  Pedro Alves  <palves@redhat.com>
7256
7257         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7258         unittests/offset-type-selftests.c.
7259         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
7260         * common/offset-type.h: New file.
7261         * common/preprocessor.h: New file.
7262         * common/traits.h: New file.
7263         * common/valid-expr.h: New file.
7264         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
7265         sect_offset and cu_offset strong typedefs throughout.
7266         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
7267         typedefs throughout.
7268         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
7269         sect_offset and cu_offset strong typedefs throughout.
7270         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
7271         typedefs throughout.
7272         * gdbtypes.h: Include "common/offset-type.h".
7273         (cu_offset): Now an offset type (strong typedef) instead of a
7274         struct.
7275         (sect_offset): Likewise.
7276         (union call_site_parameter_u): Rename "param_offset" field to
7277         "param_cu_off".
7278         * unittests/offset-type-selftests.c: New file.
7279
7280 2017-04-04  Pedro Alves  <palves@redhat.com>
7281
7282         * common/underlying.h: New file.
7283         * dwarf2read.c: Include "common/gdb_optional.h" and
7284         "common/underlying.h".
7285         (dir_index, file_name_index): New types.
7286         (file_entry): Use them.
7287         (file_entry::include): Use to_underlying.
7288         (line_header::add_file_name): Use dir_index.
7289         (read_formatted_entries): Use gdb::optional.  Read form before
7290         writting to file_entry.
7291         (dwarf_decode_line_header): Use dir_index.
7292         (lnp_state_machine::current_file): Use to_underlying.
7293         (lnp_state_machine::file): Change type to file_name_index.
7294         (dwarf_record_line): Use to_underlying.
7295         (init_lnp_state_machine): Use file_name_index.
7296         (dwarf_decode_lines_1): Use dir_index and file_name_index.
7297
7298 2017-04-04  Pedro Alves  <palves@redhat.com>
7299
7300         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
7301         operator bool, has_value and get methods.
7302
7303 2017-04-04  Pedro Alves  <palves@redhat.com>
7304
7305         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
7306         fields.
7307         (line_header): Initialize all data fields.  Change type of
7308         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
7309         Change type of include_dirs to std::vector<const char *>.  Remove
7310         num_include_dirs, include_dirs_size.  Change type of file_names to
7311         std::vector<file_entry>.  Remove num_file_names, file_names_size.
7312         (line_header::line_header): New.
7313         (line_header::add_include_dir, line_header::add_file_name): New
7314         methods.
7315         (line_header::include_dir_at): Remove NULL check.
7316         (line_header::file_name_at): Add const overload.
7317         (line_header_up): New unique_ptr typedef.
7318         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
7319         std::vector.  Remove free_line_header call.
7320         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
7321         free_line_header call.
7322         (free_cu_line_header): Delete.
7323         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
7324         (setup_type_unit_groups): Use line_header_up instead of cleanups.
7325         Adjust to use std::vector.
7326         (free_line_header): Delete.
7327         (free_line_header_voidp): Use delete.
7328         (add_include_dir): Replace with ...
7329         (line_header::add_include_dir): ... this method.  Use std::vector.
7330         (add_file_name): Replace with ...
7331         (line_header::add_file_name): ... this method.  Use std::vector.
7332         (add_include_dir_stub): Delete.
7333         (read_formatted_entries): Remove memset.
7334         (dwarf_decode_line_header): Return a line_header_up instead of a
7335         raw pointer.  Remove cleanup handling.  Pass lambdas to
7336         read_formatted_entries.  Adjust to use line_header methods.
7337         (dwarf_decode_lines_1): Adjust to use line_header methods.
7338         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
7339         use std::vector.
7340
7341 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
7342
7343         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
7344         instead of struct ptid.
7345
7346 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
7347
7348         * frame.c (get_frame_register_bytes): Unwind using value.
7349         (put_frame_register_bytes): Likewise.
7350
7351 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
7352
7353         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
7354         aggregate-like.
7355
7356 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
7357
7358         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
7359
7360 2017-03-29  Yao Qi  <yao.qi@linaro.org>
7361
7362         * gdbthread.h (struct thread_info): Declare constructor and
7363         destructor.  Add some in-class member initializers.
7364         * thread.c (free_thread): Remove.
7365         (init_thread_list): Call delete instead of free_thread.
7366         (new_thread): Call thread_info constructor.
7367         (thread_info::thread_info): New function.
7368         (thread_info::~thread_info): New function.
7369         (delete_thread_1): Call delete instead of free_thread.
7370         (make_cleanup_restore_current_thread): Move tp and frame to
7371         inner block.
7372
7373 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7374
7375         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
7376         (arc_skip_prologue): Likewise.
7377         (arc_make_frame_cache): Likewise.
7378         (arc_pv_get_operand): New function.
7379         (arc_is_in_prologue): Likewise.
7380         (arc_analyze_prologue): Likewise.
7381         (arc_print_frame_cache): Likewise.
7382         (MAX_PROLOGUE_LENGTH): New constant.
7383
7384 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7385
7386         * configure.tgt: Add arc-insn.o.
7387         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
7388         (dump_arc_instruction_command): New function.
7389         (arc_fprintf_disasm): Likewise.
7390         (arc_disassemble_info): Likewise.
7391         (arc_insn_get_operand_value): Likewise.
7392         (arc_insn_get_operand_value_signed): Likewise.
7393         (arc_insn_get_memory_base_reg): Likewise.
7394         (arc_insn_get_memory_offset): Likewise.
7395         (arc_insn_get_branch_target): Likewise.
7396         (arc_insn_dump): Likewise.
7397         (arc_insn_get_linear_next_pc): Likewise.
7398         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
7399         (arc_disassemble_info): Likewise.
7400         (arc_insn_get_branch_target): Likewise.
7401         (arc_insn_get_linear_next_pc): Likewise.
7402         * NEWS: Mention new "maint print arc arc-instruction".
7403
7404 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7405
7406         * arc-tdep (maintenance_print_arc_list): New variable.
7407         (maintenance_print_arc_command): New function.
7408
7409 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
7410
7411         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
7412         Add "limm" and "reserved".
7413         (arc_cannot_fetch_register, arc_cannot_store_register): Add
7414         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
7415         * arc-tdep.h (arc_regnum): Likewise.
7416
7417 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7418
7419         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7420         for THREADPTR register.
7421         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
7422         register.
7423         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
7424         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
7425         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
7426
7427 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7428
7429         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
7430         registers above gdbarch_num_regs (gdbarch) as privileged in
7431         call0 ABI.
7432
7433 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7434
7435         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
7436         for a single specified register or for all registers in
7437         a0_base..a0_base + C0_NREGS range.
7438         (supply_gregset_reg): Call regcache_raw_supply for a single
7439         specified register or for all registers in a0_base..a0_base +
7440         C0_NREGS range.
7441
7442 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7443
7444         * arch/xtensa.h (C0_NREGS): Add definition.
7445         * xtensa-tdep.c (C0_NREGS): Remove definition.
7446
7447 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
7448
7449         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
7450         Drop xtensa_default_isa initialization.
7451         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
7452
7453 2017-03-27  Pedro Alves  <palves@redhat.com>
7454
7455         * dwarf2read.c (file_entry) <dir_index>: Add comment.
7456         (file_entry::include_dir): New method.
7457         (line_header::include_dir_at, line_header::file_name_at): New
7458         methods.
7459         (setup_type_unit_groups, setup_type_unit_groups)
7460         (psymtab_include_file_name): Simplify using the new methods.
7461         (lnp_state_machine) <the_line_header>: New field.
7462         <file>: Add comment.
7463         (lnp_state_machine::current_file): New method.
7464         (dwarf_record_line): Simplify using the new methods.
7465         (init_lnp_state_machine): Initialize the "the_line_header" field.
7466         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
7467         Simplify using the new methods.
7468
7469 2017-03-27  Pedro Alves  <palves@redhat.com>
7470
7471         * cp-name-parser.y (make_empty): Delete.
7472         (demangler_special, nested_name, ptr_operator, array_indicator)
7473         (direct_declarator, declarator_1): Use fill_comp instead of
7474         make_empty.
7475
7476 2017-03-27  Pedro Alves  <palves@redhat.com>
7477
7478         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
7479         to ATTRIBUTE_PRINTF.
7480         * solib-target.c (library_list_start_list): Print "string" not
7481         "version".
7482         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
7483         gdb_xml_error call.
7484
7485 2017-03-27  Pedro Alves  <palves@redhat.com>
7486
7487         * dwarf2read.c (struct file_and_directory): New.
7488         (dwarf2_get_dwz_file): Adjust to use std::string.
7489         (dw2_get_file_names_reader): Adjust to use file_and_directory.
7490         (find_file_and_directory): Adjust to return a file_and_directory
7491         object.
7492         (read_file_scope): Adjust to use file_and_directory.  Remove
7493         make_cleanup/do_cleanups calls.
7494         (open_and_init_dwp_file): Adjust to use std::string.  Remove
7495         make_cleanup/do_cleanups calls.
7496         * python/python.c (do_start_initialization): Adjust to ldirname
7497         returning a std::string.
7498         * utils.c (ldirname): Now returns a std::string.
7499         * utils.h (ldirname): Change return type to std::string.
7500         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
7501         returning a std::string.
7502         * xml-tdesc.c (file_read_description_xml): Likewise.
7503
7504 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
7505
7506         * regcache.c (regcache_debug_print_register): New function.
7507         * regcache.h (regcache_debug_print_register): New declaration.
7508         * target.c (debug_print_register): Remove.
7509         (target_fetch_registers): Call regcache_debug_print_register.
7510         (target_store_registers): Likewise.
7511
7512 2017-03-24  Pádraig Brady  <pbrady@fb.com>
7513
7514         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
7515         reference beyond the 'lh->include_dirs' array before accessing to
7516         it.
7517         (psymtab_include_file_name): Likewise.
7518         (dwarf_decode_lines_1): Likewise.
7519         (dwarf_decode_lines): Likewise.
7520         (file_file_name): Likewise.
7521
7522 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
7523
7524         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
7525         inferior_ptid.
7526         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7527         ps_lsetfpregs): Likewise.
7528         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
7529         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
7530         ps_lsetfpregs): Likewise.
7531         * target.c (target_fetch_registers, target_store_registers):
7532         Remove asserts.
7533
7534 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
7535
7536         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
7537
7538 2017-03-23  Yao Qi  <yao.qi@linaro.org>
7539
7540         * aarch64-tdep.c (aarch64_process_record_test): Declare.
7541         (_initialize_aarch64_tdep): Register it.
7542         (aarch64_record_load_store): Handle PRFM instruction.
7543         (aarch64_process_record_test): New function.
7544
7545 2017-03-23  Yao Qi  <yao.qi@linaro.org>
7546
7547         * aarch64-tdep.c (aarch64_record_load_store): Fix code
7548         indentation.
7549
7550 2017-03-23  Yao Qi  <yao.qi@linaro.org>
7551
7552         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
7553
7554 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
7555
7556         python/python.c (do_start_initialization): Fix memory leak.
7557
7558 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
7559
7560         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
7561         using get_ptrace_pid.
7562         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
7563         inferior_ptid.
7564         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
7565         inferior_ptid instead of pid.
7566
7567 2017-03-22  Yao Qi  <yao.qi@linaro.org>
7568
7569         * aarch64-tdep.c: Wrap locally used classes in anonymous
7570         namespace.
7571         * arm-tdep.c: Likewise.
7572         * linespec.c: Likewise.
7573         * ui-out.c: Likewise.
7574
7575 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
7576
7577         PR gdb/19637
7578         * python/lib/gdb/printer/bound_registers.py: Import sys.
7579
7580 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
7581
7582         * windows-nat.c (do_windows_fetch_inferior_registers): Add
7583         windows_thread_info parameter and use it instead of
7584         current_thread.
7585         (windows_fetch_inferior_registers): Don't set current_thread,
7586         pass the thread to do_windows_fetch_inferior_registers.  Use
7587         ptid from regcache instead of inferior_ptid.
7588         (do_windows_store_inferior_registers): Add windows_thread_info
7589         parameter and use it instead of current_thread.
7590         (windows_store_inferior_registers): Don't set current_thread,
7591         pass the thread to do_windows_store_inferior_registers.  Use
7592         ptid from regcache instead of inferior_ptid.
7593
7594 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
7595
7596         * ser-mingw.c (ser_windows_raw): Remove reference to
7597         struct serial::current_timeout.
7598
7599 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
7600
7601         PR tdep/20928
7602         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
7603         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
7604         (sparc64_fsr_type): Fix %fsr decoding.
7605
7606 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
7607
7608         * python/py-record-btrace.c (btpy_insn_data): Change return type
7609         for Python 2.
7610
7611 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
7612
7613         * spu-linux-nat.c (spu_fetch_inferior_registers,
7614         spu_store_inferior_registers): Use ptid from regcache, set and
7615         restore inferior_ptid.
7616         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
7617         Likewise.
7618
7619 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
7620
7621         * i386-linux-nat.c (fetch_register, store_register,
7622         i386_linux_fetch_inferior_registers,
7623         i386_linux_store_inferior_registers): Use ptid from regcache.
7624         * ia64-linux-nat.c (ia64_linux_fetch_register,
7625         ia64_linux_store_register): Likewise.
7626         * inf-ptrace.c (inf_ptrace_fetch_register,
7627         inf_ptrace_store_register): Likewise.
7628         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
7629         m32r_linux_store_inferior_registers): Likewise.
7630         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
7631         m68kbsd_store_inferior_registers): Likewise.
7632         * m68k-linux-nat.c (fetch_register, store_register,
7633         m68k_linux_fetch_inferior_registers,
7634         m68k_linux_store_inferior_registers): Likewise.
7635         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
7636         m88kbsd_store_inferior_registers): Likewise.
7637         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
7638         mips_fbsd_store_inferior_registers): Likewise.
7639         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
7640         mips64_linux_regsets_store_registers): Likewise.
7641         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
7642         mipsnbsd_store_inferior_registers): Likewise.
7643         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
7644         mips64obsd_store_inferior_registers): Likewise.
7645         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
7646         Likewise.
7647         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
7648         ppcfbsd_store_inferior_registers): Likewise.
7649         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
7650         ppc_linux_store_inferior_registers): Likewise.
7651         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
7652         ppcnbsd_store_inferior_registers): Likewise.
7653         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
7654         ppcobsd_store_registers): Likewise.
7655         * procfs.c (procfs_fetch_registers, procfs_store_registers):
7656         Likewise.
7657         * ravenscar-thread.c (ravenscar_fetch_registers,
7658         ravenscar_store_registers, ravenscar_prepare_to_store):
7659         Likewise.
7660         * record-btrace.c (record_btrace_fetch_registers,
7661         record_btrace_store_registers, record_btrace_prepare_to_store):
7662         Likewise.
7663         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
7664         Lookup inferior using ptid from regcache, instead of
7665         current_inferior.
7666         * remote.c (remote_fetch_registers, remote_store_registers): Use
7667         ptid from regcache.
7668         * rs6000-nat.c (fetch_register, store_register): Likewise.
7669         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
7670         s390_linux_store_inferior_registers): Likewise.
7671         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
7672         shnbsd_store_inferior_registers): Likewise.
7673         * sol-thread.c (sol_thread_fetch_registers,
7674         sol_thread_store_registers): Likewise.
7675         * sparc-nat.c (sparc_fetch_inferior_registers,
7676         sparc_store_inferior_registers): Likewise.
7677         * tilegx-linux-nat.c (fetch_inferior_registers,
7678         store_inferior_registers): Likewise.
7679         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
7680         vaxbsd_store_inferior_registers): Likewise.
7681         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
7682         store_xtregs): Likewise.
7683
7684 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7685
7686         PR gdb/14441
7687         * NEWS: Mention support for rvalue references in GDB and python.
7688         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
7689         supports both lvalue and rvalue references.
7690
7691 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7692
7693         PR gdb/14441
7694         * gdbtypes.c (rank_one_type): Implement overloading
7695         resolution rules regarding rvalue references.
7696
7697 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7698
7699         PR gdb/14441
7700         * aarch64-tdep.c (aarch64_type_align)
7701         (aarch64_extract_return_value, aarch64_store_return_value): Change
7702         lvalue reference type checks to general reference type checks.
7703         * amd64-tdep.c (amd64_classify): Likewise.
7704         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
7705         Likewise.
7706         * arm-tdep.c (arm_type_align, arm_extract_return_value)
7707         (arm_store_return_value): Likewise.
7708         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
7709         * c-typeprint.c (c_print_type): Likewise.
7710         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
7711         (cplus_number_of_children, cplus_describe_child): Likewise.
7712         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
7713         * completer.c (expression_completer): Likewise.
7714         * cp-support.c (make_symbol_overload_list_adl_namespace):
7715         Likewise.
7716         * darwin-nat-info.c (info_mach_region_command): Likewise.
7717         * dwarf2loc.c (entry_data_value_coerce_ref)
7718         (value_of_dwarf_reg_entry): Likewise.
7719         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
7720         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
7721         Likewise.
7722         * findvar.c (extract_typed_address, store_typed_address):
7723         Likewise.
7724         * gdbtypes.c (rank_one_type): Likewise.
7725         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
7726         * infcall.c (value_arg_coerce): Likewise.
7727         * language.c (pointer_type): Likewise.
7728         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
7729         Likewise.
7730         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
7731         * mn10300-tdep.c (mn10300_type_align): Likewise.
7732         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
7733         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
7734         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
7735         Likewise.
7736         * printcmd.c (print_formatted, x_command): Likewise.
7737         * python/py-type.c (typy_get_composite, typy_template_argument):
7738         Likewise.
7739         * python/py-value.c (valpy_referenced_value)
7740         (valpy_get_dynamic_type, value_has_field): Likewise.
7741         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
7742         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
7743         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
7744         * spu-tdep.c (spu_scalar_value_p): Likewise.
7745         * symtab.c (lookup_symbol_aux): Likewise.
7746         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
7747         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
7748         Likewise.
7749         * valops.c (value_cast_pointers, value_cast)
7750         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
7751         (value_struct_elt, value_struct_elt_bitpos)
7752         (value_find_oload_method_list, find_overload_match)
7753         (value_rtti_indirect_type): Likewise.
7754         * valprint.c (val_print_scalar_type_p, generic_val_print):
7755         Likewise.
7756         * value.c (value_actual_type, value_as_address, unpack_long)
7757         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
7758         (coerce_ref): Likewise.
7759         * varobj.c (varobj_get_value_type): Likewise.
7760
7761 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7762
7763         PR gdb/14441
7764         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
7765         table of constants.
7766         * python/lib/gdb/command/explore.py: Support exploring values
7767         of rvalue reference types.
7768         * python/lib/gdb/types.py: Implement get_basic_type() for
7769         rvalue reference types.
7770         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
7771         constant.
7772         * python/py-value.c (valpy_getitem): Add an rvalue reference
7773         check.
7774         (valpy_reference_value): Add new parameter "refcode".
7775         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
7776         New wrappers for valpy_reference_value().
7777         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7778         (gdbpy_invoke_xmethod): Likewise.
7779
7780 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7781
7782         PR gdb/14441
7783         * dwarf2read.c (process_die, read_type_die_1): Handle the
7784         DW_TAG_rvalue_reference_type DIE.
7785         (read_tag_reference_type): Add new parameter "refcode".
7786
7787 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7788
7789         PR gdb/14441
7790         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
7791         (c_type_print_modifier, c_type_print_varspec_suffix)
7792         (c_type_print_base): Support printing rvalue reference types.
7793         * c-valprint.c (c_val_print, c_value_print): Support printing
7794         rvalue reference values.
7795
7796 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7797
7798         PR gdb/14441
7799         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
7800         typename.
7801         * cp-support.c (replace_typedefs): Handle
7802         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
7803         * python/py-type.c (typy_lookup_type): Likewise.
7804
7805 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7806
7807         PR gdb/14441
7808         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
7809         * parse.c (insert_type): Change assert statement.
7810         (follow_types): Handle rvalue reference types.
7811         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
7812         constant.
7813
7814 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7815
7816         PR gdb/14441
7817         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
7818         value_ref() interface.
7819         * c-valprint.c (c_value_print): Likewise.
7820         * infcall.c (value_arg_coerce): Likewise.
7821         * python/py-value.c (valpy_reference_value): Likewise.
7822         * valops.c (value_cast, value_reinterpret_cast)
7823         (value_dynamic_cast, typecmp): Likewise.
7824         (value_ref): Parameterize by kind of return value reference type.
7825         * value.h (value_ref): Add new parameter "refcode".
7826
7827 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7828
7829         PR gdb/14441
7830         * dwarf2read.c (read_tag_reference_type): Use
7831         lookup_lvalue_reference_type() instead of lookup_reference_type().
7832         * eval.c (evaluate_subexp_standard): Likewise.
7833         * f-exp.y: Likewise.
7834         * gdbtypes.c (make_reference_type, lookup_reference_type):
7835         Generalize with rvalue reference types.
7836         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
7837         convenience wrappers for lookup_reference_type().
7838         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
7839         reference kind parameter.
7840         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
7841         wrappers for lookup_reference_type().
7842         * guile/scm-type.c (gdbscm_type_reference): Use
7843         lookup_lvalue_reference_type() instead of lookup_reference_type().
7844         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
7845         * parse.c (follow_types): Likewise.
7846         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
7847         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
7848         Likewise.
7849         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
7850         (gdbpy_invoke_xmethod): Likewise.
7851         * stabsread.c: Provide extra argument to make_reference_type()
7852         call.
7853         * valops.c (value_ref, value_rtti_indirect_type): Use
7854         lookup_lvalue_reference_type() instead of lookup_reference_type().
7855
7856 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
7857
7858         PR gdb/14441
7859         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
7860         (TYPE_IS_REFERENCE): New macro.
7861         (struct type): Add rvalue_reference_type field.
7862         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
7863
7864 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
7865
7866         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
7867         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
7868         New function definition.
7869         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
7870         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
7871         New function declaration.
7872         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
7873         * mi/mi-interp.h: New file.
7874         * solib.c (info_sharedlibrary_command): Replace for loop with
7875         ALL_SO_LIBS macro
7876         * solib.h (update_solib_list): New function declaration.
7877         (so_list_head): Move macro.
7878         * solist.h (ALL_SO_LIBS): New macro.
7879
7880 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
7881
7882         * infcmd.c (post_create_inferior): Remove unused argument in
7883         call to solib_add.
7884         * remote.c (remote_start_remote): Likewise.
7885         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
7886         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
7887         (enable_break): Likewise.
7888         * solib.c (update_solib_list): Remove unused target argument
7889         and its documentation.
7890         (solib_add): Remove unused target argument.  Remove unused
7891         argument in call to update_solib_list.
7892         (info_sharedlibrary_command): Remove unused argument in call
7893         to update_solib_list.
7894         (sharedlibrary_command): Remove unused argument in call to
7895         solib_add.
7896         (handle_solib_event): Likewise.
7897         (reload_shared_libraries): Likewise.
7898         * solib.h (solib_add): Remove unused target argument.
7899
7900 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7901
7902         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
7903         (s390_displaced_step_fixup): Cover relative branches with the
7904         default fixup handling.  This fixes lack of support for some
7905         relative branch instructions.
7906
7907 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7908
7909         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
7910         ptid from regcache.
7911
7912 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7913
7914         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
7915         i386_darwin_store_inferior_registers): Use ptid from regcache.
7916
7917 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7918
7919         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
7920         i386bsd_store_inferior_registers): Use ptid from regcache.
7921
7922 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7923
7924         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
7925         hppaobsd_store_registers): Use ptid from regcache.
7926
7927 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7928
7929         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
7930         hppanbsd_store_registers): Use ptid from regcache.
7931
7932 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7933
7934         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
7935         from regcache.  Use get_ptrace_pid.
7936
7937 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7938
7939         * corelow.c (get_core_register_section): Use ptid from regcache,
7940         update doc.
7941
7942 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7943
7944         * bsd-uthread.c (bsd_uthread_fetch_registers,
7945         bsd_uthread_store_registers): Use ptid from regcache, set and
7946         restore inferior_ptid.
7947
7948 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7949
7950         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
7951         fetch_fp_regs, store_register, store_regs, store_fp_register,
7952         store_fp_regs): Use ptid from regcache.
7953
7954 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
7955
7956         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
7957         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
7958         store_vfp_regs): Use ptid from regcache.
7959
7960 2017-03-17  Pedro Alves  <palves@redhat.com>
7961
7962         PR remote/21188
7963         * ser-base.c (ser_base_wait_for): Add comment.
7964         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
7965         version.
7966         * ser-unix.c (hardwire_raw): Remove reference to
7967         scb->current_timeout.
7968         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
7969         (hardwire_ops): Install ser_base_readchar instead of
7970         hardwire_readchar.
7971         * serial.h (struct serial) <current_timeout, timeout_remaining>:
7972         Remove fields.
7973
7974 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
7975
7976         PR gdb/19637
7977         * python/lib/gdb/printer/bound_registers.py: Add support for
7978         Python 3.
7979
7980 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7981
7982         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
7983         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
7984         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
7985         byte_offset to subobj_byte_offset.  Fix the handling of
7986         DWARF_VALUE_STACK on big-endian targets when coming via an
7987         implicit pointer.
7988         (dwarf2_evaluate_loc_desc): Adjust call to
7989         dwarf2_evaluate_loc_desc_full.
7990         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
7991         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
7992
7993 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7994
7995         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
7996         and REVSH instructions.
7997
7998 2017-03-16  Yao Qi  <yao.qi@linaro.org>
7999
8000         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
8001         (arm_record_test): Declare.
8002         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
8003         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
8004         align with the manual.
8005         (thumb_record_misc): Adjust the code order to align with the
8006         manual.
8007         (thumb2_record_decode_insn_handler): Fix instruction matching.
8008         (instruction_reader_thumb): New class.
8009         (arm_record_test): New function.
8010
8011 2017-03-16  Yao Qi  <yao.qi@linaro.org>
8012
8013         * arm-tdep.c (abstract_memory_reader): New class.
8014         (instruction_reader): New class.
8015         (extract_arm_insn): Add argument 'reader'.  Callers updated.
8016         (decode_insn): Likewise.
8017
8018 2017-03-16  Doug Evans  <dje@google.com>
8019
8020         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
8021         member.  Change type of TYPE member to SCM.  All uses updated.
8022         (lsscm_make_lazy_string_smob): Add assert.
8023         (lsscm_make_lazy_string): Flag bad length values.
8024         (lsscm_elt_type): New function.
8025         (gdbscm_lazy_string_to_value): Rewrite to use
8026         lsscm_safe_lazy_string_to_value.
8027         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
8028         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
8029         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
8030         in incoming type.
8031         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8032         * guile/scm-type.c (tyscm_scm_to_type): New function.
8033
8034 2017-03-15  Doug Evans  <dje@google.com>
8035
8036         PR python/17728, python/18439, python/18779
8037         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
8038         member.  Change type of TYPE member to PyObject *.  All uses updated.
8039         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
8040         (gdbpy_create_lazy_string_object): Flag bad length values.
8041         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
8042         Handle typedefs in incoming type.
8043         (stpy_lazy_string_elt_type): New function.
8044         (gdbpy_extract_lazy_string): Call it.
8045         * python/py-value.c (valpy_lazy_string): Flag bad length values.
8046         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
8047         typedefs in incoming type.
8048
8049 2017-03-16  Doug Evans  <dje@google.com>
8050
8051         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
8052         * guile/scm-type.c (tyscm_scm_to_type): New function.
8053
8054 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
8055
8056         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
8057         "ULONGEST" for "skip".
8058
8059 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8060
8061         PR gdb/21220
8062         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
8063         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
8064         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
8065         over ptrace peek/poke until end of buffer or error.
8066
8067 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
8068
8069         * parse.c (length_of_subexp): Make static.
8070         * parser-defs.h (length_of_subexp): Remove.
8071
8072 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8073
8074         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
8075         as well.
8076
8077 2017-03-14  Pedro Alves  <palves@redhat.com>
8078
8079         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
8080         (main): Use std::unique_ptr.  Remove calls to
8081         cp_demangled_name_parse_free.
8082
8083 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8084
8085         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
8086         alphabsd_store_inferior_registers): Use regcache->ptid instead
8087         of inferior_ptid.
8088
8089 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8090
8091         * aix-thread.c (aix_thread_fetch_registers,
8092         aix_thread_store_registers): Use regcache->ptid instead of
8093         inferior_ptid.
8094
8095 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8096
8097         * aarch64-linux-nat.c (fetch_gregs_from_thread,
8098         store_gregs_to_thread, fetch_fpregs_from_thread,
8099         store_fpregs_to_thread): Use regcache->ptid instead of
8100         inferior_ptid.
8101
8102 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8103
8104         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
8105         amd64_linux_fetch_inferior_registers): Use regcache->ptid
8106         instead of inferior_ptid.
8107
8108 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8109
8110         * target.c (target_fetch_registers, target_store_registers): Add
8111         assert.
8112
8113 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
8114
8115         * regcache.h (regcache_get_ptid): New function.
8116         * regcache.c (regcache_get_ptid): New function.
8117
8118 2017-03-13  Mark Wielaard  <mark@klomp.org>
8119
8120         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
8121
8122 2017-03-10  Keith Seitz  <keiths@redhat.com>
8123
8124         PR c++/8218
8125         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
8126
8127 2017-03-08  Pedro Alves  <palves@redhat.com>
8128
8129         PR gdb/18360
8130         * infrun.c (start_step_over, do_target_resume, resume)
8131         (restart_threads): Assert we're not resuming a thread that is
8132         meant to be stopped.
8133         (infrun_thread_stop_requested_callback): Delete.
8134         (infrun_thread_stop_requested): If the thread is internally
8135         stopped, queue a pending stop event and clear the thread's
8136         inline-frame state.
8137         (handle_stop_requested): New function.
8138         (handle_syscall_event, handle_inferior_event_1): Use
8139         handle_stop_requested.
8140         (handle_stop_requested): New function.
8141         (handle_signal_stop): Set the thread's stop_signal here instead of
8142         at caller.
8143         (finish_step_over): Clear step over info unconditionally.
8144         (handle_signal_stop): If the user had interrupted the event
8145         thread, consider the stop a random signal.
8146         (handle_signal_stop) <signal arrived while stepping over
8147         breakpoint>: Don't restart threads here.
8148         (stop_waiting): Don't clear step-over info here.
8149
8150 2017-03-08  Pedro Alves  <palves@redhat.com>
8151
8152         PR 21206
8153         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
8154         goes to argument 2, not 1.
8155
8156 2017-03-08  Pedro Alves  <palves@redhat.com>
8157
8158         PR cli/21218
8159         * top.c (gdb_readline_wrapper): Avoid passing NULL to
8160         display_gdb_prompt.
8161         (command_line_input): Add comment.
8162
8163 2017-03-08  Pedro Alves  <palves@redhat.com>
8164
8165         PR tui/21216
8166         * tui/tui-file.c (tui_file::write): New.
8167         * tui/tui-file.h (tui_file): Override "write".
8168         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
8169         factored out from ...
8170         (tui_puts): ... here.
8171         (tui_putc): Use them.
8172         (tui_write): New function.
8173         * tui/tui-io.h (tui_write): Declare.
8174
8175 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
8176
8177         * Makefile.in (SFILES): Replace "environ.c" with
8178         "common/environ.c".
8179         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
8180         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
8181         to...
8182         * common/environ.c: ... here.
8183         * environ.h: Moved to...
8184         * common/environ.h: ... here.
8185
8186 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8187
8188         * gdbarch.sh (pstring_ptr): New static function.
8189         (gdbarch_disassembler_options): Use it.
8190         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
8191         not valid_disassembler_option->name.
8192         * gdbarch.c: Regenerate.
8193
8194 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
8195
8196         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
8197
8198 2017-03-07  Pedro Alves  <palves@redhat.com>
8199
8200         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
8201
8202 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8203
8204         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
8205         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
8206         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
8207         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
8208
8209 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
8210
8211         * xtensa-linux-nat.c (fetch_gregs): Remove const.
8212
8213 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
8214
8215         * remote.c (remote_add_target_side_commands): Use range-based
8216         for loop.
8217
8218 2017-03-03  Yao Qi  <yao.qi@linaro.org>
8219
8220         PR gdb/21165
8221         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
8222         value is lazy.
8223         * valprint.c (common_val_print): Likewise.
8224
8225 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
8226
8227         * NEWS: Mention new set/show disassembler-options commands.
8228         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
8229         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
8230         (prospective_options): New static variable.
8231         (gdb_disassembler::gdb_disassembler): Initialize
8232         m_di.disassembler_options.
8233         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
8234         (get_disassembler_options): New function.
8235         (set_disassembler_options): Likewise.
8236         (set_disassembler_options_sfunc): Likewise.
8237         (show_disassembler_options_sfunc): Likewise.
8238         (disassembler_options_completer): Likewise.
8239         (_initialize_disasm): Likewise.
8240         * disasm.h (get_disassembler_options): New prototype.
8241         (set_disassembler_options): Likewise.
8242         * gdbarch.sh (gdbarch_disassembler_options): New variable.
8243         (gdbarch_verify_disassembler_options): Likewise.
8244         * gdbarch.c: Regenerate.
8245         * gdbarch.h: Likewise.
8246         * arm-tdep.c (num_disassembly_options): Delete.
8247         (set_disassembly_style): Likewise.
8248         (arm_disassembler_options): New static variable.
8249         (set_disassembly_style_sfunc): Convert short style name into long
8250         option name.  Call set_disassembler_options.
8251         (show_disassembly_style_sfunc): New function.
8252         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
8253         set_gdbarch_verify_disassembler_options.
8254         (_initialize_arm_tdep): Delete regnames variable and update callers.
8255         (arm_disassembler_options): Initialize.
8256         (disasm_options): New variable.
8257         (num_disassembly_options): Rename from this...
8258         (num_disassembly_styles): ...to this.  Compute by scanning through
8259         disasm_options.
8260         (valid_disassembly_styles): Initialize using disasm_options.
8261         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
8262         set_arm_regname_option.
8263         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
8264         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
8265         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
8266         set_gdbarch_verify_disassembler_options.
8267         * s390-tdep.c (s390_disassembler_options): New static variable.
8268         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
8269         set_gdbarch_verify_disassembler_options.
8270
8271 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8272
8273         * remote.c (remote_add_target_side_condition): Remove "struct"
8274         keyword from range-based for loop.
8275
8276 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
8277
8278         * remote.c (remote_add_target_side_condition): Use range-based
8279         for loop.  Update comment.
8280
8281 2017-02-27  Yao Qi  <yao.qi@linaro.org>
8282
8283         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
8284
8285 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
8286
8287         * regcache.c (regcache_raw_update): New function.
8288         (regcache_raw_read): Move code to regcache_raw_update.
8289         * regcache.h (regcache_raw_update): New declaration.
8290         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
8291
8292 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
8293
8294         * dwarf2read.c (create_debug_type_hash_table): Initialize
8295         header.signature and header.type_offset_in_tu.
8296
8297 2017-02-24  Pedro Alves  <palves@redhat.com>
8298
8299         * symtab.c (make_file_symbol_completion_list_1): Use
8300         add_symtab_completions.
8301
8302 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8303
8304         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
8305
8306 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
8307
8308         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
8309         I386_MAX_REGISTER_SIZE.
8310         (i386_pseudo_register_write): Likewise.
8311         (i386_process_record): Likewise.
8312         * i387-tdep.c (i387_supply_xsave): Likewise.
8313         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
8314         (store_register): Likewise.
8315
8316 2017-02-23  Pedro Alves  <palves@redhat.com>
8317
8318         * ada-lang.c: Include "common/function-view.h".
8319         (ada_iterate_over_symbols): Adjust to use function_view as
8320         callback type.
8321         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
8322         (ada_make_symbol_completion_list): Use a lambda.
8323         (ada_exc_search_name_matches): Delete.
8324         (name_matches_regex): New.
8325         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
8326         * compile/compile-c-support.c: Include "common/function-view.h".
8327         (print_one_macro): Change prototype to accept a ui_file pointer.
8328         (write_macro_definitions): Use a lambda.
8329         * dwarf2read.c: Include "common/function-view.h".
8330         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
8331         (dw2_expand_symtabs_matching): Adjust to use function_view as
8332         callback type.
8333         * language.h: Include "common/function-view.h".
8334         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
8335         function_view as callback type.
8336         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
8337         * linespec.c: Include "common/function-view.h".
8338         (collect_info::add_symbol): New method.
8339         (struct symbol_and_data_callback, iterate_inline_only, struct
8340         symbol_matcher_data, iterate_name_matcher): Delete.
8341         (iterate_over_all_matching_symtabs): Adjust to use function_view
8342         as callback type and lambdas.
8343         (iterate_over_file_blocks): Adjust to use function_view as
8344         callback type.
8345         (decode_compound_collector): Now a class with private fields.
8346         (decode_compound_collector::release_symbols): New method.
8347         (collect_one_symbol): Rename to...
8348         (decode_compound_collector::operator()): ... this and adjust.
8349         (lookup_prefix_sym): decode_compound_collector construction bits
8350         move to decode_compound_collector ctor.  Pass the
8351         decode_compound_collector object directly as callback.  Remove
8352         cleanups and use decode_compound_collector::release_symbols
8353         instead.
8354         (symtab_collector): Now a class with private fields.
8355         (symtab_collector::release_symtabs): New method.
8356         (add_symtabs_to_list): Rename to...
8357         (symtab_collector::operator()): ... this and adjust.
8358         (collect_symtabs_from_filename): symtab_collector construction
8359         bits move to symtab_collector ctor.  Pass the symtab_collector
8360         object directly as callback.  Remove cleanups and use
8361         symtab_collector::release_symtabs instead.
8362         (collect_symbols): Delete.
8363         (add_matching_symbols_to_info): Use lambdas.
8364         * macrocmd.c (print_macro_callback): Delete.
8365         (info_macro_command): Use a lambda.
8366         (info_macros_command): Pass print_macro_definition as callable
8367         directly.
8368         (print_one_macro): Remove 'ignore' parameter.
8369         (macro_list_command): Adjust.
8370         * macrotab.c (macro_for_each_data::fn): Now a function_view.
8371         (macro_for_each_data::user_data): Delete field.
8372         (foreach_macro): Adjust to call the function_view.
8373         (macro_for_each): Adjust to use function_view as callback type.
8374         (foreach_macro_in_scope): Adjust to call the function_view.
8375         (macro_for_each_in_scope): Adjust to use function_view as callback
8376         type.
8377         * macrotab.h: Include "common/function-view.h".
8378         (macro_callback_fn): Declare a prototype instead of a pointer.
8379         Remove "user_data" parameter.
8380         (macro_for_each, macro_for_each_in_scope): Adjust to use
8381         function_view as callback type.
8382         * psymtab.c (partial_map_expand_apply)
8383         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
8384         Adjust to use function_view as callback type and to return bool.
8385         (psym_expand_symtabs_matching): Adjust to use function_view as
8386         callback types.
8387         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
8388         to use function_view as callback type and to return bool.
8389         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
8390         callback types.
8391         * symfile.c (expand_symtabs_matching): Adjust to use function_view
8392         as callback types.
8393         * symfile.h: Include "common/function-view.h".
8394         (expand_symtabs_file_matcher_ftype)
8395         (expand_symtabs_symbol_matcher_ftype)
8396         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
8397         return bool.
8398         (quick_symbol_functions::map_symtabs_matching_filename)
8399         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
8400         function_view as callback type and return bool.
8401         (expand_symtabs_matching): Adjust to use function_view as callback
8402         type.
8403         (maintenance_expand_name_matcher)
8404         (maintenance_expand_file_matcher): Delete.
8405         (maintenance_expand_symtabs): Use lambdas.
8406         * symtab.c (iterate_over_some_symtabs): Adjust to use
8407         function_view as callback types and return bool.
8408         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
8409         of a cleanup.
8410         (lookup_symtab_callback): Delete.
8411         (lookup_symtab): Use a lambda.
8412         (iterate_over_symbols): Adjust to use function_view as callback
8413         type.
8414         (struct search_symbols_data, search_symbols_file_matches)
8415         (search_symbols_name_matches): Delete.
8416         (search_symbols): Use a pair of lambdas.
8417         (struct add_name_data, add_macro_name, symbol_completion_matcher)
8418         (symtab_expansion_callback): Delete.
8419         (default_make_symbol_completion_list_break_on_1): Use lambdas.
8420         * symtab.h: Include "common/function-view.h".
8421         (iterate_over_some_symtabs): Adjust to use function_view as
8422         callback type and return bool.
8423         (iterate_over_symtabs): Adjust to use function_view as callback
8424         type.
8425         (symbol_found_callback_ftype): Remove 'data' parameter and return
8426         bool.
8427         (iterate_over_symbols): Adjust to use function_view as callback
8428         type.
8429
8430 2017-02-23  Pedro Alves  <palves@redhat.com>
8431
8432         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
8433         (%.o) <unittests/%.c>: New pattern.
8434         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
8435         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
8436         * common/function-view.h: New file.
8437         * unittests/function-view-selftests.c: New file.
8438         * configure: Regenerate.
8439
8440 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
8441
8442         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
8443         inferior_ptid.
8444         * go32-nat.c (go32_thread_alive): Likewise.
8445
8446 2017-02-23  Yao Qi  <yao.qi@linaro.org>
8447
8448         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
8449         delete.
8450
8451 2017-02-23  Yao Qi  <yao.qi@linaro.org>
8452
8453         * varobj.c (varobj_clear_saved_item): Use delete instead of
8454         xfree.
8455         (update_dynamic_varobj_children): Likewise.
8456
8457 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8458
8459         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
8460
8461 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
8462
8463         * common/enum-flags.h (enum_flags::enum_flags): Initialize
8464         m_enum_value to 0 in default constructor.
8465
8466 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
8467
8468         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
8469         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
8470         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
8471         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
8472         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
8473         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
8474         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
8475         IS_STORE_CONDITIONAL_INSN.
8476
8477 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
8478
8479         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
8480
8481 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8482
8483         * NEWS (Changes since GDB 7.12): Add DWARF-5.
8484
8485 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8486
8487         * dwarf2read.c (skip_one_die, read_attribute_value)
8488         (dwarf2_const_value_attr, dump_die_shallow)
8489         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8490         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
8491
8492 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8493
8494         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
8495         (dwarf_parse_macro_header): Accept DWARF version 5.
8496         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
8497
8498 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8499
8500         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
8501         DW_AT_GNU_*.
8502         * common/common-exceptions.h (enum errors): Likewise.
8503         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
8504         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
8505         (dwarf_expr_context::execute_stack_op): Likewise.
8506         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
8507         Likewise.
8508         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
8509         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
8510         (show_entry_values_debug, call_site_to_target_addr)
8511         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
8512         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
8513         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
8514         (value_of_dwarf_block_entry, indirect_pieced_value)
8515         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
8516         (disassemble_dwarf_expression): Likewise.
8517         * dwarf2read.c (process_die, inherit_abstract_dies)
8518         (read_call_site_scope): Likewise.
8519         * gdbtypes.h (struct func_type, struct call_site_parameter)
8520         (struct call_site): Likewise.
8521         * stack.c (read_frame_arg): Likewise.
8522         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
8523
8524 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8525
8526         * defs.h (read_unsigned_leb128): New declaration.
8527         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
8528         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
8529         (dwarf2_find_location_expression): Call also
8530         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
8531         * dwarf2loc.h (dwarf2_version): New declaration.
8532         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
8533         rnglists.
8534         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
8535         .debug_rnglists.
8536         (struct dwop_section_names): Add loclists_dwo.
8537         (dwop_section_names): Add .debug_loclists.dwo.
8538         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
8539         (struct dwarf2_per_cu_data): Add dwarf_version.
8540         (struct dwo_sections): Add loclists.
8541         (struct attr_abbrev): Add implicit_const.
8542         (read_indirect_line_string): New declaration.
8543         (read_unsigned_leb128): Delete declaration.
8544         (rcuh_kind): New definition.
8545         (read_and_check_comp_unit_head): Change parameter
8546         is_debug_types_section to section_kind.
8547         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
8548         (read_comp_unit_head): Change parameter abfd to section, add parameter
8549         section_kind.  Handle DWARF-5.
8550         (error_check_comp_unit_head): Accept also DWARF version 5.
8551         (read_and_check_comp_unit_head): Change parameter
8552         is_debug_types_section to section_kind.
8553         (read_and_check_type_unit_head): Delete function.
8554         (read_abbrev_offset): Handle DWARF-5.
8555         (create_debug_type_hash_table): Add parameter section_kind.  Process
8556         only DW_UT_type.  Use signature and type_offset_in_tu from struct
8557         comp_unit_head.
8558         (create_debug_types_hash_table): Update create_debug_type_hash_table
8559         caller.
8560         (create_all_type_units): Call create_debug_type_hash_table.
8561         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
8562         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
8563         caller.
8564         (skip_one_die): Handle DW_FORM_implicit_const.
8565         (dwarf2_rnglists_process): New function.
8566         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
8567         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
8568         (read_attribute_value): Handle DW_FORM_implicit_const,
8569         DW_FORM_line_strp.
8570         (read_attribute): Handle DW_FORM_implicit_const.
8571         (read_indirect_string_at_offset_from): New function from
8572         read_indirect_string_at_offset.
8573         (read_indirect_string_at_offset): Call
8574         read_indirect_string_at_offset_from.
8575         (read_indirect_line_string_at_offset): New function.
8576         (read_indirect_string): New function comment.
8577         (read_indirect_line_string): New function.
8578         (read_unsigned_leb128): Make it global.
8579         (dwarf2_string_attr): Handle DWARF-5.
8580         (add_include_dir_stub, read_formatted_entries): New functions.
8581         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
8582         Handle DWARF-5.
8583         (per_cu_header_read_in): Update read_comp_unit_head caller.
8584         (dwarf2_version): New function.
8585         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
8586         rnglists.
8587         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
8588         fields.
8589
8590 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8591
8592         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
8593
8594 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8595
8596         * dwarf2read.c (dwarf2_ranges_process): New function from
8597         dwarf2_ranges_read.
8598         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
8599         dwarf2_ranges_process.
8600
8601 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8602
8603         * dwarf2read.c (create_debug_type_hash_table): New function from
8604         create_debug_types_hash_table.
8605         (create_debug_types_hash_table): Call create_debug_type_hash_table.
8606         (create_all_type_units, open_and_init_dwo_file): Update
8607         create_debug_types_hash_table callers.
8608
8609 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8610
8611         PR gdb/16188
8612         * fork-child.c (trace_start_error): Fix thinko.  va_end should
8613         refer to 'ap', not 'args'.
8614
8615 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
8616             Pedro Alves  <palves@redhat.com>
8617
8618         PR gdb/16188
8619         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
8620         calls succeeded.
8621         * fork-child.c (trace_start_error): New function.
8622         (trace_start_error_with_name): Likewise.
8623         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
8624         * inf-ptrace.c (inf_ptrace_me): Likewise.
8625         * inferior.h (trace_start_error): New prototype.
8626         (trace_start_error_with_name): Likewise.
8627
8628 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
8629
8630         PR gdb/21164
8631         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
8632         NULL before using it.
8633         * symmisc.c (maintenance_print_symbols): Likewise.
8634         (maintenance_print_msymbols): Likewise.
8635
8636 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8637
8638         * NEWS: Add record Python bindings entry.
8639
8640 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8641
8642         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
8643         py-record-full.o.
8644         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
8645         * python/py-record-btrace.c, python/py-record-btrace.h,
8646         python/py-record-full.c, python/py-record-full.h: New file.
8647         * python/py-record.c: Add include for py-record-btrace.h and
8648         py-record-full.h.
8649         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
8650         recpy_instruction_history, recpy_function_call_history, recpy_begin,
8651         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
8652         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
8653         New definition.
8654         (gdbpy_initialize_btrace): New export.
8655         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
8656
8657 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8658
8659         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
8660         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
8661         * python/py-record.c: New file.
8662         * python/python-internal.h (gdbpy_start_recording,
8663         gdbpy_current_recording, gdpy_stop_recording,
8664         gdbpy_initialize_record): New export.
8665         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
8666         (python_GdbMethods): Add gdbpy_start_recording,
8667         gdbpy_current_recording and gdbpy_stop_recording.
8668
8669 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8670
8671         * record-btrace.c (record_btrace_record_method): New function.
8672         (init_record_btrace_ops): Initialize to_record_method.
8673         * record-full.c (record_full_record_method): New function.
8674         (init_record_full_ops, init_record_full_core_ops): Add
8675         record_full_record_method.
8676         * record.h (enum record_method): New enum.
8677         * target-debug.h (target_debug_print_enum_record_method: New define.
8678         * target-delegates.c: Regenerate.
8679         * target.c (target_record_method): New function.
8680         * target.h: Include record.h.
8681         (struct target_ops) <to_record_method>: New field.
8682         (target_record_method): New export.
8683
8684 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8685
8686         * record.h (record_start, record_stop): New export.
8687         * record.c (record_start, record_stop): New function.
8688
8689 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8690
8691         * btrace.c (btrace_fetch): Copy function call segments pointer
8692         into a vector.
8693         (btrace_clear): Clear the vector.
8694         (btrace_find_insn_by_number): Use binary search to find the correct
8695         function call segment.
8696         * btrace.h (brace_fun_p): New typedef.
8697         (struct btrace_thread_info) <functions>: New field.
8698
8699 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8700
8701         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
8702         * btrace.c (btrace_decode_error): ... here.  New function.
8703         * btrace.h (btrace_decode_error): New export.
8704
8705 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
8706
8707         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
8708         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
8709         btrace_find_insn_by_number): Remove special case for gaps.
8710         * btrace.h (btrace_insn_get_error): New export.
8711         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
8712         * record-btrace.c (btrace_insn_history): Print number for gaps.
8713         (record_btrace_info, record_btrace_goto): Handle gaps.
8714
8715 2017-02-14  Tom Tromey  <tom@tromey.com>
8716
8717         PR python/13598:
8718         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
8719         event.
8720         * python/py-evts.c (gdbpy_initialize_py_events): Add
8721         before_prompt registry.
8722         * python/py-events.h (events_object) <before_prompt>: New field.
8723
8724 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
8725
8726         * btrace.c (ftrace_new_switch): Preserve up link and flags.
8727
8728 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
8729
8730         * symfile (_initialize_symfile): Add usage text to the load command's
8731         help text.
8732
8733 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
8734
8735         * utils.c (defaulted_query): Don't query on secondary UIs.
8736
8737 2017-02-10  Tom Tromey  <tom@tromey.com>
8738
8739         * rust-lang.c (rust_get_disr_info): Remove unused variable.
8740
8741 2017-02-10  Tom Tromey  <tom@tromey.com>
8742
8743         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
8744         "cleanup" local.
8745         * python/py-type.c (typy_legacy_template_argument): Remove
8746         unnecessary "cleanup" local.
8747
8748 2017-02-10  Tom Tromey  <tom@tromey.com>
8749
8750         * python/python.c (do_start_initialization): New function, from
8751         _initialize_python.
8752         (_initialize_python): Call do_start_initialization.
8753         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
8754         goto.
8755
8756 2017-02-10  Tom Tromey  <tom@tromey.com>
8757
8758         * python/py-prettyprint.c (pretty_print_one_value): Use
8759         gdbpy_ref.
8760
8761 2017-02-10  Tom Tromey  <tom@tromey.com>
8762
8763         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
8764         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
8765         gdbpy_ref.
8766         * python/py-type.c (field_new): Use gdbpy_ref.
8767         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
8768         gdbpy_ref.
8769         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
8770         (py_free_pspace): Likewise.
8771         (pspace_to_pspace_object): Likewise.
8772         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
8773         (py_free_objfile): Likewise.
8774         (objfile_to_objfile_object): Likewise.
8775         * python/py-inferior.c (delete_thread_object): Use
8776         gdbpy_ref.
8777         (infpy_read_memory): Likewise.
8778         (py_free_inferior): Likewise.
8779         * python/py-evtregistry.c (create_eventregistry_object): Use
8780         gdbpy_ref.
8781         * python/py-event.c (create_event_object): Use gdbpy_ref.
8782
8783 2017-02-10  Tom Tromey  <tom@tromey.com>
8784
8785         * python/py-ref.h (gdbpy_ref_policy): Now a template.
8786         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
8787         used.
8788         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
8789         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
8790         python/py-exitedevent.c, python/py-finishbreakpoint.c,
8791         python/py-framefilter.c, python/py-function.c,
8792         python/py-inferior.c, python/py-infevents.c,
8793         python/py-linetable.c, python/py-newobjfileevent.c,
8794         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
8795         python/py-signalevent.c, python/py-stopevent.c,
8796         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
8797         python/py-unwind.c, python/py-utils.c, python/py-value.c,
8798         python/py-varobj.c, python/py-xmethods.c, python/python.c,
8799         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
8800
8801 2017-02-10  Tom Tromey  <tom@tromey.com>
8802
8803         * ui-out.h (ui_out_emit_type): New class.
8804         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
8805         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
8806         and ui_out_emit_tuple.
8807         (enumerate_locals): Likewise.
8808         (py_mi_print_variables, py_print_locals, py_print_args): Use
8809         ui_out_emit_list.
8810         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
8811         ui_out_emit_list.
8812         * common/gdb_optional.h: New file.
8813
8814 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
8815
8816         * MAINTAINERS (Write After Approval): Update my e-mail address.
8817
8818 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
8819
8820         PR gdb/21122
8821         * breakpoint.c (_initialize_breakpoint): Update the help description
8822         of the 'commands' command to indicate that it takes a list argument.
8823
8824 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
8825
8826         * interps.c (current_interp_set_logging): Remove "return".
8827
8828 2017-02-09  Gary Benson  <gbenson@redhat.com>
8829
8830         * symtab.c (add_symtab_completions): Prevent NULL pointer
8831         dereference.
8832
8833 2017-02-08  Pedro Alves  <palves@redhat.com>
8834
8835         * interps.c (interp::interp): Remove reference to quiet_p.
8836         (interp_set): Make static.  Remove dead "Switching to" output
8837         code.
8838         (interp_quiet_p, interp_set_quiet): Delete.
8839         (interpreter_exec_cmd): Don't set the interpreter quiet.
8840         * interps.h (interp_quiet_p): Make static.
8841         (class interp) <quiet_p>: Remove field
8842
8843 2017-02-08  Jerome Guitton  <guitton@adacore.com>
8844
8845         * cli/cli-decode.c (find_command_name_length): Make it extern.
8846         * cli/cli-decode.h (find_command_name_length): Declare.
8847         * cli/cli-script.c (command_name_equals, line_first_arg):
8848         New functions.
8849         (process_next_line): Use cli-decode to parse command names.
8850         (build_command_line): Make args a constant pointer.
8851
8852 2017-02-08  Jerome Guitton  <guitton@adacore.com>
8853
8854         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
8855         Remove case-insensitive search.
8856
8857 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
8858
8859         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
8860         at the end of the line.  Avoids an ARI warning.
8861
8862 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
8863
8864         * NEWS: Mention support for record/replay of Intel 64 rdrand and
8865         rdseed instructions.
8866         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
8867
8868 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
8869
8870         PR tdep/20936
8871         Provide and use sparc32 and sparc64 target description XML files.
8872         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
8873         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
8874         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
8875         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
8876         * features/sparc/sparc32-solaris.xml: New file.
8877         * features/sparc/sparc64-solaris.xml: New file.
8878         * features/sparc/sparc32-solaris.c: Generated.
8879         * features/sparc/sparc64-solaris.c: Generated.
8880         * sparc-tdep.h: Account for differences in target descriptions.
8881         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
8882         (sparc32_register_type): Use target provided registers.
8883         (validate_tdesc_registers): New function.
8884         (sparc32_gdbarch_init): Use tdesc_has_registers.
8885         Set pseudoregister functions.
8886         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
8887         (sparc64_register_type): Use target provided registers.
8888         (sparc64_init_abi): Set pseudoregister functions.
8889
8890 2017-02-03  Tom Tromey  <tom@tromey.com>
8891
8892         PR rust/21097:
8893         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
8894         with a single member.
8895
8896 2017-02-03  Pedro Alves  <palves@redhat.com>
8897
8898         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
8899         (cli_interp_base::~cli_interp_base): New.
8900         (cli_interp): New struct.
8901         (as_cli_interp): Cast the interp itself to cli_interp.
8902         (cli_interpreter_pre_command_loop): Rename to ...
8903         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
8904         parameter.
8905         (cli_interpreter_init): Rename to ...
8906         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
8907         boolean.  Make extern.
8908         (cli_interpreter_resume): Rename to ...
8909         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
8910         extern.
8911         (cli_interpreter_suspend): Rename to ...
8912         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
8913         extern.
8914         (cli_interpreter_exec): Rename to ...
8915         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
8916         extern.
8917         (cli_interpreter_supports_command_editing): Rename to ...
8918         (cli_interp_base::supports_command_editing): ... this.  Remove
8919         'interp' parameter.  Make extern.
8920         (cli_ui_out): Rename to ...
8921         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
8922         Make extern.
8923         (cli_set_logging): Rename to ...
8924         (cli_interp_base::set_logging): ... this.  Remove 'interp'
8925         parameter.  Make extern.
8926         (cli_interp_procs): Delete.
8927         (cli_interp_factory): Adjust to use "new".
8928         * cli/cli-interp.h: Include "interps.h".
8929         (struct cli_interp_base): New struct.
8930         * interps.c (struct interp): Delete.  Fields moved to interps.h.
8931         (interp_new): Delete.
8932         (interp::interp, interp::~interp): New.
8933         (interp_set): Use bool, and return void.  Assume the interpreter
8934         has suspend, init and resume methods, and that the all return
8935         void.
8936         (set_top_level_interpreter): interp_set returns void.
8937         (interp_ui_out): Adapt.
8938         (current_interp_set_logging): Adapt.
8939         (interp_data): Delete.
8940         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
8941         (interp_exec): Adapt.
8942         (top_level_interpreter_data): Delete.
8943         * interps.h (interp_init_ftype, interp_resume_ftype)
8944         (interp_suspend_ftype, interp_exec_ftype)
8945         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
8946         (class interp): New.
8947         (interp_new): Delete.
8948         (interp_set): Now returns void.  Use bool.
8949         (interp_data, top_level_interpreter_data): Delete.
8950         * mi/mi-common.h: Include interps.h.
8951         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
8952         init, resume, suspect, exec, interp_ui_out, set_logging and
8953         pre_command_loop methods.
8954         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
8955         (mi_interpreter_init): Rename to ...
8956         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
8957         bool, return void and make extern.  Adjust.
8958         (mi_interpreter_resume): ... Rename to ...
8959         (mi_interp::resume): ... this.  Remove the 'data' parameter,
8960         return void and make extern.  Adjust.
8961         (mi_interpreter_suspend): ... Rename to ...
8962         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
8963         return void and make extern.  Adjust.
8964         (mi_interpreter_exec): ... Rename to ...
8965         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
8966         extern.  Adjust.
8967         (mi_interpreter_pre_command_loop): ... Rename to ...
8968         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
8969         parameter and make extern.
8970         (mi_on_normal_stop_1): Adjust.
8971         (mi_ui_out): Rename to ...
8972         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
8973         parameter and make extern.  Adjust.
8974         (mi_set_logging): Rename to ...
8975         (mi_interp::set_logging): ... this.  Remove the 'interp'
8976         parameter and make extern.  Adjust.
8977         (mi_interp_procs): Delete.
8978         (mi_interp_factory): Adjust to use 'new'.
8979         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
8980         (mi_print_exception, mi_execute_command, mi_load_progress):
8981         Adjust.
8982         * tui/tui-interp.c (tui_interp): New class.
8983         (as_tui_interp): Return a tui_interp pointer.
8984         (tui_on_normal_stop, tui_on_signal_received)
8985         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
8986         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
8987         to use interp::interp_ui_out.
8988         (tui_init): Rename to ...
8989         (tui_interp::init): ... this.  Remove the 'self' parameter, use
8990         bool, return void and make extern.  Adjust.
8991         (tui_resume): Rename to ...
8992         (tui_interp::resume): ... this.  Remove the 'data' parameter,
8993         return void and make extern.  Adjust.
8994         (tui_suspend): Rename to ...
8995         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
8996         return void and make extern.  Adjust.
8997         (tui_ui_out): Rename to ...
8998         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
8999         parameter, and make extern.  Adjust.
9000         (tui_exec): Rename to ...
9001         (tui_interp::exec): ... this.  Remove the 'data' parameter and
9002         make extern.
9003         (tui_interp_procs): Delete.
9004         (tui_interp_factory): Use "new".
9005
9006 2017-02-02  Tom Tromey  <tom@tromey.com>
9007
9008         * rust-exp.y (ends_raw_string, space_then_number)
9009         (rust_identifier_start_p): Return bool.
9010         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
9011         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
9012         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
9013         (rust_chartype_p): Return bool.
9014         (val_print_struct, rust_print_struct_def, rust_print_type):
9015         Update.
9016         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
9017         Return bool.
9018
9019 2017-02-02  Tom Tromey  <tom@tromey.com>
9020
9021         * rust-lang.c: Reindent.
9022
9023 2017-02-02  Tom Tromey  <tom@tromey.com>
9024
9025         * rust-lang.h (rust_crate_for_block): Update.
9026         * rust-lang.c (rust_crate_for_block): Return std::string.
9027         (rust_get_disr_info): Use std:;string, not
9028         gdb::unique_xmalloc_ptr.
9029         * rust-exp.y (crate_name): Update.
9030
9031 2017-02-02  Pedro Alves  <palves@redhat.com>
9032
9033         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
9034         field out of gdb_disassembler_test and make it static.
9035
9036 2017-02-02  Pedro Alves  <palves@redhat.com>
9037
9038         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
9039         mi1_interp and mi_interp fields.
9040
9041 2017-02-02  Pedro Alves  <palves@redhat.com>
9042
9043         * cli/cli-interp.c (struct saved_output_files, saved_output):
9044         Moved from cli/cli-logging.c.
9045         (cli_set_logging): New function.
9046         (cli_interp_procs): Install cli_set_logging.
9047         * cli/cli-interp.h (make_logging_output, cli_set_logging):
9048         Declare.
9049         * cli/cli-logging.c (struct saved_output_files, saved_output):
9050         Moved to cli/cli-interp.c.
9051         (pop_output_files): Don't save outputs here.
9052         (make_logging_output): New function.
9053         (handle_redirections): Don't build tee nor save previous outputs
9054         here.
9055         * interps.c (current_interp_set_logging): Change prototype.
9056         Assume there's always a set_logging_proc method installed.
9057         * interps.h (interp_set_logging_ftype): Change prototype.
9058         (current_interp_set_logging): Change prototype and adjust comment.
9059         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
9060         use make_logging_output.
9061         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
9062 2017-02-02  Pedro Alves  <palves@redhat.com>
9063
9064         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
9065         from ...
9066         (set_logging_overwrite): ... here.
9067         (logging_no_redirect_file): Delete.
9068         (set_logging_redirect): Don't handle redirection on the fly.
9069         Instead warn that "logging off" / "logging on" is necessary.
9070         (pop_output_files): Delete references to logging_no_redirect_file.
9071         (show_logging_command): Always speak in terms of what will happen
9072         once logging is reenabled.
9073
9074 2017-02-02  Pedro Alves  <palves@redhat.com>
9075
9076         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
9077
9078 2017-02-02  Pedro Alves  <palves@redhat.com>
9079
9080         * disasm.c (gdb_pretty_print_insn): Rename to ...
9081         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
9082         Remove gdbarch parameter.  Adapt to clear the object's buffers
9083         instead of allocating new buffers, and to print using the object's
9084         gdb_disassembler instead of calling gdb_print_insn.
9085         (dump_insns): Use gdb_pretty_print_disassembler.
9086         * disasm.h (gdb_pretty_print_insn): Delete declaration.
9087         (gdb_pretty_print_disassembler): New class.
9088         * record-btrace.c (btrace_insn_history): Use
9089         gdb_pretty_print_disassembler.
9090
9091 2017-02-02  Pedro Alves  <palves@redhat.com>
9092
9093         * ada-lang.c (type_as_string): Use string_file.
9094         * ada-valprint.c (ada_print_floating): Use string_file.
9095         * ada-varobj.c (ada_varobj_scalar_image)
9096         (ada_varobj_get_value_image): Use string_file.
9097         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
9098         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
9099         * breakpoint.c (update_inserted_breakpoint_locations)
9100         (insert_breakpoint_locations, reattach_breakpoints)
9101         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
9102         (print_it_watchpoint): Use string_file.
9103         (save_breakpoints): Use stdio_file.
9104         * c-exp.y (oper): Use string_file.
9105         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
9106         tee_file.
9107         (pop_output_files): Use delete.
9108         (handle_redirections): Use stdio_file and tee_file.
9109         * cli/cli-setshow.c (do_show_command): Use string_file.
9110         * compile/compile-c-support.c (c_compute_program): Use
9111         string_file.
9112         * compile/compile-c-symbols.c (generate_vla_size): Take a
9113         'string_file &' instead of a 'ui_file *'.
9114         (generate_c_for_for_one_variable): Take a 'string_file &' instead
9115         of a 'ui_file *'.  Use string_file.
9116         (generate_c_for_variable_locations): Take a 'string_file &'
9117         instead of a 'ui_file *'.
9118         * compile/compile-internal.h (generate_c_for_for_one_variable):
9119         Take a 'string_file &' instead of a 'ui_file *'.
9120         * compile/compile-loc2c.c (push, pushf, unary, binary)
9121         (print_label, pushf_register_address, pushf_register)
9122         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
9123         'ui_file *'.  Adjust.
9124         * compile/compile.c (compile_to_object): Use string_file.
9125         * compile/compile.h (compile_dwarf_expr_to_c)
9126         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
9127         'ui_file *'.
9128         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
9129         (replace_typedefs_qualified_name): Use string_file and
9130         obstack_copy0.
9131         * disasm.c (gdb_pretty_print_insn): Use string_file.
9132         (gdb_disassembly): Adjust reference the null_stream global.
9133         (do_ui_file_delete): Delete.
9134         (gdb_insn_length): Use null_stream.
9135         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
9136         * dwarf2loc.c (dwarf2_compile_property_to_c)
9137         (locexpr_generate_c_location, loclist_generate_c_location): Take a
9138         'string_file &' instead of a 'ui_file *'.
9139         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
9140         * dwarf2read.c (do_ui_file_peek_last): Delete.
9141         (dwarf2_compute_name): Use string_file.
9142         * event-top.c (gdb_setup_readline): Use stdio_file.
9143         * gdbarch.sh (verify_gdbarch): Use string_file.
9144         * gdbtypes.c (safe_parse_type): Use null_stream.
9145         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
9146         string_file.
9147         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
9148         'string_file *' instead of a 'ui_file *'.
9149         (gdbscm_arch_disassemble): Use string_file.
9150         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
9151         * guile/scm-ports.c (class ioscm_file_port): Now a class that
9152         inherits from ui_file.
9153         (ioscm_file_port_delete, ioscm_file_port_rewind)
9154         (ioscm_file_port_put): Delete.
9155         (ioscm_file_port_write): Rename to ...
9156         (ioscm_file_port::write): ... this.  Remove file_port_magic
9157         checks.
9158         (ioscm_file_port_new): Delete.
9159         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
9160         ui_file_up.
9161         * guile/scm-type.c (tyscm_type_name): Use string_file.
9162         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
9163         Use string_file.
9164         * infcmd.c (print_return_value_1): Use string_file.
9165         * infrun.c (print_target_wait_results): Use string_file.
9166         * language.c (add_language): Use string_file.
9167         * location.c (explicit_to_string_internal): Use string_file.
9168         * main.c (captured_main_1): Use null_file.
9169         * maint.c (maintenance_print_architecture): Use stdio_file.
9170         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
9171         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
9172         event_channel>: Change type to mi_console_file pointer.
9173         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
9174         (mi_console_file_delete): Delete.
9175         (struct mi_console_file): Delete.
9176         (mi_console_file_magic): Delete.
9177         (mi_console_file_new): Delete.
9178         (mi_console_file::mi_console_file): New.
9179         (mi_console_file_delete): Delete.
9180         (mi_console_file_fputs): Delete.
9181         (mi_console_file::write): New.
9182         (mi_console_raw_packet): Delete.
9183         (mi_console_file::flush): New.
9184         (mi_console_file_flush): Delete.
9185         (mi_console_set_raw): Rename to ...
9186         (mi_console_file::set_raw): ... this.
9187         * mi/mi-console.h (class mi_console_file): New class.
9188         (mi_console_file_new, mi_console_set_raw): Delete.
9189         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
9190         (mi_set_logging): Use delete and tee_file.  Adjust.
9191         * mi/mi-main.c (output_register): Use string_file.
9192         (mi_cmd_data_evaluate_expression): Use string_file.
9193         (mi_cmd_data_read_memory): Use string_file.
9194         (mi_cmd_execute, print_variable_or_computed): Use string_file.
9195         * mi/mi-out.c (mi_ui_out::main_stream): New.
9196         (mi_ui_out::rewind): Use main_stream and
9197         string_file.
9198         (mi_ui_out::put): Use main_stream and string_file.
9199         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9200         Allocate a 'string_file' instead.
9201         (mi_out_new): Don't allocate a mem_fileopen stream here.
9202         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
9203         (mi_ui_out::main_stream): Declare method.
9204         * printcmd.c (eval_command): Use string_file.
9205         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
9206         * python/py-arch.c (archpy_disassemble): Use string_file.
9207         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
9208         * python/py-frame.c (frapy_str): Use string_file.
9209         * python/py-framefilter.c (py_print_type, py_print_single_arg):
9210         Use string_file.
9211         * python/py-type.c (typy_str): Use string_file.
9212         * python/py-unwind.c (unwind_infopy_str): Use string_file.
9213         * python/py-value.c (valpy_str): Use string_file.
9214         * record-btrace.c (btrace_insn_history): Use string_file.
9215         * regcache.c (regcache_print): Use stdio_file.
9216         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
9217         * remote.c (escape_buffer): Use string_file.
9218         * rust-lang.c (rust_get_disr_info): Use string_file.
9219         * serial.c (serial_open_ops_1): Use stdio_file.
9220         (do_serial_close): Use delete.
9221         * stack.c (print_frame_arg): Use string_file.
9222         (print_frame_args): Remove local mem_fileopen stream, not used.
9223         (print_frame): Use string_file.
9224         * symmisc.c (maintenance_print_symbols): Use stdio_file.
9225         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
9226         Take a 'string_file *' instead of a 'ui_file *'.
9227         * top.c (new_ui): Use stdio_file and stderr_file.
9228         (free_ui): Use delete.
9229         (execute_command_to_string): Use string_file.
9230         (quit_confirm): Use string_file.
9231         * tracepoint.c (collection_list::append_exp): Use string_file.
9232         * tui/tui-disasm.c (tui_disassemble): Use string_file.
9233         * tui/tui-file.c: Don't include "ui-file.h".
9234         (enum streamtype, struct tui_stream): Delete.
9235         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
9236         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
9237         (tui_file::tui_file): New method.
9238         (tui_file_fputs): Delete.
9239         (tui_file_get_strbuf): Delete.
9240         (tui_file::puts): New method.
9241         (tui_file_adjust_strbuf): Delete.
9242         (tui_file_flush): Delete.
9243         (tui_file::flush): New method.
9244         * tui/tui-file.h: Tweak intro comment.
9245         Include ui-file.h.
9246         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
9247         (tui_file_adjust_strbuf): Delete declarations.
9248         (class tui_file): New class.
9249         * tui/tui-io.c (tui_initialize_io): Use tui_file.
9250         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
9251         (tui_register_format): Use string_stream.
9252         * tui/tui-stack.c (tui_make_status_line): Use string_file.
9253         (tui_get_function_from_frame): Use string_file.
9254         * typeprint.c (type_to_string): Use string_file.
9255         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
9256         (null_stream): New global.
9257         (ui_file_delete): Delete.
9258         (ui_file::ui_file): New.
9259         (null_file_isatty): Delete.
9260         (ui_file::~ui_file): New.
9261         (null_file_rewind): Delete.
9262         (ui_file::printf): New.
9263         (null_file_put): Delete.
9264         (null_file_flush): Delete.
9265         (ui_file::putstr): New.
9266         (null_file_write): Delete.
9267         (ui_file::putstrn): New.
9268         (null_file_read): Delete.
9269         (ui_file::putc): New.
9270         (null_file_fputs): Delete.
9271         (null_file_write_async_safe): Delete.
9272         (ui_file::vprintf): New.
9273         (null_file_delete): Delete.
9274         (null_file::write): New.
9275         (null_file_fseek): Delete.
9276         (null_file::puts): New.
9277         (ui_file_data): Delete.
9278         (null_file::write_async_safe): New.
9279         (gdb_flush, ui_file_isatty): Adjust.
9280         (ui_file_put, ui_file_rewind): Delete.
9281         (ui_file_write): Adjust.
9282         (ui_file_write_for_put): Delete.
9283         (ui_file_write_async_safe, ui_file_read): Adjust.
9284         (ui_file_fseek): Delete.
9285         (fputs_unfiltered): Adjust.
9286         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
9287         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
9288         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
9289         (set_ui_file_data): Delete.
9290         (string_file::~string_file, string_file::write)
9291         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
9292         (do_ui_file_as_string, ui_file_as_string): Delete.
9293         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
9294         (struct mem_file): Delete.
9295         (mem_file_new): Delete.
9296         (stdio_file::stdio_file): New.
9297         (mem_file_delete): Delete.
9298         (stdio_file::stdio_file): New.
9299         (mem_fileopen): Delete.
9300         (stdio_file::~stdio_file): New.
9301         (mem_file_rewind): Delete.
9302         (stdio_file::set_stream): New.
9303         (mem_file_put): Delete.
9304         (stdio_file::open): New.
9305         (mem_file_write): Delete.
9306         (stdio_file_magic, struct stdio_file): Delete.
9307         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
9308         (stdio_file::flush): New.
9309         (stdio_file_read): Rename to ...
9310         (stdio_file::read): ... this.  Adjust.
9311         (stdio_file_write): Rename to ...
9312         (stdio_file::write): ... this.  Adjust.
9313         (stdio_file_write_async_safe): Rename to ...
9314         (stdio_file::write_async_safe) ... this.  Adjust.
9315         (stdio_file_fputs): Rename to ...
9316         (stdio_file::puts) ... this.  Adjust.
9317         (stdio_file_isatty): Delete.
9318         (stdio_file_fseek): Delete.
9319         (stdio_file::isatty): New.
9320         (stderr_file_write): Rename to ...
9321         (stderr_file::write) ... this.  Adjust.
9322         (stderr_file_fputs): Rename to ...
9323         (stderr_file::puts) ... this.  Adjust.
9324         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
9325         (stderr_file::stderr_file): New.
9326         (tee_file_magic): Delete.
9327         (struct tee_file): Delete.
9328         (tee_file::tee_file): New.
9329         (tee_file_new): Delete.
9330         (tee_file::~tee_file): New.
9331         (tee_file_delete): Delete.
9332         (tee_file_flush): Rename to ...
9333         (tee_file::flush): ... this.  Adjust.
9334         (tee_file_write): Rename to ...
9335         (tee_file::write): ... this.  Adjust.
9336         (tee_file::write_async_safe): New.
9337         (tee_file_fputs): Rename to ...
9338         (tee_file::puts): ... this.  Adjust.
9339         (tee_file_isatty): Rename to ...
9340         (tee_file::isatty): ... this.  Adjust.
9341         * ui-file.h (struct obstack, struct ui_file): Don't
9342         forward-declare.
9343         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
9344         (ui_file_write_ftype)
9345         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
9346         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
9347         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
9348         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
9349         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
9350         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
9351         (set_ui_file_fseek): Delete.
9352         (ui_file_data, ui_file_delete, ui_file_rewind)
9353         (struct ui_file): New.
9354         (ui_file_up): New.
9355         (class null_file): New.
9356         (null_stream): Declare.
9357         (ui_file_write_for_put, ui_file_put): Delete.
9358         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
9359         Delete.
9360         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
9361         (gdb_fopen, tee_file_new): Delete.
9362         (struct string_file): New.
9363         (struct stdio_file): New.
9364         (stdio_file_up): New.
9365         (struct stderr_file): New.
9366         (class tee_file): New.
9367         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
9368         of a 'ui_file *'.  Adjust.
9369         * ui-out.h (class ui_out) <field_stream>: Likewise.
9370         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
9371         (null_stream): Delete.
9372         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
9373         Adjust.
9374         * utils.h (struct ui_file): Delete forward declaration..
9375         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
9376         (error_stream): Take a 'string_file &' instead of a
9377         'ui_file *'.
9378         * varobj.c (varobj_value_get_print_value): Use string_file.
9379         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
9380         * gdbarch.c: Regenerate.
9381
9382 2017-02-02  Pedro Alves  <palves@redhat.com>
9383
9384         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
9385         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
9386         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
9387         Adjust to call gdb_print_insn instead of
9388         gdb_disassembler::print_insn.
9389         (dump_insns, do_mixed_source_and_assembly_deprecated)
9390         (do_mixed_source_and_assembly, do_assembly_only): Add back a
9391         'gdbarch' parameter.  Remove gdb_disassembler parameter.
9392         (gdb_disassembly): Don't allocate a gdb_disassembler here.
9393         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
9394         declaration.
9395         (gdb_pretty_print_insn): Re-add declaration.
9396         * record-btrace.c (btrace_insn_history): Don't allocate a
9397         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
9398
9399 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
9400
9401         * disasm.h (gdb_disassembly): Remove file_string parameter.
9402         * disasm.c (gdb_disassembly): Likewise.
9403         * cli/cli-cmds.c (print_disassembly): Adapt.
9404         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
9405         * stack.c (do_gdb_disassembly): Likewise.
9406
9407 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9408
9409         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
9410         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
9411         targets.  And if the implicit value is longer than needed, extract
9412         the first bytes instead of the "least significant" ones.
9413
9414 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9415
9416         * btrace.c (btrace_enable): Do not call btrace_add_pc for
9417         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
9418         (btrace_fetch): Assert can_access_registers_ptid.
9419         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
9420         validate_registers_access.
9421
9422 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
9423
9424         * gdbthread.h (can_access_registers_ptid): New.
9425         * thread.c (can_access_registers_ptid): New.
9426
9427 2017-02-01  Pedro Alves  <palves@redhat.com>
9428
9429         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
9430
9431 2017-01-31  Pedro Alves  <palves@redhat.com>
9432
9433         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
9434         Fix typos.
9435
9436 2017-01-31  Pedro Alves  <palves@redhat.com>
9437
9438         * stack.c (print_frame_args): Remove local mem_fileopen stream,
9439         not used.
9440
9441 2017-01-31  Pedro Alves  <palves@redhat.com>
9442
9443         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
9444
9445 2017-01-31  Pedro Alves  <palves@redhat.com>
9446
9447         * common/scoped_restore.h
9448         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
9449         change the value's parameter type to T2.
9450         (make_scoped_restore): Likewise.
9451
9452 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9453             Richard Henderson  <rth@redhat.com>
9454
9455         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
9456         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
9457         GS_BASE for older kernels.
9458         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
9459         GS_BASE for older kernels.
9460         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
9461         and GS_BASE to the offset table.
9462         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
9463         system register group.
9464         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
9465         for older kernels.
9466         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
9467         amd64 ABI.
9468         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
9469         AMD64_GSBASE_REGNUM.
9470         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
9471         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
9472         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
9473         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
9474         i386/64bit-segments.xml in those rules.
9475         * features/i386/64bit-segments.xml: New file.
9476         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
9477         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
9478         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
9479         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
9480         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
9481         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
9482         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
9483         * features/i386/amd64-avx-linux.c: Regenerated.
9484         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
9485         * features/i386/amd64-avx-mpx.c: Regenerated.
9486         * features/i386/amd64-avx512-linux.c: Regenerated.
9487         * features/i386/amd64-linux.c: Regenerated.
9488         * features/i386/amd64-mpx-linux.c: Regenerated.
9489         * features/i386/i386-avx-mpx-linux.c: Regenerated.
9490         * features/i386/i386-avx-mpx.c: Regenerated.
9491         * features/i386/x32-avx-linux.c: Regenerated.
9492         * features/i386/x32-avx512-linux.c: Regenerated.
9493         * regformats/i386/amd64-avx-linux.dat: Regenerated.
9494         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
9495         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
9496         * regformats/i386/amd64-linux.dat: Regenerated.
9497         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
9498         * regformats/i386/x32-avx-linux.dat: Regenerated.
9499         * regformats/i386/x32-avx512-linux.dat: Regenerated.
9500         * regformats/i386/x32-linux.dat: Regenerated.
9501
9502 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9503
9504         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
9505         Set to AMD64_NUM_REGS.
9506
9507 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
9508
9509         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
9510         that checks validity of a register number.
9511
9512 2017-01-27  Kees Cook  <keescook@google.com>
9513
9514         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
9515         fetch_fpregs if target has fpa registers.
9516         (arm_linux_store_inferior_registers): Call store_fpregs if target
9517         has fpa registers.
9518
9519 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9520
9521         * cris-tdep.c (cris_gdbarch_init): Remove check for
9522         info.byte_order and force it to BFD_ENDIAN_LITTLE.
9523
9524 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
9525
9526         * corelow.c (get_core_register_section): Check for regset
9527         existence before checking for REGSET_VARIABLE_SIZE.
9528
9529 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9530             Pedro Alves  <palves@redhat.com>
9531
9532         PR gdb/20939
9533         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
9534         call memory_error, save memaddr instead.
9535         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
9536         negative, cal memory_error.
9537         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
9538
9539 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9540
9541         * disasm-selftests.c (memory_error_test): New function.
9542         (_initialize_disasm_selftests): Register memory_error_test.
9543
9544 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9545
9546         * Makefile.in (SFILES): Add disasm-selftests.c and
9547         selftest-arch.c.
9548         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
9549         * disasm-selftests.c: New file.
9550         * selftest-arch.c: New file.
9551         * selftest-arch.h: New file.
9552
9553 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9554
9555         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
9556         to bfd_arch_mep.  Don't return 0 if section is not
9557         found.  Call print_insn_mep.
9558
9559 2017-01-26  Pedro Alves  <palves@redhat.com>
9560             Yao Qi  <yao.qi@linaro.org>
9561
9562         * arm-tdep.c: Include "disasm.h".
9563         (gdb_print_insn_arm): Update code to get gdbarch.
9564         * disasm.c (dis_asm_read_memory): Change it to
9565         gdb_disassembler::dis_asm_read_memory.
9566         (dis_asm_memory_error): Likewise.
9567         (dis_asm_print_address): Likewise.
9568         (gdb_pretty_print_insn): Change it to
9569         gdb_disassembler::pretty_print_insn.
9570         (dump_insns): Add one argument gdb_disassemlber.  All
9571         callers updated.
9572         (do_mixed_source_and_assembly_deprecated): Likewise.
9573         (do_mixed_source_and_assembly): Likewise.
9574         (do_assembly_only): Likewise.
9575         (gdb_disassembler::gdb_disassembler): New.
9576         (gdb_disassembler::print_insn): New.
9577         * disasm.h (class gdb_disassembler): New.
9578         (gdb_pretty_print_insn): Remove declaration.
9579         (gdb_disassemble_info): Likewise.
9580         * guile/scm-disasm.c (class gdbscm_disassembler): New.
9581         (gdbscm_disasm_read_memory_worker): Update.
9582         (gdbscm_disasm_read_memory): Update.
9583         (gdbscm_disasm_memory_error): Remove.
9584         (gdbscm_disasm_print_address): Remove.
9585         (gdbscm_disassembler::gdbscm_disassembler): New.
9586         (gdbscm_print_insn_from_port): Update.
9587         * mips-tdep.c: Include disasm.h.
9588         (gdb_print_insn_mips): Update code to get gdbarch.
9589         * record-btrace.c (btrace_insn_history): Update.
9590         * spu-tdep.c: Include disasm.h.
9591         (struct spu_dis_asm_data): Remove.
9592         (struct spu_dis_asm_info): New.
9593         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
9594         SPU id.
9595         (gdb_print_insn_spu): Cast disassemble_info to
9596         spu_dis_asm_info.
9597
9598 2017-01-26  Yao Qi  <yao.qi@linaro.org>
9599
9600         * disasm.c (do_ui_file_delete): Delete.
9601         (gdb_insn_length): Move code creating stream to ...
9602         * utils.c (null_stream): ... here.  New function.
9603         * utils.h (null_stream): Declare.
9604
9605 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
9606
9607         * python/py-inferior.c (find_thread_object): Return directly
9608         from the loop.  Remove "found" variable.
9609
9610 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
9611
9612         GDB 7.12.1 released.
9613
9614 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
9615
9616         * python/py-function.c (fnpy_call): Reorder declarations to have
9617         the gdbpy_enter object declared first.
9618         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
9619
9620 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
9621
9622         PR python/21068
9623         * python/python-internal.h (PyMem_RawMalloc): Define for
9624         Python < 3.4.
9625         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
9626         PyMem_RawMalloc instead of PyMem_Malloc.
9627
9628 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
9629             Luis Machado  <lgustavo@codesourcery.com>
9630
9631         * NEWS (New commands): Mention flash-erase.
9632         (New MI commands): Mention target-flash-erase.
9633         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
9634         command.
9635         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
9636         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
9637         * target.c (flash_erase_command): New function.
9638         (initialize_targets): Add new flash-erase command.
9639         * target.h (flash_erase_command): New declaration.
9640
9641 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
9642
9643         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
9644         HAVE_SYS_PROCFS_H is defined.
9645
9646 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
9647
9648         * remote.c (struct cached_reg): Change data into a pointer.
9649         * (stop_reply_dtr): Free data pointers before deleting vector.
9650         (process_stop_reply): Likewise.
9651         (remote_parse_stop_reply): Allocate space for data
9652
9653 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
9654
9655         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
9656         MAX_REGISTER_SIZE.
9657         (amd64_pseudo_register_read_value): Likewise.
9658         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
9659         (store_register_using_P): Likewise.
9660         * regcache.c (regcache_xfer_part): Likewise.
9661
9662 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
9663
9664         Split real and pseudo registers.
9665         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
9666         (sparc32_pseudo_regnum): New enum.
9667         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
9668         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
9669         (SPARC32_CP0_REGISTERS): New macro.
9670         (sparc32_pseudo_register_name): New function.
9671         (sparc32_register_name): Use sparc32_pseudo_register_name.
9672         (sparc32_pseudo_register_type): New function.
9673         (sparc32_register_type): Use sparc32_pseudo_register_type.
9674         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
9675         pseudo register numbers.
9676         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
9677         (SPARC64_CP0_REGISTERS): New macro.
9678         (sparc64_pseudo_register_name): New function.
9679         (sparc64_register_name): Use sparc64_pseudo_register_name.
9680         (sparc64_pseudo_register_type): New function.
9681         (sparc64_register_type): Use sparc64_pseudo_register_type.
9682         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
9683         pseudo register numbers.
9684         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
9685         sparc64_store_arguments): Handle pseudo register numbers.
9686
9687 2017-01-13  Yao Qi  <yao.qi@linaro.org>
9688
9689         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
9690         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
9691         output.
9692         (getpkt_or_notif_sane_1): Likewise.
9693
9694 2017-01-13  Yao Qi  <yao.qi@linaro.org>
9695
9696         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
9697         of CC.  Pass "-x c++-header" instead of "-x c".
9698
9699 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9700
9701         * remote.c (remote_can_async_p): Update comment.
9702
9703 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9704
9705         * linux-nat.c (linux_nat_can_async_p): Update comment.
9706
9707 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
9708
9709         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
9710
9711 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
9712
9713         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
9714
9715 2017-01-10  Tom Tromey  <tom@tromey.com>
9716
9717         * python/py-type.c (typy_legacy_template_argument): Update.
9718         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
9719         ~demangle_parse_info): Declare new members.
9720         (cp_demangled_name_to_comp): Return unique_ptr.
9721         (cp_demangled_name_parse_free)
9722         (make_cleanup_cp_demangled_name_parse_free)
9723         (cp_new_demangle_parse_info): Remove.
9724         * cp-support.c (do_demangled_name_parse_free_cleanup)
9725         (make_cleanup_cp_demangled_name_parse_free): Remove.
9726         (inspect_type, cp_canonicalize_string_full)
9727         (cp_canonicalize_string): Update.
9728         (mangled_name_to_comp): Change return type.
9729         (cp_class_name_from_physname, method_name_from_physname)
9730         (cp_func_name, cp_remove_params): Update.
9731         * cp-name-parser.y (demangle_parse_info): New constructor, from
9732         cp_new_demangle_parse_info.
9733         (~demangle_parse_info): New destructor, from
9734         cp_demangled_name_parse_free.
9735         (cp_merge_demangle_parse_infos): Update.
9736         (cp_demangled_name_to_comp): Change return type.
9737
9738 2017-01-10  Tom Tromey  <tom@tromey.com>
9739
9740         * top.c (prevent_dont_repeat): Change return type.
9741         * python/python.c (execute_gdb_command): Use std::string.
9742         Update.
9743         * guile/guile.c (gdbscm_execute_gdb_command): Update.
9744         * command.h (prevent_dont_repeat): Change return type.
9745         * breakpoint.c (bpstat_do_actions_1): Update.
9746
9747 2017-01-10  Tom Tromey  <tom@tromey.com>
9748
9749         * value.h (scoped_value_mark::~scoped_value_mark): Call
9750         free_to_mark.
9751         (scoped_value_mark::free_to_mark): New method.
9752         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
9753         scoped_value_mark.
9754
9755 2017-01-10  Tom Tromey  <tom@tromey.com>
9756
9757         * python/py-value.c (valpy_dereference, valpy_referenced_value)
9758         (valpy_reference_value, valpy_const_value, valpy_get_address)
9759         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
9760         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
9761         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
9762         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
9763         scoped_value_mark.
9764         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
9765         * value.h (scoped_value_mark): New class.
9766
9767 2017-01-10  Tom Tromey  <tom@tromey.com>
9768
9769         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
9770         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
9771         * psymtab.c (discard_psymtabs_upto): Remove.
9772         (make_cleanup_discard_psymtabs): Remove.
9773         (struct psymtab_state): Remove.
9774
9775 2017-01-10  Tom Tromey  <tom@tromey.com>
9776
9777         * record-full.c (record_full_save_cleanups): Remove.
9778         (record_full_save): Use gdb::unlinker.
9779         * gcore.c (do_bfd_delete_cleanup): Remove.
9780         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
9781         cleanups.
9782         * dwarf2read.c (unlink_if_set): Remove.
9783         (write_psymtabs_to_index): Use gdb::unlinker.
9784         * common/gdb_unlinker.h: New file.
9785
9786 2017-01-10  Tom Tromey  <tom@tromey.com>
9787
9788         * windows-tdep.c (windows_xfer_shared_library): Update.
9789         * windows-nat.c (windows_make_so): Update.
9790         * utils.h (make_cleanup_bfd_unref): Remove.
9791         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
9792         * symfile.h (symfile_bfd_open)
9793         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
9794         * symfile.c (read_symbols, symbol_file_add)
9795         (separate_debug_file_exists): Update.
9796         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
9797         (generic_load, reread_symbols): Update.
9798         * symfile-mem.c (symbol_file_add_from_memory): Update.
9799         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
9800         (spu_symbol_file_add_from_memory): Update.
9801         * solist.h (struct target_so_ops) <bfd_open>: Return
9802         gdb_bfd_ref_ptr.
9803         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
9804         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
9805         gdb_bfd_ref_ptr.
9806         (solib_map_sections, reload_shared_libraries_1): Update.
9807         * solib-svr4.c (enable_break): Update.
9808         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
9809         * solib-frv.c (enable_break2): Update.
9810         * solib-dsbt.c (enable_break): Update.
9811         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
9812         gdb_bfd_ref_ptr.
9813         (darwin_solib_get_all_image_info_addr_at_init): Update.
9814         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
9815         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
9816         * record-full.c (record_full_save): Update.
9817         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
9818         * procfs.c (insert_dbx_link_bpt_in_file): Update.
9819         * minidebug.c (find_separate_debug_file_in_section): Return
9820         gdb_bfd_ref_ptr.
9821         * machoread.c (macho_add_oso_symfile): Change abfd to
9822         gdb_bfd_ref_ptr.
9823         (macho_symfile_read_all_oso): Update.
9824         (macho_check_dsym): Return gdb_bfd_ref_ptr.
9825         (macho_symfile_read): Update.
9826         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
9827         (jit_bfd_try_read_symtab): Update.
9828         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9829         (gdb_bfd_openw, gdb_bfd_openr_iovec)
9830         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9831         gdb_bfd_ref_ptr.
9832         (gdb_bfd_ref_policy): New struct.
9833         (gdb_bfd_ref_ptr): New typedef.
9834         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9835         (gdb_bfd_openw, gdb_bfd_openr_iovec)
9836         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
9837         gdb_bfd_ref_ptr.
9838         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9839         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
9840         (gcore_command): Update.
9841         * exec.c (exec_file_attach): Update.
9842         * elfread.c (elf_symfile_read): Update.
9843         * dwarf2read.c (dwarf2_get_dwz_file): Update.
9844         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
9845         (open_and_init_dwo_file): Update.
9846         (open_dwp_file): Return gdb_bfd_ref_ptr.
9847         (open_and_init_dwp_file): Update.
9848         * corelow.c (core_open): Update.
9849         * compile/compile-object-load.c (compile_object_load): Update.
9850         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
9851         * coffread.c (coff_symfile_read): Update.
9852         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
9853         gdb_bfd_ref_ptr.  Rename.
9854         (dump_bfd_file, restore_command): Update.
9855         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9856         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
9857         (find_separate_debug_file_by_buildid): Update.
9858
9859 2017-01-10  Tom Tromey  <tom@tromey.com>
9860
9861         * common/gdb_ref_ptr.h: New file.
9862         * python/py-ref.h (struct gdbpy_ref_policy): New.
9863         (gdbpy_ref): Now a typedef.
9864
9865 2017-01-10  Tom Tromey  <tom@tromey.com>
9866
9867         * utils.h (make_cleanup_htab_delete): Don't declare.
9868         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
9869         Remove.
9870         * linespec.c (decode_compound_collector): Add constructor,
9871         destructor.
9872         (lookup_prefix_sym): Remove cleanup.
9873         (symtab_collector): Add constructor, destructor.
9874         (collect_symtabs_from_filename): Remove cleanup.
9875         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
9876         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
9877         Use htab_up.
9878         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
9879         * dwarf2read.c (dw2_expand_symtabs_matching)
9880         (dw2_map_symbol_filenames, dwarf_decode_macros)
9881         (write_psymtabs_to_index): Use htab_up.
9882         * dwarf2loc.c (func_verify_no_selftailcall)
9883         (call_site_find_chain_1, func_verify_no_selftailcall)
9884         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
9885         std::vector, gdb::unique_xmalloc_ptr.
9886         (call_sitep): Remove typedef.
9887         (dwarf2_locexpr_baton_eval): Remove unused variable.
9888
9889 2017-01-10  Tom Tromey  <tom@tromey.com>
9890
9891         * python/python-internal.h (make_cleanup_py_decref)
9892         (make_cleanup_py_xdecref): Don't declare.
9893         * python/py-utils.c (py_decref, make_cleanup_py_decref)
9894         (py_xdecref, make_cleanup_py_xdecref): Remove.
9895
9896 2017-01-10  Tom Tromey  <tom@tromey.com>
9897
9898         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
9899         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
9900
9901 2017-01-10  Tom Tromey  <tom@tromey.com>
9902
9903         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
9904
9905 2017-01-10  Tom Tromey  <tom@tromey.com>
9906
9907         * python/py-utils.c (unicode_to_encoded_string)
9908         (python_string_to_target_string)
9909         (python_string_to_target_python_string)
9910         (python_string_to_host_string, gdbpy_obj_to_string)
9911         (get_addr_from_python): Use gdbpy_ref.
9912
9913 2017-01-10  Tom Tromey  <tom@tromey.com>
9914
9915         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
9916         gdbpy_ref.
9917
9918 2017-01-10  Tom Tromey  <tom@tromey.com>
9919
9920         * python/python.c (eval_python_command, gdbpy_decode_line)
9921         (gdbpy_run_events, gdbpy_start_type_printers)
9922         (gdbpy_apply_type_printers): Use gdbpy_ref.
9923
9924 2017-01-10  Tom Tromey  <tom@tromey.com>
9925
9926         * python/py-param.c (get_doc_string, compute_enum_values): Use
9927         gdbpy_ref.
9928
9929 2017-01-10  Tom Tromey  <tom@tromey.com>
9930
9931         * python/py-inferior.c (find_thread_object, build_inferior_list):
9932         Use gdbpy_ref.
9933
9934 2017-01-10  Tom Tromey  <tom@tromey.com>
9935
9936         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9937
9938 2017-01-10  Tom Tromey  <tom@tromey.com>
9939
9940         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
9941         gdbpy_ref.
9942
9943 2017-01-10  Tom Tromey  <tom@tromey.com>
9944
9945         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
9946         extra incref.
9947         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
9948         Use gdbpy_ref.
9949
9950 2017-01-10  Tom Tromey  <tom@tromey.com>
9951
9952         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
9953         gdbpy_ref.
9954
9955 2017-01-10  Tom Tromey  <tom@tromey.com>
9956
9957         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
9958         decref results of PyArg_ParseTupleAndKeywords.
9959
9960 2017-01-10  Tom Tromey  <tom@tromey.com>
9961
9962         * python/python.c (python_run_simple_file): Use
9963         unique_xmalloc_ptr, gdbpy_ref.
9964
9965 2017-01-10  Tom Tromey  <tom@tromey.com>
9966
9967         * python/py-prettyprint.c (print_stack_unless_memory_error)
9968         (print_string_repr, print_children): Use gdbpy_ref.
9969         (dummy_python_frame): New class.
9970         (dummy_python_frame::dummy_python_frame): Rename from
9971         push_dummy_python_frame.
9972         (py_restore_tstate): Remove.
9973
9974 2017-01-10  Tom Tromey  <tom@tromey.com>
9975
9976         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
9977
9978 2017-01-10  Tom Tromey  <tom@tromey.com>
9979
9980         * python/python.c (ensure_python_env, restore_python_env):
9981         Remove.
9982         * python/python-internal.h (ensure_python_env): Don't declare.
9983         * varobj.h (varobj_ensure_python_env): Don't declare.
9984         * varobj.c (varobj_ensure_python_env): Remove.
9985
9986 2017-01-10  Tom Tromey  <tom@tromey.com>
9987
9988         * varobj.c (varobj_value_get_print_value): Use
9989         gdbpy_enter_varobj.
9990
9991 2017-01-10  Tom Tromey  <tom@tromey.com>
9992
9993         * python/py-prettyprint.c (print_string_repr, print_children):
9994         Update.
9995         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
9996         of "encoding".
9997         * varobj.c (varobj_value_get_print_value): Update.
9998         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
9999
10000 2017-01-10  Tom Tromey  <tom@tromey.com>
10001
10002         * varobj.c (varobj_get_display_hint)
10003         (dynamic_varobj_has_child_method, install_new_value_visualizer)
10004         (varobj_set_visualizer, free_variable): Use
10005         gdbpy_enter_varobj.
10006
10007 2017-01-10  Tom Tromey  <tom@tromey.com>
10008
10009         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
10010         (do_finish_initialization): New function.  Use gdbpy_ref.
10011         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
10012         do_finish_initialization.
10013
10014 2017-01-10  Tom Tromey  <tom@tromey.com>
10015
10016         * python/py-param.c (get_set_value, get_show_value): Use
10017         gdbpy_enter, gdbpy_ref.
10018
10019 2017-01-10  Tom Tromey  <tom@tromey.com>
10020
10021         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
10022
10023 2017-01-10  Tom Tromey  <tom@tromey.com>
10024
10025         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
10026
10027 2017-01-10  Tom Tromey  <tom@tromey.com>
10028
10029         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
10030         Use gdbpy_enter_varobj.
10031
10032 2017-01-10  Tom Tromey  <tom@tromey.com>
10033
10034         * varobj.c (gdbpy_enter_varobj): New constructor.
10035         * python/python-internal.h (gdbpy_enter_varobj): New class.
10036         * python/py-varobj.c (py_varobj_get_iterator): Use
10037         gdbpy_enter_varobj.
10038
10039 2017-01-10  Tom Tromey  <tom@tromey.com>
10040
10041         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
10042         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10043         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
10044         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
10045         unique_xmalloc_ptr.
10046         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
10047
10048 2017-01-10  Tom Tromey  <tom@tromey.com>
10049
10050         * python/py-xmethods.c (invoke_match_method): Use
10051         gdbpy_ref.
10052
10053 2017-01-10  Tom Tromey  <tom@tromey.com>
10054
10055         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
10056         gdbpy_enter, gdbpy_ref.
10057
10058 2017-01-10  Tom Tromey  <tom@tromey.com>
10059
10060         * python/python.c (python_interactive_command): Use gdbpy_enter.
10061
10062 2017-01-10  Tom Tromey  <tom@tromey.com>
10063
10064         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
10065         gdbpy_ref.
10066
10067 2017-01-10  Tom Tromey  <tom@tromey.com>
10068
10069         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
10070         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
10071
10072 2017-01-10  Tom Tromey  <tom@tromey.com>
10073
10074         * utils.h (htab_deleter): New struct.
10075         (htab_up): New typedef.
10076         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
10077         gdbpy_enter, gdbpy_ref, htab_up.
10078
10079 2017-01-10  Tom Tromey  <tom@tromey.com>
10080
10081         * python/py-unwind.c (pending_frame_invalidate): Remove.
10082         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
10083
10084 2017-01-10  Tom Tromey  <tom@tromey.com>
10085
10086         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
10087         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
10088
10089 2017-01-10  Tom Tromey  <tom@tromey.com>
10090
10091         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
10092
10093 2017-01-10  Tom Tromey  <tom@tromey.com>
10094
10095         * python/python.c (gdbpy_eval_from_control_command)
10096         (gdbpy_source_script, gdbpy_run_events)
10097         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
10098         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
10099         gdbpy_enter.
10100
10101 2017-01-10  Tom Tromey  <tom@tromey.com>
10102
10103         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
10104
10105 2017-01-10  Tom Tromey  <tom@tromey.com>
10106
10107         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
10108
10109 2017-01-10  Tom Tromey  <tom@tromey.com>
10110
10111         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
10112         (python_on_inferior_call_pre, python_on_inferior_call_post)
10113         (python_on_memory_change, python_on_register_change)
10114         (python_inferior_exit, python_new_objfile, add_thread_object)
10115         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
10116
10117 2017-01-10  Tom Tromey  <tom@tromey.com>
10118
10119         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
10120         (bpfinishpy_handle_exit): Use gdbpy_enter.
10121
10122 2017-01-10  Tom Tromey  <tom@tromey.com>
10123
10124         * python/py-cmd.c (cmdpy_destroyer)
10125         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
10126         gdbpy_enter.
10127
10128 2017-01-10  Tom Tromey  <tom@tromey.com>
10129
10130         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
10131         gdbpy_enter.
10132         (gdbpy_breakpoint_has_cond): Likewise.
10133
10134 2017-01-10  Tom Tromey  <tom@tromey.com>
10135
10136         * python/python.c (gdbpy_enter): New constructor.
10137         (~gdbpy_enter): New destructor.
10138         (restore_python_env, ensure_python_env): Rewrite.
10139         * python/python-internal.h (gdbpy_enter): New class.
10140
10141 2017-01-10  Tom Tromey  <tom@tromey.com>
10142
10143         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
10144
10145 2017-01-10  Tom Tromey  <tom@tromey.com>
10146
10147         * python/py-value.c (value_has_field, get_field_flag)
10148         (get_field_type, valpy_getitem, convert_value_from_python): Use
10149         gdbpy_ref.
10150
10151 2017-01-10  Tom Tromey  <tom@tromey.com>
10152
10153         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
10154         gdbpy_ref.
10155
10156 2017-01-10  Tom Tromey  <tom@tromey.com>
10157
10158         * python/py-prettyprint.c (search_pp_list)
10159         (find_pretty_printer_from_objfiles)
10160         (find_pretty_printer_from_progspace)
10161         (find_pretty_printer_from_gdb, find_pretty_printer)
10162         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
10163         gdbpy_ref.
10164
10165 2017-01-10  Tom Tromey  <tom@tromey.com>
10166
10167         * python/py-param.c (call_doc_function): Use gdbpy_ref.
10168
10169 2017-01-10  Tom Tromey  <tom@tromey.com>
10170
10171         * python/py-linetable.c (build_line_table_tuple_from_pcs)
10172         (ltpy_get_all_source_lines): Use gdbpy_ref.
10173
10174 2017-01-10  Tom Tromey  <tom@tromey.com>
10175
10176         * python/py-framefilter.c (extract_sym, extract_value)
10177         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
10178         gdbpy_ref.
10179
10180 2017-01-10  Tom Tromey  <tom@tromey.com>
10181
10182         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
10183
10184 2017-01-10  Tom Tromey  <tom@tromey.com>
10185
10186         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
10187
10188 2017-01-10  Tom Tromey  <tom@tromey.com>
10189
10190         * python/py-function.c (convert_values_to_python, fnpy_init): Use
10191         gdbpy_ref.
10192
10193 2017-01-10  Tom Tromey  <tom@tromey.com>
10194
10195         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
10196
10197 2017-01-10  Tom Tromey  <tom@tromey.com>
10198
10199         * python/py-type.c (convert_field, make_fielditem, typy_fields)
10200         (typy_range): Use gdbpy_ref.
10201
10202 2017-01-10  Tom Tromey  <tom@tromey.com>
10203
10204         * python/py-threadevent.c (create_thread_event_object): Use
10205         gdbpy_ref.
10206         * python/py-stopevent.c (create_stop_event_object): Simplify.
10207         (emit_stop_event): Use gdbpy_ref.
10208         * python/py-signalevent.c (create_signal_event_object): Use
10209         gdbpy_ref.
10210         * python/py-newobjfileevent.c (create_new_objfile_event_object)
10211         (emit_new_objfile_event, create_clear_objfiles_event_object)
10212         (emit_clear_objfiles_event): Use gdbpy_ref.
10213         * python/py-infevents.c (create_inferior_call_event_object)
10214         (create_register_changed_event_object)
10215         (create_memory_changed_event_object, emit_inferior_call_event)
10216         (emit_memory_changed_event, emit_register_changed_event): Use
10217         gdbpy_ref.
10218         * python/py-exitedevent.c (create_exited_event_object)
10219         (emit_exited_event): Use gdbpy_ref.
10220         * python/py-event.h (evpy_emit_event): Remove
10221         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
10222         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
10223         * python/py-continueevent.c (emit_continue_event): Use
10224         gdbpy_ref.
10225         * python/py-breakpoint.c (gdbpy_breakpoint_created)
10226         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
10227         gdbpy_ref.
10228         * python/py-bpevent.c (create_breakpoint_event_object): Use
10229         gdbpy_ref.
10230
10231 2017-01-10  Tom Tromey  <tom@tromey.com>
10232
10233         * python/py-ref.h: New file.
10234
10235 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10236
10237         * cli-out.c (cli_ui_out::do_redirect): Change return type to
10238         void.
10239         * cli-out.h (cli_ui_out::do_redirect): Likewise.
10240         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
10241         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
10242         * ui-out.c (ui_out::redirect): Likewise.
10243         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
10244         * cli/cli-logging.c (set_logging_redirect): Update call site of
10245         ui_out::redirect.
10246         (handle_redirections): Likewise.
10247         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
10248         * top.c (execute_command_to_string): Likewise.
10249         * utils.c (do_ui_out_redirect_pop): Likewise.
10250
10251 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
10252
10253         * stack.c (_initialize_stack): Update "frame" command help message.
10254
10255 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
10256
10257         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
10258
10259 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10260
10261         * x86-linux-nat.h: Include gdb_proc_service.h.
10262
10263 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10264
10265         * ser-base.h: Include serial.h.
10266
10267 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10268
10269         * ppc-linux-tdep.h: Include ppc-tdep.h.
10270
10271 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10272
10273         * nat/amd64-linux-siginfo.h: Include signal.h.
10274
10275 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10276
10277         * nat/aarch64-linux-hw-point.h: Include break-common.h.
10278
10279 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10280
10281         * mi/mi-parse.h: Include mi-cmds.h.
10282
10283 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10284
10285         * inf-loop.c: Don't include "target.h".
10286         * inf-loop.h: Include it here.
10287
10288 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10289
10290         * dfp.h: Include "dboulest.h" and "expression.h".
10291
10292 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10293
10294         * ax-gdb.h: Include "ax.h".
10295
10296 2017-01-06  Yao Qi  <yao.qi@linaro.org>
10297
10298         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
10299         with nat/gdb_ptrace.h.
10300
10301 2017-01-05  Yao Qi  <yao.qi@linaro.org>
10302
10303         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
10304         new line.
10305         (mips64_fbsd_sigframe_init): Likewise.
10306
10307 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10308
10309         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
10310         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
10311
10312 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10313
10314         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
10315         * NEWS: Mention new FreeBSD/mips native configuration.
10316         * config/mips/fbsd.mh: New file.
10317         * configure.host: Add mips*-*-freebsd*.
10318         * mips-fbsd-nat.c: New file.
10319
10320 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
10321
10322         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
10323         (ALLDEPFILES): Add mips-fbsd-tdep.c.
10324         * NEWS: Mention new FreeBSD/mips target.
10325         * configure.tgt: Add mips*-*-freebsd*.
10326         * mips-fbsd-tdep.c: New file.
10327         * mips-fbsd-tdep.h: New file.
10328
10329 2017-01-04  Yao Qi  <yao.qi@linaro.org>
10330
10331         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
10332         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
10333
10334 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10335
10336         Update copyright year range in all GDB files.
10337
10338 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
10339
10340         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
10341
10342 For older changes see ChangeLog-2016.
10343 \f
10344 Local Variables:
10345 mode: change-log
10346 left-margin: 8
10347 fill-column: 74
10348 version-control: never
10349 coding: utf-8
10350 End: