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