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