Get rid of VEC(probe_p)
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2
3 * probe.h: Don't include gdb_vecs.h.
4 (DEF_VEC_P (probe_p)): Remove.
5 (find_probes_in_objfile): Return an std::vector.
6 * probe.c (find_probes_in_objfile): Likewise.
7 * breakpoint.c (breakpoint_objfile_data)
8 <longjmp_probes>: Change type to std::vector.
9 <exception_probes>: Likewise.
10 (free_breakpoint_probes): Don't manually free vectors.
11 (create_longjmp_master_breakpoint): Adjust.
12 (create_exception_master_breakpoint): Adjust.
13 * solib-svr4.c (svr4_create_probe_breakpoints): Change
14 parameter type, adjust.
15 (svr4_create_solib_event_breakpoints): Adjust.
16
17 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
18
19 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
20 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
21 with new.
22 (free_breakpoint_probes): Rename to ...
23 (free_breakpoint_objfile_data): ... this, and call delete on
24 bp_objfile_data..
25
26 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
27
28 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
29 (loaded_script_ptr): Remove typedef.
30 (DEF_VEC_P (loaded_script_ptr)): Remove.
31 (struct collect_matching_scripts_data): Add constructor.
32 <scripts_p>: Change type to (pointer to) std::vector.
33 (collect_matching_scripts_data): Adjust.
34 (sort_scripts_by_name): Make suitable for std::sort.
35 (print_scripts): Don't sort vector, adjust to std::vector.
36 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
37
38 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
39
40 * symfile.c (filename_language): Make struct, not typedef. Add
41 constructor.
42 <ext>: Change type to std::string.
43 (DEF_VEC_O (filename_language)): Remove.
44 (filename_language_table): Change type to std::vector.
45 (add_filename_language): Adjust.
46 (set_ext_lang_command): Adjust.
47 (info_ext_lang_command): Adjust.
48 (deduce_language_from_filename): Adjust.
49 (class scoped_restore_filename_language_table): Remove.
50 (test_filename_language): Use scoped_restore.
51 (test_set_ext_lang_command): Use scoped_restore, adjust to
52 std::vector change.
53
54 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
55
56 * symfile.c: Include selftest.h.
57 (class scoped_restore_filename_language_table): New.
58 (test_filename_language): New test.
59 (test_set_ext_lang_command): New test.
60 (_initialize_symfile): Register tests.
61
62 2017-10-27 Keith Seitz <keiths@redhat.com>
63
64 * breakpoint.c (print_breakpoint_location): Use the symbol saved
65 in the bp_location, falling back to find_pc_sect_function when
66 needed.
67 (add_location_to_breakpoint): Save sal->symbol.
68 * breakpoint.h (struct bp_location) <symbol>: New field.
69 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
70 * symtab.h (struct symtab_and_line) <symbol>: New field.
71
72 2017-10-26 Patrick Frants <osscontribute@gmail.com>
73
74 PR gdb/13669
75 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
76 to rewind obstack.
77
78 2017-10-26 Pedro Alves <palves@redhat.com>
79
80 * remote.c (remote_async_terminal_ours_p): Delete.
81 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
82 Remove references to 'remote_async_terminal_ours_p'.
83
84 2017-10-26 Yao Qi <yao.qi@linaro.org>
85
86 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
87
88 2017-10-26 Yao Qi <yao.qi@linaro.org>
89
90 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
91 aspace const.
92 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
93 Likewise.
94 * breakpoint.c (bpstat_check_location): Remove cast.
95 (breakpoint_hit_catch_fork): Make aspce const.
96 (breakpoint_hit_catch_solib): Likewise.
97 (breakpoint_hit_catch_exec): Likewise.
98 (breakpoint_hit_ranged_breakpoint): Likewise.
99 (breakpoint_hit_watchpoint): Likewise.
100 (base_breakpoint_breakpoint_hit): Likewise.
101 (bkpt_breakpoint_hit): Likewise.
102 (dprintf_breakpoint_hit): Likewise.
103 (tracepoint_breakpoint_hit): Likewise.
104 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
105
106 2017-10-26 Yao Qi <yao.qi@linaro.org>
107
108 * breakpoint.c (breakpoint_location_address_match): Change
109 "struct address_space *" to "const address_space".
110 (breakpoint_location_address_range_overlap): Likewise.
111 (breakpoint_here_p): Likewise.
112 (breakpoint_in_range_p): Likewise.
113 (moribund_breakpoint_here_p): Likewise.
114 (bp_location_inserted_here_p): Likewise.
115 (software_breakpoint_inserted_here_p): Likewise.
116 (hardware_breakpoint_inserted_here_p): Likewise.
117 (hardware_watchpoint_inserted_in_range): Likewise.
118 (bpstat_check_location): Likewise.
119 (bpstat_stop_status): Likewise.
120 (breakpoint_address_match): Likewise.
121 (breakpoint_address_match_range): Likewise.
122 (breakpoint_location_address_match): Likewise.
123 (breakpoint_location_address_range_overlap): Likewise.
124 (insert_single_step_breakpoint): Likewise.
125 (breakpoint_has_location_inserted_here): Likewise.
126 (single_step_breakpoint_inserted_here_p): Likewise.
127 (pc_at_non_inline_function): Likewise.
128 * breakpoint.h (bpstat_stop_status): Update declaration.
129 (breakpoint_here_p): Likewise.
130 (breakpoint_in_range_p): Likewise.
131 (moribund_breakpoint_here_p): Likewise.
132 (breakpoint_inserted_here_p): Likewise.
133 (software_breakpoint_inserted_here_p): Likewise.
134 (hardware_breakpoint_inserted_here_p): Likewise.
135 (breakpoint_has_location_inserted_here): Likewise.
136 (single_step_breakpoint_inserted_here_p): Likewise.
137 (hardware_watchpoint_inserted_in_range): Likewise.
138 (breakpoint_address_match): Likewise.
139 (insert_single_step_breakpoint): Likewise.
140 (pc_at_non_inline_function): Likewise.
141 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
142 * record.c (record_check_stopped_by_breakpoint): Likewise.
143 * record.h (record_check_stopped_by_breakpoint): Likewise.
144 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
145
146 2017-10-25 Yao Qi <yao.qi@linaro.org>
147
148 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
149 regcache->arch () instead get_regcache_arch.
150 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
151 Likewise.
152 (aarch64_fbsd_store_inferior_registers): Likewise.
153 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
154 (store_gregs_to_thread): Likewise.
155 (fetch_fpregs_from_thread): Likewise.
156 (store_fpregs_to_thread): Likewise.
157 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
158 (aarch64_store_return_value): Likewise.
159 (aarch64_software_single_step): Likewise.
160 * aix-thread.c (aix_thread_wait): Likewise.
161 (supply_reg32): Likewise.
162 (supply_sprs64): Likewise.
163 (supply_sprs32): Likewise.
164 (fill_gprs64): Likewise.
165 (fill_gprs32): Likewise.
166 (fill_sprs64): Likewise.
167 (fill_sprs32): Likewise.
168 (store_regs_user_thread): Likewise.
169 (store_regs_kernel_thread): Likewise.
170 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
171 (alphabsd_store_inferior_registers): Likewise.
172 * alpha-tdep.c (alpha_extract_return_value): Likewise.
173 (alpha_store_return_value): Likewise.
174 (alpha_deal_with_atomic_sequence): Likewise.
175 (alpha_next_pc): Likewise.
176 (alpha_software_single_step): Likewise.
177 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
178 (amd64bsd_store_inferior_registers): Likewise.
179 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
180 Likewise.
181 (amd64_linux_store_inferior_registers): Likewise.
182 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
183 (amd64_collect_native_gregset): Likewise.
184 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
185 (amd64obsd_collect_uthread): Likewise.
186 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
187 (amd64_collect_fpregset): Likewise.
188 (amd64_supply_fxsave): Likewise.
189 (amd64_supply_xsave): Likewise.
190 (amd64_collect_fxsave): Likewise.
191 (amd64_collect_xsave): Likewise.
192 * arc-tdep.c (arc_write_pc): Likewise.
193 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
194 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
195 (arm_fbsd_store_inferior_registers): Likewise.
196 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
197 (store_vfp_regs): Likewise.
198 (arm_linux_fetch_inferior_registers): Likewise.
199 (arm_linux_store_inferior_registers): Likewise.
200 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
201 (arm_linux_sigreturn_next_pc): Likewise.
202 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
203 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
204 (fetch_register): Likewise.
205 (store_register): Likewise.
206 * arm-tdep.c (arm_is_thumb): Likewise.
207 (displaced_in_arm_mode): Likewise.
208 (bx_write_pc): Likewise.
209 (arm_get_next_pcs_addr_bits_remove): Likewise.
210 (arm_software_single_step): Likewise.
211 (arm_extract_return_value): Likewise.
212 (arm_store_return_value): Likewise.
213 (arm_write_pc): Likewise.
214 * bfin-tdep.c (bfin_extract_return_value): Likewise.
215 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
216 (bsd_uthread_store_registers): Likewise.
217 * core-regset.c (fetch_core_registers): Likewise.
218 * corelow.c (get_core_registers): Likewise.
219 * cris-tdep.c (cris_store_return_value): Likewise.
220 (cris_extract_return_value): Likewise.
221 (find_step_target): Likewise.
222 (find_step_target): Likewise.
223 (cris_software_single_step): Likewise.
224 * ctf.c (ctf_fetch_registers): Likewise.
225 * darwin-nat.c (cancel_breakpoint): Likewise.
226 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
227 * frv-tdep.c (frv_extract_return_value): Likewise.
228 * ft32-tdep.c (ft32_store_return_value): Likewise.
229 (ft32_extract_return_value): Likewise.
230 * go32-nat.c (fetch_register): Likewise.
231 (go32_fetch_registers): Likewise.
232 (go32_store_registers): Likewise.
233 (store_register): Likewise.
234 * h8300-tdep.c (h8300_extract_return_value): Likewise.
235 (h8300_store_return_value): Likewise.
236 * hppa-linux-nat.c (fetch_register): Likewise.
237 (store_register): Likewise.
238 (hppa_linux_fetch_inferior_registers): Likewise.
239 (hppa_linux_store_inferior_registers): Likewise.
240 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
241 (i386_darwin_store_inferior_registers): Likewise.
242 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
243 (gnu_store_registers): Likewise.
244 * i386-linux-nat.c (fetch_register): Likewise.
245 (store_register): Likewise.
246 (supply_gregset): Likewise.
247 (fill_gregset): Likewise.
248 (i386_linux_fetch_inferior_registers): Likewise.
249 (i386_linux_store_inferior_registers): Likewise.
250 (i386_linux_resume): Likewise.
251 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
252 Likewise.
253 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
254 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
255 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
256 (i386obsd_collect_uthread): Likewise.
257 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
258 (i386_supply_gregset): Likewise.
259 (i386_collect_gregset): Likewise.
260 (i386_supply_fpregset): Likewise.
261 (i386_collect_fpregset): Likewise.
262 (i386_mpx_bd_base): Likewise.
263 * i386-v4-nat.c (supply_fpregset): Likewise.
264 (fill_fpregset): Likewise.
265 * i387-tdep.c (i387_supply_fsave): Likewise.
266 (i387_collect_fsave): Likewise.
267 (i387_supply_fxsave): Likewise.
268 (i387_collect_fxsave): Likewise.
269 (i387_supply_xsave): Likewise.
270 (i387_collect_xsave): Likewise.
271 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
272 (ia64_linux_store_registers): Likewise.
273 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
274 (ia64_extract_return_value): Likewise.
275 (ia64_store_return_value): Likewise.
276 (find_func_descr): Likewise.
277 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
278 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
279 (inf_ptrace_store_registers): Likewise.
280 * infrun.c (use_displaced_stepping): Likewise.
281 (displaced_step_prepare_throw): Likewise.
282 (resume): Likewise.
283 (proceed): Likewise.
284 (do_target_wait): Likewise.
285 (adjust_pc_after_break): Likewise.
286 (handle_inferior_event_1): Likewise.
287 (handle_signal_stop): Likewise.
288 (save_infcall_suspend_state): Likewise.
289 (restore_infcall_suspend_state): Likewise.
290 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
291 * jit.c (jit_frame_prev_register): Likewise.
292 * linux-nat.c (save_stop_reason): Likewise.
293 (linux_nat_wait_1): Likewise.
294 (resume_stopped_resumed_lwps): Likewise.
295 * linux-record.c (record_linux_sockaddr): Likewise.
296 (record_linux_msghdr): Likewise.
297 (record_linux_system_call): Likewise.
298 * linux-tdep.c (linux_collect_thread_registers): Likewise.
299 * lm32-tdep.c (lm32_extract_return_value): Likewise.
300 (lm32_store_return_value): Likewise.
301 * m32c-tdep.c (m32c_read_flg): Likewise.
302 (m32c_pseudo_register_read): Likewise.
303 (m32c_pseudo_register_write): Likewise.
304 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
305 (m32r_linux_collect_gregset): Likewise.
306 * m32r-tdep.c (m32r_store_return_value): Likewise.
307 (m32r_extract_return_value): Likewise.
308 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
309 (m68kbsd_collect_fpregset): Likewise.
310 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
311 * m68k-linux-nat.c (fetch_register): Likewise.
312 (old_fetch_inferior_registers): Likewise.
313 (old_store_inferior_registers): Likewise.
314 (store_regs): Likewise.
315 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
316 (m68k_svr4_store_return_value): Likewise.
317 * m88k-tdep.c (m88k_store_arguments): Likewise.
318 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
319 (mi_cmd_data_write_register_values): Likewise.
320 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
321 (mips_fbsd_store_inferior_registers): Likewise.
322 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
323 (mips_fbsd_supply_gregs): Likewise.
324 (mips_fbsd_collect_fpregs): Likewise.
325 (mips_fbsd_collect_gregs): Likewise.
326 (mips_fbsd_supply_fpregset): Likewise.
327 (mips_fbsd_collect_fpregset): Likewise.
328 (mips_fbsd_supply_gregset): Likewise.
329 (mips_fbsd_collect_gregset): Likewise.
330 * mips-linux-nat.c (supply_gregset): Likewise.
331 (fill_gregset): Likewise.
332 (supply_fpregset): Likewise.
333 (fill_fpregset): Likewise.
334 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
335 (mips_fill_gregset): Likewise.
336 (mips_supply_fpregset): Likewise.
337 (mips_fill_fpregset): Likewise.
338 (mips64_supply_gregset): Likewise.
339 (micromips_linux_sigframe_validate): Likewise.
340 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
341 (mipsnbsd_fetch_inferior_registers): Likewise.
342 (mipsnbsd_store_inferior_registers): Likewise.
343 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
344 (mipsnbsd_supply_gregset): Likewise.
345 (mipsnbsd_iterate_over_regset_sections): Likewise.
346 (mipsnbsd_supply_reg): Likewise.
347 (mipsnbsd_supply_fpreg): Likewise.
348 * mips-tdep.c (mips_in_frame_stub): Likewise.
349 (mips_dummy_id): Likewise.
350 (is_octeon_bbit_op): Likewise.
351 (micromips_bc1_pc): Likewise.
352 (extended_mips16_next_pc): Likewise.
353 (mips16_next_pc): Likewise.
354 (deal_with_atomic_sequence): Likewise.
355 * moxie-tdep.c (moxie_process_readu): Likewise.
356 * nios2-tdep.c (nios2_get_next_pc): Likewise.
357 * nto-procfs.c (procfs_store_registers): Likewise.
358 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
359 (ppcfbsd_store_inferior_registers): Likewise.
360 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
361 (fetch_altivec_register): Likewise.
362 (get_spe_registers): Likewise.
363 (fetch_spe_register): Likewise.
364 (fetch_altivec_registers): Likewise.
365 (fetch_all_gp_regs): Likewise.
366 (fetch_all_fp_regs): Likewise.
367 (store_vsx_register): Likewise.
368 (store_altivec_register): Likewise.
369 (set_spe_registers): Likewise.
370 (store_spe_register): Likewise.
371 (store_altivec_registers): Likewise.
372 (store_all_gp_regs): Likewise.
373 (store_all_fp_regs): Likewise.
374 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
375 (ppc_linux_collect_gregset): Likewise.
376 (ppc_canonicalize_syscall): Likewise.
377 (ppc_linux_record_signal): Likewise.
378 (ppu2spu_prev_register): Likewise.
379 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
380 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
381 (ppcobsd_store_registers): Likewise.
382 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
383 Likewise.
384 (ppc_ravenscar_generic_store_registers): Likewise.
385 * procfs.c (procfs_fetch_registers): Likewise.
386 (procfs_store_registers): Likewise.
387 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
388 (ravenscar_store_registers): Likewise.
389 (ravenscar_prepare_to_store): Likewise.
390 * record-btrace.c (record_btrace_fetch_registers): Likewise.
391 * record-full.c (record_full_wait_1): Likewise.
392 (record_full_registers_change): Likewise.
393 (record_full_store_registers): Likewise.
394 (record_full_core_fetch_registers): Likewise.
395 (record_full_save): Likewise.
396 (record_full_goto_insn): Likewise.
397 * regcache.c (regcache_register_size): Likewise.
398 (get_regcache_arch): Remove.
399 (regcache_read_pc): Likewise.
400 * regcache.h (get_regcache_arch): Remove.
401 * remote-sim.c (gdbsim_fetch_register): Likewise.
402 (gdbsim_store_register): Likewise.
403 * remote.c (fetch_register_using_p): Likewise.
404 (send_g_packet): Likewise.
405 (remote_prepare_to_store): Likewise.
406 (store_registers_using_G): Likewise.
407 * reverse.c (save_bookmark_command): Likewise.
408 (goto_bookmark_command): Likewise.
409 * rs6000-aix-tdep.c (branch_dest): Likewise.
410 * rs6000-nat.c (rs6000_ptrace64): Likewise.
411 (fetch_register): Likewise.
412 * rs6000-tdep.c (ppc_supply_reg): Likewise.
413 (ppc_collect_reg): Likewise.
414 (ppc_collect_gregset): Likewise.
415 (ppc_collect_fpregset): Likewise.
416 (ppc_collect_vsxregset): Likewise.
417 (ppc_collect_vrregset): Likewise.
418 (ppc_displaced_step_hw_singlestep): Likewise.
419 (rs6000_pseudo_register_read): Likewise.
420 (rs6000_pseudo_register_write): Likewise.
421 * s390-linux-nat.c (supply_gregset): Likewise.
422 (fill_gregset): Likewise.
423 (s390_linux_fetch_inferior_registers): Likewise.
424 * s390-linux-tdep.c (s390_write_pc): Likewise.
425 (s390_software_single_step): Likewise.
426 (s390_all_but_pc_registers_record): Likewise.
427 (s390_linux_syscall_record): Likewise.
428 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
429 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
430 (shnbsd_store_inferior_registers): Likewise.
431 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
432 (sh_extract_return_value_fpu): Likewise.
433 (sh_store_return_value_nofpu): Likewise.
434 (sh_corefile_supply_regset): Likewise.
435 (sh_corefile_collect_regset): Likewise.
436 * sh64-tdep.c (sh64_extract_return_value): Likewise.
437 (sh64_store_return_value): Likewise.
438 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
439 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
440 (sparc_store_inferior_registers): Likewise.
441 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
442 (sparc_ravenscar_prepare_to_store): Likewise.
443 * sparc-tdep.c (sparc32_store_arguments): Likewise.
444 (sparc_analyze_control_transfer): Likewise.
445 (sparc_step_trap): Likewise.
446 (sparc_software_single_step): Likewise.
447 (sparc32_gdbarch_init): Likewise.
448 (sparc_supply_rwindow): Likewise.
449 (sparc_collect_rwindow): Likewise.
450 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
451 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
452 (sparc64nbsd_collect_gregset): Likewise.
453 (sparc64nbsd_supply_fpregset): Likewise.
454 (sparc64nbsd_collect_fpregset): Likewise.
455 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
456 (sparc64_supply_gregset): Likewise.
457 (sparc64_collect_gregset): Likewise.
458 (sparc64_supply_fpregset): Likewise.
459 (sparc64_collect_fpregset): Likewise.
460 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
461 * spu-tdep.c (spu_unwind_sp): Likewise.
462 (spu2ppu_prev_register): Likewise.
463 (spu_memory_remove_breakpoint): Likewise.
464 * stack.c (return_command): Likewise.
465 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
466 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
467 * tracefile.c (trace_save_ctf): Likewise.
468 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
469 (do_windows_store_inferior_registers): Likewise.
470 (windows_resume): Likewise.
471 * xtensa-linux-nat.c (fill_gregset): Likewise.
472 (supply_gregset_reg): Likewise.
473 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
474 (xtensa_register_read_masked): Likewise.
475 (xtensa_supply_gregset): Likewise.
476 (xtensa_extract_return_value): Likewise.
477 (xtensa_store_return_value): Likewise.
478
479 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
480
481 * doublest.c (floatformat_from_string): New function.
482 * doublest.h (floatformat_from_string): Add prototype.
483
484 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
485 (OP_FLOAT): ... this.
486 * expression.h: Do not include "doublest.h".
487 (union exp_element): Replace doubleconst and decfloatconst by
488 new element floatconst.
489 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
490 (ada_evaluate_subexp): Likewise.
491 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
492 OP_DOUBLE and OP_DECFLOAT.
493 * expprint.c (print_subexp_standard): Likewise.
494 (dump_subexp_body_standard): Likewise.
495 * breakpoint.c (watchpoint_exp_is_const): Likewise.
496
497 * parse.c: Include "dfp.h".
498 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
499 (write_exp_elt_floatcst): New function.
500 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
501 and OP_DECFLOAT.
502 (operator_check_standard): Likewise.
503 (parse_float): Do not accept suffix. Take type as input. Return bool.
504 Return target format buffer instead of host DOUBLEST.
505 Use floatformat_from_string and decimal_from_string to parse
506 either binary or decimal floating-point types.
507 (parse_c_float): Remove.
508 * parser-defs.h: Do not include "doublest.h".
509 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
510 (write_exp_elt_floatcst): Add prototype.
511 (parse_float): Update prototype.
512 (parse_c_float): Remove.
513
514 * c-exp.y: Do not include "dfp.h".
515 (typed_val_float): Use byte buffer instead of DOUBLEST.
516 (typed_val_decfloat): Remove.
517 (DECFLOAT): Remove.
518 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
519 (parse_number): Update to new parse_float interface.
520 Parse suffixes and determine type before calling parse_float.
521 Handle decimal and binary FP types the same way.
522
523 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
524 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
525 (parse_number): Update to new parse_float interface.
526 Parse suffixes and determine type before calling parse_float.
527
528 * f-exp.y: Replace dval by typed_val_float.
529 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
530 (parse_number): Use parse_float instead of atof.
531
532 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
533 (parse_go_float): Remove.
534 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
535 (parse_number): Call parse_float instead of parse_go_float.
536 Parse suffixes and determine type before calling parse_float.
537
538 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
539 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
540 (parse_number): Update to new parse_float interface.
541 Parse suffixes and determine type before calling parse_float.
542
543 * m2-exp.y: Replace dval by byte buffer val.
544 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
545 (parse_number): Call parse_float instead of atof.
546
547 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
548 (lex_number): Call parse_float instead of strtod.
549 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
550 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
551 Use write_exp_elt_floatcst.
552 (unit_testing): Remove static variable.
553 (rust_type): Do not check unit_testing.
554 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
555
556 * ada-exp.y (type_float, type_double): Remove.
557 (typed_val_float): Use byte buffer instead of DOUBLEST.
558 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
559 * ada-lex.l (processReal): Use parse_float instead of sscanf.
560
561 2017-10-25 Alan Hayward <alan.hayward@arm.com>
562
563 * aarch64-tdep.h (enum aarch64_regnum): Remove.
564 * arch/aarch64.h: New file.
565
566 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
567
568 * dfp.h (decimal_from_string): Use const reference for argument.
569 * dfp.c (decimal_from_string): Likewise.
570
571 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
572
573 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
574 * sh64-tdep.c (sh64_do_fp_register): Likewise.
575 * mips-tdep.c (mips_print_fp_register): Likewise.
576
577 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
578
579 * common/format.h (enum argclass): Replace decfloat_arg by
580 dec32float_arg, dec64float_arg, and dec128float_arg.
581 * common/format.c (parse_format_string): Update to return
582 new decimal float argument classes.
583
584 * printcmd.c (printf_decfloat): Rename to ...
585 (printf_floating): ... this. Add argclass argument, and use it
586 instead of parsing the format string again. Add support for
587 binary floating-point values, using floatformat_to_string.
588 Convert value to the target format if it doesn't already match.
589 (ui_printf): Call printf_floating instead of printf_decfloat,
590 also for double_arg / long_double_arg. Pass argclass.
591
592 * dfp.c (decimal_to_string): Add format string argument.
593 * dfp.h (decimal_to_string): Likewise.
594
595 * doublest.c (floatformat_to_string): Add format string argument.
596 * doublest.h (floatformat_to_string): Likewise.
597
598 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
599
600 * doublest.c (floatformat_precision): New routine.
601 (floatformat_to_string): Likewise.
602 * doublest.c (floatformat_to_string): Add prototype.
603
604 * printcmd.c (print_scalar_formatted): Only call print_floating
605 on floating-point types.
606 * valprint.c: Do not include "floatformat.h".
607 (generic_val_print_decfloat): Remove.
608 (generic_val_print): Call generic_val_print_float for both
609 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
610 (print_floating): Use floatformat_to_string. Handle decimal float.
611 (print_decimal_floating): Remove, merge into floatformat_to_string.
612 * value.h (print_decimal_floating): Remove.
613
614 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
615
616 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
617
618 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
619
620 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
621
622 * memattr.h: Don't include vec.h.
623 (struct mem_attrib): Initialize fields.
624 <unknown>: New static method.
625 (struct mem_region): Add constructors, operator<, initialize
626 fields.
627 * memattr.c: Include algorithm.
628 (default_mem_attrib, unknown_mem_attrib): Remove.
629 (user_mem_region_list): New global.
630 (target_mem_region_list, mem_region_list): Change type to
631 std::vector<mem_region>.
632 (mem_use_target): Now a function.
633 (target_mem_regions_valid): Change type to bool.
634 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
635 (require_user_regions): Adjust.
636 (require_target_regions): Adjust.
637 (create_mem_region): Adjust.
638 (lookup_mem_region): Adjust.
639 (invalidate_target_mem_regions): Adjust.
640 (mem_clear): Rename to...
641 (user_mem_clear): ... this, and adjust.
642 (mem_command): Adjust.
643 (info_mem_command): Adjust.
644 (mem_enable, enable_mem_command, mem_disable,
645 disable_mem_command): Adjust.
646 (mem_delete): Adjust.
647 (delete_mem_command): Adjust.
648 * memory-map.h (parse_memory_map): Return an std::vector.
649 * memory-map.c (parse_memory_map): Likewise.
650 (struct memory_map_parsing_data): Add constructor.
651 <memory_map>: Point to std::vector.
652 (memory_map_start_memory): Adjust.
653 (memory_map_end_memory): Adjust.
654 (memory_map_end_property): Adjust.
655 (clear_result): Remove.
656 * remote.c (remote_memory_map): Return an std::vector.
657 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
658 Remove.
659 (target_debug_print_mem_region_vector): New.
660 * target-delegates.c: Regenerate.
661 * target.h (mem_region_vector): New typedef.
662 (to_memory_map): Return mem_region_vector.
663 (target_memory_map): Return an std::vector.
664 * target.c (target_memory_map): Return an std::vector.
665 (flash_erase_command): Adjust.
666
667 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
668
669 * memory-map.c (struct memory_map_parsing_data) <property_name>:
670 Change type to std::string.
671 (memory_map_start_property): Adjust.
672 (memory_map_end_property): Adjust.
673
674 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
675
676 * infrun.h: Include common/byte-vector.h.
677 (struct displaced_step_closure): New struct.
678 (struct buf_displaced_step_closure): New struct.
679 * infrun.c (displaced_step_closure::~displaced_step_closure):
680 Provide default implementation.
681 (displaced_step_clear): Deallocate step closure with delete.
682 * aarch64-tdep.c (displaced_step_closure): Rename to ...
683 (aarch64_displaced_step_closure): ... this, extend
684 displaced_step_closure.
685 (aarch64_displaced_step_data) <dsc>: Change type to
686 aarch64_displaced_step_closure.
687 (aarch64_displaced_step_copy_insn): Adjust to type change, use
688 unique_ptr.
689 (aarch64_displaced_step_fixup): Add cast for displaced step
690 closure.
691 * amd64-tdep.c (displaced_step_closure): Rename to ...
692 (amd64_displaced_step_closure): ... this, extend
693 displaced_step_closure.
694 <insn_buf>: Change type to std::vector<gdb_byte>.
695 <max_len>: Remove.
696 (fixup_riprel): Change type of DSC parameter, adjust to type
697 change of insn_buf.
698 (fixup_displaced_copy): Change type of DSC parameter.
699 (amd64_displaced_step_copy_insn): Instantiate
700 amd64_displaced_step_closure.
701 (amd64_displaced_step_fixup): Add cast for closure type, adjust
702 to type change of insn_buf.
703 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
704 parameter DSC.
705 (arm_linux_copy_svc): Likewise.
706 (cleanup_kernel_helper_return): Likewise.
707 (arm_catch_kernel_helper_return): Likewise.
708 (arm_linux_displaced_step_copy_insn): Instantiate
709 arm_displaced_step_closure.
710 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
711 (displaced_read_reg): Change type of parameter DSC.
712 (branch_write_pc): Likewise.
713 (load_write_pc): Likewise.
714 (alu_write_pc): Likewise.
715 (displaced_write_reg): Likewise.
716 (arm_copy_unmodified): Likewise.
717 (thumb_copy_unmodified_32bit): Likewise.
718 (thumb_copy_unmodified_16bit): Likewise.
719 (cleanup_preload): Likewise.
720 (install_preload): Likewise.
721 (arm_copy_preload): Likewise.
722 (thumb2_copy_preload): Likewise.
723 (install_preload_reg): Likewise.
724 (arm_copy_preload_reg): Likewise.
725 (cleanup_copro_load_store): Likewise.
726 (install_copro_load_store): Likewise.
727 (arm_copy_copro_load_store) Likewise.
728 (thumb2_copy_copro_load_store): Likewise.
729 (cleanup_branch): Likewise.
730 (install_b_bl_blx): Likewise.
731 (arm_copy_b_bl_blx): Likewise.
732 (thumb2_copy_b_bl_blx): Likewise.
733 (thumb_copy_b): Likewise.
734 (install_bx_blx_reg): Likewise.
735 (arm_copy_bx_blx_reg): Likewise.
736 (thumb_copy_bx_blx_reg): Likewise.
737 (cleanup_alu_imm): Likewise.
738 (arm_copy_alu_imm): Likewise.
739 (thumb2_copy_alu_imm): Likewise.
740 (cleanup_alu_reg): Likewise.
741 (install_alu_reg): Likewise.
742 (arm_copy_alu_reg): Likewise.
743 (thumb_copy_alu_reg): Likewise.
744 (cleanup_alu_shifted_reg): Likewise.
745 (install_alu_shifted_reg): Likewise.
746 (arm_copy_alu_shifted_reg): Likewise.
747 (cleanup_load): Likewise.
748 (cleanup_store): Likewise.
749 (arm_copy_extra_ld_st): Likewise.
750 (install_load_store): Likewise.
751 (thumb2_copy_load_literal): Likewise.
752 (thumb2_copy_load_reg_imm): Likewise.
753 (arm_copy_ldr_str_ldrb_strb): Likewise.
754 (cleanup_block_load_all): Likewise.
755 (cleanup_block_store_pc): Likewise.
756 (cleanup_block_load_pc): Likewise.
757 (arm_copy_block_xfer): Likewise.
758 (thumb2_copy_block_xfer): Likewise.
759 (cleanup_svc): Likewise.
760 (install_svc): Likewise.
761 (arm_copy_svc): Likewise.
762 (thumb_copy_svc): Likewise.
763 (arm_copy_undef): Likewise.
764 (thumb_32bit_copy_undef): Likewise.
765 (arm_copy_unpred): Likewise.
766 (arm_decode_misc_memhint_neon): Likewise.
767 (arm_decode_unconditional): Likewise.
768 (arm_decode_miscellaneous): Likewise.
769 (arm_decode_dp_misc): Likewise.
770 (arm_decode_ld_st_word_ubyte): Likewise.
771 (arm_decode_media): Likewise.
772 (arm_decode_b_bl_ldmstm): Likewise.
773 (arm_decode_ext_reg_ld_st): Likewise.
774 (thumb2_decode_dp_shift_reg): Likewise.
775 (thumb2_decode_ext_reg_ld_st): Likewise.
776 (arm_decode_svc_copro): Likewise.
777 (thumb2_decode_svc_copro): Likewise.
778 (install_pc_relative): Likewise.
779 (thumb_copy_pc_relative_16bit): Likewise.
780 (thumb_decode_pc_relative_16bit): Likewise.
781 (thumb_copy_pc_relative_32bit): Likewise.
782 (thumb_copy_16bit_ldr_literal): Likewise.
783 (thumb_copy_cbnz_cbz): Likewise.
784 (thumb2_copy_table_branch): Likewise.
785 (cleanup_pop_pc_16bit_all): Likewise.
786 (thumb_copy_pop_pc_16bit): Likewise.
787 (thumb_process_displaced_16bit_insn): Likewise.
788 (decode_thumb_32bit_ld_mem_hints): Likewise.
789 (thumb_process_displaced_32bit_insn): Likewise.
790 (thumb_process_displaced_insn): Likewise.
791 (arm_process_displaced_insn): Likewise.
792 (arm_displaced_init_closure): Likewise.
793 (arm_displaced_step_fixup): Add cast for closure.
794 * arm-tdep.h: Include infrun.h.
795 (displaced_step_closure): Rename to ...
796 (arm_displaced_step_closure): ... this, extend
797 displaced_step_closure.
798 <u::svc::copy_svc_os>: Change type of parameter DSC.
799 <cleanup>: Likewise.
800 (arm_process_displaced_insn): Likewise.
801 (arm_displaced_init_closure): Likewise.
802 (displaced_read_reg): Likewise.
803 (displaced_write_reg): Likewise.
804 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
805 Adjust.
806 * i386-tdep.h: Include infrun.h.
807 (i386_displaced_step_closure): New typedef.
808 * i386-tdep.c (i386_displaced_step_copy_insn): Use
809 i386_displaced_step_closure.
810 (i386_displaced_step_fixup): Adjust.
811 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
812 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
813 and unique_ptr.
814 (ppc_displaced_step_fixup): Adjust.
815 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
816 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
817 and unique_ptr.
818 (s390_displaced_step_fixup): Adjust.
819
820 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
821
822 * interps.h (interp_resume, interp_suspend, interp_set_temp):
823 Remove declarations.
824
825 2017-10-20 Tom Tromey <tom@tromey.com>
826
827 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
828 std::vector.
829 (gdb_bfd_record_inclusion): Update.
830 (bfdp): Remove typedef.
831
832 2017-10-20 Tom Tromey <tom@tromey.com>
833
834 * gdb_bfd.c (gdb_bfd_ref): Use new.
835 (struct gdb_bfd_data): Add constructor, destructor, and member
836 initializers.
837 (gdb_bfd_unref): Use delete.
838
839 2017-10-20 Tom Tromey <tom@tromey.com>
840
841 * exec.c (exec_file_attach): Use new_bfd_ref.
842 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
843 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
844 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
845 new_bfd_ref.
846 * gdb_bfd.h (new_bfd_ref): New function.
847
848 2017-10-20 Pedro Alves <palves@redhat.com>
849
850 * main.c (captured_command_loop): Add attribute noinline.
851
852 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
853
854 * interps.c (struct interp_factory): Add constructor.
855 (interp_factory_p): Remove typedef.
856 (DEF_VEC_P(interp_factory_p)): Remove.
857 (interpreter_factories): Change type to std::vector.
858 (interp_factory_register): Adjust.
859 (interp_lookup): Adjust.
860 (interpreter_completer): Adjust.
861
862 2017-10-19 Tom Tromey <tom@tromey.com>
863
864 * break-catch-syscall.c (catch_syscall_completer): Use
865 std::string, gdb::unique_xmalloc_ptr.
866
867 2017-10-19 Tom Tromey <tom@tromey.com>
868
869 * infcall.c (call_function_by_hand_dummy): Use std::string.
870
871 2017-10-19 Tom Tromey <tom@tromey.com>
872
873 * mi/mi-main.c (mi_cmd_execute): Update.
874 * top.h (prepare_execute_command): Return scoped_value_mark.
875 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
876 Add move constructor.
877 * top.c (prepare_execute_command): Return scoped_value_mark.
878 (execute_command): Update.
879
880 2017-10-19 Pedro Alves <palves@redhat.com>
881
882 * xml-support.c (xml_fetch_content_from_file): Check fread's
883 return.
884
885 2017-10-19 Pedro Alves <palves@redhat.com>
886
887 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
888 async.
889 (handle_error_fd): New function.
890 (ser_base_async): Add/delete an event loop file handler for
891 error_fd.
892
893 2017-10-19 Pedro Alves <palves@redhat.com>
894
895 * xml-support.c (xml_fetch_content_from_file): Don't read in
896 chunks. Instead use fseek to determine the file's size, and read
897 it in one go.
898
899 2017-11-18 Keith Seitz <keiths@redhat.com>
900
901 * c-exp.y (oper): Canonicalize conversion operators of user-defined
902 types.
903 Add whitespace to front of type name.
904
905 2017-10-18 Keith Seitz <keiths@redhat.com>
906
907 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
908 DW_AT_accessibility.
909
910 2017-10-18 Yao Qi <yao.qi@linaro.org>
911
912 * features/tic6x-c62x-linux.c: Remove.
913
914 2017-10-17 Tom Tromey <tom@tromey.com>
915
916 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
917 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
918 (do_mixed_source_and_assembly): Likewise.
919
920 2017-10-17 Tom Tromey <tom@tromey.com>
921
922 * regcache.c (regcache::xfer_part): Remove assertion.
923
924 2017-10-17 Pedro Alves <palves@redhat.com>
925
926 * xml-support.c (xml_fetch_content_from_file): Call
927 unique_ptr::release() instead unique_ptr::get() when passing
928 through xrealloc.
929
930 2017-10-17 Yao Qi <yao.qi@linaro.org>
931
932 * regcache.c (regcache::xfer_part): Remove parameters read and
933 write, add parameter is_raw. All callers are updated.
934
935 2017-10-16 Keith Seitz <keiths@redhat.com>
936
937 * c-typeprint.c (enum access_specifier): Moved here from
938 c_type_print_base.
939 (output_access_specifier): New function.
940 (c_type_print_base): Consider typedefs when assessing
941 whether access labels are needed.
942 Use output_access_specifier as needed.
943 Output access specifier for typedefs, if needed.
944 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
945 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
946 fields.
947 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
948 accessor macros.
949
950 2017-10-16 Tom Tromey <tom@tromey.com>
951
952 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
953 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
954 * target.c (target_fileio_read_stralloc): Update.
955 * sparc64-tdep.c (adi_is_addr_mapped): Update.
956 * target.h (target_fileio_read_stralloc): Return
957 unique_xmalloc_ptr.
958
959 2017-10-16 Tom Tromey <tom@tromey.com>
960
961 * xml-syscall.c (xml_init_syscalls_info): Update.
962 * xml-support.c (xinclude_start_include): Update.
963 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
964 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
965 (xml_fetch_content_from_file): Likewise.
966 * osdata.c (get_osdata): Update.
967 * target.h (target_read_stralloc, target_get_osdata): Return
968 unique_xmalloc_ptr.
969 * solib-aix.c (solib_aix_get_library_list): Update.
970 * solib-target.c (solib_target_current_sos): Update.
971 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
972 * xml-tdesc.c (fetch_available_features_from_target): Update.
973 (target_fetch_description_xml): Update.
974 (file_read_description_xml): Update.
975 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
976 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
977 (remote_pid_to_exec_file): Update.
978 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
979 (target_get_osdata): Likewise.
980
981 2017-10-16 Tom Tromey <tom@tromey.com>
982
983 * remote.c (remote_register_number_and_offset): Use std::vector.
984 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
985 (putpkt_binary): Use gdb::def_vector.
986 (compare_sections_command): Use gdb::byte_vector.
987
988 2017-10-16 Tom Tromey <tom@tromey.com>
989
990 * ppc-linux-nat.c (hwdebug_insert_point): Use
991 gdb::unique_xmalloc_ptr, XDUP.
992
993 2017-10-16 Tom Tromey <tom@tromey.com>
994
995 * probe.c (parse_probes): Use std::string.
996 (info_probes_for_ops, enable_probes_command)
997 (disable_probes_command): Remove cleanups.
998
999 2017-10-16 Tom Tromey <tom@tromey.com>
1000
1001 * buildsym.c (block_compar): Remove.
1002 (end_symtab_get_static_block): Use std::vector.
1003
1004 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1005
1006 * memrange.h (struct mem_range): Define operator< and operator==.
1007 (mem_range_s): Remove.
1008 (DEF_VEC_O (mem_range_s)): Remove.
1009 (normalize_mem_ranges): Change parameter type to std::vector.
1010 * memrange.c (compare_mem_ranges): Remove.
1011 (normalize_mem_ranges): Change parameter type to std::vector,
1012 adjust to vector change.
1013 * exec.c (section_table_available_memory): Return vector, remove
1014 parameter.
1015 (section_table_read_available_memory): Adjust to std::vector
1016 change.
1017 * remote.c (remote_read_bytes): Adjust to std::vector
1018 change.
1019 * tracepoint.h (traceframe_available_memory): Change parameter
1020 type to std::vector.
1021 * tracepoint.c (traceframe_available_memory): Change parameter
1022 type to std::vector, adjust.
1023 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1024 std::vector change.
1025 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1026 unittests/memrange-selftests.c.
1027 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1028 * gdb/unittests/memrange-selftests.c: New file.
1029
1030 2017-10-16 Pedro Alves <palves@redhat.com>
1031
1032 * elfread.c (probe_key_free): Rename range-for variable.
1033 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1034 (find_probe_by_pc, collect_probes): Rename range-for variable.
1035
1036 2017-10-16 Yao Qi <yao.qi@linaro.org>
1037
1038 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1039 * features/tic6x-c62x.c: Remove.
1040 * features/tic6x-c64x-linux.c: Remove.
1041 * features/tic6x-c64x.c: Remove.
1042 * features/tic6x-c64xp-linux.c: Remove.
1043 * features/tic6x-c64xp.c: Remove.
1044 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1045 initialize_tdesc_tic6x_*_linux functions.
1046 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1047 initialize_tdesc_tic6x_* functions.
1048
1049 2017-10-16 Yao Qi <yao.qi@linaro.org>
1050
1051 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1052 tic6x-c62x.
1053 * regformats/tic6x-c62x.dat: Remove.
1054 * regformats/tic6x-c64x.dat: Remove.
1055 * regformats/tic6x-c64xp.dat: Remove.
1056
1057 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1058
1059 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1060 (the !HAVE_LIBEXPAT version).
1061
1062 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1063
1064 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1065 const.
1066
1067 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1068
1069 * target.h: Include tracepoint.h.
1070 (enum trace_find_type): Move to tracepoint.h.
1071 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1072 * tracepoint.h: Don't include target.h
1073 (enum trace_find_type): Move from target.h.
1074 (parse_traceframe_info): Return a unique ptr.
1075 * tracepoint.c (current_traceframe_info): Change type to unique
1076 ptr.
1077 (free_traceframe_info): Remove.
1078 (clear_traceframe_info): Don't manually free
1079 current_traceframe_info.
1080 (free_result): Remove.
1081 (parse_traceframe_info): Return a unique ptr.
1082 (get_traceframe_info): Adjust to unique ptr.
1083 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1084 * remote.c (remote_traceframe_info): Return a unique ptr.
1085 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1086 ptr.
1087 * target-debug.h (target_debug_print_traceframe_info_up): New
1088 macro.
1089 * target-delegates.c: Regenerate.
1090
1091 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1092
1093 * memrange.h (struct mem_range): Add constructors.
1094 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1095 std::vector<mem_range>.
1096 * tracepoint.c (free_traceframe_info): Don't manually free
1097 vector.
1098 (traceframe_info_start_memory): Adjust to vector change.
1099 (traceframe_available_memory): Likewise.
1100 * tracefile-tfile.c (build_traceframe_info): Likewise.
1101 * ctf.c (ctf_traceframe_info): Likewise.
1102
1103 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1104
1105 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1106 std::vector<int>.
1107 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1108 (traceframe_info_start_tvar): Adjust to vector change.
1109 (parse_traceframe_info): Allocate with new.
1110 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1111 vector change.
1112 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1113 change.
1114 tfile_traceframe_info): Allocate with new.
1115 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1116 change.
1117
1118 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1119
1120 * tracepoint.c (traceframe_info): Rename to...
1121 (current_traceframe_info): ...this.
1122 (clear_traceframe_info): Adjust.
1123 (get_traceframe_info): Adjust.
1124
1125 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1126
1127 * nat/linux-osdata.c: Include algorithm.
1128 (compare_processes): Remove.
1129 (struct pid_pgid_entry): New struct.
1130 (linux_xfer_osdata_processgroups): Use std::vector instead of
1131 XNEWVEC.
1132
1133 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1134
1135 * objfiles.h: Don't include symfile.h.
1136 (struct partial_symbol): Remove forward-declaration.
1137 (struct objfile) <global_psymbols, static_psymbols>: Change type
1138 to std::vector<partial_symbol *>.
1139 * objfiles.c (objfile::objfile): Don't memset those fields.
1140 (objfile::~objfile): Don't free those fields.
1141 * psympriv.h (struct psymbol_allocation_list): Remove
1142 forward-declaration.
1143 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1144 to std::vector.
1145 (start_psymtab_common): Change parameters to std::vector.
1146 * psymtab.c: Include algorithm.
1147 (require_partial_symbols): Call shrink_to_fit.
1148 (find_pc_sect_psymbol): Adjust to vector change.
1149 (match_partial_symbol): Likewise.
1150 (lookup_partial_symbol): Likewise.
1151 (psym_relocate): Likewise.
1152 (dump_psymtab): Likewise.
1153 (recursively_search_psymtabs): Likewise.
1154 (compare_psymbols): Remove.
1155 (sort_pst_symbols): Adjust to vector change.
1156 (start_psymtab_common): Likewise.
1157 (end_psymtab_common): Likewise.
1158 (psymbol_bcache_full): De-constify return value.
1159 (add_psymbol_to_bcache): Likewise.
1160 (extend_psymbol_list): Remove.
1161 (append_psymbol_to_list): Adjust to vector change.
1162 (add_psymbol_to_list): Likewise.
1163 (init_psymbol_list): Likewise.
1164 (maintenance_info_psymtabs): Likewise.
1165 (maintenance_check_psymtabs): Likewise.
1166 * symfile.h (struct psymbol_allocation_list): Remove.
1167 * symfile.c (reread_symbols): Adjust to vector change.
1168 * dbxread.c (start_psymtab): Change type of parameters.
1169 (dbx_symfile_read): Adjust to vector change.
1170 (read_dbx_symtab): Likewise.
1171 (start_psymtab): Change type of parameters.
1172 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1173 (create_partial_symtab): Likewise.
1174 (add_partial_symbol): Likewise.
1175 (write_one_signatured_type): Likewise.
1176 (recursively_write_psymbols): Likewise.
1177 * mdebugread.c (parse_partial_symbols): Likewise.
1178 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1179 (scan_xcoff_symtab): Adjust to vector change.
1180 (xcoff_initial_scan): Likewise.
1181
1182 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1183
1184 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1185
1186 2017-10-13 Yao Qi <yao.qi@linaro.org>
1187
1188 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1189 Remove s390x-*-expedite, add s390x-expedite.
1190
1191 2017-10-13 Yao Qi <yao.qi@linaro.org>
1192
1193 * features/s390-gs-linux64.c: Regenerated.
1194 * features/s390x-gs-linux64.c: Regenerated.
1195
1196 2017-10-13 Tom Tromey <tom@tromey.com>
1197
1198 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1199 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1200 delete.
1201 * symfile.c (symbol_file_add_with_addrs): Use new.
1202 (symbol_file_add_separate): Update comment.
1203 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1204 * jit.c (jit_object_close_impl): Use new.
1205 (jit_unregister_code): Use delete.
1206 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1207 (~objfile): Rename from free_objfile.
1208 (free_objfile_separate_debug, do_free_objfile_cleanup)
1209 (free_all_objfiles, objfile_purge_solibs): Use delete.
1210 * objfiles.h (struct objfile): Add constructor and destructor.
1211 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1212 (allocate_objfile, free_objfile): Don't declare.
1213 (struct objstats): Add initializers.
1214
1215 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1216
1217 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1218 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1219 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1220 * gdbarch.h: Regenerate.
1221 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1222 Adjust comment.
1223 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1224 (i386_displaced_step_fixup): Adjust comment.
1225 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1226
1227 2017-10-12 Tom Tromey <tom@tromey.com>
1228
1229 * prologue-value.h (pv_area::store_would_trash): Return bool.
1230 (pv_area::find_reg): Likewise.
1231 * prologue-value.c (pv_area::store_would_trash): Return bool.
1232 (pv_area::find_reg): Likewise.
1233
1234 2017-10-12 Tom Tromey <tom@tromey.com>
1235
1236 * s390-linux-tdep.c (s390_store, s390_load)
1237 (s390_check_for_saved, s390_analyze_prologue): Update.
1238 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1239 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1240 * prologue-value.h (class pv_area): Move from prologue-value.c.
1241 Change names of members. Add constructor, destructor, member
1242 functions.
1243 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1244 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1245 (pv_area_fetch, pv_area_scan): Don't declare.
1246 * prologue-value.c (struct pv_area::area_entry): Now member of
1247 pv_area.
1248 (struct pv_area): Move to prologue-value.h.
1249 (pv_area::pv_area): Rename from make_pv_area.
1250 (pv_area::~pv_area): Rename from free_pv_area.
1251 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1252 (clear_entries, find_entry, overlaps, store_would_trash, store)
1253 (fetch, find_reg, scan): Now member of pv_area.
1254 Remove "area" argument. Update.
1255 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1256 Update.
1257 * mn10300-tdep.c (push_reg, check_for_saved)
1258 (mn10300_analyze_prologue): Update.
1259 * mep-tdep.c (is_arg_spill, check_for_saved)
1260 (mep_analyze_prologue): Update.
1261 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1262 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1263 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1264 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1265 Update.
1266 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1267 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1268
1269 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1270
1271 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1272 * linux-nat.c (linux_nat_delete_thread): New variable.
1273 (lwp_free): Invoke linux_nat_delete_thread if set.
1274 (linux_nat_set_delete_thread): New function.
1275 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1276 thread delete callback.
1277 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1278 (_initialize_arm_linux_nat): Assign thread delete callback.
1279 * s390-linux-nat.c (s390_delete_thread): New function.
1280 (_initialize_s390_nat): Assign thread delete callback.
1281 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1282 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1283 function.
1284 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1285 declaration.
1286 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1287 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1288
1289 2017-10-09 Tom Tromey <tom@tromey.com>
1290
1291 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1292 std::string.
1293 * tui/tui-layout.c (enum tui_status): Use std::string.
1294
1295 2017-10-11 Tom Tromey <tom@tromey.com>
1296
1297 * gdbthread.h (thread_command): Constify.
1298 * inferior.h (detach_command): Constify.
1299 * top.h (set_history, show_history): Constify.
1300 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1301 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1302 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1303 * printcmd.c (set_command): Constify.
1304 (non_const_set_command): New function.
1305 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1306 * breakpoint.c (enable_command, disable_command, delete_command)
1307 (catch_command, tcatch_command, set_breakpoint_cmd)
1308 (show_breakpoint_cmd): Constify.
1309 * macrocmd.c (macro_command): Constify.
1310 * infcmd.c (unset_command, kill_command, detach_command)
1311 (info_proc_cmd): Constify.
1312 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1313 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1314 (info_auto_load_cmd): Constify.
1315 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1316 (unset_tdesc_cmd): Constify.
1317 * ada-lang.c (set_ada_command, show_ada_command)
1318 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1319 * guile/guile.c (set_guile_command, show_guile_command)
1320 (info_guile_command): Constify.
1321 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1322 Constify.
1323 * skip.c (skip_command): Constify.
1324 * compile/compile.c (_initialize_compile): Constify.
1325 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1326 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1327 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1328 (maint_btrace_pt_show_cmd): Constify.
1329 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1330 Constify.
1331 * python/python.c (user_show_python, user_set_python): Constify.
1332 * mips-tdep.c (set_mips_command, show_mips_command)
1333 (set_mipsfpu_command): Constify.
1334 * record-btrace.c (cmd_record_btrace_start)
1335 (cmd_set_record_btrace, cmd_show_record_btrace)
1336 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1337 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1338 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1339 Constify.
1340 * symfile.c (overlay_command): Constify.
1341 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1342 * cli/cli-logging.c (set_logging_command, show_logging_command):
1343 Constify.
1344 * cli/cli-dump.c (dump_command, append_command)
1345 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1346 (tekhex_dump_command, binary_dump_command)
1347 (binary_append_command): Constify.
1348 * cli/cli-decode.c (struct cmd_list_element): Change type of
1349 "fun".
1350 * cli/cli-cmds.c (info_command, show_command, set_debug)
1351 (show_debug): Constify.
1352 (show_command): Add non-const overload.
1353 * top.c (set_history, show_history): Constify.
1354 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1355 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1356 * target.c (target_command): Constify.
1357 * sparc64-tdep.c (info_adi_command): Constify.
1358 * record-full.c (cmd_record_full_start): Constify.
1359 (set_record_full_command): Constify. Fix typo.
1360 (show_record_full_command): Constify.
1361 * thread.c (thread_command, thread_apply_command): Constify.
1362 * memattr.c (dummy_cmd): Constify.
1363 * value.c (function_command): Constify.
1364 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1365 * probe.c (info_probes_command): Constify.
1366 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1367 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1368 (show_thread_cmd, set_thread_default_cmd)
1369 (show_thread_default_cmd): Constify.
1370 (check_empty): Constify.
1371 * tracepoint.c (tfind_command): Constify.
1372 * cp-support.c (maint_cplus_command): Constify.
1373 * windows-tdep.c (info_w32_command): Constify.
1374 * record.c (cmd_record_start, set_record_command)
1375 (show_record_command, info_record_command, cmd_record_goto):
1376 Constify.
1377 * ravenscar-thread.c (set_ravenscar_command)
1378 (show_ravenscar_command): Constify.
1379 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1380 Constify.
1381 (add_internal_problem_command): Remove casts.
1382 * arc-tdep.c (maintenance_print_arc_command): Constify.
1383 * valprint.c (set_print, show_print, set_print_raw)
1384 (show_print_raw): Constify.
1385 * maint.c (maintenance_command, maintenance_info_command)
1386 (maintenance_print_command, maintenance_set_cmd)
1387 (maintenance_show_cmd, set_per_command_cmd)
1388 (show_per_command_cmd, maintenance_check_command): Constify.
1389 * language.c (set_check, show_check): Constify.
1390 * typeprint.c (show_print_type, set_print_type): Constify.
1391 * go32-nat.c (go32_info_dos_command): Constify.
1392
1393 2017-10-11 Tom Tromey <tom@tromey.com>
1394
1395 * breakpoint.c (prepare_re_set_context): Remove.
1396 (breakpoint_re_set_one): Update. Don't use cleanups.
1397 (breakpoint_re_set): Use scoped_restore, std::string, and
1398 scoped_restore_current_language.
1399
1400 2017-10-11 Tom Tromey <tom@tromey.com>
1401
1402 * breakpoint.c (commands_command_1): Use std::string.
1403 (cleanup_executing_breakpoints): Remove.
1404 (bpstat_do_actions_1): Use scoped_restore.
1405 (bpstat_check_watchpoint): Use std::string.
1406 (decode_static_tracepoint_spec): Likewise.
1407 (break_range_command): Likewise.
1408 (watch_command_1): Likewise.
1409 (compare_breakpoints): Change argument types.
1410 (clear_command): Use std::vector.
1411 (cleanup_executing_breakpoints): Remove.
1412 (update_global_location_list): Use unique_xmalloc_ptr.
1413 (strace_command): Remove unused declaration.
1414
1415 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1416
1417 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1418 * NEWS: Mention new FreeBSD/arm native configuration.
1419 * configure.host: Add arm*-*-freebsd*.
1420 * configure.nat: Likewise.
1421 * arm-fbsd-nat.c: New file.
1422
1423 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1424
1425 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1426 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1427 * NEWS: Mention new FreeBSD/arm target.
1428 * configure.tgt: Add arm*-*-freebsd*.
1429 * arm-fbsd-tdep.c: New file.
1430 * arm-fbsd-tdep.h: New file.
1431
1432 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1433
1434 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1435 `gdbarch_elfcore_write_linux_prpsinfo'.
1436 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1437 method.
1438 (elf_internal_linux_prpsinfo): Remove declaration.
1439 * gdbarch.h: Regenerate.
1440 * gdbarch.c: Regenerate.
1441
1442 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1443
1444 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1445 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1446
1447 2017-10-11 Pedro Alves <palves@redhat.com>
1448
1449 * breakpoint.c (reattach_breakpoints): Delete.
1450 * breakpoint.h (reattach_breakpoints): Delete.
1451
1452 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1453
1454 * symfile.c (registered_sym_fns): Make struct, not typedef.
1455 (DEF_VEC_O (registered_sym_fns)): Remove.
1456 (symtab_fns): Change type to std::vector.
1457 (add_symtab_fns): Adjust.
1458 (find_sym_fns): Adjust.
1459
1460 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1461
1462 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1463 * arc-tdep.h (arc_arch_is_em): New function.
1464 (arc_arch_is_hs): Likewise.
1465
1466 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1467
1468 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1469 parentheses in the declaration.
1470 (macro_lookup_inclusion): Likewise.
1471 (macro_lookup_definition): Likewise.
1472 * p-lang.h (pascal_builtin_types): Likewise.
1473 * tui/tui-data.c (tui_win_list): Likewise.
1474 * tui/tui-data.h (tui_win_list): Likewise.
1475 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1476
1477 2017-10-11 Mark Rages <markrages@gmail.com>
1478
1479 * target-memory.c (block_boundaries): Fix for block address not
1480 aligned on block size.
1481
1482 2017-10-10 Pedro Alves <palves@redhat.com>
1483 Tom Tromey <tom@tromey.com>
1484
1485 * breakpoint.c (struct captured_breakpoint_query_args)
1486 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1487 (print_breakpoint): New.
1488 * breakpoint.h (print_breakpoint): Declare.
1489 * common/common-exceptions.h (enum return_reason): Remove
1490 references to catch_exceptions.
1491 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1492 Delete.
1493 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1494 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1495 * gdb.h: Delete.
1496 * gdbthread.h (thread_select): Declare.
1497 * mi/mi-cmd-break.c: Don't include gdb.h.
1498 (breakpoint_notify): Use print_breakpoint.
1499 * mi/mi-cmd-catch.c: Don't include gdb.h.
1500 * mi/mi-interp.c: Don't include gdb.h.
1501 (mi_print_breakpoint_for_event): New.
1502 (mi_breakpoint_created, mi_breakpoint_modified): Use
1503 mi_print_breakpoint_for_event.
1504 * mi/mi-main.c: Don't include gdb.h.
1505 (mi_cmd_thread_select): Parse the global thread ID here. Use
1506 thread_select instead of gdb_thread_select.
1507 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1508 of using gdb_list_thread_ids.
1509 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1510 FILEIO_ENOSYS here.
1511 (remote_fileio_request): Use TRY/CATCH instead of
1512 catch_exceptions.
1513 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1514 (symbol_file_add_from_memory_wrapper): Delete.
1515 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1516 * thread.c: Don't include gdb.h.
1517 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1518 (thread_alive): Use thread_select.
1519 (do_captured_thread_select): Delete, parts salvaged as ...
1520 (thread_select): ... this new function.
1521 (gdb_thread_select): Delete.
1522
1523 2017-10-10 Pedro Alves <palves@redhat.com>
1524 Tom Tromey <tom@tromey.com>
1525
1526 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1527 and reverse logic.
1528 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1529 No longer macros. Instead ...
1530 (enum wp_check_result): They're now values of this new
1531 enumeration.
1532 (watchpoint_check): Change return type to wp_check_result and
1533 parameter type to bpstat.
1534 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1535 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1536 catch_errors. Reverse logic of watchpoint_check call.
1537 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1538 pointer as parameter.
1539 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1540 * common/common-exceptions.c (throw_exception_sjlj): Update
1541 comments to avoid mentioning catch_errors.
1542 * exceptions.c (catch_errors): Delete.
1543 * exceptions.h: Update comments to avoid mentioning catch_errors.
1544 (catch_errors_ftype, catch_errors): Delete.
1545 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1546 (hook_stop_stub): Delete.
1547 (restore_selected_frame): Change return type to void, and
1548 parameter type to const frame_id &.
1549 (restore_infcall_control_state): Use TRY/CATCH instead of
1550 catch_errors.
1551 * main.c (captured_command_loop): Return void and remove
1552 parameter. Remove references to catch_errors.
1553 (captured_main): Use TRY/CATCH instead of catch_errors.
1554 * objc-lang.c (objc_submethod_helper_data)
1555 (find_objc_msgcall_submethod_helper): Delete.
1556 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1557 catch_errors.
1558 * record-full.c (record_full_message): Return void.
1559 (record_full_message_args, record_full_message_wrapper): Delete.
1560 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1561 instead of catch_errors.
1562 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1563 parameter type to int.
1564 * solib-darwin.c (open_symbol_file_object): Ditto.
1565 * solib-dsbt.c (open_symbol_file_object): Ditto.
1566 * solib-frv.c (open_symbol_file_object): Ditto.
1567 * solib-svr4.c (open_symbol_file_object): Ditto.
1568 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1569 * solib.c (update_solib_list): Use TRY/CATCH instead of
1570 catch_errors.
1571 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1572 Change type.
1573 * symmisc.c (struct print_symbol_args): Remove.
1574 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1575 (print_symbol): Change type.
1576 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1577 and remove parameters.
1578 (catch_errors): New.
1579 (get_windows_debug_event): Adjust.
1580
1581 2017-10-09 Tom Tromey <tom@tromey.com>
1582
1583 * mi/mi-main.c (free_splay_tree): Remove.
1584 (list_available_thread_groups): Use splay_tree_up.
1585 * common/gdb_splay_tree.h: New file.
1586
1587 2017-10-09 Tom Tromey <tom@tromey.com>
1588
1589 * mi/mi-main.c (do_nothing): Remove.
1590 (list_available_thread_groups): Update.
1591
1592 2017-10-09 Pedro Alves <palves@redhat.com>
1593
1594 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1595 reading registers when switching context.
1596
1597 2017-10-09 John Baldwin <jhb@FreeBSD.org>
1598
1599 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1600 (fbsd_convert_siginfo): Likewise.
1601 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1602
1603 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1604
1605 * configure.ac (try_guile_versions): Remove guile-2.2.
1606 * configure: Regenerate.
1607
1608 2017-10-09 Tom Tromey <tom@tromey.com>
1609
1610 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1611 (COMPILE.pre): Use $(CXX).
1612
1613 2017-10-09 Pedro Alves <palves@redhat.com>
1614
1615 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1616 Use bool.
1617 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1618 * cp-support.h (cp_remove_params): Now returns a
1619 gdb::unique_xmalloc_ptr.
1620 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1621 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1622 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1623 returning a gdb::unique_xmalloc_ptr.
1624 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1625 * stack.c (find_frame_funname): Adjust to cp_remove_params
1626 returning a gdb::unique_xmalloc_ptr.
1627
1628 2017-10-08 Tom Tromey <tom@tromey.com>
1629
1630 * dwarf2read.c (dwarf2_get_dwz_file): Use
1631 gdb::unique_xmalloc_ptr.
1632 (find_slot_in_mapped_hash): Likewise.
1633 (dwarf2_physname): Likewise.
1634 (create_dwo_unit_in_dwp_v1): Use std::string.
1635 (create_dwo_unit_in_dwp_v2): Likewise.
1636 (lookup_dwo_cutu): Likewise.
1637 (inherit_abstract_dies): Use std::vector.
1638 (read_array_type): Likewise.
1639 (dwarf_decode_macros): Remove unused declaration.
1640 (unsigned_int_compar): Remove.
1641 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1642 (psymtabs_addrmap_cleanup): Remove.
1643
1644 2017-10-08 Tom Tromey <tom@tromey.com>
1645
1646 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1647 * frame.h (frame_cleanup_after_sniffer): Declare.
1648 (frame_prepare_for_sniffer): Return void.
1649 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1650 type of argument.
1651 (frame_prepare_for_sniffer): Return void.
1652
1653 2017-10-08 Tom Tromey <tom@tromey.com>
1654
1655 * utils.h (make_cleanup_value_free): Remove.
1656 * utils.c (do_value_free, struct cleanup): Remove.
1657 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1658 Use gdb_value_up.
1659 * value.h (struct value_deleter): New.
1660 (gdb_value_up): New typedef.
1661
1662 2017-10-08 Tom Tromey <tom@tromey.com>
1663
1664 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1665 (make_cleanup_free_search_symbols): Remove.
1666 (search_symbols): Return std::vector.
1667 (symbol_search::compare_search_syms): Now member of
1668 symbol_search. Change arguments.
1669 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1670 (symtab_symbol_info, rbreak_command): Update.
1671 * symtab.h (struct symbol_search) <next>: Remove.
1672 Add constructors.
1673 (symbol_search::operator<): New function.
1674 (symbol_search::operator==): New function.
1675 (search_symbols): Remove std::vector.
1676 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1677 (symbol_search::compare_search_syms): Declare.
1678
1679 2017-10-06 Yao Qi <yao.qi@linaro.org>
1680
1681 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1682 arch/aarch64-insn.o.
1683 Remove one rule.
1684 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1685
1686 2017-10-06 Yao Qi <yao.qi@linaro.org>
1687
1688 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1689 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1690 arch/arm-linux.o respectively.
1691 * configure.tgt: Likewise.
1692
1693 2017-10-06 Yao Qi <yao.qi@linaro.org>
1694
1695 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1696 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1697
1698 2017-10-06 Pedro Alves <palves@redhat.com>
1699
1700 * windows-nat.c: Include <algorithm>.
1701
1702 2017-10-06 Yao Qi <yao.qi@linaro.org>
1703
1704 * configure.tgt (i386_tobjs): New variable.
1705 (amd64_tobjs): New variable.
1706 Set $cpu_obs and $os_obs.
1707
1708 2017-10-06 Yao Qi <yao.qi@linaro.org>
1709
1710 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1711 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1712 (clean): Remove object files and dependency files.
1713 (distclean): Remove the directory.
1714 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1715 * configure: Re-generated.
1716 * configure.tgt: Replace amd64.o with arch/amd64.o.
1717
1718 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1719
1720 PR build/22188
1721 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1722 and SETEND.
1723
1724 2017-10-05 Pedro Alves <palves@redhat.com>
1725
1726 * linux-nat.c (linux_child_follow_fork): When following the parent
1727 and detaching the child, consult the parent thread's architecture
1728 instead of the child's.
1729
1730 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1731
1732 * ax.h: Do not include "doublest.h".
1733 (union agent_val): Remove.
1734
1735 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1736
1737 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1738 (decimal_to_string): Return std::string object.
1739 (decimal_from_string): Accept std::string object. Return bool.
1740 (decimal_from_integral, decimal_from_doublest): Remove.
1741 (decimal_from_longest): Add prototype.
1742 (decimal_from_ulongest): Likewise.
1743 (decimal_to_longest): Likewise.
1744 (decimal_from_doublest): Likewise.
1745 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1746 (MAX_DECIMAL_STRING): Move here.
1747 (decimal_to_string): Return std::string object.
1748 (decimal_from_string): Accept std::string object. Return bool.
1749 (decimal_from_integral): Remove, replace by ...
1750 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1751 (decimal_to_longest): New function.
1752 (decimal_from_floating): Remove, replace by ...
1753 (decimal_from_doublest): ... this new function.
1754 (decimal_to_doublest): Update to new decimal_to_string interface.
1755
1756 * value.c (unpack_long): Use decimal_to_longest.
1757 * valops.c (value_cast): Use decimal_from_doublest instead of
1758 decimal_from_floating. Use decimal_from_[u]longest isntead of
1759 decimal_from_integral.
1760 * valarith.c (value_args_as_decimal): Likewise.
1761 * valprint.c (print_decimal_floating): Update to new
1762 decimal_to_string interface.
1763 * printcmd.c (printf_decfloat): Likewise.
1764 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1765
1766 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1767
1768 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1769 * gdbtypes.c: Include "floatformat.h".
1770 * value.c: Likewise.
1771 * m68k-tdep.c: Likewise.
1772
1773 * findvar.c: Do not include "floatformat.h".
1774 * amd64-darwin-tdep.c: Likewise.
1775 * arm-linux-tdep.c: Likewise.
1776 * i386-darwin-tdep.c: Likewise.
1777 * i387-tdep.c: Likewise.
1778 * m68k-linux-tdep.c: Likewise.
1779 * mep-tdep.c: Likewise.
1780 * mips-tdep.c: Likewise.
1781 * nios2-tdep.c: Likewise.
1782 * s390-linux-tdep.c: Likewise.
1783 * sparc-obsd-tdep.c: Likewise.
1784 * sparc-tdep.c: Likewise.
1785 * sparc64-tdep.c: Likewise.
1786 * spu-tdep.c: Likewise.
1787 * tic6x-tdep.c: Likewise.
1788 * tilegx-tdep.c: Likewise.
1789 * vax-tdep.c: Likewise.
1790 * xstormy16-tdep.c: Likewise.
1791 * xtensa-tdep.c: Likewise.
1792
1793 * top.c: Do not include "doublest.h".
1794 * aarch64-tdep.c: Likewise.
1795 * alpha-tdep.c: Likewise.
1796 * arm-linux-tdep.c: Likewise.
1797 * m68k-linux-tdep.c: Likewise.
1798 * tilegx-tdep.c: Likewise.
1799 * xstormy16-tdep.c: Likewise.
1800
1801 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1802
1803 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1804 (mipsn32_fbsd_sigframe): Define.
1805 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1806 for FreeBSD/mipsn32.
1807
1808 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1809
1810 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1811 AT_HWCAP.
1812
1813 2017-10-05 Tristan Gingold <tgingold@free.fr>
1814
1815 * MAINTAINERS (Misc): Update my email address.
1816
1817 2017-10-04 Pedro Alves <palves@redhat.com>
1818
1819 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1820 it instead of target_gdbarch.
1821 (get_remote_state, get_remote_packet_size): Adjust
1822 get_remote_arch_state calls, passing down target_gdbarch
1823 explicitly.
1824 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1825 'gdbarch' and use it instead of target_gdbarch.
1826 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1827 passing down target_gdbarch explicitly.
1828 (struct stop_reply) <arch>: New field.
1829 (remote_parse_stop_reply): Use the stopped thread's architecture,
1830 not the current inferior's. Save the architecture in the
1831 stop_reply.
1832 (process_stop_reply): Use the stop reply's architecture.
1833 (process_g_packet, remote_fetch_registers)
1834 (remote_prepare_to_store, store_registers_using_G)
1835 (remote_store_registers): Adjust get_remote_arch_state calls,
1836 using the regcache's architecture.
1837 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1838 passing down target_gdbarch explicitly.
1839 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1840 beneath instead of calling target_gdbarch.
1841 * target.c (default_thread_architecture): Use the specified
1842 inferior's architecture, instead of the current inferior's
1843 architecture (via target_gdbarch).
1844
1845 2017-10-04 Pedro Alves <palves@redhat.com>
1846
1847 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1848 case.
1849 (regcache_print): Handle !target_has_registers here instead.
1850
1851 2017-10-04 Pedro Alves <palves@redhat.com>
1852
1853 * frame.c (create_test_frame): Delete.
1854 * frame.h (create_test_frame): Delete.
1855 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1856 (class regcache_test): Delete.
1857 (test_target_has_registers, test_target_has_stack)
1858 (test_target_has_memory, test_target_prepare_to_store)
1859 (test_target_store_registers): New functions.
1860 (test_target_ops): New class.
1861 (register_to_value_test): Error out if there's already a
1862 process_stratum (or higher) target pushed. Create a fuller mock
1863 environment, with mock target_ops, inferior, address space, thread
1864 and inferior_ptid.
1865 * progspace.c (struct address_space): Move to ...
1866 * progspace.h (struct address_space): ... here.
1867 * regcache.h (regcache::~regcache, regcache::raw_write)
1868 [GDB_SELF_TEST]: No longer virtual.
1869
1870 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1871
1872 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1873
1874 2017-10-04 Pedro Alves <palves@redhat.com>
1875
1876 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1877 out of 'between TRY and CATCH'.
1878
1879 2017-10-04 Pedro Alves <palves@redhat.com>
1880
1881 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1882 * common/common-exceptions.h (TRY): Open an outermost scope.
1883 Expand intro comment.
1884 (CATCH): Reindent.
1885 (END_CATCH): Close the outermost scope.
1886 * completer.c (complete_line_internal): Add missing END_CATCH.
1887
1888 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1889
1890 * NEWS (Changes since GDB 8.0): Add entry about new
1891 'set-cwd-on-gdbserver' feature.
1892 (New remote packets): Add entry for QSetWorkingDir.
1893 * common/common-inferior.h (set_inferior_cwd): New prototype.
1894 * infcmd.c (set_inferior_cwd): Remove "static".
1895 (show_cwd_command): Expand text to include remote debugging.
1896 * remote.c: Add PACKET_QSetWorkingDir.
1897 (remote_protocol_features) <QSetWorkingDir>: New entry for
1898 PACKET_QSetWorkingDir.
1899 (extended_remote_set_inferior_cwd): New function.
1900 (extended_remote_create_inferior): Call
1901 "extended_remote_set_inferior_cwd".
1902 (_initialize_remote): Call "add_packet_config_cmd" for
1903 QSetWorkingDir.
1904
1905 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1906
1907 * NEWS (New commands): Mention "set/show cwd".
1908 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1909 "cd" command's help text.
1910 * common/common-inferior.h (get_inferior_cwd): New prototype.
1911 * infcmd.c (inferior_cwd_scratch): New global variable.
1912 (set_inferior_cwd): New function.
1913 (get_inferior_cwd): Likewise.
1914 (set_cwd_command): Likewise.
1915 (show_cwd_command): Likewise.
1916 (_initialize_infcmd): Add "set/show cwd" commands.
1917 * inferior.h (class inferior) <cwd>: New field.
1918 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1919 (fork_inferior): Change inferior's cwd before its execution.
1920 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1921 to CreateProcess.
1922
1923 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1924
1925 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1926 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1927 (COMMON_OBS): Add gdb_tilde_expand.o.
1928 * common/gdb_tilde_expand.c: New file.
1929 * common/gdb_tilde_expand.h: Likewise.
1930
1931 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1932
1933 * gdbarch.sh (objfile): Remove duplicate declaration.
1934 * gdbarch.h: Regenerate.
1935
1936 2017-10-03 Tom Tromey <tom@tromey.com>
1937
1938 * utils.c (internal_vproblem): Use string_vprintf.
1939
1940 2017-10-03 Tom Tromey <tom@tromey.com>
1941
1942 * printcmd.c (info_symbol_command): Use std::string.
1943
1944 2017-10-03 Tom Tromey <tom@tromey.com>
1945
1946 * top.c (gdb_safe_append_history): Use std::string.
1947
1948 2017-10-03 Tom Tromey <tom@tromey.com>
1949
1950 * event-top.c (stdin_event_handler): Update.
1951 * main.c (captured_main_1): Update.
1952 * top.h (make_delete_ui_cleanup): Remove.
1953 (struct ui): Add constructor and destructor.
1954 (new_ui, delete_ui): Remove.
1955 * top.c (make_delete_ui_cleanup): Remove.
1956 (new_ui_command): Use std::unique_ptr.
1957 (delete_ui_cleanup): Remove.
1958 (ui::ui): Rename from new_ui. Update.
1959 (free_ui): Remove.
1960 (ui::~ui): Rename from delete_ui. Update.
1961
1962 2017-10-03 Tom Tromey <tom@tromey.com>
1963
1964 * symfile.c (load_progress): Use gdb::byte_vector.
1965
1966 2017-10-03 Tom Tromey <tom@tromey.com>
1967
1968 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1969 declaration.
1970 * printcmd.c (x_command): Remove unused declaration.
1971 * symfile.c (symbol_file_command): Remove unused declaration.
1972
1973 2017-10-03 Tom Tromey <tom@tromey.com>
1974
1975 * utils.c (internal_vproblem): Use std::string.
1976 (defaulted_query): Likewise.
1977
1978 2017-10-03 Tom Tromey <tom@tromey.com>
1979
1980 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1981 * top.c (execute_command_to_string): Update.
1982 * utils.c (make_cleanup_restore_page_info): Remove.
1983 (do_restore_page_info_cleanup): Remove.
1984 (set_batch_flag_and_restore_page_info):
1985 New.
1986 (make_cleanup_restore_page_info): Remove.
1987 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1988 (~set_batch_flag_and_restore_page_info): New
1989 (make_cleanup_restore_uinteger): Remove.
1990 (make_cleanup_restore_integer): Remove.
1991 (struct restore_integer_closure): Remove.
1992 (restore_integer): Remove.
1993 * utils.h (struct set_batch_flag_and_restore_page_info): New
1994 class.
1995 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1996 (make_cleanup_restore_page_info): Remove.
1997 (make_cleanup_restore_uinteger) Remove.
1998 (make_cleanup_restore_integer) Remove.
1999
2000 2017-10-03 Tom Tromey <tom@tromey.com>
2001
2002 * record-full.h (record_full_gdb_operation_disable_set): Return
2003 scoped_restore_tmpl<int>.
2004 * infrun.c (adjust_pc_after_break): Update.
2005 (handle_signal_stop): Update.
2006 * record-full.c (record_full_gdb_operation_disable_set): Return
2007 scoped_restore_tmpl<int>.
2008 (record_full_wait_1, record_full_insert_breakpoint)
2009 (record_full_remove_breakpoint, record_full_save)
2010 (record_full_goto_insn): Update.
2011
2012 2017-10-02 Tom Tromey <tom@tromey.com>
2013
2014 PR rust/22236:
2015 * rust-lang.c (rust_val_print_str): New function.
2016 (val_print_struct): Call it.
2017 (rust_subscript): Preserve name of slice type.
2018
2019 2017-10-02 Tom Tromey <tom@tromey.com>
2020
2021 * rust-lang.c (rust_subscript): Handle slices in
2022 EVAL_AVOID_SIDE_EFFECTS case.
2023
2024 2017-10-02 Tom Tromey <tom@tromey.com>
2025
2026 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2027
2028 2017-10-02 Tom Tromey <tom@tromey.com>
2029
2030 * rust-lang.h (rust_slice_type): Add "extern".
2031
2032 2017-10-02 Tom Tromey <tom@tromey.com>
2033 Pedro Alves <palves@redhat.com>
2034
2035 * ada-lang.h (ada_exc_info::operator<): Make const.
2036 (ada_exc_info::operator==): Make const.
2037 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2038 Make const.
2039
2040 2017-09-29 Tom Tromey <tom@tromey.com>
2041
2042 * target.c (read_whatever_is_readable): Change type of "result".
2043 Update.
2044 (free_memory_read_result_vector): Remove.
2045 (read_memory_robust): Change return type. Update.
2046 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2047 bin2hex, std::string.
2048 * target.h (memory_read_result_s): Remove typedef.
2049 (free_memory_read_result_vector): Remove.
2050 (read_memory_robust): Return std::vector.
2051
2052 2017-09-29 Tom Tromey <tom@tromey.com>
2053
2054 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2055
2056 2017-09-29 Tom Tromey <tom@tromey.com>
2057
2058 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2059 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2060 operator< and operator==.
2061 (ada_exceptions_list): Return a std::vector.
2062 * ada-lang.c (ada_exc_info::operator<): Rename from
2063 compare_ada_exception_info.
2064 (ada_exc_info::operator==): New.
2065 (sort_remove_dups_ada_exceptions_list): Change type of
2066 "exceptions".
2067 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2068 (ada_add_global_exceptions): Likewise.
2069 (ada_exceptions_list_1): Return a std::vector.
2070 (ada_exceptions_list): Likewise.
2071
2072 2017-09-29 Tom Tromey <tom@tromey.com>
2073
2074 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2075 'std::set *'.
2076 (print_one_inferior): Update.
2077 (free_vector_of_ints): Remove.
2078 (list_available_thread_groups): Change "ids" to std::set.
2079 (mi_cmd_list_thread_groups): Update.
2080 (struct collect_cores_data) <core>: Now a std::set.
2081 (collect_cores): Update.
2082 (unique): Remove.
2083 (print_one_inferior): Update.
2084
2085 2017-09-29 Tom Tromey <tom@tromey.com>
2086
2087 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2088 (mi_execute_async_cli_command): Likewise.
2089 (mi_cmd_trace_frame_collected): Use field_fmt.
2090
2091 2017-09-29 Tom Tromey <tom@tromey.com>
2092
2093 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2094 gdb::byte_vector.
2095
2096 2017-09-29 Tom Tromey <tom@tromey.com>
2097
2098 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2099
2100 2017-09-29 Tom Tromey <tom@tromey.com>
2101
2102 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2103
2104 2017-09-29 Tom Tromey <tom@tromey.com>
2105
2106 * varobj.h (varobj_gen_name): Return std::string.
2107 * varobj.c (varobj_gen_name): Return std::string.
2108 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2109 (mi_cmd_var_delete): Don't copy "name".
2110
2111 2017-09-29 Tom Tromey <tom@tromey.com>
2112
2113 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2114 (mi_cmd_break_insert_1): Update.
2115
2116 2017-09-29 Tom Tromey <tom@tromey.com>
2117
2118 * target.h (make_scoped_defer_target_commit_resume): Update.
2119 * target.c (make_scoped_defer_target_commit_resume): Rename from
2120 make_cleanup_defer_target_commit_resume. Return a
2121 scoped_restore.
2122 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2123
2124 2017-09-29 Tom Tromey <tom@tromey.com>
2125
2126 * main.c (captured_main_1): Remove unused declaration.
2127 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2128
2129 2017-09-29 Tom Tromey <tom@tromey.com>
2130
2131 * symtab.c (search_symbols): Remove unused outer cleanup.
2132 (make_source_files_completion_list): Remove unused declaration.
2133
2134 2017-09-29 Tom Tromey <tom@tromey.com>
2135
2136 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2137
2138 2017-09-29 Tom Tromey <tom@tromey.com>
2139
2140 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2141 gdb::byte_vector.
2142
2143 2017-09-29 Tom Tromey <tom@tromey.com>
2144
2145 * complaints.c (vcomplaint): Use std::string.
2146
2147 2017-09-29 Tom Tromey <tom@tromey.com>
2148
2149 * tracepoint.c (trace_variable_command): Use std::string.
2150 (encode_actions_1): Remove unused declarations.
2151 (create_tsv_from_upload): Use std::string.
2152
2153 2017-09-29 Tom Tromey <tom@tromey.com>
2154
2155 * cp-support.c (gdb_demangle): Use std::string.
2156
2157 2017-09-29 Tom Tromey <tom@tromey.com>
2158
2159 * stack.c (parse_frame_specification): Use std::string
2160 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2161
2162 2017-09-29 Tom Tromey <tom@tromey.com>
2163
2164 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2165
2166 2017-09-29 Tom Tromey <tom@tromey.com>
2167
2168 * utils.c (vfprintf_maybe_filtered): Use std::string.
2169 (vfprintf_unfiltered): Likewise.
2170
2171 2017-09-29 Tom Tromey <tom@tromey.com>
2172
2173 * event-top.c (top_level_prompt): Return std::string.
2174 (display_gdb_prompt): Update.
2175
2176 2017-09-29 Tom Tromey <tom@tromey.com>
2177
2178 * unittests/common-utils-selftests.c (format): New function.
2179 (string_vprintf_tests): New function.
2180 (_initialize_common_utils_selftests): Register new tests.
2181 * common/common-utils.c (string_vprintf): New function.
2182 * common/common-utils.h (string_vprintf): Declare.
2183
2184 2017-09-29 Pedro Alves <palves@redhat.com>
2185
2186 * common/rsp-low.c (unpack_varlen_hex): Constify.
2187 * common/rsp-low.h (unpack_varlen_hex): Constify.
2188 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2189 Constify.
2190 * remote.c (remote_set_permissions, read_ptid)
2191 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2192 (remote_static_tracepoint_marker_at)
2193 (remote_static_tracepoint_markers_by_strid)
2194 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2195 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2196 (parse_tracepoint_definition, parse_tsv_definition)
2197 (parse_static_tracepoint_marker_definition): Constify.
2198 * tracepoint.h (parse_static_tracepoint_marker_definition)
2199 (parse_trace_status, parse_tracepoint_status)
2200 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2201
2202 2017-09-29 Pedro Alves <palves@redhat.com>
2203
2204 * remote.c (target_buf, target_buf_size): Delete.
2205 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2206 Use the connection's packet buffer instead.
2207 All callers adjusted.
2208 (_initialize_remote): Remove references to target_buf and
2209 target_buf_size.
2210
2211 2017-09-28 Pedro Alves <palves@redhat.com>
2212
2213 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2214 unittests/common-utils-selftests.c.
2215 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2216 (COMMON_OBS): Remove utils-selftests.o.
2217 * utils-selftests.c: Move to ...
2218 * unittests/common-utils-selftests.c: ... here and rename self
2219 test to "string_printf".
2220
2221 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2222
2223 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2224 having NULL cus or tus.
2225
2226 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2227
2228 * arm-tdep.c: (convert_from_extended): Remove.
2229 (convert_to_extended): Likewise.
2230 (arm_extract_return_value): Use convert_typed_floating.
2231 (arm_store_return_value): Likewise.
2232
2233 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2234 * sh-tdep.c: Do not include "floatformat.h".
2235 (sh_littlebyte_bigword_type): New function.
2236 (sh_register_convert_to_virtual): Use convert_typed_floating.
2237 (sh_register_convert_to_raw): Likewise.
2238 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2239 (sh64_littlebyte_bigword_type): New function.
2240 (sh64_extract_return_value): Use convert_typed_floating.
2241 (sh64_register_convert_to_virtual): Likewise.
2242 (sh64_register_convert_to_raw): Likewise.
2243
2244 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2245
2246 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2247 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2248
2249 * gdbtypes.h (union type_specific): Make field floatformat hold
2250 just a single struct floatformat, not an array.
2251 (floatformat_from_type): Move here.
2252 * gdbtypes.c (floatformat_from_type): Move here. Update to
2253 changed TYPE_FLOATFORMAT definition.
2254 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2255 (recursive_dump_type): Likewise.
2256 (init_float_type): Install correct floatformat for byte order.
2257 (arch_float_type): Likewise.
2258
2259 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2260
2261 * gdbtypes.c (init_type): Change incoming argument from
2262 length-in-bytes to length-in-bits. Assert length is a
2263 multiple of TARGET_CHAR_BITS.
2264 (arch_type, arch_flags_type): Likewise.
2265 (init_integer_type): Update call to init_type.
2266 (init_character_type): Likewise.
2267 (init_boolean_type): Likewise.
2268 (init_float_type): Likewise.
2269 (init_decfloat_type): Likewise.
2270 (init_complex_type): Likewise.
2271 (init_pointer_type): Likewise.
2272 (objfile_type): Likewise.
2273 (arch_integer_type): Update call to arch_type.
2274 (arch_character_type): Likewise.
2275 (arch_boolean_type): Likewise.
2276 (arch_float_type): Likewise.
2277 (arch_decfloat_type): Likewise.
2278 (arch_complex_type): Likewise.
2279 (arch_pointer_type): Likewise.
2280 (gdbtypes_post_init): Likewise.
2281
2282 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2283 (read_base_type): Likewise.
2284 * mdebugread.c (basic_type): Likewise.
2285 * stabsread.c (dbx_init_float_type): Likewise.
2286 (rs6000_builtin_type): Likewise.
2287 (read_range_type): Likewise. Also, fix call to init_integer_type
2288 with erroneous length argument.
2289
2290 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2291 * d-lang.c (build_d_types): Likewise.
2292 * f-lang.c (build_fortran_types): Likewise.
2293 * go-lang.c (build_go_types): Likewise.
2294 * opencl-lang.c (build_opencl_types): Likewise.
2295 * jit.c (finalize_symtab): Likewise.
2296 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2297 (build_std_type_info_type): Likewise.
2298 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2299 update call to arch_flags_type.
2300
2301 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2302 arch_type.
2303 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2304 * windows-tdep.c (windows_get_tlb_type): Likewise.
2305
2306 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2307 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2308 * m32c-tdep.c (make_types): Likewise.
2309 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2310 (rl78_psw_type): Update call to arch_flags_type.
2311 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2312 * rx-tdep.c (rx_psw_type): Likewise.
2313 (rx_fpsw_type): Likewise.
2314 * sparc-tdep.c (sparc_psr_type): Likewise.
2315 (sparc_fsr_type): Likewise.
2316 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2317 (sparc64_ccr_type): Likewise.
2318 (sparc64_fsr_type): Likewise.
2319 (sparc64_fprs_type): Likewise.
2320
2321 2017-09-27 Tom Tromey <tom@tromey.com>
2322
2323 * findcmd.c (find_command): Constify.
2324
2325 2017-09-27 Tom Tromey <tom@tromey.com>
2326
2327 * ada-tasks.c (task_command_1, task_command): Constify.
2328
2329 2017-09-27 Tom Tromey <tom@tromey.com>
2330
2331 * symtab.c (maintenance_print_symbol_cache)
2332 (maintenance_flush_symbol_cache)
2333 (maintenance_print_symbol_cache_statistics): Constify.
2334
2335 2017-09-27 Tom Tromey <tom@tromey.com>
2336
2337 * inferior.c (detach_inferior_command, kill_inferior_command)
2338 (inferior_command): Constify.
2339
2340 2017-09-27 Tom Tromey <tom@tromey.com>
2341
2342 * regcache.c (regcache_print, maintenance_print_registers)
2343 (maintenance_print_raw_registers)
2344 (maintenance_print_cooked_registers)
2345 (maintenance_print_register_groups)
2346 (maintenance_print_remote_registers): Constify.
2347
2348 2017-09-27 Tom Tromey <tom@tromey.com>
2349
2350 * printcmd.c (map_display_numbers, undisplay_command)
2351 (enable_disable_display_command, enable_display_command)
2352 (disable_display_command): Constify.
2353
2354 2017-09-27 Tom Tromey <tom@tromey.com>
2355
2356 * breakpoint.h (delete_command): Don't declare.
2357 * breakpoint.c (delete_command, enable_once_command)
2358 (enable_count_command, enable_delete_command, breakpoint_1)
2359 (maintenance_info_breakpoints, stopin_command, stopat_command)
2360 (delete_command, delete_trace_command, save_breakpoints)
2361 (save_breakpoints_command, save_tracepoints_command): Constify.
2362
2363 2017-09-27 Tom Tromey <tom@tromey.com>
2364
2365 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2366 (skip_ws, extract_identifier, macro_define_command)
2367 (macro_undef_command, macro_list_command): Constify.
2368
2369 2017-09-27 Tom Tromey <tom@tromey.com>
2370
2371 * infcmd.c (environment_info, set_environment_command)
2372 (unset_environment_command, path_info, info_proc_cmd_1)
2373 (info_proc_cmd_mappings, info_proc_cmd_stat)
2374 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2375 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2376
2377 2017-09-27 Tom Tromey <tom@tromey.com>
2378
2379 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2380 Constify.
2381
2382 2017-09-27 Tom Tromey <tom@tromey.com>
2383
2384 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2385
2386 2017-09-27 Tom Tromey <tom@tromey.com>
2387
2388 * demangle.c (demangle_command): Constify.
2389
2390 2017-09-27 Tom Tromey <tom@tromey.com>
2391
2392 * progspace.c (maintenance_info_program_spaces_command):
2393 Constify.
2394
2395 2017-09-27 Tom Tromey <tom@tromey.com>
2396
2397 * compile/compile.c (check_raw_argument, compile_file_command)
2398 (compile_code_command, compile_print_command): Constify.
2399
2400 2017-09-27 Tom Tromey <tom@tromey.com>
2401
2402 * reggroups.c (maintenance_print_reggroups): Constify.
2403
2404 2017-09-27 Tom Tromey <tom@tromey.com>
2405
2406 * dwarf2read.c (save_gdb_index_command): Constify.
2407
2408 2017-09-27 Tom Tromey <tom@tromey.com>
2409
2410 * stap-probe.c (info_probes_stap_command): Constify.
2411
2412 2017-09-27 Tom Tromey <tom@tromey.com>
2413
2414 * fork-child.c (unset_exec_wrapper_command): Constify.
2415
2416 2017-09-27 Tom Tromey <tom@tromey.com>
2417
2418 * btrace.c (get_uint, get_context_size, no_chunk)
2419 (maint_btrace_packet_history_cmd)
2420 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2421 (maint_info_btrace_cmd): Constify.
2422
2423 2017-09-27 Tom Tromey <tom@tromey.com>
2424
2425 * reverse.c (delete_bookmark_command): Constify.
2426
2427 2017-09-27 Tom Tromey <tom@tromey.com>
2428
2429 * remote.c (set_memory_packet_size)
2430 (set_memory_write_packet_size, show_memory_write_packet_size)
2431 (set_memory_read_packet_size, show_memory_read_packet_size)
2432 (compare_sections_command, packet_command, remote_put_command)
2433 (remote_get_command, remote_delete_command): Constify.
2434
2435 2017-09-27 Tom Tromey <tom@tromey.com>
2436
2437 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2438 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2439 (set_mipsfpu_auto_command): Constify.
2440
2441 2017-09-27 Tom Tromey <tom@tromey.com>
2442
2443 * cli/cli-cmds.h (cd_command): Constify.
2444 * cli/cli-cmds.c (cd_command): Constify.
2445
2446 2017-09-27 Tom Tromey <tom@tromey.com>
2447
2448 * thread.c (thread_name_command, thread_find_command): Constify.
2449
2450 2017-09-27 Tom Tromey <tom@tromey.com>
2451
2452 * probe.c (enable_probes_command, disable_probes_command):
2453 Constify.
2454
2455 2017-09-27 Tom Tromey <tom@tromey.com>
2456
2457 * symfile.c (symbol_file_command): Constify.
2458 * gdbcore.h (deprecated_file_changed_hook): Constify.
2459 * exec.c (deprecated_file_changed_hook, exec_file_command)
2460 (file_command): Constify.
2461 * defs.h (symbol_file_command): Constify.
2462
2463 2017-09-27 Tom Tromey <tom@tromey.com>
2464
2465 * remote-fileio.c (set_system_call_allowed)
2466 (show_system_call_allowed): Constify.
2467
2468 2017-09-27 Tom Tromey <tom@tromey.com>
2469
2470 * tracepoint.c (delete_trace_variable_command)
2471 (tfind_end_command, tfind_start_command, tfind_pc_command)
2472 (tfind_tracepoint_command, tfind_line_command)
2473 (tfind_range_command, tfind_outside_command): Constify.
2474
2475 2017-09-27 Tom Tromey <tom@tromey.com>
2476
2477 * ax-gdb.c (maint_agent_printf_command, agent_command)
2478 (agent_eval_command): Constify.
2479
2480 2017-09-27 Tom Tromey <tom@tromey.com>
2481
2482 * tracepoint.c (info_scope_command): Constify.
2483 * python/python.c (gdbpy_decode_line): Constify.
2484 * python/py-breakpoint.c (bppy_init): Constify.
2485 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2486 * location.h: (new_linespec_location)
2487 (string_to_event_location_basic, string_to_event_location):
2488 Constify.
2489 * location.c (new_linespec_location)
2490 (string_to_event_location_basic, string_to_event_location):
2491 Constify.
2492 * linespec.h (decode_line_with_current_source)
2493 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2494 * linespec.c (linespec_lex_to_end)
2495 (decode_line_with_current_source)
2496 (decode_line_with_last_displayed): Constify.
2497 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2498 Constify.
2499 * cli/cli-cmds.c (edit_command, list_command): Constify.
2500 * breakpoint.h (until_break_command, watch_command_wrapper)
2501 (awatch_command_wrapper, rwatch_command_wrapper)
2502 (init_ada_exception_breakpoint): Constify.
2503 * breakpoint.c (break_command_1, dprintf_command)
2504 (break_range_command, watch_command_wrapper)
2505 (rwatch_command_wrapper, awatch_command_wrapper)
2506 (until_break_command, init_ada_exception_breakpoint)
2507 (strace_marker_create_sals_from_location, trace_command)
2508 (ftrace_command, strace_command, struct tracepoint): Constify.
2509 * ax-gdb.c (agent_command_1): Constify.
2510 * ada-lang.c (ada_exception_sal): Constify.
2511
2512 2017-09-27 Tom Tromey <tom@tromey.com>
2513
2514 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2515 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2516 (get_context_size, no_chunk, get_insn_history_modifiers)
2517 (cmd_record_insn_history, get_call_history_modifiers)
2518 (cmd_record_call_history): Constify.
2519
2520 2017-09-27 Tom Tromey <tom@tromey.com>
2521
2522 * source.c (show_substitute_path_command)
2523 (unset_substitute_path_command, set_substitute_path_command):
2524 Constify.
2525
2526 2017-09-27 Tom Tromey <tom@tromey.com>
2527
2528 * typeprint.c (maintenance_print_type): Constify.
2529 * maint.c (maintenance_dump_me, maintenance_demangle)
2530 (maintenance_time_display, maintenance_info_sections)
2531 (maintenance_print_statistics, maintenance_deprecate)
2532 (maintenance_undeprecate): Constify.
2533 (maintenance_do_deprecate): Constify. Use std::string.
2534 (maintenance_selftest): Constify.
2535 * gdbtypes.h (maintenance_print_type): Constify.
2536
2537 2017-09-27 Tom Tromey <tom@tromey.com>
2538
2539 * hppa-tdep.c (unwind_command): Constify.
2540
2541 2017-09-27 Tom Tromey <tom@tromey.com>
2542
2543 * target-descriptions.c (unset_tdesc_filename_cmd)
2544 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2545 Constify.
2546
2547 2017-09-27 Tom Tromey <tom@tromey.com>
2548
2549 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2550
2551 2017-09-27 Tom Tromey <tom@tromey.com>
2552
2553 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2554
2555 2017-09-27 Tom Tromey <tom@tromey.com>
2556
2557 * tui/tui-regs.c (tui_reg_command): Constify.
2558
2559 2017-09-27 Tom Tromey <tom@tromey.com>
2560
2561 * skip.c (skip_file_command, skip_function_command)
2562 (skip_enable_command, skip_disable_command, skip_delete_command):
2563 Constify.
2564
2565 2017-09-27 Tom Tromey <tom@tromey.com>
2566
2567 * record-btrace.c (cmd_record_btrace_bts_start)
2568 (cmd_record_btrace_pt_start): Constify.
2569
2570 2017-09-27 Tom Tromey <tom@tromey.com>
2571
2572 * symmisc.c (maintenance_print_symbols)
2573 (maintenance_print_msymbols, maintenance_print_objfiles)
2574 (maintenance_info_symtabs, maintenance_check_symtabs)
2575 (maintenance_expand_symtabs, maintenance_info_line_tables):
2576 Constify.
2577
2578 2017-09-27 Tom Tromey <tom@tromey.com>
2579
2580 * top.c (new_ui_command): Constify.
2581
2582 2017-09-27 Tom Tromey <tom@tromey.com>
2583
2584 * symfile.c (add_symbol_file_command)
2585 (remove_symbol_file_command, list_overlays_command)
2586 (map_overlay_command, unmap_overlay_command)
2587 (overlay_auto_command, overlay_manual_command)
2588 (overlay_off_command, overlay_load_command): Constify.
2589
2590 2017-09-27 Tom Tromey <tom@tromey.com>
2591
2592 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2593 (info_spu_mailbox_command, info_spu_dma_command)
2594 (info_spu_proxydma_command): Constify.
2595
2596 2017-09-27 Tom Tromey <tom@tromey.com>
2597
2598 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2599
2600 2017-09-27 Tom Tromey <tom@tromey.com>
2601
2602 * cli/cli-script.c (user_defined_command): Constify.
2603
2604 2017-09-27 Tom Tromey <tom@tromey.com>
2605
2606 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2607 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2608 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2609 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2610 (dump_binary_value, append_binary_memory, append_binary_value):
2611 Constify.
2612 (struct dump_context) <func>: Constify.
2613 (add_dump_command): Update.
2614
2615 2017-09-27 Tom Tromey <tom@tromey.com>
2616
2617 * cli/cli-cmds.c (show_version, show_configuration)
2618 (source_command, show_user): Constify.
2619
2620 2017-09-27 Tom Tromey <tom@tromey.com>
2621
2622 * target.c (maintenance_print_target_stack): Constify.
2623
2624 2017-09-27 Tom Tromey <tom@tromey.com>
2625
2626 * interps.c (interpreter_exec_cmd): Constify.
2627
2628 2017-09-27 Tom Tromey <tom@tromey.com>
2629
2630 * record-full.c (cmd_record_full_restore): Constify.
2631
2632 2017-09-27 Tom Tromey <tom@tromey.com>
2633
2634 * memattr.c (enable_mem_command, disable_mem_command)
2635 (delete_mem_command): Constify.
2636
2637 2017-09-27 Tom Tromey <tom@tromey.com>
2638
2639 * value.c (show_convenience): Constify.
2640
2641 2017-09-27 Tom Tromey <tom@tromey.com>
2642
2643 * gdbcore.h (core_file_command): Update.
2644 * corefile.c (core_file_command): Constify.
2645
2646 2017-09-27 Tom Tromey <tom@tromey.com>
2647
2648 * user-regs.c (maintenance_print_user_registers): Constify.
2649
2650 2017-09-27 Tom Tromey <tom@tromey.com>
2651
2652 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2653
2654 2017-09-27 Tom Tromey <tom@tromey.com>
2655
2656 * cp-support.c (first_component_command): Constify.
2657
2658 2017-09-27 Tom Tromey <tom@tromey.com>
2659
2660 * psymtab.c (maintenance_print_psymbols)
2661 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2662 Constify.
2663
2664 2017-09-27 Tom Tromey <tom@tromey.com>
2665
2666 * windows-tdep.c (display_tib): Constify.
2667
2668 2017-09-27 Tom Tromey <tom@tromey.com>
2669
2670 * linux-fork.c (delete_checkpoint_command)
2671 (detach_checkpoint_command): Constify.
2672
2673 2017-09-27 Tom Tromey <tom@tromey.com>
2674
2675 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2676
2677 2017-09-27 Tom Tromey <tom@tromey.com>
2678
2679 * arc-tdep.c (dump_arc_instruction_command): Constify.
2680
2681 2017-09-27 Tom Tromey <tom@tromey.com>
2682
2683 * valprint.c (set_radix, show_radix): Constify.
2684
2685 2017-09-27 Tom Tromey <tom@tromey.com>
2686
2687 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2688
2689 2017-09-27 Tom Tromey <tom@tromey.com>
2690
2691 * command.h (not_just_help_class_command): Update.
2692 * cli/cli-decode.h (not_just_help_class_command): Update.
2693 * cli/cli-decode.c (not_just_help_class_command): Constify.
2694
2695 2017-09-27 Tom Tromey <tom@tromey.com>
2696
2697 * gdb_bfd.c (maintenance_info_bfds): Constify.
2698
2699 2017-09-27 Tom Tromey <tom@tromey.com>
2700
2701 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2702 overloads.
2703 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2704 (do_const_cfunc): New function.
2705 (cmd_cfunc_eq): New overload.
2706 (cli_user_command_p): Check do_const_cfunc.
2707 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2708 const_cfunc.
2709 * command.h (add_cmd): Add const overload and no-function
2710 overload.
2711 (set_cmd_cfunc): Add const overload.
2712 (cmd_const_cfunc_ftype): Declare.
2713 (cmd_cfunc_eq): Add const overload.
2714 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2715 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2716 overload.
2717
2718 2017-09-27 Tom Tromey <tom@tromey.com>
2719
2720 * macroexp.c (get_next_token_for_substitution): New function.
2721 (substitute_args): Call it. Check for __VA_OPT__.
2722
2723 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2724 Pedro Alves <palves@redhat.com>
2725
2726 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2727 producer_is_icc_lt_14.
2728 (producer_is_icc_lt_14): New function.
2729 (check_producer): Add code for checking version of ICC.
2730 (producer_is_icc): Move to producer.c.
2731 (read_structure_type): Restrict ICC workaround to ICC<14.
2732 * producer.c: Include selftest.h.
2733 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2734 New functions.
2735 * producer.h (producer_is_icc): New declaration.
2736
2737 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2738
2739 * Makefile.in (SFILES): Add producer.c.
2740 (COMMON_OBS): Add producer.o
2741 * amd64-tdep.c (producer.h): Add new include.
2742 * dwarf2read.c (producer.h): Add new include.
2743 * producer.c: New file.
2744 * producer.h: New file.
2745 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2746 producer.c.
2747 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2748 producer.h.
2749
2750 2017-09-26 Matthias Klose <doko@ubuntu.com>
2751
2752 * configure.ac: Search ncursesw before ncurses.
2753 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2754 * gdb_curses.h: Include <ncursesw/ncurses.h>
2755 * config.in, configure: Regenerate.
2756
2757 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2758
2759 PR gdb/22185
2760 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2761 obsolete.
2762 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2763 Remove i386sol2 support.
2764 * configure.nat <i386sol2>: Remove.
2765 <sol2-64>: Fold into ...
2766 <sol2>: ... this.
2767 Move common settings to default section.
2768 Add sol-thread.o.
2769 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2770 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2771 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2772 <i[34567]86-*-solaris*>: Remove.
2773 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2774
2775 * configure.ac: Remove wctype in libw check.
2776 (_MSE_INT_H): Don't define on Solaris 7-9.
2777 <solaris*>: Remove libthread_db.so.1 check.
2778 * configure: Regenerate.
2779 * config.in: Regenerate.
2780
2781 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2782 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2783 (gdb_ps_size_t): Remove.
2784 Use base types in users.
2785 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2786
2787 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2788
2789 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2790
2791 PR build/22206
2792 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2793 (adi_is_addr_mapped): Likewise.
2794 (PSR_ICC): Don't redefine.
2795 (PSR_IMPL): Likewise.
2796
2797 2017-09-25 Tom Tromey <tom@tromey.com>
2798
2799 * regcache.c (regcache::dump): Use string_printf.
2800
2801 2017-09-25 Tom Tromey <tom@tromey.com>
2802
2803 * regcache.c (class regcache_invalidator): New.
2804 (struct register_to_invalidate): Remove.
2805 (make_cleanup_regcache_invalidate): Remove.
2806 (regcache::raw_write): Use regcache_invalidator.
2807
2808 2017-09-25 Tom Tromey <tom@tromey.com>
2809
2810 * spu-tdep.c (spu2ppu_sniffer): Update.
2811 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2812 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2813 Remove.
2814 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2815 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2816 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2817 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2818 (frame_pop): Update.
2819
2820 2017-09-25 Tom Tromey <tom@tromey.com>
2821
2822 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2823 * regcache.h (regcache_xfree): Don't declare.
2824 * regcache.c (regcache_xfree): Remove.
2825 (do_regcache_xfree): Use delete.
2826 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2827 * linux-fork.c (free_fork): Use delete.
2828 (fork_save_infrun_state): Likewise.
2829 * jit.c (jit_dealloc_cache): Use delete.
2830 * infrun.c (discard_infcall_suspend_state): Use delete.
2831
2832 2017-09-25 Tom Tromey <tom@tromey.com>
2833
2834 * regcache.h (regcache_xmalloc): Don't declare.
2835 (regcache_raw_set_cached_value): Update comment.
2836 * regcache.c (regcache_xmalloc): Remove.
2837 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2838 * jit.c (jit_frame_sniffer): Use new.
2839 * frame.c (frame_save_as_regcache): Use new.
2840
2841 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2842
2843 * NEWS: Advertise support for guarded-storage registers on IBM z.
2844
2845 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2846
2847 * s390-linux-nat.c (have_regset_gs): New static variable.
2848 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2849 control block and guarded-storage broadcast control regsets.
2850 (s390_read_description): Detect whether the target has
2851 guarded-storage support, return appropriate tdesc.
2852 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2853 (features/s390x-gs-linux64.c): Likewise.
2854 (struct gdbarch_tdep) <have_gs>: New field.
2855 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2856 (s390_gsbc_regset): New variables.
2857 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2858 and s390_gsbc_regset, if applicable.
2859 (s390_core_read_description): Check whether core file was from a
2860 target with guarded-storage support; include appropriate regsets.
2861 (s390_gdbarch_init): Add registers for guarded-storage support.
2862 (_initialize_s390_tdep): Initialize new target descriptions that
2863 include registers for guarded-storage support.
2864 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2865 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2866 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2867 (S390_NUM_REGS): Adjust macro definition.
2868 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2869 (tdesc_s390x_gs_linux64): New declarations.
2870
2871 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2872
2873 * features/s390-gs-linux64.xml: New file.
2874 * features/s390-gs.xml: New file.
2875 * features/s390-gsbc.xml: New file.
2876 * features/s390x-gs-linux64.xml: New file.
2877 * features/Makefile (WHICH): Add s390-gs-linux64 and
2878 s390x-gs-linux64.
2879 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2880 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2881 * features/s390-gs-linux64.c: New generated file.
2882 * features/s390x-gs-linux64.c: New file.
2883 * regformats/s390-gs-linux64.dat: New file.
2884 * regformats/s390x-gs-linux64.dat: New file.
2885
2886 2017-09-23 Tom Tromey <tom@tromey.com>
2887
2888 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2889
2890 2017-09-22 Tom Tromey <tom@tromey.com>
2891
2892 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2893 type to scoped_restore_tmpl.
2894 <scoped_input_handler>: Initialize m_quit_handler directly.
2895
2896 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2897
2898 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2899 (cd_command): Likewise. Free "current_directory" before
2900 assigning to it.
2901 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2902 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2903 * top.c (gdb_dirbuf): Remove global declaration.
2904 * top.h (gdb_dirbuf): Likewise.
2905
2906 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2907
2908 * gnulib/aclocal.m4: Regenerate.
2909 * gnulib/config.in: Regenerate.
2910 * gnulib/configure: Regenerate.
2911 * gnulib/import/Makefile.am: Regenerate.
2912 * gnulib/import/Makefile.in: Regenerate.
2913 * gnulib/import/assure.h: New file.
2914 * gnulib/import/at-func.c: Likewise
2915 * gnulib/import/chdir-long.c: New file.
2916 * gnulib/import/chdir-long.h: New file.
2917 * gnulib/import/cloexec.c: New file.
2918 * gnulib/import/cloexec.h: New file.
2919 * gnulib/import/close.c: New file.
2920 * gnulib/import/closedir.c: New file.
2921 * gnulib/import/dirent-private.h: New file.
2922 * gnulib/import/dup-safer.c: New file.
2923 * gnulib/import/dup.c: New file.
2924 * gnulib/import/dup2.c: New file.
2925 * gnulib/import/error.c: New file.
2926 * gnulib/import/error.h: New file.
2927 * gnulib/import/exitfail.c: New file.
2928 * gnulib/import/exitfail.h: New file.
2929 * gnulib/import/fchdir.c: New file.
2930 * gnulib/import/fcntl.c: New file.
2931 * gnulib/import/fcntl.in.h: New file.
2932 * gnulib/import/fd-hook.c: New file.
2933 * gnulib/import/fd-hook.h: New file.
2934 * gnulib/import/fd-safer.c: New file.
2935 * gnulib/import/fdopendir.c: New file.
2936 * gnulib/import/filename.h: New file.
2937 * gnulib/import/filenamecat-lgpl.c: New file.
2938 * gnulib/import/filenamecat.h: New file.
2939 * gnulib/import/fstat.c: New file.
2940 * gnulib/import/fstatat.c: New file.
2941 * gnulib/import/getcwd-lgpl.c: New file.
2942 * gnulib/import/getcwd.c: New file.
2943 * gnulib/import/getdtablesize.c: New file.
2944 * gnulib/import/getlogin_r.c: New file.
2945 * gnulib/import/getprogname.c: New file.
2946 * gnulib/import/getprogname.h: New file.
2947 * gnulib/import/gettext.h: New file.
2948 * gnulib/import/glob-libc.h: New file.
2949 * gnulib/import/glob.c: New file.
2950 * gnulib/import/glob.in.h: New file.
2951 * gnulib/import/intprops.h: New file.
2952 * gnulib/import/m4/chdir-long.m4: New file.
2953 * gnulib/import/m4/close.m4: New file.
2954 * gnulib/import/m4/closedir.m4: New file.
2955 * gnulib/import/m4/d-ino.m4: New file.
2956 * gnulib/import/m4/d-type.m4: New file.
2957 * gnulib/import/m4/dup.m4: New file.
2958 * gnulib/import/m4/dup2.m4: New file.
2959 * gnulib/import/m4/error.m4: New file.
2960 * gnulib/import/m4/fchdir.m4: New file.
2961 * gnulib/import/m4/fcntl.m4: New file.
2962 * gnulib/import/m4/fcntl_h.m4: New file.
2963 * gnulib/import/m4/fdopendir.m4: New file.
2964 * gnulib/import/m4/filenamecat.m4: New file.
2965 * gnulib/import/m4/fstat.m4: New file.
2966 * gnulib/import/m4/fstatat.m4: New file.
2967 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2968 * gnulib/import/m4/getcwd-path-max.m4: New file.
2969 * gnulib/import/m4/getcwd.m4: New file.
2970 * gnulib/import/m4/getdtablesize.m4: New file.
2971 * gnulib/import/m4/getlogin_r.m4: New file.
2972 * gnulib/import/m4/getprogname.m4: New file.
2973 * gnulib/import/m4/glob.m4: New file.
2974 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2975 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2976 * gnulib/import/m4/mempcpy.m4: New file.
2977 * gnulib/import/m4/memrchr.m4: New file.
2978 * gnulib/import/m4/mode_t.m4: New file.
2979 * gnulib/import/m4/msvc-inval.m4: New file.
2980 * gnulib/import/m4/msvc-nothrow.m4: New file.
2981 * gnulib/import/m4/open.m4: New file.
2982 * gnulib/import/m4/openat.m4: New file.
2983 * gnulib/import/m4/opendir.m4: New file.
2984 * gnulib/import/m4/readdir.m4: New file.
2985 * gnulib/import/m4/realloc.m4: New file.
2986 * gnulib/import/m4/rewinddir.m4: New file.
2987 * gnulib/import/m4/save-cwd.m4: New file.
2988 * gnulib/import/m4/strdup.m4: New file.
2989 * gnulib/import/m4/strerror.m4: New file.
2990 * gnulib/import/m4/unistd-safer.m4: New file.
2991 * gnulib/import/mempcpy.c: New file.
2992 * gnulib/import/memrchr.c: New file.
2993 * gnulib/import/msvc-inval.c: New file.
2994 * gnulib/import/msvc-inval.h: New file.
2995 * gnulib/import/msvc-nothrow.c: New file.
2996 * gnulib/import/msvc-nothrow.h: New file.
2997 * gnulib/import/open.c: New file.
2998 * gnulib/import/openat-die.c: New file.
2999 * gnulib/import/openat-priv.h: New file.
3000 * gnulib/import/openat-proc.c: New file.
3001 * gnulib/import/openat.c: New file.
3002 * gnulib/import/openat.h: New file.
3003 * gnulib/import/opendir.c: New file.
3004 * gnulib/import/pipe-safer.c: New file.
3005 * gnulib/import/readdir.c: New file.
3006 * gnulib/import/realloc.c: New file.
3007 * gnulib/import/rewinddir.c: New file.
3008 * gnulib/import/save-cwd.c: New file.
3009 * gnulib/import/save-cwd.h: New file.
3010 * gnulib/import/strdup.c: New file.
3011 * gnulib/import/strerror-override.c: New file.
3012 * gnulib/import/strerror-override.h: New file.
3013 * gnulib/import/strerror.c: New file.
3014 * gnulib/import/unistd--.h: New file.
3015 * gnulib/import/unistd-safer.h: New file.
3016 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3017 "getcwd" and "glob".
3018 * ser-tcp.c: Undefine "close" before redefining it.
3019
3020 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3021
3022 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3023 get rid of res_val.
3024
3025 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3026
3027 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3028 <sol2,sparc>: Likewise.
3029 <sol2-64,i386>: Likewise.
3030
3031 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3032 -Wdeprecated-declarations on *-*-solaris*.
3033 * configure: Regenerate.
3034
3035 * procfs.c: Include "nat/inferior.h".
3036 (procfs_info_proc): Fix typo.
3037
3038 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3039
3040 * remote.c (vector): Include.
3041 (struct private_thread_info): Add field, thread_handle.
3042 (free_private_thread_info): Deallocate storage associated with
3043 thread handle.
3044 (get_private_info_thread): Initialize `thread_handle' field.
3045 (struct thread_item): Add field, thread_handle.
3046 (clear_threads_listing_context): Deallocate storage associated
3047 with thread handle.
3048 (start_thread): Add support for "handle" attribute.
3049 (thread_attributes): Add "handle".
3050 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3051 field.
3052 (remote_update_thread_list): Update thread_handle.
3053 (remote_thread_handle_to_thread_info): New function.
3054 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3055
3056 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3057
3058 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3059 function.
3060 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3061 * python/python-internal.h (thread_object_type): Declare.
3062
3063 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3064
3065 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3066 (target_thread_handle_to_thread_info): Declare.
3067 * target.c (target_thread_handle_to_thread_info): New function.
3068 * target-delegates.c: Regenerate.
3069 * gdbthread.h (find_thread_by_handle): Declare.
3070 * thread.c (find_thread_by_handle): New function.
3071 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3072 function.
3073 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3074
3075 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3076
3077 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3078
3079 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3080
3081 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3082
3083 2017-09-21 Yao Qi <yao.qi@linaro.org>
3084
3085 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3086 to gdb_target_obs.
3087
3088 2017-09-20 Tom Tromey <tom@tromey.com>
3089
3090 * breakpoint.c (struct counted_command_line): Remove.
3091 (breakpoint_commands): Update.
3092 (alloc_counted_command_line, incref_counted_command_line)
3093 (decref_counted_command_line, do_cleanup_counted_command_line)
3094 (make_cleanup_decref_counted_command_line): Remove.
3095 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3096 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3097 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3098 (save_breakpoints): Update.
3099 * breakpoint.h (counted_command_line): Now a typedef to
3100 shared_ptr.
3101 (struct breakpoint) <commands>: Now a counted_command_line.
3102 (struct bpstats) <command>: Likewise.
3103
3104 2017-09-20 Tom Tromey <tom@tromey.com>
3105
3106 * breakpoint.c (struct commands_info, do_map_commands_command):
3107 Remove.
3108 (commands_command_1): Update.
3109 (iterate_over_related_breakpoints): Take a function_view.
3110 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3111 (delete_command): Update.
3112 (map_breakpoint_numbers): Take a function_view.
3113 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3114 (disable_command): Update.
3115 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3116 (enable_command): Update.
3117 (struct disp_data, do_enable_breakpoint_disp)
3118 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3119 (do_map_enable_delete_breakpoint): Remove.
3120 (enable_once_command, enable_count_command, enable_delete_command)
3121 (delete_trace_variable_command): Update.
3122
3123 2017-09-20 Tom Tromey <tom@tromey.com>
3124
3125 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3126 (bpstat_clear): Use delete.
3127 (bpstats): New constructors.
3128 (bpstat_copy, bpstat_stop_status): Use new.
3129 (dprintf_after_condition_true): Update.
3130 * breakpoint.h (bpstats::bpstats): Add constructors.
3131 (bpstats::~bpstats): Add destructor.
3132
3133 2017-09-20 Pedro Alves <palves@redhat.com>
3134
3135 * eval.c (make_params): Delete, refactored as ...
3136 (class fake_method): ... this new type's ctor.
3137 (fake_method::~fake_method): New.
3138 (evaluate_subexp_standard): Use 'fake_method'.
3139
3140 2017-09-20 Tom Tromey <tom@tromey.com>
3141
3142 * windows-nat.c (get_windows_debug_event, windows_wait)
3143 (do_initial_windows_stuff, windows_attach): Update.
3144 * utils.c (vwarning, internal_vproblem): Update.
3145 (ui_unregister_input_event_handler_cleanup)
3146 (prepare_to_handle_input): Remove.
3147 (class scoped_input_handler): New.
3148 (defaulted_query, prompt_for_continue): Update.
3149 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3150 Update.
3151 * top.c (undo_terminal_modifications_before_exit): Update.
3152 * target/target.h (target_terminal_init, target_terminal_inferior)
3153 (target_terminal_ours): Don't declare.
3154 (class target_terminal): New.
3155 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3156 (target_terminal_ours_for_output)
3157 (make_cleanup_restore_target_terminal): Don't declare.
3158 (target_terminal_info): Remove.
3159 * target.c (enum terminal_state, terminal_state): Remove.
3160 (target_terminal::terminal_state): Define.
3161 (target_terminal::init): Rename from target_terminal_init.
3162 (target_terminal::inferior): Rename from
3163 target_terminal_inferior.
3164 (target_terminal::ours): Rename from target_terminal_ours.
3165 (target_terminal::ours_for_output): Rename from
3166 target_terminal_ours_for_output.
3167 (target_terminal::info): New method.
3168 (cleanup_restore_target_terminal)
3169 (make_cleanup_restore_target_terminal): Remove.
3170 * solib.c (handle_solib_event): Update.
3171 * remote.c (remote_serial_quit_handler): Update.
3172 (remote_terminal_inferior, remote_wait_as): Update.
3173 * record-full.c (record_full_wait_1): Update.
3174 * nto-procfs.c (procfs_create_inferior): Update.
3175 * nat/fork-inferior.c (startup_inferior): Update.
3176 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3177 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3178 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3179 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3180 (mi_breakpoint_created, mi_breakpoint_deleted)
3181 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3182 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3183 (mi_user_selected_context_changed, report_initial_inferior):
3184 Update.
3185 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3186 (linux_nat_terminal_inferior): Update.
3187 * infrun.c (follow_fork_inferior)
3188 (handle_vfork_child_exec_or_exit, do_target_resume)
3189 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3190 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3191 Update.
3192 * inflow.c (child_terminal_init, info_terminal_command): Update.
3193 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3194 (attach_command): Update.
3195 * infcall.c (call_thread_fsm_should_stop): Update.
3196 * gnu-nat.c (gnu_attach): Update.
3197 * extension.c (struct active_ext_lang_state)
3198 (restore_active_ext_lang): Update.
3199 * exceptions.c (print_flush): Update.
3200 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3201 (struct quit_handler_cleanup_data, restore_quit_handler)
3202 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3203 Remove.
3204 * cp-support.c (gdb_demangle): Update.
3205 * breakpoint.c (update_inserted_breakpoint_locations)
3206 (insert_breakpoint_locations, handle_jit_event)
3207 (disable_breakpoints_in_unloaded_shlib): Update.
3208 * annotate.c (annotate_breakpoints_invalid)
3209 (annotate_frames_invalid): Update.
3210
3211 2017-09-20 Tom Tromey <tom@tromey.com>
3212
3213 * main.c (catch_command_errors): Rename from
3214 catch_command_errors_const.
3215 (captured_main_1): Update.
3216
3217 2017-09-20 Pedro Alves <palves@redhat.com>
3218
3219 * cli/cli-cmds.c (list_command): Use print_sal_location.
3220 (print_sal_location): New function.
3221 (ambiguous_line_spec): Use print_sal_location.
3222 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3223 * symtab.c (find_function_start_sal): Likewise.
3224 * symtab.h (symtab_and_line::symbol): New field.
3225
3226 2017-09-20 Pedro Alves <palves@redhat.com>
3227
3228 * linespec.c (minsym_found): Handle non-text minsyms.
3229 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3230
3231 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3232
3233 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3234 backslash.
3235
3236 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3237
3238 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3239 vmovups instead vmovaps.
3240 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3241
3242 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3243
3244 * NEWS (Changes since GDB 8.0): Add starti.
3245 * infcmd.c (enum run_break): New.
3246 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3247 case.
3248 (run_command): Use enum run_how.
3249 (start_command): Likewise.
3250 (starti_command): New function.
3251 (RUN_ARGS_HELP): New macro.
3252 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3253 commands. Add starti command.
3254
3255 2017-09-19 Yao Qi <yao.qi@linaro.org>
3256
3257 * Makefile.in (monitor.o): Remove the rule.
3258
3259 2017-09-19 Yao Qi <yao.qi@linaro.org>
3260
3261 * annotate.h (struct annotate_arg_emitter): Use
3262 DISABLE_COPY_AND_ASSIGN.
3263 * common/refcounted-object.h (refcounted_object): Likewise.
3264 * completer.h (struct completion_result): Likewise.
3265 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3266 * filename-seen-cache.h (filename_seen_cache): Likewise.
3267 * gdbcore.h (thread_section_name): Likewise.
3268 * gdb_regex.h (compiled_regex): Likewise.
3269 * gdbthread.h (scoped_restore_current_thread): Likewise.
3270 * inferior.h (scoped_restore_current_inferior): Likewise.
3271 * jit.c (jit_reader): Likewise.
3272 * linespec.h (struct linespec_result): Likewise.
3273 * mi/mi-parse.h (struct mi_parse): Likewise.
3274 * nat/fork-inferior.c (execv_argv): Likewise.
3275 * progspace.h (scoped_restore_current_program_space): Likewise.
3276 * python/python-internal.h (class gdbpy_enter): Likewise.
3277 * regcache.h (regcache): Likewise.
3278 * target-descriptions.c (struct tdesc_reg): Likewise.
3279 (struct tdesc_type): Likewise.
3280 (struct tdesc_feature): Likewise.
3281 * ui-out.h (ui_out_emit_type): Likewise.
3282
3283 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3284
3285 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3286 label abort_expression.
3287
3288 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3289
3290 * common/buffer.c (buffer_xml_printf): Adjust.
3291 * common/xml-utils.c (xml_escape_text): Change return type to
3292 std::string, update code accordingly.
3293 * common/xml-utils.h (xml_escape_text): Change return type to
3294 std::string.
3295 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3296 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3297 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3298 Adjust.
3299
3300 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3301
3302 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3303 (SUBDIR_UNITTESTS_OBS): Add new object file.
3304 * unittests/xml-utils-selftests.c: New file.
3305
3306 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3307
3308 * common/selftest.h (selftest): New struct/interface.
3309 (register_test): Add name parameter, add new overload.
3310 (run_tests): Add filter parameter.
3311 (for_each_selftest_ftype): New typedef.
3312 (for_each_selftest): New declaration.
3313 * common/selftest.c (tests): Change type to
3314 map<string, unique_ptr<selftest>>.
3315 (simple_selftest): New struct.
3316 (register_test): New function.
3317 (register_test): Add name parameter and use it.
3318 (run_tests): Add filter parameter and use it. Add prints.
3319 Adjust to vector -> map change.
3320 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3321 registering selftests.
3322 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3323 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3324 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3325 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3326 * findvar.c (_initialize_findvar): Likewise.
3327 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3328 * maint.c (maintenance_selftest): Update call to run_tests.
3329 (maintenance_info_selftests): New function.
3330 (_initialize_maint_cmds): Register "maintenance info selftests"
3331 command. Update "maintenance selftest" doc.
3332 * regcache.c (_initialize_regcache): Add names when registering
3333 selftests.
3334 * rust-exp.y (_initialize_rust_exp): Likewise.
3335 * selftest-arch.c (gdbarch_selftest): New struct.
3336 (gdbarch_tests): Remove.
3337 (register_test_foreach_arch): Add name parameter. Call
3338 register_test.
3339 (tests_with_arch): Remove, move most content to
3340 gdbarch_selftest::operator().
3341 (_initialize_selftests_foreach_arch): Remove.
3342 * selftest-arch.h (register_test_foreach_arch): Add name
3343 parameter.
3344 (run_tests_with_arch): New declaration.
3345 * utils-selftests.c (_initialize_utils_selftests): Add names
3346 when registering selftests.
3347 * utils.c (_initialize_utils): Likewise.
3348 * unittests/array-view-selftests.c
3349 (_initialize_array_view_selftests): Likewise.
3350 * unittests/environ-selftests.c (_initialize_environ_selftests):
3351 Likewise.
3352 * unittests/function-view-selftests.c
3353 (_initialize_function_view_selftests): Likewise.
3354 * unittests/offset-type-selftests.c
3355 (_initialize_offset_type_selftests): Likewise.
3356 * unittests/optional-selftests.c
3357 (_initialize_optional_selftests): Likewise.
3358 * unittests/scoped_restore-selftests.c
3359 (_initialize_scoped_restore_selftests): Likewise.
3360 * NEWS: Document "maintenance selftest" and "maint info
3361 selftests".
3362
3363 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3366 scoped_restore.
3367
3368 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3369
3370 * mi/mi-main.c (mi_load_progress): Make uiout variable
3371 a unique_ptr.
3372
3373 2017-09-15 Pedro Alves <palves@redhat.com>
3374
3375 * compile/compile-c-types.c (convert_enum, convert_int)
3376 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3377
3378 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3379
3380 * dwarf2read.c (copy_string): Remove.
3381 (parse_macro_definition): Replace copy_string with savestring.
3382
3383 2017-09-15 Yao Qi <yao.qi@linaro.org>
3384
3385 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3386 gdb_target_obs.
3387 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3388 Likewise.
3389 (i[34567]86-*-linux*): Likewise.
3390
3391 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3392
3393 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3394 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3395 <stack>: Change type to std::vector.
3396 <stack_len, stack_allocated>: Remove.
3397 <grow_stack>: Remove.
3398 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3399 (dwarf_expr_context::~dwarf_expr_context): Remove.
3400 (dwarf_expr_context::grow_stack): Remove.
3401 (dwarf_expr_context::push): Adjust.
3402 (dwarf_expr_context::pop): Adjust.
3403 (dwarf_expr_context::fetch): Adjust.
3404 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3405 (dwarf_expr_context::stack_empty_p): Adjust.
3406 (dwarf_expr_context::execute_stack_op): Adjust.
3407
3408 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3409
3410 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3411 return type to bool.
3412 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3413
3414 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3415
3416 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3417 Change type to bool.
3418 (dwarf_stack_value) <in_stack_memory>: Likewise.
3419 (dwarf_expr_context) <push_address>: Change parameter type to
3420 bool.
3421 <fetch_in_stack_memory>: Change return type to bool.
3422 <push>: Change parameter type to bool.
3423 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3424 to bool.
3425 (dwarf_expr_context::push_address): Likewise.
3426 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3427 to bool.
3428 (dwarf_expr_context::execute_stack_op): Adjust.
3429 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3430
3431 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3432
3433 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3434 (struct dwarf_expr_context) <n_pieces>: Remove.
3435 <pieces>: Change type to std::vector.
3436 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3437 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3438 pieces.
3439 (dwarf_expr_context::add_piece): Adjust.
3440 * dwarf2loc.c (struct piece_closure): Initialize fields.
3441 <n_pieces>: Remove.
3442 <pieces>: Change type to std::vector.
3443 (allocate_piece_closure): Adjust, change parameter to
3444 std::vector rvalue and std::move it to piece_closure.
3445 (rw_pieced_value): Adjust.
3446 (check_pieced_synthetic_pointer): Adjust.
3447 (indirect_synthetic_pointer): Adjust.
3448 (coerce_pieced_ref): Adjust.
3449 (free_pieced_value_closure): Adjust. Use delete to free
3450 piece_closure.
3451 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3452 to allocate_piece_closure.
3453 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3454
3455 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3456
3457 * probe.h (probe_ops_cp): Remove typedef.
3458 (DEF_VEC_P (probe_ops_cp)): Remove.
3459 (all_probe_ops): Change type to std::vector.
3460 * probe.c (info_probes_for_ops): Adjust to vector change.
3461 (probe_linespec_to_ops): Likewise.
3462 (all_probe_ops): Change type to std::vector.
3463 (_initialize_probe): Adjust to vector change.
3464 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3465 * elfread.c (elf_get_probes): Likewise.
3466 * stap-probe.c (_initialize_stap_probe): Likewise.
3467
3468 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3469
3470 * probe.h (struct bound_probe): Define constructors.
3471 * probe.c (bound_probe_s): Remove typedef.
3472 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3473 (collect_probes): Change return type to std::vector, remove
3474 cleanup.
3475 (compare_probes): Return bool, change parameter type. Change
3476 semantic to "less than".
3477 (gen_ui_out_table_header_info): Change parameter to std::vector
3478 and update.
3479 (exists_probe_with_pops): Likewise.
3480 (info_probes_for_ops): Update to std::vector change.
3481 (enable_probes_command): Likewise.
3482 (disable_probes_command): Likewise.
3483
3484 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3485
3486 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3487 vec to std::vector.
3488 * probe.c (parse_probes_in_pspace): Update.
3489 (find_probes_in_objfile): Update.
3490 (find_probe_by_pc): Update.
3491 (collect_probes): Update.
3492 (probe_any_get_probes): Update.
3493 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3494 return type to reference to std::vector.
3495 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3496 std::vector and update.
3497 (dtrace_process_dof): Likewise.
3498 (dtrace_get_probes): Likewise.
3499 * elfread.c (elf_get_probes): Change return type to std::vector,
3500 store an std::vector in bfd_data.
3501 (probe_key_free): Update to std::vector.
3502 * stap-probe.c (handle_stap_probe): Change parameter to
3503 std::vector and update.
3504 (stap_get_probes): Likewise.
3505 * symfile-debug.c (debug_sym_get_probes): Change return type to
3506 std::vector and update.
3507
3508 2017-09-11 Tom Tromey <tom@tromey.com>
3509
3510 * breakpoint.c (program_breakpoint_here_p): Update.
3511 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3512 from make_show_memory_breakpoints_cleanup. Return a
3513 scoped_restore_tmpl<int>.
3514 (restore_show_memory_breakpoints): Remove.
3515 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3516 * mem-break.c (memory_validate_breakpoint): Update.
3517 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3518 (ia64_memory_remove_breakpoint): Update.
3519 (ia64_breakpoint_from_pc): Update.
3520 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3521 from make_show_memory_breakpoints_cleanup.
3522
3523 2017-09-11 Tom Tromey <tom@tromey.com>
3524
3525 * d-namespace.c (d_lookup_symbol): Use std::string.
3526 (find_symbol_in_baseclass): Likewise.
3527
3528 2017-09-11 Tom Tromey <tom@tromey.com>
3529
3530 * ctf.c (ctf_start): Use std::string.
3531
3532 2017-09-11 Tom Tromey <tom@tromey.com>
3533
3534 * ada-lang.c (is_known_support_routine): Update.
3535 (ada_unhandled_exception_name_addr_from_raise): Update.
3536 * guile/scm-frame.c (gdbscm_frame_name): Update.
3537 * python/py-frame.c (frapy_name): Update.
3538 (frapy_function): Update.
3539 * stack.h (find_frame_funname): Update.
3540 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3541 (print_frame): Update.
3542
3543 2017-09-11 Tom Tromey <tom@tromey.com>
3544
3545 * findcmd.c (put_bits): Take a gdb::byte_vector.
3546 (parse_find_args): Return gdb::byte_vector. "args" now const.
3547 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3548 cleanups.
3549 (find_command): Update.
3550
3551 2017-09-11 Tom Tromey <tom@tromey.com>
3552
3553 * cli/cli-script.c (class scoped_restore_hook_in): New.
3554 (clear_hook_in_cleanup): Remove.
3555 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3556 scoped_restore_hook_in.
3557
3558 2017-09-11 Tom Tromey <tom@tromey.com>
3559
3560 * cli/cli-script.c (restore_interp): Remove.
3561 (read_command_lines): Use scoped_restore_interp.
3562 * interps.c (scoped_restore_interp::set_temp): Rename from
3563 interp_set_temp.
3564 * interps.h (class scoped_restore_interp): New.
3565 (interp_set_temp): Remove.
3566
3567 2017-09-11 Tom Tromey <tom@tromey.com>
3568
3569 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3570 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3571 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3572 scoped_restore.
3573 (mi_cmd_break_insert_1): Update.
3574 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3575 scoped_restore.
3576
3577 2017-09-11 Tom Tromey <tom@tromey.com>
3578
3579 * demangle.c (demangle_command): Update.
3580 * breakpoint.c (disable_command): Update.
3581 (enable_command): Update.
3582 (find_location_by_number): Make "number" const. Use
3583 get_number_trailer.
3584 * cli/cli-utils.c (extract_arg): Return std::string.
3585 * probe.c (parse_probe_linespec): Update. Change types.
3586 (collect_probes): Take string arguments.
3587 (parse_probe_linespec): Likewise.
3588 (info_probes_for_ops): Update.
3589 (enable_probes_command): Update.
3590 (disable_probes_command): Update.
3591 * break-catch-sig.c (catch_signal_split_args): Update.
3592 * mi/mi-parse.c (mi_parse): Update.
3593
3594 2017-09-11 Tom Tromey <tom@tromey.com>
3595
3596 * language.h (language_enum): Make argument const.
3597 * language.c (language_enum): Make argument const.
3598
3599 2017-09-11 Tom Tromey <tom@tromey.com>
3600
3601 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3602 as function.
3603 (skip_to_space): Rename from skip_to_space_const.
3604 * common/common-utils.c (skip_to_space): New function.
3605 (skip_to_space): Rename from skip_to_space_const.
3606 * cli/cli-utils.h (get_number): Rename from get_number_const.
3607 (extract_arg): Rename from extract_arg_const.
3608 * cli/cli-utils.c (get_number): Rename from get_number_const.
3609 (extract_arg): Rename from extract_arg_const.
3610 (number_or_range_parser::get_number): Use ::get_number.
3611 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3612 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3613 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3614 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3615 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3616 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3617 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3618 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3619
3620 2017-09-11 Tom Tromey <tom@tromey.com>
3621
3622 * python/python.c (do_start_initialization): Use
3623 py-event-types.def to initialize types.
3624 Define all object type structures.
3625 * python/python-internal.h: Don't declare event initialization
3626 functions.
3627 * python/py-threadevent.c (thread_event_object_type): Don't
3628 define.
3629 * python/py-stopevent.c (stop_event_object_type): Don't define.
3630 * python/py-signalevent.c (signal_event_object_type): Don't
3631 declare or define.
3632 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3633 (clear_objfiles_event_object_type): Don't declare or define.
3634 * python/py-infevents.c (inferior_call_pre_event_object_type)
3635 (inferior_call_post_event_object_type)
3636 (register_changed_event_object_type)
3637 (memory_changed_event_object_type): Don't declare or define.
3638 * python/py-inferior.c (new_thread_event_object_type)
3639 (new_inferior_event_object_type)
3640 (inferior_deleted_event_object_type): Don't declare or define.
3641 * python/py-exitedevent.c (exited_event_object_type): Don't
3642 declare or define.
3643 * python/py-evts.c (gdbpy_initialize_py_events): Use
3644 py-all-events.def.
3645 * python/py-events.h (thread_event_object_type): Don't declare.
3646 (events_object): Use py-all-events.def.
3647 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3648 py-event-types.def.
3649 * python/py-event-types.def: New file.
3650 * python/py-continueevent.c (create_continue_event_object): Don't
3651 declare or define.
3652 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3653 declare or define.
3654 * python/py-all-events.def: New file.
3655
3656 2017-09-11 Tom Tromey <tom@tromey.com>
3657
3658 * python/py-threadevent.c (create_thread_event_object): Return
3659 gdbpy_ref.
3660 * python/py-stopevent.h (create_stop_event_object)
3661 (create_breakpoint_event_object, create_signal_event_object):
3662 Update.
3663 * python/py-stopevent.c (create_stop_event_object): Return
3664 gdbpy_ref.
3665 (emit_stop_event): Update.
3666 * python/py-signalevent.c (create_signal_event_object): Return
3667 gdbpy_ref.
3668 * python/py-infevents.c (create_inferior_call_event_object):
3669 Update.
3670 * python/py-event.h (create_event_object)
3671 (create_thread_event_object): Update.
3672 * python/py-event.c (create_event_object): Return gdbpy_ref.
3673 * python/py-continueevent.c: Return gdbpy_ref.
3674 * python/py-bpevent.c (create_breakpoint_event_object): Return
3675 gdbpy_ref.
3676
3677 2017-09-11 Tom Tromey <tom@tromey.com>
3678
3679 PR python/15622:
3680 * NEWS: Add entry.
3681 * python/python.c (do_start_initialization): Initialize new event
3682 types.
3683 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3684 (gdbpy_initialize_inferior_deleted_event)
3685 (gdbpy_initialize_new_thread_event): Declare.
3686 * python/py-threadevent.c (create_thread_event_object): Add option
3687 "thread" parameter.
3688 * python/py-inferior.c (new_thread_event_object_type)
3689 (new_inferior_event_object_type)
3690 (inferior_deleted_event_object_type): Declare.
3691 (python_new_inferior, python_inferior_deleted): New functions.
3692 (add_thread_object): Emit new_thread event.
3693 (gdbpy_initialize_inferior): Attach new functions to corresponding
3694 observers.
3695 (new_thread, new_inferior, inferior_deleted): Define new event
3696 types.
3697 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3698 registries.
3699 * python/py-events.h (events_object) <new_inferior,
3700 inferior_deleted, new_thread>: New fields.
3701 * python/py-event.h (create_thread_event_breakpoint): Add optional
3702 "thread" parameter.
3703
3704 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3705
3706 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3707 check current_ui instead.
3708 (internal_vproblem): Likewise.
3709
3710 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3711
3712 * thread.c (print_thread_info_1): Remove unnecessary calls to
3713 uiout->is_mi_like_p.
3714
3715 2017-09-09 Tom Tromey <tom@tromey.com>
3716
3717 * namespace.h (add_using_directive): Update.
3718 * namespace.c (add_using_directive): Change type of excludes to
3719 std::vector.
3720 * dwarf2read.c (read_import_statement): Use std::vector.
3721 (read_namespace): Update.
3722 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3723
3724 2017-09-09 Tom Tromey <tom@tromey.com>
3725
3726 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3727
3728 2017-09-09 Tom Tromey <tom@tromey.com>
3729
3730 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3731
3732 2017-09-09 Tom Tromey <tom@tromey.com>
3733
3734 * stack.c (func_command): Use gdb::def_vector.
3735
3736 2017-09-09 Tom Tromey <tom@tromey.com>
3737
3738 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3739 ui_out_emit_list, ui_out_emit_tuple.
3740 (mi_cmd_var_update): Likewise.
3741
3742 2017-09-09 Tom Tromey <tom@tromey.com>
3743
3744 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3745 ui_out_redirect_pop.
3746 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3747 ui_out_redirect_pop.
3748 * utils.c (do_ui_out_redirect_pop)
3749 (make_cleanup_ui_out_redirect_pop): Remove.
3750 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3751 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3752 * ui-out.h (ui_out_redirect_pop): New class.
3753
3754 2017-09-09 Tom Tromey <tom@tromey.com>
3755
3756 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3757 (list_available_thread_groups, mi_cmd_list_thread_groups)
3758 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3759 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3760 Likewise.
3761
3762 2017-09-09 Tom Tromey <tom@tromey.com>
3763
3764 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3765 ui_out_emit_tuple.
3766
3767 2017-09-09 Tom Tromey <tom@tromey.com>
3768
3769 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3770 * stack.c (print_frame): Use ui_out_emit_tuple.
3771 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3772 (info_spu_mailbox_command, info_spu_dma_command)
3773 (info_spu_proxydma_command): Likewise.
3774 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3775 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3776 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3777 ui_out_emit_tuple.
3778 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3779
3780 2017-09-09 Tom Tromey <tom@tromey.com>
3781
3782 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3783 (class ui_out_emit_table): Update comment.
3784 * ui-out.c (do_cleanup_table_end)
3785 (make_cleanup_ui_out_table_begin_end): Remove.
3786 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3787 (info_spu_dma_cmdlist): Likewise.
3788 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3789 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3790 ui_out_emit_table.
3791
3792 2017-09-09 Tom Tromey <tom@tromey.com>
3793
3794 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3795 ui_out_emit_list, gdb::optional.
3796
3797 2017-09-09 John Baldwin <jhb@FreeBSD.org>
3798
3799 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3800 prototype.
3801 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3802 prototype.
3803 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3804 prototype.
3805 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3806 * ada-exp.y: Remove _initialize_ada_exp prototype.
3807 * ada-lang.c: Remove _initialize_ada_language prototype.
3808 * ada-tasks.c: Remove _initialize_tasks prototype.
3809 * addrmap.c: Remove _initialize_addrmap prototype.
3810 * agent.c: Remove _initialize_agent prototype.
3811 * aix-thread.c: Remove _initialize_aix_thread prototype.
3812 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3813 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3814 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3815 prototype.
3816 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3817 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3818 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3819 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3820 prototype.
3821 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3822 prototype.
3823 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3824 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3825 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3826 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3827 prototype.
3828 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3829 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3830 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3831 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3832 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3833 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3834 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3835 prototype.
3836 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3837 prototype.
3838 * annotate.c: Remove _initialize_annotate prototype.
3839 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3840 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3841 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3842 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3843 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3844 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3845 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3846 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3847 prototype.
3848 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3849 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3850 * auto-load.c: Remove _initialize_auto_load prototype.
3851 * auxv.c: Remove _initialize_auxv prototype.
3852 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3853 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3854 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3855 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3856 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3857 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3858 prototype.
3859 * break-catch-throw.c: Remove _initialize_break_catch_throw
3860 prototype.
3861 * breakpoint.c: Remove _initialize_breakpoint prototype.
3862 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3863 * btrace.c: Remove _initialize_btrace prototype.
3864 * charset.c: Remove _initialize_charset prototype.
3865 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3866 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3867 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3868 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3869 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3870 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3871 * coffread.c: Remove _initialize_coffread prototype.
3872 * compile/compile.c: Remove _initialize_compile prototype.
3873 * complaints.c: Remove _initialize_complaints prototype.
3874 * completer.c: Remove _initialize_completer prototype.
3875 * copying.awk: Remove _initialize_copying prototype.
3876 * copying.c: Regenerate.
3877 * core-regset.c: Remove _initialize_core_regset prototype.
3878 * corefile.c: Remove _initialize_core prototype.
3879 * corelow.c: Remove _initialize_corelow prototype.
3880 * cp-abi.c: Remove _initialize_cp_abi prototype.
3881 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3882 * cp-support.c: Remove _initialize_cp_support prototype.
3883 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3884 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3885 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3886 * ctf.c: Remove _initialize_ctf prototype.
3887 * d-lang.c: Remove _initialize_d_language prototype.
3888 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3889 prototype.
3890 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3891 * dbxread.c: Remove _initialize_dbxread prototype.
3892 * dcache.c: Remove _initialize_dcache prototype.
3893 * demangle.c: Remove _initialize_demangler prototype.
3894 * disasm-selftests.c: Remove _initialize_disasm_selftests
3895 prototype.
3896 * disasm.c: Remove _initialize_disasm prototype.
3897 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3898 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3899 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3900 prototype.
3901 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3902 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3903 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3904 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3905 * elfread.c: Remove _initialize_elfread prototype.
3906 * exec.c: Remove _initialize_exec prototype.
3907 * extension.c: Remove _initialize_extension prototype.
3908 * f-lang.c: Remove _initialize_f_language prototype.
3909 * f-valprint.c: Remove _initialize_f_valprint prototype.
3910 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3911 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3912 * filesystem.c: Remove _initialize_filesystem prototype.
3913 * findcmd.c: Remove _initialize_mem_search prototype.
3914 * fork-child.c: Remove _initialize_fork_child prototype.
3915 * frame-base.c: Remove _initialize_frame_base prototype.
3916 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3917 * frame.c: Remove _initialize_frame prototype.
3918 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3919 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3920 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3921 * gcore.c: Remove _initialize_gcore prototype.
3922 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3923 * gdbarch.c: Regenerate.
3924 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3925 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3926 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3927 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3928 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3929 * go-lang.c: Remove _initialize_go_language prototype.
3930 * go32-nat.c: Remove _initialize_go32_nat prototype.
3931 * guile/guile.c: Remove _initialize_guile prototype.
3932 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3933 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3934 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3935 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3936 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3937 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3938 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3939 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3940 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3941 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3942 prototype.
3943 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3944 prototype.
3945 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3946 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3947 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3948 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3949 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3950 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3951 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3952 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3953 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3954 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3955 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3956 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3957 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3958 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3959 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3960 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3961 prototype.
3962 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3963 prototype.
3964 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3965 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3966 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3967 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3968 * infcall.c: Remove _initialize_infcall prototype.
3969 * infcmd.c: Remove _initialize_infcmd prototype.
3970 * inferior.c: Remove _initialize_inferiors prototype.
3971 * inflow.c: Remove _initialize_inflow prototype.
3972 * infrun.c: Remove _initialize_infrun prototype.
3973 * interps.c: Remove _initialize_interpreter prototype.
3974 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3975 * jit.c: Remove _initialize_jit prototype.
3976 * language.c: Remove _initialize_language prototype.
3977 * linux-fork.c: Remove _initialize_linux_fork prototype.
3978 * linux-nat.c: Remove _initialize_linux_nat prototype.
3979 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3980 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3981 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3982 * m2-lang.c: Remove _initialize_m2_language prototype.
3983 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3984 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3985 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3986 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3987 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3988 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3989 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3990 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3991 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3992 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3993 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3994 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3995 * machoread.c: Remove _initialize_machoread prototype.
3996 * macrocmd.c: Remove _initialize_macrocmd prototype.
3997 * macroscope.c: Remove _initialize_macroscope prototype.
3998 * maint.c: Remove _initialize_maint_cmds prototype.
3999 * mdebugread.c: Remove _initialize_mdebugread prototype.
4000 * memattr.c: Remove _initialize_mem prototype.
4001 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4002 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4003 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4004 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4005 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4006 * microblaze-linux-tdep.c: Remove
4007 _initialize_microblaze_linux_tdep prototype.
4008 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4009 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4010 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4011 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4012 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4013 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4014 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4015 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4016 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4017 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4018 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4019 prototype.
4020 * mipsread.c: Remove _initialize_mipsread prototype.
4021 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4022 prototype.
4023 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4024 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4025 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4026 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4027 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4028 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4029 prototype.
4030 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4031 * nto-procfs.c: Remove _initialize_procfs prototype.
4032 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4033 * objc-lang.c: Remove _initialize_objc_language prototype.
4034 * objfiles.c: Remove _initialize_objfiles prototype.
4035 * observer.c: Remove observer_test_first_notification_function,
4036 observer_test_second_notification_function,
4037 observer_test_third_notification_function, and
4038 _initialize_observer prototypes.
4039 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4040 * osabi.c: Remove _initialize_gdb_osabi prototype.
4041 * osdata.c: Remove _initialize_osdata prototype.
4042 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4043 * parse.c: Remove _initialize_parse prototype.
4044 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4045 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4046 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4047 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4048 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4049 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4050 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4051 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4052 * printcmd.c: Remove _initialize_printcmd prototype.
4053 * probe.c: Remove _initialize_probe prototype.
4054 * proc-api.c: Remove _initialize_proc_api prototype.
4055 * proc-events.c: Remove _initialize_proc_events prototype.
4056 * proc-service.c: Remove _initialize_proc_service prototype.
4057 * procfs.c: Remove _initialize_procfs prototype.
4058 * psymtab.c: Remove _initialize_psymtab prototype.
4059 * python/python.c: Remove _initialize_python prototype.
4060 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4061 * record-btrace.c: Remove _initialize_record_btrace prototype.
4062 * record-full.c: Remove _initialize_record_full prototype.
4063 * record.c: Remove _initialize_record prototype.
4064 * regcache.c: Remove _initialize_regcache prototype.
4065 * reggroups.c: Remove _initialize_reggroup prototype.
4066 * remote-notif.c: Remove _initialize_notif prototype.
4067 * remote-sim.c: Remove _initialize_remote_sim prototype.
4068 * remote.c: Remove _initialize_remote prototype.
4069 * reverse.c: Remove _initialize_reverse prototype.
4070 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4071 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4072 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4073 prototype.
4074 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4075 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4076 * rust-exp.y: Remove _initialize_rust_exp prototype.
4077 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4078 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4079 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4080 * score-tdep.c: Remove _initialize_score_tdep prototype.
4081 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4082 prototype.
4083 * ser-go32.c: Remove _initialize_ser_dos prototype.
4084 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4085 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4086 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4087 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4088 * serial.c: Remove _initialize_serial prototype.
4089 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4090 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4091 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4092 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4093 * skip.c: Remove _initialize_step_skip prototype.
4094 * sol-thread.c: Remove _initialize_sol_thread prototype.
4095 * solib-aix.c: Remove _initialize_solib_aix prototype.
4096 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4097 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4098 * solib-frv.c: Remove _initialize_frv_solib prototype.
4099 * solib-spu.c: Remove _initialize_spu_solib prototype.
4100 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4101 * solib-target.c: Remove _initialize_solib_target prototype.
4102 * solib.c: Remove _initialize_solib prototype.
4103 * source.c: Remove _initialize_source prototype.
4104 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4105 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4106 prototype.
4107 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4108 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4109 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4110 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4111 prototype.
4112 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4113 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4114 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4115 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4116 prototype.
4117 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4118 prototype.
4119 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4120 prototype.
4121 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4122 prototype.
4123 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4124 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4125 prototype.
4126 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4127 prototype.
4128 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4129 prototype.
4130 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4131 prototype.
4132 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4133 prototype.
4134 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4135 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4136 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4137 * stabsread.c: Remove _initialize_stabsread prototype.
4138 * stack.c: Remove _initialize_stack prototype.
4139 * stap-probe.c: Remove _initialize_stap_probe prototype.
4140 * std-regs.c: Remove _initialize_frame_reg prototype.
4141 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4142 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4143 * symfile.c: Remove _initialize_symfile prototype.
4144 * symmisc.c: Remove _initialize_symmisc prototype.
4145 * symtab.c: Remove _initialize_symtab prototype.
4146 * target-dcache.c: Remove _initialize_target_dcache prototype.
4147 * target-descriptions.c: Remove _initialize_target_descriptions
4148 prototype.
4149 * thread.c: Remove _initialize_thread prototype.
4150 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4151 prototype.
4152 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4153 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4154 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4155 prototype.
4156 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4157 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4158 * tracefile.c: Remove _initialize_tracefile prototype.
4159 * tracepoint.c: Remove _initialize_tracepoint prototype.
4160 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4161 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4162 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4163 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4164 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4165 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4166 * tui/tui.c: Remove _initialize_tui prototype.
4167 * typeprint.c: Remove _initialize_typeprint prototype.
4168 * user-regs.c: Remove _initialize_user_regs prototype.
4169 * utils.c: Remove _initialize_utils prototype.
4170 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4171 * valarith.c: Remove _initialize_valarith prototype.
4172 * valops.c: Remove _initialize_valops prototype.
4173 * valprint.c: Remove _initialize_valprint prototype.
4174 * value.c: Remove _initialize_values prototype.
4175 * varobj.c: Remove _initialize_varobj prototype.
4176 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4177 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4178 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4179 * windows-nat.c: Remove _initialize_windows_nat,
4180 _initialize_check_for_gdb_ini, and _initialize_loadable
4181 prototypes.
4182 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4183 * xcoffread.c: Remove _initialize_xcoffread prototype.
4184 * xml-support.c: Remove _initialize_xml_support prototype.
4185 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4186 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4187 prototype.
4188 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4189 prototype.
4190 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4191
4192 2017-09-08 Keith Seitz <keiths@redhat.com>
4193
4194 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4195 field.
4196
4197 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4198
4199 * f-valprint.c (f_val_print): Remove check for one byte
4200 sized integers. Remove printing of character type.
4201
4202 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4203 Christoph Weinmann <christoph.t.weinmann@intel.com>
4204 Bernhard Heckel <bernhard.heckel@intel.com>
4205
4206 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4207 to maintain proper indentation when printing pointers/refs.
4208
4209 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4210
4211 GDB 8.0.1 released.
4212
4213 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4214
4215 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4216
4217 2017-09-05 Tom Tromey <tom@tromey.com>
4218
4219 * parse.c (funcall_chain): Now a std::vector.
4220 (start_arglist, end_arglist): Simplify.
4221 (free_funcalls): Remove.
4222 (parse_exp_in_context_1): Remove cleanup.
4223
4224 2017-09-05 Tom Tromey <tom@tromey.com>
4225
4226 * go-exp.y (go_parse): Don't create a cleanup.
4227
4228 2017-09-05 Tom Tromey <tom@tromey.com>
4229
4230 * d-exp.y (PrimaryExpression): Use std::string.
4231 (d_parse): Don't create a cleanup.
4232
4233 2017-09-05 Tom Tromey <tom@tromey.com>
4234
4235 * utils.c (do_clear_parser_state): Remove.
4236 (make_cleanup_clear_parser_state): Remove.
4237 * p-exp.y (pascal_parse): Use scoped_restore.
4238 * m2-exp.y (m2_parse): Use scoped_restore.
4239 * f-exp.y (f_parse): Use scoped_restore.
4240 * d-exp.y (d_parse): Use scoped_restore.
4241 * c-exp.y (c_parse): Use scoped_restore.
4242 * ada-exp.y (ada_parse): Use scoped_restore.
4243 * utils.h (make_cleanup_clear_parser_state): Remove.
4244
4245 2017-09-06 Keith Seitz <keiths@redhat.com>
4246
4247 * dwarf2read.c (dw2_linkage_name_attr): New function.
4248 (dw2_linkage_name): New function.
4249 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4250 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4251 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4252
4253 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4254
4255 * config/djgpp/djconfig.sh: Correct shell portability issue.
4256
4257 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4258
4259 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4260
4261 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4262
4263 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4264 * NEWS: Mention new FreeBSD/mips native configuration.
4265 * configure.host: Add aarch64*-*-freebsd*.
4266 * configure.nat: Likewise.
4267 * aarch64-fbsd-nat.c: New file.
4268
4269 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4270
4271 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4272 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4273 * NEWS: Mention new FreeBSD/aarch64 target.
4274 * configure.tgt: Add aarch64*-*-freebsd*.
4275 * aarch64-fbsd-tdep.c: New file.
4276 * aarch64-fbsd-tdep.h: New file.
4277
4278 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4279
4280 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4281
4282 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4283
4284 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4285 of TLS symbols.
4286
4287 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4288
4289 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4290 call.
4291
4292 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4293
4294 * infrun.c (follow_exec): Call add_thread after
4295 target_find_description.
4296
4297 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4298
4299 * infrun.c (handle_inferior_event_1): When exec'ing, read
4300 stop_pc after follow_exec.
4301
4302 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4303
4304 * remote.c (process_g_packet): Update error message.
4305
4306 2017-09-05 Yao Qi <yao.qi@linaro.org>
4307
4308 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4309 targets.
4310
4311 2017-09-05 Pedro Alves <palves@redhat.com>
4312
4313 * eval.c (eval_call, evaluate_funcall): New functions, factored
4314 out from ...
4315 (evaluate_subexp_standard): ... this.
4316
4317 2017-09-05 Yao Qi <yao.qi@linaro.org>
4318
4319 * amd64-tdep.c (amd64_target_description): Create target
4320 descriptions.
4321 (_initialize_amd64_tdep): Don't call functions
4322 initialize_tdesc_amd64_*. Add self tests.
4323 * arch/amd64.c (amd64_create_target_description): Add parameter
4324 is_linux. Call set_tdesc_osabi if is_linux is true.
4325 * arch/amd64.h (amd64_create_target_description): Update the
4326 declaration.
4327 * arch/i386.c (i386_create_target_description): Add parameter
4328 is_linux. Call set_tdesc_osabi if is_linux is true.
4329 * arch/i386.h (i386_create_target_description): Update
4330 declaration.
4331 * configure.tgt: Add i386.o to gdb_target_obs.
4332 * features/Makefile (XMLTOC): Remove i386/*.xml.
4333 * features/i386/amd64-avx-avx512.c: Remove.
4334 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4335 * features/i386/amd64-avx-mpx.c: Remove.
4336 * features/i386/amd64-avx.c: Remove.
4337 * features/i386/amd64-mpx.c: Remove.
4338 * features/i386/amd64.c: Remove.
4339 * features/i386/i386-avx-avx512.c: Remove.
4340 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4341 * features/i386/i386-avx-mpx.c: Remove.
4342 * features/i386/i386-avx.c: Remove.
4343 * features/i386/i386-mmx.c: Remove.
4344 * features/i386/i386-mpx.c: Remove.
4345 * features/i386/i386.c: Remove.
4346 * i386-tdep.c: Don't include features/i386/i386*.c., include
4347 target-descriptions.h and arch/i386.h.
4348 (i386_target_description): Create target descriptions.
4349 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4350 functions. Do self tests.
4351
4352 2017-09-05 Yao Qi <yao.qi@linaro.org>
4353
4354 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4355 * features/i386/amd64-avx-avx512-linux.c: Removed.
4356 * features/i386/amd64-avx-linux.c: Removed.
4357 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4358 * features/i386/amd64-avx-mpx-linux.c: Removed.
4359 * features/i386/amd64-linux.c: Removed.
4360 * features/i386/amd64-mpx-linux.c: Removed.
4361 * features/i386/x32-avx-avx512-linux.c: Removed.
4362 * features/i386/x32-avx-linux.c: Removed.
4363 * features/i386/x32-linux.c: Removed.
4364
4365 2017-09-05 Yao Qi <yao.qi@linaro.org>
4366
4367 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4368 features/i386/*.c.
4369 (amd64_linux_read_description): Call
4370 amd64_create_target_description.
4371 * arch/amd64.c: New file.
4372 * arch/amd64.h: New file.
4373 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4374 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4375
4376 2017-09-05 Yao Qi <yao.qi@linaro.org>
4377
4378 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4379 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4380 (amd64_linux_read_description): Create target descriptions.
4381 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4382 functions. Add unit tests.
4383 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4384 x32-core.xml.
4385 * features/i386/64bit-avx.c: Generated.
4386 * features/i386/64bit-avx512.c: Generated.
4387 * features/i386/64bit-core.c: Generated.
4388 * features/i386/64bit-linux.c: Generated.
4389 * features/i386/64bit-mpx.c: Generated.
4390 * features/i386/64bit-pkeys.c: Generated.
4391 * features/i386/64bit-segments.c: Generated.
4392 * features/i386/64bit-sse.c: Generated.
4393 * features/i386/x32-core.c: Generated.
4394 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4395 c files for amd64-linux and x32-linux.
4396
4397 2017-09-05 Yao Qi <yao.qi@linaro.org>
4398
4399 * amd64-linux-tdep.c (amd64_linux_read_description): New
4400 function.
4401 (amd64_linux_core_read_description): Call
4402 amd64_linux_read_description.
4403 (amd64_linux_init_abi): Likewise.
4404 (amd64_x32_linux_init_abi): Likewise.
4405 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4406 * x86-linux-nat.c (x86_linux_read_description): Call
4407 amd64_linux_read_description.
4408
4409 2017-09-05 Yao Qi <yao.qi@linaro.org>
4410
4411 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4412 comments.
4413
4414 2017-09-05 Yao Qi <yao.qi@linaro.org>
4415
4416 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4417 * features/i386/i386-avx-avx512-linux.c: Remove.
4418 * features/i386/i386-avx-linux.c: Remove.
4419 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4420 * features/i386/i386-avx-mpx-linux.c: Remove.
4421 * features/i386/i386-linux.c: Remove.
4422 * features/i386/i386-mmx-linux.c: Remove.
4423 * features/i386/i386-mpx-linux.c: Remove.
4424
4425 2017-09-05 Yao Qi <yao.qi@linaro.org>
4426
4427 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4428 (SFILES): Add arch/i386.c.
4429 (HFILES_NO_SRCDIR): Add arch/i386.h.
4430 * arch/i386.c: New file.
4431 * arch/i386.h: New file.
4432 * arch/tdesc.h (allocate_target_description): Declare.
4433 (set_tdesc_architecture): Declare.
4434 (set_tdesc_osabi): Declare.
4435 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4436 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4437 include arch/i386.h.
4438 (i386_linux_read_description): Remove code and call
4439 i386_create_target_description.
4440 (set_tdesc_architecture): New function.
4441 (set_tdesc_osabi): New function.
4442 * target-descriptions.h (allocate_target_description): Remove.
4443
4444 2017-09-05 Yao Qi <yao.qi@linaro.org>
4445
4446 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4447 * target-descriptions.c (tdesc_create_feature): Likewise, and
4448 adjust code.
4449 * features/i386/32bit-avx.c: Re-generated.
4450 * features/i386/32bit-avx512.c: Re-generated.
4451 * features/i386/32bit-core.c: Re-generated.
4452 * features/i386/32bit-linux.c: Re-generated.
4453 * features/i386/32bit-mpx.c: Re-generated.
4454 * features/i386/32bit-pkeys.c: Re-generated.
4455 * features/i386/32bit-sse.c: Re-generated.
4456
4457 2017-09-05 Yao Qi <yao.qi@linaro.org>
4458
4459 * regformats/regdef.h (struct reg): Override operator == and !=.
4460
4461 2017-09-05 Yao Qi <yao.qi@linaro.org>
4462
4463 * arch/tdesc.h: New file.
4464 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4465 * target-descriptions.c: Update comments.
4466 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4467 declarations.
4468 * features/i386/32bit-avx.c: Re-generated.
4469 * features/i386/32bit-avx512.c: Re-generated.
4470 * features/i386/32bit-core.c: Re-generated.
4471 * features/i386/32bit-linux.c: Re-generated.
4472 * features/i386/32bit-mpx.c: Re-generated.
4473 * features/i386/32bit-pkeys.c: Re-generated.
4474 * features/i386/32bit-sse.c: Re-generated.
4475
4476 2017-09-05 Yao Qi <yao.qi@linaro.org>
4477
4478 * regformats/regdat.sh: Update generated code.
4479
4480 2017-09-05 Yao Qi <yao.qi@linaro.org>
4481
4482 * regformats/regdat.sh: Adjust code order.
4483
4484 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4485
4486 * expprint.c (dump_subexp_body_standard): Use constant format
4487 string in fprintf_filtered call.
4488
4489 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4490
4491 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4492 NetBSD/i386.
4493 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4494
4495 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4496
4497 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4498
4499 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4500
4501 * bsd-kvm.o: Define _KMEMUSER.
4502 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4503 * configure: Regenerate.
4504
4505 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4506
4507 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4508 * i386-fbsd-nat.c: Likewise.
4509
4510 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4511
4512 * unittests/array-view-selftests.c: Add include of <array>.
4513
4514 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4515
4516 * spu-tdep.c (flush_ea_cache): Add missing argument to
4517 call_function_by_hand.
4518
4519 2017-09-04 Pedro Alves <palves@redhat.com>
4520
4521 * NEWS (Safer support for debugging with no debug info): New.
4522
4523 2017-09-04 Pedro Alves <palves@redhat.com>
4524
4525 * c-exp.y (function_method, function_method_void): Add current
4526 instance flags to TYPE_INSTANCE.
4527 * dwarf2read.c (check_modifier): New.
4528 (compute_delayed_physnames): Assert that only C++ adds delayed
4529 physnames. Mark fn_fields as const/volatile depending on
4530 physname.
4531 * eval.c (make_params): New type_instance_flags parameter. Use
4532 it as the new type's instance flags.
4533 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4534 flags element and pass it to make_params.
4535 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4536 instance flags element.
4537 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4538 * gdbtypes.h: Include "enum-flags.h".
4539 (type_instance_flags): New enum-flags type.
4540 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4541 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4542 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4543 (follow_type_instance_flags): New function.
4544 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4545 * parser-defs.h (follow_type_instance_flags): Declare.
4546 * valops.c (value_struct_elt_for_reference): const/volatile must
4547 match too.
4548
4549 2017-09-04 Pedro Alves <palves@redhat.com>
4550
4551 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4552 function/method scopes; lookup the nested name as a function local
4553 static variable.
4554
4555 2017-09-04 Pedro Alves <palves@redhat.com>
4556
4557 (%type <voidval>): Add function_method.
4558 * c-exp.y (exp): New production for calls with no arguments.
4559 (function_method, function_method_void_or_typelist): New
4560 productions.
4561 (exp): New production for "method()::static_var".
4562 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4563 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4564 Handle OP_FUNC_STATIC_VAR.
4565 * parse.c (operator_length_standard):
4566 Handle OP_FUNC_STATIC_VAR.
4567
4568 2017-09-04 Pedro Alves <palves@redhat.com>
4569
4570 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4571 handling.
4572 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4573 Ditto.
4574 * parse.c (operator_length_standard, operator_check_standard):
4575 Ditto.
4576 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4577
4578 2017-09-04 Pedro Alves <palves@redhat.com>
4579
4580 * ax-gdb.c: Include "typeprint.h".
4581 (gen_expr_for_cast): New function.
4582 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4583 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4584 type is unknown.
4585 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4586 nodebug_data_symbol.
4587 * eval.c: Include "typeprint.h".
4588 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4589 Error out if symbol has unknown type.
4590 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4591 evaluate_subexp_for_cast.
4592 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4593 OP_VAR_MSYM_VALUE.
4594 (evaluate_subexp_for_cast): New function.
4595 * gdbtypes.c (init_nodebug_var_type): New function.
4596 (objfile_type): Use it to initialize types of variables with no
4597 debug info.
4598 * typeprint.c (error_unknown_type): New.
4599 * typeprint.h (error_unknown_type): New declaration.
4600 * compile/compile-c-types.c (convert_type_basic): Handle
4601 TYPE_CODE_ERROR; warn and fallback to int for variables with
4602 unknown type.
4603
4604 2017-09-04 Pedro Alves <palves@redhat.com>
4605
4606 * eval.c (evaluate_var_value): New function, factored out from ...
4607 (evaluate_subexp_standard): ... here.
4608
4609 2017-09-04 Pedro Alves <palves@redhat.com>
4610
4611 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4612 Remove useless assignments to 'op'.
4613
4614 2017-09-04 Pedro Alves <palves@redhat.com>
4615
4616 * eval.c (eval_skip_value): New function.
4617 (evaluate_subexp_standard): Use it.
4618
4619 2017-09-04 Pedro Alves <palves@redhat.com>
4620
4621 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4622 function name from symbol/minsym and pass it to
4623 error_call_unknown_return_type.
4624
4625 2017-09-04 Pedro Alves <palves@redhat.com>
4626
4627 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4628 * ax-gdb.c (gen_msym_var_ref): New function.
4629 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4630 * eval.c (evaluate_var_msym_value): New function.
4631 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4632 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4633 to call_function_by_hand.
4634 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4635 Handle OP_VAR_MSYM_VALUE.
4636 (union exp_element) <msymbol>: New field.
4637 * minsyms.h (struct type): Forward declare.
4638 (find_minsym_type_and_address): Declare.
4639 * parse.c (write_exp_elt_msym): New function.
4640 (write_exp_msymbol): Delete, refactored as ...
4641 (find_minsym_type_and_address): ... this new function.
4642 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4643 (operator_length_standard, operator_check_standard): Handle
4644 OP_VAR_MSYM_VALUE.
4645 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4646
4647 2017-09-04 Pedro Alves <palves@redhat.com>
4648
4649 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4650 TYPE_GNU_IFUNC specially here. Throw error if return type is
4651 unknown.
4652 * ada-typeprint.c (print_func_type): Handle functions with unknown
4653 return type.
4654 * c-typeprint.c (c_type_print_base): Handle functions and methods
4655 with unknown return type.
4656 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4657 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4658 * compile/compile-c-types.c: Include "objfiles.h".
4659 (convert_func): For functions with unknown return type, warn and
4660 default to int.
4661 * compile/compile-object-run.c (compile_object_run): Adjust call
4662 to call_function_by_hand_dummy.
4663 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4664 call_function_by_hand.
4665 * eval.c (evaluate_subexp_standard): Adjust calls to
4666 call_function_by_hand. Handle functions and methods with unknown
4667 return type. Pass expect_type to call_function_by_hand.
4668 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4669 return type.
4670 * gcore.c (call_target_sbrk): Adjust call to
4671 call_function_by_hand.
4672 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4673 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4674 an integer address type instead of nodebug.
4675 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4676 call_function_by_hand.
4677 * infcall.c (error_call_unknown_return_type): New function.
4678 (call_function_by_hand): New "default_return_type" parameter.
4679 Pass it down.
4680 (call_function_by_hand_dummy): New "default_return_type"
4681 parameter. Use it instead of defaulting to int. If there's no
4682 default and the return type is unknown, throw an error. If
4683 there's a default return type, and the called function has no
4684 debug info, then assume the function is prototyped.
4685 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4686 New "default_return_type" parameter.
4687 (error_call_unknown_return_type): New declaration.
4688 * linux-fork.c (call_lseek): Cast return type of lseek.
4689 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4690 call_function_by_hand.
4691 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4692 calls to call_function_by_hand.
4693 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4694 return type.
4695 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4696 (value_nsstring, print_object_command): Adjust calls to
4697 call_function_by_hand.
4698 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4699 functions with unknown return type.
4700 (pascal_type_print_func_varspec_suffix): New function.
4701 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4702 TYPE_CODE_METHOD>: Use it.
4703 * python/py-value.c (valpy_call): Adjust call to
4704 call_function_by_hand.
4705 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4706 call_function_by_hand.
4707 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4708 call_function_by_hand.
4709 * valops.c (value_allocate_space_in_inferior): Adjust call to
4710 call_function_by_hand.
4711 * typeprint.c (type_print_unknown_return_type): New function.
4712 * typeprint.h (type_print_unknown_return_type): New declaration.
4713
4714 2017-09-04 Pedro Alves <palves@redhat.com>
4715
4716 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4717 types with more than one parameter as prototyped.
4718
4719 2017-09-04 Pedro Alves <palves@redhat.com>
4720
4721 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4722 (disassemble_command): Use gdb_disassembly_flags instead of bare
4723 int.
4724 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4725 (dump_insns, do_mixed_source_and_assembly_deprecated)
4726 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4727 Use gdb_disassembly_flags instead of bare int.
4728 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4729 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4730 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4731 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4732 (enum gdb_disassembly_flag): ... values of this new enumeration.
4733 (gdb_disassembly_flags): Define.
4734 (gdb_disassembly)
4735 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4736 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4737 gdb_disassembly_flags instead of bare int.
4738 * record-btrace.c (btrace_insn_history)
4739 (record_btrace_insn_history, record_btrace_insn_history_range)
4740 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4741 instead of bare int.
4742 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4743 Use gdb_disassembly_flags instead of bare int.
4744 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4745 Define.
4746 * target-delegates.c: Regenerate.
4747 * target.c (target_insn_history, target_insn_history_from)
4748 (target_insn_history_range): Use gdb_disassembly_flags instead of
4749 bare int.
4750 * target.h: Include "disasm.h".
4751 (struct target_ops) <to_insn_history, to_insn_history_from,
4752 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4753 int.
4754 (target_insn_history, target_insn_history_from)
4755 (target_insn_history_range): Use gdb_disassembly_flags instead of
4756 bare int.
4757
4758 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4759
4760 * cli/cli-script.c (build_command_line): For if/while commands,
4761 check whether args is empty.
4762
4763 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4764
4765 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4766 (enum command_control_type): Likewise.
4767 (struct command_line): Likewise.
4768 (free_command_lines): Likewise.
4769 (struct command_lines_deleter): Likewise.
4770 (command_line_up): Likewise.
4771 (read_command_lines): Likewise.
4772 (read_command_lines_1): Likewise.
4773 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4774 (enum command_control_type): Likewise.
4775 (struct command_line): Likewise.
4776 (free_command_lines): Likewise.
4777 (struct command_lines_deleter): Likewise.
4778 (command_line_up): Likewise.
4779 (read_command_lines): Likewise.
4780 (read_command_lines_1): Likewise.
4781 * breakpoint.h: Include cli/cli-script.h.
4782 * extension-priv.h: Likewise.
4783 * gdbcmd.h: Likewise.
4784
4785 2017-09-04 Pedro Alves <palves@redhat.com>
4786
4787 * ada-lang.c (is_known_support_routine): Move sal declaration to
4788 where it is initialized.
4789 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4790 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4791 (clear_command, update_static_tracepoint): Remove init_sal
4792 references. Move declarations closer to initializations.
4793 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4794 initializations.
4795 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4796 references. Move sal declarations closer to initializations.
4797 * frame.c (find_frame_sal): Return a symtab_and_line via function
4798 return instead of output parameter. Remove init_sal references.
4799 * frame.h (find_frame_sal): Return a symtab_and_line via function
4800 return instead of output parameter.
4801 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4802 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4803 instead of memset.
4804 (gdbscm_find_pc_line): Remove init_sal reference.
4805 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4806 references. Move declarations closer to initializations.
4807 * infcmd.c (set_step_frame): Update. Move declarations closer to
4808 initializations.
4809 (finish_backward): Remove init_sal references. Move declarations
4810 closer to initializations.
4811 * infrun.c (process_event_stop_test, handle_step_into_function)
4812 (insert_hp_step_resume_breakpoint_at_frame)
4813 (insert_step_resume_breakpoint_at_caller): Likewise.
4814 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4815 (symbol_to_sal): Likewise.
4816 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4817 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4818 to its initialization.
4819 * reverse.c (save_bookmark_command): Use new/delete. Remove
4820 init_sal references. Move declarations closer to initializations.
4821 * source.c (get_current_source_symtab_and_line): Remove brace
4822 initialization.
4823 (set_current_source_symtab_and_line): Now takes the sal by const
4824 reference. Remove brace initialization.
4825 (line_info): Remove init_sal reference.
4826 * source.h (set_current_source_symtab_and_line): Now takes a
4827 symtab_and_line via const reference.
4828 * stack.c (set_current_sal_from_frame): Adjust.
4829 (print_frame_info): Adjust.
4830 (get_last_displayed_sal): Return the sal via function return
4831 instead of via output parameter. Simplify.
4832 (frame_info): Adjust.
4833 * stack.h (get_last_displayed_sal): Return the sal via function
4834 return instead of via output parameter.
4835 * symtab.c (init_sal): Delete.
4836 (find_pc_sect_line): Remove init_sal references. Move
4837 declarations closer to initializations.
4838 (find_function_start_sal): Remove init_sal references. Move
4839 declarations closer to initializations.
4840 * symtab.h (struct symtab_and_line): In-class initialize all
4841 fields.
4842 * tracepoint.c (set_traceframe_context)
4843 (print_one_static_tracepoint_marker): Remove init_sal references.
4844 Move declarations closer to initializations.
4845 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4846 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4847 declarations closer to initializations.
4848 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4849 init_sal references. Adjust.
4850
4851 2017-09-04 Pedro Alves <palves@redhat.com>
4852
4853 * ax-gdb.c (agent_command_1): Use range-for.
4854 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4855 * breakpoint.c: Include "common/array-view.h".
4856 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4857 parameter from struct symtabs_and_lines to
4858 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4859 (breakpoint_sals_to_pc): Change sals parameter from struct
4860 symtabs_and_lines to std::vector reference.
4861 (check_fast_tracepoint_sals): Change sals parameter from struct
4862 symtabs_and_lines to std::array_view. Use range-for.
4863 (decode_static_tracepoint_spec): Return a std::vector instead of
4864 symtabs_and_lines. Update.
4865 (create_breakpoint): Update.
4866 (break_range_command, until_break_command, clear_command): Update.
4867 (base_breakpoint_decode_location, bkpt_decode_location)
4868 (bkpt_probe_create_sals_from_location)
4869 (bkpt_probe_decode_location, tracepoint_decode_location)
4870 (tracepoint_probe_decode_location)
4871 (strace_marker_create_sals_from_location): Return a std::vector
4872 instead of symtabs_and_lines.
4873 (strace_marker_create_breakpoints_sal): Update.
4874 (strace_marker_decode_location): Return a std::vector instead of
4875 symtabs_and_lines. Update.
4876 (update_breakpoint_locations): Change struct symtabs_and_lines
4877 parameters to gdb::array_view. Adjust.
4878 (location_to_sals): Return a std::vector instead of
4879 symtabs_and_lines. Update.
4880 (breakpoint_re_set_default): Use std::vector instead of struct
4881 symtabs_and_lines.
4882 (decode_location_default): Return a std::vector instead of
4883 symtabs_and_lines. Update.
4884 * breakpoint.h: Include "common/array-view.h".
4885 (struct breakpoint_ops) <decode_location>: Now returns a
4886 std::vector instead of returning a symtabs_and_lines via output
4887 parameter.
4888 (update_breakpoint_locations): Change sals parameters to use
4889 gdb::array_view.
4890 * cli/cli-cmds.c (edit_command, list_command): Update to use
4891 std::vector and gdb::array_view.
4892 (ambiguous_line_spec): Adjust to use gdb::array_view and
4893 range-for.
4894 (compare_symtabs): Rename to ...
4895 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4896 const reference and adjust.
4897 (filter_sals): Rewrite using std::vector and standard algorithms.
4898 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4899 (jump_command): Update to use std::vector.
4900 * linespec.c (struct linespec_state) <canonical_names>: Update
4901 comment.
4902 (add_sal_to_sals_basic): Delete.
4903 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4904 (decode_line_2, create_sals_line_offset)
4905 (convert_address_location_to_sals, convert_linespec_to_sals)
4906 (convert_explicit_location_to_sals, parse_linespec)
4907 (event_location_to_sals, decode_line_full, decode_line_1)
4908 (decode_line_with_current_source)
4909 (decode_line_with_last_displayed, decode_objc)
4910 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4911 (linespec_result::~linespec_result): Adjust to use std::vector
4912 instead of symtabs_and_lines.
4913 * linespec.h (linespec_sals::sals): Now a std::vector.
4914 (struct linespec_result): Use std::vector, bool, and in-class
4915 initialization.
4916 (decode_line_1, decode_line_with_current_source)
4917 (decode_line_with_last_displayed): Return std::vector.
4918 * macrocmd.c (info_macros_command): Use std::vector.
4919 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4920 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4921 std::vector.
4922 * probe.h (parse_probes): Return a std::vector.
4923 * python/python.c (gdbpy_decode_line): Use std::vector and
4924 gdb::array_view.
4925 * source.c (select_source_symtab, line_info): Use std::vector.
4926 * stack.c (func_command): Use std::vector.
4927 * symtab.h (struct symtabs_and_lines): Delete.
4928 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4929
4930 2017-09-04 Pedro Alves <palves@redhat.com>
4931
4932 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4933 unittests/array-view-selftests.c.
4934 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4935 * common/array-view.h: New file.
4936 * unittests/array-view-selftests.c: New file.
4937
4938 2017-09-04 Pedro Alves <palves@redhat.com>
4939
4940 * cli/cli-cmds.c (edit_command): Pass message to
4941 ambiguous_line_spec.
4942 (list_command): Pass message to ambiguous_line_spec. Say
4943 "first"/"last" instead of "start" and "end" to be consistent with
4944 the manual.
4945 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4946 them to print formatted message.
4947
4948 2017-09-04 Pedro Alves <palves@redhat.com>
4949
4950 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4951 ftrace_update_insns by reference instead of pointer.
4952
4953 2017-09-04 Yao Qi <yao.qi@linaro.org>
4954
4955 * i386-go32-tdep.c: Include x86-xstate.h.
4956 (i386_go32_init_abi): Call i386_target_description.
4957 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4958 if xcr0 is X86_XSTATE_X87_MASK.
4959 * i386-tdep.h (tdesc_i386): Remove the declaration.
4960 (tdesc_i386_mmx): Likewise.
4961
4962 2017-09-04 Yao Qi <yao.qi@linaro.org>
4963
4964 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4965 X86_XSTATE_SSE_MASK instead of 0.
4966
4967 2017-09-04 Yao Qi <yao.qi@linaro.org>
4968
4969 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4970 i386_target_description.
4971 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4972 i386_target_description.
4973 * i386-tdep.c (i386_gdbarch_init): Likewise.
4974
4975 2017-09-04 Yao Qi <yao.qi@linaro.org>
4976
4977 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4978 (x86_darwin_init_abi_64): Call amd64_target_description.
4979 * amd64-dicos-tdep.c: Likewise.
4980 * amd64-fbsd-nat.c: Likewise.
4981 * amd64-fbsd-tdep.c: Likewise.
4982 * amd64-nbsd-tdep.c: Likewise.
4983 * amd64-obsd-tdep.c: Likewise.
4984 * amd64-sol2-tdep.c: Likewise.
4985 * amd64-windows-tdep.c: Likewise.
4986 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4987
4988 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4989
4990 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4991 (btrace_function) <insn>: Change type to use std::vector.
4992 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4993 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4994 ftrace_update_insns, ftrace_compute_global_level_offset,
4995 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4996 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4997 change to std::vector.
4998 (ftrace_update_insns): Adjust to change to std::vector, change
4999 type of INSN parameter.
5000 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5001 * record-btrace.c (btrace_call_history_insn_range,
5002 btrace_compute_src_line_range,
5003 record_btrace_frame_prev_register): Adjust to change to
5004 std::vector.
5005 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5006 to change to std::vector.
5007
5008 2017-09-03 Tom Tromey <tom@tromey.com>
5009
5010 * corefile.c (reopen_exec_file): Use std::string.
5011
5012 2017-09-03 Tom Tromey <tom@tromey.com>
5013
5014 * compile/compile.c (compile_register_name_mangled): Return
5015 std::string.
5016 * compile/compile-loc2c.c (pushf_register_address): Update.
5017 (pushf_register): Update.
5018 * compile/compile-c-types.c (convert_array): Update.
5019 * compile/compile-c-symbols.c (generate_vla_size): Update.
5020 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5021 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5022 (convert_one_symbol): Update.
5023 (generate_c_for_for_one_variable): Update.
5024 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5025 std::string.
5026 (generate_register_struct): Update.
5027 * compile/compile-internal.h (c_get_range_decl_name): Return a
5028 std::string.
5029 (compile_register_name_mangled): Return std::string.
5030
5031 2017-09-03 Tom Tromey <tom@tromey.com>
5032
5033 * utils.c (perror_string): Return a std::string.
5034 (throw_perror_with_name, perror_warning_with_name): Update.
5035
5036 2017-09-03 Tom Tromey <tom@tromey.com>
5037
5038 * demangle.c (demangle_command): Use std::string,
5039 unique_xmalloc_ptr.
5040
5041 2017-09-03 Tom Tromey <tom@tromey.com>
5042
5043 * cli/cli-setshow.c (do_set_command): Use std::string.
5044
5045 2017-09-03 Tom Tromey <tom@tromey.com>
5046
5047 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5048
5049 2017-09-03 Tom Tromey <tom@tromey.com>
5050
5051 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5052
5053 2017-09-03 Tom Tromey <tom@tromey.com>
5054
5055 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5056 gdb::unique_xmalloc_ptr.
5057
5058 2017-09-03 Tom Tromey <tom@tromey.com>
5059
5060 * thread.c (print_thread_info_1): Use string_printf.
5061 (thread_apply_command, thread_apply_all_command): Use
5062 std::string.
5063
5064 2017-09-03 Tom Tromey <tom@tromey.com>
5065
5066 * valprint.c (val_print_string): Update.
5067 * gdbcore.h (memory_error_message): Return std::string.
5068 * corefile.c (memory_error_message): Return std::string.
5069 (memory_error): Update.
5070 * breakpoint.c (insert_bp_location): Update.
5071
5072 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5073
5074 * target/waitstatus.h (target_waitstatus_to_string): Change
5075 return type to std::string.
5076 * target/waitstatus.c (target_waitstatus_to_string): Return
5077 std::string.
5078 * target.h (target_waitstatus_to_string): Remove declaration.
5079 * infrun.c (resume, clear_proceed_status_thread,
5080 print_target_wait_results, do_target_wait, save_waitstatus,
5081 stop_all_threads): Adjust.
5082 * record-btrace.c (record_btrace_wait): Adjust.
5083 * target-debug.h
5084 (target_debug_print_struct_target_waitstatus_p): Adjust.
5085
5086 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5087
5088 PR gdb/22046
5089 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5090 detection.
5091
5092 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5093
5094 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5095 for setting/unsetting environment variables on the remote target.
5096 (New remote packets): Add entries for QEnvironmentHexEncoded,
5097 QEnvironmentUnset and QEnvironmentReset.
5098 * common/environ.c (gdb_environ::operator=): Extend method to
5099 handle m_user_set_env_list and m_user_unset_env_list.
5100 (gdb_environ::clear): Likewise.
5101 (match_var_in_string): Change type of first parameter from 'char
5102 *' to 'const char *'.
5103 (gdb_environ::set): Extend method to handle
5104 m_user_set_env_list and m_user_unset_env_list.
5105 (gdb_environ::unset): Likewise.
5106 (gdb_environ::clear_user_set_env): New method.
5107 (gdb_environ::user_set_envp): Likewise.
5108 (gdb_environ::user_unset_envp): Likewise.
5109 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5110 m_user_unset_env_list on move constructor/assignment.
5111 (unset): Add new default parameter 'update_unset_list = true'.
5112 (clear_user_set_env): New method.
5113 (user_set_envp): Likewise.
5114 (user_unset_envp): Likewise.
5115 (m_user_set_env_list): New std::set.
5116 (m_user_unset_env_list): Likewise.
5117 * common/rsp-low.c (hex2str): New function.
5118 (bin2hex): New overload for bin2hex function.
5119 * common/rsp-low.c (hex2str): New prototype.
5120 (str2hex): New overload prototype.
5121 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5122 QEnvironmentUnset and QEnvironmentReset.
5123 (remote_protocol_features): Add QEnvironmentHexEncoded,
5124 QEnvironmentUnset and QEnvironmentReset packets.
5125 (send_environment_packet): New function.
5126 (extended_remote_environment_support): Likewise.
5127 (extended_remote_create_inferior): Call
5128 extended_remote_environment_support.
5129 (_initialize_remote): Add QEnvironmentHexEncoded,
5130 QEnvironmentUnset and QEnvironmentReset packet configs.
5131 * unittests/environ-selftests.c (gdb_selftest_env_var):
5132 New variable.
5133 (test_vector_initialization): New function.
5134 (test_init_from_host_environ): Likewise.
5135 (test_reinit_from_host_environ): Likewise.
5136 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5137 Likewise.
5138 (test_unset_set_empty_vector): Likewise.
5139 (test_vector_clear): Likewise.
5140 (test_std_move): Likewise.
5141 (test_move_constructor):
5142 (test_self_move): Likewise.
5143 (test_set_unset_reset): Likewise.
5144 (run_tests): Rewrite in terms of the functions above.
5145
5146 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5147
5148 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5149 (adi_available): Use a temp variable of type CORE_ADDR as argument
5150 3 when calling target_auxv_search.
5151 (adi_normalize_address): Use masks and xor operators to calculate
5152 normalized address.
5153 (adi_read_versions, adi_write_versions, adi_print_versions)
5154 (do_examine, do_assign): Use paddress.
5155
5156 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5157
5158 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5159 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5160 out of loop and add supply of FIR.
5161 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5162 add collect of FIR.
5163
5164 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5165
5166 PR gdb/21827
5167 * cli/cli-script.c (define_command): Don't convert command name
5168 to lower case.
5169
5170 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5171
5172 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5173 Update all callers accordingly. Remove all code blocks handling
5174 the case where DISPP is not NULL.
5175
5176 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5177
5178 PR symtab/22003
5179 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5180 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5181 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5182
5183 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5184
5185 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5186 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5187 (read_comp_units_from_section): New parameter abbrev_section, use
5188 read_and_check_comp_unit_head, allocate signatured_type if needed.
5189 (create_all_comp_units): Update read_comp_units_from_section caller.
5190
5191 2017-08-23 Pedro Alves <palves@redhat.com>
5192
5193 PR remote/21852
5194 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5195 to null_ptid and switch to thread without reading the registers
5196 after adding the inferior.
5197
5198 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5199
5200 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5201 compile-gcc.
5202 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5203 (compile_to_object): Implement compile_gcc.
5204 (_initialize_compile): Install "set compile-gcc". Initialize
5205 compile_gcc.
5206
5207 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5208
5209 * compile/compile.c (compile_to_object): Conditionally call
5210 set_verbose. Conditionally call compile or compile_v0.
5211
5212 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5213
5214 * sparc64-tdep.h: (adi_normalize_address): New export.
5215 * sparc-nat.h: (open_adi_tag_fd): New export.
5216 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5217 * sparc64-linux-tdep.c:
5218 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5219 (sparc64_linux_handle_segmentation_fault): New function.
5220 (sparc64_linux_init_abi): Register
5221 sparc64_linux_handle_segmentation_fault
5222 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5223 (sparc64_addr_bits_remove): New function.
5224 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5225 (MAX_PROC_NAME_SIZE): New macro.
5226 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5227 (sparc64adilist): New variable.
5228 (adi_proc_list): New variable.
5229 (find_adi_info): New function.
5230 (add_adi_info): New function.
5231 (get_adi_info_proc): New function.
5232 (get_adi_info): New function.
5233 (info_adi_command): New function.
5234 (read_maps_entry): New function.
5235 (adi_available): New function.
5236 (adi_normalize_address): New function.
5237 (adi_align_address): New function.
5238 (adi_convert_byte_count): New function.
5239 (adi_tag_fd): New function.
5240 (adi_is_addr_mapped): New function.
5241 (adi_read_versions): New function.
5242 (adi_write_versions): New function.
5243 (adi_print_versions): New function.
5244 (do_examine): New function.
5245 (do_assign): New function.
5246 (adi_examine_command): New function.
5247 (adi_assign_command): New function.
5248 (_initialize_sparc64_adi_tdep): New function.
5249
5250 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5251
5252 * breakpoint.c (breakpoints_info): Rename to ...
5253 (info_breakpoints_command): ... this.
5254 (watchpoints_info): Rename to ...
5255 (info_watchpoints_command): ... this.
5256 (tracepoints_info): Rename to ...
5257 (info_tracepoints_command): ... this.
5258 (_initialize_breakpoint): Adjust.
5259 * dcache.c (dcache_info): Rename to ...
5260 (info_display_command): ... this.
5261 (_initialize_dcache): Adjust.
5262 * frame.h (args_info): Rename to ...
5263 (info_args_command): ... this.
5264 (locals_info): Rename to ...
5265 (info_locals_command): ... this.
5266 * infcmd.c (nofp_registers_info): Rename to ...
5267 (info_registers_command): ... this.
5268 (float_info): Rename to ...
5269 (info_float_command): ... this.
5270 (program_info): Rename to ...
5271 (info_program_command): ... this.
5272 (all_registers_info): Rename to ...
5273 (info_all_registers_command): ... this.
5274 (vector_info): Rename to ...
5275 (info_vector_command): ... this.
5276 (float_info): Rename to ...
5277 (info_float_command): ... this.
5278 (_initialize_infcmd): Adjust.
5279 * inferior.h (term_info): Rename to ...
5280 (info_terminal_command): ... this.
5281 * inflow.c (term_info): Rename to ...
5282 (info_terminal_command): ... this.
5283 (_initialize_inflow): Adjust.
5284 * infrun.c (signals_info): Rename to ...
5285 (info_signals_command): ... this.
5286 (_initialize_infrun): Adjust.
5287 * objc-lang.c (classes_info): Rename to ...
5288 (info_classes_command): ... this.
5289 (selectors_info): Rename to ...
5290 (info_selectors_command): ... this.
5291 (_initialize_objc_language): Adjust.
5292 * printcmd.c (sym_info): Rename to ...
5293 (info_symbol_command): ... this.
5294 (address_info): Rename to ...
5295 (info_address_command): ... this.
5296 (display_info): Rename to ...
5297 (info_display_command): ... this.
5298 (_initialize_printcmd): Adjust.
5299 * reverse.c (bookmarks_info): Rename to ...
5300 (info_breakpoints_command): ... this.
5301 (_initialize_reverse): Adjust.
5302 * ser-go32.c (dos_info): Rename to ...
5303 (info_serial_command): ... this.
5304 (_initialize_ser_dos): Adjust.
5305 * skip.c (skip_info): Rename to ...
5306 (info_skip_command): ... this.
5307 (_initialize_step_skip): Adjust.
5308 * source.c (line_info): Rename to ...
5309 (info_line_command): ... this.
5310 (source_info): Rename to ...
5311 (info_source_command)
5312 * stack.c (frame_info): Rename to ...
5313 (info_frame_command): ... this.
5314 (locals_info): Rename to ...
5315 (info_locals_command): ... this.
5316 (args_info): Rename to ...
5317 (info_args_command): ... this.
5318 (_initialize_stack): Adjust.
5319 * symtab.c (sources_info): Rename to ...
5320 (info_sources_command): ... this.
5321 (variables_info): Rename to ...
5322 (info_variables_command): ... this.
5323 (functions_info): Rename to ...
5324 (info_functions_command): ... this.
5325 (types_info): Rename to ...
5326 (info_types_command): ... this.
5327 (_initialize_symtab): Adjust.
5328 * target.c (target_info): Rename to ...
5329 (info_target_command): ... this.
5330 (initialize_targets): Adjust.
5331 * tracepoint.c (tvariables_info): Rename to ...
5332 (info_tvariables_command): ... this.
5333 (scope_info): Rename to ...
5334 (info_scope_command): ... this.
5335 (trace_dump_actions): Adjust.
5336 (_initialize_tracepoint): Adjust.
5337
5338 2017-08-22 Tom Tromey <tom@tromey.com>
5339
5340 * breakpoint.h (install_breakpoint): Update.
5341 * breakpoint.c (add_solib_catchpoint): Update.
5342 (install_breakpoint): Change argument to a std::unique_ptr.
5343 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5344 (create_breakpoint_sal, create_breakpoint): Update.
5345 (watch_command_1, catch_exec_command_1)
5346 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5347 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5348 Return the breakpoint.
5349 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5350 (new_single_step_breakpoint): Update.
5351 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5352 std::unique_ptr.
5353 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5354 std::unique_ptr.
5355 * break-catch-sig.c (create_signal_catchpoint): Use
5356 std::unique_ptr.
5357 * ada-lang.c (create_ada_exception_catchpoint): Use
5358 std::unique_ptr.
5359
5360 2017-08-22 Tom Tromey <tom@tromey.com>
5361
5362 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5363
5364 2017-08-22 Tom Tromey <tom@tromey.com>
5365
5366 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5367 (lookup_partial_symbol): Update.
5368
5369 2017-08-22 Tom Tromey <tom@tromey.com>
5370
5371 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5372 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5373 (find_and_open_source, symtab_to_fullname): Update.
5374 * psymtab.c (psymtab_to_fullname): Update.
5375
5376 2017-08-22 Tom Tromey <tom@tromey.com>
5377
5378 * exec.c (exec_file_attach): Update.
5379 * linux-thread-db.c (try_thread_db_load): Update.
5380 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5381 * utils.c (gdb_realpath): Change return type.
5382 (gdb_realpath_keepfile): Update.
5383 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5384 (_initialize_utils): Register the new self test.
5385 * source.c (openp): Update.
5386 (find_and_open_source): Update.
5387 * nto-tdep.c (nto_find_and_open_solib): Update.
5388 * main.c (set_gdb_data_directory): Update.
5389 (captured_main_1): Update.
5390 * dwarf2read.c (dwarf2_get_dwz_file): Update
5391 (dw2_map_symbol_filenames): Update.
5392 * auto-load.c (auto_load_safe_path_vec_update): Update.
5393 (filename_is_in_auto_load_safe_path_vec): Change type of
5394 "filename_realp".
5395 (auto_load_objfile_script): Update.
5396 (file_is_auto_load_safe): Update. Use std::string.
5397 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5398
5399 2017-08-22 Tom Tromey <tom@tromey.com>
5400
5401 * utils.c (gdb_realpath_keepfile): Return a
5402 gdb::unique_xmalloc_ptr.
5403 * exec.c (exec_file_attach): Update.
5404 * utils.h (gdb_realpath_keepfile): Return a
5405 gdb::unique_xmalloc_ptr.
5406
5407 2017-08-22 Tom Tromey <tom@tromey.com>
5408
5409 * compile/compile.c (compile_file_command): Use
5410 gdb::unique_xmalloc_ptr, std::string.
5411 * utils.c (gdb_abspath): Change return type.
5412 * source.c (openp): Update.
5413 * objfiles.c (allocate_objfile): Update.
5414 * main.c (set_gdb_data_directory): Update.
5415 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5416
5417 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5418
5419 * cli-cmds.c (list_commands): List actual code around more than
5420 one location.
5421
5422 2017-08-21 John Baldwin <jhb@FreeBSD.org>
5423
5424 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5425
5426 2017-08-21 Pedro Alves <palves@redhat.com>
5427
5428 PR gdb/19487
5429 * c-exp.y (variable production): Handle function aliases.
5430 * minsyms.c (msymbol_is_text): New function.
5431 * minsyms.h (msymbol_is_text): Declare.
5432 * symtab.c (find_function_alias_target): New function.
5433 * symtab.h (find_function_alias_target): Declare.
5434
5435 2017-08-21 Pedro Alves <palves@redhat.com>
5436
5437 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5438 typedefs.
5439 * typeprint.c (whatis_exp): If handling "whatis", and expression
5440 is OP_TYPE, strip one typedef level. Otherwise don't strip
5441 typedefs here.
5442 * valops.c (value_cast): Save "to" type before resolving
5443 stubs/typedefs. Use that type as resulting value's type.
5444
5445 2017-08-18 Tom Tromey <tom@tromey.com>
5446 Pedro Alves <palves@redhat.com>
5447
5448 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5449 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5450 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5451 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5452 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5453 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5454 (linux_get_siginfo_data): Add "thread" argument. Use
5455 scoped_restore.
5456 * linux-nat.c (linux_child_follow_fork)
5457 (check_stopped_by_watchpoint): Use scoped_restore.
5458 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5459 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5460 (restore_inferior_ptid, save_inferior_ptid): Remove.
5461 * btrace.c (btrace_fetch): Use scoped_restore.
5462 * bsd-uthread.c (bsd_uthread_fetch_registers)
5463 (bsd_uthread_store_registers): Use scoped_restore.
5464 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5465 scoped_restore.
5466 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5467 (aix_thread_xfer_partial): Use scoped_restore.
5468 * inferior.h (save_inferior_ptid): Remove.
5469
5470 2017-08-18 Yao Qi <yao.qi@linaro.org>
5471
5472 PR tdep/21818
5473 * arm-tdep.c (gdb_print_insn_arm): Mark
5474 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5475
5476 2017-08-18 Yao Qi <yao.qi@linaro.org>
5477
5478 * NEWS: Mention GDBserver's new option "--selftest".
5479 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5480 * selftest.c: Move it to common/selftest.c.
5481 * selftest.h: Move it to common/selftest.h.
5482 * selftest-arch.c (reset): New function.
5483 (tests_with_arch): Call reset.
5484
5485 2017-08-18 Yao Qi <yao.qi@linaro.org>
5486
5487 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5488 instead of exception_fprintf and printf_filtered.
5489
5490 2017-08-18 Yao Qi <yao.qi@linaro.org>
5491
5492 * selftest.c (register_self_test): Rename it to
5493 selftests::register_test.
5494 (run_self_tests): selftest::run_tests.
5495 * selftest.h: Update declarations.
5496 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5497 selftests::register_test_foreach_arch.
5498 * selftest-arch.h: Update declaration.
5499 * aarch64-tdep.c: Update.
5500 * arm-tdep.c: Likewise.
5501 * disasm-selftests.c: Likewise.
5502 * dwarf2loc.c: Likewise.
5503 * dwarf2-frame.c: Likewise.
5504 * findvar.c: Likewise.
5505 * gdbarch-selftests.c: Likewise.
5506 * maint.c (maintenance_selftest): Likewise.
5507 * regcache.c: Likewise.
5508 * rust-exp.y: Likewise.
5509 * selftest-arch.c: Likewise.
5510 * unittests/environ-selftests.c: Likewise.
5511 * unittests/function-view-selftests.c: Likewise.
5512 * unittests/offset-type-selftests.c: Likewise.
5513 * unittests/optional-selftests.c: Likewise.
5514 * unittests/scoped_restore-selftests.c: Likewise.
5515 * utils-selftests.c: Likewise.
5516
5517 2017-08-17 Pedro Alves <palves@redhat.com>
5518
5519 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5520 local.
5521
5522 2017-08-17 Pedro Alves <palves@redhat.com>
5523
5524 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5525 field.
5526 (reset_die_in_process): Delete, replaced by ...
5527 (process_die_scope): ... this new class. Make it responsible for
5528 freeing cu->line_header too.
5529 (process_die): Use process_die_scope.
5530 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5531 cu->line_header_die_owner. Don't release the line header if it's
5532 owned by the CU.
5533 (setup_type_unit_groups): Make the CU/DIE own the line header.
5534 Don't release the line header here.
5535
5536 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5537
5538 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5539
5540 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5541
5542 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5543 Single-Key mode
5544
5545 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5546
5547 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5548 mode command list.
5549
5550 2017-08-15 Stafford Horne <shorne@gmail.com>
5551
5552 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5553
5554 2017-08-15 Stafford Horne <shorne@gmail.com>
5555
5556 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5557
5558 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5559
5560 PR gdb/21954
5561 * infcmd.c (unset_environment_command): Use the 'clear' method on
5562 the environment instead of resetting it.
5563
5564 2017-08-15 John Baldwin <jhb@FreeBSD.org>
5565
5566 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5567 platforms.
5568
5569 2017-08-14 Tom Tromey <tom@tromey.com>
5570
5571 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5572 (print_binary_chars): Likewise.
5573 (BITS_IN_BYTES): Remove.
5574
5575 2017-08-14 Tom Tromey <tom@tromey.com>
5576
5577 PR gdb/21675
5578 * valprint.c (LOW_ZERO): Change value to 034.
5579 (print_octal_chars): Add static_asserts for octal constants.
5580 * printcmd.c (print_scalar_formatted): Add 'd' case.
5581
5582 2017-08-11 Tom Tromey <tom@tromey.com>
5583
5584 * symfile.c (add_symbol_file_command): Use std::vector.
5585
5586 2017-08-14 Tom Tromey <tom@tromey.com>
5587
5588 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5589 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5590 std::move.
5591 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5592
5593 2017-08-11 Pedro Alves <palves@redhat.com>
5594
5595 * infrun.c (process_event_stop_test): Adjust
5596 function_name_is_marked_for_skip call.
5597 * skip.c: Include <list>.
5598 (skiplist_entry): Make it a class with private fields, and
5599 getters/setters.
5600 (skiplist_entry_chain): Delete.
5601 (skiplist_entries): New.
5602 (skiplist_entry_count): Delete.
5603 (highest_skiplist_entry_num): New.
5604 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5605 (add_skiplist_entry): Delete.
5606 (skiplist_entry::skiplist_entry): New.
5607 (skiplist_entry::add_entry): New.
5608 (skip_file_command, skip_function): Adjust.
5609 (compile_skip_regexp): Delete.
5610 (skip_command): Don't compile regexp here. Adjust to use
5611 skiplist_entry::add_entry.
5612 (skip_info): Adjust to use range-for and getters.
5613 (skip_enable_command, skip_disable_command): Adjust to use
5614 range-for and setters.
5615 (skip_delete_command): Adjust to use std::list.
5616 (add_skiplist_entry): Delete.
5617 (skip_file_p): Delete, refactored as ...
5618 (skiplist_entry::do_skip_file_p): ... this new method.
5619 (skip_gfile_p): Delete, refactored as ...
5620 (skiplist_entry::do_gskip_file_p): ... this new method.
5621 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5622 (skiplist_entry::skip_function_p): ... this new method.
5623 (function_name_is_marked_for_skip): Now returns bool, and takes
5624 the function sal by const reference. Adjust to use range-for and
5625 skiplist_entry methods.
5626 (_initialize_step_skip): Remove references to
5627 skiplist_entry_chain, skiplist_entry_count.
5628 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5629 takes the function sal by const reference.
5630
5631 2017-08-11 Yao Qi <yao.qi@linaro.org>
5632
5633 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5634 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5635 (dwarf2_frame_cache):
5636 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5637 RETURN_MASK_ALL and set *this_case to NULL.
5638 * frame-unwind.h: Update comments.
5639
5640 2017-08-11 Yao Qi <yao.qi@linaro.org>
5641
5642 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5643 (dwarf2_frame_state_copy_regs): Remove.
5644 (dwarf2_frame_state_free_regs): Remove.
5645 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5646 (dwarf2_restore_rule): Call method .alloc_regs instead of
5647 dwarf2_frame_state_alloc_regs.
5648 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5649 constructor. Call std::move.
5650 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5651 (dwarf2_frame_cache): Likewise.
5652
5653 [GDB_SELF_TEST]: Include selftest.h and
5654 selftest-arch.h.
5655 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5656 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5657 execute_cfa_program_test.
5658
5659 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5660 copy ctor, assignment operator, move assignment.
5661 <alloc_regs>: New method.
5662 <swap>: New method.
5663 (struct dwarf2_frame_state): Delete dtor.
5664 (dwarf2_frame_state_alloc_regs): Remove declaration.
5665 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5666 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5667
5668 2017-08-11 Yao Qi <yao.qi@linaro.org>
5669
5670 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5671 (dwarf2_frame_state::dwarf2_frame_state): New.
5672 (dwarf2_frame_state::~dwarf2_frame_state): New.
5673 (dwarf2_fetch_cfa_info): Update.
5674 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5675 rather than a pointer. Update code.
5676 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5677 dtor.
5678 <data_align, code_align, retaddr_column>: Change them to const.
5679 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5680 to bool.
5681
5682 2017-08-11 Yao Qi <yao.qi@linaro.org>
5683
5684 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5685 <loc.exp>: New field.
5686 * dwarf2-frame.c (execute_cfa_program): Update.
5687 (dwarf2_frame_prev_register): Update.
5688
5689 2017-08-10 Pedro Alves <palves@redhat.com>
5690
5691 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5692
5693 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5694
5695 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5696 (fbsd_pending_children): Use std::list.
5697 (fbsd_remember_child): Likewise.
5698 (fbsd_is_child_pending): Likewise.
5699 (fbsd_pending_vfork_done): Use std::forward_list.
5700 (fbsd_add_vfork_done): Likewise.
5701 (fbsd_is_vfork_done_pending): Likewise.
5702 (fbsd_next_vfork_done): Likewise.
5703
5704 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5705
5706 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5707 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5708 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5709 for `mapfilename'.
5710 (fbsd_xfer_partial): Use gdb::byte_vector.
5711 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5712
5713 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5714
5715 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5716 "filestuff.h".
5717 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5718
5719 2017-08-09 Tom Tromey <tom@tromey.com>
5720
5721 * skip.c (skiplist_entry): New constructor.
5722 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5723 (skiplist_entry::file_is_glob): Now bool.
5724 (skiplist_entry::file, skiplist_entry::function): Now
5725 std::string.
5726 (make_skip_entry): Return a unique_ptr. Use new.
5727 (free_skiplist_entry, free_skiplist_entry_cleanup)
5728 (make_free_skiplist_entry_cleanup): Remove.
5729 (skip_command, skip_disable_command, add_skiplist_entry)
5730 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5731 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5732 (function_name_is_marked_for_skip): Update.
5733 (skip_delete_command): Update. Use delete.
5734
5735 2017-08-09 Jiong Wang <jiong.wang@arm.com>
5736
5737 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5738 (aarch64_linux_core_read_description): New function.
5739 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5740
5741 2017-08-09 Pedro Alves <palves@redhat.com>
5742
5743 * cp-name-parser.y (cp_comp_to_string): Return a
5744 gdb::unique_xmalloc_ptr<char>.
5745 * cp-support.c (replace_typedefs_qualified_name)
5746 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5747 (cp_canonicalize_string_full): Use op= instead of explicit
5748 convertion.
5749 (cp_class_name_from_physname, method_name_from_physname)
5750 (cp_func_name, cp_remove_params): Adjust to use
5751 gdb::unique_xmalloc_ptr<char>.
5752 * cp-support.h (cp_comp_to_string): Return a
5753 gdb::unique_xmalloc_ptr<char>.
5754 * python/py-type.c (typy_lookup_type): Adjust to use
5755 gdb::unique_xmalloc_ptr<char>.
5756
5757 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5758
5759 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5760
5761 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5762 Yao Qi <yao.qi@linaro.org>
5763
5764 * cp-support.c (cp_canonicalize_string_full): Use
5765 gdb::unique_xmalloc_ptr<char>.
5766 (cp_canonicalize_string): Likewise.
5767
5768 2017-08-09 Yao Qi <yao.qi@linaro.org>
5769
5770 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5771 * regformats/i386/amd64-avx-avx512.dat: Remove.
5772 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5773 * regformats/i386/amd64-avx-mpx.dat:Remove.
5774 * regformats/i386/amd64-avx.dat: Remove.
5775 * regformats/i386/amd64-mpx.dat: Remove.
5776 * regformats/i386/i386-avx-avx512.dat: Remove.
5777 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5778 * regformats/i386/i386-avx-mpx.dat: Remove.
5779 * regformats/i386/i386-mmx.dat: Remove.
5780 * regformats/i386/i386-mpx.dat: Remove.
5781
5782 2017-08-09 Yao Qi <yao.qi@linaro.org>
5783
5784 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5785 * amd64-tdep.c: Don't include features/i386/x32*.c.
5786 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5787 functions.
5788 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5789 and i386/x32-avx-avx512.
5790 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5791 and i386/x32.xml.
5792 * features/i386/x32-avx-avx512.c: Removed.
5793 * features/i386/x32-avx-avx512.xml: Removed.
5794 * features/i386/x32-avx.c: Removed.
5795 * features/i386/x32-avx.xml: Removed.
5796 * features/i386/x32.c: Removed.
5797 * features/i386/x32.xml: Removed.
5798 * regformats/i386/x32-avx-avx512.dat: Removed.
5799 * regformats/i386/x32-avx.dat: Removed.
5800 * regformats/i386/x32.dat: Removed.
5801
5802 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5803
5804 PR breakpoints/21886
5805 * mem-break.c (default_memory_insert_breakpoint): Use
5806 `->placed_address' rather than `->reqstd_address' for the
5807 breakpoint location.
5808
5809 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5810
5811 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5812 assertions.
5813
5814 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5815
5816 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5817 a union of `tdep_info', `tdesc_data' and `id'.
5818 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5819 rather than `info.tdep_info'.
5820 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5821 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5822 * i386-tdep.c (i386_gdbarch_init): Likewise.
5823 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5824 * mips-tdep.c (mips_gdbarch_init): Likewise.
5825 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5826 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5827 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5828 `info.tdep_info'.
5829 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5830 `info.tdep_info'.
5831 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5832 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5833 `info.tdep_info'.
5834 * spu-tdep.c (spu_gdbarch_init): Likewise.
5835 * gdbarch.h: Regenerate.
5836
5837 2017-08-07 Leszek Swirski <leszeks@google.com>
5838
5839 PR symtab/20899
5840 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5841
5842 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5843
5844 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5845 (gdbsim_open): Rename gdb_argv args object to argv.
5846
5847 2017-08-05 Tom Tromey <tom@tromey.com>
5848
5849 * compile/compile-object-load.c (compile_object_load): Use
5850 gdb::unique_xmalloc_ptr.
5851 * cli/cli-dump.c (scan_filename): Rename from
5852 scan_filename_with_cleanup. Change return type.
5853 (scan_expression): Rename from scan_expression_with_cleanup.
5854 Change return type.
5855 (dump_memory_to_file, dump_value_to_file, restore_command):
5856 Use gdb::unique_xmalloc_ptr. Update.
5857 * cli/cli-cmds.c (find_and_open_script): Use
5858 gdb::unique_xmalloc_ptr.
5859 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5860 * symmisc.c (maintenance_print_symbols)
5861 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5862 * symfile.c (symfile_bfd_open, generic_load)
5863 (add_symbol_file_command, remove_symbol_file_command): Use
5864 gdb::unique_xmalloc_ptr.
5865 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5866 * psymtab.c (maintenance_print_psymbols): Use
5867 gdb::unique_xmalloc_ptr.
5868 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5869 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5870 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5871 (reload_shared_libraries_1): Likewise.
5872
5873 2017-08-05 Tom Tromey <tom@tromey.com>
5874
5875 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5876 (rust_op_vector, rust_set_vector): New typedefs.
5877 (current_parser): New global.
5878 (work_obstack): Change to pointer type. Update all users.
5879 (rust_ast, pstate): Remove globals.
5880 (struct rust_parser): New.
5881 (%union) <params, field_inits>: Change type.
5882 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5883 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5884 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5885 (convert_params_to_types, convert_params_to_expression): Change
5886 type of "params".
5887 (ast_string): Change type of "fields".
5888 (rust_parse): Make a rust_parser. Remove cleanups.
5889 (rust_lex_tests): Make and install an auto_obstack.
5890
5891 2017-08-04 Yao Qi <yao.qi@linaro.org>
5892
5893 * configure.srv (ipa_x32_linux_regobj): New.
5894 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5895 instead of X86_TDESC_AVX512.
5896 (initialize_low_tracepoint): Call
5897 init_registers_x32_avx_avx512_linux.
5898
5899 2017-08-04 Yao Qi <yao.qi@linaro.org>
5900
5901 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5902
5903 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5904
5905 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5906
5907 2017-08-03 Tom Tromey <tom@tromey.com>
5908
5909 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5910 Remove.
5911 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5912
5913 2017-08-03 Tom Tromey <tom@tromey.com>
5914
5915 * python/py-param.c (compute_enum_values): Use gdb_argv.
5916
5917 2017-08-03 Tom Tromey <tom@tromey.com>
5918
5919 * utils.h (struct gdb_argv_deleter): New.
5920 (gdb_argv): New class.
5921 * utils.c (gdb_argv::reset): New method.
5922 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5923 * tracefile.c (tsave_command): Use gdb_argv.
5924 * top.c (new_ui_command): Use gdb_argv.
5925 * symmisc.c (maintenance_print_symbols)
5926 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5927 * symfile.c (symbol_file_command, generic_load)
5928 (remove_symbol_file_command): Use gdb_argv.
5929 * stack.c (backtrace_command): Use gdb_argv.
5930 * source.c (add_path, show_substitute_path_command)
5931 (unset_substitute_path_command, set_substitute_path_command):
5932 Use gdb_argv.
5933 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5934 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5935 * remote.c (extended_remote_run, remote_put_command)
5936 (remote_get_command, remote_delete_command): Use gdb_argv.
5937 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5938 (gdbsim_open): Use gdb_argv.
5939 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5940 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5941 * procfs.c (procfs_info_proc): Use gdb_argv.
5942 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5943 * infrun.c (handle_command): Use gdb_argv.
5944 * inferior.c (add_inferior_command, clone_inferior_command):
5945 Use gdb_argv.
5946 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5947 * exec.c (exec_file_command): Use gdb_argv.
5948 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5949 * compile/compile.c (build_argc_argv): Use gdb_argv.
5950
5951 2017-08-03 Tom Tromey <tom@tromey.com>
5952
5953 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5954
5955 2017-08-03 Tom Tromey <tom@tromey.com>
5956
5957 * python/python.c (compute_python_string): Return std::string.
5958 (gdbpy_eval_from_control_command): Update.
5959 (do_start_initialization): Use std::string.
5960 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5961 xstrprintf.
5962 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5963 xstrprintf.
5964
5965 2017-08-03 Tom Tromey <tom@tromey.com>
5966
5967 * top.h (do_restore_instream_cleanup): Remove.
5968 * top.c (do_restore_instream_cleanup): Remove.
5969 (read_command_file): Use scoped_restore.
5970 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5971
5972 2017-08-03 Tom Tromey <tom@tromey.com>
5973
5974 * cli/cli-script.c (execute_user_command)
5975 (execute_control_command): Use scoped_restore.
5976
5977 2017-08-03 Tom Tromey <tom@tromey.com>
5978
5979 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5980 (execute_user_command): Remove user_call_depth; use
5981 user_args_stack's size instead.
5982
5983 2017-08-03 Tom Tromey <tom@tromey.com>
5984
5985 * top.h (in_user_command): Remove.
5986 * top.c (in_user_command): Remove.
5987 * cli/cli-script.c (do_restore_user_call_depth)
5988 (execute_user_command): Update.
5989
5990 2017-08-03 Tom Tromey <tom@tromey.com>
5991
5992 * valops.c (search_struct_method): Use gdb::byte_vector.
5993 * valarith.c (value_concat): Use std::vector.
5994 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5995 (simple_search_memory): Likewise.
5996 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5997 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5998 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5999 * elfread.c (elf_rel_plt_read): Use std::string.
6000 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6001 * cli/cli-dump.c (restore_section_callback): Use
6002 gdb::byte_vector.
6003
6004 2017-08-03 Tom Tromey <tom@tromey.com>
6005
6006 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6007
6008 2017-08-03 Tom Tromey <tom@tromey.com>
6009
6010 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6011 (tui_register_format): Use scoped_restore.
6012
6013 2017-08-03 Tom Tromey <tom@tromey.com>
6014
6015 * reverse.c (exec_direction_default): Remove.
6016 (exec_reverse_once): Use scoped_restore.
6017 * remote.c (restore_remote_timeout): Remove.
6018 (remote_flash_erase, remote_flash_write, remote_flash_done)
6019 (readchar, remote_serial_write): Use scoped_restore.
6020 * cli/cli-script.c (struct source_cleanup_lines_args)
6021 (source_cleanup_lines): Remove.
6022 (script_from_file): Use scoped_restore.
6023 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6024 (source_command): Use scoped_restore.
6025
6026 2017-08-03 Tom Tromey <tom@tromey.com>
6027
6028 * utils.h (make_cleanup_free_so): Remove.
6029 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6030 * solist.h (struct so_deleter): New.
6031 (so_list_up): New typedef.
6032 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6033
6034 2017-08-03 Tom Tromey <tom@tromey.com>
6035
6036 * utils.h (make_cleanup_restore_current_language): Remove.
6037 * utils.c (do_restore_current_language)
6038 (make_cleanup_restore_current_language): Remove.
6039 * parse.c (parse_exp_in_context_1)
6040 (parse_expression_with_language): Use
6041 scoped_restore_current_language.
6042 * mi/mi-main.c (mi_cmd_execute): Use
6043 scoped_restore_current_language.
6044 * language.h (scoped_restore_current_language): New class.
6045
6046 2017-08-03 Tom Tromey <tom@tromey.com>
6047
6048 * compile/compile.c (cleanup_unlink_file): Remove.
6049 (compile_to_object): Use gdb::unlinker.
6050 (eval_compile_command): Likewise.
6051
6052 2017-08-03 Tom Tromey <tom@tromey.com>
6053
6054 * utils.h (make_cleanup_fclose): Remove.
6055 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6056
6057 2017-08-03 Tom Tromey <tom@tromey.com>
6058
6059 * top.c (open_terminal_stream): Return gdb_file_up.
6060 (new_ui_command): Update.
6061
6062 2017-08-03 Tom Tromey <tom@tromey.com>
6063
6064 * source.c (print_source_lines_base, forward_search_command)
6065 (reverse_search_command): Use gdb_file_up.
6066
6067 2017-08-03 Tom Tromey <tom@tromey.com>
6068
6069 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6070
6071 2017-08-03 Tom Tromey <tom@tromey.com>
6072
6073 * cli/cli-cmds.c (find_and_open_script): Change return type.
6074 Remove "streamp" and "full_path" parameters.
6075 (source_script_with_search): Update.
6076 * auto-load.c (source_script_file): Update.
6077 * cli/cli-cmds.h (find_and_open_script): Change type.
6078 (open_script): New struct.
6079
6080 2017-08-03 Tom Tromey <tom@tromey.com>
6081
6082 * xml-support.c (xml_fetch_content_from_file): Update.
6083 * ui-file.c (stdio_file::open): Update.
6084 * tracefile-tfile.c (tfile_start): Update.
6085 * remote.c (remote_file_put, remote_file_get): Update.
6086 * nat/linux-procfs.c (linux_proc_get_int)
6087 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6088 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6089 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6090 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6091 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6092 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6093 * linux-nat.c (linux_proc_pending_signals): Update.
6094 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6095 (file_closer): Remove.
6096 * compile/compile.c (compile_to_object): Update.
6097 * common/filestuff.h (struct gdb_file_deleter): New.
6098 (gdb_file_up): New typedef.
6099 (gdb_fopen_cloexec): Change return type.
6100 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6101 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6102 (dump_binary_file, restore_binary_file): Update.
6103 * auto-load.c (auto_load_objfile_script_1): Update.
6104
6105 2017-08-03 Tom Tromey <tom@tromey.com>
6106
6107 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6108 (info_static_tracepoint_markers_command): Likewise.
6109 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6110 * skip.c (skip_info): Use ui_out_emit_table.
6111 * progspace.c (print_program_space): Use ui_out_emit_table.
6112 * osdata.c (info_osdata): Use ui_out_emit_table.
6113 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6114 ui_out_emit_table.
6115 * linux-thread-db.c (info_auto_load_libthread_db): Use
6116 ui_out_emit_table.
6117 * inferior.c (print_inferior): Use ui_out_emit_table.
6118 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6119 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6120 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6121 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6122 * ui-out.h (class ui_out_emit_table): New.
6123
6124 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6125
6126 * mips-tdep.c (mips_fpu_type_str): New function.
6127 (mips_dump_tdep): Call it.
6128
6129 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6130
6131 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6132 `->mips_fpu_type'.
6133
6134 2017-07-31 Xavier Roirand <roirand@adacore.com>
6135
6136 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6137
6138 2017-07-27 Xavier Roirand <roirand@adacore.com>
6139
6140 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6141
6142 2017-07-26 Yao Qi <yao.qi@linaro.org>
6143
6144 * cli/cli-cmds.c (maintenancechecklist): New variable.
6145 * gdbcmd.h (maintenancechecklist): Declare it.
6146 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6147 Call i386_linux_read_description with different masks.
6148 * maint.c (maintenance_check_command): New function.
6149 (_initialize_maint_cmds): Call add_prefix_cmd.
6150 * target-descriptions.c (tdesc_reg): override operator != and ==.
6151 (tdesc_type): Likewise.
6152 (tdesc_feature): Likewise.
6153 (target_desc): Likewise.
6154 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6155 (maintenance_check_xml_descriptions): New function.
6156 (_initialize_target_descriptions) Add command "xml-descriptions".
6157 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6158
6159 2017-07-26 Yao Qi <yao.qi@linaro.org>
6160
6161 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6162 Include features/i386/32bit-*.c.
6163 (i386_linux_read_description): Generate target description if it
6164 doesn't exist.
6165 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6166 functions.
6167 * features/i386/32bit-linux.c: Re-generated.
6168 * features/i386/32bit-sse.c: Likewise.
6169 * target-descriptions.c (print_c_feature::visit): Print code to
6170 set register number if needed.
6171 (print_c_feature) <m_next_regnum>: New field.
6172
6173 2017-07-26 Yao Qi <yao.qi@linaro.org>
6174
6175 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6176 (FEATURE_XMLFILES): New.
6177 (FEATURE_CFILES): New.
6178 New rules.
6179 (clean-cfiles): Remove generated c files.
6180 * features/i386/32bit-avx.c: Generated.
6181 * features/i386/32bit-avx512.c: Generated.
6182 * features/i386/32bit-core.c: Generated.
6183 * features/i386/32bit-linux.c: Generated.
6184 * features/i386/32bit-mpx.c: Generated.
6185 * features/i386/32bit-pkeys.c: Generated.
6186 * features/i386/32bit-sse.c: Generated.
6187 * target-descriptions.c: Include algorithm.
6188 (tdesc_element_visitor): Add method visit_end.
6189 (print_c_tdesc): Implement visit_end.
6190 (print_c_tdesc:: m_filename_after_features): Move it to
6191 protected.
6192 (print_c_feature): New class.
6193 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6194 name starts with "i386/32bit-".
6195
6196 2017-07-26 Yao Qi <yao.qi@linaro.org>
6197
6198 * target-descriptions.c (tdesc_element_visitor): New class.
6199 (tdesc_element): New class.
6200 (tdesc_reg): Inherit from tdesc_element.
6201 (tdesc_reg::accept): New function.
6202 (tdesc_type): Inherit from tdesc_element.
6203 (tdesc_type::accept): New function.
6204 (tdesc_feature): Inherit from tdesc_element.
6205 (tdesc_feature::accept): New function.
6206 (target_desc): Inherit from tdesc_element.
6207 (target_desc::target_desc): New.
6208 (target_desc::~target_desc): New.
6209 (target_desc::accept): New.
6210 (allocate_target_description): Use new.
6211 (free_target_description): Use delete.
6212 (print_c_tdesc): New class.
6213 (maint_print_c_tdesc_cmd): Adjust.
6214
6215 * features/aarch64.c: Re-generated.
6216 * features/arc-arcompact.c: Re-generated.
6217 * features/arc-v2.c: Re-generated.
6218 * features/arm/arm-with-iwmmxt.c: Re-generated.
6219 * features/arm/arm-with-m.c: Re-generated.
6220 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6221 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6222 * features/arm/arm-with-neon.c: Re-generated.
6223 * features/arm/arm-with-vfpv2.c: Re-generated.
6224 * features/arm/arm-with-vfpv3.c: Re-generated.
6225 * features/i386/amd64-avx-avx512.c: Re-generated.
6226 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6227 * features/i386/amd64-avx.c: Re-generated.
6228 * features/i386/amd64-avx-linux.c: Re-generated.
6229 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6230 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6231 * features/i386/amd64-avx-mpx.c: Re-generated.
6232 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6233 * features/i386/amd64.c: Re-generated.
6234 * features/i386/amd64-linux.c: Re-generated.
6235 * features/i386/amd64-mpx.c: Re-generated.
6236 * features/i386/amd64-mpx-linux.c: Re-generated.
6237 * features/i386/i386-avx-avx512.c: Re-generated.
6238 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6239 * features/i386/i386-avx.c: Re-generated.
6240 * features/i386/i386-avx-linux.c: Re-generated.
6241 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6242 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6243 * features/i386/i386-avx-mpx.c: Re-generated.
6244 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6245 * features/i386/i386.c: Re-generated.
6246 * features/i386/i386-linux.c: Re-generated.
6247 * features/i386/i386-mmx.c: Re-generated.
6248 * features/i386/i386-mmx-linux.c: Re-generated.
6249 * features/i386/i386-mpx.c: Re-generated.
6250 * features/i386/i386-mpx-linux.c: Re-generated.
6251 * features/i386/x32-avx-avx512.c: Re-generated.
6252 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6253 * features/i386/x32-avx.c: Re-generated.
6254 * features/i386/x32-avx-linux.c: Re-generated.
6255 * features/i386/x32.c: Re-generated.
6256 * features/i386/x32-linux.c: Re-generated.
6257 * features/microblaze.c: Re-generated.
6258 * features/microblaze-with-stack-protect.c: Re-generated.
6259 * features/mips64-dsp-linux.c: Re-generated.
6260 * features/mips64-linux.c: Re-generated.
6261 * features/mips-dsp-linux.c: Re-generated.
6262 * features/mips-linux.c: Re-generated.
6263 * features/nds32.c: Re-generated.
6264 * features/nios2.c: Re-generated.
6265 * features/nios2-linux.c: Re-generated.
6266 * features/rs6000/powerpc-32.c: Re-generated.
6267 * features/rs6000/powerpc-32l.c: Re-generated.
6268 * features/rs6000/powerpc-403.c: Re-generated.
6269 * features/rs6000/powerpc-403gc.c : Re-generated.
6270 * features/rs6000/powerpc-405.c: Re-generated.
6271 * features/rs6000/powerpc-505.c: Re-generated.
6272 * features/rs6000/powerpc-601.c: Re-generated.
6273 * features/rs6000/powerpc-602.c: Re-generated.
6274 * features/rs6000/powerpc-603.c: Re-generated.
6275 * features/rs6000/powerpc-604.c: Re-generated.
6276 * features/rs6000/powerpc-64.c: Re-generated.
6277 * features/rs6000/powerpc-64l.c: Re-generated.
6278 * features/rs6000/powerpc-7400.c: Re-generated.
6279 * features/rs6000/powerpc-750.c: Re-generated.
6280 * features/rs6000/powerpc-860.c: Re-generated.
6281 * features/rs6000/powerpc-altivec32.c: Re-generated.
6282 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6283 * features/rs6000/powerpc-altivec64.c: Re-generated.
6284 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6285 * features/rs6000/powerpc-cell32l.c: Re-generated.
6286 * features/rs6000/powerpc-cell64l.c: Re-generated.
6287 * features/rs6000/powerpc-e500.c: Re-generated.
6288 * features/rs6000/powerpc-e500l.c: Re-generated.
6289 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6290 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6291 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6292 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6293 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6294 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6295 * features/rs6000/powerpc-vsx32.c: Re-generated.
6296 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6297 * features/rs6000/powerpc-vsx64.c: Re-generated.
6298 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6299 * features/rs6000/rs6000.c: Re-generated.
6300 * features/s390-linux32.c: Re-generated.
6301 * features/s390-linux32v1.c: Re-generated.
6302 * features/s390-linux32v2.c: Re-generated.
6303 * features/s390-linux64.c: Re-generated.
6304 * features/s390-linux64v1.c: Re-generated.
6305 * features/s390-linux64v2.c: Re-generated.
6306 * features/s390-te-linux64.c: Re-generated.
6307 * features/s390-tevx-linux64.c: Re-generated.
6308 * features/s390-vx-linux64.c: Re-generated.
6309 * features/s390x-linux64.c: Re-generated.
6310 * features/s390x-linux64v1.c: Re-generated.
6311 * features/s390x-linux64v2.c: Re-generated.
6312 * features/s390x-te-linux64.c: Re-generated.
6313 * features/s390x-tevx-linux64.c: Re-generated.
6314 * features/s390x-vx-linux64.c: Re-generated.
6315 * features/sparc/sparc32-solaris.c: Re-generated.
6316 * features/sparc/sparc64-solaris.c: Re-generated.
6317 * features/tic6x-c62x.c: Re-generated.
6318 * features/tic6x-c62x-linux.c: Re-generated.
6319 * features/tic6x-c64x.c: Re-generated.
6320 * features/tic6x-c64x-linux.c: Re-generated.
6321 * features/tic6x-c64xp.c: Re-generated.
6322 * features/tic6x-c64xp-linux.c: Re-generated.
6323
6324 2017-07-26 Yao Qi <yao.qi@linaro.org>
6325
6326 * i386-linux-tdep.c (i386_linux_read_description): New function.
6327 (i386_linux_core_read_description): Call
6328 i386_linux_read_description.
6329 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6330 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6331 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6332 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6333 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6334 * x86-linux-nat.c (x86_linux_read_description): Call
6335 i386_linux_read_description.
6336
6337 2017-07-26 Yao Qi <yao.qi@linaro.org>
6338
6339 * NEWS: Mention it.
6340 * features/Makefile (%.c: %.xml): Pass the xml file name to
6341 command "maint print c-tdesc".
6342 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6343 name from 'arg'.
6344
6345 2017-07-26 Yao Qi <yao.qi@linaro.org>
6346
6347 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6348 in-class initialization.
6349 (tdesc_create_feature): Call new instead of XCNEW.
6350 (free_target_description): Ue delete.
6351
6352 2017-07-25 John Baldwin <jhb@FreeBSD.org>
6353
6354 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6355
6356 2017-07-25 Yao Qi <yao.qi@linaro.org>
6357
6358 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6359 constant.
6360 (amd64_x32_init_abi): Likewise.
6361 * amd64-tdep.h (amd64_init_abi): Update declaration.
6362 (amd64_x32_init_abi): Likewise.
6363
6364 2017-07-25 Yao Qi <yao.qi@linaro.org>
6365
6366 PR tdep/21717
6367 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6368 condition for FPSCR.
6369 (arm_linux_store_inferior_registers): Likewise.
6370
6371 2017-07-22 Tom Tromey <tom@tromey.com>
6372
6373 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6374 <syscalls_counts>: Now a std::vector.
6375 (get_catch_syscall_inferior_data): Use "new".
6376 (catch_syscall_inferior_data_cleanup): Use "delete".
6377 (insert_catch_syscall, remove_catch_syscall)
6378 (clear_syscall_counts): Update.
6379
6380 2017-07-22 Tom Tromey <tom@tromey.com>
6381
6382 * break-catch-syscall.c (syscall_catchpoint)
6383 <syscalls_to_be_caught>: Now a std::vector<int>
6384 (~syscall_catchpoint): Remove.
6385 (insert_catch_syscall, remove_catch_syscall)
6386 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6387 (print_mention_catch_syscall, print_recreate_catch_syscall):
6388 Update.
6389 (create_syscall_event_catchpoint): Change type of "filter"
6390 parameter.
6391 (catch_syscall_split_args): Return a std::vector.
6392 (catch_syscall_command_1, catching_syscall_number_1): Update.
6393
6394 2017-07-22 Tom Tromey <tom@tromey.com>
6395
6396 * break-catch-throw.c (struct exception_catchpoint)
6397 <exception_rx>: Now a std::string.
6398 (~exception_catchpoint): Remove.
6399 (print_one_detail_exception_catchpoint): Update.
6400 (handle_gnu_v3_exceptions): Change type of except_rx.
6401 (extract_exception_regexp): Return a std::string.
6402 (catch_exception_command_1): Update.
6403
6404 2017-07-22 Tom Tromey <tom@tromey.com>
6405
6406 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6407 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6408 std::vector.
6409 <catch_all>: Now a bool.
6410 (~signal_catchpoint): Remove.
6411 (signal_catchpoint_insert_location)
6412 (signal_catchpoint_remove_location)
6413 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6414 (signal_catchpoint_print_mention)
6415 (signal_catchpoint_print_recreate)
6416 (signal_catchpoint_explains_signal): Update.
6417 (create_signal_catchpoint): Change type of "filter" and
6418 "catch_all".
6419 (catch_signal_split_args): Return a std::vector. Change type of
6420 "catch_all".
6421 (catch_signal_command): Update.
6422
6423 2017-07-20 Pedro Alves <palves@redhat.com>
6424
6425 * ada-lang.c (ada_language_defn): Make extern.
6426 (_initialize_ada_language): Remove add_language call.
6427 * c-lang.c (c_language_defn, cplus_language_defn)
6428 (asm_language_defn, minimal_language_defn): Make extern.
6429 (_initialize_c_language): Delete.
6430 * completer.c (compare_cstrings): Delete, moved to utils.h.
6431 * d-lang.c (d_language_defn): Make extern.
6432 (_initialize_d_language): Remove add_language calls.
6433 * defs.h (enum language): Add comment.
6434 * f-lang.c (f_language_defn): Make extern.
6435 (_initialize_f_language): Remove add_language call.
6436 * go-lang.c (go_language_defn): Make extern.
6437 (_initialize_go_language): Remove add_language call.
6438 * language.c: Include <algorithm>.
6439 (languages): Redefine as const array.
6440 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6441 (set_language_command): Handle "local". Use for-range loop.
6442 (set_language): Remove loop.
6443 (language_enum): Rewrite.
6444 (language_def, language_str): Remove loops.
6445 (add_language): Delete.
6446 (add_set_language_command): New, based on add_languages.
6447 (skip_language_trampoline): Adjust.
6448 (local_language_defn): Delete.
6449 (language_gdbarch_post_init): Adjust.
6450 (_initialize_language): Remove add_language calls. Call
6451 add_set_language_command.
6452 * language.h (add_language): Delete.
6453 (auto_language_defn)
6454 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6455 (asm_language_defn, c_language_defn, cplus_language_defn)
6456 (d_language_defn, f_language_defn, go_language_defn)
6457 (m2_language_defn, objc_language_defn, opencl_language_defn)
6458 (pascal_language_defn, rust_language_defn): Declare.
6459 * m2-lang.c (m2_language_defn): Make extern.
6460 (_initialize_m2_language): Remove add_language call.
6461 * objc-lang.c (objc_language_defn): Make extern.
6462 (_initialize_objc_language): Remove add_language call.
6463 * opencl-lang.c (opencl_language_defn): Make extern.
6464 (_initialize_opencl_language): Remove add_language call.
6465 * p-lang.c (pascal_language_defn): Make extern.
6466 (_initialize_pascal_language): Delete.
6467 * rust-lang.c (rust_language_defn): Make extern.
6468 (_initialize_rust_language): Delete.
6469 * utils.h (compare_cstrings): New static inline function.
6470
6471 2017-07-20 Pedro Alves <palves@redhat.com>
6472
6473 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6474 (get_var_value): Constify parameters.
6475 (get_int_var_value): Change prototype.
6476 (to_fixed_range_type): Adjust.
6477 * ada-lang.h (get_int_var_value): Change prototype.
6478
6479 2017-07-20 Pedro Alves <palves@redhat.com>
6480
6481 * dwarf2read.c (dw2_lookup_symbol): Use
6482 SYMBOL_MATCHES_SEARCH_NAME.
6483 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6484
6485 2017-07-20 Pedro Alves <palves@redhat.com>
6486
6487 * block.c (block_iter_name_step, block_iter_name_first)
6488 (block_iter_name_next): Delete.
6489 (block_lookup_symbol_primary): Adjust to use
6490 dict_iter_match_first/dict_iter_match_next.
6491 * block.h (block_iter_name_first, block_iter_name_next): Delete
6492 declarations.
6493 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6494 dict_iter_match_first/dict_iter_match_next.
6495
6496 2017-07-20 Pedro Alves <palves@redhat.com>
6497
6498 * cp-support.c (cp_find_first_component_aux): Add missing case for
6499 end of string.
6500
6501 2017-07-18 David Blaikie <dblaikie@gmail.com>
6502
6503 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6504 of dwo_cu's dwo_file.
6505
6506 2017-07-18 Yao Qi <yao.qi@linaro.org>
6507
6508 * remote.c (store_registers_using_G): Remove one line comment.
6509
6510 2017-07-18 Yao Qi <yao.qi@linaro.org>
6511
6512 * regcache.c (regcache_cpy): Simplify it.
6513 (regcache::cpy_no_passthrough): Remove it.
6514 * regcache.h (cpy_no_passthrough): Remove it.
6515 (regcache_dup, regcache_cpy): Update comments.
6516
6517 2017-07-18 Pedro Alves <palves@redhat.com>
6518
6519 * remote-sim.c (sim_command_completer): Adjust to work with a
6520 completion_tracker instead of a VEC.
6521
6522 2017-07-17 Pedro Alves <palves@redhat.com>
6523
6524 * completer.c (complete_source_filenames): New function.
6525 (complete_address_and_linespec_locations): New function.
6526 (location_completer): Use complete_address_and_linespec_locations.
6527 (completion_tracker::build_completion_result): Honor the tracker's
6528 request to suppress append.
6529 * completer.h (completion_tracker::suppress_append_ws)
6530 (completion_tracker::set_suppress_append_ws): New methods.
6531 (completion_tracker::m_suppress_append_ws): New field.
6532 (complete_source_filenames): New declaration.
6533 * linespec.c (linespec_complete_what): New.
6534 (struct ls_parser) <complete_what, completion_word,
6535 completion_quote_char, completion_quote_end, completion_tracker>:
6536 New fields.
6537 (string_find_incomplete_keyword_at_end): New.
6538 (linespec_lexer_lex_string): Record quote char. If in completion
6539 mode, don't throw.
6540 (linespec_lexer_consume_token): Advance the completion word point.
6541 (linespec_lexer_peek_token): Save/restore completion info.
6542 (save_stream_and_consume_token): New.
6543 (set_completion_after_number): New.
6544 (linespec_parse_basic): Set what to complete next depending on
6545 token. Handle function and label completions specially.
6546 (parse_linespec): Disable objc shortcut in completion mode. Set
6547 what to complete next depending on token type. Skip keyword if in
6548 completion mode.
6549 (complete_linespec_component, linespec_complete): New.
6550 * linespec.h (linespec_complete): Declare.
6551
6552 2017-07-17 Pedro Alves <palves@redhat.com>
6553
6554 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6555 Handle 'operator<' / 'operator<<'.
6556
6557 2017-07-17 Pedro Alves <palves@redhat.com>
6558
6559 * completer.c (collect_explicit_location_matches): Handle
6560 MATCH_LABEL.
6561 (convert_explicit_location_to_linespec): New, factored out from
6562 ...
6563 (convert_explicit_location_to_sals): ... this.
6564 (complete_label): New.
6565 (linespec_complete_label, find_label_symbols_in_block): New.
6566 (find_label_symbols): Add completion_mode parameter and adjust to
6567 call find_label_symbols_in_block.
6568 * linespec.h (linespec_complete_label): Declare.
6569
6570 2017-07-17 Pedro Alves <palves@redhat.com>
6571
6572 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6573 complete_symbol_mode parameter.
6574 * cli/cli-cmds.c (complete_command): Get the completion result out
6575 of the handle_brkchars tracker if used a custom word point.
6576 * completer.c: Include "linespec.h".
6577 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6578 (advance_to_expression_complete_word_point): New.
6579 (completion_tracker::completes_to_completion_word): New.
6580 (complete_files_symbols): Pass down
6581 complete_symbol_mode::EXPRESSION.
6582 (explicit_options, probe_options): New.
6583 (collect_explicit_location_matches): Complete on the
6584 explictit_loc->foo instead of word. Use
6585 linespec_complete_function. Handle MATCH_LINE. Handle offering
6586 keyword and options completions.
6587 (backup_text_ptr): Delete.
6588 (skip_keyword): New.
6589 (complete_explicit_location): Remove 'word' parameter. Add
6590 language, quoted_arg_start and quoted_arg_end parameters.
6591 Rewrite, parsing left to right.
6592 (location_completer): Rewrite.
6593 (location_completer_handle_brkchars): New function.
6594 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6595 (enum complete_line_internal_reason): Adjust comments.
6596 (completion_tracker::discard_completions): New.
6597 (completer_handle_brkchars_func_for_completer): Handle
6598 location_completer.
6599 (gdb_custom_word_point_brkchars)
6600 (gdb_org_rl_basic_quote_characters): New.
6601 (gdb_completion_word_break_characters_throw)
6602 (completion_find_completion_word): Handle trackers that use a
6603 custom word point.
6604 (completion_tracker::advance_custom_word_point_by): New.
6605 (completion_tracker::build_completion_result): Don't rely on
6606 readline appending the quote char.
6607 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6608 use a custom word point.
6609 (gdb_rl_attempted_completion_function): Restore
6610 rl_basic_quote_characters.
6611 * completer.h (class completion_tracker): Extend intro comment.
6612 (completion_tracker::set_quote_char)
6613 (completion_tracker::quote_char)
6614 (completion_tracker::set_use_custom_word_point)
6615 (completion_tracker::use_custom_word_point)
6616 (completion_tracker::custom_word_point)
6617 (completion_tracker::set_custom_word_point)
6618 (completion_tracker::advance_custom_word_point_by)
6619 (completion_tracker::completes_to_completion_word)
6620 (completion_tracker::discard_completions): New methods.
6621 (completion_tracker::m_quote_char)
6622 (completion_tracker::m_use_custom_word_point)
6623 (completion_tracker::m_custom_word_point): New fields.
6624 (advance_to_expression_complete_word_point): Declare.
6625 * f-lang.c (f_collect_symbol_completion_matches): Add
6626 complete_symbol_mode parameter.
6627 * language.h (struct language_defn)
6628 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6629 parameter.
6630 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6631 (linespec_complete_function): New function.
6632 (linespec_lexer_lex_keyword): Adjust.
6633 * linespec.h (linespec_keywords, linespec_complete_function): New
6634 declarations.
6635 * location.c (find_end_quote): New function.
6636 (explicit_location_lex_one): Add explicit_completion_info
6637 parameter. Save quoting info. Don't throw if being called for
6638 completion. Don't handle Ada operators here.
6639 (is_cp_operator, skip_op_false_positives, first_of)
6640 (explicit_location_lex_one_function): New function.
6641 (string_to_explicit_location): Replace 'dont_throw' parameter with
6642 an explicit_completion_info pointer parameter. Handle it. Don't
6643 use explicit_location_lex_one to lex function names. Use
6644 explicit_location_lex_one_function instead.
6645 * location.h (struct explicit_completion_info): New.
6646 (string_to_explicit_location): Replace 'dont_throw' parameter with
6647 an explicit_completion_info pointer parameter.
6648 * symtab.c (default_collect_symbol_completion_matches_break_on):
6649 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6650 (default_collect_symbol_completion_matches)
6651 (collect_symbol_completion_matches): Add complete_symbol_mode
6652 parameter.
6653 (collect_symbol_completion_matches_type): Pass down
6654 complete_symbol_mode::EXPRESSION.
6655 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6656 parameter. Handle LINESPEC mode.
6657 * symtab.h (complete_symbol_mode): New.
6658 (default_collect_symbol_completion_matches_break_on)
6659 (default_collect_symbol_completion_matches)
6660 (collect_symbol_completion_matches)
6661 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6662 parameter.
6663
6664 2017-07-17 Pedro Alves <palves@redhat.com>
6665
6666 * utils.c (enum class strncmp_iw_mode): New.
6667 (strcmp_iw): Rename to ...
6668 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6669 parameters. Handle them.
6670 (strncmp_iw): New.
6671 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6672 * utils.h (strncmp_iw): Declare.
6673 (strcmp_iw): Move describing comments here.
6674
6675 2017-07-17 Pedro Alves <palves@redhat.com>
6676
6677 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6678 CP_OPERATOR_STR.
6679 * c-typeprint.c (is_type_conversion_operator): Use
6680 CP_OPERATOR_STR.
6681 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6682 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6683 CP_OPERATOR_LEN.
6684 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6685 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6686 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6687 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6688 CP_OPERATOR_STR.
6689 * location.c: Include "cp-support.h".
6690 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6691 CP_OPERATOR_STR.
6692 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6693 CP_OPERATOR_LEN.
6694
6695 2017-07-17 Pedro Alves <palves@redhat.com>
6696
6697 * cli/cli-cmds.c (complete_command): Use a completion tracker
6698 along with completion_find_completion_word for handle_brkchars
6699 phase.
6700 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6701 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6702 (struct gdb_rl_completion_word_info): New.
6703 (gdb_rl_find_completion_word): New.
6704 (completion_find_completion_word): New.
6705 * completer.h (completion_find_completion_word): Declare.
6706
6707 2017-07-17 Pedro Alves <palves@redhat.com>
6708
6709 * ada-lang.c (symbol_completion_match): Adjust comments.
6710 (symbol_completion_add): Replace vector parameter with
6711 completion_tracker parameter. Use it.
6712 (ada_make_symbol_completion_list): Rename to...
6713 (ada_collect_symbol_completion_matches): ... this. Add
6714 completion_tracker parameter and use it.
6715 (ada_language_defn): Adjust.
6716 * break-catch-syscall.c (catch_syscall_completer): Adjust
6717 prototype and work with completion_tracker instead of VEC.
6718 * breakpoint.c (condition_completer): Adjust prototype and work
6719 with completion_tracker instead of VEC.
6720 * c-lang.c (c_language_defn, cplus_language_defn)
6721 (asm_language_defn, minimal_language_defn): Adjust to renames.
6722 * cli/cli-cmds.c (complete_command): Rework using
6723 completion_tracker. Catch exceptions when completing.
6724 * cli/cli-decode.c (integer_unlimited_completer)
6725 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6726 with completion_tracker instead of VEC.
6727 * command.h (struct completion_tracker): Forward declare.
6728 (completer_ftype, completer_handle_brkchars_ftype): Change
6729 types.
6730 (complete_on_cmdlist, complete_on_enum): Adjust.
6731 * completer.c: Include <algorithm>.
6732 (struct gdb_completer_state): New.
6733 (current_completion): New global.
6734 (readline_line_completion_function): Delete.
6735 (noop_completer, filename_completer)
6736 (filename_completer_handle_brkchars, complete_files_symbols)
6737 (linespec_location_completer): Adjust to work with a
6738 completion_tracker instead of a VEC.
6739 (string_or_empty): New.
6740 (collect_explicit_location_matches): Adjust to work with a
6741 completion_tracker instead of a VEC.
6742 (explicit_location_completer): Rename to ...
6743 (complete_explicit_location): ... this and adjust to work with a
6744 completion_tracker instead of a VEC.
6745 (location_completer): Adjust to work with a completion_tracker
6746 instead of a VEC.
6747 (add_struct_fields): Adjust to work with a completion_list instead
6748 of VEC.
6749 (expression_completer): Rename to ...
6750 (complete_expression): ... this and adjust to work with a
6751 completion_tracker instead of a VEC. Use complete_files_symbols.
6752 (expression_completer): Reimplement on top of complete_expression.
6753 (symbol_completer): Adjust to work with a completion_tracker
6754 instead of a VEC.
6755 (enum complete_line_internal_reason): Add describing comments.
6756 (complete_line_internal_normal_command): Adjust to work with a
6757 completion_tracker instead of a VEC.
6758 (complete_line_internal): Rename to ...
6759 (complete_line_internal_1): ... this and adjust to work with a
6760 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6761 handle_brkchars phase.
6762 (new_completion_tracker): Delete.
6763 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6764 complete_line_internal_1.
6765 (free_completion_tracker): Delete.
6766 (INITIAL_COMPLETION_HTAB_SIZE): New.
6767 (completion_tracker::completion_tracker)
6768 (completion_tracker::~completion_tracker): New.
6769 (maybe_add_completion): Delete.
6770 (completion_tracker::maybe_add_completion)
6771 (completion_tracker::add_completion)
6772 (completion_tracker::add_completions): New.
6773 (throw_max_completions_reached_error): Delete.
6774 (complete_line): Adjust to work with a completion_tracker instead
6775 of a VEC. Don't create a completion_tracker_t or check for max
6776 completions here.
6777 (command_completer, command_completer_handle_brkchars)
6778 (signal_completer, reg_or_group_completer_1)
6779 (reg_or_group_completer, default_completer_handle_brkchars):
6780 Adjust to work with a completion_tracker.
6781 (gdb_completion_word_break_characters_throw): New.
6782 (gdb_completion_word_break_characters): Reimplement.
6783 (line_completion_function): Delete.
6784 (completion_tracker::recompute_lowest_common_denominator)
6785 (expand_preserving_ws)
6786 (completion_tracker::build_completion_result)
6787 (completion_result::completion_result)
6788 (completion_result::completion_result)
6789 (completion_result::~completion_result)
6790 (completion_result::completion_result)
6791 (completion_result::release_match_list, compare_cstrings)
6792 (completion_result::sort_match_list)
6793 (completion_result::reset_match_list)
6794 (gdb_rl_attempted_completion_function_throw)
6795 (gdb_rl_attempted_completion_function): New.
6796 * completer.h (completion_list, struct completion_result)
6797 (class completion_tracker): New.
6798 (complete_line): Add completion_tracker parameter.
6799 (readline_line_completion_function): Delete.
6800 (gdb_rl_attempted_completion_function): New.
6801 (noop_completer, filename_completer, expression_completer)
6802 (location_completer, symbol_completer, command_completer)
6803 (signal_completer, reg_or_group_completer): Update prototypes.
6804 (completion_tracker_t, new_completion_tracker)
6805 (make_cleanup_free_completion_tracker): Delete.
6806 (enum maybe_add_completion_enum): Delete.
6807 (maybe_add_completion): Delete.
6808 (throw_max_completions_reached_error): Delete.
6809 * corefile.c (complete_set_gnutarget): Adjust to work with a
6810 completion_tracker instead of a VEC.
6811 * cp-abi.c (cp_abi_completer): Adjust to work with a
6812 completion_tracker instead of a VEC.
6813 * d-lang.c (d_language_defn): Adjust.
6814 * disasm.c (disassembler_options_completer): Adjust to work with a
6815 completion_tracker instead of a VEC.
6816 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6817 (f_collect_symbol_completion_matches): ... this. Adjust to work
6818 with a completion_tracker instead of a VEC.
6819 (f_language_defn): Adjust.
6820 * go-lang.c (go_language_defn): Adjust.
6821 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6822 Adjust to work with a completion_tracker instead of a VEC.
6823 * infrun.c (handle_completer): Likewise.
6824 * interps.c (interpreter_completer): Likewise.
6825 * interps.h (interpreter_completer): Likewise.
6826 * language.c (unknown_language_defn, auto_language_defn)
6827 (local_language_defn): Adjust.
6828 * language.h (language_defn::la_make_symbol_completion_list):
6829 Rename to ...
6830 (language_defn::la_collect_symbol_completion_matches): ... this
6831 and adjust to work with a completion_tracker instead of a VEC.
6832 * m2-lang.c (m2_language_defn): Adjust.
6833 * objc-lang.c (objc_language_defn): Adjust.
6834 * opencl-lang.c (opencl_language_defn): Adjust.
6835 * p-lang.c (pascal_language_defn): Adjust.
6836 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6837 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6838 with a completion_tracker.
6839 * rust-lang.c (rust_language_defn): Adjust.
6840 * symtab.c (free_completion_list, do_free_completion_list)
6841 (return_val, completion_tracker): Delete.
6842 (completion_list_add_name, completion_list_add_symbol)
6843 (completion_list_add_msymbol, completion_list_objc_symbol)
6844 (completion_list_add_fields, add_symtab_completions): Add
6845 completion_tracker parameter and use it.
6846 (default_make_symbol_completion_list_break_on_1): Rename to...
6847 (default_collect_symbol_completion_matches_break_on): ... this.
6848 Add completion_tracker parameter and use it instead of allocating
6849 a completion tracker here.
6850 (default_make_symbol_completion_list_break_on): Delete old
6851 implementation.
6852 (default_make_symbol_completion_list): Delete.
6853 (default_collect_symbol_completion_matches): New.
6854 (make_symbol_completion_list): Delete.
6855 (collect_symbol_completion_matches): New.
6856 (make_symbol_completion_type): Rename to ...
6857 (collect_symbol_completion_matches_type): ... this. Add
6858 completion_tracker parameter and use it instead of VEC.
6859 (make_file_symbol_completion_list_1): Rename to...
6860 (collect_file_symbol_completion_matches): ... this. Add
6861 completion_tracker parameter and use it instead of VEC.
6862 (make_file_symbol_completion_list): Delete.
6863 (add_filename_to_list): Use completion_list instead of a VEC.
6864 (add_partial_filename_data::list): Now a completion_list.
6865 (make_source_files_completion_list): Work with a completion_list
6866 instead of a VEC.
6867 * symtab.h: Include "completer.h".
6868 (default_make_symbol_completion_list_break_on)
6869 (default_make_symbol_completion_list, make_symbol_completion_list)
6870 (make_symbol_completion_type, make_file_symbol_completion_list)
6871 (make_source_files_completion_list): Delete.
6872 (default_collect_symbol_completion_matches_break_on)
6873 (default_collect_symbol_completion_matches)
6874 (collect_symbol_completion_matches)
6875 (collect_symbol_completion_matches_type)
6876 (collect_file_symbol_completion_matches)
6877 (make_source_files_completion_list): New.
6878 * top.c (init_main): Don't install a rl_completion_entry_function
6879 hook. Install a rl_attempted_completion_function hook instead.
6880 * tui/tui-layout.c (layout_completer): Adjust to work with a
6881 completion_tracker.
6882 * tui/tui-regs.c (tui_reggroup_completer):
6883 * tui/tui-win.c (window_name_completer, focus_completer)
6884 (winheight_completer): Adjust to work with a completion_tracker.
6885 * value.c: Include "completer.h".
6886 (complete_internalvar): Adjust to work with a completion_tracker.
6887 * value.h (complete_internalvar): Likewise.
6888
6889 2017-07-17 Pedro Alves <palves@redhat.com>
6890
6891 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6892 renames.
6893 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6894 comments to completer_ftype's declaration.
6895 <completer_handle_brkchars>: Change type to
6896 completer_handle_brkchars_ftype.
6897 * command.h (completer_ftype): Add describing comment and give
6898 names to parameters.
6899 (completer_ftype_void): Rename to ...
6900 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6901 (set_cmd_completer_handle_brkchars): Adjust.
6902 * completer.c (filename_completer_handle_brkchars): New function.
6903 (complete_line_internal_normal_command): New function, factored
6904 out from ...
6905 (complete_line_internal): ... here.
6906 (command_completer_handle_brkchars)
6907 (default_completer_handle_brkchars)
6908 (completer_handle_brkchars_func_for_completer): New functions.
6909 * completer.h (set_gdb_completion_word_break_characters): Delete
6910 declaration.
6911 (completer_handle_brkchars_func_for_completer): New declaration.
6912 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6913 completer_handle_brkchars_func_for_completer.
6914
6915 2017-07-17 Pedro Alves <palves@redhat.com>
6916
6917 * completer.c (symbol_completer): New function, based on
6918 make_symbol_completion_list_fn.
6919 * completer.h (symbol_completer): New declaration.
6920 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6921 * python/py-cmd.c (completers): Adjust.
6922 * symtab.c (make_symbol_completion_list_fn): Delete.
6923 * symtab.h (make_symbol_completion_list_fn): Delete.
6924 * cli/cli-decode.c (add_cmd): Adjust.
6925
6926 2017-07-17 Pedro Alves <palves@redhat.com>
6927
6928 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6929 * dwarf2read.c: Include "filename-seen-cache.h".
6930 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6931 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6932 * filename-seen-cache.c: New file.
6933 * filename-seen-cache.h: New file.
6934 * symtab.c: Include "filename-seen-cache.h".
6935 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6936 (create_filename_seen_cache, clear_filename_seen_cache)
6937 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6938 to filename-seen-cache.h/filename-seen-cache.c.
6939 (output_source_filename, sources_info)
6940 (maybe_add_partial_symtab_filename)
6941 (make_source_files_completion_list): Adjust to use
6942 filename_seen_cache.
6943
6944 2017-07-17 Pedro Alves <palves@redhat.com>
6945
6946 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6947 fields.
6948 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6949 dwarf2_debug_sections*)): New.
6950 (dwarf2_per_objfile::dwarf2_per_objfile(const
6951 dwarf2_per_objfile&)): Declare as deleted.
6952 (dwarf2_per_objfile::operator=): Declare as deleted.
6953 (dwarf2_per_objfile::dwarf2_per_objfile)
6954 (dwarf2_per_objfile::~dwarf2_per_objfile)
6955 (dwarf2_per_objfile::free_cached_comp_units): New.
6956 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6957 ctor. Call dwarf2_per_objfile's ctor manually.
6958 (dwarf2_locate_sections): Deleted/refactored as ...
6959 (dwarf2_per_objfile::locate_sections): ... this new method.
6960 (free_cached_comp_units): Defer to
6961 dwarf2_per_objfile::free_cached_comp_units.
6962 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6963
6964 2017-07-14 Tom Tromey <tom@tromey.com>
6965
6966 PR rust/21764:
6967 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6968 parameter.
6969 <UNOP_SIZEOF>: Split into separate case.
6970 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6971
6972 2017-07-14 Tom Tromey <tom@tromey.com>
6973
6974 PR rust/21763:
6975 * symtab.c (symbol_matches_domain): Add language_rust to special
6976 case.
6977 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6978 treat LOC_TYPEDEF symbols as variables.
6979
6980 2017-07-14 Pedro Alves <palves@redhat.com>
6981
6982 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6983 symtabs matching all symtabs with SRCFILE as file name instead of
6984 only considering the first hit, with lookup_symtab.
6985
6986 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6987
6988 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6989 operator_name parameters.
6990 (gen_expr): Update function call.
6991
6992 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6993
6994 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6995 parameter.
6996 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6997 Likewise.
6998 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6999 parameter, use agent_expr::gdbarch instead, update function
7000 calls.
7001 (locexpr_tracepoint_var_ref): Likewise.
7002 (loclist_tracepoint_var_ref): Likewise.
7003 * ax-gdb.c (gen_trace_static_fields): Likewise.
7004 (gen_traced_pop): Likewise.
7005 (gen_frame_args_address): Likewise.
7006 (gen_frame_locals_address): Likewise.
7007 (gen_var_ref): Likewise.
7008 (gen_struct_ref_recursive): Likewise.
7009 (gen_static_field): Likewise.
7010 (gen_maybe_namespace_elt): Likewise.
7011 (gen_expr): Likewise.
7012 (gen_trace_for_var): Likewise.
7013 (gen_trace_for_expr): Likewise.
7014 (gen_trace_for_return_address): Likewise.
7015
7016 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7017
7018 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7019 parameter.
7020 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7021
7022 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7023
7024 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7025 from ax, update calls.
7026 (gen_usual_arithmetic): Likewise.
7027 (gen_integral_promotions): Likewise.
7028 (gen_bitfield_ref): Likewise.
7029 (gen_primitive_field): Likewise.
7030 (gen_struct_ref_recursive): Likewise.
7031 (gen_struct_ref): Likewise.
7032 (gen_maybe_namespace_elt): Likewise.
7033 (gen_struct_elt_for_reference): Likewise.
7034 (gen_namespace_elt): Likewise.
7035 (gen_aggregate_elt_ref): Likewise.
7036 (gen_expr): Get gdbarch from ax, update calls.
7037 (gen_expr_binop_rest): Likewise.
7038
7039 2017-07-13 Pedro Alves <palves@redhat.com>
7040
7041 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7042 as default tdesc.
7043 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7044 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7045 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7046 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7047 tdep.
7048 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7049 Get final tdesc from the tdep.
7050 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7051 default tdesc.
7052 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7053 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7054 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7055 Use it as default tdesc.
7056 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7057 down to amd_init_abi. No longer handle fallback tdesc here.
7058 * amd64-tdep.h (tdesc_x32): Declare.
7059 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7060 parameter.
7061 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7062 as default tdesc.
7063
7064 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7065
7066 * s390-linux-tdep.c (s390_process_record): Add support for
7067 instructions new in arch12.
7068
7069 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7070
7071 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7072 PT_GETFSBASE and PT_GETGSBASE.
7073 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7074 PT_SETGSBASE.
7075
7076 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7077
7078 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7079 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7080 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7081 those rules.
7082 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7083 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7084 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7085 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7086 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7087 * features/i386/amd64.xml: Add 64bit-segments.xml.
7088 * features/i386/amd64-avx-avx512.c: Regenerated.
7089 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7090 * features/i386/amd64-avx-mpx.c: Regenerated.
7091 * features/i386/amd64-avx.c: Regenerated.
7092 * features/i386/amd64-mpx.c: Regenerated.
7093 * features/i386/amd64.c: Regenerated.
7094 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7095 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7096 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7097 * regformats/i386/amd64-avx.dat: Regenerated.
7098 * regformats/i386/amd64-mpx.dat: Regenerated.
7099 * regformats/i386/amd64.dat: Regenerated.
7100
7101 2017-07-10 Yao Qi <yao.qi@linaro.org>
7102
7103 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7104 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7105
7106 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7107
7108 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7109 unsetenv.
7110 * gnulib/aclocal.m4: Regenerate.
7111 * gnulib/config.in: Regenerate.
7112 * gnulib/configure: Regenerate.
7113 * gnulib/import/Makefile.am: Regenerate.
7114 * gnulib/import/Makefile.in: Regenerate.
7115 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7116 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7117 * gnulib/import/m4/environ.m4: New file.
7118 * gnulib/import/m4/setenv.m4: New file.
7119 * gnulib/import/setenv.c: New file.
7120 * gnulib/import/unsetenv.c: New file.
7121
7122 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7123
7124 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7125 address when op is DW_OP_addr.
7126
7127 2017-07-09 Tom Tromey <tom@tromey.com>
7128
7129 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7130 check and apply to outer type.
7131
7132 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7133
7134 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7135 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7136 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7137 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7138
7139 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7140
7141 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7142
7143 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7144
7145 * corelow.c (get_core_siginfo): Remove.
7146 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7147 instead of get_core_siginfo.
7148 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7149 * gdbarch.h: Re-generate.
7150 * gdbarch.c: Re-generate.
7151 * linux-tdep.c (linux_core_xfer_siginfo): New.
7152 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7153
7154 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7155
7156 * corelow.c (thread_section_name): Move to ...
7157 * gdbcore.h (thread_section_name): ... here.
7158
7159 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7160
7161 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7162 (struct siginfo32): New.
7163 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7164 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7165 via ptrace(PT_LWPINFO).
7166
7167 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7168
7169 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7170 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7171 (fbsd_get_siginfo_type): New.
7172 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7173 (_initialize_fbsd_tdep): New.
7174
7175 2017-07-06 David Blaikie <dblaikie@gmail.com>
7176
7177 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7178 a singular dwo_unit*) to support multiple CUs in the same way that
7179 multiple TUs are supported.
7180 (create_cus_hash_table): Replace create_dwo_cu with a function for
7181 parsing multiple CUs from a DWO file.
7182 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7183 create_dwo_cu.
7184 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7185 htab_find, rather than comparing the signature to a singleton CU in
7186 the dwo_file.
7187
7188 2017-07-06 Pedro Alves <palves@redhat.com>
7189
7190 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7191
7192 2017-07-04 Pedro Alves <palves@redhat.com>
7193
7194 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7195 * gdbtypes.h (TYPE_STATIC): Delete.
7196 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7197 is_synchronized, is_native>: Delete.
7198 <dummy>: Bump.
7199 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7200 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7201 (TYPE_FN_FIELD_ABSTRACT): Delete.
7202
7203 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7204
7205 * buffer.h (buffer_finish): Fix spelling mistakes.
7206
7207 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7208
7209 * .dir-locals.el: Automatically switch to C-style comments in
7210 versions of Emacs that support the feature.
7211
7212 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7213 Pedro Alves <palves@redhat.com>
7214
7215 PR cli/21688
7216 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7217 (process_next_line): New variable 'inline_cmd'.
7218 Adjust 'if' clauses for "python", "compile" and "guile" to use
7219 'command_name_equals' and check for '!inline_cmd'.
7220
7221 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7222
7223 PR cli/21688
7224 * cli/cli-script.c (command_name_equals_not_inline): New function.
7225 (process_next_line): Adjust 'if' clauses for "python", "compile"
7226 and "guile" to use command_name_equals_not_inline.
7227
7228 2017-06-29 Pedro Alves <palves@redhat.com>
7229
7230 * completer.c (expression_completer): Call
7231 linespec_location_completer instead of location_completer.
7232
7233 2017-06-29 Pedro Alves <palves@redhat.com>
7234
7235 * completer.c (expression_completer): Remove code that recomputes
7236 'text' from 'word'.
7237
7238 2017-06-29 Yao Qi <yao.qi@linaro.org>
7239
7240 * regformats/regdat.sh: Generate code with
7241 "ifndef IN_PROCESS_AGENT".
7242
7243 2017-06-28 Pedro Alves <palves@redhat.com>
7244
7245 * command.h: Include "common/scoped_restore.h".
7246
7247 2017-06-28 Yao Qi <yao.qi@linaro.org>
7248
7249 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7250 instead of obstack_grow.
7251
7252 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7253
7254 PR gdb/21337
7255 * symfile.c (reread_symbols): Call objfiles_changed just before
7256 read_symbols.
7257
7258 2017-06-27 Pedro Alves <palves@redhat.com>
7259
7260 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7261 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7262 (completion_list_add_symbol, completion_list_add_msymbol):
7263 ... these new functions.
7264 (add_symtab_completions)
7265 (default_make_symbol_completion_list_break_on_1): Adjust.
7266
7267 2017-06-27 Pedro Alves <palves@redhat.com>
7268
7269 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7270 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7271 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7272 dtor.
7273 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7274 'storage_obstack' field an auto_obstack. In-class initialize all
7275 non-bitfield fields. Make minsyms_read bool.
7276 * symfile.c (read_symbols): Adjust.
7277
7278 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7279
7280 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7281 (gdbsim_store_register): Likewise.
7282
7283 2017-06-27 Pedro Alves <palves@redhat.com>
7284
7285 * c-exp.y (name_obstack): Now an auto_obstack.
7286 (yylex): Use auto_obstack::clear.
7287 (c_parse): Use auto_obstack::clear instead of reinitializing and
7288 freeing the obstack.
7289 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7290 * d-exp.y (name_obstack): Now an auto_obstack.
7291 (yylex): Use auto_obstack::clear.
7292 (d_parse): Use auto_obstack::clear instead of reinitializing and
7293 freeing the obstack.
7294 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7295 auto_obstack.
7296 * dwarf2read.c (create_addrmap_from_index)
7297 (dwarf2_build_psymtabs_hard)
7298 (update_enumeration_type_from_children): Likewise.
7299 * gdb_obstack.h (auto_obstack): New type.
7300 * go-exp.y (name_obstack): Now an auto_obstack.
7301 (build_packaged_name): Use auto_obstack::clear.
7302 (go_parse): Use auto_obstack::clear instead of reinitializing and
7303 freeing the obstack.
7304 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7305 auto_obstack.
7306 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7307 * rust-exp.y (work_obstack): Now an auto_obstack.
7308 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7309 reinitializing and freeing the obstack.
7310 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7311 (host_char_to_target): Use auto_obstack.
7312 * utils.h (make_cleanup_obstack_free): Delete declaration.
7313 * valprint.c (generic_emit_char, generic_printstr): Use
7314 auto_obstack.
7315
7316 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7317
7318 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7319 thread.
7320 (darwin_init_thread_list): Don't update dummy thread.
7321 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7322
7323 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7324
7325 * record-full.c (netorder16): Remove.
7326
7327 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7328
7329 * common/diagnostics.h: Define macros for GCC.
7330 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7331 * common/vec.h: Include diagnostics.h.
7332 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7333 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7334 warning.
7335
7336 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7337
7338 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7339 New macro.
7340 * ada-lex.l: Ignore deprecated register warnings.
7341
7342 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7343
7344 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7345 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7346
7347 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7348
7349 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7350 its own line.
7351
7352 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7353
7354 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7355
7356 2017-06-23 Alan Hayward <alan.hayward@arm.com>
7357
7358 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7359 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7360 (xtensa_register_read_masked): Likewise.
7361
7362 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7363
7364 * common/environ.c (gdb_environ::unset): Update comment.
7365
7366 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7367
7368 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7369 registers.
7370
7371 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7372
7373 * record-full.c (record_full_exec_insn): Use byte_vector.
7374
7375 2017-06-22 Yao Qi <yao.qi@linaro.org>
7376
7377 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7378 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7379
7380 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7381
7382 * remote.c (cached_reg): Move from here...
7383 * regcache.h (cached_reg): ...to here.
7384 * python/py-unwind.c (struct reg_info): Remove.
7385 (cached_frame_info): Use cached_reg_t.
7386 (pyuw_prev_register): Likewise.
7387 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7388 (pyuw_dealloc_cache): Free all registers.
7389
7390 2017-06-22 Pedro Alves <palves@redhat.com>
7391 Simon Marchi <simon.marchi@ericsson.com>
7392
7393 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7394 warning.
7395 * common/diagnostics.h: New file.
7396
7397 2017-06-22 Pedro Alves <palves@redhat.com>
7398
7399 * common/agent.h: Add include guards.
7400
7401 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7402
7403 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7404 talk about addressable units instead of bytes.
7405
7406 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7407
7408 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7409 of '::const_iterator'.
7410
7411 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7412
7413 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7414 'unittests/environ-selftests.c'.
7415 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7416 * charset.c (find_charset_names): Declare object 'iconv_env'.
7417 Update code to use 'iconv_env' object. Remove call to
7418 'free_environ'.
7419 * common/environ.c: Include <utility>.
7420 (make_environ): Delete function.
7421 (free_environ): Delete function.
7422 (gdb_environ::clear): New function.
7423 (gdb_environ::operator=): New function.
7424 (gdb_environ::get): Likewise.
7425 (environ_vector): Delete function.
7426 (set_in_environ): Delete function.
7427 (gdb_environ::set): New function.
7428 (unset_in_environ): Delete function.
7429 (gdb_environ::unset): New function.
7430 (gdb_environ::envp): Likewise.
7431 * common/environ.h: Include <vector>.
7432 (struct gdb_environ): Delete; transform into...
7433 (class gdb_environ): ... this class.
7434 (free_environ): Delete prototype.
7435 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7436 environ_vector): Likewise.
7437 * infcmd.c (run_command_1): Update code to call
7438 'envp' from 'gdb_environ' class.
7439 (environment_info): Update code to call methods from 'gdb_environ'
7440 class.
7441 (unset_environment_command): Likewise.
7442 (path_info): Likewise.
7443 (path_command): Likewise.
7444 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7445 (inferior::inferior): Initialize 'environment' using the host's
7446 information.
7447 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7448 Include "environ.h".
7449 (class inferior) <environment>: Change type from 'struct
7450 gdb_environ' to 'gdb_environ'.
7451 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7452 methods from 'gdb_environ' class.
7453 * solib.c (solib_find_1): Likewise
7454 * unittests/environ-selftests.c: New file.
7455
7456 2017-06-20 Yao Qi <yao.qi@linaro.org>
7457
7458 * features/i386/i386-linux.xml: Exchange the order of including
7459 32bit-linux.xml and 32bit-sse.xml.
7460 * features/i386/i386-linux.c: Regenerated.
7461
7462 2017-06-20 Yao Qi <yao.qi@linaro.org>
7463
7464 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7465 Delete copy ctor and assignment operator.
7466 (tdesc_type): Likewise.
7467 (tdesc_feature): Likewise.
7468 (tdesc_free_reg): Remove.
7469 (tdesc_create_reg): Use new.
7470 (tdesc_free_type): Remove.
7471 (tdesc_create_vector): Use new.
7472 (tdesc_create_union): Likewise.
7473 (tdesc_create_flags): Likewise.
7474 (tdesc_create_enum): Likewise.
7475 (tdesc_free_feature): Delete.
7476 (free_target_description): Use delete.
7477
7478 2017-06-19 John Baldwin <jhb@FreeBSD.org>
7479
7480 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7481 registers.
7482
7483 2017-06-19 Pedro Alves <palves@redhat.com>
7484
7485 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7486 after gdb::unlinker.
7487
7488 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7489
7490 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7491 gdb_environ to access an environment variable.
7492
7493 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7494
7495 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7496 gdb_byte*.
7497
7498 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7499
7500 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7501
7502 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7503
7504 * configure: Re-generate.
7505 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7506
7507 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7508
7509 * configure: Re-generate.
7510 * warning.m4: Pass -Werror to compiler when checking for
7511 supported warning flags.
7512
7513 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7514
7515 * Makefile.in (COMPILE.pre): Add "-x c++".
7516
7517 2017-06-16 Alan Hayward <alan.hayward@arm.com>
7518 Pedro Alves <palves@redhat.com>
7519 Yao Qi <yao.qi@linaro.org>
7520
7521 * defs.h (RequireLongest): New.
7522 (extract_integer): Declare function template.
7523 (extract_signed_integer): Remove the declaration, but define it
7524 static inline.
7525 (extract_unsigned_integer): Likewise.
7526 (store_integer): Declare function template.
7527 (store_signed_integer): Remove the declaration, but define it
7528 static inline.
7529 (store_unsigned_integer): Likewise.
7530 * findvar.c (extract_integer): New function template.
7531 (extract_signed_integer): Remove.
7532 (extract_unsigned_integer): Remove.
7533 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7534 instantiations.
7535 (store_integer): New function template.
7536 (store_signed_integer): Remove.
7537 (store_unsigned_integer): Remove.
7538 (store_integer): Explicit instantiations.
7539 * regcache.c (regcache_raw_read_signed): Update.
7540 (regcache::raw_read): New function.
7541 (regcache::raw_read_signed): Remove.
7542 (regcache::raw_read_unsigned): Remove.
7543 (regcache_raw_read_unsigned): Update.
7544 (regcache_raw_write_unsigned): Update.
7545 (regcache::raw_write_signed): Remove.
7546 (regcache::raw_write): New function.
7547 (regcache_cooked_read_signed): Update.
7548 (regcache::raw_write_unsigned): Remove.
7549 (regcache::cooked_read_signed): Remove.
7550 (regcache_cooked_read_unsigned): Update.
7551 (regcache::cooked_read_unsigned): Remove.
7552 (regcache_cooked_write_signed): Update.
7553 (regcache_cooked_write_unsigned): Update.
7554 * regcache.h (regcache) <raw_read_signed>: Remove.
7555 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7556 <raw_read, raw_write>: New.
7557 <cooked_read_signed, cooked_write_signed>: Remove.
7558 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7559 <cooked_read, cooked_write>: New.
7560 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7561 (sh64_pseudo_register_write): Update.
7562
7563 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7564
7565 * arc-tdep.c (arc_disassembler_options): New variable.
7566 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7567 of default_print_insn.
7568 (arc_delayed_print_insn): Set info->section when needed,
7569 use default_print_insn to retrieve a disassembler.
7570
7571 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7572
7573 PR gdb/21574
7574 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7575 to mention $SHELL and startup-with-shell.
7576
7577 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7578
7579 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7580
7581 2017-06-14 Yao Qi <yao.qi@linaro.org>
7582
7583 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7584 default_print_insn instead of print_insn_aarch64.
7585 * arm-tdep.c (gdb_print_insn_arm): Call
7586 default_print_insn instead of print_insn_big_arm
7587 and print_insn_little_arm.
7588 * i386-tdep.c (i386_print_insn): Call default_print_insn
7589 instead of print_insn_i386.
7590 * ia64-tdep.c (ia64_print_insn): Call
7591 default_print_insn instead of print_insn_ia64.
7592 * mips-tdep.c (gdb_print_insn_mips): Call
7593 default_print_insn instead of print_insn_big_mips
7594 and print_insn_little_mips.
7595 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7596 instead of print_insn_spu.
7597
7598 2017-06-14 Pedro Alves <palves@redhat.com>
7599
7600 * ada-lang.c: Include "common/byte-vector.h".
7601 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7602 * charset.c (wchar_iterator::iterate): Resize the vector instead
7603 of reserving it.
7604 * common/byte-vector.h: Include "common/def-vector.h".
7605 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7606 * cli/cli-dump.c: Include "common/byte-vector.h".
7607 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7608 * common/byte-vector.h: New file.
7609 * common/def-vector.h: New file.
7610 * common/default-init-alloc.h: New file.
7611 * dwarf2loc.c: Include "common/byte-vector.h".
7612 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7613 instead of reserving it.
7614 * dwarf2read.c: Include "common/byte-vector.h".
7615 (data_buf::m_vec): Now a gdb::byte_vector.
7616 * gdb_regex.c: Include "common/def-vector.h".
7617 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7618 * mi/mi-main.c: Include "common/byte-vector.h".
7619 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7620 * printcmd.c: Include "common/byte-vector.h".
7621 (print_scalar_formatted): Use gdb::byte_vector.
7622 * valprint.c: Include "common/byte-vector.h".
7623 (maybe_negate_by_bytes, print_decimal_chars): Use
7624 gdb::byte_vector.
7625
7626 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7627
7628 * darwin-nat.c: Include "nat/fork-inferior.h".
7629
7630 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7631
7632 * configure.nat: Factor out Darwin bits that are not
7633 architecture-specific. Add fork-inferior.o.
7634
7635 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7636
7637 * configure.nat: Factor out AIX bits that are not
7638 architecture-specific. Add fork-inferior.o.
7639
7640 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7641
7642 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7643 (read_pieced_value, write_pieced_value): ...here. Reduce to
7644 wrappers that just call rw_pieced_value.
7645
7646 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7647
7648 * dwarf2loc.c (write_pieced_value): When writing the data for a
7649 memory piece, use write_memory_with_notification instead of
7650 write_memory.
7651
7652 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7653
7654 * valops.c (read_value_memory): Change embedded_offset to
7655 represent a bit offset instead of a byte offset.
7656 * value.h (read_value_memory): Adjust comment.
7657
7658 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7659
7660 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7661 dest_offset_bits and source_offset_bits.
7662 (write_pieced_value): Likewise.
7663
7664 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7665
7666 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7667 given by DW_OP_bit_piece.
7668 (write_pieced_value): Likewise.
7669
7670 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7671
7672 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7673 some other preparations to the places where sufficient information
7674 is available.
7675 (write_pieced_value): Likewise.
7676
7677 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7678
7679 * dwarf2loc.c (bits_to_bytes): New function.
7680 (read_pieced_value): Fix offset calculations for register pieces
7681 on big-endian targets.
7682 (write_pieced_value): Likewise.
7683
7684 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7685
7686 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7687 (write_pieced_value): Likewise.
7688
7689 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7690
7691 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7692 transfer the source value's least significant bits, instead of its
7693 lowest-addressed ones. Rename type_len to max_offset.
7694 (read_pieced_value): Mirror above changes to write_pieced_value as
7695 applicable.
7696
7697 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7698
7699 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7700 truncate full bytes from dest_offset_bits before using it as an
7701 offset into the buffer.
7702
7703 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7704
7705 * dwarf2loc.c (write_pieced_value): Include transfer size in
7706 byte-wise check.
7707
7708 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7709
7710 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7711 calculation of this_size.
7712
7713 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7714
7715 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7716 when targeting a bit-field.
7717 (write_pieced_value): Likewise.
7718
7719 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7720
7721 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7722 (allocate_piece_closure): Drop addr_size parameter.
7723 (dwarf2_evaluate_loc_desc_full): Adjust call to
7724 allocate_piece_closure.
7725
7726 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7727
7728 PR gdb/21226
7729 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7730 the LSB end, independent of endianness.
7731
7732 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7733
7734 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7735 size capping.
7736
7737 2017-06-13 Yao Qi <yao.qi@linaro.org>
7738
7739 * mips-linux-nat.c: Move include features/mips*-linux.c to
7740 mips-linux-tdep.c.
7741 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7742 to mips-linux-tdep.c.
7743 * mips-linux-tdep.c: Include features/mips*-linux.c
7744 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7745 functions.
7746 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7747 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7748 (tdesc_mips64_dsp_linux): Declare.
7749
7750 2017-06-12 Tom Tromey <tom@tromey.com>
7751
7752 * valprint.h (val_print_type_code_int): Remove.
7753 * valprint.c (generic_val_print_int): Always call
7754 val_print_scalar_formatted.
7755 (val_print_type_code_int): Remove.
7756 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7757 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7758 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7759 * ada-valprint.c (ada_val_print_num): Use
7760 val_print_scalar_formatted.
7761
7762 2017-06-12 Tom Tromey <tom@tromey.com>
7763
7764 * printcmd.c (print_scalar_formatted): Unify the two switches.
7765 Don't convert scalars to LONGEST.
7766
7767 2017-06-12 Tom Tromey <tom@tromey.com>
7768
7769 PR exp/16225:
7770 * valprint.h (print_decimal_chars): Update.
7771 * valprint.c (maybe_negate_by_bytes): New function.
7772 (print_decimal_chars): Add "is_signed" argument.
7773 * printcmd.c (print_scalar_formatted): Update.
7774
7775 2017-06-12 Tom Tromey <tom@tromey.com>
7776
7777 PR exp/16225:
7778 * valprint.h (print_binary_chars, print_hex_chars): Update.
7779 * valprint.c (val_print_type_code_int): Update.
7780 (print_binary_chars): Add "zero_pad" argument.
7781 (emit_octal_digit): New function.
7782 (print_octal_chars): Don't zero-pad.
7783 (print_decimal_chars): Likewise.
7784 (print_hex_chars): Add "zero_pad" argument.
7785 * sh64-tdep.c (sh64_do_fp_register): Update.
7786 * regcache.c (regcache::dump): Update.
7787 * printcmd.c (print_scalar_formatted): Update.
7788 * infcmd.c (default_print_one_register_info): Update.
7789
7790 2017-06-12 Pedro Alves <palves@redhat.com>
7791 Alan Hayward <alan.hayward@arm.com>
7792
7793 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7794 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7795 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7796 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7797 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7798
7799 2017-06-12 Pedro Alves <palves@redhat.com>
7800
7801 * dwarf2read.c (mapped_symtab::data): Now a vector of
7802 symtab_index_entry instead of vector of
7803 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7804 whether an element's name is NULL instead of checking whether the
7805 element itself is NULL.
7806 (find_slot): Change return type. Adjust.
7807 (hash_expand, , add_index_entry, uniquify_cu_indices)
7808 (write_hash_table): Adjust.
7809
7810 2017-06-12 Pedro Alves <palves@redhat.com>
7811
7812 * dwarf2read.c (recursively_count_psymbols): New function.
7813 (write_psymtabs_to_index): Call it to compute number of psyms and
7814 pass estimate size of psyms_seen to unordered_set's ctor.
7815
7816 2017-06-12 Pedro Alves <palves@redhat.com>
7817
7818 * dwarf2read.c (write_hash_table): Check if key already exists
7819 before emplacing.
7820
7821 2017-06-12 Pedro Alves <palves@redhat.com>
7822
7823 * dwarf2read.c (data_buf::append_space): Rename to...
7824 (data_buf::grow): ... this, and make private. Adjust all callers.
7825 (data_buf::append_uint): New method.
7826 (add_address_entry, write_one_signatured_type)
7827 (write_psymtabs_to_index): Use it.
7828
7829 2017-06-12 Pedro Alves <palves@redhat.com>
7830
7831 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7832 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7833 (data_buf::file_write): Call ::fwrite directly.
7834
7835 2017-06-12 Pedro Alves <palves@redhat.com>
7836
7837 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7838 std::vector::erase.
7839
7840 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7841
7842 Code cleanup: C++ify .gdb_index producer.
7843 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7844 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7845 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7846 (create_strtab, add_string): Remove.
7847 (file_write, data_buf): New.
7848 (struct symtab_index_entry): Use std::vector for cu_indices.
7849 (struct mapped_symtab): Use std::vector for data.
7850 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7851 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7852 Remove.
7853 (find_slot): Change return type. Update it to the new data structures.
7854 (hash_expand, add_index_entry): Update it to the new data structures.
7855 (offset_type_compare): Remove.
7856 (uniquify_cu_indices): Update it to the new data structures.
7857 (c_str_view, c_str_view_hasher, vector_hasher): New.
7858 (add_indices_to_cpool): Remove.
7859 (write_hash_table): Update it to the new data structures.
7860 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7861 (eq_psymtab_cu_index): Remove.
7862 (psym_index_map): New typedef.
7863 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7864 reference and std::unordered_map for cu_index_htab.
7865 (add_address_entry, add_address_entry_worker, write_address_map)
7866 (write_psymbols): Update it to the new data structures.
7867 (write_obstack): Remove.
7868 (struct signatured_type_index_data): Change types_list to a data_buf
7869 reference and psyms_seen to a std::unordered_set reference.
7870 (write_one_signatured_type, recursively_write_psymbols)
7871 (write_psymtabs_to_index): Update it to the new data structures.
7872
7873 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7874
7875 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7876 separate-debug-file commands.
7877 * symfile.h (separate_debug_file_debug): New global.
7878 * symfile.c (separate_debug_file_debug): New global.
7879 (separate_debug_file_exists, find_separate_debug_file): Add
7880 debug output.
7881 (_initialize_symfile): Add "set debug separate-debug-file"
7882 command.
7883 * build-id.c (build_id_to_debug_bfd,
7884 find_separate_debug_file_by_buildid): Add debug output.
7885
7886 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7887
7888 * gdbarch.sh (displaced_step_free_closure): Remove.
7889 * gdbarch.h, gdbarch.c: Re-generate.
7890 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7891 displaced_step_free_closure.
7892 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7893 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7894 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7895 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7896 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7897 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7898 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7899 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7900 * infrun.c (displaced_step_clear): Call xfree instead of
7901 gdbarch_displaced_step_free_closure.
7902
7903 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7904
7905 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7906 NULL".
7907
7908 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7909
7910 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7911 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7912 (mn10300_push_dummy_call): Likewise.
7913
7914 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7915
7916 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7917
7918 2017-06-08 Alan Hayward <alan.hayward@arm.com>
7919
7920 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7921
7922 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7923
7924 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7925 able to start inferiors using a shell.
7926 (New remote packets): Announce new packet "QStartupWithShell".
7927 * remote.c: Add PACKET_QStartupWithShell.
7928 (extended_remote_create_inferior): Handle new
7929 PACKET_QStartupWithShell.
7930 (remote_protocol_features) <QStartupWithShell>: New entry for
7931 PACKET_QStartupWithShell.
7932 (_initialize_remote): Call "add_packet_config_cmd" for
7933 QStartupShell.
7934
7935 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7936 Pedro Alves <palves@redhat.com>
7937
7938 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7939 and "nat/fork-inferior.h".
7940 * common/common-inferior.h: New file, with contents from
7941 "gdb/inferior.h".
7942 * commom/common-utils.c: Include "common-utils.h".
7943 (stringify_argv): New function.
7944 * common/common-utils.h (stringify_argv): New prototype.
7945 * configure.nat: Add "fork-inferior.o" as a dependency for
7946 "*linux*", "fbsd*" and "nbsd*" hosts.
7947 * corefile.c (get_exec_file): Update comment.
7948 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7949 instead of "startup_inferior".
7950 (darwin_create_inferior): Call "add_thread_silent" after
7951 "fork_inferior".
7952 * fork-child.c: Cleanup unnecessary includes.
7953 (SHELL_FILE): Move to "common/common-fork-child.c".
7954 (environ): Likewise.
7955 (exec_wrapper): Initialize.
7956 (get_exec_wrapper): New function.
7957 (breakup_args): Move to "common/common-fork-child.c"; rename to
7958 "breakup_args_for_exec".
7959 (escape_bang_in_quoted_argument): Move to
7960 "common/common-fork-child.c".
7961 (saved_ui): New variable.
7962 (prefork_hook): New function.
7963 (postfork_hook): Likewise.
7964 (postfork_child_hook): Likewise.
7965 (gdb_startup_inferior): Likewise.
7966 (fork_inferior): Move to "common/common-fork-child.c". Update
7967 function to support gdbserver.
7968 (startup_inferior): Likewise.
7969 * gdbcore.h (get_exec_file): Remove declaration.
7970 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7971 instead of "startup_inferior". Call "add_thread_silent" after
7972 "fork_inferior".
7973 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7974 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7975 instead of "startup_inferior". Call "add_thread_silent" after
7976 "fork_inferior".
7977 * inferior.h: Include "common-inferior.h".
7978 (trace_start_error): Move to "common/common-utils.h".
7979 (trace_start_error_with_name): Likewise.
7980 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7981 (startup_inferior): Likewise.
7982 (gdb_startup_inferior): New prototype.
7983 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7984 * nat/fork-inferior.h: New file.
7985 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7986 instead of "startup_inferior". Call "add_thread_silent" after
7987 "fork_inferior".
7988 * target.h (target_terminal_init): Move prototype to
7989 "target/target.h".
7990 (target_terminal_inferior): Likewise.
7991 (target_terminal_ours): Likewise.
7992 * target/target.h (target_terminal_init): New prototype, moved
7993 from "target.h".
7994 (target_terminal_inferior): Likewise.
7995 (target_terminal_ours): Likewise.
7996 * utils.c (gdb_flush_out_err): New function.
7997
7998 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7999
8000 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8001 * common/common-gdbthread.h: New file, with parts from
8002 "gdb/gdbthread.h".
8003 * gdbthread.h: Include "common-gdbthread.h".
8004 (switch_to_thread): Moved to "common/common-gdbthread.h".
8005
8006 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8007
8008 * Makefile.in (SFILES): Add "common/job-control.c".
8009 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8010 (COMMON_OBS): Add "job-control.o".
8011 * common/job-control.c: New file, with contents from
8012 "gdb/inflow.c".
8013 * common/job-control.h: New file, with contents from "terminal.h".
8014 * fork-child.c: Include "job-control.h".
8015 * inflow.c: Include "job-control.h".
8016 (gdb_setpgid): Move to "common/common-inflow.c".
8017 (_initialize_inflow): Move setting of "job_control" to
8018 "handle_job_control".
8019 * terminal.h (job_control): Moved to "common/common-terminal.h".
8020 (gdb_setpgid): Likewise.
8021 * top.c: Include "job_control.h".
8022 * utils.c: Likewise.
8023 (job_control): Moved to "job-control.c".
8024
8025 2017-06-07 Pedro Alves <palves@redhat.com>
8026
8027 * Makefile.in (SFILES): Add gdb_regex.c.
8028 (COMMON_OBS): Add gdb_regex.o.
8029 * ada-lang.c (ada_add_standard_exceptions)
8030 (ada_add_exceptions_from_frame, name_matches_regex)
8031 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8032 parameter type to compiled_regex. Adjust.
8033 (ada_exceptions_list): Use compiled_regex.
8034 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8035 std::unique_ptr<compiled_regex>.
8036 (exception_catchpoint::~exception_catchpoint): Remove regfree
8037 call.
8038 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8039 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8040 * breakpoint.c (solib_catchpoint::compiled): Now a
8041 std::unique_ptr<compiled_regex>.
8042 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8043 (check_status_catch_solib): Adjust to use compiled_regex.
8044 (add_solib_catchpoint): Adjust to use compiled_regex.
8045 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8046 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8047 compiled_regex reference. Adjust to use it.
8048 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8049 declaration. Include "gdb_regex.h".
8050 (apropos_cmd): Change regex parameter to compiled_regex reference.
8051 * gdb_regex.c: New file.
8052 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8053 declarations.
8054 (class compiled_regex): New.
8055 * linux-tdep.c: Include "common/gdb_optional.h".
8056 (struct mapping_regexes): New, factored out from
8057 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8058 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8059 gdb::optional and remove cleanups. Adjust to compiled_regex.
8060 * probe.c: Include "common/gdb_optional.h".
8061 (collect_probes): Use compiled_regex and gdb::optional and remove
8062 cleanups.
8063 * skip.c: Include "common/gdb_optional.h".
8064 (skiplist_entry::compiled_function_regexp): Now a
8065 gdb::optional<compiled_regex>.
8066 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8067 (free_skiplist_entry): Remove regfree call.
8068 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8069 compiled_regex and gdb::optional.
8070 * symtab.c: Include "common/gdb_optional.h".
8071 (search_symbols): Use compiled_regex and gdb::optional.
8072 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8073 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8074 to gdb_regex.c.
8075
8076 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8077
8078 * regcache.c (regcache::save): Avoid buffer use.
8079 (regcache::dump): Likewise.
8080
8081 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8082
8083 * sh-tdep.c (sh_pseudo_register_read): Remove
8084 MAX_REGISTER_SIZE.
8085 (sh_pseudo_register_write): Likewise.
8086 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8087 (sh64_pseudo_register_write): Likewise
8088
8089 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8090
8091 * aarch64-tdep.c (aarch64_store_return_value): Use
8092 V_REGISTER_SIZE.
8093 (aarch64_pseudo_read_value): Likewise.
8094 (aarch64_pseudo_write): Likewise.
8095
8096 2017-06-06 Yao Qi <yao.qi@linaro.org>
8097
8098 * regformats/regdef.h (set_register_cache): Remove the
8099 declaration.
8100
8101 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8102
8103 * frame.c (frame_unwind_register_signed): Use
8104 frame_unwind_register_value.
8105
8106 2017-06-06 Pedro Alves <palves@redhat.com>
8107
8108 PR breakpoints/21553
8109 * breakpoint.c (create_breakpoints_sal_default)
8110 (init_breakpoint_sal, create_breakpoint_sal): Use
8111 gdb::unique_xmalloc_ptr for string parameters.
8112 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8113 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8114 (base_breakpoint_create_breakpoints_sal)
8115 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8116 (strace_marker_create_breakpoints_sal)
8117 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8118 string parameters.
8119 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8120 gdb::unique_xmalloc_ptr for string parameters.
8121 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8122 parameters.
8123
8124 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8125
8126 * alpha-tdep.c (alpha_register_to_value): Use
8127 get_frame_register_value.
8128 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8129
8130 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8131
8132 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8133 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8134 (ia64_value_to_register): Likewise.
8135 (ia64_extract_return_value): Likewise.
8136 (ia64_store_return_value): Likewise.
8137 (ia64_push_dummy_call): Likewise.
8138
8139 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8140
8141 GDB 8.0 released.
8142
8143 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8144
8145 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8146
8147 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8148
8149 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8150 parameter.
8151 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8152
8153 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8154
8155 * event-loop.c (poll_timers): Unallocate timer using delete
8156 instead of xfree.
8157
8158 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8159
8160 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8161 (struct breakpoint) <~breakpoint>: New.
8162 (struct watchpoint): Inherit from breakpoint.
8163 <~watchpoint>: New.
8164 <base>: Remove.
8165 (struct tracepoint): Inherit from breakpoint.
8166 <base>: Remove.
8167 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8168 (struct longjmp_breakpoint): Inherit from breakpoint.
8169 <~longjmp_breakpoint>: New.
8170 <base>: Remove.
8171 (new_breakpoint_from_type): Remove casts.
8172 (watchpoint_in_thread_scope): Remove reference to base field.
8173 (watchpoint_del_at_next_stop): Likewise.
8174 (update_watchpoint): Likewise.
8175 (watchpoint_check): Likewise.
8176 (bpstat_check_watchpoint): Likewise.
8177 (set_longjmp_breakpoint): Likewise.
8178 (struct fork_catchpoint): Inherit from breakpoint.
8179 <base>: Remove.
8180 (struct solib_catchpoint): Inherit from breakpoint.
8181 <~solib_catchpoint>: New.
8182 <base>: Remove.
8183 (dtor_catch_solib): Change to ...
8184 (solib_catchpoint::~solib_catchpoint): ... this.
8185 (breakpoint_hit_catch_solib): Remove reference to base field.
8186 (add_solib_catchpoint): Likewise.
8187 (create_fork_vfork_event_catchpoint): Likewise.
8188 (struct exec_catchpoint): Inherit from breakpoint.
8189 <~exec_catchpoint>: New.
8190 <base>: Remove.
8191 (dtor_catch_exec): Change to ...
8192 (exec_catchpoint::~exec_catchpoint): ... this.
8193 (dtor_watchpoint): Change to ...
8194 (watchpoint::~watchpoint): ... this.
8195 (watch_command_1): Remove reference to base field.
8196 (catch_exec_command_1): Likewise.
8197 (base_breakpoint_dtor): Change to ...
8198 (breakpoint::~breakpoint): ... this.
8199 (base_breakpoint_ops): Remove dtor field value.
8200 (longjmp_bkpt_dtor): Change to ...
8201 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8202 (strace_marker_create_breakpoints_sal): Remove reference to base
8203 field.
8204 (delete_breakpoint): Don't manually call breakpoint destructor.
8205 (create_tracepoint_from_upload): Remove reference to base field.
8206 (trace_pass_set_count): Likewise.
8207 (initialize_breakpoint_ops): Don't initialize
8208 momentary_breakpoint_ops, don't set dtors.
8209 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8210 <~ada_catchpoint>: New.
8211 <base>: Remove.
8212 (create_excep_cond_exprs): Remove reference to base field.
8213 (dtor_exception): Change to ...
8214 (ada_catchpoint::~ada_catchpoint): ... this.
8215 (dtor_catch_exception): Remove.
8216 (dtor_catch_exception_unhandled): Remove.
8217 (dtor_catch_assert): Remove.
8218 (create_ada_exception_catchpoint): Remove reference to base
8219 field.
8220 (initialize_ada_catchpoint_ops): Don't set dtors.
8221 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8222 breakpoint.
8223 <~signal_catchpoint>: New.
8224 <base>: Remove.
8225 (signal_catchpoint_dtor): Change to ...
8226 (signal_catchpoint::~signal_catchpoint): ... this.
8227 (create_signal_catchpoint): Remove reference to base field.
8228 (initialize_signal_catchpoint_ops): Don't set dtor.
8229 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8230 from breakpoint.
8231 <~syscall_catchpoint>: New.
8232 <base>: Remove.
8233 (dtor_catch_syscall): Change to ...
8234 (syscall_catchpoint::~syscall_catchpoint): ... this.
8235 (create_syscall_event_catchpoint): Remove reference to base
8236 field.
8237 (initialize_syscall_catchpoint_ops): Don't set dtor.
8238 * break-catch-throw.c (struct exception_catchpoint): Inherit
8239 from breakpoint.
8240 <~exception_catchpoint>: New.
8241 <base>: Remove.
8242 (dtor_exception_catchpoint): Change to ...
8243 (exception_catchpoint::~exception_catchpoint): ... this.
8244 (handle_gnu_v3_exceptions): Remove reference to base field.
8245 (initialize_throw_catchpoint_ops): Don't set dtor.
8246 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8247 field.
8248 * remote.c (remote_get_tracepoint_status): Likewise.
8249 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8250 * tracefile.c (tracefile_fetch_registers): Likewise.
8251 * tracepoint.c (actions_command): Likewise.
8252 (validate_actionline): Likewise.
8253 (tfind_1): Likewise.
8254 (get_traceframe_location): Likewise.
8255 (find_matching_tracepoint_location): Likewise.
8256 (parse_tracepoint_status): Likewise.
8257 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8258
8259 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8260
8261 * breakpoint.c (struct longjmp_breakpoint): New struct.
8262 (is_tracepoint_type): Change return type to bool.
8263 (is_longjmp_type): New function.
8264 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8265 (set_raw_breakpoint_without_location): Use
8266 new_breakpoint_from_type.
8267 (set_raw_breakpoint): Likewise.
8268
8269 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8270
8271 * breakpoint.c (new_breakpoint_from_type): New function.
8272 (create_breakpoint_sal): Use new_breakpoint_from_type and
8273 unique_ptr.
8274 (create_breakpoint): Likewise.
8275
8276 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8277
8278 * memattr.c (mem_info_command): Rename to ...
8279 (info_mem_command): ... this.
8280 (mem_enable_command): Rename to ...
8281 (enable_mem_command): ... this.
8282 (mem_disable_command): Rename to ...
8283 (disable_mem_command): ... this.
8284 (mem_delete_command): Rename to ...
8285 (delete_mem_command): ... this.
8286 (_initialize_mem): Adjust function names.
8287
8288 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8289
8290 * btrace.c (handle_pt_insn_events): New.
8291 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8292 STATUS. Split into this and ...
8293 (handle_pt_insn_event_flags): ... this.
8294
8295 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8296
8297 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8298 and struct pt_insn.resynced.
8299 * configure: Regenerated.
8300 * config.in: Regenerated.
8301
8302 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8303
8304 * btrace.c (ftrace_find_call_by_number): New function.
8305 (ftrace_new_function): Store objects, not pointers.
8306 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8307 ftrace_new_gap, ftrace_update_function,
8308 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8309 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8310 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8311 btrace_ends_with_single_insn, btrace_call_get): Account for
8312 btrace_thread_info::functions now storing objects.
8313 * btrace.h (struct btrace_thread_info): Add constructor.
8314 (struct btrace_thread_info) <functions>: Make std::vector.
8315 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8316 Initialize with default values.
8317 * record-btrace.c (record_btrace_frame_sniffer): Account for
8318 btrace_thread_info::functions now storing objects.
8319
8320 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8321
8322 * btrace.c: Remove typedef bfun_s.
8323 (ftrace_new_gap): Directly add gaps to the list of gaps.
8324 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8325 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8326 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8327 instead of gdb VEC.
8328
8329 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8330
8331 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8332 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8333 with btrace_thread_info::next_segment and
8334 btrace_thread_info::prev_segment.
8335 * btrace.h: Remove struct btrace_func_link.
8336 (struct btrace_function): Replace pair of function segment pointers
8337 with pair of indices.
8338 * python/py-record-btrace.c (btpy_call_prev_sibling,
8339 btpy_call_next_sibling): Replace references to
8340 btrace_thread_info::segment with btrace_thread_info::next_segment and
8341 btrace_thread_info::prev_segment.
8342 * record-btrace.c (record_btrace_frame_this_id): Use
8343 btrace_find_call_by_number.
8344
8345 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8346
8347 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8348 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8349 btrace_insn_next, btrace_insn_prev): Remove references to
8350 btrace_thread_info::flow.
8351 * btrace.h (struct btrace_function): Remove FLOW.
8352
8353 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8354
8355 * btrace.c (ftrace_find_call_by_number): New function.
8356 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8357 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8358 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8359 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8360 index.
8361 * btrace.h (struct btrace_function): Turn UP into an index.
8362 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8363 as an index.
8364 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8365 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8366 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8367
8368 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8369
8370 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8371 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8372 ftrace_update_function, ftrace_compute_global_level_offset,
8373 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8374 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8375 btrace_insn_end, btrace_is_empty): Remove references to
8376 btrace_thread_info::begin and btrace_thread_info::end.
8377 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8378 (struct btrace_thread_info) <functions>: Adjust comment.
8379 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8380 btrace_thread_info::begin.
8381
8382 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8383
8384 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8385 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8386 ftrace_update_function): Remove arguments that implicitly were always
8387 BTINFO->END.
8388 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8389 Don't pass BTINFO->END.
8390
8391 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8392
8393 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8394 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8395 btrace_find_insn_by_number): Replace function segment pointer with
8396 index.
8397 (btrace_insn_cmp): Simplify.
8398 * btrace.h: (struct btrace_insn_iterator) Rename index to
8399 insn_index. Replace function segment pointer with index into function
8400 segment vector.
8401 * record-btrace.c (record_btrace_call_history): Replace function
8402 segment pointer use with index.
8403 (record_btrace_frame_sniffer): Retrieve function call segment through
8404 vector.
8405 (record_btrace_set_replay): Remove defunc't safety check.
8406
8407 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8408
8409 * btrace.c (btrace_ends_with_single_insn): New function.
8410 (btrace_call_get, btrace_call_number, btrace_call_begin,
8411 btrace_call_end, btrace_call_next, btrace_call_prev,
8412 btrace_find_call_by_number): Use index into call segment vector
8413 instead of pointer.
8414 (btrace_call_cmp): Simplify.
8415 * btrace.h (struct btrace_call_iterator): Replace function call segment
8416 pointer with index into vector.
8417 * record-btrace.c (record_btrace_call_history): Use index instead of
8418 pointer.
8419
8420 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8421
8422 * btrace.c (btrace_insn_begin, btrace_insn_end,
8423 btrace_find_insn_by_number): Add btinfo to iterator.
8424 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8425
8426 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8427
8428 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8429 and save pointers directly.
8430 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8431 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8432 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8433 changed signature of functions.
8434 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8435 (btrace_fetch): Remove code that adds btrace_function pointers to
8436 vector of btrace_functions.
8437 (btrace_clear): Simplify freeing vector of btrace_functions.
8438
8439 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8440
8441 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8442 Replace VEC_* with std::vector functions.
8443 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8444 (struct btrace_thread_info)<functions>: Change type to std::vector.
8445
8446 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8447
8448 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8449 "Removed targets and native configurations" up. Merge duplicate
8450 "New commands" sub-sections. Add "New options" sub-sections.
8451
8452 2017-05-26 Alan Hayward <alan.hayward@arm.com>
8453
8454 * defs.h (copy_integer_to_size): New declaration.
8455 * findvar.c (copy_integer_to_size): New function.
8456 (do_cint_test): New selftest function.
8457 (copy_integer_to_size_test): Likewise.
8458 (_initialize_findvar): Likewise.
8459 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8460 (mips_fbsd_collect_reg): Use raw_collect_integer.
8461 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8462 (mips64_fill_gregset): Use raw_collect_integer
8463 (mips64_fill_fpregset): Use raw_supply_integer.
8464 * regcache.c (regcache::raw_supply_integer): New function.
8465 (regcache::raw_collect_integer): Likewise.
8466 * regcache.h: (regcache::raw_supply_integer): New declaration.
8467 (regcache::raw_collect_integer): Likewise.
8468
8469 2017-05-24 Yao Qi <yao.qi@linaro.org>
8470
8471 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8472 (COMMON_OBS): Add gdbarch-selftests.o.
8473 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8474 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8475 * gdbarch-selftests.c: New file.
8476 * regcache.h (regcache) <~regcache>: Mark it virtual if
8477 GDB_SELF_TEST.
8478 <raw_write>: Likewise.
8479
8480 2017-05-24 Yao Qi <yao.qi@linaro.org>
8481
8482 * regcache.c (current_regcache): Change it to
8483 regcache::current_regcache.
8484 (regcache_observer_target_changed): Update.
8485 (regcache_thread_ptid_changed): Make it a regcache static
8486 method.
8487 (regcache_thread_ptid_changed): Update.
8488 (class regcache_access): New.
8489 (current_regcache_test): Update.
8490 (_initialize_regcache): Update.
8491 * regcache.h: Include forward_list.
8492 (regcache): Declare regcache_thread_ptid_changed and declare
8493 registers_changed_ptid as friend.
8494
8495 2017-05-24 Yao Qi <yao.qi@linaro.org>
8496
8497 * i387-tdep.c (i387_register_to_value): Use register_size
8498 instead of TYPE_LENGTH.
8499 * m68k-tdep.c (m68k_register_to_value): Likewise.
8500
8501 2017-05-24 Yao Qi <yao.qi@linaro.org>
8502
8503 * i387-tdep.c (i387_convert_register_p): Return false if type
8504 code isn't TYPE_CODE_FLT.
8505
8506 2017-05-24 Yao Qi <yao.qi@linaro.org>
8507
8508 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8509 length is 4.
8510 (alpha_register_to_value): Remove type length check.
8511 (alpha_value_to_register): Likewise.
8512
8513 2017-05-24 Yao Qi <yao.qi@linaro.org>
8514
8515 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8516 TYPE_CODE_FLT.
8517
8518 2017-05-24 Yao Qi <yao.qi@linaro.org>
8519
8520 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8521 TYPE_CODE_FLT or not.
8522
8523 2017-05-24 Yao Qi <yao.qi@linaro.org>
8524
8525 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8526 * avr-tdep.c (avr_gdbarch_init): Likewise.
8527 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8528 * cris-tdep.c (cris_gdbarch_init): Likewise.
8529 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8530 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8531 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8532 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8533 * mep-tdep.c (mep_gdbarch_init): Likewise.
8534 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8535 * mips-tdep.c (mips_gdbarch_init): Likewise.
8536 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8537 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8538 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8539 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8540 * v850-tdep.c (v850_gdbarch_init): Likewise.
8541
8542 2017-05-24 Yao Qi <yao.qi@linaro.org>
8543
8544 * selftest-arch.c (tests_with_arch): Call registers_changed
8545 and reinit_frame_cache.
8546 * selftest.c (run_self_tests): Likewise.
8547
8548 2017-05-24 Yao Qi <yao.qi@linaro.org>
8549
8550 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8551 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8552
8553 2017-05-24 Yao Qi <yao.qi@linaro.org>
8554
8555 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8556 set_gdbarch_print_insn.
8557
8558 2017-05-24 Yao Qi <yao.qi@linaro.org>
8559
8560 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8561 set_gdbarch_print_insn.
8562
8563 2017-05-24 Yao Qi <yao.qi@linaro.org>
8564
8565 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8566 set_gdbarch_print_insn.
8567 * arc-tdep.c (arc_gdbarch_init): Likewise.
8568 * arch-utils.c: include dis-asm.h.
8569 (default_print_insn): New function.
8570 * arch-utils.h (default_print_insn): Declare.
8571 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8572 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8573 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8574 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8575 * frv-tdep.c (frv_gdbarch_init): Likewise.
8576 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8577 * gdbarch.sh (print_insn): Use default_print_insn.
8578 * gdbarch.c: Regenerated.
8579 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8580 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8581 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8582 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8583 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8584 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8585 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8586 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8587 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8588 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8589 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8590 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8591 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8592 * mt-tdep.c (mt_gdbarch_init): Likewise.
8593 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8594 * nios2-tdep.c (nios2_print_insn): Remove.
8595 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8596 * rx-tdep.c (rx_gdbarch_init): Likewise.
8597 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8598 * score-tdep.c (score_print_insn): Remove.
8599 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8600 * sh-tdep.c (sh_gdbarch_init): Likewise.
8601 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8602 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8603 * tic6x-tdep.c (tic6x_print_insn): Remove.
8604 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8605 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8606 * v850-tdep.c (v850_gdbarch_init): Likewise.
8607 * vax-tdep.c (vax_gdbarch_init): Likewise.
8608 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8609 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8610
8611 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8612
8613 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8614 (MIPS_FP0_REGNUM): Remove.
8615 (MIPS_FSR_REGNUM): Remove.
8616 (mips_fbsd_supply_fpregs): Use mips_regnum.
8617 (mips_fbsd_supply_gregs): Likewise.
8618 (mips_fbsd_collect_fpregs): Likewise.
8619 (mips_fbsd_collect_gregs): Likewise.
8620
8621 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8622
8623 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8624 (getpfpregs_supplies): New function.
8625 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8626 getfpregs_supplies.
8627 (mips_fbsd_store_inferior_registers): Likewise.
8628
8629 2017-05-22 Pedro Alves <palves@redhat.com>
8630
8631 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8632 maintainer.
8633
8634 2017-05-22 Alan Hayward <alan.hayward@arm.com>
8635
8636 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8637 (store_register): Likewise.
8638 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8639 (get_decimal_float_return_value): Likewise.
8640 (do_ppc_sysv_return_value): Likewise.
8641 (ppc64_sysv_abi_push_integer): Likewise.
8642 (ppc64_sysv_abi_push_freg): Likewise.
8643 (ppc64_sysv_abi_return_value_base): Likewise.
8644 (ppc64_sysv_abi_return_value): Likewise.
8645 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8646 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8647 * rs6000-nat.c: Likewise.
8648 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8649 (rs6000_value_to_register): Likewise.
8650 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8651
8652 2017-05-21 Tom Tromey <tom@tromey.com>
8653
8654 PR rust/21466:
8655 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8656 arrays as "[T]", not "[T; ]".
8657
8658 2017-05-19 Tom Tromey <tom@tromey.com>
8659
8660 PR rust/21484:
8661 * rust-lang.c (exp_descriptor_rust): New function.
8662 (rust_language_defn): Use it.
8663 * p-lang.c (pascal_language_defn): Update.
8664 * opencl-lang.c (opencl_language_defn): Update.
8665 * objc-lang.c (objc_language_defn): Update.
8666 * m2-lang.c (m2_language_defn): Update.
8667 * language.h (struct language_defn)
8668 <la_watch_location_expression>: New member.
8669 * language.c (unknown_language_defn, auto_language_defn)
8670 (local_language_defn): Update.
8671 * go-lang.c (go_language_defn): Update.
8672 * f-lang.c (f_language_defn): Update.
8673 * d-lang.c (d_language_defn): Update.
8674 * c-lang.h (c_watch_location_expression): Declare.
8675 * c-lang.c (c_watch_location_expression): New function.
8676 (c_language_defn, cplus_language_defn, asm_language_defn)
8677 (minimal_language_defn): Use it.
8678 * breakpoint.c (watch_command_1): Call
8679 la_watch_location_expression.
8680 * ada-lang.c (ada_language_defn): Update.
8681
8682 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8683
8684 PR tui/21482
8685 * gdb_curses.h (NOMACROS): Define.
8686 (NCURSES_NOMACROS): Define.
8687
8688 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8689
8690 PR tui/21482
8691 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8692 arg to char *.
8693 * tui/tui-wingeneral.c (box_win): Likewise.
8694 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8695 (tui_show_source_line): Likewise.
8696 (tui_show_exec_info_content): Likewise.
8697
8698 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8699
8700 * sparc-tdep.c (sparc_structure_return_p)
8701 (sparc_arg_on_registers_p): New functions.
8702 (sparc32_store_arguments): Use them.
8703 * sparc64-tdep.c (sparc64_16_byte_align_p)
8704 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8705 Handle TYPE_CODE_ARRAY.
8706
8707 2017-05-17 Yao Qi <yao.qi@linaro.org>
8708
8709 * cli/cli-decode.c (add_alias_cmd): New function.
8710 * command.h (add_alias_cmd): Declare.
8711 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8712 instead call add_alias_cmd.
8713
8714 2017-05-17 Pedro Alves <palves@redhat.com>
8715
8716 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8717 (nat_makefile_frag): ... this. All references updated.
8718 * configure.ac: Likewise.
8719 * configure.nat: Likewise. Enhance comments.
8720 * configure: Regenerate.
8721
8722 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8723
8724 * procfs.c (procfs_create_inferior): Change prototype to match
8725 definition.
8726
8727 2017-05-13 Eli Zaretskii <eliz@gnu.org>
8728
8729 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8730 C++ compiler warning.
8731
8732 2017-05-12 Tom Tromey <tom@tromey.com>
8733
8734 PR rust/21483:
8735 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8736 recurse, just call value_struct_elt directly.
8737
8738 2017-05-12 Tom Tromey <tom@tromey.com>
8739
8740 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8741 OP_RUST_ARRAY>: Fix.
8742
8743 2017-05-12 Tom Tromey <tom@tromey.com>
8744
8745 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8746
8747 2017-05-09 Yao Qi <yao.qi@linaro.org>
8748
8749 * regcache.c: Include <forward_list>.
8750 (struct regcache_list): Remove.
8751 (current_regcache): Update.
8752 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8753 (regcache_thread_ptid_changed): Likewise.
8754 (registers_changed_ptid): Likewise.
8755 (current_regcache_size): Likewise.
8756
8757 2017-05-09 Yao Qi <yao.qi@linaro.org>
8758
8759 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8760 (current_regcache_size): New function.
8761 (current_regcache_test): New function.
8762 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8763
8764 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8765
8766 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8767 (print_gp_register_row): Use get_frame_register_value.
8768
8769 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8770
8771 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8772 (mips_supply_fpregset): Likewise.
8773 (mips64_supply_gregset): Likewise.
8774
8775 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8776
8777 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8778 regcache->raw_supply_zeroed.
8779
8780 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8781
8782 * configure.nat: Rearrange 'case' statements to match
8783 host before cpu.
8784
8785 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8786
8787 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8788 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8789 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8790 "@nat_extra_makefile_frag@".
8791 (Makefile): Remove dependency on "@frags@".
8792 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8793 (data-directory/Makefile): Likewise.
8794 * config/aarch64/linux.mh: Deleted; moved contents to
8795 "gdb/configure.nat".
8796 * config/alpha/alpha-linux.mh: Likewise.
8797 * config/alpha/nbsd.mh: Likewise.
8798 * config/arm/linux.mh: Likewise.
8799 * config/arm/nbsdelf.mh: Likewise.
8800 * config/i386/cygwin.mh: Likewise.
8801 * config/i386/cygwin64.mh: Likewise.
8802 * config/i386/darwin.mh: Likewise.
8803 * config/i386/fbsd.mh: Likewise.
8804 * config/i386/fbsd64.mh: Likewise.
8805 * config/i386/go32.mh: Likewise.
8806 * config/i386/i386gnu.mh: Likewise.
8807 * config/i386/i386sol2.mh: Likewise.
8808 * config/i386/linux.mh: Likewise.
8809 * config/i386/linux64.mh: Likewise.
8810 * config/i386/mingw.mh: Likewise.
8811 * config/i386/mingw64.mh: Likewise.
8812 * config/i386/nbsd64.mh: Likewise.
8813 * config/i386/nbsdelf.mh: Likewise.
8814 * config/i386/nto.mh: Likewise.
8815 * config/i386/obsd.mh: Likewise.
8816 * config/i386/obsd64.mh: Likewise.
8817 * config/i386/sol2-64.mh: Likewise.
8818 * config/ia64/linux.mh: Likewise.
8819 * config/m32r/linux.mh: Likewise.
8820 * config/m68k/linux.mh: Likewise.
8821 * config/m68k/nbsdelf.mh: Likewise.
8822 * config/m68k/obsd.mh: Likewise.
8823 * config/m88k/obsd.mh: Likewise.
8824 * config/mips/fbsd.mh: Likewise.
8825 * config/mips/linux.mh: Likewise.
8826 * config/mips/nbsd.mh: Likewise.
8827 * config/mips/obsd64.mh: Likewise.
8828 * config/pa/linux.mh: Likewise.
8829 * config/pa/nbsd.mh: Likewise.
8830 * config/pa/obsd.mh: Likewise.
8831 * config/powerpc/aix.mh: Likewise.
8832 * config/powerpc/fbsd.mh: Likewise.
8833 * config/powerpc/linux.mh: Likewise.
8834 * config/powerpc/nbsd.mh: Likewise.
8835 * config/powerpc/obsd.mh: Likewise.
8836 * config/powerpc/ppc64-linux.mh: Likewise.
8837 * config/powerpc/spu-linux.mh: Likewise.
8838 * config/s390/linux.mh: Likewise.
8839 * config/sh/nbsd.mh: Likewise.
8840 * config/sparc/fbsd.mh: Likewise.
8841 * config/sparc/linux.mh: Likewise.
8842 * config/sparc/linux64.mh: Likewise.
8843 * config/sparc/nbsd64.mh: Likewise.
8844 * config/sparc/nbsdelf.mh: Likewise.
8845 * config/sparc/obsd64.mh: Likewise.
8846 * config/sparc/sol2.mh: Likewise.
8847 * config/tilegx/linux.mh: Likewise.
8848 * config/vax/nbsdelf.mh: Likewise.
8849 * config/vax/obsd.mh: Likewise.
8850 * config/xtensa/linux.mh: Likewise.
8851 * config/i386/i386gnu.mn: New file, with excerpts from
8852 "config/i386/i386gnu.mh".
8853 * configure: Regenerate.
8854 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8855 *.mh files under "gdb/config".
8856 * configure.nat: New file, with contents from the
8857 "gdb/config/*/*.mh" files.
8858
8859 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8860
8861 * btrace.c (btrace_clear): Free insn vector.
8862
8863 2017-05-05 Pedro Alves <palves@redhat.com>
8864
8865 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8866 * configure: Regenerate.
8867
8868 2017-05-04 Pedro Alves <palves@redhat.com>
8869
8870 * Makefile.in (SFILES): Add progspace-and-thread.c.
8871 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8872 (COMMON_OBS): Add progspace-and-thread.o.
8873 * breakpoint.c: Include "progspace-and-thread.h".
8874 (update_inserted_breakpoint_locations)
8875 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8876 Use scoped_restore_current_pspace_and_thread.
8877 (create_std_terminate_master_breakpoint): Use
8878 scoped_restore_current_program_space.
8879 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8880 (print_breakpoint_location): Use
8881 scoped_restore_current_program_space.
8882 (bp_loc_is_permanent): Use
8883 scoped_restore_current_pspace_and_thread.
8884 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8885 (download_tracepoint_locations): Use
8886 scoped_restore_current_pspace_and_thread.
8887 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8888 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8889 (enum step_over_calls_kind): Moved from inferior.h.
8890 (class scoped_restore_current_thread): New class.
8891 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8892 declaration.
8893 (scoped_restore_current_thread): New class.
8894 * infcmd.c: Include "common/gdb_optional.h".
8895 (continue_1, proceed_after_attach): Use
8896 scoped_restore_current_thread.
8897 (notice_new_inferior): Use scoped_restore_current_thread.
8898 * inferior.c: Include "progspace-and-thread.h".
8899 (restore_inferior, save_current_inferior): Delete.
8900 (add_inferior_command, clone_inferior_command): Use
8901 scoped_restore_current_pspace_and_thread.
8902 * inferior.h (scoped_restore_current_inferior): New class.
8903 * infrun.c: Include "progspace-and-thread.h" and
8904 "common/gdb_optional.h".
8905 (follow_fork_inferior): Use
8906 scoped_restore_current_pspace_and_thread.
8907 (scoped_restore_exited_inferior): New class.
8908 (handle_vfork_child_exec_or_exit): Use
8909 scoped_restore_exited_inferior,
8910 scoped_restore_current_pspace_and_thread,
8911 scoped_restore_current_thread and scoped_restore.
8912 (fetch_inferior_event): Use scoped_restore_current_thread.
8913 * linespec.c (decode_line_full, decode_line_1): Use
8914 scoped_restore_current_program_space.
8915 * mi/mi-main.c: Include "progspace-and-thread.h".
8916 (exec_continue): Use scoped_restore_current_thread.
8917 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8918 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8919 * proc-service.c (ps_pglobal_lookup): Use
8920 scoped_restore_current_program_space.
8921 * progspace-and-thread.c: New file.
8922 * progspace-and-thread.h: New file.
8923 * progspace.c (release_program_space, clone_program_space): Use
8924 scoped_restore_current_program_space.
8925 (restore_program_space, save_current_program_space)
8926 (save_current_space_and_thread): Delete.
8927 (switch_to_program_space_and_thread): Moved to
8928 progspace-and-thread.c.
8929 * progspace.h (save_current_program_space)
8930 (save_current_space_and_thread): Delete declarations.
8931 (scoped_restore_current_program_space): New class.
8932 * remote.c (remote_btrace_maybe_reopen): Use
8933 scoped_restore_current_thread.
8934 * symtab.c: Include "progspace-and-thread.h".
8935 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8936 * thread.c (print_thread_info_1): Use
8937 scoped_restore_current_thread.
8938 (struct current_thread_cleanup): Delete.
8939 (do_restore_current_thread_cleanup)
8940 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8941 (scoped_restore_current_thread::~scoped_restore_current_thread):
8942 ... this new dtor.
8943 (make_cleanup_restore_current_thread): Rename/convert to ...
8944 (scoped_restore_current_thread::scoped_restore_current_thread):
8945 ... this new ctor.
8946 (thread_apply_all_command): Use scoped_restore_current_thread.
8947 (thread_apply_command): Use scoped_restore_current_thread.
8948 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8949 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8950
8951 2017-05-04 Pedro Alves <palves@redhat.com>
8952
8953 * thread.c (make_cleanup_restore_current_thread): Move
8954 find_thread_ptid call before the is_stopped call. Assert that the
8955 thread is found. Replace is_stopped call by checking the thread's
8956 state directly. Remove unnecessary NULL-thread check.
8957
8958 2017-05-04 Pedro Alves <palves@redhat.com>
8959
8960 * corelow.c (thread_section_name): New class.
8961 (get_core_register_section, get_core_siginfo): Use it.
8962
8963 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8964
8965 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8966 (get_core_register_section): Remove xfree of NULL pointer.
8967
8968 2017-05-03 Alan Hayward <alan.hayward@arm.com>
8969
8970 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8971 * regcache.c (regcache::raw_supply_zeroed): New function.
8972 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8973
8974 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8975
8976 * gdbarch.sh: Remove commented out definition of
8977 TARGET_CHAR_BIT.
8978 * gdbarch.h: Re-generate.
8979
8980 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8981
8982 * configure: Regenerate.
8983
8984 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8985
8986 * solib-target.c (solib_target_relocate_section_addresses):
8987 Remove num_section_bases, num_bases, segment_bases variables.
8988
8989 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8990
8991 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8992
8993 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8994
8995 * solib-target.c: Include <vector>
8996 (struct lm_info_target) <~lm_info_target>: Remove.
8997 <segment_bases, section_bases>: Change type to
8998 std::vector<CORE_ADDR>.
8999 (library_list_start_segment, library_list_start_section,
9000 library_list_end_library,
9001 solib_target_relocate_section_addresses): Adjust.
9002
9003 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9004
9005 * gdbarch.sh (software_single_step): Change return type to
9006 std::vector<CORE_ADDR>.
9007 * gdbarch.c, gdbarch.h: Re-generate.
9008 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9009 Adjust.
9010 (arm_deal_with_atomic_sequence_raw): Adjust.
9011 (thumb_get_next_pcs_raw): Adjust.
9012 (arm_get_next_pcs_raw): Adjust.
9013 (arm_get_next_pcs): Adjust.
9014 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9015 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9016 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9017 (alpha_software_single_step): Adjust.
9018 * alpha-tdep.h (alpha_software_single_step): Adjust.
9019 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9020 * arm-tdep.c (arm_software_single_step): Adjust.
9021 (arm_breakpoint_kind_from_current_state): Adjust.
9022 * arm-tdep.h (arm_software_single_step): Adjust.
9023 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9024 * cris-tdep.c (cris_software_single_step): Adjust.
9025 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9026 (micromips_deal_with_atomic_sequence): Adjust.
9027 (deal_with_atomic_sequence): Adjust.
9028 (mips_software_single_step): Adjust.
9029 * mips-tdep.h (mips_software_single_step): Adjust.
9030 * moxie-tdep.c (moxie_software_single_step): Adjust.
9031 * nios2-tdep.c (nios2_software_single_step): Adjust.
9032 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9033 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9034 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9035 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9036 * sparc-tdep.c (sparc_software_single_step): Adjust.
9037 * spu-tdep.c (spu_software_single_step): Adjust.
9038 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9039
9040 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9041
9042 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9043 * gdbarch.h: Re-generate.
9044
9045 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9046
9047 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9048 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9049 * python/py-instruction.c, python/py-instruction.h: New file.
9050 * python/py-record.c: Add py-instruction.h include.
9051 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9052 gdb.RecordInstruction.
9053 * python/python-internal.h: Add gdbpy_initialize_instruction
9054 declaration.
9055 * python/python.c (do_start_initialization): Add
9056 gdbpy_initialize_instruction.
9057
9058 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9059
9060 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9061 Remove.
9062 (btrace_func_from_recpy_func): New function.
9063 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9064 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9065 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9066 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9067 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9068 Also, use new helper functions.
9069 (btpy_list_item): Use new helper functions.
9070 (recpy_bt_function_call_history): Use new type name.
9071 (btpy_call_getset): Remove.
9072 (gdbpy_initialize_btrace): Remove code to initialize
9073 gdb.BtraceFunctionCall.
9074 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9075 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9076 recpy_bt_func_prev, recpy_bt_func_next): New export.
9077 * python/py-record.c (recpy_func_type): New static object.
9078 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9079 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9080 recpy_func_next): New function.
9081 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9082 (recpy_func_getset): New static object.
9083 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9084 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9085
9086 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9087
9088 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9089 (btpy_object, btpy_insn_type, btpy_new): Remove.
9090 (btpy_list_object): Use gdb.RecordInstruction type instead of
9091 gdb.BtraceInstruction type.
9092 (btrace_insn_from_recpy_insn): New function.
9093 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9094 btpy_new.
9095 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9096 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9097 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9098 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9099 instead of btpy_object.
9100 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9101 btpy_insn_data, btpy_insn_decode): Rename to ...
9102 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9103 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9104 recpy_bt_insn_decode): This. Also, use new helper functions.
9105 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9106 recpy_insn_type.
9107 (btpy_insn_getset): Remove.
9108 (gdbpy_initialize_btrace): Remove code to initialize
9109 gdb.BtraceInstruction. Use recpy_element_object.
9110 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9111 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9112 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9113 * python/py-record.c (recpy_insn_type): New static object.
9114 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9115 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9116 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9117 New function.
9118 (recpy_insn_getset): New static object.
9119 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9120 * python/py-record.h (recpy_element_object): New typedef.
9121 (recpy_insn_type, recpy_insn_new): New export.
9122
9123 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9124
9125 * py-record-btrace.c (btpy_insn_new): Removed.
9126 (btpy_insn_or_gap_new): New function.
9127 (btpy_insn_error): Removed.
9128 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9129 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9130 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9131 btpy_insn_or_gap_new instead of btpy_insn_new.
9132 (btpy_insn_getset): Remove btpy_insn_error.
9133 * py-record.c (recpy_gap_type): New static object.
9134 (recpy_gap_object): New typedef.
9135 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9136 recpy_gap_reason_string): New function.
9137 (recpy_gap_getset): New static object.
9138 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9139 * py-record.h (recpy_gap_new): New export.
9140
9141 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9142
9143 * python/py-record.c (recpy_ptid): Remove.
9144 (recpy_record_getset): Remove recpy_ptid.
9145
9146 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9147
9148 * btrace.c (btrace_fetch): Set inferior_ptid.
9149 * python/py-record-btrace.c: Add "py-record.h" include.
9150 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9151 recpy_bt_end, recpy_bt_instruction_history,
9152 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9153 in gdb.Record object instead of current ptid.
9154 * python/py-record.c: Include new "py-record.h" file.
9155 (recpy_record_object): Moved to py-record.h.
9156 * python/py-record.h: New file.
9157
9158 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9159
9160 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9161 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9162 indentation.
9163
9164 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9165
9166 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9167 the past maintainers section.
9168
9169 2017-04-28 Yao Qi <yao.qi@linaro.org>
9170
9171 * infcmd.c (get_return_value): Use regcache ctor, and remove
9172 cleanup.
9173
9174 2017-04-28 Yao Qi <yao.qi@linaro.org>
9175 Pedro Alves <palves@redhat.com>
9176
9177 * regcache.c (regcache::regcache): New tag dispatch ctor.
9178 (do_cooked_read): Moved above.
9179 (regcache_dup): Use the tag dispatch ctor..
9180 * regcache.h (regcache): Declare ctor, delete copy ctor and
9181 assignment operator, remove friend regcache_dup.
9182
9183 2017-04-28 Yao Qi <yao.qi@linaro.org>
9184
9185 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9186 call method save instead of regcache_cpy.
9187 * regcache.h (struct regcache): Make regcache_dup a friend.
9188
9189 2017-04-28 Yao Qi <yao.qi@linaro.org>
9190
9191 * regcache.c (struct regcache): Move to regcache.h
9192 (regcache::arch): New method.
9193 (regcache_get_ptid): Update.
9194 (get_regcache_arch): Call arch method.
9195 (get_regcache_aspace): Call method aspace.
9196 (register_buffer): Change it to method.
9197 (regcache_save): Change it to regcache::save.
9198 (regcache_restore): Likewise.
9199 (regcache_cpy_no_passthrough): Remove the declaration.
9200 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9201 (regcache_cpy_no_passthrough): Change it to method
9202 cpy_no_passthrough.
9203 (regcache_register_status): Change it to method
9204 get_register_status.
9205 (regcache_invalidate): Change it to method invalidate.
9206 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9207 (regcache_raw_update): Change it to method raw_update.
9208 (regcache_raw_read): Likewise.
9209 (regcache_raw_read_signed): Likewise.
9210 (regcache_raw_read_unsigned): Likewise.
9211 (regcache_raw_write_signed): Likewise.
9212 (regcache_raw_write_unsigned): Likewise.
9213 (regcache_cooked_read): Likewise.
9214 (regcache_cooked_read_value): Likewise.
9215 (regcache_cooked_read_signed): Likewise.
9216 (regcache_cooked_read_unsigned): Likewise.
9217 (regcache_cooked_write_signed): Likewise.
9218 (regcache_cooked_write_unsigned): Likewise.
9219 (regcache_raw_set_cached_value): Likewise.
9220 (regcache_raw_write): Likewise.
9221 (regcache_cooked_write): Likewise.
9222 (regcache_xfer_part): Likewise.
9223 (regcache_raw_read_part): Likewise.
9224 (regcache_raw_write_part): Likewise.
9225 (regcache_cooked_read_part): Likewise.
9226 (regcache_cooked_write_part): Likewise.
9227 (regcache_raw_supply): Likewise.
9228 (regcache_raw_collect): Likewise.
9229 (regcache_transfer_regset): Likewise.
9230 (regcache_supply_regset): Likewise.
9231 (regcache_collect_regset): Likewise.
9232 (regcache_debug_print_register): Likewise.
9233 (enum regcache_dump_what): Move it to regcache.h.
9234 (regcache_dump): Change it to method dump.
9235 * regcache.h (enum regcache_dump_what): New.
9236 (class regcache): New.
9237 * target.c (target_fetch_registers): Call method
9238 debug_print_register.
9239 (target_store_registers): Likewise.
9240
9241 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9242
9243 * windows-nat.c (struct lm_info_windows): Initialize field.
9244 (windows_make_so): Allocate lm_info_windows with new.
9245 (windows_free_so): Free lm_info_windows with delete.
9246
9247 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9248
9249 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9250 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9251 cleanup.
9252 (darwin_free_so): Free lm_info_darwin with delete.
9253
9254 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9255
9256 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9257 <l_addr_p>: Change type to bool.
9258 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9259 (svr4_free_so): Free lm_info_svr4 with delete.
9260 (svr4_copy_library_list): Replace memcpy with call to copy
9261 constructor.
9262 (library_list_start_library, svr4_default_sos): Allocate
9263 lm_info_svr4 with new.
9264
9265 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9266
9267 * solib-target.c (struct lm_info_target): Add destructor,
9268 initialize fields.
9269 <name>: Change type to std::string.
9270 (library_list_start_library): Allocate lm_info_target with new.
9271 (solib_target_free_library_list): Free lm_info_target with
9272 delete.
9273 (solib_target_current_sos): Adapt to std::string.
9274 (solib_target_free_so): Free lm_info_target with delete.
9275
9276 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9277
9278 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9279 fields.
9280 (frv_current_sos): Allocate lm_info_frv with new.
9281 (frv_relocate_main_executable): Free lm_info_frv with delete,
9282 allocate with new.
9283 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9284
9285 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9286
9287 * solib-frv.c (struct lm_info_frv): Fix indentation.
9288
9289 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9290
9291 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9292 map field.
9293 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9294 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9295 and allocate with new.
9296 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9297
9298 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9299
9300 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9301 <filename, member_name>: Change type to std::string.
9302 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9303 (library_list_start_library): Allocate lm_info_aix with new.
9304 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9305 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9306 with copy constructor.
9307
9308 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9309
9310 * solist.h (struct lm_info): Remove.
9311 (struct lm_info_base): New class.
9312 (struct so_list) <lm_info>: Change type to lm_info_base *.
9313 * nto-tdep.c (struct lm_info): Remove.
9314 (lm_addr): Adjust.
9315 * solib-aix.c (struct lm_info): Rename to ...
9316 (struct lm_info_aix): ... this. Extend lm_info_base.
9317 (lm_info_p): Rename to ...
9318 (lm_info_aix_p): ... this, and adjust.
9319 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9320 solib_aix_parse_libraries, library_list_start_library,
9321 solib_aix_free_library_list, solib_aix_parse_libraries,
9322 solib_aix_get_library_list,
9323 solib_aix_relocate_section_addresses, solib_aix_free_so,
9324 solib_aix_get_section_offsets,
9325 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9326 Adjust.
9327 (struct solib_aix_inferior_data) <library_list>: Adjust.
9328 * solib-darwin.c (struct lm_info): Rename to ...
9329 (struct lm_info_darwin): ... this. Extend lm_info_base.
9330 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9331 * solib-dsbt.c (struct lm_info): Rename to ...
9332 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9333 (struct dsbt_info) <main_executable_lm_info): Adjust.
9334 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9335 dsbt_relocate_section_addresses): Adjust.
9336 * solib-frv.c (struct lm_info): Rename to ...
9337 (struct lm_info_frv): ... this. Extend lm_info_base.
9338 (main_executable_lm_info): Adjust.
9339 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9340 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9341 find_canonical_descriptor_in_load_object,
9342 frv_fdpic_find_canonical_descriptor): Adjust.
9343 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9344 to lm_info_svr4.
9345 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9346 svr4_clear_so, svr4_copy_library_list,
9347 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9348 svr4_current_sos, svr4_fetch_objfile_link_map,
9349 solist_update_incremental): Adjust.
9350 * solib-svr4.h (struct lm_info_svr4): Move here from
9351 solib-svr4.c.
9352 * solib-target.c (struct lm_info): Rename to ...
9353 (struct lm_info_target): ... this. Extend lm_info_base.
9354 (lm_info_p): Rename to ...
9355 (lm_info_target_p): ... this.
9356 (solib_target_parse_libraries, library_list_start_segment,
9357 library_list_start_section, library_list_start_library,
9358 library_list_end_library, solib_target_free_library_list,
9359 solib_target_current_sos, solib_target_free_so,
9360 solib_target_relocate_section_addresses): Adjust.
9361 * windows-nat.c (struct lm_info): Rename to ...
9362 (struct lm_info_windows): ... this. Extend lm_info_base.
9363 (windows_make_so, handle_load_dll, handle_unload_dll,
9364 windows_xfer_shared_libraries): Adjust.
9365
9366 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9367
9368 * solib-darwin.c (struct darwin_so_list): Remove.
9369 (darwin_current_sos): Allocate an so_list object instead of a
9370 darwin_so_list, separately allocate an lm_info object.
9371 (darwin_free_so): Free lm_info.
9372
9373 2017-04-28 John Baldwin <jhb@FreeBSD.org>
9374
9375 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9376 with fprintf_filtered.
9377
9378 2017-04-28 Yao Qi <yao.qi@linaro.org>
9379
9380 * regcache.c (regcache::regcache): New function.
9381 (regcache::~regcache): New function.
9382 (regcache_xmalloc_1): Remove.
9383 (regcache_xmalloc): Call new regcache.
9384 (regcache_xfree): Call delete regcache.
9385 (get_thread_arch_aspace_regcache): Call new regcache.
9386
9387 2017-04-28 Yao Qi <yao.qi@linaro.org>
9388
9389 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9390 lwp instead of ptid_get_lwp.
9391
9392 2017-04-28 Yao Qi <yao.qi@linaro.org>
9393
9394 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9395 lwp_info instead of getting from inferior_ptid.
9396
9397 2017-04-27 Keith Seitz <keiths@redhat.com>
9398
9399 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9400 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9401 (CV_CONVERSION_BADNESS): Define.
9402 (rank_one_type): Remove overly restrictive rvalue reference
9403 rank checks.
9404 Add cv-qualifier checks and subranks for type equality.
9405 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9406 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9407 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9408
9409 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9410
9411 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9412 count when creating the object.
9413
9414 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9415 Ulrich Weigand <uweigand@de.ibm.com>
9416
9417 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9418 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9419 is used in AIX.
9420 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9421 (process_xcoff_symbol): Likewise.
9422 (scan_xcoff_symtab): Likewise.
9423
9424 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9425
9426 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9427 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9428 (ia64_access_reg): Use get_frame_register_unsigned.
9429 (ia64_access_rse_reg): Likewise.
9430 (ia64_libunwind_frame_prev_register): Likewise.
9431
9432 2017-04-26 Jiong Wang <jiong.wang@arm.com>
9433
9434 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9435 * gdbarch.c: Regenerated.
9436 * gdbarch.h: Regenerated.
9437 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9438 visibility external.
9439 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9440 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9441 (enum cfa_how_kind): Move to ...
9442 (struct dwarf2_frame_state_reg_info): Likewise.
9443 (struct dwarf2_frame_state): Likewise.
9444 * dwarf2-frame.h: ... here.
9445 (dwarf2_frame_state_alloc_regs): New declaration.
9446 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9447 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9448
9449 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9450
9451 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9452 regcache_raw_read_unsigned.
9453 (xtensa_pseudo_register_write): Likewise.
9454
9455 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9456
9457 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9458 (nds32_pseudo_register_write): Likewise.
9459
9460 2017-04-25 Yao Qi <yao.qi@linaro.org>
9461
9462 * regcache.c (struct regcache) <readonly_p>: Change its type
9463 to bool.
9464 (regcache_xmalloc_1): Update parameter type and callers update.
9465
9466 2017-04-25 Yao Qi <yao.qi@linaro.org>
9467
9468 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9469 set_gdbarch_wchar_bit.
9470 * arm-tdep.c (arm_gdbarch_init): Likewise.
9471
9472 2017-04-25 Pedro Alves <palves@redhat.com>
9473
9474 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9475 (BothAreRelocatable, memcopy, memmove): Don't define.
9476 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9477 macros.
9478
9479 2017-04-25 Pedro Alves <palves@redhat.com>
9480
9481 * common/common-defs.h: Include "common/poison.h".
9482 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9483 and adjust.
9484 * common/poison.h: New file.
9485 * common/traits.h: Include <type_traits>.
9486 (Not, Or, Requires): New, moved from common/function-view.h.
9487
9488 2017-04-25 Pedro Alves <palves@redhat.com>
9489
9490 * breakpoint.h (struct breakpoint): In-class initialize all
9491 fields. Make boolean fields "bool".
9492 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9493 memset call and initializations no longer necessary.
9494
9495 2017-04-25 Pedro Alves <palves@redhat.com>
9496
9497 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9498 reference.
9499 (pt_btrace_insn): New function.
9500 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9501
9502 2017-04-25 Pedro Alves <palves@redhat.com>
9503
9504 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9505 "base" field and inherit from "bp_location" instead. Add
9506 non-default ctor.
9507 (allocate_location_exception): Use new non-default ctor.
9508 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9509 (init_bp_location): Convert to ...
9510 (bp_location::bp_location): ... this new ctor, and remove memset
9511 call.
9512 (base_breakpoint_allocate_location): Use the new non-default ctor.
9513 * breakpoint.h (bp_location): Now a class. Declare default and
9514 non-default ctors. In-class initialize all members.
9515 (init_bp_location): Remove declaration.
9516
9517 2017-04-25 Pedro Alves <palves@redhat.com>
9518
9519 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9520 assignment operator.
9521
9522 2017-04-24 Yao Qi <yao.qi@linaro.org>
9523
9524 * doublest.c (convert_doublest_to_floatformat): Call
9525 floatformat_totalsize_bytes.
9526
9527 2017-04-22 Tom Tromey <tom@tromey.com>
9528
9529 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9530 ui_out_emit_list.
9531 * stack.c (print_frame): Use ui_out_emit_list.
9532 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9533 ui_out_emit_list.
9534 * mi/mi-main.c (print_one_inferior)
9535 (mi_cmd_data_list_register_names)
9536 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9537 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9538 ui_out_emit_list.
9539 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9540 (mi_output_solib_attribs): Use ui_out_emit_list,
9541 ui_out_emit_tuple.
9542 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9543 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9544 (mi_cmd_stack_list_args, list_args_or_locals): Use
9545 ui_out_emit_list.
9546 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9547 * breakpoint.c (print_solib_event, output_thread_groups): Use
9548 ui_out_emit_list.
9549
9550 2017-04-22 Tom Tromey <tom@tromey.com>
9551
9552 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9553 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9554 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9555
9556 2017-04-22 Tom Tromey <tom@tromey.com>
9557
9558 * tracepoint.c (tvariables_info_1)
9559 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9560
9561 2017-04-22 Tom Tromey <tom@tromey.com>
9562
9563 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9564 annotate_arg_emitter.
9565 * breakpoint.c (print_mention_watchpoint)
9566 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9567 * annotate.h (struct annotate_arg_emitter): New.
9568
9569 2017-04-22 Tom Tromey <tom@tromey.com>
9570
9571 * record-btrace.c (record_btrace_insn_history)
9572 (record_btrace_insn_history_range, record_btrace_call_history)
9573 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9574 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9575 ui_out_emit_tuple.
9576 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9577 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9578 * skip.c (skip_info): Use ui_out_emit_tuple.
9579 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9580 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9581 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9582 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9583 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9584 ui_out_emit_tuple.
9585 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9586 (output_register, mi_cmd_data_read_memory)
9587 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9588 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9589 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9590 Use ui_out_emit_tuple.
9591 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9592 ui_out_emit_tuple.
9593 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9594 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9595 * linux-thread-db.c (info_auto_load_libthread_db): Use
9596 ui_out_emit_tuple.
9597 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9598 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9599 * disasm.c (do_mixed_source_and_assembly_deprecated)
9600 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9601 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9602 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9603 * breakpoint.c (print_one_breakpoint_location)
9604 (print_one_breakpoint): Use ui_out_emit_tuple.
9605 * auto-load.c (print_script, info_auto_load_cmd): Use
9606 ui_out_emit_tuple.
9607 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9608
9609 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9610
9611 * thread.c (print_thread_info_1): Remove dead code.
9612
9613 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9614
9615 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9616 GDB_SELF_TEST.
9617 * arm-tdep.c (selftests::arm_record_test): Likewise.
9618
9619 2017-04-21 Yao Qi <yao.qi@linaro.org>
9620
9621 * regcache.c (regcache_restore): Remove argument 2. Replace
9622 argument 3 with regcache. Get register status from
9623 src->register_status and get register contents from
9624 register_buffer (src, regnum).
9625 (regcache_cpy): Update.
9626
9627 2017-04-19 Pedro Alves <palves@redhat.com>
9628
9629 * gdbthread.h (thread): Add missing closing parenthesis in
9630 comment.
9631
9632 2017-04-19 Pedro Alves <palves@redhat.com>
9633
9634 * common/refcounted-object.h: New file.
9635 * gdbthread.h: Include "common/refcounted-object.h".
9636 (thread_info): Inherit from refcounted_object and add comments.
9637 (thread_info::incref, thread_info::decref)
9638 (thread_info::m_refcount): Delete.
9639 (thread_info::deletable): Use the refcounted_object::refcount()
9640 method.
9641 * inferior.c (current_inferior_): Add comment.
9642 (set_current_inferior): Increment/decrement refcounts.
9643 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9644 not-deletable instead of comparing with the current inferior.
9645 (initialize_inferiors): Increment the initial inferior's refcount.
9646 * inferior.h (struct inferior): Forward declare.
9647 Include "common/refcounted-object.h".
9648 (current_inferior, set_current_inferior): Move declaration to
9649 before struct inferior's definition, and fix comment.
9650 (inferior): Inherit from refcounted_object. Add comments.
9651 * thread.c (switch_to_thread_no_regs): Reference the thread's
9652 inferior pointer directly instead of doing a ptid lookup.
9653 (switch_to_no_thread): New function.
9654 (switch_to_thread(thread_info *)): New function, factored out
9655 from ...
9656 (switch_to_thread(ptid_t)): ... this.
9657 (restore_current_thread): Delete.
9658 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9659 fields, and add 'inf' field.
9660 (do_restore_current_thread_cleanup): Check whether old->inf is
9661 alive instead of looking up an inferior by ptid. Use
9662 switch_to_thread and switch_to_no_thread.
9663 (restore_current_thread_cleanup_dtor): Use old->inf directly
9664 instead of lookup up an inferior by id. Decref the inferior.
9665 Don't restore 'removable'.
9666 (make_cleanup_restore_current_thread): Same the inferior pointer
9667 in old, instead of the inferior number. Incref the inferior.
9668 Don't save/clear 'removable'.
9669
9670 2017-04-19 Pedro Alves <palves@redhat.com>
9671
9672 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9673 unittests/scoped_restore-selftests.c.
9674 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9675 * common/scoped_restore.h (scoped_restore_base): Make "class".
9676 (scoped_restore_base::release): New public method.
9677 (scoped_restore_base::scoped_restore_base): New protected ctor.
9678 (scoped_restore_base::m_saved_var): New protected field.
9679 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9680 scoped_restore_base base class instead of m_saved_var directly.
9681 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9682 (scoped_restore_tmpl::scoped_restore_tmpl(const
9683 scoped_restore_tmpl<T>&)): Likewise.
9684 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9685 method.
9686 (scoped_restore_tmpl::saved_var): New method.
9687 (scoped_restore_tmpl::m_saved_var): Delete.
9688 * inferior.h (inferior::detaching): Now a bool.
9689 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9690 cleanup.
9691 * unittests/scoped_restore-selftests.c: New file.
9692
9693 2017-04-19 Pedro Alves <palves@redhat.com>
9694
9695 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9696 Re-sort in alphabetic order.
9697
9698 2017-04-18 Pedro Alves <palves@redhat.com>
9699
9700 * xml-support.c (obstack_xml_printf): Delete.
9701 * xml-support.h (obstack_xml_printf): Delete.
9702
9703 2017-04-18 Pedro Alves <palves@redhat.com>
9704
9705 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9706 vdebug, verror, body_text, start_element, end_element, name,
9707 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9708 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9709 is_xinclude>: Make private and add m_ prefix.
9710 (gdb_xml_parser::body_text): New method, based on ...
9711 (gdb_xml_body_text): ... this. Adjust.
9712 (gdb_xml_parser::vdebug): New method, based on ...
9713 (gdb_xml_debug): ... this. Adjust.
9714 (gdb_xml_parser::verror): New method, based on ...
9715 (gdb_xml_error): ... this. Adjust.
9716 (gdb_xml_parser::start_element): New method, based on ...
9717 (gdb_xml_start_element): ... this. Adjust.
9718 (gdb_xml_start_element_wrapper): Defer to
9719 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9720 (gdb_xml_parser::end_element): New method, based on ...
9721 (gdb_xml_end_element_wrapper): ... this. Adjust.
9722 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9723 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9724 (gdb_xml_parser::use_dtd): New method, based on ...
9725 (gdb_xml_use_dtd): ... this. Adjust.
9726 (gdb_xml_parser::parse): New method, based on ...
9727 (gdb_xml_parse): ... this. Adjust.
9728 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9729 (xinclude_start_include): Adjust to call the parser's name method.
9730 (xml_xinclude_default, xml_xinclude_start_doctype)
9731 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9732 method.
9733 (xml_process_xincludes): Adjust to call parser methods.
9734 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9735 declarations.
9736
9737 2017-04-18 Pedro Alves <palves@redhat.com>
9738
9739 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9740 gdb::optional<std::string>.
9741 * xml-support.c: Include <string>.
9742 (scope_level::scope_level(scope_level &&))
9743 (scope_level::~scope_level): Delete.
9744 (scope_level::body): Now a std::string.
9745 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9746 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9747 parameter.
9748 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9749 (xinclude_parsing_data::output): Now a std::string reference.
9750 (xinclude_start_include): Adjust.
9751 (xml_xinclude_default): Adjust.
9752 (xml_process_xincludes): Add 'output' parameter, and return bool.
9753 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9754 and return bool.
9755 * xml-tdesc.c: Include <unordered_map> and <string>.
9756 (tdesc_xml_cache): Delete.
9757 (tdesc_xml_cache_s): Delete.
9758 (xml_cache): Now an std::unordered_map.
9759 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9760 (target_fetch_description_xml): Change return type to
9761 gdb::optional<std::string>, and adjust.
9762 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9763 (target_fetch_description_xml): Change return type to
9764 gdb::optional<std::string>.
9765
9766 2017-04-18 Pedro Alves <palves@redhat.com>
9767
9768 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9769 unittests/optional-selftests.c.
9770 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9771 * unittests/optional-selftests.c: New file.
9772 * unittests/optional/assignment/1.cc: New file.
9773 * unittests/optional/assignment/2.cc: New file.
9774 * unittests/optional/assignment/3.cc: New file.
9775 * unittests/optional/assignment/4.cc: New file.
9776 * unittests/optional/assignment/5.cc: New file.
9777 * unittests/optional/assignment/6.cc: New file.
9778 * unittests/optional/assignment/7.cc: New file.
9779 * unittests/optional/cons/copy.cc: New file.
9780 * unittests/optional/cons/default.cc: New file.
9781 * unittests/optional/cons/move.cc: New file.
9782 * unittests/optional/cons/value.cc: New file.
9783 * unittests/optional/in_place.cc: New file.
9784 * unittests/optional/observers/1.cc: New file.
9785 * unittests/optional/observers/2.cc: New file.
9786
9787 2017-04-18 Pedro Alves <palves@redhat.com>
9788
9789 * common/gdb_optional.h: Include common/traits.h.
9790 (in_place_t): New type.
9791 (in_place): New constexpr variable.
9792 (optional::optional): Remove member initialization of
9793 m_instantiated.
9794 (optional::optional(in_place_t...)): New constructor.
9795 (optional::~optional): Use reset.
9796 (optional::optional(const optional&)): New.
9797 (optional::optional(const optional&&)): New.
9798 (optional::optional(T &)): New.
9799 (optional::optional(T &&)): New.
9800 (operator::operator=(const optional &)): New.
9801 (operator::operator=(optional &&)): New.
9802 (operator::operator= (const T &))
9803 (operator::operator= (T &&))
9804 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9805 (operator::reset): New.
9806 (operator::m_instantiated):: Add in-class initializer.
9807 * common/traits.h: Include <type_traits>.
9808 (struct And): New types.
9809
9810 2017-04-18 Pedro Alves <palves@redhat.com>
9811
9812 * xml-support.c: Include <vector>.
9813 (scope_level::scope_level(const gdb_xml_element *))
9814 (scope_level::scope_level(scope_level&&)): New.
9815 (scope_level::~scope_level): New.
9816 (scope_level_s): Delete.
9817 (gdb_xml_parser::scopes): Now a std::vector.
9818 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9819 Use std::vector.
9820 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9821 scope cleanup code.
9822 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9823 of the scopes member. Use std::vector::emplace_back.
9824
9825 2017-04-18 Pedro Alves <palves@redhat.com>
9826
9827 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9828 a bool.
9829 (gdb_xml_end_element): Change type of first parameter.
9830 (gdb_xml_cleanup): Rename to ...
9831 (gdb_xml_parser::~gdb_xml_parser): ... this.
9832 (gdb_xml_create_parser_and_cleanup): Delete with ...
9833 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9834 to this new ctor.
9835 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9836 using gdb_xml_create_parser_and_cleanup.
9837 (xinclude_parsing_data): Add ctor/dtor.
9838 (xml_xinclude_cleanup): Delete.
9839 (xml_process_xincludes): Create a local xinclude_parsing_data
9840 instead of heap-allocating one. Create a local gdb_xml_parser
9841 instead of heap-allocating one with
9842 gdb_xml_create_parser_and_cleanup.
9843
9844 2017-04-18 John Baldwin <jhb@FreeBSD.org>
9845
9846 PR threads/20743
9847 * fbsd-nat.c (resume_one_thread_cb): Remove.
9848 (resume_all_threads_cb): Remove.
9849 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9850 iterate_over_threads.
9851
9852 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9853
9854 * NEWS: Create a new section for the next release branch.
9855 Rename the section of the current branch, now that it has
9856 been cut.
9857
9858 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9859
9860 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9861 * version.in: Bump version to 8.0.50.DATE-git.
9862
9863 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9864
9865 PR gdb/21385
9866 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9867 independently of the host, and fix build breakage on Cygwin.
9868
9869 2017-04-13 Pedro Alves <palves@redhat.com>
9870
9871 * inferior.c (free_inferior): Convert to ...
9872 (inferior::~inferior): ... this dtor.
9873 (inferior::inferior): New ctor, factored out from ...
9874 (add_inferior_silent): ... here. Allocate the inferior with a new
9875 expression.
9876 (delete_inferior): Call delete instead of free_inferior.
9877 * inferior.h (gdb_environ, continuation): Forward declare.
9878 (inferior): Now a class. Add in-class initialization to all
9879 members. Make boolean fields bool, except 'detaching'.
9880 (inferior::inferior): New explicit ctor.
9881 (inferior::~inferior): New.
9882
9883 2017-04-13 Pedro Alves <palves@redhat.com>
9884
9885 * inferior.c (init_inferior_list): Delete.
9886 * inferior.h (init_inferior_list): Delete.
9887
9888 2017-04-13 Pedro Alves <palves@redhat.com>
9889
9890 PR threads/13217
9891 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9892 (top level): Call it twice, with different thread sets.
9893
9894 2017-04-13 Pedro Alves <palves@redhat.com>
9895
9896 * thread.c: Include <algorithm>.
9897 (thread_array_cleanup): Delete.
9898 (scoped_inc_dec_ref): New class.
9899 (live_threads_count): New function.
9900 (set_thread_refcount): Delete.
9901 (tp_array_compar_ascending): Now a bool.
9902 (tp_array_compar): Convert to a std::sort comparison function.
9903 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9904 and live_threads_count.
9905
9906 2017-04-13 Pedro Alves <palves@redhat.com>
9907
9908 * infrun.c (follow_fork_inferior): Also switch the current
9909 inferior.
9910
9911 2017-04-13 Pedro Alves <palves@redhat.com>
9912
9913 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9914 before calling create_internal_breakpoint.
9915
9916 2017-04-13 Pedro Alves <palves@redhat.com>
9917
9918 * fork-child.c (execv_argv): New class.
9919 (breakup_args): Refactored as ...
9920 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9921 Copy arguments to storage and replace separators with NULL
9922 terminators in place.
9923 (escape_bang_in_quoted_argument): Adjust to return bool.
9924 (execv_argv::execv_argv): New ctor.
9925 (execv_argv::init_for_shell): New method, factored out from
9926 fork_inferior. Don't strdup strings into the vector.
9927 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9928 Remove free_vector_argv call.
9929
9930 2017-04-13 Yao Qi <yao.qi@linaro.org>
9931
9932 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9933 tdep->rx_psw_type.
9934
9935 2017-04-13 Yao Qi <yao.qi@linaro.org>
9936
9937 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9938 * rx-tdep.c (rx_gdbarch_init): Likewise.
9939
9940 2017-04-13 Pedro Alves <palves@redhat.com>
9941
9942 * breakpoint.h (struct breakpoint): Reindent.
9943
9944 2017-04-13 Pedro Alves <palves@redhat.com>
9945
9946 * breakpoint.c (bp_location): Rename to ...
9947 (bp_locations): ... this. All references updated.
9948 (bp_location_count): Rename to ...
9949 (bp_locations_count): ... this. All references updated.
9950 (bp_location_placed_address_before_address_max): Rename to ...
9951 (bp_locations_placed_address_before_address_max): ... this. All
9952 references updated.
9953 (bp_location_shadow_len_after_address_max): Rename to ...
9954 (bp_locations_shadow_len_after_address_max): ... this. All
9955 references updated.
9956 (bp_location_compare_addrs): Rename to ...
9957 (bp_locations_compare_addrs): ... this. All references updated.
9958 (bp_location_compare):Rename to ...
9959 (bp_locations_compare): ... this. All references updated.
9960 (bp_location_target_extensions_update): Rename to ...
9961 (bp_locations_target_extensions_update): ... this. All references
9962 updated.
9963
9964 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9965
9966 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9967 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9968 'sgtty.h'.
9969 * common/gdb_termios.h: New file, with parts of "terminal.h".
9970 * inflow.c: Include "gdb_termios.h".
9971 * ser-unix.c: Include "gdb_termios.h".
9972 * terminal.h: Move terminal-related defines to
9973 "common/gdb_termios.h".
9974
9975 2017-04-12 Tom Tromey <tom@tromey.com>
9976
9977 * probe.c (parse_probes): Update.
9978 * location.h (delete_event_location): Don't declare.
9979 (event_location_deleter::operator()): Update.
9980 * location.c (event_location_deleter::operator()): Rename from
9981 delete_event_location.
9982 * linespec.h (linespec_result) <location>: Change type to
9983 event_location_up.
9984 * linespec.c (canonicalize_linespec, event_location_to_sals)
9985 (decode_objc): Update.
9986 (linespec_result): Don't call delete_event_location.
9987 * breakpoint.c (create_breakpoints_sal)
9988 (bkpt_probe_create_sals_from_location)
9989 (strace_marker_create_sals_from_location): Update.
9990
9991 2017-04-12 Tom Tromey <tom@tromey.com>
9992
9993 * linespec.h (struct linespec_result): Add constructor and
9994 destructor.
9995 (init_linespec_result, destroy_linespec_result)
9996 (make_cleanup_destroy_linespec_result): Don't declare.
9997 * linespec.c (init_linespec_result): Remove.
9998 (linespec_result::~linespec_result): Rename from
9999 destroy_linespec_result. Update.
10000 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10001 Remove.
10002 * breakpoint.c (create_breakpoint, break_range_command)
10003 (decode_location_default): Update.
10004 * ax-gdb.c (agent_command_1): Update.
10005
10006 2017-04-12 Tom Tromey <tom@tromey.com>
10007
10008 * remote.c (remote_download_tracepoint): Update.
10009 * python/py-breakpoint.c (bppy_get_location): Update.
10010 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10011 (gdbscm_breakpoint_location): Update.
10012 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10013 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10014 Change type to event_location_up.
10015 * breakpoint.c (create_overlay_event_breakpoint)
10016 (create_longjmp_master_breakpoint)
10017 (create_std_terminate_master_breakpoint)
10018 (create_exception_master_breakpoint)
10019 (breakpoint_event_location_empty_p, print_breakpoint_location)
10020 (print_one_breakpoint_location, create_thread_event_breakpoint)
10021 (init_breakpoint_sal, create_breakpoint)
10022 (print_recreate_ranged_breakpoint, break_range_command)
10023 (init_ada_exception_breakpoint, say_where): Update.
10024 (base_breakpoint_dtor): Don't call delete_event_location.
10025 (bkpt_print_recreate, tracepoint_print_recreate)
10026 (dprintf_print_recreate, update_static_tracepoint)
10027 (breakpoint_re_set_default): Update.
10028
10029 2017-04-12 Tom Tromey <tom@tromey.com>
10030
10031 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10032 type of "to_do". Update.
10033 (compute_stack_depth): Use std::vector.
10034
10035 2017-04-12 Tom Tromey <tom@tromey.com>
10036
10037 * printcmd.c (find_instruction_backward): Use std::vector.
10038
10039 2017-04-12 Tom Tromey <tom@tromey.com>
10040
10041 * symfile.c (objfilep): Remove typedef.
10042 (reread_symbols): Use a std::vector.
10043
10044 2017-04-12 Tom Tromey <tom@tromey.com>
10045
10046 * mi/mi-main.c (exec_direction_forward): Remove.
10047 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10048 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10049 scoped_restore.
10050 * guile/guile.c (guile_repl_command, guile_command)
10051 (gdbscm_execute_gdb_command): Use scoped_restore.
10052 * go-exp.y (go_parse): Use scoped_restore.
10053 * d-exp.y (d_parse): Use scoped_restore.
10054 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10055 * c-exp.y (c_parse): Use scoped_restore.
10056
10057 2017-04-12 Tom Tromey <tom@tromey.com>
10058
10059 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10060 (mi_parse): Update return type.
10061 (mi_parse_free): Remove.
10062 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10063 (mi_parse::~mi_parse): Rename from mi_parse_free.
10064 (mi_parse_cleanup): Remove.
10065 (mi_parse): Return a unique_ptr. Use new.
10066 * mi/mi-main.c (mi_execute_command): Update.
10067
10068 2017-04-12 Tom Tromey <tom@tromey.com>
10069
10070 * location.c (explicit_location_lex_one): Return a
10071 unique_xmalloc_ptr.
10072 (string_to_explicit_location): Update. Remove cleanups.
10073
10074 2017-04-12 Tom Tromey <tom@tromey.com>
10075
10076 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10077 (compare_value_and_voffset): Change type. Update.
10078 (compute_vtable_size): Change type of "offset_vec".
10079 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10080 (gnuv3_get_typeid): Remove extraneous declaration.
10081
10082 2017-04-12 Tom Tromey <tom@tromey.com>
10083
10084 * charset.h (wchar_iterator): Fix comment.
10085
10086 2017-04-12 Tom Tromey <tom@tromey.com>
10087
10088 * charset.c (iconv_wrapper): New class.
10089 (cleanup_iconv): Remove.
10090 (convert_between_encodings): Use it.
10091
10092 2017-04-12 Tom Tromey <tom@tromey.com>
10093
10094 * symfile.h (increment_reading_symtab): Update type.
10095 * symfile.c (decrement_reading_symtab): Remove.
10096 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10097 * psymtab.c (psymtab_to_symtab): Update.
10098 * dwarf2read.c (dw2_instantiate_symtab): Update.
10099
10100 2017-04-12 Tom Tromey <tom@tromey.com>
10101
10102 * jit.c (struct jit_reader): Declare separately. Add constructor
10103 and destructor. Change type of "handle".
10104 (loaded_jit_reader): Define separately.
10105 (jit_reader_load): Update. New "new".
10106 (jit_reader_unload_command): Use "delete".
10107 * gdb-dlfcn.h (struct dlclose_deleter): New.
10108 (gdb_dlhandle_up): New typedef.
10109 (gdb_dlopen, gdb_dlsym): Update types.
10110 (gdb_dlclose): Remove.
10111 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10112 (gdb_dlsym): Change type of "handle".
10113 (make_cleanup_dlclose): Remove.
10114 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10115 * compile/compile-c-support.c (load_libcc): Update.
10116
10117 2017-04-12 Tom Tromey <tom@tromey.com>
10118
10119 * symtab.h (find_pcs_for_symtab_line): Change return type.
10120 * symtab.c (find_pcs_for_symtab_line): Change return type.
10121 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10122 type of "vec". Update.
10123 (ltpy_get_pcs_for_line): Update.
10124 * linespec.c (decode_digits_ordinary): Update.
10125
10126 2017-04-12 Tom Tromey <tom@tromey.com>
10127
10128 * tracepoint.c (actions_command): Update.
10129 * python/python.c (python_command, python_interactive_command):
10130 Update.
10131 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10132 * guile/guile.c (guile_command): Update.
10133 * defs.h (read_command_lines, read_command_lines_1): Return
10134 command_line_up.
10135 (command_lines_deleter): New struct.
10136 (command_line_up): New typedef.
10137 * compile/compile.c (compile_code_command)
10138 (compile_print_command): Update.
10139 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10140 command_line_up.
10141 (make_cleanup_free_command_lines): Remove.
10142 * cli/cli-script.c (get_command_line, read_command_lines_1)
10143 (copy_command_lines): Return command_line_up.
10144 (while_command, if_command, read_command_lines, define_command)
10145 (document_command): Update.
10146 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10147 Remove.
10148 * breakpoint.h (breakpoint_set_commands): Change type of
10149 "commands".
10150 * breakpoint.c (breakpoint_set_commands): Change type of
10151 "commands". Update.
10152 (do_map_commands_command, update_dprintf_command_list)
10153 (create_tracepoint_from_upload): Update.
10154
10155 2017-04-12 Tom Tromey <tom@tromey.com>
10156
10157 * tracepoint.c (scope_info): Update.
10158 * spu-tdep.c (spu_catch_start): Update.
10159 * python/python.c (gdbpy_decode_line): Update.
10160 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10161 * python/py-breakpoint.c (bppy_init): Update.
10162 * probe.c (parse_probes): Update.
10163 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10164 * location.h (event_location_deleter): New struct.
10165 (event_location_up): New typedef.
10166 (new_linespec_location, new_address_location, new_probe_location)
10167 (new_explicit_location, copy_event_location)
10168 (string_to_event_location, string_to_event_location_basic)
10169 (string_to_explicit_location): Update return type.
10170 (make_cleanup_delete_event_location): Remove.
10171 * location.c (new_linespec_location, new_address_location)
10172 (new_probe_location, new_explicit_location, copy_event_location):
10173 Return event_location_up.
10174 (delete_event_location_cleanup)
10175 (make_cleanup_delete_event_location): Remove.
10176 (string_to_explicit_location, string_to_event_location_basic)
10177 (string_to_event_location): Return event_location_up.
10178 * linespec.c (canonicalize_linespec, event_location_to_sals)
10179 (decode_line_with_current_source)
10180 (decode_line_with_last_displayed, decode_objc): Update.
10181 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10182 * completer.c (location_completer): Update.
10183 * cli/cli-cmds.c (edit_command, list_command): Update.
10184 * breakpoint.c (create_overlay_event_breakpoint)
10185 (create_longjmp_master_breakpoint)
10186 (create_std_terminate_master_breakpoint)
10187 (create_exception_master_breakpoint)
10188 (create_thread_event_breakpoint): Update.
10189 (init_breakpoint_sal): Update. Remove some dead code.
10190 (create_breakpoint_sal): Change type of "location". Update.
10191 (create_breakpoints_sal, create_breakpoint, break_command_1)
10192 (dprintf_command, break_range_command, until_break_command)
10193 (init_ada_exception_breakpoint)
10194 (strace_marker_create_sals_from_location)
10195 (update_static_tracepoint, trace_command, ftrace_command)
10196 (strace_command, create_tracepoint_from_upload): Update.
10197 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10198 * ax-gdb.c (agent_command_1): Update.
10199
10200 2017-04-12 Pedro Alves <palves@redhat.com>
10201
10202 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10203 * configure.tgt: Handle i[34567]86-*-go32* and
10204 i[34567]86-*-msdosdjgpp*.
10205 * i386-tdep.c (i386_svr4_reg_to_regnum):
10206 Make extern.
10207 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10208 i386-go32-tdep.c.
10209 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10210 * i386-go32-tdep.c: New file.
10211 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10212 declarations.
10213
10214 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10215
10216 * aix-thread.c (pd_status2str): Change return type to const char *.
10217
10218 2017-04-12 Pedro Alves <palves@redhat.com>
10219
10220 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10221 calls to set_gdbarch_gnu_triplet_regexp.
10222
10223 2017-04-12 Pedro Alves <palves@redhat.com>
10224
10225 PR gdb/21323
10226 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10227 New enum value.
10228 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10229 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10230 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10231 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10232 * gdbarch.h, gdbarch.c: Regenerate.
10233 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10234 gdbarch_wchar_bit and gdbarch_wchar_signed.
10235 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10236 * arm-tdep.c (arm_gdbarch_init): Likewise.
10237 * avr-tdep.c (avr_gdbarch_init): Likewise.
10238 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10239 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10240 * i386-tdep.c (i386_go32_init_abi): Likewise.
10241 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10242 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10243 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10244 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10245 * sh-tdep.c (sh_gdbarch_init): Likewise.
10246 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10247 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10248 * windows-tdep.c (windows_init_abi): Likewise.
10249 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10250
10251 2017-04-12 Pedro Alves <palves@redhat.com>
10252
10253 PR c++/21323
10254 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10255 cplus_primitive_type_char32_t>: New enum values.
10256 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10257 and cplus_primitive_type_char32_t.
10258 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10259 32, use the archtecture's built-in type for char16_t and char32_t,
10260 respectively. Otherwise, fallback to init_integer_type as before,
10261 but make the type unsigned, and issue a complaint.
10262 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10263
10264 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10265
10266 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10267 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10268
10269 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10270
10271 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10272 'const char *'.
10273
10274 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10275
10276 * common/common-utils.c (free_vector_argv): New function.
10277 * common/common-utils.h: Include <vector>.
10278 (free_vector_argv): New prototype.
10279 * darwin-nat.c (darwin_create_inferior): Rewrite function
10280 prototype in order to constify "exec_file" and accept a
10281 "std::string" for "allargs".
10282 * fork-child.c: Include <vector>.
10283 (breakup_args): Rewrite function, using C++.
10284 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10285 and accept "std::string" for "allargs". Update the code to
10286 calculate "argv" based on "allargs". Update calls to "exec_fun"
10287 and "execvp".
10288 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10289 order to constify "exec_file" and accept a "std::string" for
10290 "allargs".
10291 * go32-nat.c (go32_create_inferior): Likewise.
10292 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10293 * infcmd.c (run_command_1): Constify "exec_file". Use
10294 "std::string" for inferior arguments.
10295 * inferior.h (fork_inferior): Update prototype.
10296 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10297 prototype in order to constify "exec_file" and accept a
10298 "std::string" for "allargs".
10299 * nto-procfs.c (procfs_create_inferior): Likewise.
10300 * procfs.c (procfs_create_inferior): Likewise.
10301 * remote-sim.c (gdbsim_create_inferior): Likewise.
10302 * remote.c (extended_remote_run): Update code to accept
10303 "std::string" as argument.
10304 (extended_remote_create_inferior): Rewrite function prototype in
10305 order to constify "exec_file" and accept a "std::string" for
10306 "allargs".
10307 * rs6000-nat.c (super_create_inferior): Likewise.
10308 (rs6000_create_inferior): Likewise.
10309 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10310 * windows-nat.c (windows_create_inferior): Likewise.
10311
10312 2017-04-11 Pedro Alves <palves@redhat.com>
10313
10314 * thread.c: Fix whitespace throughout.
10315
10316 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10317
10318 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10319
10320 2017-04-11 Alan Hayward <alan.hayward@arm.com>
10321
10322 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10323
10324 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10325
10326 PR gdb/21364
10327 * osdata.c (info_osdata): Check if 'type' is an empty string
10328 instead of NULL.
10329
10330 2017-04-10 Pedro Alves <palves@redhat.com>
10331
10332 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10333 (ptid_to_global_thread_id, in_thread_list)
10334 (do_captured_list_thread_ids, set_resumed, set_running)
10335 (set_executing, set_stop_requested, finish_thread_state)
10336 (validate_registers_access, can_access_registers_ptid)
10337 (print_thread_info_1, switch_to_thread)
10338 (do_restore_current_thread_cleanup)
10339 (make_cleanup_restore_current_thread, thread_command)
10340 (thread_name_command): Use operator== instead of ptid_equal.
10341
10342 2017-04-10 Pedro Alves <palves@redhat.com>
10343
10344 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10345 (current_thread_cleanup_chain): Delete.
10346 (restore_current_thread_cleanup_dtor)
10347 (make_cleanup_restore_current_thread): Remove references to
10348 current_thread_cleanup_chain.
10349
10350 2017-04-10 Alan Hayward <alan.hayward@arm.com>
10351
10352 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10353 REG_UNKNOWN.
10354
10355 2017-04-10 Yao Qi <yao.qi@linaro.org>
10356
10357 PR gdb/19942
10358 * gdbthread.h (thread_info::deletable): New method.
10359 (thread_info::incref): New method.
10360 (thread_info::decref): New method.
10361 (thread_info::refcount): Move it to private.
10362 * infrun.c (save_stop_context): Call inc_refcount.
10363 (release_stop_context_cleanup): Likewise.
10364 * thread.c (set_thread_exited): New function.
10365 (init_thread_list): Delete "tp" only it is deletable, otherwise
10366 call set_thread_exited.
10367 (delete_thread_1): Call set_thread_exited.
10368 (current_thread_cleanup) <inferior_pid>: Remove.
10369 <thread>: New field.
10370 (restore_current_thread_ptid_changed): Removed.
10371 (do_restore_current_thread_cleanup): Adjust.
10372 (restore_current_thread_cleanup_dtor): Don't call
10373 find_thread_ptid.
10374 (set_thread_refcount): Use dec_refcount.
10375 (make_cleanup_restore_current_thread): Adjust.
10376 (thread_apply_all_command): Call inc_refcount.
10377 (_initialize_thread): Don't call
10378 observer_attach_thread_ptid_changed.
10379
10380 2017-04-10 Yao Qi <yao.qi@linaro.org>
10381
10382 * thread.c (delete_thread_1): Hoist code on marking thread as
10383 exited.
10384
10385 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10386
10387 * windows-nat.c (windows_detach): Initialize ptid with
10388 minus_one_ptid.
10389
10390 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10391
10392 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10393
10394 2017-04-07 Alan Hayward <alan.hayward@arm.com>
10395
10396 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10397 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10398 (bfin_pseudo_register_write): Likewise
10399
10400 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10401
10402 * common/ptid.h (struct ptid): Change to...
10403 (class ptid_t): ... this.
10404 <ptid_t>: New constructors.
10405 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10406 matches>: New methods.
10407 <make_null, make_minus_one>: New static methods.
10408 <pid>: Rename to...
10409 <m_pid>: ...this.
10410 <lwp>: Rename to...
10411 <m_lwp>: ...this.
10412 <tid>: Rename to...
10413 <m_tid>: ...this.
10414 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10415 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10416 as references, move comment to class ptid_t.
10417 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10418 ptid_t static methods.
10419 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10420 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10421 Take ptid arguments as references, implement using ptid_t methods.
10422 * unittests/ptid-selftests.c: New file.
10423 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10424 unittests/ptid-selftests.c.
10425 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10426
10427 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10428
10429 * python/python.c (python_run_simple_file): Cast mode literal to
10430 non-const char pointer as expected by PyFile_FromString.
10431
10432 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10433
10434 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10435 minus_one_ptid and null_ptid.
10436
10437 2017-04-05 Pedro Alves <palves@redhat.com>
10438
10439 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10440 * configure: Regenerate.
10441
10442 2017-04-05 Pedro Alves <palves@redhat.com>
10443
10444 * ada-exp.y (yyerror): Constify.
10445 * ada-lang.c (bound_name, get_selections)
10446 (ada_variant_discrim_type)
10447 (ada_variant_discrim_name, ada_value_struct_elt)
10448 (ada_lookup_struct_elt_type, is_unchecked_variant)
10449 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10450 (catch_ada_exception_command_split)
10451 (catch_ada_assert_command_split, catch_assert_command)
10452 (ada_op_name): Constify.
10453 * ada-lang.h (ada_yyerror, get_selections)
10454 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10455 * arc-tdep.c (arc_print_frame_cache): Constify.
10456 * arm-tdep.c (arm_skip_stub): Constify.
10457 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10458 (gen_aggregate_elt_ref): Constify.
10459 * bcache.c (print_bcache_statistics): Constify.
10460 * bcache.h (print_bcache_statistics): Constify.
10461 * break-catch-throw.c (catch_exception_command_1):
10462 * breakpoint.c (struct ep_type_description::description):
10463 Constify.
10464 (add_solib_catchpoint): Constify.
10465 (catch_fork_command_1): Add cast.
10466 (add_catch_command): Constify.
10467 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10468 Constify.
10469 * bsd-uthread.c (bsd_uthread_state): Constify.
10470 * buildsym.c (patch_subfile_names): Constify.
10471 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10472 Constify.
10473 * c-exp.y (yyerror): Constify.
10474 (token::oper): Constify.
10475 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10476 * c-varobj.c (cplus_describe_child): Constify.
10477 * charset.c (find_charset_names): Add cast.
10478 (find_charset_names): Constify array and add const_cast.
10479 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10480 (edit_command): Constify.
10481 * cli/cli-decode.c (lookup_cmd): Constify.
10482 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10483 Constify.
10484 (struct dump_context): Constify.
10485 (add_dump_command, restore_command): Constify.
10486 * cli/cli-script.c (get_command_line): Constify.
10487 * cli/cli-script.h (get_command_line): Constify.
10488 * cli/cli-utils.c (check_for_argument): Constify.
10489 * cli/cli-utils.h (check_for_argument): Constify.
10490 * coff-pe-read.c (struct read_pe_section_data): Constify.
10491 * command.h (lookup_cmd): Constify.
10492 * common/print-utils.c (decimal2str): Constify.
10493 * completer.c (gdb_print_filename): Constify.
10494 * corefile.c (set_gnutarget): Constify.
10495 * cp-name-parser.y (yyerror): Constify.
10496 * cp-valprint.c (cp_print_class_member): Constify.
10497 * cris-tdep.c (cris_register_name, crisv32_register_name):
10498 Constify.
10499 * d-exp.y (yyerror): Constify.
10500 (struct token::oper): Constify.
10501 * d-lang.h (d_yyerror): Constify.
10502 * dbxread.c (struct header_file_location::name): Constify.
10503 (add_old_header_file, add_new_header_file, last_function_name)
10504 (dbx_next_symbol_text, add_bincl_to_list)
10505 (find_corresponding_bincl_psymtab, set_namestring)
10506 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10507 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10508 * defs.h (command_line_input, print_address_symbolic)
10509 (deprecated_readline_begin_hook): Constify.
10510 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10511 Constify.
10512 * event-top.c (handle_line_of_input): Constify and add cast.
10513 * exceptions.c (catch_errors): Constify.
10514 * exceptions.h (catch_errors): Constify.
10515 * expprint.c (print_subexp_standard, op_string, op_name)
10516 (op_name_standard, dump_raw_expression, dump_raw_expression):
10517 * expression.h (op_name, op_string, dump_raw_expression):
10518 Constify.
10519 * f-exp.y (yyerror): Constify.
10520 (struct token::oper): Constify.
10521 (struct f77_boolean_val::name): Constify.
10522 * f-lang.c (f_word_break_characters): Constify.
10523 * f-lang.h (f_yyerror): Constify.
10524 * fork-child.c (fork_inferior): Add cast.
10525 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10526 (new_variant): Constify.
10527 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10528 * gdbarch.c: Regenerate.
10529 * gdbcore.h (set_gnutarget): Constify.
10530 * go-exp.y (yyerror): Constify.
10531 (token::oper): Constify.
10532 * go-lang.h (go_yyerror): Constify.
10533 * go32-nat.c (go32_sysinfo): Constify.
10534 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10535 * guile/scm-cmd.c (cmdscm_function): Constify.
10536 * guile/scm-param.c (pascm_param_value): Constify.
10537 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10538 (h8300sx_register_name): Constify.
10539 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10540 Constify.
10541 * ia64-tdep.c (ia64_register_names): Constify.
10542 * infcmd.c (construct_inferior_arguments): Constify.
10543 (path_command, attach_post_wait): Constify.
10544 * language.c (show_range_command, show_case_command)
10545 (unk_lang_error): Constify.
10546 * language.h (language_defn::la_error)
10547 (language_defn::la_name_of_this): Constify.
10548 * linespec.c (decode_line_2): Constify.
10549 * linux-thread-db.c (thread_db_err_str): Constify.
10550 * lm32-tdep.c (lm32_register_name): Constify.
10551 * m2-exp.y (yyerror): Constify.
10552 * m2-lang.h (m2_yyerror): Constify.
10553 * m32r-tdep.c (m32r_register_names): Constify and make static.
10554 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10555 * m88k-tdep.c (m88k_register_name): Constify.
10556 * macroexp.c (appendmem): Constify.
10557 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10558 (upgrade_type, parse_external, parse_partial_symbols)
10559 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10560 (new_symbol): Constify.
10561 * memattr.c (mem_info_command): Constify.
10562 * mep-tdep.c (register_name_from_keyword): Constify.
10563 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10564 Constify.
10565 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10566 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10567 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10568 cast.
10569 (mi_execute_async_cli_command): Constify.
10570 * mips-tdep.c (mips_register_name): Constify.
10571 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10572 (am33_register_name, am33_2_register_name)
10573 * moxie-tdep.c (moxie_register_names): Constify.
10574 * nat/linux-osdata.c (osdata_type): Constify fields.
10575 * nto-tdep.c (nto_parse_redirection): Constify.
10576 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10577 (lookup_child_selector): Constify.
10578 (objc_methcall::name): Constify.
10579 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10580 (lookup_struct_typedef): Constify.
10581 * objfiles.c (pc_in_section): Constify.
10582 * objfiles.h (pc_in_section): Constify.
10583 * p-exp.y (struct token::oper): Constify.
10584 (yyerror): Constify.
10585 * p-lang.h (pascal_yyerror): Constify.
10586 * parser-defs.h (op_name_standard): Constify.
10587 (op_print::string): Constify.
10588 (exp_descriptor::op_name): Constify.
10589 * printcmd.c (print_address_symbolic): Constify.
10590 * psymtab.c (print_partial_symbols): Constify.
10591 * python/py-breakpoint.c (stop_func): Constify.
10592 (bppy_get_expression): Constify.
10593 * python/py-cmd.c (cmdpy_completer::name): Constify.
10594 (cmdpy_function): Constify.
10595 * python/py-event.c (evpy_add_attribute)
10596 (gdbpy_initialize_event_generic): Constify.
10597 * python/py-event.h (evpy_add_attribute)
10598 (gdbpy_initialize_event_generic): Constify.
10599 * python/py-evts.c (add_new_registry): Constify.
10600 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10601 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10602 * python/py-inferior.c (get_buffer): Add cast.
10603 * python/py-param.c (parm_constant::name): Constify.
10604 * python/py-unwind.c (fprint_frame_id): Constify.
10605 * python/python.c (gdbpy_parameter_value): Constify.
10606 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10607 * remote.c (memory_packet_config::name): Constify.
10608 (show_packet_config_cmd, remote_write_bytes)
10609 (remote_buffer_add_string):
10610 * reverse.c (exec_reverse_once): Constify.
10611 * rs6000-tdep.c (variant::name, variant::description): Constify.
10612 * rust-exp.y (rustyyerror): Constify.
10613 * rust-lang.c (rust_op_name): Constify.
10614 * rust-lang.h (rustyyerror): Constify.
10615 * serial.h (serial_ops::name): Constify.
10616 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10617 (sh_sh3e_register_name, sh_sh2e_register_name)
10618 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10619 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10620 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10621 (sh_sh4al_dsp_register_name): Constify.
10622 * sh64-tdep.c (sh64_register_name): Constify.
10623 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10624 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10625 * stabsread.c (patch_block_stabs, read_type_number)
10626 (ref_map::stabs, ref_add, process_reference)
10627 (symbol_reference_defined, define_symbol, define_symbol)
10628 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10629 (read_one_struct_field, read_struct_fields, read_baseclasses)
10630 (read_tilde_fields, read_struct_type, read_array_type)
10631 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10632 (read_huge_number, read_range_type, read_args, common_block_start)
10633 (find_name_end): Constify.
10634 * stabsread.h (common_block_start, define_symbol)
10635 (process_one_symbol, symbol_reference_defined, ref_add):
10636 * symfile.c (get_section_index, add_symbol_file_command):
10637 * symfile.h (get_section_index): Constify.
10638 * target-descriptions.c (tdesc_type::name): Constify.
10639 (tdesc_free_type): Add cast.
10640 * target.c (find_default_run_target):
10641 (add_deprecated_target_alias, find_default_run_target)
10642 (target_announce_detach): Constify.
10643 (do_option): Constify.
10644 * target.h (add_deprecated_target_alias): Constify.
10645 * thread.c (print_thread_info_1): Constify.
10646 * top.c (deprecated_readline_begin_hook, command_line_input):
10647 Constify.
10648 (init_main): Add casts.
10649 * top.h (handle_line_of_input): Constify.
10650 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10651 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10652 (tfind_command): Rename to ...
10653 (tfind_command_1): ... this and constify.
10654 (tfind_command): New function.
10655 (tfind_end_command, tfind_start_command): Adjust.
10656 (encode_source_string): Constify.
10657 * tracepoint.h (encode_source_string): Constify.
10658 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10659 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10660 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10661 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10662 * tui/tui-win.c (parse_scrolling_args): Constify.
10663 * tui/tui-windata.c (tui_erase_data_content): Constify.
10664 * tui/tui-windata.h (tui_erase_data_content): Constify.
10665 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10666 * tui/tui.c (tui_enable): Add cast.
10667 * utils.c (defaulted_query): Constify.
10668 (init_page_info): Add cast.
10669 (puts_debug, subset_compare): Constify.
10670 * utils.h (subset_compare): Constify.
10671 * varobj.c (varobj_format_string): Constify.
10672 * varobj.h (varobj_format_string): Constify.
10673 * vax-tdep.c (vax_register_name): Constify.
10674 * windows-nat.c (windows_detach): Constify.
10675 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10676 * xml-support.c (gdb_xml_end_element): Constify.
10677 * xml-tdesc.c (tdesc_start_reg): Constify.
10678 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10679 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10680 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10681
10682 2017-04-05 Pedro Alves <palves@redhat.com>
10683
10684 * proc-api.c (struct trans): Constify.
10685 (procfs_note): Constify.
10686 * proc-events.c (struct trans, syscall_table):
10687 * proc-flags.c (struct trans): Constify.
10688 * proc-utils.h (procfs_note): Constify.
10689 * proc-why.c (struct trans): Constify.
10690 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10691 (procfs_detach): Constify.
10692 * sol-thread.c (struct string_map): Constify.
10693 (td_err_string, td_state_string): Constify.
10694
10695 2017-04-05 Pedro Alves <palves@redhat.com>
10696
10697 * proc-api.c (procfs_filename): Don't initialize
10698 procfs_filename.
10699 (prepare_to_trace): Assume procfs_filename is non-NULL.
10700 (_initialize_proc_api): Give procfs_filename a default value here.
10701
10702 2017-04-05 Pedro Alves <palves@redhat.com>
10703
10704 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10705 'cond_string' parameter.
10706 (extract_exception_regexp): Constify 'string' parameter.
10707 (catch_exception_command_1): Constify.
10708 * breakpoint.c (init_catchpoint)
10709 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10710 parameter.
10711 (ep_parse_optional_if_clause, catch_fork_command_1)
10712 (catch_exec_command_1): Constify.
10713 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10714 parameter.
10715 (ep_parse_optional_if_clause): Constify.
10716 * cli/cli-utils.c (remove_trailing_whitespace)
10717 (check_for_argument): Constify.
10718 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10719 non-const overload.
10720 (check_for_argument): Likewise.
10721
10722 2017-04-05 Pedro Alves <palves@redhat.com>
10723
10724 * event-top.c (command_line_handler): Add cast to execute_command
10725 call.
10726 * record-btrace.c (cmd_record_btrace_bts_start)
10727 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10728 (cmd_record_btrace_start): Add cast to execute_command call.
10729 * record-full.c (record_full_goto_insn):
10730 * record.c (record_start, record_stop): Add cast to
10731 execute_command_to_string calls.
10732 (cmd_record_start): Add cast to execute_command calls.
10733
10734 2017-04-05 Pedro Alves <palves@redhat.com>
10735
10736 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10737 static inline function.
10738 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10739 array and use gdb_PyArg_ParseTupleAndKeywords.
10740 * python/py-cmd.c (cmdpy_init): Likewise.
10741 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10742 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10743 (infpy_search_memory): Likewise.
10744 * python/py-objfile.c (objfpy_add_separate_debug_file)
10745 (gdbpy_lookup_objfile): Likewise.
10746 * python/py-symbol.c (gdbpy_lookup_symbol)
10747 (gdbpy_lookup_global_symbol): Likewise.
10748 * python/py-type.c (gdbpy_lookup_type): Likewise.
10749 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10750 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10751 Likewise.
10752
10753 2017-04-05 Pedro Alves <palves@redhat.com>
10754
10755 * python/python-internal.h (gdb_PyGetSetDef): New type.
10756 * python/py-block.c (block_object_getset)
10757 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10758 * python/py-event.c (event_object_getset)
10759 (finish_breakpoint_object_getset): Likewise.
10760 * python/py-inferior.c (inferior_object_getset): Likewise.
10761 * python/py-infthread.c (thread_object_getset): Likewise.
10762 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10763 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10764 * python/py-objfile.c (objfile_getset): Likewise.
10765 * python/py-progspace.c (pspace_getset): Likewise.
10766 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10767 Likewise.
10768 * python/py-record.c (recpy_record_getset): Likewise.
10769 * python/py-symbol.c (symbol_object_getset): Likewise.
10770 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10771 Likewise.
10772 * python/py-type.c (type_object_getset, field_object_getset):
10773 Likewise.
10774 * python/py-value.c (value_object_getset): Likewise.
10775
10776 2017-04-05 Pedro Alves <palves@redhat.com>
10777
10778 * python/python-internal.h (gdb_PyObject_CallMethod)
10779 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10780 New functions.
10781 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10782 (PySys_GetObject, PySys_SetPath): New macros.
10783
10784 2017-04-05 Pedro Alves <palves@redhat.com>
10785
10786 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10787 info_osdata_command.
10788 * osdata.c (info_osdata_command): Rename to ...
10789 (info_osdata): ... this. Constify 'type' parameter, and remove
10790 the 'from_tty' parameter. Accept NULL TYPE.
10791 (info_osdata_command): New function.
10792 * osdata.h (info_osdata_command): Remove declaration.
10793 (info_osdata): New declaration.
10794
10795 2017-04-05 Pedro Alves <palves@redhat.com>
10796
10797 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10798 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10799 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10800 parameter.
10801 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10802 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10803 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10804 parameter.
10805 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10806 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10807 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10808 (mi_cmd_file_list_exec_source_files)
10809 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10810 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10811 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10812 parameter.
10813 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10814 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10815 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10816 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10817 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10818 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10819 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10820 'command' parameter.
10821 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10822 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10823 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10824 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10825 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10826 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10827 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10828 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10829 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10830 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10831 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10832 parameter.
10833 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10834 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10835 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10836 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10837 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10838 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10839 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10840 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10841 (mi_cmd_data_list_changed_registers)
10842 (mi_cmd_data_write_register_values)
10843 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10844 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10845 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10846 (mi_cmd_list_features, mi_cmd_list_target_features)
10847 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10848 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10849 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10850 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10851 (mi_cmd_trace_frame_collected): Constify 'command'
10852 parameter.
10853 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10854 'command' parameter.
10855
10856 2017-04-05 Pedro Alves <palves@redhat.com>
10857
10858 * ada-lang.c (ada_completer_word_break_characters): Now a const
10859 array.
10860 (ada_get_gdb_completer_word_break_characters): Constify.
10861 * completer.c (gdb_completer_command_word_break_characters)
10862 (gdb_completer_file_name_break_characters)
10863 (gdb_completer_quote_characters): Now const arrays.
10864 (get_gdb_completer_quote_characters): Constify.
10865 (set_rl_completer_word_break_characters): New function.
10866 (set_gdb_completion_word_break_characters)
10867 (complete_line_internal): Use it.
10868 * completer.h (get_gdb_completer_quote_characters): Constify.
10869 (set_rl_completer_word_break_characters): Declare.
10870 * f-lang.c (f_word_break_characters): Constify.
10871 * language.c (default_word_break_characters): Constify.
10872 * language.h (language_defn::la_word_break_characters): Constify.
10873 (default_word_break_characters): Constify.
10874 * top.c (init_main): Use set_rl_completer_word_break_characters.
10875
10876 2017-04-05 Pedro Alves <palves@redhat.com>
10877
10878 * aix-thread.c (aix_thread_pid_to_str)
10879 (aix_thread_extra_thread_info): Constify.
10880 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10881 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10882 (bsd_uthread_pid_to_str): Constify.
10883 * corelow.c (core_pid_to_str): Constify.
10884 * darwin-nat.c (darwin_pid_to_str): Constify.
10885 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10886 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10887 Constify.
10888 * gnu-nat.c (gnu_pid_to_str): Constify.
10889 * go32-nat.c (go32_pid_to_str): Constify.
10890 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10891 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10892 * inferior.c (inferior_pid_to_str): Constify.
10893 * linux-nat.c (linux_nat_pid_to_str): Constify.
10894 * linux-tdep.c (linux_core_pid_to_str): Constify.
10895 * linux-thread-db.c (thread_db_pid_to_str)
10896 (thread_db_extra_thread_info): Constify.
10897 * nto-tdep.c (nto_extra_thread_info): Constify.
10898 * nto-tdep.h (nto_extra_thread_info): Constify.
10899 * obsd-nat.c (obsd_pid_to_str): Constify.
10900 * procfs.c (procfs_pid_to_str): Constify.
10901 * ravenscar-thread.c (ravenscar_extra_thread_info)
10902 (ravenscar_pid_to_str): Constify.
10903 * remote-sim.c (gdbsim_pid_to_str): Constify.
10904 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10905 Constify.
10906 * sol-thread.c (solaris_pid_to_str): Constify.
10907 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10908 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10909 * target.c (default_pid_to_str, target_pid_to_str)
10910 (normal_pid_to_str, default_pid_to_str): Constify.
10911 * target.h (target_ops::to_pid_to_str)
10912 (target_ops::to_extra_thread_info): Constify.
10913 (target_pid_to_str, normal_pid_to_str): Constify.
10914 * windows-nat.c (windows_pid_to_str): Constify.
10915 * gdbarch.sh (core_pid_to_str): Constify.
10916 * target-delegates.c: Regenerate.
10917 * gdbarch.h, gdbarch.c: Regenerate.
10918
10919 2017-04-05 Pedro Alves <palves@redhat.com>
10920
10921 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10922 the memory of the temporary warning_pre_print override.
10923 * utils.c (warning_pre_print): Constify.
10924 * utils.h (warning_pre_print): Constify.
10925
10926 2017-04-05 Pedro Alves <palves@redhat.com>
10927
10928 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10929 (shell_command): New function.
10930 (make_command): Use std::string.
10931 (init_cli_cmds): Register shell_command instead of shell_escape.
10932
10933 2017-04-05 Pedro Alves <palves@redhat.com>
10934
10935 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10936 * tracepoint.c (default_collect): Don't initialize.
10937
10938 2017-04-05 Pedro Alves <palves@redhat.com>
10939
10940 * macroexp.c (macro_buffer::shared): Now a bool.
10941 (init_buffer): Update.
10942 (init_shared_buffer): Constify 'addr' parameter.
10943 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10944 casts.
10945
10946 2017-04-05 Pedro Alves <palves@redhat.com>
10947
10948 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10949 * disasm.c (set_disassembler_options): Constify local.
10950 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10951
10952 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10953
10954 PR gdb/21352
10955 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10956 option.
10957
10958 2017-04-05 Yao Qi <yao.qi@linaro.org>
10959
10960 * frame.c (frame_unwind_register_unsigned): Call
10961 frame_unwind_register_value.
10962
10963 2017-04-05 Yao Qi <yao.qi@linaro.org>
10964
10965 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10966 Use gdb_test_multiple, and don't match anchor.
10967
10968 2017-04-05 Pedro Alves <palves@redhat.com>
10969
10970 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10971 (Write After Approval): Remove Simon Marchi.
10972
10973 2017-04-05 Pedro Alves <palves@redhat.com>
10974
10975 * common/gdb_optional.h (optional::optional): Make constexpr and
10976 initialize m_dummy.
10977
10978 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10979
10980 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10981 (amd64fbsd_jmp_buf_reg_offset): Remove.
10982 (amd64fbsd_supply_uthread): Remove function.
10983 (amd64fbsd_collect_uthread): Remove function.
10984 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10985 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10986 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10987 (fbsd-nat.c): Update comment.
10988 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10989 (i386fbsd_jmp_buf_reg_offset): Remove.
10990 (i386fbsd_supply_uthread): Remove function.
10991 (i386fbsd_collect_uthread): Remove function.
10992 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10993
10994 2017-04-04 John Baldwin <jhb@FreeBSD.org>
10995
10996 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10997 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10998 * NEWS: Mention that support for FreeBSD/alpha was removed.
10999 * alpha-fbsd-tdep.c: Delete file.
11000 * config/alpha/fbsd.mh: Delete file.
11001 * configure.host: Delete alpha*-*-freebsd* and
11002 alpha*-*-kfreebsd*-gnu.
11003 * configure.tgt: Delete alpha*-*-freebsd* and
11004 alpha*-*-kfreebsd*-gnu.
11005
11006 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11007
11008 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11009 amd64bsd_store_inferior_registers): Use ptid from regcache.
11010
11011 2017-04-04 Pedro Alves <palves@redhat.com>
11012
11013 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11014 data fields, make them private and add "m_" prefixes.
11015 (lnp_state_machine::lnp_state_machine): New ctor.
11016 (record_line, check_line_address, handle_set_discriminator)
11017 (handle_set_address, handle_advance_pc, handle_special_opcode)
11018 (handle_advance_line, handle_set_file, handle_negate_stmt)
11019 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11020 (end_sequence, advance_line): New methods.
11021 (m_gdbarch, m_record_lines_p): New fields.
11022 (lnp_reader_state): Delete.
11023 (dwarf_record_line): Rename to ...
11024 (lnp_state_machine::record_line): ... adjust.
11025 (init_lnp_state_machine): Delete.
11026 (lnp_state_machine::lnp_state_machine): New.
11027 (check_line_address): Rename to ...
11028 (lnp_state_machine::check_line_address): This.
11029 (dwarf_decode_lines_1): Remove reference to "reader_state".
11030 Adjust lnp_state_machine having a non-default ctor. Use bool.
11031 State machine internal state manipulation moved to
11032 lnp_state_machine methods.
11033
11034 2017-04-04 Pedro Alves <palves@redhat.com>
11035
11036 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11037 unittests/offset-type-selftests.c.
11038 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11039 * common/offset-type.h: New file.
11040 * common/preprocessor.h: New file.
11041 * common/traits.h: New file.
11042 * common/valid-expr.h: New file.
11043 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11044 sect_offset and cu_offset strong typedefs throughout.
11045 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11046 typedefs throughout.
11047 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11048 sect_offset and cu_offset strong typedefs throughout.
11049 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11050 typedefs throughout.
11051 * gdbtypes.h: Include "common/offset-type.h".
11052 (cu_offset): Now an offset type (strong typedef) instead of a
11053 struct.
11054 (sect_offset): Likewise.
11055 (union call_site_parameter_u): Rename "param_offset" field to
11056 "param_cu_off".
11057 * unittests/offset-type-selftests.c: New file.
11058
11059 2017-04-04 Pedro Alves <palves@redhat.com>
11060
11061 * common/underlying.h: New file.
11062 * dwarf2read.c: Include "common/gdb_optional.h" and
11063 "common/underlying.h".
11064 (dir_index, file_name_index): New types.
11065 (file_entry): Use them.
11066 (file_entry::include): Use to_underlying.
11067 (line_header::add_file_name): Use dir_index.
11068 (read_formatted_entries): Use gdb::optional. Read form before
11069 writting to file_entry.
11070 (dwarf_decode_line_header): Use dir_index.
11071 (lnp_state_machine::current_file): Use to_underlying.
11072 (lnp_state_machine::file): Change type to file_name_index.
11073 (dwarf_record_line): Use to_underlying.
11074 (init_lnp_state_machine): Use file_name_index.
11075 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11076
11077 2017-04-04 Pedro Alves <palves@redhat.com>
11078
11079 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11080 operator bool, has_value and get methods.
11081
11082 2017-04-04 Pedro Alves <palves@redhat.com>
11083
11084 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11085 fields.
11086 (line_header): Initialize all data fields. Change type of
11087 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11088 Change type of include_dirs to std::vector<const char *>. Remove
11089 num_include_dirs, include_dirs_size. Change type of file_names to
11090 std::vector<file_entry>. Remove num_file_names, file_names_size.
11091 (line_header::line_header): New.
11092 (line_header::add_include_dir, line_header::add_file_name): New
11093 methods.
11094 (line_header::include_dir_at): Remove NULL check.
11095 (line_header::file_name_at): Add const overload.
11096 (line_header_up): New unique_ptr typedef.
11097 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11098 std::vector. Remove free_line_header call.
11099 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11100 free_line_header call.
11101 (free_cu_line_header): Delete.
11102 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11103 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11104 Adjust to use std::vector.
11105 (free_line_header): Delete.
11106 (free_line_header_voidp): Use delete.
11107 (add_include_dir): Replace with ...
11108 (line_header::add_include_dir): ... this method. Use std::vector.
11109 (add_file_name): Replace with ...
11110 (line_header::add_file_name): ... this method. Use std::vector.
11111 (add_include_dir_stub): Delete.
11112 (read_formatted_entries): Remove memset.
11113 (dwarf_decode_line_header): Return a line_header_up instead of a
11114 raw pointer. Remove cleanup handling. Pass lambdas to
11115 read_formatted_entries. Adjust to use line_header methods.
11116 (dwarf_decode_lines_1): Adjust to use line_header methods.
11117 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11118 use std::vector.
11119
11120 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11121
11122 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11123 instead of struct ptid.
11124
11125 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11126
11127 * frame.c (get_frame_register_bytes): Unwind using value.
11128 (put_frame_register_bytes): Likewise.
11129
11130 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11131
11132 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11133 aggregate-like.
11134
11135 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11136
11137 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11138
11139 2017-03-29 Yao Qi <yao.qi@linaro.org>
11140
11141 * gdbthread.h (struct thread_info): Declare constructor and
11142 destructor. Add some in-class member initializers.
11143 * thread.c (free_thread): Remove.
11144 (init_thread_list): Call delete instead of free_thread.
11145 (new_thread): Call thread_info constructor.
11146 (thread_info::thread_info): New function.
11147 (thread_info::~thread_info): New function.
11148 (delete_thread_1): Call delete instead of free_thread.
11149 (make_cleanup_restore_current_thread): Move tp and frame to
11150 inner block.
11151
11152 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11153
11154 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11155 (arc_skip_prologue): Likewise.
11156 (arc_make_frame_cache): Likewise.
11157 (arc_pv_get_operand): New function.
11158 (arc_is_in_prologue): Likewise.
11159 (arc_analyze_prologue): Likewise.
11160 (arc_print_frame_cache): Likewise.
11161 (MAX_PROLOGUE_LENGTH): New constant.
11162
11163 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11164
11165 * configure.tgt: Add arc-insn.o.
11166 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11167 (dump_arc_instruction_command): New function.
11168 (arc_fprintf_disasm): Likewise.
11169 (arc_disassemble_info): Likewise.
11170 (arc_insn_get_operand_value): Likewise.
11171 (arc_insn_get_operand_value_signed): Likewise.
11172 (arc_insn_get_memory_base_reg): Likewise.
11173 (arc_insn_get_memory_offset): Likewise.
11174 (arc_insn_get_branch_target): Likewise.
11175 (arc_insn_dump): Likewise.
11176 (arc_insn_get_linear_next_pc): Likewise.
11177 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11178 (arc_disassemble_info): Likewise.
11179 (arc_insn_get_branch_target): Likewise.
11180 (arc_insn_get_linear_next_pc): Likewise.
11181 * NEWS: Mention new "maint print arc arc-instruction".
11182
11183 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11184
11185 * arc-tdep (maintenance_print_arc_list): New variable.
11186 (maintenance_print_arc_command): New function.
11187
11188 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11189
11190 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11191 Add "limm" and "reserved".
11192 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11193 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11194 * arc-tdep.h (arc_regnum): Likewise.
11195
11196 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11197
11198 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11199 for THREADPTR register.
11200 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11201 register.
11202 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11203 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11204 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11205
11206 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11207
11208 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11209 registers above gdbarch_num_regs (gdbarch) as privileged in
11210 call0 ABI.
11211
11212 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11213
11214 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11215 for a single specified register or for all registers in
11216 a0_base..a0_base + C0_NREGS range.
11217 (supply_gregset_reg): Call regcache_raw_supply for a single
11218 specified register or for all registers in a0_base..a0_base +
11219 C0_NREGS range.
11220
11221 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11222
11223 * arch/xtensa.h (C0_NREGS): Add definition.
11224 * xtensa-tdep.c (C0_NREGS): Remove definition.
11225
11226 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11227
11228 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11229 Drop xtensa_default_isa initialization.
11230 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11231
11232 2017-03-27 Pedro Alves <palves@redhat.com>
11233
11234 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11235 (file_entry::include_dir): New method.
11236 (line_header::include_dir_at, line_header::file_name_at): New
11237 methods.
11238 (setup_type_unit_groups, setup_type_unit_groups)
11239 (psymtab_include_file_name): Simplify using the new methods.
11240 (lnp_state_machine) <the_line_header>: New field.
11241 <file>: Add comment.
11242 (lnp_state_machine::current_file): New method.
11243 (dwarf_record_line): Simplify using the new methods.
11244 (init_lnp_state_machine): Initialize the "the_line_header" field.
11245 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11246 Simplify using the new methods.
11247
11248 2017-03-27 Pedro Alves <palves@redhat.com>
11249
11250 * cp-name-parser.y (make_empty): Delete.
11251 (demangler_special, nested_name, ptr_operator, array_indicator)
11252 (direct_declarator, declarator_1): Use fill_comp instead of
11253 make_empty.
11254
11255 2017-03-27 Pedro Alves <palves@redhat.com>
11256
11257 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11258 to ATTRIBUTE_PRINTF.
11259 * solib-target.c (library_list_start_list): Print "string" not
11260 "version".
11261 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11262 gdb_xml_error call.
11263
11264 2017-03-27 Pedro Alves <palves@redhat.com>
11265
11266 * dwarf2read.c (struct file_and_directory): New.
11267 (dwarf2_get_dwz_file): Adjust to use std::string.
11268 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11269 (find_file_and_directory): Adjust to return a file_and_directory
11270 object.
11271 (read_file_scope): Adjust to use file_and_directory. Remove
11272 make_cleanup/do_cleanups calls.
11273 (open_and_init_dwp_file): Adjust to use std::string. Remove
11274 make_cleanup/do_cleanups calls.
11275 * python/python.c (do_start_initialization): Adjust to ldirname
11276 returning a std::string.
11277 * utils.c (ldirname): Now returns a std::string.
11278 * utils.h (ldirname): Change return type to std::string.
11279 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11280 returning a std::string.
11281 * xml-tdesc.c (file_read_description_xml): Likewise.
11282
11283 2017-03-24 Alan Hayward <alan.hayward@arm.com>
11284
11285 * regcache.c (regcache_debug_print_register): New function.
11286 * regcache.h (regcache_debug_print_register): New declaration.
11287 * target.c (debug_print_register): Remove.
11288 (target_fetch_registers): Call regcache_debug_print_register.
11289 (target_store_registers): Likewise.
11290
11291 2017-03-24 Pádraig Brady <pbrady@fb.com>
11292
11293 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11294 reference beyond the 'lh->include_dirs' array before accessing to
11295 it.
11296 (psymtab_include_file_name): Likewise.
11297 (dwarf_decode_lines_1): Likewise.
11298 (dwarf_decode_lines): Likewise.
11299 (file_file_name): Likewise.
11300
11301 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11302
11303 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11304 inferior_ptid.
11305 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11306 ps_lsetfpregs): Likewise.
11307 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11308 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11309 ps_lsetfpregs): Likewise.
11310 * target.c (target_fetch_registers, target_store_registers):
11311 Remove asserts.
11312
11313 2017-03-23 Alan Hayward <alan.hayward@arm.com>
11314
11315 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11316
11317 2017-03-23 Yao Qi <yao.qi@linaro.org>
11318
11319 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11320 (_initialize_aarch64_tdep): Register it.
11321 (aarch64_record_load_store): Handle PRFM instruction.
11322 (aarch64_process_record_test): New function.
11323
11324 2017-03-23 Yao Qi <yao.qi@linaro.org>
11325
11326 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11327 indentation.
11328
11329 2017-03-23 Yao Qi <yao.qi@linaro.org>
11330
11331 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11332
11333 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11334
11335 python/python.c (do_start_initialization): Fix memory leak.
11336
11337 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11338
11339 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11340 using get_ptrace_pid.
11341 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11342 inferior_ptid.
11343 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11344 inferior_ptid instead of pid.
11345
11346 2017-03-22 Yao Qi <yao.qi@linaro.org>
11347
11348 * aarch64-tdep.c: Wrap locally used classes in anonymous
11349 namespace.
11350 * arm-tdep.c: Likewise.
11351 * linespec.c: Likewise.
11352 * ui-out.c: Likewise.
11353
11354 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
11355
11356 PR gdb/19637
11357 * python/lib/gdb/printer/bound_registers.py: Import sys.
11358
11359 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11360
11361 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11362 windows_thread_info parameter and use it instead of
11363 current_thread.
11364 (windows_fetch_inferior_registers): Don't set current_thread,
11365 pass the thread to do_windows_fetch_inferior_registers. Use
11366 ptid from regcache instead of inferior_ptid.
11367 (do_windows_store_inferior_registers): Add windows_thread_info
11368 parameter and use it instead of current_thread.
11369 (windows_store_inferior_registers): Don't set current_thread,
11370 pass the thread to do_windows_store_inferior_registers. Use
11371 ptid from regcache instead of inferior_ptid.
11372
11373 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11374
11375 * ser-mingw.c (ser_windows_raw): Remove reference to
11376 struct serial::current_timeout.
11377
11378 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11379
11380 PR tdep/20928
11381 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11382 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11383 (sparc64_fsr_type): Fix %fsr decoding.
11384
11385 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11386
11387 * python/py-record-btrace.c (btpy_insn_data): Change return type
11388 for Python 2.
11389
11390 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11391
11392 * spu-linux-nat.c (spu_fetch_inferior_registers,
11393 spu_store_inferior_registers): Use ptid from regcache, set and
11394 restore inferior_ptid.
11395 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11396 Likewise.
11397
11398 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11399
11400 * i386-linux-nat.c (fetch_register, store_register,
11401 i386_linux_fetch_inferior_registers,
11402 i386_linux_store_inferior_registers): Use ptid from regcache.
11403 * ia64-linux-nat.c (ia64_linux_fetch_register,
11404 ia64_linux_store_register): Likewise.
11405 * inf-ptrace.c (inf_ptrace_fetch_register,
11406 inf_ptrace_store_register): Likewise.
11407 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11408 m32r_linux_store_inferior_registers): Likewise.
11409 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11410 m68kbsd_store_inferior_registers): Likewise.
11411 * m68k-linux-nat.c (fetch_register, store_register,
11412 m68k_linux_fetch_inferior_registers,
11413 m68k_linux_store_inferior_registers): Likewise.
11414 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11415 m88kbsd_store_inferior_registers): Likewise.
11416 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11417 mips_fbsd_store_inferior_registers): Likewise.
11418 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11419 mips64_linux_regsets_store_registers): Likewise.
11420 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11421 mipsnbsd_store_inferior_registers): Likewise.
11422 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11423 mips64obsd_store_inferior_registers): Likewise.
11424 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11425 Likewise.
11426 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11427 ppcfbsd_store_inferior_registers): Likewise.
11428 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11429 ppc_linux_store_inferior_registers): Likewise.
11430 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11431 ppcnbsd_store_inferior_registers): Likewise.
11432 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11433 ppcobsd_store_registers): Likewise.
11434 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11435 Likewise.
11436 * ravenscar-thread.c (ravenscar_fetch_registers,
11437 ravenscar_store_registers, ravenscar_prepare_to_store):
11438 Likewise.
11439 * record-btrace.c (record_btrace_fetch_registers,
11440 record_btrace_store_registers, record_btrace_prepare_to_store):
11441 Likewise.
11442 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11443 Lookup inferior using ptid from regcache, instead of
11444 current_inferior.
11445 * remote.c (remote_fetch_registers, remote_store_registers): Use
11446 ptid from regcache.
11447 * rs6000-nat.c (fetch_register, store_register): Likewise.
11448 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11449 s390_linux_store_inferior_registers): Likewise.
11450 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11451 shnbsd_store_inferior_registers): Likewise.
11452 * sol-thread.c (sol_thread_fetch_registers,
11453 sol_thread_store_registers): Likewise.
11454 * sparc-nat.c (sparc_fetch_inferior_registers,
11455 sparc_store_inferior_registers): Likewise.
11456 * tilegx-linux-nat.c (fetch_inferior_registers,
11457 store_inferior_registers): Likewise.
11458 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11459 vaxbsd_store_inferior_registers): Likewise.
11460 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11461 store_xtregs): Likewise.
11462
11463 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11464
11465 PR gdb/14441
11466 * NEWS: Mention support for rvalue references in GDB and python.
11467 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11468 supports both lvalue and rvalue references.
11469
11470 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11471
11472 PR gdb/14441
11473 * gdbtypes.c (rank_one_type): Implement overloading
11474 resolution rules regarding rvalue references.
11475
11476 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11477
11478 PR gdb/14441
11479 * aarch64-tdep.c (aarch64_type_align)
11480 (aarch64_extract_return_value, aarch64_store_return_value): Change
11481 lvalue reference type checks to general reference type checks.
11482 * amd64-tdep.c (amd64_classify): Likewise.
11483 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11484 Likewise.
11485 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11486 (arm_store_return_value): Likewise.
11487 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11488 * c-typeprint.c (c_print_type): Likewise.
11489 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11490 (cplus_number_of_children, cplus_describe_child): Likewise.
11491 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11492 * completer.c (expression_completer): Likewise.
11493 * cp-support.c (make_symbol_overload_list_adl_namespace):
11494 Likewise.
11495 * darwin-nat-info.c (info_mach_region_command): Likewise.
11496 * dwarf2loc.c (entry_data_value_coerce_ref)
11497 (value_of_dwarf_reg_entry): Likewise.
11498 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11499 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11500 Likewise.
11501 * findvar.c (extract_typed_address, store_typed_address):
11502 Likewise.
11503 * gdbtypes.c (rank_one_type): Likewise.
11504 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11505 * infcall.c (value_arg_coerce): Likewise.
11506 * language.c (pointer_type): Likewise.
11507 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11508 Likewise.
11509 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11510 * mn10300-tdep.c (mn10300_type_align): Likewise.
11511 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11512 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11513 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11514 Likewise.
11515 * printcmd.c (print_formatted, x_command): Likewise.
11516 * python/py-type.c (typy_get_composite, typy_template_argument):
11517 Likewise.
11518 * python/py-value.c (valpy_referenced_value)
11519 (valpy_get_dynamic_type, value_has_field): Likewise.
11520 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11521 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11522 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11523 * spu-tdep.c (spu_scalar_value_p): Likewise.
11524 * symtab.c (lookup_symbol_aux): Likewise.
11525 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11526 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11527 Likewise.
11528 * valops.c (value_cast_pointers, value_cast)
11529 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11530 (value_struct_elt, value_struct_elt_bitpos)
11531 (value_find_oload_method_list, find_overload_match)
11532 (value_rtti_indirect_type): Likewise.
11533 * valprint.c (val_print_scalar_type_p, generic_val_print):
11534 Likewise.
11535 * value.c (value_actual_type, value_as_address, unpack_long)
11536 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11537 (coerce_ref): Likewise.
11538 * varobj.c (varobj_get_value_type): Likewise.
11539
11540 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11541
11542 PR gdb/14441
11543 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11544 table of constants.
11545 * python/lib/gdb/command/explore.py: Support exploring values
11546 of rvalue reference types.
11547 * python/lib/gdb/types.py: Implement get_basic_type() for
11548 rvalue reference types.
11549 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11550 constant.
11551 * python/py-value.c (valpy_getitem): Add an rvalue reference
11552 check.
11553 (valpy_reference_value): Add new parameter "refcode".
11554 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11555 New wrappers for valpy_reference_value().
11556 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11557 (gdbpy_invoke_xmethod): Likewise.
11558
11559 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11560
11561 PR gdb/14441
11562 * dwarf2read.c (process_die, read_type_die_1): Handle the
11563 DW_TAG_rvalue_reference_type DIE.
11564 (read_tag_reference_type): Add new parameter "refcode".
11565
11566 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11567
11568 PR gdb/14441
11569 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11570 (c_type_print_modifier, c_type_print_varspec_suffix)
11571 (c_type_print_base): Support printing rvalue reference types.
11572 * c-valprint.c (c_val_print, c_value_print): Support printing
11573 rvalue reference values.
11574
11575 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11576
11577 PR gdb/14441
11578 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11579 typename.
11580 * cp-support.c (replace_typedefs): Handle
11581 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11582 * python/py-type.c (typy_lookup_type): Likewise.
11583
11584 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11585
11586 PR gdb/14441
11587 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11588 * parse.c (insert_type): Change assert statement.
11589 (follow_types): Handle rvalue reference types.
11590 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11591 constant.
11592
11593 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11594
11595 PR gdb/14441
11596 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11597 value_ref() interface.
11598 * c-valprint.c (c_value_print): Likewise.
11599 * infcall.c (value_arg_coerce): Likewise.
11600 * python/py-value.c (valpy_reference_value): Likewise.
11601 * valops.c (value_cast, value_reinterpret_cast)
11602 (value_dynamic_cast, typecmp): Likewise.
11603 (value_ref): Parameterize by kind of return value reference type.
11604 * value.h (value_ref): Add new parameter "refcode".
11605
11606 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11607
11608 PR gdb/14441
11609 * dwarf2read.c (read_tag_reference_type): Use
11610 lookup_lvalue_reference_type() instead of lookup_reference_type().
11611 * eval.c (evaluate_subexp_standard): Likewise.
11612 * f-exp.y: Likewise.
11613 * gdbtypes.c (make_reference_type, lookup_reference_type):
11614 Generalize with rvalue reference types.
11615 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11616 convenience wrappers for lookup_reference_type().
11617 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11618 reference kind parameter.
11619 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11620 wrappers for lookup_reference_type().
11621 * guile/scm-type.c (gdbscm_type_reference): Use
11622 lookup_lvalue_reference_type() instead of lookup_reference_type().
11623 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11624 * parse.c (follow_types): Likewise.
11625 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11626 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11627 Likewise.
11628 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11629 (gdbpy_invoke_xmethod): Likewise.
11630 * stabsread.c: Provide extra argument to make_reference_type()
11631 call.
11632 * valops.c (value_ref, value_rtti_indirect_type): Use
11633 lookup_lvalue_reference_type() instead of lookup_reference_type().
11634
11635 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11636
11637 PR gdb/14441
11638 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11639 (TYPE_IS_REFERENCE): New macro.
11640 (struct type): Add rvalue_reference_type field.
11641 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11642
11643 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11644
11645 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11646 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11647 New function definition.
11648 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11649 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11650 New function declaration.
11651 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11652 * mi/mi-interp.h: New file.
11653 * solib.c (info_sharedlibrary_command): Replace for loop with
11654 ALL_SO_LIBS macro
11655 * solib.h (update_solib_list): New function declaration.
11656 (so_list_head): Move macro.
11657 * solist.h (ALL_SO_LIBS): New macro.
11658
11659 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11660
11661 * infcmd.c (post_create_inferior): Remove unused argument in
11662 call to solib_add.
11663 * remote.c (remote_start_remote): Likewise.
11664 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11665 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11666 (enable_break): Likewise.
11667 * solib.c (update_solib_list): Remove unused target argument
11668 and its documentation.
11669 (solib_add): Remove unused target argument. Remove unused
11670 argument in call to update_solib_list.
11671 (info_sharedlibrary_command): Remove unused argument in call
11672 to update_solib_list.
11673 (sharedlibrary_command): Remove unused argument in call to
11674 solib_add.
11675 (handle_solib_event): Likewise.
11676 (reload_shared_libraries): Likewise.
11677 * solib.h (solib_add): Remove unused target argument.
11678
11679 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11680
11681 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11682 (s390_displaced_step_fixup): Cover relative branches with the
11683 default fixup handling. This fixes lack of support for some
11684 relative branch instructions.
11685
11686 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11687
11688 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11689 ptid from regcache.
11690
11691 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11692
11693 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11694 i386_darwin_store_inferior_registers): Use ptid from regcache.
11695
11696 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11697
11698 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11699 i386bsd_store_inferior_registers): Use ptid from regcache.
11700
11701 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11702
11703 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11704 hppaobsd_store_registers): Use ptid from regcache.
11705
11706 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11707
11708 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11709 hppanbsd_store_registers): Use ptid from regcache.
11710
11711 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11712
11713 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11714 from regcache. Use get_ptrace_pid.
11715
11716 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11717
11718 * corelow.c (get_core_register_section): Use ptid from regcache,
11719 update doc.
11720
11721 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11722
11723 * bsd-uthread.c (bsd_uthread_fetch_registers,
11724 bsd_uthread_store_registers): Use ptid from regcache, set and
11725 restore inferior_ptid.
11726
11727 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11728
11729 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11730 fetch_fp_regs, store_register, store_regs, store_fp_register,
11731 store_fp_regs): Use ptid from regcache.
11732
11733 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11734
11735 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11736 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11737 store_vfp_regs): Use ptid from regcache.
11738
11739 2017-03-17 Pedro Alves <palves@redhat.com>
11740
11741 PR remote/21188
11742 * ser-base.c (ser_base_wait_for): Add comment.
11743 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11744 version.
11745 * ser-unix.c (hardwire_raw): Remove reference to
11746 scb->current_timeout.
11747 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11748 (hardwire_ops): Install ser_base_readchar instead of
11749 hardwire_readchar.
11750 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11751 Remove fields.
11752
11753 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
11754
11755 PR gdb/19637
11756 * python/lib/gdb/printer/bound_registers.py: Add support for
11757 Python 3.
11758
11759 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11760
11761 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11762 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11763 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11764 byte_offset to subobj_byte_offset. Fix the handling of
11765 DWARF_VALUE_STACK on big-endian targets when coming via an
11766 implicit pointer.
11767 (dwarf2_evaluate_loc_desc): Adjust call to
11768 dwarf2_evaluate_loc_desc_full.
11769 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11770 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11771
11772 2017-03-16 Yao Qi <yao.qi@linaro.org>
11773
11774 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11775 and REVSH instructions.
11776
11777 2017-03-16 Yao Qi <yao.qi@linaro.org>
11778
11779 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11780 (arm_record_test): Declare.
11781 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11782 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11783 align with the manual.
11784 (thumb_record_misc): Adjust the code order to align with the
11785 manual.
11786 (thumb2_record_decode_insn_handler): Fix instruction matching.
11787 (instruction_reader_thumb): New class.
11788 (arm_record_test): New function.
11789
11790 2017-03-16 Yao Qi <yao.qi@linaro.org>
11791
11792 * arm-tdep.c (abstract_memory_reader): New class.
11793 (instruction_reader): New class.
11794 (extract_arm_insn): Add argument 'reader'. Callers updated.
11795 (decode_insn): Likewise.
11796
11797 2017-03-16 Doug Evans <dje@google.com>
11798
11799 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11800 member. Change type of TYPE member to SCM. All uses updated.
11801 (lsscm_make_lazy_string_smob): Add assert.
11802 (lsscm_make_lazy_string): Flag bad length values.
11803 (lsscm_elt_type): New function.
11804 (gdbscm_lazy_string_to_value): Rewrite to use
11805 lsscm_safe_lazy_string_to_value.
11806 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11807 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11808 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11809 in incoming type.
11810 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11811 * guile/scm-type.c (tyscm_scm_to_type): New function.
11812
11813 2017-03-15 Doug Evans <dje@google.com>
11814
11815 PR python/17728, python/18439, python/18779
11816 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11817 member. Change type of TYPE member to PyObject *. All uses updated.
11818 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11819 (gdbpy_create_lazy_string_object): Flag bad length values.
11820 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11821 Handle typedefs in incoming type.
11822 (stpy_lazy_string_elt_type): New function.
11823 (gdbpy_extract_lazy_string): Call it.
11824 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11825 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11826 typedefs in incoming type.
11827
11828 2017-03-16 Doug Evans <dje@google.com>
11829
11830 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11831 * guile/scm-type.c (tyscm_scm_to_type): New function.
11832
11833 2017-03-16 Jiong Wang <jiong.wang@arm.com>
11834
11835 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11836 "ULONGEST" for "skip".
11837
11838 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11839
11840 PR gdb/21220
11841 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11842 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11843 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11844 over ptrace peek/poke until end of buffer or error.
11845
11846 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11847
11848 * parse.c (length_of_subexp): Make static.
11849 * parser-defs.h (length_of_subexp): Remove.
11850
11851 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11852
11853 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11854 as well.
11855
11856 2017-03-14 Pedro Alves <palves@redhat.com>
11857
11858 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11859 (main): Use std::unique_ptr. Remove calls to
11860 cp_demangled_name_parse_free.
11861
11862 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11863
11864 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11865 alphabsd_store_inferior_registers): Use regcache->ptid instead
11866 of inferior_ptid.
11867
11868 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11869
11870 * aix-thread.c (aix_thread_fetch_registers,
11871 aix_thread_store_registers): Use regcache->ptid instead of
11872 inferior_ptid.
11873
11874 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11875
11876 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11877 store_gregs_to_thread, fetch_fpregs_from_thread,
11878 store_fpregs_to_thread): Use regcache->ptid instead of
11879 inferior_ptid.
11880
11881 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11882
11883 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11884 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11885 instead of inferior_ptid.
11886
11887 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11888
11889 * target.c (target_fetch_registers, target_store_registers): Add
11890 assert.
11891
11892 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11893
11894 * regcache.h (regcache_get_ptid): New function.
11895 * regcache.c (regcache_get_ptid): New function.
11896
11897 2017-03-13 Mark Wielaard <mark@klomp.org>
11898
11899 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11900
11901 2017-03-10 Keith Seitz <keiths@redhat.com>
11902
11903 PR c++/8218
11904 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11905
11906 2017-03-08 Pedro Alves <palves@redhat.com>
11907
11908 PR gdb/18360
11909 * infrun.c (start_step_over, do_target_resume, resume)
11910 (restart_threads): Assert we're not resuming a thread that is
11911 meant to be stopped.
11912 (infrun_thread_stop_requested_callback): Delete.
11913 (infrun_thread_stop_requested): If the thread is internally
11914 stopped, queue a pending stop event and clear the thread's
11915 inline-frame state.
11916 (handle_stop_requested): New function.
11917 (handle_syscall_event, handle_inferior_event_1): Use
11918 handle_stop_requested.
11919 (handle_stop_requested): New function.
11920 (handle_signal_stop): Set the thread's stop_signal here instead of
11921 at caller.
11922 (finish_step_over): Clear step over info unconditionally.
11923 (handle_signal_stop): If the user had interrupted the event
11924 thread, consider the stop a random signal.
11925 (handle_signal_stop) <signal arrived while stepping over
11926 breakpoint>: Don't restart threads here.
11927 (stop_waiting): Don't clear step-over info here.
11928
11929 2017-03-08 Pedro Alves <palves@redhat.com>
11930
11931 PR 21206
11932 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11933 goes to argument 2, not 1.
11934
11935 2017-03-08 Pedro Alves <palves@redhat.com>
11936
11937 PR cli/21218
11938 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11939 display_gdb_prompt.
11940 (command_line_input): Add comment.
11941
11942 2017-03-08 Pedro Alves <palves@redhat.com>
11943
11944 PR tui/21216
11945 * tui/tui-file.c (tui_file::write): New.
11946 * tui/tui-file.h (tui_file): Override "write".
11947 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11948 factored out from ...
11949 (tui_puts): ... here.
11950 (tui_putc): Use them.
11951 (tui_write): New function.
11952 * tui/tui-io.h (tui_write): Declare.
11953
11954 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11955
11956 * Makefile.in (SFILES): Replace "environ.c" with
11957 "common/environ.c".
11958 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11959 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11960 to...
11961 * common/environ.c: ... here.
11962 * environ.h: Moved to...
11963 * common/environ.h: ... here.
11964
11965 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11966
11967 * gdbarch.sh (pstring_ptr): New static function.
11968 (gdbarch_disassembler_options): Use it.
11969 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11970 not valid_disassembler_option->name.
11971 * gdbarch.c: Regenerate.
11972
11973 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11974
11975 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11976
11977 2017-03-07 Pedro Alves <palves@redhat.com>
11978
11979 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11980
11981 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
11982
11983 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11984 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11985 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
11986 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
11987
11988 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11989
11990 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11991
11992 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11993
11994 * remote.c (remote_add_target_side_commands): Use range-based
11995 for loop.
11996
11997 2017-03-03 Yao Qi <yao.qi@linaro.org>
11998
11999 PR gdb/21165
12000 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12001 value is lazy.
12002 * valprint.c (common_val_print): Likewise.
12003
12004 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12005
12006 * NEWS: Mention new set/show disassembler-options commands.
12007 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12008 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12009 (prospective_options): New static variable.
12010 (gdb_disassembler::gdb_disassembler): Initialize
12011 m_di.disassembler_options.
12012 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12013 (get_disassembler_options): New function.
12014 (set_disassembler_options): Likewise.
12015 (set_disassembler_options_sfunc): Likewise.
12016 (show_disassembler_options_sfunc): Likewise.
12017 (disassembler_options_completer): Likewise.
12018 (_initialize_disasm): Likewise.
12019 * disasm.h (get_disassembler_options): New prototype.
12020 (set_disassembler_options): Likewise.
12021 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12022 (gdbarch_verify_disassembler_options): Likewise.
12023 * gdbarch.c: Regenerate.
12024 * gdbarch.h: Likewise.
12025 * arm-tdep.c (num_disassembly_options): Delete.
12026 (set_disassembly_style): Likewise.
12027 (arm_disassembler_options): New static variable.
12028 (set_disassembly_style_sfunc): Convert short style name into long
12029 option name. Call set_disassembler_options.
12030 (show_disassembly_style_sfunc): New function.
12031 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12032 set_gdbarch_verify_disassembler_options.
12033 (_initialize_arm_tdep): Delete regnames variable and update callers.
12034 (arm_disassembler_options): Initialize.
12035 (disasm_options): New variable.
12036 (num_disassembly_options): Rename from this...
12037 (num_disassembly_styles): ...to this. Compute by scanning through
12038 disasm_options.
12039 (valid_disassembly_styles): Initialize using disasm_options.
12040 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12041 set_arm_regname_option.
12042 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12043 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12044 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12045 set_gdbarch_verify_disassembler_options.
12046 * s390-tdep.c (s390_disassembler_options): New static variable.
12047 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12048 set_gdbarch_verify_disassembler_options.
12049
12050 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12051
12052 * remote.c (remote_add_target_side_condition): Remove "struct"
12053 keyword from range-based for loop.
12054
12055 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12056
12057 * remote.c (remote_add_target_side_condition): Use range-based
12058 for loop. Update comment.
12059
12060 2017-02-27 Yao Qi <yao.qi@linaro.org>
12061
12062 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12063
12064 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12065
12066 * regcache.c (regcache_raw_update): New function.
12067 (regcache_raw_read): Move code to regcache_raw_update.
12068 * regcache.h (regcache_raw_update): New declaration.
12069 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12070
12071 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12072
12073 * dwarf2read.c (create_debug_type_hash_table): Initialize
12074 header.signature and header.type_offset_in_tu.
12075
12076 2017-02-24 Pedro Alves <palves@redhat.com>
12077
12078 * symtab.c (make_file_symbol_completion_list_1): Use
12079 add_symtab_completions.
12080
12081 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12082
12083 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12084
12085 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12086
12087 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12088 I386_MAX_REGISTER_SIZE.
12089 (i386_pseudo_register_write): Likewise.
12090 (i386_process_record): Likewise.
12091 * i387-tdep.c (i387_supply_xsave): Likewise.
12092 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12093 (store_register): Likewise.
12094
12095 2017-02-23 Pedro Alves <palves@redhat.com>
12096
12097 * ada-lang.c: Include "common/function-view.h".
12098 (ada_iterate_over_symbols): Adjust to use function_view as
12099 callback type.
12100 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12101 (ada_make_symbol_completion_list): Use a lambda.
12102 (ada_exc_search_name_matches): Delete.
12103 (name_matches_regex): New.
12104 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12105 * compile/compile-c-support.c: Include "common/function-view.h".
12106 (print_one_macro): Change prototype to accept a ui_file pointer.
12107 (write_macro_definitions): Use a lambda.
12108 * dwarf2read.c: Include "common/function-view.h".
12109 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12110 (dw2_expand_symtabs_matching): Adjust to use function_view as
12111 callback type.
12112 * language.h: Include "common/function-view.h".
12113 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12114 function_view as callback type.
12115 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12116 * linespec.c: Include "common/function-view.h".
12117 (collect_info::add_symbol): New method.
12118 (struct symbol_and_data_callback, iterate_inline_only, struct
12119 symbol_matcher_data, iterate_name_matcher): Delete.
12120 (iterate_over_all_matching_symtabs): Adjust to use function_view
12121 as callback type and lambdas.
12122 (iterate_over_file_blocks): Adjust to use function_view as
12123 callback type.
12124 (decode_compound_collector): Now a class with private fields.
12125 (decode_compound_collector::release_symbols): New method.
12126 (collect_one_symbol): Rename to...
12127 (decode_compound_collector::operator()): ... this and adjust.
12128 (lookup_prefix_sym): decode_compound_collector construction bits
12129 move to decode_compound_collector ctor. Pass the
12130 decode_compound_collector object directly as callback. Remove
12131 cleanups and use decode_compound_collector::release_symbols
12132 instead.
12133 (symtab_collector): Now a class with private fields.
12134 (symtab_collector::release_symtabs): New method.
12135 (add_symtabs_to_list): Rename to...
12136 (symtab_collector::operator()): ... this and adjust.
12137 (collect_symtabs_from_filename): symtab_collector construction
12138 bits move to symtab_collector ctor. Pass the symtab_collector
12139 object directly as callback. Remove cleanups and use
12140 symtab_collector::release_symtabs instead.
12141 (collect_symbols): Delete.
12142 (add_matching_symbols_to_info): Use lambdas.
12143 * macrocmd.c (print_macro_callback): Delete.
12144 (info_macro_command): Use a lambda.
12145 (info_macros_command): Pass print_macro_definition as callable
12146 directly.
12147 (print_one_macro): Remove 'ignore' parameter.
12148 (macro_list_command): Adjust.
12149 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12150 (macro_for_each_data::user_data): Delete field.
12151 (foreach_macro): Adjust to call the function_view.
12152 (macro_for_each): Adjust to use function_view as callback type.
12153 (foreach_macro_in_scope): Adjust to call the function_view.
12154 (macro_for_each_in_scope): Adjust to use function_view as callback
12155 type.
12156 * macrotab.h: Include "common/function-view.h".
12157 (macro_callback_fn): Declare a prototype instead of a pointer.
12158 Remove "user_data" parameter.
12159 (macro_for_each, macro_for_each_in_scope): Adjust to use
12160 function_view as callback type.
12161 * psymtab.c (partial_map_expand_apply)
12162 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12163 Adjust to use function_view as callback type and to return bool.
12164 (psym_expand_symtabs_matching): Adjust to use function_view as
12165 callback types.
12166 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12167 to use function_view as callback type and to return bool.
12168 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12169 callback types.
12170 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12171 as callback types.
12172 * symfile.h: Include "common/function-view.h".
12173 (expand_symtabs_file_matcher_ftype)
12174 (expand_symtabs_symbol_matcher_ftype)
12175 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12176 return bool.
12177 (quick_symbol_functions::map_symtabs_matching_filename)
12178 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12179 function_view as callback type and return bool.
12180 (expand_symtabs_matching): Adjust to use function_view as callback
12181 type.
12182 (maintenance_expand_name_matcher)
12183 (maintenance_expand_file_matcher): Delete.
12184 (maintenance_expand_symtabs): Use lambdas.
12185 * symtab.c (iterate_over_some_symtabs): Adjust to use
12186 function_view as callback types and return bool.
12187 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12188 of a cleanup.
12189 (lookup_symtab_callback): Delete.
12190 (lookup_symtab): Use a lambda.
12191 (iterate_over_symbols): Adjust to use function_view as callback
12192 type.
12193 (struct search_symbols_data, search_symbols_file_matches)
12194 (search_symbols_name_matches): Delete.
12195 (search_symbols): Use a pair of lambdas.
12196 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12197 (symtab_expansion_callback): Delete.
12198 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12199 * symtab.h: Include "common/function-view.h".
12200 (iterate_over_some_symtabs): Adjust to use function_view as
12201 callback type and return bool.
12202 (iterate_over_symtabs): Adjust to use function_view as callback
12203 type.
12204 (symbol_found_callback_ftype): Remove 'data' parameter and return
12205 bool.
12206 (iterate_over_symbols): Adjust to use function_view as callback
12207 type.
12208
12209 2017-02-23 Pedro Alves <palves@redhat.com>
12210
12211 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12212 (%.o) <unittests/%.c>: New pattern.
12213 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12214 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12215 * common/function-view.h: New file.
12216 * unittests/function-view-selftests.c: New file.
12217 * configure: Regenerate.
12218
12219 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12220
12221 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12222 inferior_ptid.
12223 * go32-nat.c (go32_thread_alive): Likewise.
12224
12225 2017-02-23 Yao Qi <yao.qi@linaro.org>
12226
12227 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12228 delete.
12229
12230 2017-02-23 Yao Qi <yao.qi@linaro.org>
12231
12232 * varobj.c (varobj_clear_saved_item): Use delete instead of
12233 xfree.
12234 (update_dynamic_varobj_children): Likewise.
12235
12236 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12237
12238 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12239
12240 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12241
12242 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12243 m_enum_value to 0 in default constructor.
12244
12245 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12246
12247 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12248 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12249 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12250 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12251 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12252 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12253 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12254 IS_STORE_CONDITIONAL_INSN.
12255
12256 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12257
12258 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12259
12260 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12261
12262 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12263
12264 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12265
12266 * dwarf2read.c (skip_one_die, read_attribute_value)
12267 (dwarf2_const_value_attr, dump_die_shallow)
12268 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12269 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12270
12271 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12272
12273 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12274 (dwarf_parse_macro_header): Accept DWARF version 5.
12275 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12276
12277 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12278
12279 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12280 DW_AT_GNU_*.
12281 * common/common-exceptions.h (enum errors): Likewise.
12282 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12283 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12284 (dwarf_expr_context::execute_stack_op): Likewise.
12285 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12286 Likewise.
12287 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12288 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12289 (show_entry_values_debug, call_site_to_target_addr)
12290 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12291 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12292 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12293 (value_of_dwarf_block_entry, indirect_pieced_value)
12294 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12295 (disassemble_dwarf_expression): Likewise.
12296 * dwarf2read.c (process_die, inherit_abstract_dies)
12297 (read_call_site_scope): Likewise.
12298 * gdbtypes.h (struct func_type, struct call_site_parameter)
12299 (struct call_site): Likewise.
12300 * stack.c (read_frame_arg): Likewise.
12301 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12302
12303 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12304
12305 * defs.h (read_unsigned_leb128): New declaration.
12306 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12307 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12308 (dwarf2_find_location_expression): Call also
12309 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12310 * dwarf2loc.h (dwarf2_version): New declaration.
12311 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12312 rnglists.
12313 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12314 .debug_rnglists.
12315 (struct dwop_section_names): Add loclists_dwo.
12316 (dwop_section_names): Add .debug_loclists.dwo.
12317 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12318 (struct dwarf2_per_cu_data): Add dwarf_version.
12319 (struct dwo_sections): Add loclists.
12320 (struct attr_abbrev): Add implicit_const.
12321 (read_indirect_line_string): New declaration.
12322 (read_unsigned_leb128): Delete declaration.
12323 (rcuh_kind): New definition.
12324 (read_and_check_comp_unit_head): Change parameter
12325 is_debug_types_section to section_kind.
12326 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12327 (read_comp_unit_head): Change parameter abfd to section, add parameter
12328 section_kind. Handle DWARF-5.
12329 (error_check_comp_unit_head): Accept also DWARF version 5.
12330 (read_and_check_comp_unit_head): Change parameter
12331 is_debug_types_section to section_kind.
12332 (read_and_check_type_unit_head): Delete function.
12333 (read_abbrev_offset): Handle DWARF-5.
12334 (create_debug_type_hash_table): Add parameter section_kind. Process
12335 only DW_UT_type. Use signature and type_offset_in_tu from struct
12336 comp_unit_head.
12337 (create_debug_types_hash_table): Update create_debug_type_hash_table
12338 caller.
12339 (create_all_type_units): Call create_debug_type_hash_table.
12340 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12341 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12342 caller.
12343 (skip_one_die): Handle DW_FORM_implicit_const.
12344 (dwarf2_rnglists_process): New function.
12345 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12346 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12347 (read_attribute_value): Handle DW_FORM_implicit_const,
12348 DW_FORM_line_strp.
12349 (read_attribute): Handle DW_FORM_implicit_const.
12350 (read_indirect_string_at_offset_from): New function from
12351 read_indirect_string_at_offset.
12352 (read_indirect_string_at_offset): Call
12353 read_indirect_string_at_offset_from.
12354 (read_indirect_line_string_at_offset): New function.
12355 (read_indirect_string): New function comment.
12356 (read_indirect_line_string): New function.
12357 (read_unsigned_leb128): Make it global.
12358 (dwarf2_string_attr): Handle DWARF-5.
12359 (add_include_dir_stub, read_formatted_entries): New functions.
12360 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12361 Handle DWARF-5.
12362 (per_cu_header_read_in): Update read_comp_unit_head caller.
12363 (dwarf2_version): New function.
12364 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12365 rnglists.
12366 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12367 fields.
12368
12369 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12370
12371 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12372
12373 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12374
12375 * dwarf2read.c (dwarf2_ranges_process): New function from
12376 dwarf2_ranges_read.
12377 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12378 dwarf2_ranges_process.
12379
12380 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12381
12382 * dwarf2read.c (create_debug_type_hash_table): New function from
12383 create_debug_types_hash_table.
12384 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12385 (create_all_type_units, open_and_init_dwo_file): Update
12386 create_debug_types_hash_table callers.
12387
12388 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12389
12390 PR gdb/16188
12391 * fork-child.c (trace_start_error): Fix thinko. va_end should
12392 refer to 'ap', not 'args'.
12393
12394 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12395 Pedro Alves <palves@redhat.com>
12396
12397 PR gdb/16188
12398 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12399 calls succeeded.
12400 * fork-child.c (trace_start_error): New function.
12401 (trace_start_error_with_name): Likewise.
12402 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12403 * inf-ptrace.c (inf_ptrace_me): Likewise.
12404 * inferior.h (trace_start_error): New prototype.
12405 (trace_start_error_with_name): Likewise.
12406
12407 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12408
12409 PR gdb/21164
12410 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12411 NULL before using it.
12412 * symmisc.c (maintenance_print_symbols): Likewise.
12413 (maintenance_print_msymbols): Likewise.
12414
12415 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12416
12417 * NEWS: Add record Python bindings entry.
12418
12419 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12420
12421 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12422 py-record-full.o.
12423 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12424 * python/py-record-btrace.c, python/py-record-btrace.h,
12425 python/py-record-full.c, python/py-record-full.h: New file.
12426 * python/py-record.c: Add include for py-record-btrace.h and
12427 py-record-full.h.
12428 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12429 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12430 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12431 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12432 New definition.
12433 (gdbpy_initialize_btrace): New export.
12434 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12435
12436 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12437
12438 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12439 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12440 * python/py-record.c: New file.
12441 * python/python-internal.h (gdbpy_start_recording,
12442 gdbpy_current_recording, gdpy_stop_recording,
12443 gdbpy_initialize_record): New export.
12444 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12445 (python_GdbMethods): Add gdbpy_start_recording,
12446 gdbpy_current_recording and gdbpy_stop_recording.
12447
12448 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12449
12450 * record-btrace.c (record_btrace_record_method): New function.
12451 (init_record_btrace_ops): Initialize to_record_method.
12452 * record-full.c (record_full_record_method): New function.
12453 (init_record_full_ops, init_record_full_core_ops): Add
12454 record_full_record_method.
12455 * record.h (enum record_method): New enum.
12456 * target-debug.h (target_debug_print_enum_record_method: New define.
12457 * target-delegates.c: Regenerate.
12458 * target.c (target_record_method): New function.
12459 * target.h: Include record.h.
12460 (struct target_ops) <to_record_method>: New field.
12461 (target_record_method): New export.
12462
12463 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12464
12465 * record.h (record_start, record_stop): New export.
12466 * record.c (record_start, record_stop): New function.
12467
12468 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12469
12470 * btrace.c (btrace_fetch): Copy function call segments pointer
12471 into a vector.
12472 (btrace_clear): Clear the vector.
12473 (btrace_find_insn_by_number): Use binary search to find the correct
12474 function call segment.
12475 * btrace.h (brace_fun_p): New typedef.
12476 (struct btrace_thread_info) <functions>: New field.
12477
12478 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12479
12480 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12481 * btrace.c (btrace_decode_error): ... here. New function.
12482 * btrace.h (btrace_decode_error): New export.
12483
12484 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12485
12486 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12487 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12488 btrace_find_insn_by_number): Remove special case for gaps.
12489 * btrace.h (btrace_insn_get_error): New export.
12490 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12491 * record-btrace.c (btrace_insn_history): Print number for gaps.
12492 (record_btrace_info, record_btrace_goto): Handle gaps.
12493
12494 2017-02-14 Tom Tromey <tom@tromey.com>
12495
12496 PR python/13598:
12497 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12498 event.
12499 * python/py-evts.c (gdbpy_initialize_py_events): Add
12500 before_prompt registry.
12501 * python/py-events.h (events_object) <before_prompt>: New field.
12502
12503 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12504
12505 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12506
12507 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
12508
12509 * symfile (_initialize_symfile): Add usage text to the load command's
12510 help text.
12511
12512 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12513
12514 * utils.c (defaulted_query): Don't query on secondary UIs.
12515
12516 2017-02-10 Tom Tromey <tom@tromey.com>
12517
12518 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12519
12520 2017-02-10 Tom Tromey <tom@tromey.com>
12521
12522 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12523 "cleanup" local.
12524 * python/py-type.c (typy_legacy_template_argument): Remove
12525 unnecessary "cleanup" local.
12526
12527 2017-02-10 Tom Tromey <tom@tromey.com>
12528
12529 * python/python.c (do_start_initialization): New function, from
12530 _initialize_python.
12531 (_initialize_python): Call do_start_initialization.
12532 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12533 goto.
12534
12535 2017-02-10 Tom Tromey <tom@tromey.com>
12536
12537 * python/py-prettyprint.c (pretty_print_one_value): Use
12538 gdbpy_ref.
12539
12540 2017-02-10 Tom Tromey <tom@tromey.com>
12541
12542 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12543 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12544 gdbpy_ref.
12545 * python/py-type.c (field_new): Use gdbpy_ref.
12546 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12547 gdbpy_ref.
12548 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12549 (py_free_pspace): Likewise.
12550 (pspace_to_pspace_object): Likewise.
12551 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12552 (py_free_objfile): Likewise.
12553 (objfile_to_objfile_object): Likewise.
12554 * python/py-inferior.c (delete_thread_object): Use
12555 gdbpy_ref.
12556 (infpy_read_memory): Likewise.
12557 (py_free_inferior): Likewise.
12558 * python/py-evtregistry.c (create_eventregistry_object): Use
12559 gdbpy_ref.
12560 * python/py-event.c (create_event_object): Use gdbpy_ref.
12561
12562 2017-02-10 Tom Tromey <tom@tromey.com>
12563
12564 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12565 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12566 used.
12567 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12568 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12569 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12570 python/py-framefilter.c, python/py-function.c,
12571 python/py-inferior.c, python/py-infevents.c,
12572 python/py-linetable.c, python/py-newobjfileevent.c,
12573 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12574 python/py-signalevent.c, python/py-stopevent.c,
12575 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12576 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12577 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12578 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12579
12580 2017-02-10 Tom Tromey <tom@tromey.com>
12581
12582 * ui-out.h (ui_out_emit_type): New class.
12583 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12584 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12585 and ui_out_emit_tuple.
12586 (enumerate_locals): Likewise.
12587 (py_mi_print_variables, py_print_locals, py_print_args): Use
12588 ui_out_emit_list.
12589 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12590 ui_out_emit_list.
12591 * common/gdb_optional.h: New file.
12592
12593 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12594
12595 * MAINTAINERS (Write After Approval): Update my e-mail address.
12596
12597 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12598
12599 PR gdb/21122
12600 * breakpoint.c (_initialize_breakpoint): Update the help description
12601 of the 'commands' command to indicate that it takes a list argument.
12602
12603 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12604
12605 * interps.c (current_interp_set_logging): Remove "return".
12606
12607 2017-02-09 Gary Benson <gbenson@redhat.com>
12608
12609 * symtab.c (add_symtab_completions): Prevent NULL pointer
12610 dereference.
12611
12612 2017-02-08 Pedro Alves <palves@redhat.com>
12613
12614 * interps.c (interp::interp): Remove reference to quiet_p.
12615 (interp_set): Make static. Remove dead "Switching to" output
12616 code.
12617 (interp_quiet_p, interp_set_quiet): Delete.
12618 (interpreter_exec_cmd): Don't set the interpreter quiet.
12619 * interps.h (interp_quiet_p): Make static.
12620 (class interp) <quiet_p>: Remove field
12621
12622 2017-02-08 Jerome Guitton <guitton@adacore.com>
12623
12624 * cli/cli-decode.c (find_command_name_length): Make it extern.
12625 * cli/cli-decode.h (find_command_name_length): Declare.
12626 * cli/cli-script.c (command_name_equals, line_first_arg):
12627 New functions.
12628 (process_next_line): Use cli-decode to parse command names.
12629 (build_command_line): Make args a constant pointer.
12630
12631 2017-02-08 Jerome Guitton <guitton@adacore.com>
12632
12633 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12634 Remove case-insensitive search.
12635
12636 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12637
12638 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12639 at the end of the line. Avoids an ARI warning.
12640
12641 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
12642
12643 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12644 rdseed instructions.
12645 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12646
12647 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12648
12649 PR tdep/20936
12650 Provide and use sparc32 and sparc64 target description XML files.
12651 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12652 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12653 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12654 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12655 * features/sparc/sparc32-solaris.xml: New file.
12656 * features/sparc/sparc64-solaris.xml: New file.
12657 * features/sparc/sparc32-solaris.c: Generated.
12658 * features/sparc/sparc64-solaris.c: Generated.
12659 * sparc-tdep.h: Account for differences in target descriptions.
12660 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12661 (sparc32_register_type): Use target provided registers.
12662 (validate_tdesc_registers): New function.
12663 (sparc32_gdbarch_init): Use tdesc_has_registers.
12664 Set pseudoregister functions.
12665 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12666 (sparc64_register_type): Use target provided registers.
12667 (sparc64_init_abi): Set pseudoregister functions.
12668
12669 2017-02-03 Tom Tromey <tom@tromey.com>
12670
12671 PR rust/21097:
12672 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12673 with a single member.
12674
12675 2017-02-03 Pedro Alves <palves@redhat.com>
12676
12677 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12678 (cli_interp_base::~cli_interp_base): New.
12679 (cli_interp): New struct.
12680 (as_cli_interp): Cast the interp itself to cli_interp.
12681 (cli_interpreter_pre_command_loop): Rename to ...
12682 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12683 parameter.
12684 (cli_interpreter_init): Rename to ...
12685 (cli_interp::init): ... this. Remove 'self' parameter. Use
12686 boolean. Make extern.
12687 (cli_interpreter_resume): Rename to ...
12688 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12689 extern.
12690 (cli_interpreter_suspend): Rename to ...
12691 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12692 extern.
12693 (cli_interpreter_exec): Rename to ...
12694 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12695 extern.
12696 (cli_interpreter_supports_command_editing): Rename to ...
12697 (cli_interp_base::supports_command_editing): ... this. Remove
12698 'interp' parameter. Make extern.
12699 (cli_ui_out): Rename to ...
12700 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12701 Make extern.
12702 (cli_set_logging): Rename to ...
12703 (cli_interp_base::set_logging): ... this. Remove 'interp'
12704 parameter. Make extern.
12705 (cli_interp_procs): Delete.
12706 (cli_interp_factory): Adjust to use "new".
12707 * cli/cli-interp.h: Include "interps.h".
12708 (struct cli_interp_base): New struct.
12709 * interps.c (struct interp): Delete. Fields moved to interps.h.
12710 (interp_new): Delete.
12711 (interp::interp, interp::~interp): New.
12712 (interp_set): Use bool, and return void. Assume the interpreter
12713 has suspend, init and resume methods, and that the all return
12714 void.
12715 (set_top_level_interpreter): interp_set returns void.
12716 (interp_ui_out): Adapt.
12717 (current_interp_set_logging): Adapt.
12718 (interp_data): Delete.
12719 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12720 (interp_exec): Adapt.
12721 (top_level_interpreter_data): Delete.
12722 * interps.h (interp_init_ftype, interp_resume_ftype)
12723 (interp_suspend_ftype, interp_exec_ftype)
12724 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12725 (class interp): New.
12726 (interp_new): Delete.
12727 (interp_set): Now returns void. Use bool.
12728 (interp_data, top_level_interpreter_data): Delete.
12729 * mi/mi-common.h: Include interps.h.
12730 (class mi_interp): Inherit from interp. Define a ctor. Declare
12731 init, resume, suspect, exec, interp_ui_out, set_logging and
12732 pre_command_loop methods.
12733 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12734 (mi_interpreter_init): Rename to ...
12735 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12736 bool, return void and make extern. Adjust.
12737 (mi_interpreter_resume): ... Rename to ...
12738 (mi_interp::resume): ... this. Remove the 'data' parameter,
12739 return void and make extern. Adjust.
12740 (mi_interpreter_suspend): ... Rename to ...
12741 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12742 return void and make extern. Adjust.
12743 (mi_interpreter_exec): ... Rename to ...
12744 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12745 extern. Adjust.
12746 (mi_interpreter_pre_command_loop): ... Rename to ...
12747 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12748 parameter and make extern.
12749 (mi_on_normal_stop_1): Adjust.
12750 (mi_ui_out): Rename to ...
12751 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12752 parameter and make extern. Adjust.
12753 (mi_set_logging): Rename to ...
12754 (mi_interp::set_logging): ... this. Remove the 'interp'
12755 parameter and make extern. Adjust.
12756 (mi_interp_procs): Delete.
12757 (mi_interp_factory): Adjust to use 'new'.
12758 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12759 (mi_print_exception, mi_execute_command, mi_load_progress):
12760 Adjust.
12761 * tui/tui-interp.c (tui_interp): New class.
12762 (as_tui_interp): Return a tui_interp pointer.
12763 (tui_on_normal_stop, tui_on_signal_received)
12764 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12765 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12766 to use interp::interp_ui_out.
12767 (tui_init): Rename to ...
12768 (tui_interp::init): ... this. Remove the 'self' parameter, use
12769 bool, return void and make extern. Adjust.
12770 (tui_resume): Rename to ...
12771 (tui_interp::resume): ... this. Remove the 'data' parameter,
12772 return void and make extern. Adjust.
12773 (tui_suspend): Rename to ...
12774 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12775 return void and make extern. Adjust.
12776 (tui_ui_out): Rename to ...
12777 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12778 parameter, and make extern. Adjust.
12779 (tui_exec): Rename to ...
12780 (tui_interp::exec): ... this. Remove the 'data' parameter and
12781 make extern.
12782 (tui_interp_procs): Delete.
12783 (tui_interp_factory): Use "new".
12784
12785 2017-02-02 Tom Tromey <tom@tromey.com>
12786
12787 * rust-exp.y (ends_raw_string, space_then_number)
12788 (rust_identifier_start_p): Return bool.
12789 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12790 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12791 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12792 (rust_chartype_p): Return bool.
12793 (val_print_struct, rust_print_struct_def, rust_print_type):
12794 Update.
12795 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12796 Return bool.
12797
12798 2017-02-02 Tom Tromey <tom@tromey.com>
12799
12800 * rust-lang.c: Reindent.
12801
12802 2017-02-02 Tom Tromey <tom@tromey.com>
12803
12804 * rust-lang.h (rust_crate_for_block): Update.
12805 * rust-lang.c (rust_crate_for_block): Return std::string.
12806 (rust_get_disr_info): Use std:;string, not
12807 gdb::unique_xmalloc_ptr.
12808 * rust-exp.y (crate_name): Update.
12809
12810 2017-02-02 Pedro Alves <palves@redhat.com>
12811
12812 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12813 field out of gdb_disassembler_test and make it static.
12814
12815 2017-02-02 Pedro Alves <palves@redhat.com>
12816
12817 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12818 mi1_interp and mi_interp fields.
12819
12820 2017-02-02 Pedro Alves <palves@redhat.com>
12821
12822 * cli/cli-interp.c (struct saved_output_files, saved_output):
12823 Moved from cli/cli-logging.c.
12824 (cli_set_logging): New function.
12825 (cli_interp_procs): Install cli_set_logging.
12826 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12827 Declare.
12828 * cli/cli-logging.c (struct saved_output_files, saved_output):
12829 Moved to cli/cli-interp.c.
12830 (pop_output_files): Don't save outputs here.
12831 (make_logging_output): New function.
12832 (handle_redirections): Don't build tee nor save previous outputs
12833 here.
12834 * interps.c (current_interp_set_logging): Change prototype.
12835 Assume there's always a set_logging_proc method installed.
12836 * interps.h (interp_set_logging_ftype): Change prototype.
12837 (current_interp_set_logging): Change prototype and adjust comment.
12838 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12839 use make_logging_output.
12840 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12841 2017-02-02 Pedro Alves <palves@redhat.com>
12842
12843 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12844 from ...
12845 (set_logging_overwrite): ... here.
12846 (logging_no_redirect_file): Delete.
12847 (set_logging_redirect): Don't handle redirection on the fly.
12848 Instead warn that "logging off" / "logging on" is necessary.
12849 (pop_output_files): Delete references to logging_no_redirect_file.
12850 (show_logging_command): Always speak in terms of what will happen
12851 once logging is reenabled.
12852
12853 2017-02-02 Pedro Alves <palves@redhat.com>
12854
12855 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12856
12857 2017-02-02 Pedro Alves <palves@redhat.com>
12858
12859 * disasm.c (gdb_pretty_print_insn): Rename to ...
12860 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12861 Remove gdbarch parameter. Adapt to clear the object's buffers
12862 instead of allocating new buffers, and to print using the object's
12863 gdb_disassembler instead of calling gdb_print_insn.
12864 (dump_insns): Use gdb_pretty_print_disassembler.
12865 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12866 (gdb_pretty_print_disassembler): New class.
12867 * record-btrace.c (btrace_insn_history): Use
12868 gdb_pretty_print_disassembler.
12869
12870 2017-02-02 Pedro Alves <palves@redhat.com>
12871
12872 * ada-lang.c (type_as_string): Use string_file.
12873 * ada-valprint.c (ada_print_floating): Use string_file.
12874 * ada-varobj.c (ada_varobj_scalar_image)
12875 (ada_varobj_get_value_image): Use string_file.
12876 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12877 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12878 * breakpoint.c (update_inserted_breakpoint_locations)
12879 (insert_breakpoint_locations, reattach_breakpoints)
12880 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12881 (print_it_watchpoint): Use string_file.
12882 (save_breakpoints): Use stdio_file.
12883 * c-exp.y (oper): Use string_file.
12884 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12885 tee_file.
12886 (pop_output_files): Use delete.
12887 (handle_redirections): Use stdio_file and tee_file.
12888 * cli/cli-setshow.c (do_show_command): Use string_file.
12889 * compile/compile-c-support.c (c_compute_program): Use
12890 string_file.
12891 * compile/compile-c-symbols.c (generate_vla_size): Take a
12892 'string_file &' instead of a 'ui_file *'.
12893 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12894 of a 'ui_file *'. Use string_file.
12895 (generate_c_for_variable_locations): Take a 'string_file &'
12896 instead of a 'ui_file *'.
12897 * compile/compile-internal.h (generate_c_for_for_one_variable):
12898 Take a 'string_file &' instead of a 'ui_file *'.
12899 * compile/compile-loc2c.c (push, pushf, unary, binary)
12900 (print_label, pushf_register_address, pushf_register)
12901 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12902 'ui_file *'. Adjust.
12903 * compile/compile.c (compile_to_object): Use string_file.
12904 * compile/compile.h (compile_dwarf_expr_to_c)
12905 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12906 'ui_file *'.
12907 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12908 (replace_typedefs_qualified_name): Use string_file and
12909 obstack_copy0.
12910 * disasm.c (gdb_pretty_print_insn): Use string_file.
12911 (gdb_disassembly): Adjust reference the null_stream global.
12912 (do_ui_file_delete): Delete.
12913 (gdb_insn_length): Use null_stream.
12914 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12915 * dwarf2loc.c (dwarf2_compile_property_to_c)
12916 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12917 'string_file &' instead of a 'ui_file *'.
12918 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12919 * dwarf2read.c (do_ui_file_peek_last): Delete.
12920 (dwarf2_compute_name): Use string_file.
12921 * event-top.c (gdb_setup_readline): Use stdio_file.
12922 * gdbarch.sh (verify_gdbarch): Use string_file.
12923 * gdbtypes.c (safe_parse_type): Use null_stream.
12924 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12925 string_file.
12926 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12927 'string_file *' instead of a 'ui_file *'.
12928 (gdbscm_arch_disassemble): Use string_file.
12929 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12930 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12931 inherits from ui_file.
12932 (ioscm_file_port_delete, ioscm_file_port_rewind)
12933 (ioscm_file_port_put): Delete.
12934 (ioscm_file_port_write): Rename to ...
12935 (ioscm_file_port::write): ... this. Remove file_port_magic
12936 checks.
12937 (ioscm_file_port_new): Delete.
12938 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12939 ui_file_up.
12940 * guile/scm-type.c (tyscm_type_name): Use string_file.
12941 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12942 Use string_file.
12943 * infcmd.c (print_return_value_1): Use string_file.
12944 * infrun.c (print_target_wait_results): Use string_file.
12945 * language.c (add_language): Use string_file.
12946 * location.c (explicit_to_string_internal): Use string_file.
12947 * main.c (captured_main_1): Use null_file.
12948 * maint.c (maintenance_print_architecture): Use stdio_file.
12949 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12950 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12951 event_channel>: Change type to mi_console_file pointer.
12952 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12953 (mi_console_file_delete): Delete.
12954 (struct mi_console_file): Delete.
12955 (mi_console_file_magic): Delete.
12956 (mi_console_file_new): Delete.
12957 (mi_console_file::mi_console_file): New.
12958 (mi_console_file_delete): Delete.
12959 (mi_console_file_fputs): Delete.
12960 (mi_console_file::write): New.
12961 (mi_console_raw_packet): Delete.
12962 (mi_console_file::flush): New.
12963 (mi_console_file_flush): Delete.
12964 (mi_console_set_raw): Rename to ...
12965 (mi_console_file::set_raw): ... this.
12966 * mi/mi-console.h (class mi_console_file): New class.
12967 (mi_console_file_new, mi_console_set_raw): Delete.
12968 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12969 (mi_set_logging): Use delete and tee_file. Adjust.
12970 * mi/mi-main.c (output_register): Use string_file.
12971 (mi_cmd_data_evaluate_expression): Use string_file.
12972 (mi_cmd_data_read_memory): Use string_file.
12973 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12974 * mi/mi-out.c (mi_ui_out::main_stream): New.
12975 (mi_ui_out::rewind): Use main_stream and
12976 string_file.
12977 (mi_ui_out::put): Use main_stream and string_file.
12978 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12979 Allocate a 'string_file' instead.
12980 (mi_out_new): Don't allocate a mem_fileopen stream here.
12981 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12982 (mi_ui_out::main_stream): Declare method.
12983 * printcmd.c (eval_command): Use string_file.
12984 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12985 * python/py-arch.c (archpy_disassemble): Use string_file.
12986 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12987 * python/py-frame.c (frapy_str): Use string_file.
12988 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12989 Use string_file.
12990 * python/py-type.c (typy_str): Use string_file.
12991 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12992 * python/py-value.c (valpy_str): Use string_file.
12993 * record-btrace.c (btrace_insn_history): Use string_file.
12994 * regcache.c (regcache_print): Use stdio_file.
12995 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12996 * remote.c (escape_buffer): Use string_file.
12997 * rust-lang.c (rust_get_disr_info): Use string_file.
12998 * serial.c (serial_open_ops_1): Use stdio_file.
12999 (do_serial_close): Use delete.
13000 * stack.c (print_frame_arg): Use string_file.
13001 (print_frame_args): Remove local mem_fileopen stream, not used.
13002 (print_frame): Use string_file.
13003 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13004 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13005 Take a 'string_file *' instead of a 'ui_file *'.
13006 * top.c (new_ui): Use stdio_file and stderr_file.
13007 (free_ui): Use delete.
13008 (execute_command_to_string): Use string_file.
13009 (quit_confirm): Use string_file.
13010 * tracepoint.c (collection_list::append_exp): Use string_file.
13011 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13012 * tui/tui-file.c: Don't include "ui-file.h".
13013 (enum streamtype, struct tui_stream): Delete.
13014 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13015 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13016 (tui_file::tui_file): New method.
13017 (tui_file_fputs): Delete.
13018 (tui_file_get_strbuf): Delete.
13019 (tui_file::puts): New method.
13020 (tui_file_adjust_strbuf): Delete.
13021 (tui_file_flush): Delete.
13022 (tui_file::flush): New method.
13023 * tui/tui-file.h: Tweak intro comment.
13024 Include ui-file.h.
13025 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13026 (tui_file_adjust_strbuf): Delete declarations.
13027 (class tui_file): New class.
13028 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13029 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13030 (tui_register_format): Use string_stream.
13031 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13032 (tui_get_function_from_frame): Use string_file.
13033 * typeprint.c (type_to_string): Use string_file.
13034 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13035 (null_stream): New global.
13036 (ui_file_delete): Delete.
13037 (ui_file::ui_file): New.
13038 (null_file_isatty): Delete.
13039 (ui_file::~ui_file): New.
13040 (null_file_rewind): Delete.
13041 (ui_file::printf): New.
13042 (null_file_put): Delete.
13043 (null_file_flush): Delete.
13044 (ui_file::putstr): New.
13045 (null_file_write): Delete.
13046 (ui_file::putstrn): New.
13047 (null_file_read): Delete.
13048 (ui_file::putc): New.
13049 (null_file_fputs): Delete.
13050 (null_file_write_async_safe): Delete.
13051 (ui_file::vprintf): New.
13052 (null_file_delete): Delete.
13053 (null_file::write): New.
13054 (null_file_fseek): Delete.
13055 (null_file::puts): New.
13056 (ui_file_data): Delete.
13057 (null_file::write_async_safe): New.
13058 (gdb_flush, ui_file_isatty): Adjust.
13059 (ui_file_put, ui_file_rewind): Delete.
13060 (ui_file_write): Adjust.
13061 (ui_file_write_for_put): Delete.
13062 (ui_file_write_async_safe, ui_file_read): Adjust.
13063 (ui_file_fseek): Delete.
13064 (fputs_unfiltered): Adjust.
13065 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13066 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13067 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13068 (set_ui_file_data): Delete.
13069 (string_file::~string_file, string_file::write)
13070 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13071 (do_ui_file_as_string, ui_file_as_string): Delete.
13072 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13073 (struct mem_file): Delete.
13074 (mem_file_new): Delete.
13075 (stdio_file::stdio_file): New.
13076 (mem_file_delete): Delete.
13077 (stdio_file::stdio_file): New.
13078 (mem_fileopen): Delete.
13079 (stdio_file::~stdio_file): New.
13080 (mem_file_rewind): Delete.
13081 (stdio_file::set_stream): New.
13082 (mem_file_put): Delete.
13083 (stdio_file::open): New.
13084 (mem_file_write): Delete.
13085 (stdio_file_magic, struct stdio_file): Delete.
13086 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13087 (stdio_file::flush): New.
13088 (stdio_file_read): Rename to ...
13089 (stdio_file::read): ... this. Adjust.
13090 (stdio_file_write): Rename to ...
13091 (stdio_file::write): ... this. Adjust.
13092 (stdio_file_write_async_safe): Rename to ...
13093 (stdio_file::write_async_safe) ... this. Adjust.
13094 (stdio_file_fputs): Rename to ...
13095 (stdio_file::puts) ... this. Adjust.
13096 (stdio_file_isatty): Delete.
13097 (stdio_file_fseek): Delete.
13098 (stdio_file::isatty): New.
13099 (stderr_file_write): Rename to ...
13100 (stderr_file::write) ... this. Adjust.
13101 (stderr_file_fputs): Rename to ...
13102 (stderr_file::puts) ... this. Adjust.
13103 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13104 (stderr_file::stderr_file): New.
13105 (tee_file_magic): Delete.
13106 (struct tee_file): Delete.
13107 (tee_file::tee_file): New.
13108 (tee_file_new): Delete.
13109 (tee_file::~tee_file): New.
13110 (tee_file_delete): Delete.
13111 (tee_file_flush): Rename to ...
13112 (tee_file::flush): ... this. Adjust.
13113 (tee_file_write): Rename to ...
13114 (tee_file::write): ... this. Adjust.
13115 (tee_file::write_async_safe): New.
13116 (tee_file_fputs): Rename to ...
13117 (tee_file::puts): ... this. Adjust.
13118 (tee_file_isatty): Rename to ...
13119 (tee_file::isatty): ... this. Adjust.
13120 * ui-file.h (struct obstack, struct ui_file): Don't
13121 forward-declare.
13122 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13123 (ui_file_write_ftype)
13124 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13125 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13126 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13127 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13128 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13129 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13130 (set_ui_file_fseek): Delete.
13131 (ui_file_data, ui_file_delete, ui_file_rewind)
13132 (struct ui_file): New.
13133 (ui_file_up): New.
13134 (class null_file): New.
13135 (null_stream): Declare.
13136 (ui_file_write_for_put, ui_file_put): Delete.
13137 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13138 Delete.
13139 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13140 (gdb_fopen, tee_file_new): Delete.
13141 (struct string_file): New.
13142 (struct stdio_file): New.
13143 (stdio_file_up): New.
13144 (struct stderr_file): New.
13145 (class tee_file): New.
13146 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13147 of a 'ui_file *'. Adjust.
13148 * ui-out.h (class ui_out) <field_stream>: Likewise.
13149 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13150 (null_stream): Delete.
13151 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13152 Adjust.
13153 * utils.h (struct ui_file): Delete forward declaration..
13154 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13155 (error_stream): Take a 'string_file &' instead of a
13156 'ui_file *'.
13157 * varobj.c (varobj_value_get_print_value): Use string_file.
13158 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13159 * gdbarch.c: Regenerate.
13160
13161 2017-02-02 Pedro Alves <palves@redhat.com>
13162
13163 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13164 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13165 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13166 Adjust to call gdb_print_insn instead of
13167 gdb_disassembler::print_insn.
13168 (dump_insns, do_mixed_source_and_assembly_deprecated)
13169 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13170 'gdbarch' parameter. Remove gdb_disassembler parameter.
13171 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13172 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13173 declaration.
13174 (gdb_pretty_print_insn): Re-add declaration.
13175 * record-btrace.c (btrace_insn_history): Don't allocate a
13176 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13177
13178 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13179
13180 * disasm.h (gdb_disassembly): Remove file_string parameter.
13181 * disasm.c (gdb_disassembly): Likewise.
13182 * cli/cli-cmds.c (print_disassembly): Adapt.
13183 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13184 * stack.c (do_gdb_disassembly): Likewise.
13185
13186 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13187
13188 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13189 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13190 targets. And if the implicit value is longer than needed, extract
13191 the first bytes instead of the "least significant" ones.
13192
13193 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13194
13195 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13196 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13197 (btrace_fetch): Assert can_access_registers_ptid.
13198 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13199 validate_registers_access.
13200
13201 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13202
13203 * gdbthread.h (can_access_registers_ptid): New.
13204 * thread.c (can_access_registers_ptid): New.
13205
13206 2017-02-01 Pedro Alves <palves@redhat.com>
13207
13208 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13209
13210 2017-01-31 Pedro Alves <palves@redhat.com>
13211
13212 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13213 Fix typos.
13214
13215 2017-01-31 Pedro Alves <palves@redhat.com>
13216
13217 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13218 not used.
13219
13220 2017-01-31 Pedro Alves <palves@redhat.com>
13221
13222 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13223
13224 2017-01-31 Pedro Alves <palves@redhat.com>
13225
13226 * common/scoped_restore.h
13227 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13228 change the value's parameter type to T2.
13229 (make_scoped_restore): Likewise.
13230
13231 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13232 Richard Henderson <rth@redhat.com>
13233
13234 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13235 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13236 GS_BASE for older kernels.
13237 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13238 GS_BASE for older kernels.
13239 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13240 and GS_BASE to the offset table.
13241 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13242 system register group.
13243 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13244 for older kernels.
13245 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13246 amd64 ABI.
13247 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13248 AMD64_GSBASE_REGNUM.
13249 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13250 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13251 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13252 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13253 i386/64bit-segments.xml in those rules.
13254 * features/i386/64bit-segments.xml: New file.
13255 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13256 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13257 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13258 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13259 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13260 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13261 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13262 * features/i386/amd64-avx-linux.c: Regenerated.
13263 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13264 * features/i386/amd64-avx-mpx.c: Regenerated.
13265 * features/i386/amd64-avx512-linux.c: Regenerated.
13266 * features/i386/amd64-linux.c: Regenerated.
13267 * features/i386/amd64-mpx-linux.c: Regenerated.
13268 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13269 * features/i386/i386-avx-mpx.c: Regenerated.
13270 * features/i386/x32-avx-linux.c: Regenerated.
13271 * features/i386/x32-avx512-linux.c: Regenerated.
13272 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13273 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13274 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13275 * regformats/i386/amd64-linux.dat: Regenerated.
13276 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13277 * regformats/i386/x32-avx-linux.dat: Regenerated.
13278 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13279 * regformats/i386/x32-linux.dat: Regenerated.
13280
13281 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13282
13283 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13284 Set to AMD64_NUM_REGS.
13285
13286 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13287
13288 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13289 that checks validity of a register number.
13290
13291 2017-01-27 Kees Cook <keescook@google.com>
13292
13293 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13294 fetch_fpregs if target has fpa registers.
13295 (arm_linux_store_inferior_registers): Call store_fpregs if target
13296 has fpa registers.
13297
13298 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13299
13300 * cris-tdep.c (cris_gdbarch_init): Remove check for
13301 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13302
13303 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13304
13305 * corelow.c (get_core_register_section): Check for regset
13306 existence before checking for REGSET_VARIABLE_SIZE.
13307
13308 2017-01-26 Yao Qi <yao.qi@linaro.org>
13309 Pedro Alves <palves@redhat.com>
13310
13311 PR gdb/20939
13312 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13313 call memory_error, save memaddr instead.
13314 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13315 negative, cal memory_error.
13316 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13317
13318 2017-01-26 Yao Qi <yao.qi@linaro.org>
13319
13320 * disasm-selftests.c (memory_error_test): New function.
13321 (_initialize_disasm_selftests): Register memory_error_test.
13322
13323 2017-01-26 Yao Qi <yao.qi@linaro.org>
13324
13325 * Makefile.in (SFILES): Add disasm-selftests.c and
13326 selftest-arch.c.
13327 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13328 * disasm-selftests.c: New file.
13329 * selftest-arch.c: New file.
13330 * selftest-arch.h: New file.
13331
13332 2017-01-26 Yao Qi <yao.qi@linaro.org>
13333
13334 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13335 to bfd_arch_mep. Don't return 0 if section is not
13336 found. Call print_insn_mep.
13337
13338 2017-01-26 Pedro Alves <palves@redhat.com>
13339 Yao Qi <yao.qi@linaro.org>
13340
13341 * arm-tdep.c: Include "disasm.h".
13342 (gdb_print_insn_arm): Update code to get gdbarch.
13343 * disasm.c (dis_asm_read_memory): Change it to
13344 gdb_disassembler::dis_asm_read_memory.
13345 (dis_asm_memory_error): Likewise.
13346 (dis_asm_print_address): Likewise.
13347 (gdb_pretty_print_insn): Change it to
13348 gdb_disassembler::pretty_print_insn.
13349 (dump_insns): Add one argument gdb_disassemlber. All
13350 callers updated.
13351 (do_mixed_source_and_assembly_deprecated): Likewise.
13352 (do_mixed_source_and_assembly): Likewise.
13353 (do_assembly_only): Likewise.
13354 (gdb_disassembler::gdb_disassembler): New.
13355 (gdb_disassembler::print_insn): New.
13356 * disasm.h (class gdb_disassembler): New.
13357 (gdb_pretty_print_insn): Remove declaration.
13358 (gdb_disassemble_info): Likewise.
13359 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13360 (gdbscm_disasm_read_memory_worker): Update.
13361 (gdbscm_disasm_read_memory): Update.
13362 (gdbscm_disasm_memory_error): Remove.
13363 (gdbscm_disasm_print_address): Remove.
13364 (gdbscm_disassembler::gdbscm_disassembler): New.
13365 (gdbscm_print_insn_from_port): Update.
13366 * mips-tdep.c: Include disasm.h.
13367 (gdb_print_insn_mips): Update code to get gdbarch.
13368 * record-btrace.c (btrace_insn_history): Update.
13369 * spu-tdep.c: Include disasm.h.
13370 (struct spu_dis_asm_data): Remove.
13371 (struct spu_dis_asm_info): New.
13372 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13373 SPU id.
13374 (gdb_print_insn_spu): Cast disassemble_info to
13375 spu_dis_asm_info.
13376
13377 2017-01-26 Yao Qi <yao.qi@linaro.org>
13378
13379 * disasm.c (do_ui_file_delete): Delete.
13380 (gdb_insn_length): Move code creating stream to ...
13381 * utils.c (null_stream): ... here. New function.
13382 * utils.h (null_stream): Declare.
13383
13384 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13385
13386 * python/py-inferior.c (find_thread_object): Return directly
13387 from the loop. Remove "found" variable.
13388
13389 2017-01-21 Joel Brobecker <brobecker@adacore.com>
13390
13391 GDB 7.12.1 released.
13392
13393 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13394
13395 * python/py-function.c (fnpy_call): Reorder declarations to have
13396 the gdbpy_enter object declared first.
13397 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13398
13399 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13400
13401 PR python/21068
13402 * python/python-internal.h (PyMem_RawMalloc): Define for
13403 Python < 3.4.
13404 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13405 PyMem_RawMalloc instead of PyMem_Malloc.
13406
13407 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13408 Luis Machado <lgustavo@codesourcery.com>
13409
13410 * NEWS (New commands): Mention flash-erase.
13411 (New MI commands): Mention target-flash-erase.
13412 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13413 command.
13414 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13415 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13416 * target.c (flash_erase_command): New function.
13417 (initialize_targets): Add new flash-erase command.
13418 * target.h (flash_erase_command): New declaration.
13419
13420 2017-01-20 Joel Brobecker <brobecker@adacore.com>
13421
13422 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13423 HAVE_SYS_PROCFS_H is defined.
13424
13425 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13426
13427 * remote.c (struct cached_reg): Change data into a pointer.
13428 * (stop_reply_dtr): Free data pointers before deleting vector.
13429 (process_stop_reply): Likewise.
13430 (remote_parse_stop_reply): Allocate space for data
13431
13432 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13433
13434 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13435 MAX_REGISTER_SIZE.
13436 (amd64_pseudo_register_read_value): Likewise.
13437 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13438 (store_register_using_P): Likewise.
13439 * regcache.c (regcache_xfer_part): Likewise.
13440
13441 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13442
13443 Split real and pseudo registers.
13444 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13445 (sparc32_pseudo_regnum): New enum.
13446 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13447 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13448 (SPARC32_CP0_REGISTERS): New macro.
13449 (sparc32_pseudo_register_name): New function.
13450 (sparc32_register_name): Use sparc32_pseudo_register_name.
13451 (sparc32_pseudo_register_type): New function.
13452 (sparc32_register_type): Use sparc32_pseudo_register_type.
13453 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13454 pseudo register numbers.
13455 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13456 (SPARC64_CP0_REGISTERS): New macro.
13457 (sparc64_pseudo_register_name): New function.
13458 (sparc64_register_name): Use sparc64_pseudo_register_name.
13459 (sparc64_pseudo_register_type): New function.
13460 (sparc64_register_type): Use sparc64_pseudo_register_type.
13461 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13462 pseudo register numbers.
13463 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13464 sparc64_store_arguments): Handle pseudo register numbers.
13465
13466 2017-01-13 Yao Qi <yao.qi@linaro.org>
13467
13468 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13469 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13470 output.
13471 (getpkt_or_notif_sane_1): Likewise.
13472
13473 2017-01-13 Yao Qi <yao.qi@linaro.org>
13474
13475 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13476 of CC. Pass "-x c++-header" instead of "-x c".
13477
13478 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13479
13480 * remote.c (remote_can_async_p): Update comment.
13481
13482 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13483
13484 * linux-nat.c (linux_nat_can_async_p): Update comment.
13485
13486 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13487
13488 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13489
13490 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13491
13492 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13493
13494 2017-01-10 Tom Tromey <tom@tromey.com>
13495
13496 * python/py-type.c (typy_legacy_template_argument): Update.
13497 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13498 ~demangle_parse_info): Declare new members.
13499 (cp_demangled_name_to_comp): Return unique_ptr.
13500 (cp_demangled_name_parse_free)
13501 (make_cleanup_cp_demangled_name_parse_free)
13502 (cp_new_demangle_parse_info): Remove.
13503 * cp-support.c (do_demangled_name_parse_free_cleanup)
13504 (make_cleanup_cp_demangled_name_parse_free): Remove.
13505 (inspect_type, cp_canonicalize_string_full)
13506 (cp_canonicalize_string): Update.
13507 (mangled_name_to_comp): Change return type.
13508 (cp_class_name_from_physname, method_name_from_physname)
13509 (cp_func_name, cp_remove_params): Update.
13510 * cp-name-parser.y (demangle_parse_info): New constructor, from
13511 cp_new_demangle_parse_info.
13512 (~demangle_parse_info): New destructor, from
13513 cp_demangled_name_parse_free.
13514 (cp_merge_demangle_parse_infos): Update.
13515 (cp_demangled_name_to_comp): Change return type.
13516
13517 2017-01-10 Tom Tromey <tom@tromey.com>
13518
13519 * top.c (prevent_dont_repeat): Change return type.
13520 * python/python.c (execute_gdb_command): Use std::string.
13521 Update.
13522 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13523 * command.h (prevent_dont_repeat): Change return type.
13524 * breakpoint.c (bpstat_do_actions_1): Update.
13525
13526 2017-01-10 Tom Tromey <tom@tromey.com>
13527
13528 * value.h (scoped_value_mark::~scoped_value_mark): Call
13529 free_to_mark.
13530 (scoped_value_mark::free_to_mark): New method.
13531 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13532 scoped_value_mark.
13533
13534 2017-01-10 Tom Tromey <tom@tromey.com>
13535
13536 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13537 (valpy_reference_value, valpy_const_value, valpy_get_address)
13538 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13539 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13540 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13541 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13542 scoped_value_mark.
13543 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13544 * value.h (scoped_value_mark): New class.
13545
13546 2017-01-10 Tom Tromey <tom@tromey.com>
13547
13548 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13549 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13550 * psymtab.c (discard_psymtabs_upto): Remove.
13551 (make_cleanup_discard_psymtabs): Remove.
13552 (struct psymtab_state): Remove.
13553
13554 2017-01-10 Tom Tromey <tom@tromey.com>
13555
13556 * record-full.c (record_full_save_cleanups): Remove.
13557 (record_full_save): Use gdb::unlinker.
13558 * gcore.c (do_bfd_delete_cleanup): Remove.
13559 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13560 cleanups.
13561 * dwarf2read.c (unlink_if_set): Remove.
13562 (write_psymtabs_to_index): Use gdb::unlinker.
13563 * common/gdb_unlinker.h: New file.
13564
13565 2017-01-10 Tom Tromey <tom@tromey.com>
13566
13567 * windows-tdep.c (windows_xfer_shared_library): Update.
13568 * windows-nat.c (windows_make_so): Update.
13569 * utils.h (make_cleanup_bfd_unref): Remove.
13570 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13571 * symfile.h (symfile_bfd_open)
13572 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13573 * symfile.c (read_symbols, symbol_file_add)
13574 (separate_debug_file_exists): Update.
13575 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13576 (generic_load, reread_symbols): Update.
13577 * symfile-mem.c (symbol_file_add_from_memory): Update.
13578 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13579 (spu_symbol_file_add_from_memory): Update.
13580 * solist.h (struct target_so_ops) <bfd_open>: Return
13581 gdb_bfd_ref_ptr.
13582 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13583 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13584 gdb_bfd_ref_ptr.
13585 (solib_map_sections, reload_shared_libraries_1): Update.
13586 * solib-svr4.c (enable_break): Update.
13587 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13588 * solib-frv.c (enable_break2): Update.
13589 * solib-dsbt.c (enable_break): Update.
13590 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13591 gdb_bfd_ref_ptr.
13592 (darwin_solib_get_all_image_info_addr_at_init): Update.
13593 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13594 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13595 * record-full.c (record_full_save): Update.
13596 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13597 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13598 * minidebug.c (find_separate_debug_file_in_section): Return
13599 gdb_bfd_ref_ptr.
13600 * machoread.c (macho_add_oso_symfile): Change abfd to
13601 gdb_bfd_ref_ptr.
13602 (macho_symfile_read_all_oso): Update.
13603 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13604 (macho_symfile_read): Update.
13605 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13606 (jit_bfd_try_read_symtab): Update.
13607 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13608 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13609 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13610 gdb_bfd_ref_ptr.
13611 (gdb_bfd_ref_policy): New struct.
13612 (gdb_bfd_ref_ptr): New typedef.
13613 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13614 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13615 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13616 gdb_bfd_ref_ptr.
13617 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13618 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13619 (gcore_command): Update.
13620 * exec.c (exec_file_attach): Update.
13621 * elfread.c (elf_symfile_read): Update.
13622 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13623 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13624 (open_and_init_dwo_file): Update.
13625 (open_dwp_file): Return gdb_bfd_ref_ptr.
13626 (open_and_init_dwp_file): Update.
13627 * corelow.c (core_open): Update.
13628 * compile/compile-object-load.c (compile_object_load): Update.
13629 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13630 * coffread.c (coff_symfile_read): Update.
13631 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13632 gdb_bfd_ref_ptr. Rename.
13633 (dump_bfd_file, restore_command): Update.
13634 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13635 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13636 (find_separate_debug_file_by_buildid): Update.
13637
13638 2017-01-10 Tom Tromey <tom@tromey.com>
13639
13640 * common/gdb_ref_ptr.h: New file.
13641 * python/py-ref.h (struct gdbpy_ref_policy): New.
13642 (gdbpy_ref): Now a typedef.
13643
13644 2017-01-10 Tom Tromey <tom@tromey.com>
13645
13646 * utils.h (make_cleanup_htab_delete): Don't declare.
13647 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13648 Remove.
13649 * linespec.c (decode_compound_collector): Add constructor,
13650 destructor.
13651 (lookup_prefix_sym): Remove cleanup.
13652 (symtab_collector): Add constructor, destructor.
13653 (collect_symtabs_from_filename): Remove cleanup.
13654 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13655 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13656 Use htab_up.
13657 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13658 * dwarf2read.c (dw2_expand_symtabs_matching)
13659 (dw2_map_symbol_filenames, dwarf_decode_macros)
13660 (write_psymtabs_to_index): Use htab_up.
13661 * dwarf2loc.c (func_verify_no_selftailcall)
13662 (call_site_find_chain_1, func_verify_no_selftailcall)
13663 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13664 std::vector, gdb::unique_xmalloc_ptr.
13665 (call_sitep): Remove typedef.
13666 (dwarf2_locexpr_baton_eval): Remove unused variable.
13667
13668 2017-01-10 Tom Tromey <tom@tromey.com>
13669
13670 * python/python-internal.h (make_cleanup_py_decref)
13671 (make_cleanup_py_xdecref): Don't declare.
13672 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13673 (py_xdecref, make_cleanup_py_xdecref): Remove.
13674
13675 2017-01-10 Tom Tromey <tom@tromey.com>
13676
13677 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13678 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13679
13680 2017-01-10 Tom Tromey <tom@tromey.com>
13681
13682 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13683
13684 2017-01-10 Tom Tromey <tom@tromey.com>
13685
13686 * python/py-utils.c (unicode_to_encoded_string)
13687 (python_string_to_target_string)
13688 (python_string_to_target_python_string)
13689 (python_string_to_host_string, gdbpy_obj_to_string)
13690 (get_addr_from_python): Use gdbpy_ref.
13691
13692 2017-01-10 Tom Tromey <tom@tromey.com>
13693
13694 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13695 gdbpy_ref.
13696
13697 2017-01-10 Tom Tromey <tom@tromey.com>
13698
13699 * python/python.c (eval_python_command, gdbpy_decode_line)
13700 (gdbpy_run_events, gdbpy_start_type_printers)
13701 (gdbpy_apply_type_printers): Use gdbpy_ref.
13702
13703 2017-01-10 Tom Tromey <tom@tromey.com>
13704
13705 * python/py-param.c (get_doc_string, compute_enum_values): Use
13706 gdbpy_ref.
13707
13708 2017-01-10 Tom Tromey <tom@tromey.com>
13709
13710 * python/py-inferior.c (find_thread_object, build_inferior_list):
13711 Use gdbpy_ref.
13712
13713 2017-01-10 Tom Tromey <tom@tromey.com>
13714
13715 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13716
13717 2017-01-10 Tom Tromey <tom@tromey.com>
13718
13719 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13720 gdbpy_ref.
13721
13722 2017-01-10 Tom Tromey <tom@tromey.com>
13723
13724 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13725 extra incref.
13726 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13727 Use gdbpy_ref.
13728
13729 2017-01-10 Tom Tromey <tom@tromey.com>
13730
13731 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13732 gdbpy_ref.
13733
13734 2017-01-10 Tom Tromey <tom@tromey.com>
13735
13736 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13737 decref results of PyArg_ParseTupleAndKeywords.
13738
13739 2017-01-10 Tom Tromey <tom@tromey.com>
13740
13741 * python/python.c (python_run_simple_file): Use
13742 unique_xmalloc_ptr, gdbpy_ref.
13743
13744 2017-01-10 Tom Tromey <tom@tromey.com>
13745
13746 * python/py-prettyprint.c (print_stack_unless_memory_error)
13747 (print_string_repr, print_children): Use gdbpy_ref.
13748 (dummy_python_frame): New class.
13749 (dummy_python_frame::dummy_python_frame): Rename from
13750 push_dummy_python_frame.
13751 (py_restore_tstate): Remove.
13752
13753 2017-01-10 Tom Tromey <tom@tromey.com>
13754
13755 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13756
13757 2017-01-10 Tom Tromey <tom@tromey.com>
13758
13759 * python/python.c (ensure_python_env, restore_python_env):
13760 Remove.
13761 * python/python-internal.h (ensure_python_env): Don't declare.
13762 * varobj.h (varobj_ensure_python_env): Don't declare.
13763 * varobj.c (varobj_ensure_python_env): Remove.
13764
13765 2017-01-10 Tom Tromey <tom@tromey.com>
13766
13767 * varobj.c (varobj_value_get_print_value): Use
13768 gdbpy_enter_varobj.
13769
13770 2017-01-10 Tom Tromey <tom@tromey.com>
13771
13772 * python/py-prettyprint.c (print_string_repr, print_children):
13773 Update.
13774 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13775 of "encoding".
13776 * varobj.c (varobj_value_get_print_value): Update.
13777 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13778
13779 2017-01-10 Tom Tromey <tom@tromey.com>
13780
13781 * varobj.c (varobj_get_display_hint)
13782 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13783 (varobj_set_visualizer, free_variable): Use
13784 gdbpy_enter_varobj.
13785
13786 2017-01-10 Tom Tromey <tom@tromey.com>
13787
13788 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13789 (do_finish_initialization): New function. Use gdbpy_ref.
13790 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13791 do_finish_initialization.
13792
13793 2017-01-10 Tom Tromey <tom@tromey.com>
13794
13795 * python/py-param.c (get_set_value, get_show_value): Use
13796 gdbpy_enter, gdbpy_ref.
13797
13798 2017-01-10 Tom Tromey <tom@tromey.com>
13799
13800 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13801
13802 2017-01-10 Tom Tromey <tom@tromey.com>
13803
13804 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13805
13806 2017-01-10 Tom Tromey <tom@tromey.com>
13807
13808 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13809 Use gdbpy_enter_varobj.
13810
13811 2017-01-10 Tom Tromey <tom@tromey.com>
13812
13813 * varobj.c (gdbpy_enter_varobj): New constructor.
13814 * python/python-internal.h (gdbpy_enter_varobj): New class.
13815 * python/py-varobj.c (py_varobj_get_iterator): Use
13816 gdbpy_enter_varobj.
13817
13818 2017-01-10 Tom Tromey <tom@tromey.com>
13819
13820 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13821 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13822 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13823 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13824 unique_xmalloc_ptr.
13825 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13826
13827 2017-01-10 Tom Tromey <tom@tromey.com>
13828
13829 * python/py-xmethods.c (invoke_match_method): Use
13830 gdbpy_ref.
13831
13832 2017-01-10 Tom Tromey <tom@tromey.com>
13833
13834 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13835 gdbpy_enter, gdbpy_ref.
13836
13837 2017-01-10 Tom Tromey <tom@tromey.com>
13838
13839 * python/python.c (python_interactive_command): Use gdbpy_enter.
13840
13841 2017-01-10 Tom Tromey <tom@tromey.com>
13842
13843 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13844 gdbpy_ref.
13845
13846 2017-01-10 Tom Tromey <tom@tromey.com>
13847
13848 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13849 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13850
13851 2017-01-10 Tom Tromey <tom@tromey.com>
13852
13853 * utils.h (htab_deleter): New struct.
13854 (htab_up): New typedef.
13855 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13856 gdbpy_enter, gdbpy_ref, htab_up.
13857
13858 2017-01-10 Tom Tromey <tom@tromey.com>
13859
13860 * python/py-unwind.c (pending_frame_invalidate): Remove.
13861 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13862
13863 2017-01-10 Tom Tromey <tom@tromey.com>
13864
13865 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13866 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13867
13868 2017-01-10 Tom Tromey <tom@tromey.com>
13869
13870 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13871
13872 2017-01-10 Tom Tromey <tom@tromey.com>
13873
13874 * python/python.c (gdbpy_eval_from_control_command)
13875 (gdbpy_source_script, gdbpy_run_events)
13876 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13877 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13878 gdbpy_enter.
13879
13880 2017-01-10 Tom Tromey <tom@tromey.com>
13881
13882 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13883
13884 2017-01-10 Tom Tromey <tom@tromey.com>
13885
13886 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13887
13888 2017-01-10 Tom Tromey <tom@tromey.com>
13889
13890 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13891 (python_on_inferior_call_pre, python_on_inferior_call_post)
13892 (python_on_memory_change, python_on_register_change)
13893 (python_inferior_exit, python_new_objfile, add_thread_object)
13894 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13895
13896 2017-01-10 Tom Tromey <tom@tromey.com>
13897
13898 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13899 (bpfinishpy_handle_exit): Use gdbpy_enter.
13900
13901 2017-01-10 Tom Tromey <tom@tromey.com>
13902
13903 * python/py-cmd.c (cmdpy_destroyer)
13904 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13905 gdbpy_enter.
13906
13907 2017-01-10 Tom Tromey <tom@tromey.com>
13908
13909 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13910 gdbpy_enter.
13911 (gdbpy_breakpoint_has_cond): Likewise.
13912
13913 2017-01-10 Tom Tromey <tom@tromey.com>
13914
13915 * python/python.c (gdbpy_enter): New constructor.
13916 (~gdbpy_enter): New destructor.
13917 (restore_python_env, ensure_python_env): Rewrite.
13918 * python/python-internal.h (gdbpy_enter): New class.
13919
13920 2017-01-10 Tom Tromey <tom@tromey.com>
13921
13922 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13923
13924 2017-01-10 Tom Tromey <tom@tromey.com>
13925
13926 * python/py-value.c (value_has_field, get_field_flag)
13927 (get_field_type, valpy_getitem, convert_value_from_python): Use
13928 gdbpy_ref.
13929
13930 2017-01-10 Tom Tromey <tom@tromey.com>
13931
13932 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13933 gdbpy_ref.
13934
13935 2017-01-10 Tom Tromey <tom@tromey.com>
13936
13937 * python/py-prettyprint.c (search_pp_list)
13938 (find_pretty_printer_from_objfiles)
13939 (find_pretty_printer_from_progspace)
13940 (find_pretty_printer_from_gdb, find_pretty_printer)
13941 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13942 gdbpy_ref.
13943
13944 2017-01-10 Tom Tromey <tom@tromey.com>
13945
13946 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13947
13948 2017-01-10 Tom Tromey <tom@tromey.com>
13949
13950 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13951 (ltpy_get_all_source_lines): Use gdbpy_ref.
13952
13953 2017-01-10 Tom Tromey <tom@tromey.com>
13954
13955 * python/py-framefilter.c (extract_sym, extract_value)
13956 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13957 gdbpy_ref.
13958
13959 2017-01-10 Tom Tromey <tom@tromey.com>
13960
13961 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13962
13963 2017-01-10 Tom Tromey <tom@tromey.com>
13964
13965 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13966
13967 2017-01-10 Tom Tromey <tom@tromey.com>
13968
13969 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13970 gdbpy_ref.
13971
13972 2017-01-10 Tom Tromey <tom@tromey.com>
13973
13974 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13975
13976 2017-01-10 Tom Tromey <tom@tromey.com>
13977
13978 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13979 (typy_range): Use gdbpy_ref.
13980
13981 2017-01-10 Tom Tromey <tom@tromey.com>
13982
13983 * python/py-threadevent.c (create_thread_event_object): Use
13984 gdbpy_ref.
13985 * python/py-stopevent.c (create_stop_event_object): Simplify.
13986 (emit_stop_event): Use gdbpy_ref.
13987 * python/py-signalevent.c (create_signal_event_object): Use
13988 gdbpy_ref.
13989 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13990 (emit_new_objfile_event, create_clear_objfiles_event_object)
13991 (emit_clear_objfiles_event): Use gdbpy_ref.
13992 * python/py-infevents.c (create_inferior_call_event_object)
13993 (create_register_changed_event_object)
13994 (create_memory_changed_event_object, emit_inferior_call_event)
13995 (emit_memory_changed_event, emit_register_changed_event): Use
13996 gdbpy_ref.
13997 * python/py-exitedevent.c (create_exited_event_object)
13998 (emit_exited_event): Use gdbpy_ref.
13999 * python/py-event.h (evpy_emit_event): Remove
14000 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14001 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14002 * python/py-continueevent.c (emit_continue_event): Use
14003 gdbpy_ref.
14004 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14005 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14006 gdbpy_ref.
14007 * python/py-bpevent.c (create_breakpoint_event_object): Use
14008 gdbpy_ref.
14009
14010 2017-01-10 Tom Tromey <tom@tromey.com>
14011
14012 * python/py-ref.h: New file.
14013
14014 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14015
14016 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14017 void.
14018 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14019 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14020 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14021 * ui-out.c (ui_out::redirect): Likewise.
14022 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14023 * cli/cli-logging.c (set_logging_redirect): Update call site of
14024 ui_out::redirect.
14025 (handle_redirections): Likewise.
14026 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14027 * top.c (execute_command_to_string): Likewise.
14028 * utils.c (do_ui_out_redirect_pop): Likewise.
14029
14030 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14031
14032 * stack.c (_initialize_stack): Update "frame" command help message.
14033
14034 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14035
14036 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14037
14038 2017-01-06 Yao Qi <yao.qi@linaro.org>
14039
14040 * x86-linux-nat.h: Include gdb_proc_service.h.
14041
14042 2017-01-06 Yao Qi <yao.qi@linaro.org>
14043
14044 * ser-base.h: Include serial.h.
14045
14046 2017-01-06 Yao Qi <yao.qi@linaro.org>
14047
14048 * ppc-linux-tdep.h: Include ppc-tdep.h.
14049
14050 2017-01-06 Yao Qi <yao.qi@linaro.org>
14051
14052 * nat/amd64-linux-siginfo.h: Include signal.h.
14053
14054 2017-01-06 Yao Qi <yao.qi@linaro.org>
14055
14056 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14057
14058 2017-01-06 Yao Qi <yao.qi@linaro.org>
14059
14060 * mi/mi-parse.h: Include mi-cmds.h.
14061
14062 2017-01-06 Yao Qi <yao.qi@linaro.org>
14063
14064 * inf-loop.c: Don't include "target.h".
14065 * inf-loop.h: Include it here.
14066
14067 2017-01-06 Yao Qi <yao.qi@linaro.org>
14068
14069 * dfp.h: Include "dboulest.h" and "expression.h".
14070
14071 2017-01-06 Yao Qi <yao.qi@linaro.org>
14072
14073 * ax-gdb.h: Include "ax.h".
14074
14075 2017-01-06 Yao Qi <yao.qi@linaro.org>
14076
14077 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14078 with nat/gdb_ptrace.h.
14079
14080 2017-01-05 Yao Qi <yao.qi@linaro.org>
14081
14082 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14083 new line.
14084 (mips64_fbsd_sigframe_init): Likewise.
14085
14086 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14087
14088 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14089 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14090
14091 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14092
14093 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14094 * NEWS: Mention new FreeBSD/mips native configuration.
14095 * config/mips/fbsd.mh: New file.
14096 * configure.host: Add mips*-*-freebsd*.
14097 * mips-fbsd-nat.c: New file.
14098
14099 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14100
14101 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14102 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14103 * NEWS: Mention new FreeBSD/mips target.
14104 * configure.tgt: Add mips*-*-freebsd*.
14105 * mips-fbsd-tdep.c: New file.
14106 * mips-fbsd-tdep.h: New file.
14107
14108 2017-01-04 Yao Qi <yao.qi@linaro.org>
14109
14110 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14111 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14112
14113 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14114
14115 Update copyright year range in all GDB files.
14116
14117 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14118
14119 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14120
14121 For older changes see ChangeLog-2016.
14122 \f
14123 Local Variables:
14124 mode: change-log
14125 left-margin: 8
14126 fill-column: 74
14127 version-control: never
14128 coding: utf-8
14129 End:
This page took 0.363694 seconds and 4 git commands to generate.