Allocate breakpoint_objfile_data with new
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
43dce439
SM
12017-10-27 Simon Marchi <simon.marchi@ericsson.com>
2
3 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
5 with new.
6 (free_breakpoint_probes): Rename to ...
7 (free_breakpoint_objfile_data): ... this, and call delete on
8 bp_objfile_data..
9
6a1b9516
SM
102017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
11
12 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
13 (loaded_script_ptr): Remove typedef.
14 (DEF_VEC_P (loaded_script_ptr)): Remove.
15 (struct collect_matching_scripts_data): Add constructor.
16 <scripts_p>: Change type to (pointer to) std::vector.
17 (collect_matching_scripts_data): Adjust.
18 (sort_scripts_by_name): Make suitable for std::sort.
19 (print_scripts): Don't sort vector, adjust to std::vector.
20 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
21
593e3209
SM
222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
23
24 * symfile.c (filename_language): Make struct, not typedef. Add
25 constructor.
26 <ext>: Change type to std::string.
27 (DEF_VEC_O (filename_language)): Remove.
28 (filename_language_table): Change type to std::vector.
29 (add_filename_language): Adjust.
30 (set_ext_lang_command): Adjust.
31 (info_ext_lang_command): Adjust.
32 (deduce_language_from_filename): Adjust.
33 (class scoped_restore_filename_language_table): Remove.
34 (test_filename_language): Use scoped_restore.
35 (test_set_ext_lang_command): Use scoped_restore, adjust to
36 std::vector change.
37
32fa66eb
SM
382017-10-27 Simon Marchi <simon.marchi@ericsson.com>
39
40 * symfile.c: Include selftest.h.
41 (class scoped_restore_filename_language_table): New.
42 (test_filename_language): New test.
43 (test_set_ext_lang_command): New test.
44 (_initialize_symfile): Register tests.
45
4a27f119
KS
462017-10-27 Keith Seitz <keiths@redhat.com>
47
48 * breakpoint.c (print_breakpoint_location): Use the symbol saved
49 in the bp_location, falling back to find_pc_sect_function when
50 needed.
51 (add_location_to_breakpoint): Save sal->symbol.
52 * breakpoint.h (struct bp_location) <symbol>: New field.
53 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
54 * symtab.h (struct symtab_and_line) <symbol>: New field.
55
a43f3893
PF
562017-10-26 Patrick Frants <osscontribute@gmail.com>
57
7453e6b2 58 PR gdb/13669
a43f3893
PF
59 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
60 to rewind obstack.
61
23cc4e1b
PA
622017-10-26 Pedro Alves <palves@redhat.com>
63
64 * remote.c (remote_async_terminal_ours_p): Delete.
65 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
66 Remove references to 'remote_async_terminal_ours_p'.
67
6abc18bb
YQ
682017-10-26 Yao Qi <yao.qi@linaro.org>
69
70 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
71
bd522513
YQ
722017-10-26 Yao Qi <yao.qi@linaro.org>
73
74 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
75 aspace const.
76 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
77 Likewise.
78 * breakpoint.c (bpstat_check_location): Remove cast.
79 (breakpoint_hit_catch_fork): Make aspce const.
80 (breakpoint_hit_catch_solib): Likewise.
81 (breakpoint_hit_catch_exec): Likewise.
82 (breakpoint_hit_ranged_breakpoint): Likewise.
83 (breakpoint_hit_watchpoint): Likewise.
84 (base_breakpoint_breakpoint_hit): Likewise.
85 (bkpt_breakpoint_hit): Likewise.
86 (dprintf_breakpoint_hit): Likewise.
87 (tracepoint_breakpoint_hit): Likewise.
88 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
89
accd0bcd
YQ
902017-10-26 Yao Qi <yao.qi@linaro.org>
91
92 * breakpoint.c (breakpoint_location_address_match): Change
93 "struct address_space *" to "const address_space".
94 (breakpoint_location_address_range_overlap): Likewise.
95 (breakpoint_here_p): Likewise.
96 (breakpoint_in_range_p): Likewise.
97 (moribund_breakpoint_here_p): Likewise.
98 (bp_location_inserted_here_p): Likewise.
99 (software_breakpoint_inserted_here_p): Likewise.
100 (hardware_breakpoint_inserted_here_p): Likewise.
101 (hardware_watchpoint_inserted_in_range): Likewise.
102 (bpstat_check_location): Likewise.
103 (bpstat_stop_status): Likewise.
104 (breakpoint_address_match): Likewise.
105 (breakpoint_address_match_range): Likewise.
106 (breakpoint_location_address_match): Likewise.
107 (breakpoint_location_address_range_overlap): Likewise.
108 (insert_single_step_breakpoint): Likewise.
109 (breakpoint_has_location_inserted_here): Likewise.
110 (single_step_breakpoint_inserted_here_p): Likewise.
111 (pc_at_non_inline_function): Likewise.
112 * breakpoint.h (bpstat_stop_status): Update declaration.
113 (breakpoint_here_p): Likewise.
114 (breakpoint_in_range_p): Likewise.
115 (moribund_breakpoint_here_p): Likewise.
116 (breakpoint_inserted_here_p): Likewise.
117 (software_breakpoint_inserted_here_p): Likewise.
118 (hardware_breakpoint_inserted_here_p): Likewise.
119 (breakpoint_has_location_inserted_here): Likewise.
120 (single_step_breakpoint_inserted_here_p): Likewise.
121 (hardware_watchpoint_inserted_in_range): Likewise.
122 (breakpoint_address_match): Likewise.
123 (insert_single_step_breakpoint): Likewise.
124 (pc_at_non_inline_function): Likewise.
125 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
126 * record.c (record_check_stopped_by_breakpoint): Likewise.
127 * record.h (record_check_stopped_by_breakpoint): Likewise.
128 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
129
ac7936df
YQ
1302017-10-25 Yao Qi <yao.qi@linaro.org>
131
132 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
133 regcache->arch () instead get_regcache_arch.
134 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
135 Likewise.
136 (aarch64_fbsd_store_inferior_registers): Likewise.
137 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
138 (store_gregs_to_thread): Likewise.
139 (fetch_fpregs_from_thread): Likewise.
140 (store_fpregs_to_thread): Likewise.
141 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
142 (aarch64_store_return_value): Likewise.
143 (aarch64_software_single_step): Likewise.
144 * aix-thread.c (aix_thread_wait): Likewise.
145 (supply_reg32): Likewise.
146 (supply_sprs64): Likewise.
147 (supply_sprs32): Likewise.
148 (fill_gprs64): Likewise.
149 (fill_gprs32): Likewise.
150 (fill_sprs64): Likewise.
151 (fill_sprs32): Likewise.
152 (store_regs_user_thread): Likewise.
153 (store_regs_kernel_thread): Likewise.
154 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
155 (alphabsd_store_inferior_registers): Likewise.
156 * alpha-tdep.c (alpha_extract_return_value): Likewise.
157 (alpha_store_return_value): Likewise.
158 (alpha_deal_with_atomic_sequence): Likewise.
159 (alpha_next_pc): Likewise.
160 (alpha_software_single_step): Likewise.
161 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
162 (amd64bsd_store_inferior_registers): Likewise.
163 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
164 Likewise.
165 (amd64_linux_store_inferior_registers): Likewise.
166 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
167 (amd64_collect_native_gregset): Likewise.
168 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
169 (amd64obsd_collect_uthread): Likewise.
170 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
171 (amd64_collect_fpregset): Likewise.
172 (amd64_supply_fxsave): Likewise.
173 (amd64_supply_xsave): Likewise.
174 (amd64_collect_fxsave): Likewise.
175 (amd64_collect_xsave): Likewise.
176 * arc-tdep.c (arc_write_pc): Likewise.
177 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
178 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
179 (arm_fbsd_store_inferior_registers): Likewise.
180 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
181 (store_vfp_regs): Likewise.
182 (arm_linux_fetch_inferior_registers): Likewise.
183 (arm_linux_store_inferior_registers): Likewise.
184 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
185 (arm_linux_sigreturn_next_pc): Likewise.
186 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
187 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
188 (fetch_register): Likewise.
189 (store_register): Likewise.
190 * arm-tdep.c (arm_is_thumb): Likewise.
191 (displaced_in_arm_mode): Likewise.
192 (bx_write_pc): Likewise.
193 (arm_get_next_pcs_addr_bits_remove): Likewise.
194 (arm_software_single_step): Likewise.
195 (arm_extract_return_value): Likewise.
196 (arm_store_return_value): Likewise.
197 (arm_write_pc): Likewise.
198 * bfin-tdep.c (bfin_extract_return_value): Likewise.
199 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
200 (bsd_uthread_store_registers): Likewise.
201 * core-regset.c (fetch_core_registers): Likewise.
202 * corelow.c (get_core_registers): Likewise.
203 * cris-tdep.c (cris_store_return_value): Likewise.
204 (cris_extract_return_value): Likewise.
205 (find_step_target): Likewise.
206 (find_step_target): Likewise.
207 (cris_software_single_step): Likewise.
208 * ctf.c (ctf_fetch_registers): Likewise.
209 * darwin-nat.c (cancel_breakpoint): Likewise.
210 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
211 * frv-tdep.c (frv_extract_return_value): Likewise.
212 * ft32-tdep.c (ft32_store_return_value): Likewise.
213 (ft32_extract_return_value): Likewise.
214 * go32-nat.c (fetch_register): Likewise.
215 (go32_fetch_registers): Likewise.
216 (go32_store_registers): Likewise.
217 (store_register): Likewise.
218 * h8300-tdep.c (h8300_extract_return_value): Likewise.
219 (h8300_store_return_value): Likewise.
220 * hppa-linux-nat.c (fetch_register): Likewise.
221 (store_register): Likewise.
222 (hppa_linux_fetch_inferior_registers): Likewise.
223 (hppa_linux_store_inferior_registers): Likewise.
224 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
225 (i386_darwin_store_inferior_registers): Likewise.
226 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
227 (gnu_store_registers): Likewise.
228 * i386-linux-nat.c (fetch_register): Likewise.
229 (store_register): Likewise.
230 (supply_gregset): Likewise.
231 (fill_gregset): Likewise.
232 (i386_linux_fetch_inferior_registers): Likewise.
233 (i386_linux_store_inferior_registers): Likewise.
234 (i386_linux_resume): Likewise.
235 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
236 Likewise.
237 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
238 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
239 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
240 (i386obsd_collect_uthread): Likewise.
241 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
242 (i386_supply_gregset): Likewise.
243 (i386_collect_gregset): Likewise.
244 (i386_supply_fpregset): Likewise.
245 (i386_collect_fpregset): Likewise.
246 (i386_mpx_bd_base): Likewise.
247 * i386-v4-nat.c (supply_fpregset): Likewise.
248 (fill_fpregset): Likewise.
249 * i387-tdep.c (i387_supply_fsave): Likewise.
250 (i387_collect_fsave): Likewise.
251 (i387_supply_fxsave): Likewise.
252 (i387_collect_fxsave): Likewise.
253 (i387_supply_xsave): Likewise.
254 (i387_collect_xsave): Likewise.
255 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
256 (ia64_linux_store_registers): Likewise.
257 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
258 (ia64_extract_return_value): Likewise.
259 (ia64_store_return_value): Likewise.
260 (find_func_descr): Likewise.
261 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
262 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
263 (inf_ptrace_store_registers): Likewise.
264 * infrun.c (use_displaced_stepping): Likewise.
265 (displaced_step_prepare_throw): Likewise.
266 (resume): Likewise.
267 (proceed): Likewise.
268 (do_target_wait): Likewise.
269 (adjust_pc_after_break): Likewise.
270 (handle_inferior_event_1): Likewise.
271 (handle_signal_stop): Likewise.
272 (save_infcall_suspend_state): Likewise.
273 (restore_infcall_suspend_state): Likewise.
274 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
275 * jit.c (jit_frame_prev_register): Likewise.
276 * linux-nat.c (save_stop_reason): Likewise.
277 (linux_nat_wait_1): Likewise.
278 (resume_stopped_resumed_lwps): Likewise.
279 * linux-record.c (record_linux_sockaddr): Likewise.
280 (record_linux_msghdr): Likewise.
281 (record_linux_system_call): Likewise.
282 * linux-tdep.c (linux_collect_thread_registers): Likewise.
283 * lm32-tdep.c (lm32_extract_return_value): Likewise.
284 (lm32_store_return_value): Likewise.
285 * m32c-tdep.c (m32c_read_flg): Likewise.
286 (m32c_pseudo_register_read): Likewise.
287 (m32c_pseudo_register_write): Likewise.
288 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
289 (m32r_linux_collect_gregset): Likewise.
290 * m32r-tdep.c (m32r_store_return_value): Likewise.
291 (m32r_extract_return_value): Likewise.
292 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
293 (m68kbsd_collect_fpregset): Likewise.
294 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
295 * m68k-linux-nat.c (fetch_register): Likewise.
296 (old_fetch_inferior_registers): Likewise.
297 (old_store_inferior_registers): Likewise.
298 (store_regs): Likewise.
299 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
300 (m68k_svr4_store_return_value): Likewise.
301 * m88k-tdep.c (m88k_store_arguments): Likewise.
302 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
303 (mi_cmd_data_write_register_values): Likewise.
304 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
305 (mips_fbsd_store_inferior_registers): Likewise.
306 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
307 (mips_fbsd_supply_gregs): Likewise.
308 (mips_fbsd_collect_fpregs): Likewise.
309 (mips_fbsd_collect_gregs): Likewise.
310 (mips_fbsd_supply_fpregset): Likewise.
311 (mips_fbsd_collect_fpregset): Likewise.
312 (mips_fbsd_supply_gregset): Likewise.
313 (mips_fbsd_collect_gregset): Likewise.
314 * mips-linux-nat.c (supply_gregset): Likewise.
315 (fill_gregset): Likewise.
316 (supply_fpregset): Likewise.
317 (fill_fpregset): Likewise.
318 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
319 (mips_fill_gregset): Likewise.
320 (mips_supply_fpregset): Likewise.
321 (mips_fill_fpregset): Likewise.
322 (mips64_supply_gregset): Likewise.
323 (micromips_linux_sigframe_validate): Likewise.
324 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
325 (mipsnbsd_fetch_inferior_registers): Likewise.
326 (mipsnbsd_store_inferior_registers): Likewise.
327 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
328 (mipsnbsd_supply_gregset): Likewise.
329 (mipsnbsd_iterate_over_regset_sections): Likewise.
330 (mipsnbsd_supply_reg): Likewise.
331 (mipsnbsd_supply_fpreg): Likewise.
332 * mips-tdep.c (mips_in_frame_stub): Likewise.
333 (mips_dummy_id): Likewise.
334 (is_octeon_bbit_op): Likewise.
335 (micromips_bc1_pc): Likewise.
336 (extended_mips16_next_pc): Likewise.
337 (mips16_next_pc): Likewise.
338 (deal_with_atomic_sequence): Likewise.
339 * moxie-tdep.c (moxie_process_readu): Likewise.
340 * nios2-tdep.c (nios2_get_next_pc): Likewise.
341 * nto-procfs.c (procfs_store_registers): Likewise.
342 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
343 (ppcfbsd_store_inferior_registers): Likewise.
344 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
345 (fetch_altivec_register): Likewise.
346 (get_spe_registers): Likewise.
347 (fetch_spe_register): Likewise.
348 (fetch_altivec_registers): Likewise.
349 (fetch_all_gp_regs): Likewise.
350 (fetch_all_fp_regs): Likewise.
351 (store_vsx_register): Likewise.
352 (store_altivec_register): Likewise.
353 (set_spe_registers): Likewise.
354 (store_spe_register): Likewise.
355 (store_altivec_registers): Likewise.
356 (store_all_gp_regs): Likewise.
357 (store_all_fp_regs): Likewise.
358 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
359 (ppc_linux_collect_gregset): Likewise.
360 (ppc_canonicalize_syscall): Likewise.
361 (ppc_linux_record_signal): Likewise.
362 (ppu2spu_prev_register): Likewise.
363 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
364 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
365 (ppcobsd_store_registers): Likewise.
366 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
367 Likewise.
368 (ppc_ravenscar_generic_store_registers): Likewise.
369 * procfs.c (procfs_fetch_registers): Likewise.
370 (procfs_store_registers): Likewise.
371 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
372 (ravenscar_store_registers): Likewise.
373 (ravenscar_prepare_to_store): Likewise.
374 * record-btrace.c (record_btrace_fetch_registers): Likewise.
375 * record-full.c (record_full_wait_1): Likewise.
376 (record_full_registers_change): Likewise.
377 (record_full_store_registers): Likewise.
378 (record_full_core_fetch_registers): Likewise.
379 (record_full_save): Likewise.
380 (record_full_goto_insn): Likewise.
381 * regcache.c (regcache_register_size): Likewise.
382 (get_regcache_arch): Remove.
383 (regcache_read_pc): Likewise.
384 * regcache.h (get_regcache_arch): Remove.
385 * remote-sim.c (gdbsim_fetch_register): Likewise.
386 (gdbsim_store_register): Likewise.
387 * remote.c (fetch_register_using_p): Likewise.
388 (send_g_packet): Likewise.
389 (remote_prepare_to_store): Likewise.
390 (store_registers_using_G): Likewise.
391 * reverse.c (save_bookmark_command): Likewise.
392 (goto_bookmark_command): Likewise.
393 * rs6000-aix-tdep.c (branch_dest): Likewise.
394 * rs6000-nat.c (rs6000_ptrace64): Likewise.
395 (fetch_register): Likewise.
396 * rs6000-tdep.c (ppc_supply_reg): Likewise.
397 (ppc_collect_reg): Likewise.
398 (ppc_collect_gregset): Likewise.
399 (ppc_collect_fpregset): Likewise.
400 (ppc_collect_vsxregset): Likewise.
401 (ppc_collect_vrregset): Likewise.
402 (ppc_displaced_step_hw_singlestep): Likewise.
403 (rs6000_pseudo_register_read): Likewise.
404 (rs6000_pseudo_register_write): Likewise.
405 * s390-linux-nat.c (supply_gregset): Likewise.
406 (fill_gregset): Likewise.
407 (s390_linux_fetch_inferior_registers): Likewise.
408 * s390-linux-tdep.c (s390_write_pc): Likewise.
409 (s390_software_single_step): Likewise.
410 (s390_all_but_pc_registers_record): Likewise.
411 (s390_linux_syscall_record): Likewise.
412 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
413 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
414 (shnbsd_store_inferior_registers): Likewise.
415 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
416 (sh_extract_return_value_fpu): Likewise.
417 (sh_store_return_value_nofpu): Likewise.
418 (sh_corefile_supply_regset): Likewise.
419 (sh_corefile_collect_regset): Likewise.
420 * sh64-tdep.c (sh64_extract_return_value): Likewise.
421 (sh64_store_return_value): Likewise.
422 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
423 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
424 (sparc_store_inferior_registers): Likewise.
425 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
426 (sparc_ravenscar_prepare_to_store): Likewise.
427 * sparc-tdep.c (sparc32_store_arguments): Likewise.
428 (sparc_analyze_control_transfer): Likewise.
429 (sparc_step_trap): Likewise.
430 (sparc_software_single_step): Likewise.
431 (sparc32_gdbarch_init): Likewise.
432 (sparc_supply_rwindow): Likewise.
433 (sparc_collect_rwindow): Likewise.
434 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
435 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
436 (sparc64nbsd_collect_gregset): Likewise.
437 (sparc64nbsd_supply_fpregset): Likewise.
438 (sparc64nbsd_collect_fpregset): Likewise.
439 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
440 (sparc64_supply_gregset): Likewise.
441 (sparc64_collect_gregset): Likewise.
442 (sparc64_supply_fpregset): Likewise.
443 (sparc64_collect_fpregset): Likewise.
444 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
445 * spu-tdep.c (spu_unwind_sp): Likewise.
446 (spu2ppu_prev_register): Likewise.
447 (spu_memory_remove_breakpoint): Likewise.
448 * stack.c (return_command): Likewise.
449 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
450 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
451 * tracefile.c (trace_save_ctf): Likewise.
452 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
453 (do_windows_store_inferior_registers): Likewise.
454 (windows_resume): Likewise.
455 * xtensa-linux-nat.c (fill_gregset): Likewise.
456 (supply_gregset_reg): Likewise.
457 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
458 (xtensa_register_read_masked): Likewise.
459 (xtensa_supply_gregset): Likewise.
460 (xtensa_extract_return_value): Likewise.
461 (xtensa_store_return_value): Likewise.
462
edd079d9
UW
4632017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
464
465 * doublest.c (floatformat_from_string): New function.
466 * doublest.h (floatformat_from_string): Add prototype.
467
468 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
469 (OP_FLOAT): ... this.
470 * expression.h: Do not include "doublest.h".
471 (union exp_element): Replace doubleconst and decfloatconst by
472 new element floatconst.
473 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
474 (ada_evaluate_subexp): Likewise.
475 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
476 OP_DOUBLE and OP_DECFLOAT.
477 * expprint.c (print_subexp_standard): Likewise.
478 (dump_subexp_body_standard): Likewise.
479 * breakpoint.c (watchpoint_exp_is_const): Likewise.
480
481 * parse.c: Include "dfp.h".
482 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
483 (write_exp_elt_floatcst): New function.
484 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
485 and OP_DECFLOAT.
486 (operator_check_standard): Likewise.
487 (parse_float): Do not accept suffix. Take type as input. Return bool.
488 Return target format buffer instead of host DOUBLEST.
489 Use floatformat_from_string and decimal_from_string to parse
490 either binary or decimal floating-point types.
491 (parse_c_float): Remove.
492 * parser-defs.h: Do not include "doublest.h".
493 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
494 (write_exp_elt_floatcst): Add prototype.
495 (parse_float): Update prototype.
496 (parse_c_float): Remove.
497
498 * c-exp.y: Do not include "dfp.h".
499 (typed_val_float): Use byte buffer instead of DOUBLEST.
500 (typed_val_decfloat): Remove.
501 (DECFLOAT): Remove.
502 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
503 (parse_number): Update to new parse_float interface.
504 Parse suffixes and determine type before calling parse_float.
505 Handle decimal and binary FP types the same way.
506
507 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
508 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
509 (parse_number): Update to new parse_float interface.
510 Parse suffixes and determine type before calling parse_float.
511
512 * f-exp.y: Replace dval by typed_val_float.
513 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
514 (parse_number): Use parse_float instead of atof.
515
516 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
517 (parse_go_float): Remove.
518 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
519 (parse_number): Call parse_float instead of parse_go_float.
520 Parse suffixes and determine type before calling parse_float.
521
522 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
523 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
524 (parse_number): Update to new parse_float interface.
525 Parse suffixes and determine type before calling parse_float.
526
527 * m2-exp.y: Replace dval by byte buffer val.
528 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
529 (parse_number): Call parse_float instead of atof.
530
531 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
532 (lex_number): Call parse_float instead of strtod.
533 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
534 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
535 Use write_exp_elt_floatcst.
536 (unit_testing): Remove static variable.
537 (rust_type): Do not check unit_testing.
538 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
539
540 * ada-exp.y (type_float, type_double): Remove.
541 (typed_val_float): Use byte buffer instead of DOUBLEST.
542 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
543 * ada-lex.l (processReal): Use parse_float instead of sscanf.
544
cc628f3d
AH
5452017-10-25 Alan Hayward <alan.hayward@arm.com>
546
547 * aarch64-tdep.h (enum aarch64_regnum): Remove.
548 * arch/aarch64.h: New file.
549
09a7c6aa
UW
5502017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
551
552 * dfp.h (decimal_from_string): Use const reference for argument.
553 * dfp.c (decimal_from_string): Likewise.
554
8ba0dd51
UW
5552017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
556
557 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
558 * sh64-tdep.c (sh64_do_fp_register): Likewise.
559 * mips-tdep.c (mips_print_fp_register): Likewise.
560
16e812b2
UW
5612017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
562
563 * common/format.h (enum argclass): Replace decfloat_arg by
564 dec32float_arg, dec64float_arg, and dec128float_arg.
565 * common/format.c (parse_format_string): Update to return
566 new decimal float argument classes.
567
568 * printcmd.c (printf_decfloat): Rename to ...
569 (printf_floating): ... this. Add argclass argument, and use it
570 instead of parsing the format string again. Add support for
571 binary floating-point values, using floatformat_to_string.
572 Convert value to the target format if it doesn't already match.
573 (ui_printf): Call printf_floating instead of printf_decfloat,
574 also for double_arg / long_double_arg. Pass argclass.
575
576 * dfp.c (decimal_to_string): Add format string argument.
577 * dfp.h (decimal_to_string): Likewise.
578
579 * doublest.c (floatformat_to_string): Add format string argument.
580 * doublest.h (floatformat_to_string): Likewise.
581
fdf0cbc2
UW
5822017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
583
584 * doublest.c (floatformat_precision): New routine.
585 (floatformat_to_string): Likewise.
586 * doublest.c (floatformat_to_string): Add prototype.
587
588 * printcmd.c (print_scalar_formatted): Only call print_floating
589 on floating-point types.
590 * valprint.c: Do not include "floatformat.h".
591 (generic_val_print_decfloat): Remove.
592 (generic_val_print): Call generic_val_print_float for both
593 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
594 (print_floating): Use floatformat_to_string. Handle decimal float.
595 (print_decimal_floating): Remove, merge into floatformat_to_string.
596 * value.h (print_decimal_floating): Remove.
597
598 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
599
5033013f
UW
6002017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
601
602 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
603
a664f67e
SM
6042017-10-21 Simon Marchi <simon.marchi@ericsson.com>
605
606 * memattr.h: Don't include vec.h.
607 (struct mem_attrib): Initialize fields.
608 <unknown>: New static method.
609 (struct mem_region): Add constructors, operator<, initialize
610 fields.
611 * memattr.c: Include algorithm.
612 (default_mem_attrib, unknown_mem_attrib): Remove.
613 (user_mem_region_list): New global.
614 (target_mem_region_list, mem_region_list): Change type to
615 std::vector<mem_region>.
616 (mem_use_target): Now a function.
617 (target_mem_regions_valid): Change type to bool.
618 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
619 (require_user_regions): Adjust.
620 (require_target_regions): Adjust.
621 (create_mem_region): Adjust.
622 (lookup_mem_region): Adjust.
623 (invalidate_target_mem_regions): Adjust.
624 (mem_clear): Rename to...
625 (user_mem_clear): ... this, and adjust.
626 (mem_command): Adjust.
627 (info_mem_command): Adjust.
628 (mem_enable, enable_mem_command, mem_disable,
629 disable_mem_command): Adjust.
630 (mem_delete): Adjust.
631 (delete_mem_command): Adjust.
632 * memory-map.h (parse_memory_map): Return an std::vector.
633 * memory-map.c (parse_memory_map): Likewise.
634 (struct memory_map_parsing_data): Add constructor.
635 <memory_map>: Point to std::vector.
636 (memory_map_start_memory): Adjust.
637 (memory_map_end_memory): Adjust.
638 (memory_map_end_property): Adjust.
639 (clear_result): Remove.
640 * remote.c (remote_memory_map): Return an std::vector.
641 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
642 Remove.
643 (target_debug_print_mem_region_vector): New.
644 * target-delegates.c: Regenerate.
645 * target.h (mem_region_vector): New typedef.
646 (to_memory_map): Return mem_region_vector.
647 (target_memory_map): Return an std::vector.
648 * target.c (target_memory_map): Return an std::vector.
649 (flash_erase_command): Adjust.
650
6e17c565
SM
6512017-10-21 Simon Marchi <simon.marchi@ericsson.com>
652
653 * memory-map.c (struct memory_map_parsing_data) <property_name>:
654 Change type to std::string.
655 (memory_map_start_property): Adjust.
656 (memory_map_end_property): Adjust.
657
cfba9872
SM
6582017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
659
660 * infrun.h: Include common/byte-vector.h.
661 (struct displaced_step_closure): New struct.
662 (struct buf_displaced_step_closure): New struct.
663 * infrun.c (displaced_step_closure::~displaced_step_closure):
664 Provide default implementation.
665 (displaced_step_clear): Deallocate step closure with delete.
666 * aarch64-tdep.c (displaced_step_closure): Rename to ...
667 (aarch64_displaced_step_closure): ... this, extend
668 displaced_step_closure.
669 (aarch64_displaced_step_data) <dsc>: Change type to
670 aarch64_displaced_step_closure.
671 (aarch64_displaced_step_copy_insn): Adjust to type change, use
672 unique_ptr.
673 (aarch64_displaced_step_fixup): Add cast for displaced step
674 closure.
675 * amd64-tdep.c (displaced_step_closure): Rename to ...
676 (amd64_displaced_step_closure): ... this, extend
677 displaced_step_closure.
678 <insn_buf>: Change type to std::vector<gdb_byte>.
679 <max_len>: Remove.
680 (fixup_riprel): Change type of DSC parameter, adjust to type
681 change of insn_buf.
682 (fixup_displaced_copy): Change type of DSC parameter.
683 (amd64_displaced_step_copy_insn): Instantiate
684 amd64_displaced_step_closure.
685 (amd64_displaced_step_fixup): Add cast for closure type, adjust
686 to type change of insn_buf.
687 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
688 parameter DSC.
689 (arm_linux_copy_svc): Likewise.
690 (cleanup_kernel_helper_return): Likewise.
691 (arm_catch_kernel_helper_return): Likewise.
692 (arm_linux_displaced_step_copy_insn): Instantiate
693 arm_displaced_step_closure.
694 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
695 (displaced_read_reg): Change type of parameter DSC.
696 (branch_write_pc): Likewise.
697 (load_write_pc): Likewise.
698 (alu_write_pc): Likewise.
699 (displaced_write_reg): Likewise.
700 (arm_copy_unmodified): Likewise.
701 (thumb_copy_unmodified_32bit): Likewise.
702 (thumb_copy_unmodified_16bit): Likewise.
703 (cleanup_preload): Likewise.
704 (install_preload): Likewise.
705 (arm_copy_preload): Likewise.
706 (thumb2_copy_preload): Likewise.
707 (install_preload_reg): Likewise.
708 (arm_copy_preload_reg): Likewise.
709 (cleanup_copro_load_store): Likewise.
710 (install_copro_load_store): Likewise.
711 (arm_copy_copro_load_store) Likewise.
712 (thumb2_copy_copro_load_store): Likewise.
713 (cleanup_branch): Likewise.
714 (install_b_bl_blx): Likewise.
715 (arm_copy_b_bl_blx): Likewise.
716 (thumb2_copy_b_bl_blx): Likewise.
717 (thumb_copy_b): Likewise.
718 (install_bx_blx_reg): Likewise.
719 (arm_copy_bx_blx_reg): Likewise.
720 (thumb_copy_bx_blx_reg): Likewise.
721 (cleanup_alu_imm): Likewise.
722 (arm_copy_alu_imm): Likewise.
723 (thumb2_copy_alu_imm): Likewise.
724 (cleanup_alu_reg): Likewise.
725 (install_alu_reg): Likewise.
726 (arm_copy_alu_reg): Likewise.
727 (thumb_copy_alu_reg): Likewise.
728 (cleanup_alu_shifted_reg): Likewise.
729 (install_alu_shifted_reg): Likewise.
730 (arm_copy_alu_shifted_reg): Likewise.
731 (cleanup_load): Likewise.
732 (cleanup_store): Likewise.
733 (arm_copy_extra_ld_st): Likewise.
734 (install_load_store): Likewise.
735 (thumb2_copy_load_literal): Likewise.
736 (thumb2_copy_load_reg_imm): Likewise.
737 (arm_copy_ldr_str_ldrb_strb): Likewise.
738 (cleanup_block_load_all): Likewise.
739 (cleanup_block_store_pc): Likewise.
740 (cleanup_block_load_pc): Likewise.
741 (arm_copy_block_xfer): Likewise.
742 (thumb2_copy_block_xfer): Likewise.
743 (cleanup_svc): Likewise.
744 (install_svc): Likewise.
745 (arm_copy_svc): Likewise.
746 (thumb_copy_svc): Likewise.
747 (arm_copy_undef): Likewise.
748 (thumb_32bit_copy_undef): Likewise.
749 (arm_copy_unpred): Likewise.
750 (arm_decode_misc_memhint_neon): Likewise.
751 (arm_decode_unconditional): Likewise.
752 (arm_decode_miscellaneous): Likewise.
753 (arm_decode_dp_misc): Likewise.
754 (arm_decode_ld_st_word_ubyte): Likewise.
755 (arm_decode_media): Likewise.
756 (arm_decode_b_bl_ldmstm): Likewise.
757 (arm_decode_ext_reg_ld_st): Likewise.
758 (thumb2_decode_dp_shift_reg): Likewise.
759 (thumb2_decode_ext_reg_ld_st): Likewise.
760 (arm_decode_svc_copro): Likewise.
761 (thumb2_decode_svc_copro): Likewise.
762 (install_pc_relative): Likewise.
763 (thumb_copy_pc_relative_16bit): Likewise.
764 (thumb_decode_pc_relative_16bit): Likewise.
765 (thumb_copy_pc_relative_32bit): Likewise.
766 (thumb_copy_16bit_ldr_literal): Likewise.
767 (thumb_copy_cbnz_cbz): Likewise.
768 (thumb2_copy_table_branch): Likewise.
769 (cleanup_pop_pc_16bit_all): Likewise.
770 (thumb_copy_pop_pc_16bit): Likewise.
771 (thumb_process_displaced_16bit_insn): Likewise.
772 (decode_thumb_32bit_ld_mem_hints): Likewise.
773 (thumb_process_displaced_32bit_insn): Likewise.
774 (thumb_process_displaced_insn): Likewise.
775 (arm_process_displaced_insn): Likewise.
776 (arm_displaced_init_closure): Likewise.
777 (arm_displaced_step_fixup): Add cast for closure.
778 * arm-tdep.h: Include infrun.h.
779 (displaced_step_closure): Rename to ...
780 (arm_displaced_step_closure): ... this, extend
781 displaced_step_closure.
782 <u::svc::copy_svc_os>: Change type of parameter DSC.
783 <cleanup>: Likewise.
784 (arm_process_displaced_insn): Likewise.
785 (arm_displaced_init_closure): Likewise.
786 (displaced_read_reg): Likewise.
787 (displaced_write_reg): Likewise.
788 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
789 Adjust.
790 * i386-tdep.h: Include infrun.h.
791 (i386_displaced_step_closure): New typedef.
792 * i386-tdep.c (i386_displaced_step_copy_insn): Use
793 i386_displaced_step_closure.
794 (i386_displaced_step_fixup): Adjust.
795 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
796 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
797 and unique_ptr.
798 (ppc_displaced_step_fixup): Adjust.
799 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
800 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
801 and unique_ptr.
802 (s390_displaced_step_fixup): Adjust.
803
b392b304
SM
8042017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
805
806 * interps.h (interp_resume, interp_suspend, interp_set_temp):
807 Remove declarations.
808
d5833c62
TT
8092017-10-20 Tom Tromey <tom@tromey.com>
810
811 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
812 std::vector.
813 (gdb_bfd_record_inclusion): Update.
814 (bfdp): Remove typedef.
815
06d5bbc8
TT
8162017-10-20 Tom Tromey <tom@tromey.com>
817
818 * gdb_bfd.c (gdb_bfd_ref): Use new.
819 (struct gdb_bfd_data): Add constructor, destructor, and member
820 initializers.
821 (gdb_bfd_unref): Use delete.
822
2712ce2e
TT
8232017-10-20 Tom Tromey <tom@tromey.com>
824
825 * exec.c (exec_file_attach): Use new_bfd_ref.
826 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
827 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
828 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
829 new_bfd_ref.
830 * gdb_bfd.h (new_bfd_ref): New function.
831
fcc8fb2f
PA
8322017-10-20 Pedro Alves <palves@redhat.com>
833
834 * main.c (captured_command_loop): Add attribute noinline.
835
4c2287b0
SM
8362017-10-19 Simon Marchi <simon.marchi@ericsson.com>
837
838 * interps.c (struct interp_factory): Add constructor.
839 (interp_factory_p): Remove typedef.
840 (DEF_VEC_P(interp_factory_p)): Remove.
841 (interpreter_factories): Change type to std::vector.
842 (interp_factory_register): Adjust.
843 (interp_lookup): Adjust.
844 (interpreter_completer): Adjust.
845
3d415c26
TT
8462017-10-19 Tom Tromey <tom@tromey.com>
847
848 * break-catch-syscall.c (catch_syscall_completer): Use
849 std::string, gdb::unique_xmalloc_ptr.
850
395423c4
TT
8512017-10-19 Tom Tromey <tom@tromey.com>
852
853 * infcall.c (call_function_by_hand_dummy): Use std::string.
854
54f70bc1
TT
8552017-10-19 Tom Tromey <tom@tromey.com>
856
857 * mi/mi-main.c (mi_cmd_execute): Update.
858 * top.h (prepare_execute_command): Return scoped_value_mark.
859 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
860 Add move constructor.
861 * top.c (prepare_execute_command): Return scoped_value_mark.
862 (execute_command): Update.
863
63929e84
PA
8642017-10-19 Pedro Alves <palves@redhat.com>
865
866 * xml-support.c (xml_fetch_content_from_file): Check fread's
867 return.
868
a75868f5
PA
8692017-10-19 Pedro Alves <palves@redhat.com>
870
871 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
872 async.
873 (handle_error_fd): New function.
874 (ser_base_async): Add/delete an event loop file handler for
875 error_fd.
876
2edf834e
PA
8772017-10-19 Pedro Alves <palves@redhat.com>
878
879 * xml-support.c (xml_fetch_content_from_file): Don't read in
880 chunks. Instead use fseek to determine the file's size, and read
881 it in one go.
882
c8ba13ad
KS
8832017-11-18 Keith Seitz <keiths@redhat.com>
884
885 * c-exp.y (oper): Canonicalize conversion operators of user-defined
886 types.
887 Add whitespace to front of type name.
888
37534686
KS
8892017-10-18 Keith Seitz <keiths@redhat.com>
890
891 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
892 DW_AT_accessibility.
893
28c7c158
YQ
8942017-10-18 Yao Qi <yao.qi@linaro.org>
895
896 * features/tic6x-c62x-linux.c: Remove.
897
30f0b101
TT
8982017-10-17 Tom Tromey <tom@tromey.com>
899
900 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
901 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
902 (do_mixed_source_and_assembly): Likewise.
903
57e12da9
TT
9042017-10-17 Tom Tromey <tom@tromey.com>
905
906 * regcache.c (regcache::xfer_part): Remove assertion.
907
7b700999
PA
9082017-10-17 Pedro Alves <palves@redhat.com>
909
910 * xml-support.c (xml_fetch_content_from_file): Call
911 unique_ptr::release() instead unique_ptr::get() when passing
912 through xrealloc.
913
d3037ba6
YQ
9142017-10-17 Yao Qi <yao.qi@linaro.org>
915
916 * regcache.c (regcache::xfer_part): Remove parameters read and
917 write, add parameter is_raw. All callers are updated.
918
83d5a34d
KS
9192017-10-16 Keith Seitz <keiths@redhat.com>
920
921 * c-typeprint.c (enum access_specifier): Moved here from
922 c_type_print_base.
923 (output_access_specifier): New function.
924 (c_type_print_base): Consider typedefs when assessing
925 whether access labels are needed.
926 Use output_access_specifier as needed.
927 Output access specifier for typedefs, if needed.
928 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
929 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
930 fields.
931 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
932 accessor macros.
933
87028b87
TT
9342017-10-16 Tom Tromey <tom@tromey.com>
935
936 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
937 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
938 * target.c (target_fileio_read_stralloc): Update.
939 * sparc64-tdep.c (adi_is_addr_mapped): Update.
940 * target.h (target_fileio_read_stralloc): Return
941 unique_xmalloc_ptr.
942
b7b030ad
TT
9432017-10-16 Tom Tromey <tom@tromey.com>
944
945 * xml-syscall.c (xml_init_syscalls_info): Update.
946 * xml-support.c (xinclude_start_include): Update.
947 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
948 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
949 (xml_fetch_content_from_file): Likewise.
950 * osdata.c (get_osdata): Update.
951 * target.h (target_read_stralloc, target_get_osdata): Return
952 unique_xmalloc_ptr.
953 * solib-aix.c (solib_aix_get_library_list): Update.
954 * solib-target.c (solib_target_current_sos): Update.
955 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
956 * xml-tdesc.c (fetch_available_features_from_target): Update.
957 (target_fetch_description_xml): Update.
958 (file_read_description_xml): Update.
959 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
960 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
961 (remote_pid_to_exec_file): Update.
962 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
963 (target_get_osdata): Likewise.
964
b80406ac
TT
9652017-10-16 Tom Tromey <tom@tromey.com>
966
967 * remote.c (remote_register_number_and_offset): Use std::vector.
968 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
969 (putpkt_binary): Use gdb::def_vector.
970 (compare_sections_command): Use gdb::byte_vector.
971
a90ecff8
TT
9722017-10-16 Tom Tromey <tom@tromey.com>
973
974 * ppc-linux-nat.c (hwdebug_insert_point): Use
975 gdb::unique_xmalloc_ptr, XDUP.
976
2dc0e219
TT
9772017-10-16 Tom Tromey <tom@tromey.com>
978
979 * probe.c (parse_probes): Use std::string.
980 (info_probes_for_ops, enable_probes_command)
981 (disable_probes_command): Remove cleanups.
982
b05628f0
TT
9832017-10-16 Tom Tromey <tom@tromey.com>
984
985 * buildsym.c (block_compar): Remove.
986 (end_symtab_get_static_block): Use std::vector.
987
a79b1bc6
SM
9882017-10-16 Simon Marchi <simon.marchi@ericsson.com>
989
990 * memrange.h (struct mem_range): Define operator< and operator==.
991 (mem_range_s): Remove.
992 (DEF_VEC_O (mem_range_s)): Remove.
993 (normalize_mem_ranges): Change parameter type to std::vector.
994 * memrange.c (compare_mem_ranges): Remove.
995 (normalize_mem_ranges): Change parameter type to std::vector,
996 adjust to vector change.
997 * exec.c (section_table_available_memory): Return vector, remove
998 parameter.
999 (section_table_read_available_memory): Adjust to std::vector
1000 change.
1001 * remote.c (remote_read_bytes): Adjust to std::vector
1002 change.
1003 * tracepoint.h (traceframe_available_memory): Change parameter
1004 type to std::vector.
1005 * tracepoint.c (traceframe_available_memory): Change parameter
1006 type to std::vector, adjust.
1007 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1008 std::vector change.
1009 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1010 unittests/memrange-selftests.c.
1011 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1012 * gdb/unittests/memrange-selftests.c: New file.
1013
63f0e930
PA
10142017-10-16 Pedro Alves <palves@redhat.com>
1015
1016 * elfread.c (probe_key_free): Rename range-for variable.
1017 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1018 (find_probe_by_pc, collect_probes): Rename range-for variable.
1019
c40c7bfc
YQ
10202017-10-16 Yao Qi <yao.qi@linaro.org>
1021
1022 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1023 * features/tic6x-c62x.c: Remove.
1024 * features/tic6x-c64x-linux.c: Remove.
1025 * features/tic6x-c64x.c: Remove.
1026 * features/tic6x-c64xp-linux.c: Remove.
1027 * features/tic6x-c64xp.c: Remove.
1028 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1029 initialize_tdesc_tic6x_*_linux functions.
1030 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1031 initialize_tdesc_tic6x_* functions.
1032
df27ae6a
YQ
10332017-10-16 Yao Qi <yao.qi@linaro.org>
1034
1035 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1036 tic6x-c62x.
1037 * regformats/tic6x-c62x.dat: Remove.
1038 * regformats/tic6x-c64x.dat: Remove.
1039 * regformats/tic6x-c64xp.dat: Remove.
1040
86766165
SM
10412017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1042
1043 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1044 (the !HAVE_LIBEXPAT version).
1045
824dfcc3
SM
10462017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1047
1048 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1049 const.
1050
2098b393
SM
10512017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1052
1053 * target.h: Include tracepoint.h.
1054 (enum trace_find_type): Move to tracepoint.h.
1055 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1056 * tracepoint.h: Don't include target.h
1057 (enum trace_find_type): Move from target.h.
1058 (parse_traceframe_info): Return a unique ptr.
1059 * tracepoint.c (current_traceframe_info): Change type to unique
1060 ptr.
1061 (free_traceframe_info): Remove.
1062 (clear_traceframe_info): Don't manually free
1063 current_traceframe_info.
1064 (free_result): Remove.
1065 (parse_traceframe_info): Return a unique ptr.
1066 (get_traceframe_info): Adjust to unique ptr.
1067 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1068 * remote.c (remote_traceframe_info): Return a unique ptr.
1069 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1070 ptr.
1071 * target-debug.h (target_debug_print_traceframe_info_up): New
1072 macro.
1073 * target-delegates.c: Regenerate.
1074
4cdd21a8
SM
10752017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1076
1077 * memrange.h (struct mem_range): Add constructors.
1078 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1079 std::vector<mem_range>.
1080 * tracepoint.c (free_traceframe_info): Don't manually free
1081 vector.
1082 (traceframe_info_start_memory): Adjust to vector change.
1083 (traceframe_available_memory): Likewise.
1084 * tracefile-tfile.c (build_traceframe_info): Likewise.
1085 * ctf.c (ctf_traceframe_info): Likewise.
1086
d0d292a2
SM
10872017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1088
1089 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1090 std::vector<int>.
1091 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1092 (traceframe_info_start_tvar): Adjust to vector change.
1093 (parse_traceframe_info): Allocate with new.
1094 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1095 vector change.
1096 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1097 change.
1098 tfile_traceframe_info): Allocate with new.
1099 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1100 change.
1101
8d3c73ef
SM
11022017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1103
1104 * tracepoint.c (traceframe_info): Rename to...
1105 (current_traceframe_info): ...this.
1106 (clear_traceframe_info): Adjust.
1107 (get_traceframe_info): Adjust.
1108
b129dcac
SM
11092017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1110
1111 * nat/linux-osdata.c: Include algorithm.
1112 (compare_processes): Remove.
1113 (struct pid_pgid_entry): New struct.
1114 (linux_xfer_osdata_processgroups): Use std::vector instead of
1115 XNEWVEC.
1116
af5bf4ad
SM
11172017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1118
1119 * objfiles.h: Don't include symfile.h.
1120 (struct partial_symbol): Remove forward-declaration.
1121 (struct objfile) <global_psymbols, static_psymbols>: Change type
1122 to std::vector<partial_symbol *>.
1123 * objfiles.c (objfile::objfile): Don't memset those fields.
1124 (objfile::~objfile): Don't free those fields.
1125 * psympriv.h (struct psymbol_allocation_list): Remove
1126 forward-declaration.
1127 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1128 to std::vector.
1129 (start_psymtab_common): Change parameters to std::vector.
1130 * psymtab.c: Include algorithm.
1131 (require_partial_symbols): Call shrink_to_fit.
1132 (find_pc_sect_psymbol): Adjust to vector change.
1133 (match_partial_symbol): Likewise.
1134 (lookup_partial_symbol): Likewise.
1135 (psym_relocate): Likewise.
1136 (dump_psymtab): Likewise.
1137 (recursively_search_psymtabs): Likewise.
1138 (compare_psymbols): Remove.
1139 (sort_pst_symbols): Adjust to vector change.
1140 (start_psymtab_common): Likewise.
1141 (end_psymtab_common): Likewise.
1142 (psymbol_bcache_full): De-constify return value.
1143 (add_psymbol_to_bcache): Likewise.
1144 (extend_psymbol_list): Remove.
1145 (append_psymbol_to_list): Adjust to vector change.
1146 (add_psymbol_to_list): Likewise.
1147 (init_psymbol_list): Likewise.
1148 (maintenance_info_psymtabs): Likewise.
1149 (maintenance_check_psymtabs): Likewise.
1150 * symfile.h (struct psymbol_allocation_list): Remove.
1151 * symfile.c (reread_symbols): Adjust to vector change.
1152 * dbxread.c (start_psymtab): Change type of parameters.
1153 (dbx_symfile_read): Adjust to vector change.
1154 (read_dbx_symtab): Likewise.
1155 (start_psymtab): Change type of parameters.
1156 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1157 (create_partial_symtab): Likewise.
1158 (add_partial_symbol): Likewise.
1159 (write_one_signatured_type): Likewise.
1160 (recursively_write_psymbols): Likewise.
1161 * mdebugread.c (parse_partial_symbols): Likewise.
1162 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1163 (scan_xcoff_symtab): Adjust to vector change.
1164 (xcoff_initial_scan): Likewise.
1165
3ec5942f
SM
11662017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1167
1168 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1169
2399fe6a
YQ
11702017-10-13 Yao Qi <yao.qi@linaro.org>
1171
1172 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1173 Remove s390x-*-expedite, add s390x-expedite.
1174
4bf3f4a8
YQ
11752017-10-13 Yao Qi <yao.qi@linaro.org>
1176
1177 * features/s390-gs-linux64.c: Regenerated.
1178 * features/s390x-gs-linux64.c: Regenerated.
1179
9e86da07
TT
11802017-10-13 Tom Tromey <tom@tromey.com>
1181
1182 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1183 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1184 delete.
1185 * symfile.c (symbol_file_add_with_addrs): Use new.
1186 (symbol_file_add_separate): Update comment.
1187 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1188 * jit.c (jit_object_close_impl): Use new.
1189 (jit_unregister_code): Use delete.
1190 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1191 (~objfile): Rename from free_objfile.
1192 (free_objfile_separate_debug, do_free_objfile_cleanup)
1193 (free_all_objfiles, objfile_purge_solibs): Use delete.
1194 * objfiles.h (struct objfile): Add constructor and destructor.
1195 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1196 (allocate_objfile, free_objfile): Don't declare.
1197 (struct objstats): Add initializers.
1198
c2508e90
SM
11992017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1202 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1203 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1204 * gdbarch.h: Regenerate.
1205 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1206 Adjust comment.
1207 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1208 (i386_displaced_step_fixup): Adjust comment.
1209 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1210
a900ff72
TT
12112017-10-12 Tom Tromey <tom@tromey.com>
1212
1213 * prologue-value.h (pv_area::store_would_trash): Return bool.
1214 (pv_area::find_reg): Likewise.
1215 * prologue-value.c (pv_area::store_would_trash): Return bool.
1216 (pv_area::find_reg): Likewise.
1217
f7b7ed97
TT
12182017-10-12 Tom Tromey <tom@tromey.com>
1219
1220 * s390-linux-tdep.c (s390_store, s390_load)
1221 (s390_check_for_saved, s390_analyze_prologue): Update.
1222 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1223 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1224 * prologue-value.h (class pv_area): Move from prologue-value.c.
1225 Change names of members. Add constructor, destructor, member
1226 functions.
1227 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1228 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1229 (pv_area_fetch, pv_area_scan): Don't declare.
1230 * prologue-value.c (struct pv_area::area_entry): Now member of
1231 pv_area.
1232 (struct pv_area): Move to prologue-value.h.
1233 (pv_area::pv_area): Rename from make_pv_area.
1234 (pv_area::~pv_area): Rename from free_pv_area.
1235 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1236 (clear_entries, find_entry, overlaps, store_would_trash, store)
1237 (fetch, find_reg, scan): Now member of pv_area.
1238 Remove "area" argument. Update.
1239 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1240 Update.
1241 * mn10300-tdep.c (push_reg, check_for_saved)
1242 (mn10300_analyze_prologue): Update.
1243 * mep-tdep.c (is_arg_spill, check_for_saved)
1244 (mep_analyze_prologue): Update.
1245 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1246 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1247 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1248 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1249 Update.
1250 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1251 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1252
466eecee
SM
12532017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1254
1255 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1256 * linux-nat.c (linux_nat_delete_thread): New variable.
1257 (lwp_free): Invoke linux_nat_delete_thread if set.
1258 (linux_nat_set_delete_thread): New function.
1259 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1260 thread delete callback.
1261 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1262 (_initialize_arm_linux_nat): Assign thread delete callback.
1263 * s390-linux-nat.c (s390_delete_thread): New function.
1264 (_initialize_s390_nat): Assign thread delete callback.
1265 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1266 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1267 function.
1268 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1269 declaration.
1270 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1271 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1272
f71c8822
TT
12732017-10-09 Tom Tromey <tom@tromey.com>
1274
1275 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1276 std::string.
1277 * tui/tui-layout.c (enum tui_status): Use std::string.
1278
981a3fb3
TT
12792017-10-11 Tom Tromey <tom@tromey.com>
1280
1281 * gdbthread.h (thread_command): Constify.
1282 * inferior.h (detach_command): Constify.
1283 * top.h (set_history, show_history): Constify.
1284 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1285 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1286 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1287 * printcmd.c (set_command): Constify.
1288 (non_const_set_command): New function.
1289 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1290 * breakpoint.c (enable_command, disable_command, delete_command)
1291 (catch_command, tcatch_command, set_breakpoint_cmd)
1292 (show_breakpoint_cmd): Constify.
1293 * macrocmd.c (macro_command): Constify.
1294 * infcmd.c (unset_command, kill_command, detach_command)
1295 (info_proc_cmd): Constify.
1296 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1297 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1298 (info_auto_load_cmd): Constify.
1299 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1300 (unset_tdesc_cmd): Constify.
1301 * ada-lang.c (set_ada_command, show_ada_command)
1302 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1303 * guile/guile.c (set_guile_command, show_guile_command)
1304 (info_guile_command): Constify.
1305 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1306 Constify.
1307 * skip.c (skip_command): Constify.
1308 * compile/compile.c (_initialize_compile): Constify.
1309 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1310 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1311 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1312 (maint_btrace_pt_show_cmd): Constify.
1313 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1314 Constify.
1315 * python/python.c (user_show_python, user_set_python): Constify.
1316 * mips-tdep.c (set_mips_command, show_mips_command)
1317 (set_mipsfpu_command): Constify.
1318 * record-btrace.c (cmd_record_btrace_start)
1319 (cmd_set_record_btrace, cmd_show_record_btrace)
1320 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1321 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1322 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1323 Constify.
1324 * symfile.c (overlay_command): Constify.
1325 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1326 * cli/cli-logging.c (set_logging_command, show_logging_command):
1327 Constify.
1328 * cli/cli-dump.c (dump_command, append_command)
1329 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1330 (tekhex_dump_command, binary_dump_command)
1331 (binary_append_command): Constify.
1332 * cli/cli-decode.c (struct cmd_list_element): Change type of
1333 "fun".
1334 * cli/cli-cmds.c (info_command, show_command, set_debug)
1335 (show_debug): Constify.
1336 (show_command): Add non-const overload.
1337 * top.c (set_history, show_history): Constify.
1338 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1339 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1340 * target.c (target_command): Constify.
1341 * sparc64-tdep.c (info_adi_command): Constify.
1342 * record-full.c (cmd_record_full_start): Constify.
1343 (set_record_full_command): Constify. Fix typo.
1344 (show_record_full_command): Constify.
1345 * thread.c (thread_command, thread_apply_command): Constify.
1346 * memattr.c (dummy_cmd): Constify.
1347 * value.c (function_command): Constify.
1348 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1349 * probe.c (info_probes_command): Constify.
1350 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1351 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1352 (show_thread_cmd, set_thread_default_cmd)
1353 (show_thread_default_cmd): Constify.
1354 (check_empty): Constify.
1355 * tracepoint.c (tfind_command): Constify.
1356 * cp-support.c (maint_cplus_command): Constify.
1357 * windows-tdep.c (info_w32_command): Constify.
1358 * record.c (cmd_record_start, set_record_command)
1359 (show_record_command, info_record_command, cmd_record_goto):
1360 Constify.
1361 * ravenscar-thread.c (set_ravenscar_command)
1362 (show_ravenscar_command): Constify.
1363 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1364 Constify.
1365 (add_internal_problem_command): Remove casts.
1366 * arc-tdep.c (maintenance_print_arc_command): Constify.
1367 * valprint.c (set_print, show_print, set_print_raw)
1368 (show_print_raw): Constify.
1369 * maint.c (maintenance_command, maintenance_info_command)
1370 (maintenance_print_command, maintenance_set_cmd)
1371 (maintenance_show_cmd, set_per_command_cmd)
1372 (show_per_command_cmd, maintenance_check_command): Constify.
1373 * language.c (set_check, show_check): Constify.
1374 * typeprint.c (show_print_type, set_print_type): Constify.
1375 * go32-nat.c (go32_info_dos_command): Constify.
1376
fdf44873
TT
13772017-10-11 Tom Tromey <tom@tromey.com>
1378
1379 * breakpoint.c (prepare_re_set_context): Remove.
1380 (breakpoint_re_set_one): Update. Don't use cleanups.
1381 (breakpoint_re_set): Use scoped_restore, std::string, and
1382 scoped_restore_current_language.
1383
81b1e71c
TT
13842017-10-11 Tom Tromey <tom@tromey.com>
1385
1386 * breakpoint.c (commands_command_1): Use std::string.
1387 (cleanup_executing_breakpoints): Remove.
1388 (bpstat_do_actions_1): Use scoped_restore.
1389 (bpstat_check_watchpoint): Use std::string.
1390 (decode_static_tracepoint_spec): Likewise.
1391 (break_range_command): Likewise.
1392 (watch_command_1): Likewise.
1393 (compare_breakpoints): Change argument types.
1394 (clear_command): Use std::vector.
1395 (cleanup_executing_breakpoints): Remove.
1396 (update_global_location_list): Use unique_xmalloc_ptr.
1397 (strace_command): Remove unused declaration.
1398
4f9d9906
JB
13992017-10-11 John Baldwin <jhb@FreeBSD.org>
1400
1401 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1402 * NEWS: Mention new FreeBSD/arm native configuration.
1403 * configure.host: Add arm*-*-freebsd*.
1404 * configure.nat: Likewise.
1405 * arm-fbsd-nat.c: New file.
1406
7176dfd2
JB
14072017-10-11 John Baldwin <jhb@FreeBSD.org>
1408
1409 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1410 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1411 * NEWS: Mention new FreeBSD/arm target.
1412 * configure.tgt: Add arm*-*-freebsd*.
1413 * arm-fbsd-tdep.c: New file.
1414 * arm-fbsd-tdep.h: New file.
1415
fe220226
MR
14162017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1417
1418 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1419 `gdbarch_elfcore_write_linux_prpsinfo'.
1420 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1421 method.
1422 (elf_internal_linux_prpsinfo): Remove declaration.
1423 * gdbarch.h: Regenerate.
1424 * gdbarch.c: Regenerate.
1425
a2f63b2e
MR
14262017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1427
1428 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1429 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1430
458ca1d0
PA
14312017-10-11 Pedro Alves <palves@redhat.com>
1432
1433 * breakpoint.c (reattach_breakpoints): Delete.
1434 * breakpoint.h (reattach_breakpoints): Delete.
1435
905014d7
SM
14362017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1437
1438 * symfile.c (registered_sym_fns): Make struct, not typedef.
1439 (DEF_VEC_O (registered_sym_fns)): Remove.
1440 (symtab_fns): Change type to std::vector.
1441 (add_symtab_fns): Adjust.
1442 (find_sym_fns): Adjust.
1443
56d704da
AK
14442017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1445
1446 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1447 * arc-tdep.h (arc_arch_is_em): New function.
1448 (arc_arch_is_hs): Likewise.
1449
7fa29be9
EB
14502017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1451
1452 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1453 parentheses in the declaration.
1454 (macro_lookup_inclusion): Likewise.
1455 (macro_lookup_definition): Likewise.
1456 * p-lang.h (pascal_builtin_types): Likewise.
1457 * tui/tui-data.c (tui_win_list): Likewise.
1458 * tui/tui-data.h (tui_win_list): Likewise.
1459 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1460
d9b477e3
KB
14612017-10-11 Mark Rages <markrages@gmail.com>
1462
1463 * target-memory.c (block_boundaries): Fix for block address not
1464 aligned on block size.
1465
65630365
PA
14662017-10-10 Pedro Alves <palves@redhat.com>
1467 Tom Tromey <tom@tromey.com>
1468
1469 * breakpoint.c (struct captured_breakpoint_query_args)
1470 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1471 (print_breakpoint): New.
1472 * breakpoint.h (print_breakpoint): Declare.
1473 * common/common-exceptions.h (enum return_reason): Remove
1474 references to catch_exceptions.
1475 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1476 Delete.
1477 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1478 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1479 * gdb.h: Delete.
1480 * gdbthread.h (thread_select): Declare.
1481 * mi/mi-cmd-break.c: Don't include gdb.h.
1482 (breakpoint_notify): Use print_breakpoint.
1483 * mi/mi-cmd-catch.c: Don't include gdb.h.
1484 * mi/mi-interp.c: Don't include gdb.h.
1485 (mi_print_breakpoint_for_event): New.
1486 (mi_breakpoint_created, mi_breakpoint_modified): Use
1487 mi_print_breakpoint_for_event.
1488 * mi/mi-main.c: Don't include gdb.h.
1489 (mi_cmd_thread_select): Parse the global thread ID here. Use
1490 thread_select instead of gdb_thread_select.
1491 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1492 of using gdb_list_thread_ids.
1493 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1494 FILEIO_ENOSYS here.
1495 (remote_fileio_request): Use TRY/CATCH instead of
1496 catch_exceptions.
1497 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1498 (symbol_file_add_from_memory_wrapper): Delete.
1499 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1500 * thread.c: Don't include gdb.h.
1501 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1502 (thread_alive): Use thread_select.
1503 (do_captured_thread_select): Delete, parts salvaged as ...
1504 (thread_select): ... this new function.
1505 (gdb_thread_select): Delete.
1506
bf469271
PA
15072017-10-10 Pedro Alves <palves@redhat.com>
1508 Tom Tromey <tom@tromey.com>
1509
1510 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1511 and reverse logic.
1512 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1513 No longer macros. Instead ...
1514 (enum wp_check_result): They're now values of this new
1515 enumeration.
1516 (watchpoint_check): Change return type to wp_check_result and
1517 parameter type to bpstat.
1518 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1519 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1520 catch_errors. Reverse logic of watchpoint_check call.
1521 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1522 pointer as parameter.
1523 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1524 * common/common-exceptions.c (throw_exception_sjlj): Update
1525 comments to avoid mentioning catch_errors.
1526 * exceptions.c (catch_errors): Delete.
1527 * exceptions.h: Update comments to avoid mentioning catch_errors.
1528 (catch_errors_ftype, catch_errors): Delete.
1529 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1530 (hook_stop_stub): Delete.
1531 (restore_selected_frame): Change return type to void, and
1532 parameter type to const frame_id &.
1533 (restore_infcall_control_state): Use TRY/CATCH instead of
1534 catch_errors.
1535 * main.c (captured_command_loop): Return void and remove
1536 parameter. Remove references to catch_errors.
1537 (captured_main): Use TRY/CATCH instead of catch_errors.
1538 * objc-lang.c (objc_submethod_helper_data)
1539 (find_objc_msgcall_submethod_helper): Delete.
1540 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1541 catch_errors.
1542 * record-full.c (record_full_message): Return void.
1543 (record_full_message_args, record_full_message_wrapper): Delete.
1544 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1545 instead of catch_errors.
1546 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1547 parameter type to int.
1548 * solib-darwin.c (open_symbol_file_object): Ditto.
1549 * solib-dsbt.c (open_symbol_file_object): Ditto.
1550 * solib-frv.c (open_symbol_file_object): Ditto.
1551 * solib-svr4.c (open_symbol_file_object): Ditto.
1552 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1553 * solib.c (update_solib_list): Use TRY/CATCH instead of
1554 catch_errors.
1555 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1556 Change type.
1557 * symmisc.c (struct print_symbol_args): Remove.
1558 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1559 (print_symbol): Change type.
1560 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1561 and remove parameters.
1562 (catch_errors): New.
1563 (get_windows_debug_event): Adjust.
1564
1a56bfa5
TT
15652017-10-09 Tom Tromey <tom@tromey.com>
1566
1567 * mi/mi-main.c (free_splay_tree): Remove.
1568 (list_available_thread_groups): Use splay_tree_up.
1569 * common/gdb_splay_tree.h: New file.
1570
0c478e2d
TT
15712017-10-09 Tom Tromey <tom@tromey.com>
1572
1573 * mi/mi-main.c (do_nothing): Remove.
1574 (list_available_thread_groups): Update.
1575
cbd2b4e3
PA
15762017-10-09 Pedro Alves <palves@redhat.com>
1577
1578 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1579 reading registers when switching context.
1580
a181c0bf
JB
15812017-10-09 John Baldwin <jhb@FreeBSD.org>
1582
1583 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1584 (fbsd_convert_siginfo): Likewise.
1585 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1586
6e66f753
SM
15872017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1588
1589 * configure.ac (try_guile_versions): Remove guile-2.2.
1590 * configure: Regenerate.
1591
890e9790
TT
15922017-10-09 Tom Tromey <tom@tromey.com>
1593
1594 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1595 (COMPILE.pre): Use $(CXX).
1596
109483d9
PA
15972017-10-09 Pedro Alves <palves@redhat.com>
1598
1599 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1600 Use bool.
1601 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1602 * cp-support.h (cp_remove_params): Now returns a
1603 gdb::unique_xmalloc_ptr.
1604 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1605 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1606 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1607 returning a gdb::unique_xmalloc_ptr.
1608 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1609 * stack.c (find_frame_funname): Adjust to cp_remove_params
1610 returning a gdb::unique_xmalloc_ptr.
1611
791afaa2
TT
16122017-10-08 Tom Tromey <tom@tromey.com>
1613
1614 * dwarf2read.c (dwarf2_get_dwz_file): Use
1615 gdb::unique_xmalloc_ptr.
1616 (find_slot_in_mapped_hash): Likewise.
1617 (dwarf2_physname): Likewise.
1618 (create_dwo_unit_in_dwp_v1): Use std::string.
1619 (create_dwo_unit_in_dwp_v2): Likewise.
1620 (lookup_dwo_cutu): Likewise.
1621 (inherit_abstract_dies): Use std::vector.
1622 (read_array_type): Likewise.
1623 (dwarf_decode_macros): Remove unused declaration.
1624 (unsigned_int_compar): Remove.
1625 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1626 (psymtabs_addrmap_cleanup): Remove.
1627
30a9c02f
TT
16282017-10-08 Tom Tromey <tom@tromey.com>
1629
1630 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1631 * frame.h (frame_cleanup_after_sniffer): Declare.
1632 (frame_prepare_for_sniffer): Return void.
1633 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1634 type of argument.
1635 (frame_prepare_for_sniffer): Return void.
1636
757325a3
TT
16372017-10-08 Tom Tromey <tom@tromey.com>
1638
1639 * utils.h (make_cleanup_value_free): Remove.
1640 * utils.c (do_value_free, struct cleanup): Remove.
1641 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1642 Use gdb_value_up.
1643 * value.h (struct value_deleter): New.
1644 (gdb_value_up): New typedef.
1645
b9c04fb2
TT
16462017-10-08 Tom Tromey <tom@tromey.com>
1647
1648 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1649 (make_cleanup_free_search_symbols): Remove.
1650 (search_symbols): Return std::vector.
1651 (symbol_search::compare_search_syms): Now member of
1652 symbol_search. Change arguments.
1653 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1654 (symtab_symbol_info, rbreak_command): Update.
1655 * symtab.h (struct symbol_search) <next>: Remove.
1656 Add constructors.
1657 (symbol_search::operator<): New function.
1658 (symbol_search::operator==): New function.
1659 (search_symbols): Remove std::vector.
1660 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1661 (symbol_search::compare_search_syms): Declare.
1662
0d28b0a5
YQ
16632017-10-06 Yao Qi <yao.qi@linaro.org>
1664
1665 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1666 arch/aarch64-insn.o.
1667 Remove one rule.
1668 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1669
71917808
YQ
16702017-10-06 Yao Qi <yao.qi@linaro.org>
1671
1672 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1673 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1674 arch/arm-linux.o respectively.
1675 * configure.tgt: Likewise.
1676
2081b2b2
YQ
16772017-10-06 Yao Qi <yao.qi@linaro.org>
1678
1679 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1680 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1681
a1b85d28
PA
16822017-10-06 Pedro Alves <palves@redhat.com>
1683
1684 * windows-nat.c: Include <algorithm>.
1685
d97987e2
YQ
16862017-10-06 Yao Qi <yao.qi@linaro.org>
1687
1688 * configure.tgt (i386_tobjs): New variable.
1689 (amd64_tobjs): New variable.
1690 Set $cpu_obs and $os_obs.
1691
f38307f5
YQ
16922017-10-06 Yao Qi <yao.qi@linaro.org>
1693
1694 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1695 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1696 (clean): Remove object files and dependency files.
1697 (distclean): Remove the directory.
1698 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1699 * configure: Re-generated.
1700 * configure.tgt: Replace amd64.o with arch/amd64.o.
1701
2f924de6
JM
17022017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1703
1704 PR build/22188
1705 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1706 and SETEND.
1707
2fd9d7ca
PA
17082017-10-05 Pedro Alves <palves@redhat.com>
1709
1710 * linux-nat.c (linux_child_follow_fork): When following the parent
1711 and detaching the child, consult the parent thread's architecture
1712 instead of the child's.
1713
d13b8493
UW
17142017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1715
1716 * ax.h: Do not include "doublest.h".
1717 (union agent_val): Remove.
1718
3b4b2f16
UW
17192017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1720
1721 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1722 (decimal_to_string): Return std::string object.
1723 (decimal_from_string): Accept std::string object. Return bool.
1724 (decimal_from_integral, decimal_from_doublest): Remove.
1725 (decimal_from_longest): Add prototype.
1726 (decimal_from_ulongest): Likewise.
1727 (decimal_to_longest): Likewise.
1728 (decimal_from_doublest): Likewise.
1729 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1730 (MAX_DECIMAL_STRING): Move here.
1731 (decimal_to_string): Return std::string object.
1732 (decimal_from_string): Accept std::string object. Return bool.
1733 (decimal_from_integral): Remove, replace by ...
1734 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1735 (decimal_to_longest): New function.
1736 (decimal_from_floating): Remove, replace by ...
1737 (decimal_from_doublest): ... this new function.
1738 (decimal_to_doublest): Update to new decimal_to_string interface.
1739
1740 * value.c (unpack_long): Use decimal_to_longest.
1741 * valops.c (value_cast): Use decimal_from_doublest instead of
1742 decimal_from_floating. Use decimal_from_[u]longest isntead of
1743 decimal_from_integral.
1744 * valarith.c (value_args_as_decimal): Likewise.
1745 * valprint.c (print_decimal_floating): Update to new
1746 decimal_to_string interface.
1747 * printcmd.c (printf_decfloat): Likewise.
1748 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1749
1841ee5d
UW
17502017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1751
1752 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1753 * gdbtypes.c: Include "floatformat.h".
1754 * value.c: Likewise.
1755 * m68k-tdep.c: Likewise.
1756
1757 * findvar.c: Do not include "floatformat.h".
1758 * amd64-darwin-tdep.c: Likewise.
1759 * arm-linux-tdep.c: Likewise.
1760 * i386-darwin-tdep.c: Likewise.
1761 * i387-tdep.c: Likewise.
1762 * m68k-linux-tdep.c: Likewise.
1763 * mep-tdep.c: Likewise.
1764 * mips-tdep.c: Likewise.
1765 * nios2-tdep.c: Likewise.
1766 * s390-linux-tdep.c: Likewise.
1767 * sparc-obsd-tdep.c: Likewise.
1768 * sparc-tdep.c: Likewise.
1769 * sparc64-tdep.c: Likewise.
1770 * spu-tdep.c: Likewise.
1771 * tic6x-tdep.c: Likewise.
1772 * tilegx-tdep.c: Likewise.
1773 * vax-tdep.c: Likewise.
1774 * xstormy16-tdep.c: Likewise.
1775 * xtensa-tdep.c: Likewise.
1776
1777 * top.c: Do not include "doublest.h".
1778 * aarch64-tdep.c: Likewise.
1779 * alpha-tdep.c: Likewise.
1780 * arm-linux-tdep.c: Likewise.
1781 * m68k-linux-tdep.c: Likewise.
1782 * tilegx-tdep.c: Likewise.
1783 * xstormy16-tdep.c: Likewise.
1784
a80a6471
JB
17852017-10-05 John Baldwin <jhb@FreeBSD.org>
1786
1787 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1788 (mipsn32_fbsd_sigframe): Define.
1789 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1790 for FreeBSD/mipsn32.
1791
12c4bd7f
JB
17922017-10-05 John Baldwin <jhb@FreeBSD.org>
1793
1794 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1795 AT_HWCAP.
1796
c91933e9
TG
17972017-10-05 Tristan Gingold <tgingold@free.fr>
1798
1799 * MAINTAINERS (Misc): Update my email address.
1800
5cd63fda
PA
18012017-10-04 Pedro Alves <palves@redhat.com>
1802
1803 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1804 it instead of target_gdbarch.
1805 (get_remote_state, get_remote_packet_size): Adjust
1806 get_remote_arch_state calls, passing down target_gdbarch
1807 explicitly.
1808 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1809 'gdbarch' and use it instead of target_gdbarch.
1810 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1811 passing down target_gdbarch explicitly.
1812 (struct stop_reply) <arch>: New field.
1813 (remote_parse_stop_reply): Use the stopped thread's architecture,
1814 not the current inferior's. Save the architecture in the
1815 stop_reply.
1816 (process_stop_reply): Use the stop reply's architecture.
1817 (process_g_packet, remote_fetch_registers)
1818 (remote_prepare_to_store, store_registers_using_G)
1819 (remote_store_registers): Adjust get_remote_arch_state calls,
1820 using the regcache's architecture.
1821 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1822 passing down target_gdbarch explicitly.
1823 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1824 beneath instead of calling target_gdbarch.
1825 * target.c (default_thread_architecture): Use the specified
1826 inferior's architecture, instead of the current inferior's
1827 architecture (via target_gdbarch).
1828
ed4227b7
PA
18292017-10-04 Pedro Alves <palves@redhat.com>
1830
1831 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1832 case.
1833 (regcache_print): Handle !target_has_registers here instead.
1834
55b11ddf
PA
18352017-10-04 Pedro Alves <palves@redhat.com>
1836
1837 * frame.c (create_test_frame): Delete.
1838 * frame.h (create_test_frame): Delete.
1839 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1840 (class regcache_test): Delete.
1841 (test_target_has_registers, test_target_has_stack)
1842 (test_target_has_memory, test_target_prepare_to_store)
1843 (test_target_store_registers): New functions.
1844 (test_target_ops): New class.
1845 (register_to_value_test): Error out if there's already a
1846 process_stratum (or higher) target pushed. Create a fuller mock
1847 environment, with mock target_ops, inferior, address space, thread
1848 and inferior_ptid.
1849 * progspace.c (struct address_space): Move to ...
1850 * progspace.h (struct address_space): ... here.
1851 * regcache.h (regcache::~regcache, regcache::raw_write)
1852 [GDB_SELF_TEST]: No longer virtual.
1853
4c71c105
SM
18542017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1855
1856 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1857
73dcd72d
PA
18582017-10-04 Pedro Alves <palves@redhat.com>
1859
1860 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1861 out of 'between TRY and CATCH'.
1862
44704526
PA
18632017-10-04 Pedro Alves <palves@redhat.com>
1864
1865 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1866 * common/common-exceptions.h (TRY): Open an outermost scope.
1867 Expand intro comment.
1868 (CATCH): Reindent.
1869 (END_CATCH): Close the outermost scope.
1870 * completer.c (complete_line_internal): Add missing END_CATCH.
1871
bc3b087d
SDJ
18722017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1873
1874 * NEWS (Changes since GDB 8.0): Add entry about new
1875 'set-cwd-on-gdbserver' feature.
1876 (New remote packets): Add entry for QSetWorkingDir.
1877 * common/common-inferior.h (set_inferior_cwd): New prototype.
1878 * infcmd.c (set_inferior_cwd): Remove "static".
1879 (show_cwd_command): Expand text to include remote debugging.
1880 * remote.c: Add PACKET_QSetWorkingDir.
1881 (remote_protocol_features) <QSetWorkingDir>: New entry for
1882 PACKET_QSetWorkingDir.
1883 (extended_remote_set_inferior_cwd): New function.
1884 (extended_remote_create_inferior): Call
1885 "extended_remote_set_inferior_cwd".
1886 (_initialize_remote): Call "add_packet_config_cmd" for
1887 QSetWorkingDir.
1888
d092c5a2
SDJ
18892017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1890
1891 * NEWS (New commands): Mention "set/show cwd".
1892 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1893 "cd" command's help text.
1894 * common/common-inferior.h (get_inferior_cwd): New prototype.
1895 * infcmd.c (inferior_cwd_scratch): New global variable.
1896 (set_inferior_cwd): New function.
1897 (get_inferior_cwd): Likewise.
1898 (set_cwd_command): Likewise.
1899 (show_cwd_command): Likewise.
1900 (_initialize_infcmd): Add "set/show cwd" commands.
1901 * inferior.h (class inferior) <cwd>: New field.
1902 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1903 (fork_inferior): Change inferior's cwd before its execution.
1904 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
1905 to CreateProcess.
1906
7da0a886
SDJ
19072017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1908
1909 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
1910 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
1911 (COMMON_OBS): Add gdb_tilde_expand.o.
1912 * common/gdb_tilde_expand.c: New file.
1913 * common/gdb_tilde_expand.h: Likewise.
1914
db8dd160
MR
19152017-10-03 Maciej W. Rozycki <macro@imgtec.com>
1916
1917 * gdbarch.sh (objfile): Remove duplicate declaration.
1918 * gdbarch.h: Regenerate.
1919
f8bfbf22
TT
19202017-10-03 Tom Tromey <tom@tromey.com>
1921
1922 * utils.c (internal_vproblem): Use string_vprintf.
1923
5178ed48
TT
19242017-10-03 Tom Tromey <tom@tromey.com>
1925
1926 * printcmd.c (info_symbol_command): Use std::string.
1927
8cff8730
TT
19282017-10-03 Tom Tromey <tom@tromey.com>
1929
1930 * top.c (gdb_safe_append_history): Use std::string.
1931
895b8f30
TT
19322017-10-03 Tom Tromey <tom@tromey.com>
1933
1934 * event-top.c (stdin_event_handler): Update.
1935 * main.c (captured_main_1): Update.
1936 * top.h (make_delete_ui_cleanup): Remove.
1937 (struct ui): Add constructor and destructor.
1938 (new_ui, delete_ui): Remove.
1939 * top.c (make_delete_ui_cleanup): Remove.
1940 (new_ui_command): Use std::unique_ptr.
1941 (delete_ui_cleanup): Remove.
1942 (ui::ui): Rename from new_ui. Update.
1943 (free_ui): Remove.
1944 (ui::~ui): Rename from delete_ui. Update.
1945
0efef640
TT
19462017-10-03 Tom Tromey <tom@tromey.com>
1947
1948 * symfile.c (load_progress): Use gdb::byte_vector.
1949
245ad7d3
TT
19502017-10-03 Tom Tromey <tom@tromey.com>
1951
1952 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
1953 declaration.
1954 * printcmd.c (x_command): Remove unused declaration.
1955 * symfile.c (symbol_file_command): Remove unused declaration.
1956
e05550d7
TT
19572017-10-03 Tom Tromey <tom@tromey.com>
1958
1959 * utils.c (internal_vproblem): Use std::string.
1960 (defaulted_query): Likewise.
1961
b95de2b7
TT
19622017-10-03 Tom Tromey <tom@tromey.com>
1963
1964 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
1965 * top.c (execute_command_to_string): Update.
1966 * utils.c (make_cleanup_restore_page_info): Remove.
1967 (do_restore_page_info_cleanup): Remove.
1968 (set_batch_flag_and_restore_page_info):
1969 New.
1970 (make_cleanup_restore_page_info): Remove.
1971 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1972 (~set_batch_flag_and_restore_page_info): New
1973 (make_cleanup_restore_uinteger): Remove.
1974 (make_cleanup_restore_integer): Remove.
1975 (struct restore_integer_closure): Remove.
1976 (restore_integer): Remove.
1977 * utils.h (struct set_batch_flag_and_restore_page_info): New
1978 class.
1979 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
1980 (make_cleanup_restore_page_info): Remove.
1981 (make_cleanup_restore_uinteger) Remove.
1982 (make_cleanup_restore_integer) Remove.
1983
07036511
TT
19842017-10-03 Tom Tromey <tom@tromey.com>
1985
1986 * record-full.h (record_full_gdb_operation_disable_set): Return
1987 scoped_restore_tmpl<int>.
1988 * infrun.c (adjust_pc_after_break): Update.
1989 (handle_signal_stop): Update.
1990 * record-full.c (record_full_gdb_operation_disable_set): Return
1991 scoped_restore_tmpl<int>.
1992 (record_full_wait_1, record_full_insert_breakpoint)
1993 (record_full_remove_breakpoint, record_full_save)
1994 (record_full_goto_insn): Update.
1995
45320ffa
TT
19962017-10-02 Tom Tromey <tom@tromey.com>
1997
1998 PR rust/22236:
1999 * rust-lang.c (rust_val_print_str): New function.
2000 (val_print_struct): Call it.
2001 (rust_subscript): Preserve name of slice type.
2002
b3e3859b
TT
20032017-10-02 Tom Tromey <tom@tromey.com>
2004
2005 * rust-lang.c (rust_subscript): Handle slices in
2006 EVAL_AVOID_SIDE_EFFECTS case.
2007
01af5e0d
TT
20082017-10-02 Tom Tromey <tom@tromey.com>
2009
2010 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2011
888e3ddb
TT
20122017-10-02 Tom Tromey <tom@tromey.com>
2013
2014 * rust-lang.h (rust_slice_type): Add "extern".
2015
cc536b21
PA
20162017-10-02 Tom Tromey <tom@tromey.com>
2017 Pedro Alves <palves@redhat.com>
2018
2019 * ada-lang.h (ada_exc_info::operator<): Make const.
2020 (ada_exc_info::operator==): Make const.
2021 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2022 Make const.
2023
386c8614
TT
20242017-09-29 Tom Tromey <tom@tromey.com>
2025
2026 * target.c (read_whatever_is_readable): Change type of "result".
2027 Update.
2028 (free_memory_read_result_vector): Remove.
2029 (read_memory_robust): Change return type. Update.
2030 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2031 bin2hex, std::string.
2032 * target.h (memory_read_result_s): Remove typedef.
2033 (free_memory_read_result_vector): Remove.
2034 (read_memory_robust): Return std::vector.
2035
789c4b5e
TT
20362017-09-29 Tom Tromey <tom@tromey.com>
2037
2038 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2039
ab816a27
TT
20402017-09-29 Tom Tromey <tom@tromey.com>
2041
2042 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2043 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2044 operator< and operator==.
2045 (ada_exceptions_list): Return a std::vector.
2046 * ada-lang.c (ada_exc_info::operator<): Rename from
2047 compare_ada_exception_info.
2048 (ada_exc_info::operator==): New.
2049 (sort_remove_dups_ada_exceptions_list): Change type of
2050 "exceptions".
2051 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2052 (ada_add_global_exceptions): Likewise.
2053 (ada_exceptions_list_1): Return a std::vector.
2054 (ada_exceptions_list): Likewise.
2055
52f9abe4
TT
20562017-09-29 Tom Tromey <tom@tromey.com>
2057
2058 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2059 'std::set *'.
2060 (print_one_inferior): Update.
2061 (free_vector_of_ints): Remove.
2062 (list_available_thread_groups): Change "ids" to std::set.
2063 (mi_cmd_list_thread_groups): Update.
2064 (struct collect_cores_data) <core>: Now a std::set.
2065 (collect_cores): Update.
2066 (unique): Remove.
2067 (print_one_inferior): Update.
2068
dcd5ddcc
TT
20692017-09-29 Tom Tromey <tom@tromey.com>
2070
2071 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2072 (mi_execute_async_cli_command): Likewise.
2073 (mi_cmd_trace_frame_collected): Use field_fmt.
2074
45d288cc
TT
20752017-09-29 Tom Tromey <tom@tromey.com>
2076
2077 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2078 gdb::byte_vector.
2079
6afe2f4a
TT
20802017-09-29 Tom Tromey <tom@tromey.com>
2081
2082 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2083
9813429a
TT
20842017-09-29 Tom Tromey <tom@tromey.com>
2085
2086 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2087
2d6960b4
TT
20882017-09-29 Tom Tromey <tom@tromey.com>
2089
2090 * varobj.h (varobj_gen_name): Return std::string.
2091 * varobj.c (varobj_gen_name): Return std::string.
2092 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2093 (mi_cmd_var_delete): Don't copy "name".
2094
784c453a
TT
20952017-09-29 Tom Tromey <tom@tromey.com>
2096
2097 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2098 (mi_cmd_break_insert_1): Update.
2099
a9bc57b9
TT
21002017-09-29 Tom Tromey <tom@tromey.com>
2101
2102 * target.h (make_scoped_defer_target_commit_resume): Update.
2103 * target.c (make_scoped_defer_target_commit_resume): Rename from
2104 make_cleanup_defer_target_commit_resume. Return a
2105 scoped_restore.
2106 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2107
9754d8c4
TT
21082017-09-29 Tom Tromey <tom@tromey.com>
2109
2110 * main.c (captured_main_1): Remove unused declaration.
2111 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2112
99ef965c
TT
21132017-09-29 Tom Tromey <tom@tromey.com>
2114
2115 * symtab.c (search_symbols): Remove unused outer cleanup.
2116 (make_source_files_completion_list): Remove unused declaration.
2117
42518ba7
TT
21182017-09-29 Tom Tromey <tom@tromey.com>
2119
2120 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2121
726b2169
TT
21222017-09-29 Tom Tromey <tom@tromey.com>
2123
2124 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2125 gdb::byte_vector.
2126
55b06432
TT
21272017-09-29 Tom Tromey <tom@tromey.com>
2128
2129 * complaints.c (vcomplaint): Use std::string.
2130
8abcee91
TT
21312017-09-29 Tom Tromey <tom@tromey.com>
2132
2133 * tracepoint.c (trace_variable_command): Use std::string.
2134 (encode_actions_1): Remove unused declarations.
2135 (create_tsv_from_upload): Use std::string.
2136
6ad94bc7
TT
21372017-09-29 Tom Tromey <tom@tromey.com>
2138
2139 * cp-support.c (gdb_demangle): Use std::string.
2140
2003f3d8
TT
21412017-09-29 Tom Tromey <tom@tromey.com>
2142
2143 * stack.c (parse_frame_specification): Use std::string
2144 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2145
8f8accb5
TT
21462017-09-29 Tom Tromey <tom@tromey.com>
2147
2148 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2149
200aa7b1
TT
21502017-09-29 Tom Tromey <tom@tromey.com>
2151
2152 * utils.c (vfprintf_maybe_filtered): Use std::string.
2153 (vfprintf_unfiltered): Likewise.
2154
606aae8a
TT
21552017-09-29 Tom Tromey <tom@tromey.com>
2156
2157 * event-top.c (top_level_prompt): Return std::string.
2158 (display_gdb_prompt): Update.
2159
bd413795
TT
21602017-09-29 Tom Tromey <tom@tromey.com>
2161
2162 * unittests/common-utils-selftests.c (format): New function.
2163 (string_vprintf_tests): New function.
2164 (_initialize_common_utils_selftests): Register new tests.
2165 * common/common-utils.c (string_vprintf): New function.
2166 * common/common-utils.h (string_vprintf): Declare.
2167
256642e8
PA
21682017-09-29 Pedro Alves <palves@redhat.com>
2169
2170 * common/rsp-low.c (unpack_varlen_hex): Constify.
2171 * common/rsp-low.h (unpack_varlen_hex): Constify.
2172 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2173 Constify.
2174 * remote.c (remote_set_permissions, read_ptid)
2175 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2176 (remote_static_tracepoint_marker_at)
2177 (remote_static_tracepoint_markers_by_strid)
2178 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2179 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2180 (parse_tracepoint_definition, parse_tsv_definition)
2181 (parse_static_tracepoint_marker_definition): Constify.
2182 * tracepoint.h (parse_static_tracepoint_marker_definition)
2183 (parse_trace_status, parse_tracepoint_status)
2184 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2185
b6bb3468
PA
21862017-09-29 Pedro Alves <palves@redhat.com>
2187
2188 * remote.c (target_buf, target_buf_size): Delete.
2189 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2190 Use the connection's packet buffer instead.
2191 All callers adjusted.
2192 (_initialize_remote): Remove references to target_buf and
2193 target_buf_size.
2194
b2f8eb7a
PA
21952017-09-28 Pedro Alves <palves@redhat.com>
2196
2197 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2198 unittests/common-utils-selftests.c.
2199 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2200 (COMMON_OBS): Remove utils-selftests.o.
2201 * utils-selftests.c: Move to ...
2202 * unittests/common-utils-selftests.c: ... here and rename self
2203 test to "string_printf".
2204
08302ed2
DE
22052017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2206
2207 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2208 having NULL cus or tus.
2209
96a5a1d3
UW
22102017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2211
2212 * arm-tdep.c: (convert_from_extended): Remove.
2213 (convert_to_extended): Likewise.
2214 (arm_extract_return_value): Use convert_typed_floating.
2215 (arm_store_return_value): Likewise.
2216
2217 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2218 * sh-tdep.c: Do not include "floatformat.h".
2219 (sh_littlebyte_bigword_type): New function.
2220 (sh_register_convert_to_virtual): Use convert_typed_floating.
2221 (sh_register_convert_to_raw): Likewise.
2222 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2223 (sh64_littlebyte_bigword_type): New function.
2224 (sh64_extract_return_value): Use convert_typed_floating.
2225 (sh64_register_convert_to_virtual): Likewise.
2226 (sh64_register_convert_to_raw): Likewise.
2227
0db7851f
UW
22282017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2229
2230 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2231 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2232
2233 * gdbtypes.h (union type_specific): Make field floatformat hold
2234 just a single struct floatformat, not an array.
2235 (floatformat_from_type): Move here.
2236 * gdbtypes.c (floatformat_from_type): Move here. Update to
2237 changed TYPE_FLOATFORMAT definition.
2238 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2239 (recursive_dump_type): Likewise.
2240 (init_float_type): Install correct floatformat for byte order.
2241 (arch_float_type): Likewise.
2242
77b7c781
UW
22432017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2244
2245 * gdbtypes.c (init_type): Change incoming argument from
2246 length-in-bytes to length-in-bits. Assert length is a
2247 multiple of TARGET_CHAR_BITS.
2248 (arch_type, arch_flags_type): Likewise.
2249 (init_integer_type): Update call to init_type.
2250 (init_character_type): Likewise.
2251 (init_boolean_type): Likewise.
2252 (init_float_type): Likewise.
2253 (init_decfloat_type): Likewise.
2254 (init_complex_type): Likewise.
2255 (init_pointer_type): Likewise.
2256 (objfile_type): Likewise.
2257 (arch_integer_type): Update call to arch_type.
2258 (arch_character_type): Likewise.
2259 (arch_boolean_type): Likewise.
2260 (arch_float_type): Likewise.
2261 (arch_decfloat_type): Likewise.
2262 (arch_complex_type): Likewise.
2263 (arch_pointer_type): Likewise.
2264 (gdbtypes_post_init): Likewise.
2265
2266 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2267 (read_base_type): Likewise.
2268 * mdebugread.c (basic_type): Likewise.
2269 * stabsread.c (dbx_init_float_type): Likewise.
2270 (rs6000_builtin_type): Likewise.
2271 (read_range_type): Likewise. Also, fix call to init_integer_type
2272 with erroneous length argument.
2273
2274 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2275 * d-lang.c (build_d_types): Likewise.
2276 * f-lang.c (build_fortran_types): Likewise.
2277 * go-lang.c (build_go_types): Likewise.
2278 * opencl-lang.c (build_opencl_types): Likewise.
2279 * jit.c (finalize_symtab): Likewise.
2280 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2281 (build_std_type_info_type): Likewise.
2282 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2283 update call to arch_flags_type.
2284
2285 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2286 arch_type.
2287 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2288 * windows-tdep.c (windows_get_tlb_type): Likewise.
2289
2290 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2291 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2292 * m32c-tdep.c (make_types): Likewise.
2293 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2294 (rl78_psw_type): Update call to arch_flags_type.
2295 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2296 * rx-tdep.c (rx_psw_type): Likewise.
2297 (rx_fpsw_type): Likewise.
2298 * sparc-tdep.c (sparc_psr_type): Likewise.
2299 (sparc_fsr_type): Likewise.
2300 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2301 (sparc64_ccr_type): Likewise.
2302 (sparc64_fsr_type): Likewise.
2303 (sparc64_fprs_type): Likewise.
2304
f21b4d5c
TT
23052017-09-27 Tom Tromey <tom@tromey.com>
2306
2307 * findcmd.c (find_command): Constify.
2308
643c2ffa
TT
23092017-09-27 Tom Tromey <tom@tromey.com>
2310
2311 * ada-tasks.c (task_command_1, task_command): Constify.
2312
510e5e56
TT
23132017-09-27 Tom Tromey <tom@tromey.com>
2314
2315 * symtab.c (maintenance_print_symbol_cache)
2316 (maintenance_flush_symbol_cache)
2317 (maintenance_print_symbol_cache_statistics): Constify.
2318
e503b191
TT
23192017-09-27 Tom Tromey <tom@tromey.com>
2320
2321 * inferior.c (detach_inferior_command, kill_inferior_command)
2322 (inferior_command): Constify.
2323
4e001312
TT
23242017-09-27 Tom Tromey <tom@tromey.com>
2325
2326 * regcache.c (regcache_print, maintenance_print_registers)
2327 (maintenance_print_raw_registers)
2328 (maintenance_print_cooked_registers)
2329 (maintenance_print_register_groups)
2330 (maintenance_print_remote_registers): Constify.
2331
77763700
TT
23322017-09-27 Tom Tromey <tom@tromey.com>
2333
2334 * printcmd.c (map_display_numbers, undisplay_command)
2335 (enable_disable_display_command, enable_display_command)
2336 (disable_display_command): Constify.
2337
4495129a
TT
23382017-09-27 Tom Tromey <tom@tromey.com>
2339
2340 * breakpoint.h (delete_command): Don't declare.
2341 * breakpoint.c (delete_command, enable_once_command)
2342 (enable_count_command, enable_delete_command, breakpoint_1)
2343 (maintenance_info_breakpoints, stopin_command, stopat_command)
2344 (delete_command, delete_trace_command, save_breakpoints)
2345 (save_breakpoints_command, save_tracepoints_command): Constify.
2346
3088cf40
TT
23472017-09-27 Tom Tromey <tom@tromey.com>
2348
2349 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2350 (skip_ws, extract_identifier, macro_define_command)
2351 (macro_undef_command, macro_list_command): Constify.
2352
69f476a3
TT
23532017-09-27 Tom Tromey <tom@tromey.com>
2354
2355 * infcmd.c (environment_info, set_environment_command)
2356 (unset_environment_command, path_info, info_proc_cmd_1)
2357 (info_proc_cmd_mappings, info_proc_cmd_stat)
2358 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2359 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2360
c4a3e68e
TT
23612017-09-27 Tom Tromey <tom@tromey.com>
2362
2363 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2364 Constify.
2365
c9d31bd6
TT
23662017-09-27 Tom Tromey <tom@tromey.com>
2367
2368 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2369
1f3f85eb
TT
23702017-09-27 Tom Tromey <tom@tromey.com>
2371
2372 * demangle.c (demangle_command): Constify.
2373
9c504b5d
TT
23742017-09-27 Tom Tromey <tom@tromey.com>
2375
2376 * progspace.c (maintenance_info_program_spaces_command):
2377 Constify.
2378
6663cf91
TT
23792017-09-27 Tom Tromey <tom@tromey.com>
2380
2381 * compile/compile.c (check_raw_argument, compile_file_command)
2382 (compile_code_command, compile_print_command): Constify.
2383
34e5fa26
TT
23842017-09-27 Tom Tromey <tom@tromey.com>
2385
2386 * reggroups.c (maintenance_print_reggroups): Constify.
2387
8384c356
TT
23882017-09-27 Tom Tromey <tom@tromey.com>
2389
2390 * dwarf2read.c (save_gdb_index_command): Constify.
2391
884beb0c
TT
23922017-09-27 Tom Tromey <tom@tromey.com>
2393
2394 * stap-probe.c (info_probes_stap_command): Constify.
2395
e0b2930c
TT
23962017-09-27 Tom Tromey <tom@tromey.com>
2397
2398 * fork-child.c (unset_exec_wrapper_command): Constify.
2399
f938677d
TT
24002017-09-27 Tom Tromey <tom@tromey.com>
2401
2402 * btrace.c (get_uint, get_context_size, no_chunk)
2403 (maint_btrace_packet_history_cmd)
2404 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2405 (maint_info_btrace_cmd): Constify.
2406
8949cb87
TT
24072017-09-27 Tom Tromey <tom@tromey.com>
2408
2409 * reverse.c (delete_bookmark_command): Constify.
2410
ac88e2de
TT
24112017-09-27 Tom Tromey <tom@tromey.com>
2412
2413 * remote.c (set_memory_packet_size)
2414 (set_memory_write_packet_size, show_memory_write_packet_size)
2415 (set_memory_read_packet_size, show_memory_read_packet_size)
2416 (compare_sections_command, packet_command, remote_put_command)
2417 (remote_get_command, remote_delete_command): Constify.
2418
bd4c9dfe
TT
24192017-09-27 Tom Tromey <tom@tromey.com>
2420
2421 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2422 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2423 (set_mipsfpu_auto_command): Constify.
2424
5e93d4c6
TT
24252017-09-27 Tom Tromey <tom@tromey.com>
2426
2427 * cli/cli-cmds.h (cd_command): Constify.
2428 * cli/cli-cmds.c (cd_command): Constify.
2429
fc41a75b
TT
24302017-09-27 Tom Tromey <tom@tromey.com>
2431
2432 * thread.c (thread_name_command, thread_find_command): Constify.
2433
67810076
TT
24342017-09-27 Tom Tromey <tom@tromey.com>
2435
2436 * probe.c (enable_probes_command, disable_probes_command):
2437 Constify.
2438
1d8b34a7
TT
24392017-09-27 Tom Tromey <tom@tromey.com>
2440
2441 * symfile.c (symbol_file_command): Constify.
2442 * gdbcore.h (deprecated_file_changed_hook): Constify.
2443 * exec.c (deprecated_file_changed_hook, exec_file_command)
2444 (file_command): Constify.
2445 * defs.h (symbol_file_command): Constify.
2446
442019e1
TT
24472017-09-27 Tom Tromey <tom@tromey.com>
2448
2449 * remote-fileio.c (set_system_call_allowed)
2450 (show_system_call_allowed): Constify.
2451
2983f7cb
TT
24522017-09-27 Tom Tromey <tom@tromey.com>
2453
2454 * tracepoint.c (delete_trace_variable_command)
2455 (tfind_end_command, tfind_start_command, tfind_pc_command)
2456 (tfind_tracepoint_command, tfind_line_command)
2457 (tfind_range_command, tfind_outside_command): Constify.
2458
4fd41b24
TT
24592017-09-27 Tom Tromey <tom@tromey.com>
2460
2461 * ax-gdb.c (maint_agent_printf_command, agent_command)
2462 (agent_eval_command): Constify.
2463
f2fc3015
TT
24642017-09-27 Tom Tromey <tom@tromey.com>
2465
2466 * tracepoint.c (info_scope_command): Constify.
2467 * python/python.c (gdbpy_decode_line): Constify.
2468 * python/py-breakpoint.c (bppy_init): Constify.
2469 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2470 * location.h: (new_linespec_location)
2471 (string_to_event_location_basic, string_to_event_location):
2472 Constify.
2473 * location.c (new_linespec_location)
2474 (string_to_event_location_basic, string_to_event_location):
2475 Constify.
2476 * linespec.h (decode_line_with_current_source)
2477 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2478 * linespec.c (linespec_lex_to_end)
2479 (decode_line_with_current_source)
2480 (decode_line_with_last_displayed): Constify.
2481 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2482 Constify.
2483 * cli/cli-cmds.c (edit_command, list_command): Constify.
2484 * breakpoint.h (until_break_command, watch_command_wrapper)
2485 (awatch_command_wrapper, rwatch_command_wrapper)
2486 (init_ada_exception_breakpoint): Constify.
2487 * breakpoint.c (break_command_1, dprintf_command)
2488 (break_range_command, watch_command_wrapper)
2489 (rwatch_command_wrapper, awatch_command_wrapper)
2490 (until_break_command, init_ada_exception_breakpoint)
2491 (strace_marker_create_sals_from_location, trace_command)
2492 (ftrace_command, strace_command, struct tracepoint): Constify.
2493 * ax-gdb.c (agent_command_1): Constify.
2494 * ada-lang.c (ada_exception_sal): Constify.
2495
8c2f95f4
TT
24962017-09-27 Tom Tromey <tom@tromey.com>
2497
2498 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2499 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2500 (get_context_size, no_chunk, get_insn_history_modifiers)
2501 (cmd_record_insn_history, get_call_history_modifiers)
2502 (cmd_record_call_history): Constify.
2503
a0d65762
TT
25042017-09-27 Tom Tromey <tom@tromey.com>
2505
2506 * source.c (show_substitute_path_command)
2507 (unset_substitute_path_command, set_substitute_path_command):
2508 Constify.
2509
58971144
TT
25102017-09-27 Tom Tromey <tom@tromey.com>
2511
2512 * typeprint.c (maintenance_print_type): Constify.
2513 * maint.c (maintenance_dump_me, maintenance_demangle)
2514 (maintenance_time_display, maintenance_info_sections)
2515 (maintenance_print_statistics, maintenance_deprecate)
2516 (maintenance_undeprecate): Constify.
2517 (maintenance_do_deprecate): Constify. Use std::string.
2518 (maintenance_selftest): Constify.
2519 * gdbtypes.h (maintenance_print_type): Constify.
2520
c482f52c
TT
25212017-09-27 Tom Tromey <tom@tromey.com>
2522
2523 * hppa-tdep.c (unwind_command): Constify.
2524
e100df1a
TT
25252017-09-27 Tom Tromey <tom@tromey.com>
2526
2527 * target-descriptions.c (unset_tdesc_filename_cmd)
2528 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2529 Constify.
2530
31d56ade
TT
25312017-09-27 Tom Tromey <tom@tromey.com>
2532
2533 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2534
b961da0b
TT
25352017-09-27 Tom Tromey <tom@tromey.com>
2536
2537 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2538
e2d8ae16
TT
25392017-09-27 Tom Tromey <tom@tromey.com>
2540
2541 * tui/tui-regs.c (tui_reg_command): Constify.
2542
863779b0
TT
25432017-09-27 Tom Tromey <tom@tromey.com>
2544
2545 * skip.c (skip_file_command, skip_function_command)
2546 (skip_enable_command, skip_disable_command, skip_delete_command):
2547 Constify.
2548
cdb34d4a
TT
25492017-09-27 Tom Tromey <tom@tromey.com>
2550
2551 * record-btrace.c (cmd_record_btrace_bts_start)
2552 (cmd_record_btrace_pt_start): Constify.
2553
e99c83e7
TT
25542017-09-27 Tom Tromey <tom@tromey.com>
2555
2556 * symmisc.c (maintenance_print_symbols)
2557 (maintenance_print_msymbols, maintenance_print_objfiles)
2558 (maintenance_info_symtabs, maintenance_check_symtabs)
2559 (maintenance_expand_symtabs, maintenance_info_line_tables):
2560 Constify.
2561
32faf971
TT
25622017-09-27 Tom Tromey <tom@tromey.com>
2563
2564 * top.c (new_ui_command): Constify.
2565
2cf311eb
TT
25662017-09-27 Tom Tromey <tom@tromey.com>
2567
2568 * symfile.c (add_symbol_file_command)
2569 (remove_symbol_file_command, list_overlays_command)
2570 (map_overlay_command, unmap_overlay_command)
2571 (overlay_auto_command, overlay_manual_command)
2572 (overlay_off_command, overlay_load_command): Constify.
2573
e6738699
TT
25742017-09-27 Tom Tromey <tom@tromey.com>
2575
2576 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2577 (info_spu_mailbox_command, info_spu_dma_command)
2578 (info_spu_proxydma_command): Constify.
2579
aa360cd5
TT
25802017-09-27 Tom Tromey <tom@tromey.com>
2581
2582 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2583
898241a5
TT
25842017-09-27 Tom Tromey <tom@tromey.com>
2585
2586 * cli/cli-script.c (user_defined_command): Constify.
2587
2d0ac106
TT
25882017-09-27 Tom Tromey <tom@tromey.com>
2589
2590 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2591 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2592 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2593 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2594 (dump_binary_value, append_binary_memory, append_binary_value):
2595 Constify.
2596 (struct dump_context) <func>: Constify.
2597 (add_dump_command): Update.
2598
dede02ce
TT
25992017-09-27 Tom Tromey <tom@tromey.com>
2600
2601 * cli/cli-cmds.c (show_version, show_configuration)
2602 (source_command, show_user): Constify.
2603
d3cb6b99
TT
26042017-09-27 Tom Tromey <tom@tromey.com>
2605
2606 * target.c (maintenance_print_target_stack): Constify.
2607
1970a12f
TT
26082017-09-27 Tom Tromey <tom@tromey.com>
2609
2610 * interps.c (interpreter_exec_cmd): Constify.
2611
41243651
TT
26122017-09-27 Tom Tromey <tom@tromey.com>
2613
2614 * record-full.c (cmd_record_full_restore): Constify.
2615
4465d9db
TT
26162017-09-27 Tom Tromey <tom@tromey.com>
2617
2618 * memattr.c (enable_mem_command, disable_mem_command)
2619 (delete_mem_command): Constify.
2620
ad25e423
TT
26212017-09-27 Tom Tromey <tom@tromey.com>
2622
2623 * value.c (show_convenience): Constify.
2624
d64097b1
TT
26252017-09-27 Tom Tromey <tom@tromey.com>
2626
2627 * gdbcore.h (core_file_command): Update.
2628 * corefile.c (core_file_command): Constify.
2629
4d4589ef
TT
26302017-09-27 Tom Tromey <tom@tromey.com>
2631
2632 * user-regs.c (maintenance_print_user_registers): Constify.
2633
32a7bf17
TT
26342017-09-27 Tom Tromey <tom@tromey.com>
2635
2636 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2637
4a475551
TT
26382017-09-27 Tom Tromey <tom@tromey.com>
2639
2640 * cp-support.c (first_component_command): Constify.
2641
990b9f9f
TT
26422017-09-27 Tom Tromey <tom@tromey.com>
2643
2644 * psymtab.c (maintenance_print_psymbols)
2645 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2646 Constify.
2647
c281872e
TT
26482017-09-27 Tom Tromey <tom@tromey.com>
2649
2650 * windows-tdep.c (display_tib): Constify.
2651
5b64bf74
TT
26522017-09-27 Tom Tromey <tom@tromey.com>
2653
2654 * linux-fork.c (delete_checkpoint_command)
2655 (detach_checkpoint_command): Constify.
2656
4ada038f
TT
26572017-09-27 Tom Tromey <tom@tromey.com>
2658
2659 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2660
57f5a81b
TT
26612017-09-27 Tom Tromey <tom@tromey.com>
2662
2663 * arc-tdep.c (dump_arc_instruction_command): Constify.
2664
b0a8e6c4
TT
26652017-09-27 Tom Tromey <tom@tromey.com>
2666
2667 * valprint.c (set_radix, show_radix): Constify.
2668
8d97dc1c
TT
26692017-09-27 Tom Tromey <tom@tromey.com>
2670
2671 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2672
eb7c454d
TT
26732017-09-27 Tom Tromey <tom@tromey.com>
2674
2675 * command.h (not_just_help_class_command): Update.
2676 * cli/cli-decode.h (not_just_help_class_command): Update.
2677 * cli/cli-decode.c (not_just_help_class_command): Constify.
2678
e4e33335
TT
26792017-09-27 Tom Tromey <tom@tromey.com>
2680
2681 * gdb_bfd.c (maintenance_info_bfds): Constify.
2682
0450cc4c
TT
26832017-09-27 Tom Tromey <tom@tromey.com>
2684
2685 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2686 overloads.
2687 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2688 (do_const_cfunc): New function.
2689 (cmd_cfunc_eq): New overload.
2690 (cli_user_command_p): Check do_const_cfunc.
2691 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2692 const_cfunc.
2693 * command.h (add_cmd): Add const overload and no-function
2694 overload.
2695 (set_cmd_cfunc): Add const overload.
2696 (cmd_const_cfunc_ftype): Declare.
2697 (cmd_cfunc_eq): Add const overload.
2698 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2699 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2700 overload.
2701
a9bbfbd8
TT
27022017-09-27 Tom Tromey <tom@tromey.com>
2703
2704 * macroexp.c (get_next_token_for_substitution): New function.
2705 (substitute_args): Call it. Check for __VA_OPT__.
2706
5230b05a
WT
27072017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2708 Pedro Alves <palves@redhat.com>
2709
2710 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2711 producer_is_icc_lt_14.
2712 (producer_is_icc_lt_14): New function.
2713 (check_producer): Add code for checking version of ICC.
2714 (producer_is_icc): Move to producer.c.
2715 (read_structure_type): Restrict ICC workaround to ICC<14.
2716 * producer.c: Include selftest.h.
2717 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2718 New functions.
2719 * producer.h (producer_is_icc): New declaration.
2720
b32b108a
WT
27212017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2722
2723 * Makefile.in (SFILES): Add producer.c.
2724 (COMMON_OBS): Add producer.o
2725 * amd64-tdep.c (producer.h): Add new include.
2726 * dwarf2read.c (producer.h): Add new include.
2727 * producer.c: New file.
2728 * producer.h: New file.
2729 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2730 producer.c.
2731 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2732 producer.h.
2733
5007d765
MK
27342017-09-26 Matthias Klose <doko@ubuntu.com>
2735
2736 * configure.ac: Search ncursesw before ncurses.
2737 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2738 * gdb_curses.h: Include <ncursesw/ncurses.h>
2739 * config.in, configure: Regenerate.
2740
281c4447
RO
27412017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2742
2743 PR gdb/22185
2744 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2745 obsolete.
2746 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2747 Remove i386sol2 support.
2748 * configure.nat <i386sol2>: Remove.
2749 <sol2-64>: Fold into ...
2750 <sol2>: ... this.
2751 Move common settings to default section.
2752 Add sol-thread.o.
2753 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2754 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2755 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2756 <i[34567]86-*-solaris*>: Remove.
2757 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2758
2759 * configure.ac: Remove wctype in libw check.
2760 (_MSE_INT_H): Don't define on Solaris 7-9.
2761 <solaris*>: Remove libthread_db.so.1 check.
2762 * configure: Regenerate.
2763 * config.in: Regenerate.
2764
2765 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2766 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2767 (gdb_ps_size_t): Remove.
2768 Use base types in users.
2769 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2770
2771 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2772
39b06c20
RO
27732017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2774
2775 PR build/22206
2776 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2777 (adi_is_addr_mapped): Likewise.
2778 (PSR_ICC): Don't redefine.
2779 (PSR_IMPL): Likewise.
2780
6c3e20f1
TT
27812017-09-25 Tom Tromey <tom@tromey.com>
2782
2783 * regcache.c (regcache::dump): Use string_printf.
2784
b292235f
TT
27852017-09-25 Tom Tromey <tom@tromey.com>
2786
2787 * regcache.c (class regcache_invalidator): New.
2788 (struct register_to_invalidate): Remove.
2789 (make_cleanup_regcache_invalidate): Remove.
2790 (regcache::raw_write): Use regcache_invalidator.
2791
9ac86b52
TT
27922017-09-25 Tom Tromey <tom@tromey.com>
2793
2794 * spu-tdep.c (spu2ppu_sniffer): Update.
2795 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2796 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2797 Remove.
2798 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2799 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2800 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2801 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2802 (frame_pop): Update.
2803
c0e383c6
TT
28042017-09-25 Tom Tromey <tom@tromey.com>
2805
2806 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2807 * regcache.h (regcache_xfree): Don't declare.
2808 * regcache.c (regcache_xfree): Remove.
2809 (do_regcache_xfree): Use delete.
2810 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2811 * linux-fork.c (free_fork): Use delete.
2812 (fork_save_infrun_state): Likewise.
2813 * jit.c (jit_dealloc_cache): Use delete.
2814 * infrun.c (discard_infcall_suspend_state): Use delete.
2815
791199cc
TT
28162017-09-25 Tom Tromey <tom@tromey.com>
2817
2818 * regcache.h (regcache_xmalloc): Don't declare.
2819 (regcache_raw_set_cached_value): Update comment.
2820 * regcache.c (regcache_xmalloc): Remove.
2821 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2822 * jit.c (jit_frame_sniffer): Use new.
2823 * frame.c (frame_save_as_regcache): Use new.
2824
289e23aa
AA
28252017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2826
2827 * NEWS: Advertise support for guarded-storage registers on IBM z.
2828
1b63490c
AA
28292017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2830
2831 * s390-linux-nat.c (have_regset_gs): New static variable.
2832 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2833 control block and guarded-storage broadcast control regsets.
2834 (s390_read_description): Detect whether the target has
2835 guarded-storage support, return appropriate tdesc.
2836 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2837 (features/s390x-gs-linux64.c): Likewise.
2838 (struct gdbarch_tdep) <have_gs>: New field.
2839 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2840 (s390_gsbc_regset): New variables.
2841 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2842 and s390_gsbc_regset, if applicable.
2843 (s390_core_read_description): Check whether core file was from a
2844 target with guarded-storage support; include appropriate regsets.
2845 (s390_gdbarch_init): Add registers for guarded-storage support.
2846 (_initialize_s390_tdep): Initialize new target descriptions that
2847 include registers for guarded-storage support.
2848 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2849 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2850 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2851 (S390_NUM_REGS): Adjust macro definition.
2852 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2853 (tdesc_s390x_gs_linux64): New declarations.
2854
96235dc1
AA
28552017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2856
2857 * features/s390-gs-linux64.xml: New file.
2858 * features/s390-gs.xml: New file.
2859 * features/s390-gsbc.xml: New file.
2860 * features/s390x-gs-linux64.xml: New file.
2861 * features/Makefile (WHICH): Add s390-gs-linux64 and
2862 s390x-gs-linux64.
2863 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2864 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2865 * features/s390-gs-linux64.c: New generated file.
2866 * features/s390x-gs-linux64.c: New file.
2867 * regformats/s390-gs-linux64.dat: New file.
2868 * regformats/s390x-gs-linux64.dat: New file.
2869
b4a7c699
TT
28702017-09-23 Tom Tromey <tom@tromey.com>
2871
2872 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2873
c2f97536
TT
28742017-09-22 Tom Tromey <tom@tromey.com>
2875
2876 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2877 type to scoped_restore_tmpl.
2878 <scoped_input_handler>: Initialize m_quit_handler directly.
2879
43573013
SDJ
28802017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2881
2882 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2883 (cd_command): Likewise. Free "current_directory" before
2884 assigning to it.
2885 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2886 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2887 * top.c (gdb_dirbuf): Remove global declaration.
2888 * top.h (gdb_dirbuf): Likewise.
2889
6ec2e0f5
SDJ
28902017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2891
2892 * gnulib/aclocal.m4: Regenerate.
2893 * gnulib/config.in: Regenerate.
2894 * gnulib/configure: Regenerate.
2895 * gnulib/import/Makefile.am: Regenerate.
2896 * gnulib/import/Makefile.in: Regenerate.
2897 * gnulib/import/assure.h: New file.
2898 * gnulib/import/at-func.c: Likewise
2899 * gnulib/import/chdir-long.c: New file.
2900 * gnulib/import/chdir-long.h: New file.
2901 * gnulib/import/cloexec.c: New file.
2902 * gnulib/import/cloexec.h: New file.
2903 * gnulib/import/close.c: New file.
2904 * gnulib/import/closedir.c: New file.
2905 * gnulib/import/dirent-private.h: New file.
2906 * gnulib/import/dup-safer.c: New file.
2907 * gnulib/import/dup.c: New file.
2908 * gnulib/import/dup2.c: New file.
2909 * gnulib/import/error.c: New file.
2910 * gnulib/import/error.h: New file.
2911 * gnulib/import/exitfail.c: New file.
2912 * gnulib/import/exitfail.h: New file.
2913 * gnulib/import/fchdir.c: New file.
2914 * gnulib/import/fcntl.c: New file.
2915 * gnulib/import/fcntl.in.h: New file.
2916 * gnulib/import/fd-hook.c: New file.
2917 * gnulib/import/fd-hook.h: New file.
2918 * gnulib/import/fd-safer.c: New file.
2919 * gnulib/import/fdopendir.c: New file.
2920 * gnulib/import/filename.h: New file.
2921 * gnulib/import/filenamecat-lgpl.c: New file.
2922 * gnulib/import/filenamecat.h: New file.
2923 * gnulib/import/fstat.c: New file.
2924 * gnulib/import/fstatat.c: New file.
2925 * gnulib/import/getcwd-lgpl.c: New file.
2926 * gnulib/import/getcwd.c: New file.
2927 * gnulib/import/getdtablesize.c: New file.
2928 * gnulib/import/getlogin_r.c: New file.
2929 * gnulib/import/getprogname.c: New file.
2930 * gnulib/import/getprogname.h: New file.
2931 * gnulib/import/gettext.h: New file.
2932 * gnulib/import/glob-libc.h: New file.
2933 * gnulib/import/glob.c: New file.
2934 * gnulib/import/glob.in.h: New file.
2935 * gnulib/import/intprops.h: New file.
2936 * gnulib/import/m4/chdir-long.m4: New file.
2937 * gnulib/import/m4/close.m4: New file.
2938 * gnulib/import/m4/closedir.m4: New file.
2939 * gnulib/import/m4/d-ino.m4: New file.
2940 * gnulib/import/m4/d-type.m4: New file.
2941 * gnulib/import/m4/dup.m4: New file.
2942 * gnulib/import/m4/dup2.m4: New file.
2943 * gnulib/import/m4/error.m4: New file.
2944 * gnulib/import/m4/fchdir.m4: New file.
2945 * gnulib/import/m4/fcntl.m4: New file.
2946 * gnulib/import/m4/fcntl_h.m4: New file.
2947 * gnulib/import/m4/fdopendir.m4: New file.
2948 * gnulib/import/m4/filenamecat.m4: New file.
2949 * gnulib/import/m4/fstat.m4: New file.
2950 * gnulib/import/m4/fstatat.m4: New file.
2951 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
2952 * gnulib/import/m4/getcwd-path-max.m4: New file.
2953 * gnulib/import/m4/getcwd.m4: New file.
2954 * gnulib/import/m4/getdtablesize.m4: New file.
2955 * gnulib/import/m4/getlogin_r.m4: New file.
2956 * gnulib/import/m4/getprogname.m4: New file.
2957 * gnulib/import/m4/glob.m4: New file.
2958 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
2959 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
2960 * gnulib/import/m4/mempcpy.m4: New file.
2961 * gnulib/import/m4/memrchr.m4: New file.
2962 * gnulib/import/m4/mode_t.m4: New file.
2963 * gnulib/import/m4/msvc-inval.m4: New file.
2964 * gnulib/import/m4/msvc-nothrow.m4: New file.
2965 * gnulib/import/m4/open.m4: New file.
2966 * gnulib/import/m4/openat.m4: New file.
2967 * gnulib/import/m4/opendir.m4: New file.
2968 * gnulib/import/m4/readdir.m4: New file.
2969 * gnulib/import/m4/realloc.m4: New file.
2970 * gnulib/import/m4/rewinddir.m4: New file.
2971 * gnulib/import/m4/save-cwd.m4: New file.
2972 * gnulib/import/m4/strdup.m4: New file.
2973 * gnulib/import/m4/strerror.m4: New file.
2974 * gnulib/import/m4/unistd-safer.m4: New file.
2975 * gnulib/import/mempcpy.c: New file.
2976 * gnulib/import/memrchr.c: New file.
2977 * gnulib/import/msvc-inval.c: New file.
2978 * gnulib/import/msvc-inval.h: New file.
2979 * gnulib/import/msvc-nothrow.c: New file.
2980 * gnulib/import/msvc-nothrow.h: New file.
2981 * gnulib/import/open.c: New file.
2982 * gnulib/import/openat-die.c: New file.
2983 * gnulib/import/openat-priv.h: New file.
2984 * gnulib/import/openat-proc.c: New file.
2985 * gnulib/import/openat.c: New file.
2986 * gnulib/import/openat.h: New file.
2987 * gnulib/import/opendir.c: New file.
2988 * gnulib/import/pipe-safer.c: New file.
2989 * gnulib/import/readdir.c: New file.
2990 * gnulib/import/realloc.c: New file.
2991 * gnulib/import/rewinddir.c: New file.
2992 * gnulib/import/save-cwd.c: New file.
2993 * gnulib/import/save-cwd.h: New file.
2994 * gnulib/import/strdup.c: New file.
2995 * gnulib/import/strerror-override.c: New file.
2996 * gnulib/import/strerror-override.h: New file.
2997 * gnulib/import/strerror.c: New file.
2998 * gnulib/import/unistd--.h: New file.
2999 * gnulib/import/unistd-safer.h: New file.
3000 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3001 "getcwd" and "glob".
3002 * ser-tcp.c: Undefine "close" before redefining it.
3003
432ae719
SM
30042017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3005
3006 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3007 get rid of res_val.
3008
4fa7574e
RO
30092017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3010
3011 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3012 <sol2,sparc>: Likewise.
3013 <sol2-64,i386>: Likewise.
3014
3015 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3016 -Wdeprecated-declarations on *-*-solaris*.
3017 * configure: Regenerate.
3018
3019 * procfs.c: Include "nat/inferior.h".
3020 (procfs_info_proc): Fix typo.
3021
f6327dcb
KB
30222017-09-21 Kevin Buettner <kevinb@redhat.com>
3023
3024 * remote.c (vector): Include.
3025 (struct private_thread_info): Add field, thread_handle.
3026 (free_private_thread_info): Deallocate storage associated with
3027 thread handle.
3028 (get_private_info_thread): Initialize `thread_handle' field.
3029 (struct thread_item): Add field, thread_handle.
3030 (clear_threads_listing_context): Deallocate storage associated
3031 with thread handle.
3032 (start_thread): Add support for "handle" attribute.
3033 (thread_attributes): Add "handle".
3034 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3035 field.
3036 (remote_update_thread_list): Update thread_handle.
3037 (remote_thread_handle_to_thread_info): New function.
3038 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3039
fbbe5337
KB
30402017-09-21 Kevin Buettner <kevinb@redhat.com>
3041
3042 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3043 function.
3044 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3045 * python/python-internal.h (thread_object_type): Declare.
3046
e04ee09e
KB
30472017-09-21 Kevin Buettner <kevinb@redhat.com>
3048
3049 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3050 (target_thread_handle_to_thread_info): Declare.
3051 * target.c (target_thread_handle_to_thread_info): New function.
3052 * target-delegates.c: Regenerate.
3053 * gdbthread.h (find_thread_by_handle): Declare.
3054 * thread.c (find_thread_by_handle): New function.
3055 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3056 function.
3057 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3058
1e5b66ed
SM
30592017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3060
3061 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3062
ebe48ba0
SM
30632017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3064
3065 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3066
0a0bf5dc
YQ
30672017-09-21 Yao Qi <yao.qi@linaro.org>
3068
3069 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3070 to gdb_target_obs.
3071
d1b0a7bf
TT
30722017-09-20 Tom Tromey <tom@tromey.com>
3073
3074 * breakpoint.c (struct counted_command_line): Remove.
3075 (breakpoint_commands): Update.
3076 (alloc_counted_command_line, incref_counted_command_line)
3077 (decref_counted_command_line, do_cleanup_counted_command_line)
3078 (make_cleanup_decref_counted_command_line): Remove.
3079 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3080 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3081 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3082 (save_breakpoints): Update.
3083 * breakpoint.h (counted_command_line): Now a typedef to
3084 shared_ptr.
3085 (struct breakpoint) <commands>: Now a counted_command_line.
3086 (struct bpstats) <command>: Likewise.
3087
48649e1b
TT
30882017-09-20 Tom Tromey <tom@tromey.com>
3089
3090 * breakpoint.c (struct commands_info, do_map_commands_command):
3091 Remove.
3092 (commands_command_1): Update.
3093 (iterate_over_related_breakpoints): Take a function_view.
3094 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3095 (delete_command): Update.
3096 (map_breakpoint_numbers): Take a function_view.
3097 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3098 (disable_command): Update.
3099 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3100 (enable_command): Update.
3101 (struct disp_data, do_enable_breakpoint_disp)
3102 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3103 (do_map_enable_delete_breakpoint): Remove.
3104 (enable_once_command, enable_count_command, enable_delete_command)
3105 (delete_trace_variable_command): Update.
3106
04afa70c
TT
31072017-09-20 Tom Tromey <tom@tromey.com>
3108
3109 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3110 (bpstat_clear): Use delete.
3111 (bpstats): New constructors.
3112 (bpstat_copy, bpstat_stop_status): Use new.
3113 (dprintf_after_condition_true): Update.
3114 * breakpoint.h (bpstats::bpstats): Add constructors.
3115 (bpstats::~bpstats): Add destructor.
3116
c83833f4
PA
31172017-09-20 Pedro Alves <palves@redhat.com>
3118
3119 * eval.c (make_params): Delete, refactored as ...
3120 (class fake_method): ... this new type's ctor.
3121 (fake_method::~fake_method): New.
3122 (evaluate_subexp_standard): Use 'fake_method'.
3123
223ffa71
TT
31242017-09-20 Tom Tromey <tom@tromey.com>
3125
3126 * windows-nat.c (get_windows_debug_event, windows_wait)
3127 (do_initial_windows_stuff, windows_attach): Update.
3128 * utils.c (vwarning, internal_vproblem): Update.
3129 (ui_unregister_input_event_handler_cleanup)
3130 (prepare_to_handle_input): Remove.
3131 (class scoped_input_handler): New.
3132 (defaulted_query, prompt_for_continue): Update.
3133 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3134 Update.
3135 * top.c (undo_terminal_modifications_before_exit): Update.
3136 * target/target.h (target_terminal_init, target_terminal_inferior)
3137 (target_terminal_ours): Don't declare.
3138 (class target_terminal): New.
3139 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3140 (target_terminal_ours_for_output)
3141 (make_cleanup_restore_target_terminal): Don't declare.
3142 (target_terminal_info): Remove.
3143 * target.c (enum terminal_state, terminal_state): Remove.
3144 (target_terminal::terminal_state): Define.
3145 (target_terminal::init): Rename from target_terminal_init.
3146 (target_terminal::inferior): Rename from
3147 target_terminal_inferior.
3148 (target_terminal::ours): Rename from target_terminal_ours.
3149 (target_terminal::ours_for_output): Rename from
3150 target_terminal_ours_for_output.
3151 (target_terminal::info): New method.
3152 (cleanup_restore_target_terminal)
3153 (make_cleanup_restore_target_terminal): Remove.
3154 * solib.c (handle_solib_event): Update.
3155 * remote.c (remote_serial_quit_handler): Update.
3156 (remote_terminal_inferior, remote_wait_as): Update.
3157 * record-full.c (record_full_wait_1): Update.
3158 * nto-procfs.c (procfs_create_inferior): Update.
3159 * nat/fork-inferior.c (startup_inferior): Update.
3160 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3161 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3162 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3163 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3164 (mi_breakpoint_created, mi_breakpoint_deleted)
3165 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3166 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3167 (mi_user_selected_context_changed, report_initial_inferior):
3168 Update.
3169 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3170 (linux_nat_terminal_inferior): Update.
3171 * infrun.c (follow_fork_inferior)
3172 (handle_vfork_child_exec_or_exit, do_target_resume)
3173 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3174 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3175 Update.
3176 * inflow.c (child_terminal_init, info_terminal_command): Update.
3177 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3178 (attach_command): Update.
3179 * infcall.c (call_thread_fsm_should_stop): Update.
3180 * gnu-nat.c (gnu_attach): Update.
3181 * extension.c (struct active_ext_lang_state)
3182 (restore_active_ext_lang): Update.
3183 * exceptions.c (print_flush): Update.
3184 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3185 (struct quit_handler_cleanup_data, restore_quit_handler)
3186 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3187 Remove.
3188 * cp-support.c (gdb_demangle): Update.
3189 * breakpoint.c (update_inserted_breakpoint_locations)
3190 (insert_breakpoint_locations, handle_jit_event)
3191 (disable_breakpoints_in_unloaded_shlib): Update.
3192 * annotate.c (annotate_breakpoints_invalid)
3193 (annotate_frames_invalid): Update.
3194
013af3fc
TT
31952017-09-20 Tom Tromey <tom@tromey.com>
3196
3197 * main.c (catch_command_errors): Rename from
3198 catch_command_errors_const.
3199 (captured_main_1): Update.
3200
06871ae8
PA
32012017-09-20 Pedro Alves <palves@redhat.com>
3202
3203 * cli/cli-cmds.c (list_command): Use print_sal_location.
3204 (print_sal_location): New function.
3205 (ambiguous_line_spec): Use print_sal_location.
3206 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3207 * symtab.c (find_function_start_sal): Likewise.
3208 * symtab.h (symtab_and_line::symbol): New field.
3209
e5f25bc5
PA
32102017-09-20 Pedro Alves <palves@redhat.com>
3211
3212 * linespec.c (minsym_found): Handle non-text minsyms.
3213 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3214
1b7fa39e
WT
32152017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3216
3217 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3218 backslash.
3219
37dd0825
WT
32202017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3221
3222 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3223 vmovups instead vmovaps.
3224 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3225
4e5a4f58
JB
32262017-09-19 John Baldwin <jhb@FreeBSD.org>
3227
3228 * NEWS (Changes since GDB 8.0): Add starti.
3229 * infcmd.c (enum run_break): New.
3230 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3231 case.
3232 (run_command): Use enum run_how.
3233 (start_command): Likewise.
3234 (starti_command): New function.
3235 (RUN_ARGS_HELP): New macro.
3236 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3237 commands. Add starti command.
3238
aa70c9f1
YQ
32392017-09-19 Yao Qi <yao.qi@linaro.org>
3240
3241 * Makefile.in (monitor.o): Remove the rule.
3242
d6541620
YQ
32432017-09-19 Yao Qi <yao.qi@linaro.org>
3244
3245 * annotate.h (struct annotate_arg_emitter): Use
3246 DISABLE_COPY_AND_ASSIGN.
3247 * common/refcounted-object.h (refcounted_object): Likewise.
3248 * completer.h (struct completion_result): Likewise.
3249 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3250 * filename-seen-cache.h (filename_seen_cache): Likewise.
3251 * gdbcore.h (thread_section_name): Likewise.
3252 * gdb_regex.h (compiled_regex): Likewise.
3253 * gdbthread.h (scoped_restore_current_thread): Likewise.
3254 * inferior.h (scoped_restore_current_inferior): Likewise.
3255 * jit.c (jit_reader): Likewise.
3256 * linespec.h (struct linespec_result): Likewise.
3257 * mi/mi-parse.h (struct mi_parse): Likewise.
3258 * nat/fork-inferior.c (execv_argv): Likewise.
3259 * progspace.h (scoped_restore_current_program_space): Likewise.
3260 * python/python-internal.h (class gdbpy_enter): Likewise.
3261 * regcache.h (regcache): Likewise.
3262 * target-descriptions.c (struct tdesc_reg): Likewise.
3263 (struct tdesc_type): Likewise.
3264 (struct tdesc_feature): Likewise.
3265 * ui-out.h (ui_out_emit_type): Likewise.
3266
0615127c
SM
32672017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3268
3269 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3270 label abort_expression.
3271
5e187554
SM
32722017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3273
3274 * common/buffer.c (buffer_xml_printf): Adjust.
3275 * common/xml-utils.c (xml_escape_text): Change return type to
3276 std::string, update code accordingly.
3277 * common/xml-utils.h (xml_escape_text): Change return type to
3278 std::string.
3279 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3280 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3281 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3282 Adjust.
3283
c3d7b541
SM
32842017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3285
3286 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3287 (SUBDIR_UNITTESTS_OBS): Add new object file.
3288 * unittests/xml-utils-selftests.c: New file.
3289
1526853e
SM
32902017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3291
3292 * common/selftest.h (selftest): New struct/interface.
3293 (register_test): Add name parameter, add new overload.
3294 (run_tests): Add filter parameter.
3295 (for_each_selftest_ftype): New typedef.
3296 (for_each_selftest): New declaration.
3297 * common/selftest.c (tests): Change type to
3298 map<string, unique_ptr<selftest>>.
3299 (simple_selftest): New struct.
3300 (register_test): New function.
3301 (register_test): Add name parameter and use it.
3302 (run_tests): Add filter parameter and use it. Add prints.
3303 Adjust to vector -> map change.
3304 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3305 registering selftests.
3306 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3307 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3308 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3309 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3310 * findvar.c (_initialize_findvar): Likewise.
3311 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3312 * maint.c (maintenance_selftest): Update call to run_tests.
3313 (maintenance_info_selftests): New function.
3314 (_initialize_maint_cmds): Register "maintenance info selftests"
3315 command. Update "maintenance selftest" doc.
3316 * regcache.c (_initialize_regcache): Add names when registering
3317 selftests.
3318 * rust-exp.y (_initialize_rust_exp): Likewise.
3319 * selftest-arch.c (gdbarch_selftest): New struct.
3320 (gdbarch_tests): Remove.
3321 (register_test_foreach_arch): Add name parameter. Call
3322 register_test.
3323 (tests_with_arch): Remove, move most content to
3324 gdbarch_selftest::operator().
3325 (_initialize_selftests_foreach_arch): Remove.
3326 * selftest-arch.h (register_test_foreach_arch): Add name
3327 parameter.
3328 (run_tests_with_arch): New declaration.
3329 * utils-selftests.c (_initialize_utils_selftests): Add names
3330 when registering selftests.
3331 * utils.c (_initialize_utils): Likewise.
3332 * unittests/array-view-selftests.c
3333 (_initialize_array_view_selftests): Likewise.
3334 * unittests/environ-selftests.c (_initialize_environ_selftests):
3335 Likewise.
3336 * unittests/function-view-selftests.c
3337 (_initialize_function_view_selftests): Likewise.
3338 * unittests/offset-type-selftests.c
3339 (_initialize_offset_type_selftests): Likewise.
3340 * unittests/optional-selftests.c
3341 (_initialize_optional_selftests): Likewise.
3342 * unittests/scoped_restore-selftests.c
3343 (_initialize_scoped_restore_selftests): Likewise.
3344 * NEWS: Document "maintenance selftest" and "maint info
3345 selftests".
3346
5846367a
SM
33472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3348
3349 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3350 scoped_restore.
3351
bd77e8ff
SM
33522017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3353
3354 * mi/mi-main.c (mi_load_progress): Make uiout variable
3355 a unique_ptr.
3356
26a67918
PA
33572017-09-15 Pedro Alves <palves@redhat.com>
3358
3359 * compile/compile-c-types.c (convert_enum, convert_int)
3360 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3361
3f8a7804
SM
33622017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3363
3364 * dwarf2read.c (copy_string): Remove.
3365 (parse_macro_definition): Replace copy_string with savestring.
3366
8d200706
YQ
33672017-09-15 Yao Qi <yao.qi@linaro.org>
3368
3369 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3370 gdb_target_obs.
3371 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3372 Likewise.
3373 (i[34567]86-*-linux*): Likewise.
3374
d185219d
SM
33752017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3376
3377 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3378 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3379 <stack>: Change type to std::vector.
3380 <stack_len, stack_allocated>: Remove.
3381 <grow_stack>: Remove.
3382 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3383 (dwarf_expr_context::~dwarf_expr_context): Remove.
3384 (dwarf_expr_context::grow_stack): Remove.
3385 (dwarf_expr_context::push): Adjust.
3386 (dwarf_expr_context::pop): Adjust.
3387 (dwarf_expr_context::fetch): Adjust.
3388 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3389 (dwarf_expr_context::stack_empty_p): Adjust.
3390 (dwarf_expr_context::execute_stack_op): Adjust.
3391
eccd80d6
SM
33922017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3393
3394 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3395 return type to bool.
3396 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3397
69009882
SM
33982017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3399
3400 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3401 Change type to bool.
3402 (dwarf_stack_value) <in_stack_memory>: Likewise.
3403 (dwarf_expr_context) <push_address>: Change parameter type to
3404 bool.
3405 <fetch_in_stack_memory>: Change return type to bool.
3406 <push>: Change parameter type to bool.
3407 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3408 to bool.
3409 (dwarf_expr_context::push_address): Likewise.
3410 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3411 to bool.
3412 (dwarf_expr_context::execute_stack_op): Adjust.
3413 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3414
1e467161
SM
34152017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3416
3417 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3418 (struct dwarf_expr_context) <n_pieces>: Remove.
3419 <pieces>: Change type to std::vector.
3420 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3421 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3422 pieces.
3423 (dwarf_expr_context::add_piece): Adjust.
3424 * dwarf2loc.c (struct piece_closure): Initialize fields.
3425 <n_pieces>: Remove.
3426 <pieces>: Change type to std::vector.
3427 (allocate_piece_closure): Adjust, change parameter to
3428 std::vector rvalue and std::move it to piece_closure.
3429 (rw_pieced_value): Adjust.
3430 (check_pieced_synthetic_pointer): Adjust.
3431 (indirect_synthetic_pointer): Adjust.
3432 (coerce_pieced_ref): Adjust.
3433 (free_pieced_value_closure): Adjust. Use delete to free
3434 piece_closure.
3435 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3436 to allocate_piece_closure.
3437 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3438
0782db84
SM
34392017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3440
3441 * probe.h (probe_ops_cp): Remove typedef.
3442 (DEF_VEC_P (probe_ops_cp)): Remove.
3443 (all_probe_ops): Change type to std::vector.
3444 * probe.c (info_probes_for_ops): Adjust to vector change.
3445 (probe_linespec_to_ops): Likewise.
3446 (all_probe_ops): Change type to std::vector.
3447 (_initialize_probe): Adjust to vector change.
3448 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3449 * elfread.c (elf_get_probes): Likewise.
3450 * stap-probe.c (_initialize_stap_probe): Likewise.
3451
1eac6bea
SM
34522017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3453
3454 * probe.h (struct bound_probe): Define constructors.
3455 * probe.c (bound_probe_s): Remove typedef.
3456 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3457 (collect_probes): Change return type to std::vector, remove
3458 cleanup.
3459 (compare_probes): Return bool, change parameter type. Change
3460 semantic to "less than".
3461 (gen_ui_out_table_header_info): Change parameter to std::vector
3462 and update.
3463 (exists_probe_with_pops): Likewise.
3464 (info_probes_for_ops): Update to std::vector change.
3465 (enable_probes_command): Likewise.
3466 (disable_probes_command): Likewise.
3467
aaa63a31
SM
34682017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3469
3470 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3471 vec to std::vector.
3472 * probe.c (parse_probes_in_pspace): Update.
3473 (find_probes_in_objfile): Update.
3474 (find_probe_by_pc): Update.
3475 (collect_probes): Update.
3476 (probe_any_get_probes): Update.
3477 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3478 return type to reference to std::vector.
3479 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3480 std::vector and update.
3481 (dtrace_process_dof): Likewise.
3482 (dtrace_get_probes): Likewise.
3483 * elfread.c (elf_get_probes): Change return type to std::vector,
3484 store an std::vector in bfd_data.
3485 (probe_key_free): Update to std::vector.
3486 * stap-probe.c (handle_stap_probe): Change parameter to
3487 std::vector and update.
3488 (stap_get_probes): Likewise.
3489 * symfile-debug.c (debug_sym_get_probes): Change return type to
3490 std::vector and update.
3491
cb85b21b
TT
34922017-09-11 Tom Tromey <tom@tromey.com>
3493
3494 * breakpoint.c (program_breakpoint_here_p): Update.
3495 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3496 from make_show_memory_breakpoints_cleanup. Return a
3497 scoped_restore_tmpl<int>.
3498 (restore_show_memory_breakpoints): Remove.
3499 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3500 * mem-break.c (memory_validate_breakpoint): Update.
3501 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3502 (ia64_memory_remove_breakpoint): Update.
3503 (ia64_breakpoint_from_pc): Update.
3504 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3505 from make_show_memory_breakpoints_cleanup.
3506
8fbc99ef
TT
35072017-09-11 Tom Tromey <tom@tromey.com>
3508
3509 * d-namespace.c (d_lookup_symbol): Use std::string.
3510 (find_symbol_in_baseclass): Likewise.
3511
50feb4bd
TT
35122017-09-11 Tom Tromey <tom@tromey.com>
3513
3514 * ctf.c (ctf_start): Use std::string.
3515
c6dc63a1
TT
35162017-09-11 Tom Tromey <tom@tromey.com>
3517
3518 * ada-lang.c (is_known_support_routine): Update.
3519 (ada_unhandled_exception_name_addr_from_raise): Update.
3520 * guile/scm-frame.c (gdbscm_frame_name): Update.
3521 * python/py-frame.c (frapy_name): Update.
3522 (frapy_function): Update.
3523 * stack.h (find_frame_funname): Update.
3524 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3525 (print_frame): Update.
3526
d6b9b80f
TT
35272017-09-11 Tom Tromey <tom@tromey.com>
3528
3529 * findcmd.c (put_bits): Take a gdb::byte_vector.
3530 (parse_find_args): Return gdb::byte_vector. "args" now const.
3531 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3532 cleanups.
3533 (find_command): Update.
3534
a9921622
TT
35352017-09-11 Tom Tromey <tom@tromey.com>
3536
3537 * cli/cli-script.c (class scoped_restore_hook_in): New.
3538 (clear_hook_in_cleanup): Remove.
3539 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3540 scoped_restore_hook_in.
3541
be0d7abb
TT
35422017-09-11 Tom Tromey <tom@tromey.com>
3543
3544 * cli/cli-script.c (restore_interp): Remove.
3545 (read_command_lines): Use scoped_restore_interp.
3546 * interps.c (scoped_restore_interp::set_temp): Rename from
3547 interp_set_temp.
3548 * interps.h (class scoped_restore_interp): New.
3549 (interp_set_temp): Remove.
3550
00f675ff
TT
35512017-09-11 Tom Tromey <tom@tromey.com>
3552
3553 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3554 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3555 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3556 scoped_restore.
3557 (mi_cmd_break_insert_1): Update.
3558 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3559 scoped_restore.
3560
cb791d59
TT
35612017-09-11 Tom Tromey <tom@tromey.com>
3562
3563 * demangle.c (demangle_command): Update.
3564 * breakpoint.c (disable_command): Update.
3565 (enable_command): Update.
3566 (find_location_by_number): Make "number" const. Use
3567 get_number_trailer.
3568 * cli/cli-utils.c (extract_arg): Return std::string.
3569 * probe.c (parse_probe_linespec): Update. Change types.
3570 (collect_probes): Take string arguments.
3571 (parse_probe_linespec): Likewise.
3572 (info_probes_for_ops): Update.
3573 (enable_probes_command): Update.
3574 (disable_probes_command): Update.
3575 * break-catch-sig.c (catch_signal_split_args): Update.
3576 * mi/mi-parse.c (mi_parse): Update.
3577
2039bd9f
TT
35782017-09-11 Tom Tromey <tom@tromey.com>
3579
3580 * language.h (language_enum): Make argument const.
3581 * language.c (language_enum): Make argument const.
3582
f1735a53
TT
35832017-09-11 Tom Tromey <tom@tromey.com>
3584
3585 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3586 as function.
3587 (skip_to_space): Rename from skip_to_space_const.
3588 * common/common-utils.c (skip_to_space): New function.
3589 (skip_to_space): Rename from skip_to_space_const.
3590 * cli/cli-utils.h (get_number): Rename from get_number_const.
3591 (extract_arg): Rename from extract_arg_const.
3592 * cli/cli-utils.c (get_number): Rename from get_number_const.
3593 (extract_arg): Rename from extract_arg_const.
3594 (number_or_range_parser::get_number): Use ::get_number.
3595 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3596 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3597 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3598 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3599 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3600 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3601 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3602 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3603
7d221d74
TT
36042017-09-11 Tom Tromey <tom@tromey.com>
3605
3606 * python/python.c (do_start_initialization): Use
3607 py-event-types.def to initialize types.
3608 Define all object type structures.
3609 * python/python-internal.h: Don't declare event initialization
3610 functions.
3611 * python/py-threadevent.c (thread_event_object_type): Don't
3612 define.
3613 * python/py-stopevent.c (stop_event_object_type): Don't define.
3614 * python/py-signalevent.c (signal_event_object_type): Don't
3615 declare or define.
3616 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3617 (clear_objfiles_event_object_type): Don't declare or define.
3618 * python/py-infevents.c (inferior_call_pre_event_object_type)
3619 (inferior_call_post_event_object_type)
3620 (register_changed_event_object_type)
3621 (memory_changed_event_object_type): Don't declare or define.
3622 * python/py-inferior.c (new_thread_event_object_type)
3623 (new_inferior_event_object_type)
3624 (inferior_deleted_event_object_type): Don't declare or define.
3625 * python/py-exitedevent.c (exited_event_object_type): Don't
3626 declare or define.
3627 * python/py-evts.c (gdbpy_initialize_py_events): Use
3628 py-all-events.def.
3629 * python/py-events.h (thread_event_object_type): Don't declare.
3630 (events_object): Use py-all-events.def.
3631 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3632 py-event-types.def.
3633 * python/py-event-types.def: New file.
3634 * python/py-continueevent.c (create_continue_event_object): Don't
3635 declare or define.
3636 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3637 declare or define.
3638 * python/py-all-events.def: New file.
3639
35c61a1d
TT
36402017-09-11 Tom Tromey <tom@tromey.com>
3641
3642 * python/py-threadevent.c (create_thread_event_object): Return
3643 gdbpy_ref.
3644 * python/py-stopevent.h (create_stop_event_object)
3645 (create_breakpoint_event_object, create_signal_event_object):
3646 Update.
3647 * python/py-stopevent.c (create_stop_event_object): Return
3648 gdbpy_ref.
3649 (emit_stop_event): Update.
3650 * python/py-signalevent.c (create_signal_event_object): Return
3651 gdbpy_ref.
3652 * python/py-infevents.c (create_inferior_call_event_object):
3653 Update.
3654 * python/py-event.h (create_event_object)
3655 (create_thread_event_object): Update.
3656 * python/py-event.c (create_event_object): Return gdbpy_ref.
3657 * python/py-continueevent.c: Return gdbpy_ref.
3658 * python/py-bpevent.c (create_breakpoint_event_object): Return
3659 gdbpy_ref.
3660
7c96f8c1
TT
36612017-09-11 Tom Tromey <tom@tromey.com>
3662
3663 PR python/15622:
3664 * NEWS: Add entry.
3665 * python/python.c (do_start_initialization): Initialize new event
3666 types.
3667 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3668 (gdbpy_initialize_inferior_deleted_event)
3669 (gdbpy_initialize_new_thread_event): Declare.
3670 * python/py-threadevent.c (create_thread_event_object): Add option
3671 "thread" parameter.
3672 * python/py-inferior.c (new_thread_event_object_type)
3673 (new_inferior_event_object_type)
3674 (inferior_deleted_event_object_type): Declare.
3675 (python_new_inferior, python_inferior_deleted): New functions.
3676 (add_thread_object): Emit new_thread event.
3677 (gdbpy_initialize_inferior): Attach new functions to corresponding
3678 observers.
3679 (new_thread, new_inferior, inferior_deleted): Define new event
3680 types.
3681 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3682 registries.
3683 * python/py-events.h (events_object) <new_inferior,
3684 inferior_deleted, new_thread>: New fields.
3685 * python/py-event.h (create_thread_event_breakpoint): Add optional
3686 "thread" parameter.
3687
72542b8e
AB
36882017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3689
3690 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3691 check current_ui instead.
3692 (internal_vproblem): Likewise.
3693
0d64823e
SM
36942017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3695
3696 * thread.c (print_thread_info_1): Remove unnecessary calls to
3697 uiout->is_mi_like_p.
3698
eb1e02fd
TT
36992017-09-09 Tom Tromey <tom@tromey.com>
3700
3701 * namespace.h (add_using_directive): Update.
3702 * namespace.c (add_using_directive): Change type of excludes to
3703 std::vector.
3704 * dwarf2read.c (read_import_statement): Use std::vector.
3705 (read_namespace): Update.
3706 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3707
0fc21fd8
TT
37082017-09-09 Tom Tromey <tom@tromey.com>
3709
3710 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3711
49663d05
TT
37122017-09-09 Tom Tromey <tom@tromey.com>
3713
3714 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3715
0b868b60
TT
37162017-09-09 Tom Tromey <tom@tromey.com>
3717
3718 * stack.c (func_command): Use gdb::def_vector.
3719
c0470d48
TT
37202017-09-09 Tom Tromey <tom@tromey.com>
3721
3722 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3723 ui_out_emit_list, ui_out_emit_tuple.
3724 (mi_cmd_var_update): Likewise.
3725
ca5909c7
TT
37262017-09-09 Tom Tromey <tom@tromey.com>
3727
3728 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3729 ui_out_redirect_pop.
3730 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3731 ui_out_redirect_pop.
3732 * utils.c (do_ui_out_redirect_pop)
3733 (make_cleanup_ui_out_redirect_pop): Remove.
3734 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3735 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3736 * ui-out.h (ui_out_redirect_pop): New class.
3737
e6a2252a
TT
37382017-09-09 Tom Tromey <tom@tromey.com>
3739
3740 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3741 (list_available_thread_groups, mi_cmd_list_thread_groups)
3742 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3743 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3744 Likewise.
3745
393702cd
TT
37462017-09-09 Tom Tromey <tom@tromey.com>
3747
3748 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3749 ui_out_emit_tuple.
3750
76f9c9cf
TT
37512017-09-09 Tom Tromey <tom@tromey.com>
3752
3753 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3754 * stack.c (print_frame): Use ui_out_emit_tuple.
3755 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3756 (info_spu_mailbox_command, info_spu_dma_command)
3757 (info_spu_proxydma_command): Likewise.
3758 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3759 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3760 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3761 ui_out_emit_tuple.
3762 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3763
dc9fe180
TT
37642017-09-09 Tom Tromey <tom@tromey.com>
3765
3766 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3767 (class ui_out_emit_table): Update comment.
3768 * ui-out.c (do_cleanup_table_end)
3769 (make_cleanup_ui_out_table_begin_end): Remove.
3770 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3771 (info_spu_dma_cmdlist): Likewise.
3772 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3773 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3774 ui_out_emit_table.
3775
f8cc3da6
TT
37762017-09-09 Tom Tromey <tom@tromey.com>
3777
3778 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3779 ui_out_emit_list, gdb::optional.
3780
481695ed
JB
37812017-09-09 John Baldwin <jhb@FreeBSD.org>
3782
3783 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3784 prototype.
3785 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3786 prototype.
3787 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3788 prototype.
3789 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3790 * ada-exp.y: Remove _initialize_ada_exp prototype.
3791 * ada-lang.c: Remove _initialize_ada_language prototype.
3792 * ada-tasks.c: Remove _initialize_tasks prototype.
3793 * addrmap.c: Remove _initialize_addrmap prototype.
3794 * agent.c: Remove _initialize_agent prototype.
3795 * aix-thread.c: Remove _initialize_aix_thread prototype.
3796 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3797 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3798 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3799 prototype.
3800 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3801 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3802 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3803 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3804 prototype.
3805 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3806 prototype.
3807 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3808 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3809 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3810 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3811 prototype.
3812 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3813 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3814 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3815 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3816 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3817 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3818 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3819 prototype.
3820 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3821 prototype.
3822 * annotate.c: Remove _initialize_annotate prototype.
3823 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3824 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3825 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3826 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3827 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3828 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3829 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3830 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3831 prototype.
3832 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3833 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3834 * auto-load.c: Remove _initialize_auto_load prototype.
3835 * auxv.c: Remove _initialize_auxv prototype.
3836 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3837 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3838 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3839 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3840 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3841 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3842 prototype.
3843 * break-catch-throw.c: Remove _initialize_break_catch_throw
3844 prototype.
3845 * breakpoint.c: Remove _initialize_breakpoint prototype.
3846 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3847 * btrace.c: Remove _initialize_btrace prototype.
3848 * charset.c: Remove _initialize_charset prototype.
3849 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3850 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3851 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3852 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3853 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3854 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3855 * coffread.c: Remove _initialize_coffread prototype.
3856 * compile/compile.c: Remove _initialize_compile prototype.
3857 * complaints.c: Remove _initialize_complaints prototype.
3858 * completer.c: Remove _initialize_completer prototype.
3859 * copying.awk: Remove _initialize_copying prototype.
3860 * copying.c: Regenerate.
3861 * core-regset.c: Remove _initialize_core_regset prototype.
3862 * corefile.c: Remove _initialize_core prototype.
3863 * corelow.c: Remove _initialize_corelow prototype.
3864 * cp-abi.c: Remove _initialize_cp_abi prototype.
3865 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3866 * cp-support.c: Remove _initialize_cp_support prototype.
3867 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3868 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3869 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3870 * ctf.c: Remove _initialize_ctf prototype.
3871 * d-lang.c: Remove _initialize_d_language prototype.
3872 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3873 prototype.
3874 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3875 * dbxread.c: Remove _initialize_dbxread prototype.
3876 * dcache.c: Remove _initialize_dcache prototype.
3877 * demangle.c: Remove _initialize_demangler prototype.
3878 * disasm-selftests.c: Remove _initialize_disasm_selftests
3879 prototype.
3880 * disasm.c: Remove _initialize_disasm prototype.
3881 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3882 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3883 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3884 prototype.
3885 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3886 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3887 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3888 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3889 * elfread.c: Remove _initialize_elfread prototype.
3890 * exec.c: Remove _initialize_exec prototype.
3891 * extension.c: Remove _initialize_extension prototype.
3892 * f-lang.c: Remove _initialize_f_language prototype.
3893 * f-valprint.c: Remove _initialize_f_valprint prototype.
3894 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3895 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3896 * filesystem.c: Remove _initialize_filesystem prototype.
3897 * findcmd.c: Remove _initialize_mem_search prototype.
3898 * fork-child.c: Remove _initialize_fork_child prototype.
3899 * frame-base.c: Remove _initialize_frame_base prototype.
3900 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3901 * frame.c: Remove _initialize_frame prototype.
3902 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3903 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3904 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
3905 * gcore.c: Remove _initialize_gcore prototype.
3906 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
3907 * gdbarch.c: Regenerate.
3908 * gdbarch.sh: Remove _initialize_gdbarch prototype.
3909 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
3910 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
3911 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
3912 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
3913 * go-lang.c: Remove _initialize_go_language prototype.
3914 * go32-nat.c: Remove _initialize_go32_nat prototype.
3915 * guile/guile.c: Remove _initialize_guile prototype.
3916 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
3917 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
3918 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
3919 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
3920 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
3921 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
3922 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
3923 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
3924 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
3925 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
3926 prototype.
3927 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
3928 prototype.
3929 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
3930 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
3931 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
3932 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
3933 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
3934 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
3935 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
3936 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
3937 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
3938 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
3939 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
3940 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
3941 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
3942 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3943 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
3944 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
3945 prototype.
3946 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
3947 prototype.
3948 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
3949 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
3950 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
3951 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
3952 * infcall.c: Remove _initialize_infcall prototype.
3953 * infcmd.c: Remove _initialize_infcmd prototype.
3954 * inferior.c: Remove _initialize_inferiors prototype.
3955 * inflow.c: Remove _initialize_inflow prototype.
3956 * infrun.c: Remove _initialize_infrun prototype.
3957 * interps.c: Remove _initialize_interpreter prototype.
3958 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
3959 * jit.c: Remove _initialize_jit prototype.
3960 * language.c: Remove _initialize_language prototype.
3961 * linux-fork.c: Remove _initialize_linux_fork prototype.
3962 * linux-nat.c: Remove _initialize_linux_nat prototype.
3963 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
3964 * linux-thread-db.c: Remove _initialize_thread_db prototype.
3965 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
3966 * m2-lang.c: Remove _initialize_m2_language prototype.
3967 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
3968 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
3969 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
3970 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
3971 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
3972 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3973 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3974 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
3975 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
3976 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
3977 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
3978 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
3979 * machoread.c: Remove _initialize_machoread prototype.
3980 * macrocmd.c: Remove _initialize_macrocmd prototype.
3981 * macroscope.c: Remove _initialize_macroscope prototype.
3982 * maint.c: Remove _initialize_maint_cmds prototype.
3983 * mdebugread.c: Remove _initialize_mdebugread prototype.
3984 * memattr.c: Remove _initialize_mem prototype.
3985 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
3986 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
3987 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
3988 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
3989 * mi/mi-main.c: Remove _initialize_mi_main prototype.
3990 * microblaze-linux-tdep.c: Remove
3991 _initialize_microblaze_linux_tdep prototype.
3992 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
3993 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
3994 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
3995 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
3996 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
3997 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
3998 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
3999 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4000 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4001 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4002 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4003 prototype.
4004 * mipsread.c: Remove _initialize_mipsread prototype.
4005 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4006 prototype.
4007 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4008 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4009 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4010 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4011 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4012 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4013 prototype.
4014 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4015 * nto-procfs.c: Remove _initialize_procfs prototype.
4016 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4017 * objc-lang.c: Remove _initialize_objc_language prototype.
4018 * objfiles.c: Remove _initialize_objfiles prototype.
4019 * observer.c: Remove observer_test_first_notification_function,
4020 observer_test_second_notification_function,
4021 observer_test_third_notification_function, and
4022 _initialize_observer prototypes.
4023 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4024 * osabi.c: Remove _initialize_gdb_osabi prototype.
4025 * osdata.c: Remove _initialize_osdata prototype.
4026 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4027 * parse.c: Remove _initialize_parse prototype.
4028 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4029 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4030 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4031 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4032 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4033 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4034 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4035 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4036 * printcmd.c: Remove _initialize_printcmd prototype.
4037 * probe.c: Remove _initialize_probe prototype.
4038 * proc-api.c: Remove _initialize_proc_api prototype.
4039 * proc-events.c: Remove _initialize_proc_events prototype.
4040 * proc-service.c: Remove _initialize_proc_service prototype.
4041 * procfs.c: Remove _initialize_procfs prototype.
4042 * psymtab.c: Remove _initialize_psymtab prototype.
4043 * python/python.c: Remove _initialize_python prototype.
4044 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4045 * record-btrace.c: Remove _initialize_record_btrace prototype.
4046 * record-full.c: Remove _initialize_record_full prototype.
4047 * record.c: Remove _initialize_record prototype.
4048 * regcache.c: Remove _initialize_regcache prototype.
4049 * reggroups.c: Remove _initialize_reggroup prototype.
4050 * remote-notif.c: Remove _initialize_notif prototype.
4051 * remote-sim.c: Remove _initialize_remote_sim prototype.
4052 * remote.c: Remove _initialize_remote prototype.
4053 * reverse.c: Remove _initialize_reverse prototype.
4054 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4055 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4056 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4057 prototype.
4058 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4059 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4060 * rust-exp.y: Remove _initialize_rust_exp prototype.
4061 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4062 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4063 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4064 * score-tdep.c: Remove _initialize_score_tdep prototype.
4065 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4066 prototype.
4067 * ser-go32.c: Remove _initialize_ser_dos prototype.
4068 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4069 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4070 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4071 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4072 * serial.c: Remove _initialize_serial prototype.
4073 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4074 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4075 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4076 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4077 * skip.c: Remove _initialize_step_skip prototype.
4078 * sol-thread.c: Remove _initialize_sol_thread prototype.
4079 * solib-aix.c: Remove _initialize_solib_aix prototype.
4080 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4081 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4082 * solib-frv.c: Remove _initialize_frv_solib prototype.
4083 * solib-spu.c: Remove _initialize_spu_solib prototype.
4084 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4085 * solib-target.c: Remove _initialize_solib_target prototype.
4086 * solib.c: Remove _initialize_solib prototype.
4087 * source.c: Remove _initialize_source prototype.
4088 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4089 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4090 prototype.
4091 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4092 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4093 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4094 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4095 prototype.
4096 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4097 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4098 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4099 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4100 prototype.
4101 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4102 prototype.
4103 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4104 prototype.
4105 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4106 prototype.
4107 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4108 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4109 prototype.
4110 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4111 prototype.
4112 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4113 prototype.
4114 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4115 prototype.
4116 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4117 prototype.
4118 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4119 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4120 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4121 * stabsread.c: Remove _initialize_stabsread prototype.
4122 * stack.c: Remove _initialize_stack prototype.
4123 * stap-probe.c: Remove _initialize_stap_probe prototype.
4124 * std-regs.c: Remove _initialize_frame_reg prototype.
4125 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4126 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4127 * symfile.c: Remove _initialize_symfile prototype.
4128 * symmisc.c: Remove _initialize_symmisc prototype.
4129 * symtab.c: Remove _initialize_symtab prototype.
4130 * target-dcache.c: Remove _initialize_target_dcache prototype.
4131 * target-descriptions.c: Remove _initialize_target_descriptions
4132 prototype.
4133 * thread.c: Remove _initialize_thread prototype.
4134 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4135 prototype.
4136 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4137 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4138 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4139 prototype.
4140 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4141 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4142 * tracefile.c: Remove _initialize_tracefile prototype.
4143 * tracepoint.c: Remove _initialize_tracepoint prototype.
4144 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4145 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4146 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4147 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4148 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4149 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4150 * tui/tui.c: Remove _initialize_tui prototype.
4151 * typeprint.c: Remove _initialize_typeprint prototype.
4152 * user-regs.c: Remove _initialize_user_regs prototype.
4153 * utils.c: Remove _initialize_utils prototype.
4154 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4155 * valarith.c: Remove _initialize_valarith prototype.
4156 * valops.c: Remove _initialize_valops prototype.
4157 * valprint.c: Remove _initialize_valprint prototype.
4158 * value.c: Remove _initialize_values prototype.
4159 * varobj.c: Remove _initialize_varobj prototype.
4160 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4161 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4162 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4163 * windows-nat.c: Remove _initialize_windows_nat,
4164 _initialize_check_for_gdb_ini, and _initialize_loadable
4165 prototypes.
4166 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4167 * xcoffread.c: Remove _initialize_xcoffread prototype.
4168 * xml-support.c: Remove _initialize_xml_support prototype.
4169 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4170 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4171 prototype.
4172 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4173 prototype.
4174 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4175
a611b5cb
KS
41762017-09-08 Keith Seitz <keiths@redhat.com>
4177
4178 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4179 field.
4180
469412dd
CW
41812017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4182
4183 * f-valprint.c (f_val_print): Remove check for one byte
4184 sized integers. Remove printing of character type.
4185
a5ad232b
FP
41862017-09-08 Frank Penczek <frank.penczek@intel.com>
4187 Christoph Weinmann <christoph.t.weinmann@intel.com>
4188 Bernhard Heckel <bernhard.heckel@intel.com>
4189
4190 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4191 to maintain proper indentation when printing pointers/refs.
4192
e5014227
JB
41932017-09-07 Joel Brobecker <brobecker@adacore.com>
4194
4195 GDB 8.0.1 released.
4196
63c99141
JB
41972017-09-07 Joel Brobecker <brobecker@adacore.com>
4198
4199 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4200
69c1e056
TT
42012017-09-05 Tom Tromey <tom@tromey.com>
4202
4203 * parse.c (funcall_chain): Now a std::vector.
4204 (start_arglist, end_arglist): Simplify.
4205 (free_funcalls): Remove.
4206 (parse_exp_in_context_1): Remove cleanup.
4207
fef704bf
TT
42082017-09-05 Tom Tromey <tom@tromey.com>
4209
4210 * go-exp.y (go_parse): Don't create a cleanup.
4211
5613c585
TT
42122017-09-05 Tom Tromey <tom@tromey.com>
4213
4214 * d-exp.y (PrimaryExpression): Use std::string.
4215 (d_parse): Don't create a cleanup.
4216
eae49211
TT
42172017-09-05 Tom Tromey <tom@tromey.com>
4218
4219 * utils.c (do_clear_parser_state): Remove.
4220 (make_cleanup_clear_parser_state): Remove.
4221 * p-exp.y (pascal_parse): Use scoped_restore.
4222 * m2-exp.y (m2_parse): Use scoped_restore.
4223 * f-exp.y (f_parse): Use scoped_restore.
4224 * d-exp.y (d_parse): Use scoped_restore.
4225 * c-exp.y (c_parse): Use scoped_restore.
4226 * ada-exp.y (ada_parse): Use scoped_restore.
4227 * utils.h (make_cleanup_clear_parser_state): Remove.
4228
73b9be8b
KS
42292017-09-06 Keith Seitz <keiths@redhat.com>
4230
4231 * dwarf2read.c (dw2_linkage_name_attr): New function.
4232 (dw2_linkage_name): New function.
4233 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4234 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4235 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4236
a102602b
KR
42372017-09-06 Kamil Rytarowski <n54@gmx.com>
4238
4239 * config/djgpp/djconfig.sh: Correct shell portability issue.
4240
28ad437d
KR
42412017-09-06 Kamil Rytarowski <n54@gmx.com>
4242
4243 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4244
351787dd
JB
42452017-09-06 John Baldwin <jhb@FreeBSD.org>
4246
4247 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4248 * NEWS: Mention new FreeBSD/mips native configuration.
4249 * configure.host: Add aarch64*-*-freebsd*.
4250 * configure.nat: Likewise.
4251 * aarch64-fbsd-nat.c: New file.
4252
c0f84956
JB
42532017-09-06 John Baldwin <jhb@FreeBSD.org>
4254
4255 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4256 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4257 * NEWS: Mention new FreeBSD/aarch64 target.
4258 * configure.tgt: Add aarch64*-*-freebsd*.
4259 * aarch64-fbsd-tdep.c: New file.
4260 * aarch64-fbsd-tdep.h: New file.
4261
7610297a
KR
42622017-09-06 Kamil Rytarowski <n54@gmx.com>
4263
4264 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4265
fbd1b771
JK
42662017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4267
4268 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4269 of TLS symbols.
4270
5ca79eae
PW
42712017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4272
4273 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4274 call.
4275
bf93d7ba
SM
42762017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4277
4278 * infrun.c (follow_exec): Call add_thread after
4279 target_find_description.
4280
1bb7c059
SM
42812017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4282
4283 * infrun.c (handle_inferior_event_1): When exec'ing, read
4284 stop_pc after follow_exec.
4285
fc809827
SM
42862017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4287
4288 * remote.c (process_g_packet): Update error message.
4289
d2fcdd85
YQ
42902017-09-05 Yao Qi <yao.qi@linaro.org>
4291
4292 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4293 targets.
4294
e69570ee
PA
42952017-09-05 Pedro Alves <palves@redhat.com>
4296
4297 * eval.c (eval_call, evaluate_funcall): New functions, factored
4298 out from ...
4299 (evaluate_subexp_standard): ... this.
4300
22916b07
YQ
43012017-09-05 Yao Qi <yao.qi@linaro.org>
4302
4303 * amd64-tdep.c (amd64_target_description): Create target
4304 descriptions.
4305 (_initialize_amd64_tdep): Don't call functions
4306 initialize_tdesc_amd64_*. Add self tests.
4307 * arch/amd64.c (amd64_create_target_description): Add parameter
4308 is_linux. Call set_tdesc_osabi if is_linux is true.
4309 * arch/amd64.h (amd64_create_target_description): Update the
4310 declaration.
4311 * arch/i386.c (i386_create_target_description): Add parameter
4312 is_linux. Call set_tdesc_osabi if is_linux is true.
4313 * arch/i386.h (i386_create_target_description): Update
4314 declaration.
4315 * configure.tgt: Add i386.o to gdb_target_obs.
4316 * features/Makefile (XMLTOC): Remove i386/*.xml.
4317 * features/i386/amd64-avx-avx512.c: Remove.
4318 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4319 * features/i386/amd64-avx-mpx.c: Remove.
4320 * features/i386/amd64-avx.c: Remove.
4321 * features/i386/amd64-mpx.c: Remove.
4322 * features/i386/amd64.c: Remove.
4323 * features/i386/i386-avx-avx512.c: Remove.
4324 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4325 * features/i386/i386-avx-mpx.c: Remove.
4326 * features/i386/i386-avx.c: Remove.
4327 * features/i386/i386-mmx.c: Remove.
4328 * features/i386/i386-mpx.c: Remove.
4329 * features/i386/i386.c: Remove.
4330 * i386-tdep.c: Don't include features/i386/i386*.c., include
4331 target-descriptions.h and arch/i386.h.
4332 (i386_target_description): Create target descriptions.
4333 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4334 functions. Do self tests.
4335
0854b7b1
YQ
43362017-09-05 Yao Qi <yao.qi@linaro.org>
4337
4338 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4339 * features/i386/amd64-avx-avx512-linux.c: Removed.
4340 * features/i386/amd64-avx-linux.c: Removed.
4341 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4342 * features/i386/amd64-avx-mpx-linux.c: Removed.
4343 * features/i386/amd64-linux.c: Removed.
4344 * features/i386/amd64-mpx-linux.c: Removed.
4345 * features/i386/x32-avx-avx512-linux.c: Removed.
4346 * features/i386/x32-avx-linux.c: Removed.
4347 * features/i386/x32-linux.c: Removed.
4348
b4570e4b
YQ
43492017-09-05 Yao Qi <yao.qi@linaro.org>
4350
4351 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4352 features/i386/*.c.
4353 (amd64_linux_read_description): Call
4354 amd64_create_target_description.
4355 * arch/amd64.c: New file.
4356 * arch/amd64.h: New file.
4357 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4358 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4359
6c73f67f
YQ
43602017-09-05 Yao Qi <yao.qi@linaro.org>
4361
4362 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4363 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4364 (amd64_linux_read_description): Create target descriptions.
4365 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4366 functions. Add unit tests.
4367 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4368 x32-core.xml.
4369 * features/i386/64bit-avx.c: Generated.
4370 * features/i386/64bit-avx512.c: Generated.
4371 * features/i386/64bit-core.c: Generated.
4372 * features/i386/64bit-linux.c: Generated.
4373 * features/i386/64bit-mpx.c: Generated.
4374 * features/i386/64bit-pkeys.c: Generated.
4375 * features/i386/64bit-segments.c: Generated.
4376 * features/i386/64bit-sse.c: Generated.
4377 * features/i386/x32-core.c: Generated.
4378 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4379 c files for amd64-linux and x32-linux.
4380
9d3d478b
YQ
43812017-09-05 Yao Qi <yao.qi@linaro.org>
4382
4383 * amd64-linux-tdep.c (amd64_linux_read_description): New
4384 function.
4385 (amd64_linux_core_read_description): Call
4386 amd64_linux_read_description.
4387 (amd64_linux_init_abi): Likewise.
4388 (amd64_x32_linux_init_abi): Likewise.
4389 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4390 * x86-linux-nat.c (x86_linux_read_description): Call
4391 amd64_linux_read_description.
4392
b9f1d50f
YQ
43932017-09-05 Yao Qi <yao.qi@linaro.org>
4394
4395 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4396 comments.
4397
188c9e6d
YQ
43982017-09-05 Yao Qi <yao.qi@linaro.org>
4399
4400 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4401 * features/i386/i386-avx-avx512-linux.c: Remove.
4402 * features/i386/i386-avx-linux.c: Remove.
4403 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4404 * features/i386/i386-avx-mpx-linux.c: Remove.
4405 * features/i386/i386-linux.c: Remove.
4406 * features/i386/i386-mmx-linux.c: Remove.
4407 * features/i386/i386-mpx-linux.c: Remove.
4408
5f035c07
YQ
44092017-09-05 Yao Qi <yao.qi@linaro.org>
4410
4411 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4412 (SFILES): Add arch/i386.c.
4413 (HFILES_NO_SRCDIR): Add arch/i386.h.
4414 * arch/i386.c: New file.
4415 * arch/i386.h: New file.
4416 * arch/tdesc.h (allocate_target_description): Declare.
4417 (set_tdesc_architecture): Declare.
4418 (set_tdesc_osabi): Declare.
4419 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4420 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4421 include arch/i386.h.
4422 (i386_linux_read_description): Remove code and call
4423 i386_create_target_description.
4424 (set_tdesc_architecture): New function.
4425 (set_tdesc_osabi): New function.
4426 * target-descriptions.h (allocate_target_description): Remove.
4427
0abe8a89
YQ
44282017-09-05 Yao Qi <yao.qi@linaro.org>
4429
4430 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4431 * target-descriptions.c (tdesc_create_feature): Likewise, and
4432 adjust code.
4433 * features/i386/32bit-avx.c: Re-generated.
4434 * features/i386/32bit-avx512.c: Re-generated.
4435 * features/i386/32bit-core.c: Re-generated.
4436 * features/i386/32bit-linux.c: Re-generated.
4437 * features/i386/32bit-mpx.c: Re-generated.
4438 * features/i386/32bit-pkeys.c: Re-generated.
4439 * features/i386/32bit-sse.c: Re-generated.
4440
0a188386
YQ
44412017-09-05 Yao Qi <yao.qi@linaro.org>
4442
4443 * regformats/regdef.h (struct reg): Override operator == and !=.
4444
f49ff000
YQ
44452017-09-05 Yao Qi <yao.qi@linaro.org>
4446
4447 * arch/tdesc.h: New file.
4448 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4449 * target-descriptions.c: Update comments.
4450 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4451 declarations.
4452 * features/i386/32bit-avx.c: Re-generated.
4453 * features/i386/32bit-avx512.c: Re-generated.
4454 * features/i386/32bit-core.c: Re-generated.
4455 * features/i386/32bit-linux.c: Re-generated.
4456 * features/i386/32bit-mpx.c: Re-generated.
4457 * features/i386/32bit-pkeys.c: Re-generated.
4458 * features/i386/32bit-sse.c: Re-generated.
4459
f7000548
YQ
44602017-09-05 Yao Qi <yao.qi@linaro.org>
4461
4462 * regformats/regdat.sh: Update generated code.
4463
c9a5e2a5
YQ
44642017-09-05 Yao Qi <yao.qi@linaro.org>
4465
4466 * regformats/regdat.sh: Adjust code order.
4467
d6b687ac
SM
44682017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4469
4470 * expprint.c (dump_subexp_body_standard): Use constant format
4471 string in fprintf_filtered call.
4472
a379bfd0
JB
44732017-09-04 John Baldwin <jhb@FreeBSD.org>
4474
4475 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4476 NetBSD/i386.
4477 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4478
f7efc967
JB
44792017-09-04 John Baldwin <jhb@FreeBSD.org>
4480
4481 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4482
c49fbc6c
JB
44832017-09-04 John Baldwin <jhb@FreeBSD.org>
4484
4485 * bsd-kvm.o: Define _KMEMUSER.
4486 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4487 * configure: Regenerate.
4488
26562e73
JB
44892017-09-04 John Baldwin <jhb@FreeBSD.org>
4490
4491 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4492 * i386-fbsd-nat.c: Likewise.
4493
31cf1487
JB
44942017-09-04 John Baldwin <jhb@FreeBSD.org>
4495
4496 * unittests/array-view-selftests.c: Add include of <array>.
4497
5b9f8a7c
JB
44982017-09-04 John Baldwin <jhb@FreeBSD.org>
4499
4500 * spu-tdep.c (flush_ea_cache): Add missing argument to
4501 call_function_by_hand.
4502
d69cf9b2
PA
45032017-09-04 Pedro Alves <palves@redhat.com>
4504
4505 * NEWS (Safer support for debugging with no debug info): New.
4506
3693fdb3
PA
45072017-09-04 Pedro Alves <palves@redhat.com>
4508
4509 * c-exp.y (function_method, function_method_void): Add current
4510 instance flags to TYPE_INSTANCE.
4511 * dwarf2read.c (check_modifier): New.
4512 (compute_delayed_physnames): Assert that only C++ adds delayed
4513 physnames. Mark fn_fields as const/volatile depending on
4514 physname.
4515 * eval.c (make_params): New type_instance_flags parameter. Use
4516 it as the new type's instance flags.
4517 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4518 flags element and pass it to make_params.
4519 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4520 instance flags element.
4521 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4522 * gdbtypes.h: Include "enum-flags.h".
4523 (type_instance_flags): New enum-flags type.
4524 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4525 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4526 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4527 (follow_type_instance_flags): New function.
4528 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4529 * parser-defs.h (follow_type_instance_flags): Declare.
4530 * valops.c (value_struct_elt_for_reference): const/volatile must
4531 match too.
4532
e68cb8e0
PA
45332017-09-04 Pedro Alves <palves@redhat.com>
4534
4535 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4536 function/method scopes; lookup the nested name as a function local
4537 static variable.
4538
858be34c
PA
45392017-09-04 Pedro Alves <palves@redhat.com>
4540
4541 (%type <voidval>): Add function_method.
4542 * c-exp.y (exp): New production for calls with no arguments.
4543 (function_method, function_method_void_or_typelist): New
4544 productions.
4545 (exp): New production for "method()::static_var".
4546 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4547 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4548 Handle OP_FUNC_STATIC_VAR.
4549 * parse.c (operator_length_standard):
4550 Handle OP_FUNC_STATIC_VAR.
4551
dd5901a6
PA
45522017-09-04 Pedro Alves <palves@redhat.com>
4553
4554 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4555 handling.
4556 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4557 Ditto.
4558 * parse.c (operator_length_standard, operator_check_standard):
4559 Ditto.
4560 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4561
46a4882b
PA
45622017-09-04 Pedro Alves <palves@redhat.com>
4563
4564 * ax-gdb.c: Include "typeprint.h".
4565 (gen_expr_for_cast): New function.
4566 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4567 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4568 type is unknown.
4569 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4570 nodebug_data_symbol.
4571 * eval.c: Include "typeprint.h".
4572 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4573 Error out if symbol has unknown type.
4574 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4575 evaluate_subexp_for_cast.
4576 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4577 OP_VAR_MSYM_VALUE.
4578 (evaluate_subexp_for_cast): New function.
4579 * gdbtypes.c (init_nodebug_var_type): New function.
4580 (objfile_type): Use it to initialize types of variables with no
4581 debug info.
4582 * typeprint.c (error_unknown_type): New.
4583 * typeprint.h (error_unknown_type): New declaration.
4584 * compile/compile-c-types.c (convert_type_basic): Handle
4585 TYPE_CODE_ERROR; warn and fallback to int for variables with
4586 unknown type.
4587
fe13dfec
PA
45882017-09-04 Pedro Alves <palves@redhat.com>
4589
4590 * eval.c (evaluate_var_value): New function, factored out from ...
4591 (evaluate_subexp_standard): ... here.
4592
d008ee21
PA
45932017-09-04 Pedro Alves <palves@redhat.com>
4594
4595 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4596 Remove useless assignments to 'op'.
4597
827d0c51
PA
45982017-09-04 Pedro Alves <palves@redhat.com>
4599
4600 * eval.c (eval_skip_value): New function.
4601 (evaluate_subexp_standard): Use it.
4602
2c5a2be1
PA
46032017-09-04 Pedro Alves <palves@redhat.com>
4604
4605 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4606 function name from symbol/minsym and pass it to
4607 error_call_unknown_return_type.
4608
74ea4be4
PA
46092017-09-04 Pedro Alves <palves@redhat.com>
4610
4611 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4612 * ax-gdb.c (gen_msym_var_ref): New function.
4613 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4614 * eval.c (evaluate_var_msym_value): New function.
4615 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4616 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4617 to call_function_by_hand.
4618 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4619 Handle OP_VAR_MSYM_VALUE.
4620 (union exp_element) <msymbol>: New field.
4621 * minsyms.h (struct type): Forward declare.
4622 (find_minsym_type_and_address): Declare.
4623 * parse.c (write_exp_elt_msym): New function.
4624 (write_exp_msymbol): Delete, refactored as ...
4625 (find_minsym_type_and_address): ... this new function.
4626 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4627 (operator_length_standard, operator_check_standard): Handle
4628 OP_VAR_MSYM_VALUE.
4629 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4630
7022349d
PA
46312017-09-04 Pedro Alves <palves@redhat.com>
4632
4633 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4634 TYPE_GNU_IFUNC specially here. Throw error if return type is
4635 unknown.
4636 * ada-typeprint.c (print_func_type): Handle functions with unknown
4637 return type.
4638 * c-typeprint.c (c_type_print_base): Handle functions and methods
4639 with unknown return type.
4640 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4641 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4642 * compile/compile-c-types.c: Include "objfiles.h".
4643 (convert_func): For functions with unknown return type, warn and
4644 default to int.
4645 * compile/compile-object-run.c (compile_object_run): Adjust call
4646 to call_function_by_hand_dummy.
4647 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4648 call_function_by_hand.
4649 * eval.c (evaluate_subexp_standard): Adjust calls to
4650 call_function_by_hand. Handle functions and methods with unknown
4651 return type. Pass expect_type to call_function_by_hand.
4652 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4653 return type.
4654 * gcore.c (call_target_sbrk): Adjust call to
4655 call_function_by_hand.
4656 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4657 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4658 an integer address type instead of nodebug.
4659 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4660 call_function_by_hand.
4661 * infcall.c (error_call_unknown_return_type): New function.
4662 (call_function_by_hand): New "default_return_type" parameter.
4663 Pass it down.
4664 (call_function_by_hand_dummy): New "default_return_type"
4665 parameter. Use it instead of defaulting to int. If there's no
4666 default and the return type is unknown, throw an error. If
4667 there's a default return type, and the called function has no
4668 debug info, then assume the function is prototyped.
4669 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4670 New "default_return_type" parameter.
4671 (error_call_unknown_return_type): New declaration.
4672 * linux-fork.c (call_lseek): Cast return type of lseek.
4673 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4674 call_function_by_hand.
4675 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4676 calls to call_function_by_hand.
4677 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4678 return type.
4679 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4680 (value_nsstring, print_object_command): Adjust calls to
4681 call_function_by_hand.
4682 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4683 functions with unknown return type.
4684 (pascal_type_print_func_varspec_suffix): New function.
4685 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4686 TYPE_CODE_METHOD>: Use it.
4687 * python/py-value.c (valpy_call): Adjust call to
4688 call_function_by_hand.
4689 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4690 call_function_by_hand.
4691 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4692 call_function_by_hand.
4693 * valops.c (value_allocate_space_in_inferior): Adjust call to
4694 call_function_by_hand.
4695 * typeprint.c (type_print_unknown_return_type): New function.
4696 * typeprint.h (type_print_unknown_return_type): New declaration.
4697
54990598
PA
46982017-09-04 Pedro Alves <palves@redhat.com>
4699
4700 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4701 types with more than one parameter as prototyped.
4702
9a24775b
PA
47032017-09-04 Pedro Alves <palves@redhat.com>
4704
4705 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4706 (disassemble_command): Use gdb_disassembly_flags instead of bare
4707 int.
4708 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4709 (dump_insns, do_mixed_source_and_assembly_deprecated)
4710 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4711 Use gdb_disassembly_flags instead of bare int.
4712 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4713 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4714 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4715 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4716 (enum gdb_disassembly_flag): ... values of this new enumeration.
4717 (gdb_disassembly_flags): Define.
4718 (gdb_disassembly)
4719 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4720 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4721 gdb_disassembly_flags instead of bare int.
4722 * record-btrace.c (btrace_insn_history)
4723 (record_btrace_insn_history, record_btrace_insn_history_range)
4724 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4725 instead of bare int.
4726 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4727 Use gdb_disassembly_flags instead of bare int.
4728 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4729 Define.
4730 * target-delegates.c: Regenerate.
4731 * target.c (target_insn_history, target_insn_history_from)
4732 (target_insn_history_range): Use gdb_disassembly_flags instead of
4733 bare int.
4734 * target.h: Include "disasm.h".
4735 (struct target_ops) <to_insn_history, to_insn_history_from,
4736 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4737 int.
4738 (target_insn_history, target_insn_history_from)
4739 (target_insn_history_range): Use gdb_disassembly_flags instead of
4740 bare int.
4741
80a65e9b
SM
47422017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4743
4744 * cli/cli-script.c (build_command_line): For if/while commands,
4745 check whether args is empty.
4746
6b66338c
SM
47472017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4748
4749 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4750 (enum command_control_type): Likewise.
4751 (struct command_line): Likewise.
4752 (free_command_lines): Likewise.
4753 (struct command_lines_deleter): Likewise.
4754 (command_line_up): Likewise.
4755 (read_command_lines): Likewise.
4756 (read_command_lines_1): Likewise.
4757 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4758 (enum command_control_type): Likewise.
4759 (struct command_line): Likewise.
4760 (free_command_lines): Likewise.
4761 (struct command_lines_deleter): Likewise.
4762 (command_line_up): Likewise.
4763 (read_command_lines): Likewise.
4764 (read_command_lines_1): Likewise.
4765 * breakpoint.h: Include cli/cli-script.h.
4766 * extension-priv.h: Likewise.
4767 * gdbcmd.h: Likewise.
4768
51abb421
PA
47692017-09-04 Pedro Alves <palves@redhat.com>
4770
4771 * ada-lang.c (is_known_support_routine): Move sal declaration to
4772 where it is initialized.
4773 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4774 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4775 (clear_command, update_static_tracepoint): Remove init_sal
4776 references. Move declarations closer to initializations.
4777 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4778 initializations.
4779 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4780 references. Move sal declarations closer to initializations.
4781 * frame.c (find_frame_sal): Return a symtab_and_line via function
4782 return instead of output parameter. Remove init_sal references.
4783 * frame.h (find_frame_sal): Return a symtab_and_line via function
4784 return instead of output parameter.
4785 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4786 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4787 instead of memset.
4788 (gdbscm_find_pc_line): Remove init_sal reference.
4789 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4790 references. Move declarations closer to initializations.
4791 * infcmd.c (set_step_frame): Update. Move declarations closer to
4792 initializations.
4793 (finish_backward): Remove init_sal references. Move declarations
4794 closer to initializations.
4795 * infrun.c (process_event_stop_test, handle_step_into_function)
4796 (insert_hp_step_resume_breakpoint_at_frame)
4797 (insert_step_resume_breakpoint_at_caller): Likewise.
4798 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4799 (symbol_to_sal): Likewise.
4800 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4801 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4802 to its initialization.
4803 * reverse.c (save_bookmark_command): Use new/delete. Remove
4804 init_sal references. Move declarations closer to initializations.
4805 * source.c (get_current_source_symtab_and_line): Remove brace
4806 initialization.
4807 (set_current_source_symtab_and_line): Now takes the sal by const
4808 reference. Remove brace initialization.
4809 (line_info): Remove init_sal reference.
4810 * source.h (set_current_source_symtab_and_line): Now takes a
4811 symtab_and_line via const reference.
4812 * stack.c (set_current_sal_from_frame): Adjust.
4813 (print_frame_info): Adjust.
4814 (get_last_displayed_sal): Return the sal via function return
4815 instead of via output parameter. Simplify.
4816 (frame_info): Adjust.
4817 * stack.h (get_last_displayed_sal): Return the sal via function
4818 return instead of via output parameter.
4819 * symtab.c (init_sal): Delete.
4820 (find_pc_sect_line): Remove init_sal references. Move
4821 declarations closer to initializations.
4822 (find_function_start_sal): Remove init_sal references. Move
4823 declarations closer to initializations.
4824 * symtab.h (struct symtab_and_line): In-class initialize all
4825 fields.
4826 * tracepoint.c (set_traceframe_context)
4827 (print_one_static_tracepoint_marker): Remove init_sal references.
4828 Move declarations closer to initializations.
4829 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4830 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4831 declarations closer to initializations.
4832 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4833 init_sal references. Adjust.
4834
6c5b2ebe
PA
48352017-09-04 Pedro Alves <palves@redhat.com>
4836
4837 * ax-gdb.c (agent_command_1): Use range-for.
4838 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4839 * breakpoint.c: Include "common/array-view.h".
4840 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4841 parameter from struct symtabs_and_lines to
4842 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4843 (breakpoint_sals_to_pc): Change sals parameter from struct
4844 symtabs_and_lines to std::vector reference.
4845 (check_fast_tracepoint_sals): Change sals parameter from struct
4846 symtabs_and_lines to std::array_view. Use range-for.
4847 (decode_static_tracepoint_spec): Return a std::vector instead of
4848 symtabs_and_lines. Update.
4849 (create_breakpoint): Update.
4850 (break_range_command, until_break_command, clear_command): Update.
4851 (base_breakpoint_decode_location, bkpt_decode_location)
4852 (bkpt_probe_create_sals_from_location)
4853 (bkpt_probe_decode_location, tracepoint_decode_location)
4854 (tracepoint_probe_decode_location)
4855 (strace_marker_create_sals_from_location): Return a std::vector
4856 instead of symtabs_and_lines.
4857 (strace_marker_create_breakpoints_sal): Update.
4858 (strace_marker_decode_location): Return a std::vector instead of
4859 symtabs_and_lines. Update.
4860 (update_breakpoint_locations): Change struct symtabs_and_lines
4861 parameters to gdb::array_view. Adjust.
4862 (location_to_sals): Return a std::vector instead of
4863 symtabs_and_lines. Update.
4864 (breakpoint_re_set_default): Use std::vector instead of struct
4865 symtabs_and_lines.
4866 (decode_location_default): Return a std::vector instead of
4867 symtabs_and_lines. Update.
4868 * breakpoint.h: Include "common/array-view.h".
4869 (struct breakpoint_ops) <decode_location>: Now returns a
4870 std::vector instead of returning a symtabs_and_lines via output
4871 parameter.
4872 (update_breakpoint_locations): Change sals parameters to use
4873 gdb::array_view.
4874 * cli/cli-cmds.c (edit_command, list_command): Update to use
4875 std::vector and gdb::array_view.
4876 (ambiguous_line_spec): Adjust to use gdb::array_view and
4877 range-for.
4878 (compare_symtabs): Rename to ...
4879 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4880 const reference and adjust.
4881 (filter_sals): Rewrite using std::vector and standard algorithms.
4882 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4883 (jump_command): Update to use std::vector.
4884 * linespec.c (struct linespec_state) <canonical_names>: Update
4885 comment.
4886 (add_sal_to_sals_basic): Delete.
4887 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4888 (decode_line_2, create_sals_line_offset)
4889 (convert_address_location_to_sals, convert_linespec_to_sals)
4890 (convert_explicit_location_to_sals, parse_linespec)
4891 (event_location_to_sals, decode_line_full, decode_line_1)
4892 (decode_line_with_current_source)
4893 (decode_line_with_last_displayed, decode_objc)
4894 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4895 (linespec_result::~linespec_result): Adjust to use std::vector
4896 instead of symtabs_and_lines.
4897 * linespec.h (linespec_sals::sals): Now a std::vector.
4898 (struct linespec_result): Use std::vector, bool, and in-class
4899 initialization.
4900 (decode_line_1, decode_line_with_current_source)
4901 (decode_line_with_last_displayed): Return std::vector.
4902 * macrocmd.c (info_macros_command): Use std::vector.
4903 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4904 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
4905 std::vector.
4906 * probe.h (parse_probes): Return a std::vector.
4907 * python/python.c (gdbpy_decode_line): Use std::vector and
4908 gdb::array_view.
4909 * source.c (select_source_symtab, line_info): Use std::vector.
4910 * stack.c (func_command): Use std::vector.
4911 * symtab.h (struct symtabs_and_lines): Delete.
4912 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
4913
7c44b49c
PA
49142017-09-04 Pedro Alves <palves@redhat.com>
4915
4916 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4917 unittests/array-view-selftests.c.
4918 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
4919 * common/array-view.h: New file.
4920 * unittests/array-view-selftests.c: New file.
4921
e439fa14
PA
49222017-09-04 Pedro Alves <palves@redhat.com>
4923
4924 * cli/cli-cmds.c (edit_command): Pass message to
4925 ambiguous_line_spec.
4926 (list_command): Pass message to ambiguous_line_spec. Say
4927 "first"/"last" instead of "start" and "end" to be consistent with
4928 the manual.
4929 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
4930 them to print formatted message.
4931
7525b645
PA
49322017-09-04 Pedro Alves <palves@redhat.com>
4933
4934 * btrace.c (ftrace_add_pt): Pass btrace_insn to
4935 ftrace_update_insns by reference instead of pointer.
4936
badc0020
YQ
49372017-09-04 Yao Qi <yao.qi@linaro.org>
4938
4939 * i386-go32-tdep.c: Include x86-xstate.h.
4940 (i386_go32_init_abi): Call i386_target_description.
4941 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
4942 if xcr0 is X86_XSTATE_X87_MASK.
4943 * i386-tdep.h (tdesc_i386): Remove the declaration.
4944 (tdesc_i386_mmx): Likewise.
4945
d78bdb54
YQ
49462017-09-04 Yao Qi <yao.qi@linaro.org>
4947
4948 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
4949 X86_XSTATE_SSE_MASK instead of 0.
4950
ca1fa5ee
YQ
49512017-09-04 Yao Qi <yao.qi@linaro.org>
4952
4953 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
4954 i386_target_description.
4955 * i386-fbsd-nat.c (i386fbsd_read_description): Call
4956 i386_target_description.
4957 * i386-tdep.c (i386_gdbarch_init): Likewise.
4958
2434b019
YQ
49592017-09-04 Yao Qi <yao.qi@linaro.org>
4960
4961 * amd64-darwin-tdep.c: Include "x86-xstate.h".
4962 (x86_darwin_init_abi_64): Call amd64_target_description.
4963 * amd64-dicos-tdep.c: Likewise.
4964 * amd64-fbsd-nat.c: Likewise.
4965 * amd64-fbsd-tdep.c: Likewise.
4966 * amd64-nbsd-tdep.c: Likewise.
4967 * amd64-obsd-tdep.c: Likewise.
4968 * amd64-sol2-tdep.c: Likewise.
4969 * amd64-windows-tdep.c: Likewise.
4970 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
4971
0860c437
SM
49722017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4973
4974 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
4975 (btrace_function) <insn>: Change type to use std::vector.
4976 * btrace.c (ftrace_debug, ftrace_call_num_insn,
4977 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
4978 ftrace_update_insns, ftrace_compute_global_level_offset,
4979 btrace_stitch_bts, btrace_clear, btrace_insn_get,
4980 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
4981 change to std::vector.
4982 (ftrace_update_insns): Adjust to change to std::vector, change
4983 type of INSN parameter.
4984 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
4985 * record-btrace.c (btrace_call_history_insn_range,
4986 btrace_compute_src_line_range,
4987 record_btrace_frame_prev_register): Adjust to change to
4988 std::vector.
4989 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
4990 to change to std::vector.
4991
0638b7f9
TT
49922017-09-03 Tom Tromey <tom@tromey.com>
4993
4994 * corefile.c (reopen_exec_file): Use std::string.
4995
8f84fb0e
TT
49962017-09-03 Tom Tromey <tom@tromey.com>
4997
4998 * compile/compile.c (compile_register_name_mangled): Return
4999 std::string.
5000 * compile/compile-loc2c.c (pushf_register_address): Update.
5001 (pushf_register): Update.
5002 * compile/compile-c-types.c (convert_array): Update.
5003 * compile/compile-c-symbols.c (generate_vla_size): Update.
5004 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5005 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5006 (convert_one_symbol): Update.
5007 (generate_c_for_for_one_variable): Update.
5008 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5009 std::string.
5010 (generate_register_struct): Update.
5011 * compile/compile-internal.h (c_get_range_decl_name): Return a
5012 std::string.
5013 (compile_register_name_mangled): Return std::string.
5014
18e9961f
TT
50152017-09-03 Tom Tromey <tom@tromey.com>
5016
5017 * utils.c (perror_string): Return a std::string.
5018 (throw_perror_with_name, perror_warning_with_name): Update.
5019
45343786
TT
50202017-09-03 Tom Tromey <tom@tromey.com>
5021
5022 * demangle.c (demangle_command): Use std::string,
5023 unique_xmalloc_ptr.
5024
b57af503
TT
50252017-09-03 Tom Tromey <tom@tromey.com>
5026
5027 * cli/cli-setshow.c (do_set_command): Use std::string.
5028
6eecf35f
TT
50292017-09-03 Tom Tromey <tom@tromey.com>
5030
5031 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5032
56496dd4
TT
50332017-09-03 Tom Tromey <tom@tromey.com>
5034
5035 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5036
e91a1fa7
TT
50372017-09-03 Tom Tromey <tom@tromey.com>
5038
5039 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5040 gdb::unique_xmalloc_ptr.
5041
7ffd83d7
TT
50422017-09-03 Tom Tromey <tom@tromey.com>
5043
5044 * thread.c (print_thread_info_1): Use string_printf.
5045 (thread_apply_command, thread_apply_all_command): Use
5046 std::string.
5047
1ccbe998
TT
50482017-09-03 Tom Tromey <tom@tromey.com>
5049
5050 * valprint.c (val_print_string): Update.
5051 * gdbcore.h (memory_error_message): Return std::string.
5052 * corefile.c (memory_error_message): Return std::string.
5053 (memory_error): Update.
5054 * breakpoint.c (insert_bp_location): Update.
5055
23fdd69e
SM
50562017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5057
5058 * target/waitstatus.h (target_waitstatus_to_string): Change
5059 return type to std::string.
5060 * target/waitstatus.c (target_waitstatus_to_string): Return
5061 std::string.
5062 * target.h (target_waitstatus_to_string): Remove declaration.
5063 * infrun.c (resume, clear_proceed_status_thread,
5064 print_target_wait_results, do_target_wait, save_waitstatus,
5065 stop_all_threads): Adjust.
5066 * record-btrace.c (record_btrace_wait): Adjust.
5067 * target-debug.h
5068 (target_debug_print_struct_target_waitstatus_p): Adjust.
5069
5c811d30
JK
50702017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5071
5072 PR gdb/22046
5073 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5074 detection.
5075
0a2dde4a
SDJ
50762017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5077
5078 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5079 for setting/unsetting environment variables on the remote target.
5080 (New remote packets): Add entries for QEnvironmentHexEncoded,
5081 QEnvironmentUnset and QEnvironmentReset.
5082 * common/environ.c (gdb_environ::operator=): Extend method to
5083 handle m_user_set_env_list and m_user_unset_env_list.
5084 (gdb_environ::clear): Likewise.
5085 (match_var_in_string): Change type of first parameter from 'char
5086 *' to 'const char *'.
5087 (gdb_environ::set): Extend method to handle
5088 m_user_set_env_list and m_user_unset_env_list.
5089 (gdb_environ::unset): Likewise.
5090 (gdb_environ::clear_user_set_env): New method.
5091 (gdb_environ::user_set_envp): Likewise.
5092 (gdb_environ::user_unset_envp): Likewise.
5093 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5094 m_user_unset_env_list on move constructor/assignment.
5095 (unset): Add new default parameter 'update_unset_list = true'.
5096 (clear_user_set_env): New method.
5097 (user_set_envp): Likewise.
5098 (user_unset_envp): Likewise.
5099 (m_user_set_env_list): New std::set.
5100 (m_user_unset_env_list): Likewise.
5101 * common/rsp-low.c (hex2str): New function.
5102 (bin2hex): New overload for bin2hex function.
5103 * common/rsp-low.c (hex2str): New prototype.
5104 (str2hex): New overload prototype.
5105 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5106 QEnvironmentUnset and QEnvironmentReset.
5107 (remote_protocol_features): Add QEnvironmentHexEncoded,
5108 QEnvironmentUnset and QEnvironmentReset packets.
5109 (send_environment_packet): New function.
5110 (extended_remote_environment_support): Likewise.
5111 (extended_remote_create_inferior): Call
5112 extended_remote_environment_support.
5113 (_initialize_remote): Add QEnvironmentHexEncoded,
5114 QEnvironmentUnset and QEnvironmentReset packet configs.
5115 * unittests/environ-selftests.c (gdb_selftest_env_var):
5116 New variable.
5117 (test_vector_initialization): New function.
5118 (test_init_from_host_environ): Likewise.
5119 (test_reinit_from_host_environ): Likewise.
5120 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5121 Likewise.
5122 (test_unset_set_empty_vector): Likewise.
5123 (test_vector_clear): Likewise.
5124 (test_std_move): Likewise.
5125 (test_move_constructor):
5126 (test_self_move): Likewise.
5127 (test_set_unset_reset): Likewise.
5128 (run_tests): Rewrite in terms of the functions above.
5129
654670a4
WP
51302017-08-31 Weimin Pan <weimin.pan@oracle.com>
5131
5132 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5133 (adi_available): Use a temp variable of type CORE_ADDR as argument
5134 3 when calling target_auxv_search.
5135 (adi_normalize_address): Use masks and xor operators to calculate
5136 normalized address.
5137 (adi_read_versions, adi_write_versions, adi_print_versions)
5138 (do_examine, do_assign): Use paddress.
5139
7755ddb7
JB
51402017-08-29 John Baldwin <jhb@FreeBSD.org>
5141
5142 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5143 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5144 out of loop and add supply of FIR.
5145 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5146 add collect of FIR.
5147
fd437cbc
SM
51482017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5149
3804a343 5150 PR gdb/21827
fd437cbc
SM
5151 * cli/cli-script.c (define_command): Don't convert command name
5152 to lower case.
5153
988f6b3d
JB
51542017-08-25 Joel Brobecker <brobecker@adacore.com>
5155
5156 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5157 Update all callers accordingly. Remove all code blocks handling
5158 the case where DISPP is not NULL.
5159
663c44ac
JK
51602017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5161
5162 PR symtab/22003
5163 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5164 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5165 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5166
f1902523
JK
51672017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5168
5169 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5170 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5171 (read_comp_units_from_section): New parameter abbrev_section, use
5172 read_and_check_comp_unit_head, allocate signatured_type if needed.
5173 (create_all_comp_units): Update read_comp_units_from_section caller.
5174
87215ad1
SDJ
51752017-08-23 Pedro Alves <palves@redhat.com>
5176
5177 PR remote/21852
5178 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5179 to null_ptid and switch to thread without reading the registers
5180 after adding the inferior.
5181
6e41ddec
JK
51822017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5183
5184 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5185 compile-gcc.
5186 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5187 (compile_to_object): Implement compile_gcc.
5188 (_initialize_compile): Install "set compile-gcc". Initialize
5189 compile_gcc.
5190
e68c32d5
JK
51912017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5192
5193 * compile/compile.c (compile_to_object): Conditionally call
5194 set_verbose. Conditionally call compile or compile_v0.
5195
58afddc6
WP
51962017-08-07 Weimin Pan <weimin.pan@oracle.com>
5197
5198 * sparc64-tdep.h: (adi_normalize_address): New export.
5199 * sparc-nat.h: (open_adi_tag_fd): New export.
5200 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5201 * sparc64-linux-tdep.c:
5202 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5203 (sparc64_linux_handle_segmentation_fault): New function.
5204 (sparc64_linux_init_abi): Register
5205 sparc64_linux_handle_segmentation_fault
5206 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5207 (sparc64_addr_bits_remove): New function.
5208 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5209 (MAX_PROC_NAME_SIZE): New macro.
5210 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5211 (sparc64adilist): New variable.
5212 (adi_proc_list): New variable.
5213 (find_adi_info): New function.
5214 (add_adi_info): New function.
5215 (get_adi_info_proc): New function.
5216 (get_adi_info): New function.
5217 (info_adi_command): New function.
5218 (read_maps_entry): New function.
5219 (adi_available): New function.
5220 (adi_normalize_address): New function.
5221 (adi_align_address): New function.
5222 (adi_convert_byte_count): New function.
5223 (adi_tag_fd): New function.
5224 (adi_is_addr_mapped): New function.
5225 (adi_read_versions): New function.
5226 (adi_write_versions): New function.
5227 (adi_print_versions): New function.
5228 (do_examine): New function.
5229 (do_assign): New function.
5230 (adi_examine_command): New function.
5231 (adi_assign_command): New function.
5232 (_initialize_sparc64_adi_tdep): New function.
5233
11db9430
SM
52342017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5235
5236 * breakpoint.c (breakpoints_info): Rename to ...
5237 (info_breakpoints_command): ... this.
5238 (watchpoints_info): Rename to ...
5239 (info_watchpoints_command): ... this.
5240 (tracepoints_info): Rename to ...
5241 (info_tracepoints_command): ... this.
5242 (_initialize_breakpoint): Adjust.
5243 * dcache.c (dcache_info): Rename to ...
5244 (info_display_command): ... this.
5245 (_initialize_dcache): Adjust.
5246 * frame.h (args_info): Rename to ...
5247 (info_args_command): ... this.
5248 (locals_info): Rename to ...
5249 (info_locals_command): ... this.
5250 * infcmd.c (nofp_registers_info): Rename to ...
5251 (info_registers_command): ... this.
5252 (float_info): Rename to ...
5253 (info_float_command): ... this.
5254 (program_info): Rename to ...
5255 (info_program_command): ... this.
5256 (all_registers_info): Rename to ...
5257 (info_all_registers_command): ... this.
5258 (vector_info): Rename to ...
5259 (info_vector_command): ... this.
5260 (float_info): Rename to ...
5261 (info_float_command): ... this.
5262 (_initialize_infcmd): Adjust.
5263 * inferior.h (term_info): Rename to ...
5264 (info_terminal_command): ... this.
5265 * inflow.c (term_info): Rename to ...
5266 (info_terminal_command): ... this.
5267 (_initialize_inflow): Adjust.
5268 * infrun.c (signals_info): Rename to ...
5269 (info_signals_command): ... this.
5270 (_initialize_infrun): Adjust.
5271 * objc-lang.c (classes_info): Rename to ...
5272 (info_classes_command): ... this.
5273 (selectors_info): Rename to ...
5274 (info_selectors_command): ... this.
5275 (_initialize_objc_language): Adjust.
5276 * printcmd.c (sym_info): Rename to ...
5277 (info_symbol_command): ... this.
5278 (address_info): Rename to ...
5279 (info_address_command): ... this.
5280 (display_info): Rename to ...
5281 (info_display_command): ... this.
5282 (_initialize_printcmd): Adjust.
5283 * reverse.c (bookmarks_info): Rename to ...
5284 (info_breakpoints_command): ... this.
5285 (_initialize_reverse): Adjust.
5286 * ser-go32.c (dos_info): Rename to ...
5287 (info_serial_command): ... this.
5288 (_initialize_ser_dos): Adjust.
5289 * skip.c (skip_info): Rename to ...
5290 (info_skip_command): ... this.
5291 (_initialize_step_skip): Adjust.
5292 * source.c (line_info): Rename to ...
5293 (info_line_command): ... this.
5294 (source_info): Rename to ...
5295 (info_source_command)
5296 * stack.c (frame_info): Rename to ...
5297 (info_frame_command): ... this.
5298 (locals_info): Rename to ...
5299 (info_locals_command): ... this.
5300 (args_info): Rename to ...
5301 (info_args_command): ... this.
5302 (_initialize_stack): Adjust.
5303 * symtab.c (sources_info): Rename to ...
5304 (info_sources_command): ... this.
5305 (variables_info): Rename to ...
5306 (info_variables_command): ... this.
5307 (functions_info): Rename to ...
5308 (info_functions_command): ... this.
5309 (types_info): Rename to ...
5310 (info_types_command): ... this.
5311 (_initialize_symtab): Adjust.
5312 * target.c (target_info): Rename to ...
5313 (info_target_command): ... this.
5314 (initialize_targets): Adjust.
5315 * tracepoint.c (tvariables_info): Rename to ...
5316 (info_tvariables_command): ... this.
5317 (scope_info): Rename to ...
5318 (info_scope_command): ... this.
5319 (trace_dump_actions): Adjust.
5320 (_initialize_tracepoint): Adjust.
5321
b270e6f9
TT
53222017-08-22 Tom Tromey <tom@tromey.com>
5323
5324 * breakpoint.h (install_breakpoint): Update.
5325 * breakpoint.c (add_solib_catchpoint): Update.
5326 (install_breakpoint): Change argument to a std::unique_ptr.
5327 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5328 (create_breakpoint_sal, create_breakpoint): Update.
5329 (watch_command_1, catch_exec_command_1)
5330 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5331 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5332 Return the breakpoint.
5333 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5334 (new_single_step_breakpoint): Update.
5335 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5336 std::unique_ptr.
5337 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5338 std::unique_ptr.
5339 * break-catch-sig.c (create_signal_catchpoint): Use
5340 std::unique_ptr.
5341 * ada-lang.c (create_ada_exception_catchpoint): Use
5342 std::unique_ptr.
5343
36bd8eaa
TT
53442017-08-22 Tom Tromey <tom@tromey.com>
5345
5346 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5347
56f37645
TT
53482017-08-22 Tom Tromey <tom@tromey.com>
5349
5350 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5351 (lookup_partial_symbol): Update.
5352
0b581c69
TT
53532017-08-22 Tom Tromey <tom@tromey.com>
5354
5355 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5356 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5357 (find_and_open_source, symtab_to_fullname): Update.
5358 * psymtab.c (psymtab_to_fullname): Update.
5359
14278e1f
TT
53602017-08-22 Tom Tromey <tom@tromey.com>
5361
5362 * exec.c (exec_file_attach): Update.
5363 * linux-thread-db.c (try_thread_db_load): Update.
5364 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5365 * utils.c (gdb_realpath): Change return type.
5366 (gdb_realpath_keepfile): Update.
5367 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5368 (_initialize_utils): Register the new self test.
5369 * source.c (openp): Update.
5370 (find_and_open_source): Update.
5371 * nto-tdep.c (nto_find_and_open_solib): Update.
5372 * main.c (set_gdb_data_directory): Update.
5373 (captured_main_1): Update.
5374 * dwarf2read.c (dwarf2_get_dwz_file): Update
5375 (dw2_map_symbol_filenames): Update.
5376 * auto-load.c (auto_load_safe_path_vec_update): Update.
5377 (filename_is_in_auto_load_safe_path_vec): Change type of
5378 "filename_realp".
5379 (auto_load_objfile_script): Update.
5380 (file_is_auto_load_safe): Update. Use std::string.
5381 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5382
4971c9a7
TT
53832017-08-22 Tom Tromey <tom@tromey.com>
5384
5385 * utils.c (gdb_realpath_keepfile): Return a
5386 gdb::unique_xmalloc_ptr.
5387 * exec.c (exec_file_attach): Update.
5388 * utils.h (gdb_realpath_keepfile): Return a
5389 gdb::unique_xmalloc_ptr.
5390
e3e41d58
TT
53912017-08-22 Tom Tromey <tom@tromey.com>
5392
5393 * compile/compile.c (compile_file_command): Use
5394 gdb::unique_xmalloc_ptr, std::string.
5395 * utils.c (gdb_abspath): Change return type.
5396 * source.c (openp): Update.
5397 * objfiles.c (allocate_objfile): Update.
5398 * main.c (set_gdb_data_directory): Update.
5399 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5400
0d999a6e
ZZ
54012017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5402
5403 * cli-cmds.c (list_commands): List actual code around more than
5404 one location.
5405
329d5e7e
JB
54062017-08-21 John Baldwin <jhb@FreeBSD.org>
5407
5408 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5409
bf223d3e
PA
54102017-08-21 Pedro Alves <palves@redhat.com>
5411
5412 PR gdb/19487
5413 * c-exp.y (variable production): Handle function aliases.
5414 * minsyms.c (msymbol_is_text): New function.
5415 * minsyms.h (msymbol_is_text): Declare.
5416 * symtab.c (find_function_alias_target): New function.
5417 * symtab.h (find_function_alias_target): Declare.
5418
c973d0aa
PA
54192017-08-21 Pedro Alves <palves@redhat.com>
5420
5421 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5422 typedefs.
5423 * typeprint.c (whatis_exp): If handling "whatis", and expression
5424 is OP_TYPE, strip one typedef level. Otherwise don't strip
5425 typedefs here.
5426 * valops.c (value_cast): Save "to" type before resolving
5427 stubs/typedefs. Use that type as resulting value's type.
5428
2989a365
TT
54292017-08-18 Tom Tromey <tom@tromey.com>
5430 Pedro Alves <palves@redhat.com>
5431
5432 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5433 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5434 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5435 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5436 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5437 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5438 (linux_get_siginfo_data): Add "thread" argument. Use
5439 scoped_restore.
5440 * linux-nat.c (linux_child_follow_fork)
5441 (check_stopped_by_watchpoint): Use scoped_restore.
5442 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5443 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5444 (restore_inferior_ptid, save_inferior_ptid): Remove.
5445 * btrace.c (btrace_fetch): Use scoped_restore.
5446 * bsd-uthread.c (bsd_uthread_fetch_registers)
5447 (bsd_uthread_store_registers): Use scoped_restore.
5448 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5449 scoped_restore.
5450 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5451 (aix_thread_xfer_partial): Use scoped_restore.
5452 * inferior.h (save_inferior_ptid): Remove.
5453
e60eb288
YQ
54542017-08-18 Yao Qi <yao.qi@linaro.org>
5455
5456 PR tdep/21818
5457 * arm-tdep.c (gdb_print_insn_arm): Mark
5458 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5459
6d580b63
YQ
54602017-08-18 Yao Qi <yao.qi@linaro.org>
5461
5462 * NEWS: Mention GDBserver's new option "--selftest".
5463 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5464 * selftest.c: Move it to common/selftest.c.
5465 * selftest.h: Move it to common/selftest.h.
5466 * selftest-arch.c (reset): New function.
5467 (tests_with_arch): Call reset.
5468
86dcbf50
YQ
54692017-08-18 Yao Qi <yao.qi@linaro.org>
5470
5471 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5472 instead of exception_fprintf and printf_filtered.
5473
7649770c
YQ
54742017-08-18 Yao Qi <yao.qi@linaro.org>
5475
5476 * selftest.c (register_self_test): Rename it to
5477 selftests::register_test.
5478 (run_self_tests): selftest::run_tests.
5479 * selftest.h: Update declarations.
5480 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5481 selftests::register_test_foreach_arch.
5482 * selftest-arch.h: Update declaration.
5483 * aarch64-tdep.c: Update.
5484 * arm-tdep.c: Likewise.
5485 * disasm-selftests.c: Likewise.
5486 * dwarf2loc.c: Likewise.
5487 * dwarf2-frame.c: Likewise.
5488 * findvar.c: Likewise.
5489 * gdbarch-selftests.c: Likewise.
5490 * maint.c (maintenance_selftest): Likewise.
5491 * regcache.c: Likewise.
5492 * rust-exp.y: Likewise.
5493 * selftest-arch.c: Likewise.
5494 * unittests/environ-selftests.c: Likewise.
5495 * unittests/function-view-selftests.c: Likewise.
5496 * unittests/offset-type-selftests.c: Likewise.
5497 * unittests/optional-selftests.c: Likewise.
5498 * unittests/scoped_restore-selftests.c: Likewise.
5499 * utils-selftests.c: Likewise.
5500
b0cba12e
PA
55012017-08-17 Pedro Alves <palves@redhat.com>
5502
5503 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5504 local.
5505
4c8aa72d
PA
55062017-08-17 Pedro Alves <palves@redhat.com>
5507
5508 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5509 field.
5510 (reset_die_in_process): Delete, replaced by ...
5511 (process_die_scope): ... this new class. Make it responsible for
5512 freeing cu->line_header too.
5513 (process_die): Use process_die_scope.
5514 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5515 cu->line_header_die_owner. Don't release the line header if it's
5516 owned by the CU.
5517 (setup_type_unit_groups): Make the CU/DIE own the line header.
5518 Don't release the line header here.
5519
ba713918
AL
55202017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5521
5522 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5523
44d0fb3a
RK
55242017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5525
5526 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5527 Single-Key mode
5528
a5afdb16
RK
55292017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5530
5531 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5532 mode command list.
5533
47613aeb
SH
55342017-08-15 Stafford Horne <shorne@gmail.com>
5535
5536 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5537
9c3cc999
SH
55382017-08-15 Stafford Horne <shorne@gmail.com>
5539
5540 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5541
206726fb
SDJ
55422017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5543
5544 PR gdb/21954
5545 * infcmd.c (unset_environment_command): Use the 'clear' method on
5546 the environment instead of resetting it.
5547
0335ac6d
JB
55482017-08-15 John Baldwin <jhb@FreeBSD.org>
5549
5550 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5551 platforms.
5552
d3abe1c8
TT
55532017-08-14 Tom Tromey <tom@tromey.com>
5554
5555 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5556 (print_binary_chars): Likewise.
5557 (BITS_IN_BYTES): Remove.
5558
d6382fff
TT
55592017-08-14 Tom Tromey <tom@tromey.com>
5560
5561 PR gdb/21675
5562 * valprint.c (LOW_ZERO): Change value to 034.
5563 (print_octal_chars): Add static_asserts for octal constants.
5564 * printcmd.c (print_scalar_formatted): Add 'd' case.
5565
f978cb06
TT
55662017-08-11 Tom Tromey <tom@tromey.com>
5567
5568 * symfile.c (add_symbol_file_command): Use std::vector.
5569
2f5404b3
TT
55702017-08-14 Tom Tromey <tom@tromey.com>
5571
5572 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5573 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5574 std::move.
5575 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5576
de7985c3
PA
55772017-08-11 Pedro Alves <palves@redhat.com>
5578
5579 * infrun.c (process_event_stop_test): Adjust
5580 function_name_is_marked_for_skip call.
5581 * skip.c: Include <list>.
5582 (skiplist_entry): Make it a class with private fields, and
5583 getters/setters.
5584 (skiplist_entry_chain): Delete.
5585 (skiplist_entries): New.
5586 (skiplist_entry_count): Delete.
5587 (highest_skiplist_entry_num): New.
5588 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5589 (add_skiplist_entry): Delete.
5590 (skiplist_entry::skiplist_entry): New.
5591 (skiplist_entry::add_entry): New.
5592 (skip_file_command, skip_function): Adjust.
5593 (compile_skip_regexp): Delete.
5594 (skip_command): Don't compile regexp here. Adjust to use
5595 skiplist_entry::add_entry.
5596 (skip_info): Adjust to use range-for and getters.
5597 (skip_enable_command, skip_disable_command): Adjust to use
5598 range-for and setters.
5599 (skip_delete_command): Adjust to use std::list.
5600 (add_skiplist_entry): Delete.
5601 (skip_file_p): Delete, refactored as ...
5602 (skiplist_entry::do_skip_file_p): ... this new method.
5603 (skip_gfile_p): Delete, refactored as ...
5604 (skiplist_entry::do_gskip_file_p): ... this new method.
5605 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5606 (skiplist_entry::skip_function_p): ... this new method.
5607 (function_name_is_marked_for_skip): Now returns bool, and takes
5608 the function sal by const reference. Adjust to use range-for and
5609 skiplist_entry methods.
5610 (_initialize_step_skip): Remove references to
5611 skiplist_entry_chain, skiplist_entry_count.
5612 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5613 takes the function sal by const reference.
5614
be7d3cd5
YQ
56152017-08-11 Yao Qi <yao.qi@linaro.org>
5616
5617 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5618 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5619 (dwarf2_frame_cache):
5620 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5621 RETURN_MASK_ALL and set *this_case to NULL.
5622 * frame-unwind.h: Update comments.
5623
1c90d9f0
YQ
56242017-08-11 Yao Qi <yao.qi@linaro.org>
5625
5626 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5627 (dwarf2_frame_state_copy_regs): Remove.
5628 (dwarf2_frame_state_free_regs): Remove.
5629 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5630 (dwarf2_restore_rule): Call method .alloc_regs instead of
5631 dwarf2_frame_state_alloc_regs.
5632 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5633 constructor. Call std::move.
5634 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5635 (dwarf2_frame_cache): Likewise.
5636
5637 [GDB_SELF_TEST]: Include selftest.h and
5638 selftest-arch.h.
5639 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5640 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5641 execute_cfa_program_test.
5642
5643 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5644 copy ctor, assignment operator, move assignment.
5645 <alloc_regs>: New method.
5646 <swap>: New method.
5647 (struct dwarf2_frame_state): Delete dtor.
5648 (dwarf2_frame_state_alloc_regs): Remove declaration.
5649 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5650 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5651
afe37d6b
YQ
56522017-08-11 Yao Qi <yao.qi@linaro.org>
5653
5654 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5655 (dwarf2_frame_state::dwarf2_frame_state): New.
5656 (dwarf2_frame_state::~dwarf2_frame_state): New.
5657 (dwarf2_fetch_cfa_info): Update.
5658 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5659 rather than a pointer. Update code.
5660 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5661 dtor.
5662 <data_align, code_align, retaddr_column>: Change them to const.
5663 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5664 to bool.
5665
b348037f
YQ
56662017-08-11 Yao Qi <yao.qi@linaro.org>
5667
5668 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5669 <loc.exp>: New field.
5670 * dwarf2-frame.c (execute_cfa_program): Update.
5671 (dwarf2_frame_prev_register): Update.
5672
e7c9de26
PA
56732017-08-10 Pedro Alves <palves@redhat.com>
5674
5675 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5676
e8c6b620
JB
56772017-08-09 John Baldwin <jhb@FreeBSD.org>
5678
5679 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5680 (fbsd_pending_children): Use std::list.
5681 (fbsd_remember_child): Likewise.
5682 (fbsd_is_child_pending): Likewise.
5683 (fbsd_pending_vfork_done): Use std::forward_list.
5684 (fbsd_add_vfork_done): Likewise.
5685 (fbsd_is_vfork_done_pending): Likewise.
5686 (fbsd_next_vfork_done): Likewise.
5687
e4a26669
JB
56882017-08-09 John Baldwin <jhb@FreeBSD.org>
5689
5690 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5691 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5692 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5693 for `mapfilename'.
5694 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 5695 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 5696
142311d3
JB
56972017-08-09 John Baldwin <jhb@FreeBSD.org>
5698
5699 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5700 "filestuff.h".
5701 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5702
42fa2e0e
TT
57032017-08-09 Tom Tromey <tom@tromey.com>
5704
5705 * skip.c (skiplist_entry): New constructor.
5706 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5707 (skiplist_entry::file_is_glob): Now bool.
5708 (skiplist_entry::file, skiplist_entry::function): Now
5709 std::string.
5710 (make_skip_entry): Return a unique_ptr. Use new.
5711 (free_skiplist_entry, free_skiplist_entry_cleanup)
5712 (make_free_skiplist_entry_cleanup): Remove.
5713 (skip_command, skip_disable_command, add_skiplist_entry)
5714 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5715 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5716 (function_name_is_marked_for_skip): Update.
5717 (skip_delete_command): Update. Use delete.
5718
cd3af38d
JW
57192017-08-09 Jiong Wang <jiong.wang@arm.com>
5720
5721 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5722 (aarch64_linux_core_read_description): New function.
5723 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5724
29592bde
PA
57252017-08-09 Pedro Alves <palves@redhat.com>
5726
5727 * cp-name-parser.y (cp_comp_to_string): Return a
5728 gdb::unique_xmalloc_ptr<char>.
5729 * cp-support.c (replace_typedefs_qualified_name)
5730 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5731 (cp_canonicalize_string_full): Use op= instead of explicit
5732 convertion.
5733 (cp_class_name_from_physname, method_name_from_physname)
5734 (cp_func_name, cp_remove_params): Adjust to use
5735 gdb::unique_xmalloc_ptr<char>.
5736 * cp-support.h (cp_comp_to_string): Return a
5737 gdb::unique_xmalloc_ptr<char>.
5738 * python/py-type.c (typy_lookup_type): Adjust to use
5739 gdb::unique_xmalloc_ptr<char>.
5740
b3340438
L
57412017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5742
5743 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5744
e88e8651
YQ
57452017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5746 Yao Qi <yao.qi@linaro.org>
5747
5748 * cp-support.c (cp_canonicalize_string_full): Use
5749 gdb::unique_xmalloc_ptr<char>.
5750 (cp_canonicalize_string): Likewise.
5751
f5a29eb0
YQ
57522017-08-09 Yao Qi <yao.qi@linaro.org>
5753
5754 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5755 * regformats/i386/amd64-avx-avx512.dat: Remove.
5756 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5757 * regformats/i386/amd64-avx-mpx.dat:Remove.
5758 * regformats/i386/amd64-avx.dat: Remove.
5759 * regformats/i386/amd64-mpx.dat: Remove.
5760 * regformats/i386/i386-avx-avx512.dat: Remove.
5761 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5762 * regformats/i386/i386-avx-mpx.dat: Remove.
5763 * regformats/i386/i386-mmx.dat: Remove.
5764 * regformats/i386/i386-mpx.dat: Remove.
5765
57757c2f
YQ
57662017-08-09 Yao Qi <yao.qi@linaro.org>
5767
5768 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5769 * amd64-tdep.c: Don't include features/i386/x32*.c.
5770 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5771 functions.
5772 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5773 and i386/x32-avx-avx512.
5774 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5775 and i386/x32.xml.
5776 * features/i386/x32-avx-avx512.c: Removed.
5777 * features/i386/x32-avx-avx512.xml: Removed.
5778 * features/i386/x32-avx.c: Removed.
5779 * features/i386/x32-avx.xml: Removed.
5780 * features/i386/x32.c: Removed.
5781 * features/i386/x32.xml: Removed.
5782 * regformats/i386/x32-avx-avx512.dat: Removed.
5783 * regformats/i386/x32-avx.dat: Removed.
5784 * regformats/i386/x32.dat: Removed.
5785
ba7b109b
MR
57862017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5787
5788 PR breakpoints/21886
5789 * mem-break.c (default_memory_insert_breakpoint): Use
5790 `->placed_address' rather than `->reqstd_address' for the
5791 breakpoint location.
5792
e347efc3
MR
57932017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5794
5795 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5796 assertions.
5797
0dba2a6c
MR
57982017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5799
5800 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5801 a union of `tdep_info', `tdesc_data' and `id'.
5802 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5803 rather than `info.tdep_info'.
5804 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5805 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5806 * i386-tdep.c (i386_gdbarch_init): Likewise.
5807 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5808 * mips-tdep.c (mips_gdbarch_init): Likewise.
5809 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5810 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5811 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5812 `info.tdep_info'.
5813 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5814 `info.tdep_info'.
5815 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5816 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5817 `info.tdep_info'.
5818 * spu-tdep.c (spu_gdbarch_init): Likewise.
5819 * gdbarch.h: Regenerate.
5820
16eb6b2d
LS
58212017-08-07 Leszek Swirski <leszeks@google.com>
5822
7b005726 5823 PR symtab/20899
16eb6b2d
LS
5824 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5825
74cbb09e
SM
58262017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5827
5828 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5829 (gdbsim_open): Rename gdb_argv args object to argv.
5830
ee0c3293
TT
58312017-08-05 Tom Tromey <tom@tromey.com>
5832
5833 * compile/compile-object-load.c (compile_object_load): Use
5834 gdb::unique_xmalloc_ptr.
5835 * cli/cli-dump.c (scan_filename): Rename from
5836 scan_filename_with_cleanup. Change return type.
5837 (scan_expression): Rename from scan_expression_with_cleanup.
5838 Change return type.
5839 (dump_memory_to_file, dump_value_to_file, restore_command):
5840 Use gdb::unique_xmalloc_ptr. Update.
5841 * cli/cli-cmds.c (find_and_open_script): Use
5842 gdb::unique_xmalloc_ptr.
5843 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5844 * symmisc.c (maintenance_print_symbols)
5845 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5846 * symfile.c (symfile_bfd_open, generic_load)
5847 (add_symbol_file_command, remove_symbol_file_command): Use
5848 gdb::unique_xmalloc_ptr.
5849 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5850 * psymtab.c (maintenance_print_psymbols): Use
5851 gdb::unique_xmalloc_ptr.
5852 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5853 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5854 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5855 (reload_shared_libraries_1): Likewise.
5856
3232fabd
TT
58572017-08-05 Tom Tromey <tom@tromey.com>
5858
5859 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5860 (rust_op_vector, rust_set_vector): New typedefs.
5861 (current_parser): New global.
5862 (work_obstack): Change to pointer type. Update all users.
5863 (rust_ast, pstate): Remove globals.
5864 (struct rust_parser): New.
5865 (%union) <params, field_inits>: Change type.
5866 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5867 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5868 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5869 (convert_params_to_types, convert_params_to_expression): Change
5870 type of "params".
5871 (ast_string): Change type of "fields".
5872 (rust_parse): Make a rust_parser. Remove cleanups.
5873 (rust_lex_tests): Make and install an auto_obstack.
5874
f02fd774
YQ
58752017-08-04 Yao Qi <yao.qi@linaro.org>
5876
5877 * configure.srv (ipa_x32_linux_regobj): New.
5878 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5879 instead of X86_TDESC_AVX512.
5880 (initialize_low_tracepoint): Call
5881 init_registers_x32_avx_avx512_linux.
5882
91975afd
YQ
58832017-08-04 Yao Qi <yao.qi@linaro.org>
5884
5885 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5886
2331fa3a
RK
58872017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5888
5889 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5890
744e4fe1
TT
58912017-08-03 Tom Tromey <tom@tromey.com>
5892
5893 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5894 Remove.
5895 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5896
1c034b67
TT
58972017-08-03 Tom Tromey <tom@tromey.com>
5898
5899 * python/py-param.c (compute_enum_values): Use gdb_argv.
5900
773a1edc
TT
59012017-08-03 Tom Tromey <tom@tromey.com>
5902
5903 * utils.h (struct gdb_argv_deleter): New.
5904 (gdb_argv): New class.
5905 * utils.c (gdb_argv::reset): New method.
5906 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
5907 * tracefile.c (tsave_command): Use gdb_argv.
5908 * top.c (new_ui_command): Use gdb_argv.
5909 * symmisc.c (maintenance_print_symbols)
5910 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
5911 * symfile.c (symbol_file_command, generic_load)
5912 (remove_symbol_file_command): Use gdb_argv.
5913 * stack.c (backtrace_command): Use gdb_argv.
5914 * source.c (add_path, show_substitute_path_command)
5915 (unset_substitute_path_command, set_substitute_path_command):
5916 Use gdb_argv.
5917 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
5918 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
5919 * remote.c (extended_remote_run, remote_put_command)
5920 (remote_get_command, remote_delete_command): Use gdb_argv.
5921 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
5922 (gdbsim_open): Use gdb_argv.
5923 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
5924 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
5925 * procfs.c (procfs_info_proc): Use gdb_argv.
5926 * interps.c (interpreter_exec_cmd): Use gdb_argv.
5927 * infrun.c (handle_command): Use gdb_argv.
5928 * inferior.c (add_inferior_command, clone_inferior_command):
5929 Use gdb_argv.
5930 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
5931 * exec.c (exec_file_command): Use gdb_argv.
5932 * cli/cli-cmds.c (alias_command): Use gdb_argv.
5933 * compile/compile.c (build_argc_argv): Use gdb_argv.
5934
0d50bde3
TT
59352017-08-03 Tom Tromey <tom@tromey.com>
5936
5937 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
5938
7f968c89
TT
59392017-08-03 Tom Tromey <tom@tromey.com>
5940
5941 * python/python.c (compute_python_string): Return std::string.
5942 (gdbpy_eval_from_control_command): Update.
5943 (do_start_initialization): Use std::string.
5944 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
5945 xstrprintf.
5946 * python/py-breakpoint.c (local_setattro): Use string_printf, not
5947 xstrprintf.
5948
3c9ebddd
TT
59492017-08-03 Tom Tromey <tom@tromey.com>
5950
5951 * top.h (do_restore_instream_cleanup): Remove.
5952 * top.c (do_restore_instream_cleanup): Remove.
5953 (read_command_file): Use scoped_restore.
5954 * cli/cli-script.c (execute_user_command): Use scoped_restore.
5955
b51b225e
TT
59562017-08-03 Tom Tromey <tom@tromey.com>
5957
5958 * cli/cli-script.c (execute_user_command)
5959 (execute_control_command): Use scoped_restore.
5960
ac991630
TT
59612017-08-03 Tom Tromey <tom@tromey.com>
5962
5963 * cli/cli-script.c (do_restore_user_call_depth): Remove.
5964 (execute_user_command): Remove user_call_depth; use
5965 user_args_stack's size instead.
5966
898e0c8e
TT
59672017-08-03 Tom Tromey <tom@tromey.com>
5968
5969 * top.h (in_user_command): Remove.
5970 * top.c (in_user_command): Remove.
5971 * cli/cli-script.c (do_restore_user_call_depth)
5972 (execute_user_command): Update.
5973
26fcd5d7
TT
59742017-08-03 Tom Tromey <tom@tromey.com>
5975
5976 * valops.c (search_struct_method): Use gdb::byte_vector.
5977 * valarith.c (value_concat): Use std::vector.
5978 * target.c (memory_xfer_partial): Use gdb::byte_vector.
5979 (simple_search_memory): Likewise.
5980 * printcmd.c (find_string_backward): Use gdb::byte_vector.
5981 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
5982 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
5983 * elfread.c (elf_rel_plt_read): Use std::string.
5984 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
5985 * cli/cli-dump.c (restore_section_callback): Use
5986 gdb::byte_vector.
5987
7c218e6c
TT
59882017-08-03 Tom Tromey <tom@tromey.com>
5989
5990 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
5991
31b68d4a
TT
59922017-08-03 Tom Tromey <tom@tromey.com>
5993
5994 * tui/tui-regs.c (tui_restore_gdbout): Remove.
5995 (tui_register_format): Use scoped_restore.
5996
2ec845e7
TT
59972017-08-03 Tom Tromey <tom@tromey.com>
5998
5999 * reverse.c (exec_direction_default): Remove.
6000 (exec_reverse_once): Use scoped_restore.
6001 * remote.c (restore_remote_timeout): Remove.
6002 (remote_flash_erase, remote_flash_write, remote_flash_done)
6003 (readchar, remote_serial_write): Use scoped_restore.
6004 * cli/cli-script.c (struct source_cleanup_lines_args)
6005 (source_cleanup_lines): Remove.
6006 (script_from_file): Use scoped_restore.
6007 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6008 (source_command): Use scoped_restore.
6009
b3bc8453
TT
60102017-08-03 Tom Tromey <tom@tromey.com>
6011
6012 * utils.h (make_cleanup_free_so): Remove.
6013 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6014 * solist.h (struct so_deleter): New.
6015 (so_list_up): New typedef.
6016 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6017
e3ad2841
TT
60182017-08-03 Tom Tromey <tom@tromey.com>
6019
6020 * utils.h (make_cleanup_restore_current_language): Remove.
6021 * utils.c (do_restore_current_language)
6022 (make_cleanup_restore_current_language): Remove.
6023 * parse.c (parse_exp_in_context_1)
6024 (parse_expression_with_language): Use
6025 scoped_restore_current_language.
6026 * mi/mi-main.c (mi_cmd_execute): Use
6027 scoped_restore_current_language.
6028 * language.h (scoped_restore_current_language): New class.
6029
b80cf838
TT
60302017-08-03 Tom Tromey <tom@tromey.com>
6031
6032 * compile/compile.c (cleanup_unlink_file): Remove.
6033 (compile_to_object): Use gdb::unlinker.
6034 (eval_compile_command): Likewise.
6035
fad0444a
TT
60362017-08-03 Tom Tromey <tom@tromey.com>
6037
6038 * utils.h (make_cleanup_fclose): Remove.
6039 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6040
6e7bc05c
TT
60412017-08-03 Tom Tromey <tom@tromey.com>
6042
6043 * top.c (open_terminal_stream): Return gdb_file_up.
6044 (new_ui_command): Update.
6045
4a45905b
TT
60462017-08-03 Tom Tromey <tom@tromey.com>
6047
6048 * source.c (print_source_lines_base, forward_search_command)
6049 (reverse_search_command): Use gdb_file_up.
6050
7cd06d6e
TT
60512017-08-03 Tom Tromey <tom@tromey.com>
6052
6053 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6054
ed166945
TT
60552017-08-03 Tom Tromey <tom@tromey.com>
6056
6057 * cli/cli-cmds.c (find_and_open_script): Change return type.
6058 Remove "streamp" and "full_path" parameters.
6059 (source_script_with_search): Update.
6060 * auto-load.c (source_script_file): Update.
6061 * cli/cli-cmds.h (find_and_open_script): Change type.
6062 (open_script): New struct.
6063
d419f42d
TT
60642017-08-03 Tom Tromey <tom@tromey.com>
6065
6066 * xml-support.c (xml_fetch_content_from_file): Update.
6067 * ui-file.c (stdio_file::open): Update.
6068 * tracefile-tfile.c (tfile_start): Update.
6069 * remote.c (remote_file_put, remote_file_get): Update.
6070 * nat/linux-procfs.c (linux_proc_get_int)
6071 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6072 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6073 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6074 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6075 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6076 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6077 * linux-nat.c (linux_proc_pending_signals): Update.
6078 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6079 (file_closer): Remove.
6080 * compile/compile.c (compile_to_object): Update.
6081 * common/filestuff.h (struct gdb_file_deleter): New.
6082 (gdb_file_up): New typedef.
6083 (gdb_fopen_cloexec): Change return type.
6084 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6085 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6086 (dump_binary_file, restore_binary_file): Update.
6087 * auto-load.c (auto_load_objfile_script_1): Update.
6088
4a2b031d
TT
60892017-08-03 Tom Tromey <tom@tromey.com>
6090
6091 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6092 (info_static_tracepoint_markers_command): Likewise.
6093 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6094 * skip.c (skip_info): Use ui_out_emit_table.
6095 * progspace.c (print_program_space): Use ui_out_emit_table.
6096 * osdata.c (info_osdata): Use ui_out_emit_table.
6097 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6098 ui_out_emit_table.
6099 * linux-thread-db.c (info_auto_load_libthread_db): Use
6100 ui_out_emit_table.
6101 * inferior.c (print_inferior): Use ui_out_emit_table.
6102 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6103 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6104 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6105 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6106 * ui-out.h (class ui_out_emit_table): New.
6107
a4f320fd
MR
61082017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6109
6110 * mips-tdep.c (mips_fpu_type_str): New function.
6111 (mips_dump_tdep): Call it.
6112
a2f1f308
MR
61132017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6114
6115 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6116 `->mips_fpu_type'.
6117
7e5ed83b
XR
61182017-07-31 Xavier Roirand <roirand@adacore.com>
6119
6120 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6121
4c9dc811
XR
61222017-07-27 Xavier Roirand <roirand@adacore.com>
6123
6124 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6125
27d41eac
YQ
61262017-07-26 Yao Qi <yao.qi@linaro.org>
6127
6128 * cli/cli-cmds.c (maintenancechecklist): New variable.
6129 * gdbcmd.h (maintenancechecklist): Declare it.
6130 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6131 Call i386_linux_read_description with different masks.
6132 * maint.c (maintenance_check_command): New function.
6133 (_initialize_maint_cmds): Call add_prefix_cmd.
6134 * target-descriptions.c (tdesc_reg): override operator != and ==.
6135 (tdesc_type): Likewise.
6136 (tdesc_feature): Likewise.
6137 (target_desc): Likewise.
6138 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6139 (maintenance_check_xml_descriptions): New function.
6140 (_initialize_target_descriptions) Add command "xml-descriptions".
6141 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6142
ea03d0d3
YQ
61432017-07-26 Yao Qi <yao.qi@linaro.org>
6144
6145 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6146 Include features/i386/32bit-*.c.
6147 (i386_linux_read_description): Generate target description if it
6148 doesn't exist.
6149 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6150 functions.
6151 * features/i386/32bit-linux.c: Re-generated.
6152 * features/i386/32bit-sse.c: Likewise.
6153 * target-descriptions.c (print_c_feature::visit): Print code to
6154 set register number if needed.
6155 (print_c_feature) <m_next_regnum>: New field.
6156
25aa13e5
YQ
61572017-07-26 Yao Qi <yao.qi@linaro.org>
6158
6159 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6160 (FEATURE_XMLFILES): New.
6161 (FEATURE_CFILES): New.
6162 New rules.
6163 (clean-cfiles): Remove generated c files.
6164 * features/i386/32bit-avx.c: Generated.
6165 * features/i386/32bit-avx512.c: Generated.
6166 * features/i386/32bit-core.c: Generated.
6167 * features/i386/32bit-linux.c: Generated.
6168 * features/i386/32bit-mpx.c: Generated.
6169 * features/i386/32bit-pkeys.c: Generated.
6170 * features/i386/32bit-sse.c: Generated.
6171 * target-descriptions.c: Include algorithm.
6172 (tdesc_element_visitor): Add method visit_end.
6173 (print_c_tdesc): Implement visit_end.
6174 (print_c_tdesc:: m_filename_after_features): Move it to
6175 protected.
6176 (print_c_feature): New class.
6177 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6178 name starts with "i386/32bit-".
6179
6eb1e6a8
YQ
61802017-07-26 Yao Qi <yao.qi@linaro.org>
6181
6182 * target-descriptions.c (tdesc_element_visitor): New class.
6183 (tdesc_element): New class.
6184 (tdesc_reg): Inherit from tdesc_element.
6185 (tdesc_reg::accept): New function.
6186 (tdesc_type): Inherit from tdesc_element.
6187 (tdesc_type::accept): New function.
6188 (tdesc_feature): Inherit from tdesc_element.
6189 (tdesc_feature::accept): New function.
6190 (target_desc): Inherit from tdesc_element.
6191 (target_desc::target_desc): New.
6192 (target_desc::~target_desc): New.
6193 (target_desc::accept): New.
6194 (allocate_target_description): Use new.
6195 (free_target_description): Use delete.
6196 (print_c_tdesc): New class.
6197 (maint_print_c_tdesc_cmd): Adjust.
6198
6199 * features/aarch64.c: Re-generated.
6200 * features/arc-arcompact.c: Re-generated.
6201 * features/arc-v2.c: Re-generated.
6202 * features/arm/arm-with-iwmmxt.c: Re-generated.
6203 * features/arm/arm-with-m.c: Re-generated.
6204 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6205 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6206 * features/arm/arm-with-neon.c: Re-generated.
6207 * features/arm/arm-with-vfpv2.c: Re-generated.
6208 * features/arm/arm-with-vfpv3.c: Re-generated.
6209 * features/i386/amd64-avx-avx512.c: Re-generated.
6210 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6211 * features/i386/amd64-avx.c: Re-generated.
6212 * features/i386/amd64-avx-linux.c: Re-generated.
6213 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6214 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6215 * features/i386/amd64-avx-mpx.c: Re-generated.
6216 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6217 * features/i386/amd64.c: Re-generated.
6218 * features/i386/amd64-linux.c: Re-generated.
6219 * features/i386/amd64-mpx.c: Re-generated.
6220 * features/i386/amd64-mpx-linux.c: Re-generated.
6221 * features/i386/i386-avx-avx512.c: Re-generated.
6222 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6223 * features/i386/i386-avx.c: Re-generated.
6224 * features/i386/i386-avx-linux.c: Re-generated.
6225 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6226 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6227 * features/i386/i386-avx-mpx.c: Re-generated.
6228 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6229 * features/i386/i386.c: Re-generated.
6230 * features/i386/i386-linux.c: Re-generated.
6231 * features/i386/i386-mmx.c: Re-generated.
6232 * features/i386/i386-mmx-linux.c: Re-generated.
6233 * features/i386/i386-mpx.c: Re-generated.
6234 * features/i386/i386-mpx-linux.c: Re-generated.
6235 * features/i386/x32-avx-avx512.c: Re-generated.
6236 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6237 * features/i386/x32-avx.c: Re-generated.
6238 * features/i386/x32-avx-linux.c: Re-generated.
6239 * features/i386/x32.c: Re-generated.
6240 * features/i386/x32-linux.c: Re-generated.
6241 * features/microblaze.c: Re-generated.
6242 * features/microblaze-with-stack-protect.c: Re-generated.
6243 * features/mips64-dsp-linux.c: Re-generated.
6244 * features/mips64-linux.c: Re-generated.
6245 * features/mips-dsp-linux.c: Re-generated.
6246 * features/mips-linux.c: Re-generated.
6247 * features/nds32.c: Re-generated.
6248 * features/nios2.c: Re-generated.
6249 * features/nios2-linux.c: Re-generated.
6250 * features/rs6000/powerpc-32.c: Re-generated.
6251 * features/rs6000/powerpc-32l.c: Re-generated.
6252 * features/rs6000/powerpc-403.c: Re-generated.
6253 * features/rs6000/powerpc-403gc.c : Re-generated.
6254 * features/rs6000/powerpc-405.c: Re-generated.
6255 * features/rs6000/powerpc-505.c: Re-generated.
6256 * features/rs6000/powerpc-601.c: Re-generated.
6257 * features/rs6000/powerpc-602.c: Re-generated.
6258 * features/rs6000/powerpc-603.c: Re-generated.
6259 * features/rs6000/powerpc-604.c: Re-generated.
6260 * features/rs6000/powerpc-64.c: Re-generated.
6261 * features/rs6000/powerpc-64l.c: Re-generated.
6262 * features/rs6000/powerpc-7400.c: Re-generated.
6263 * features/rs6000/powerpc-750.c: Re-generated.
6264 * features/rs6000/powerpc-860.c: Re-generated.
6265 * features/rs6000/powerpc-altivec32.c: Re-generated.
6266 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6267 * features/rs6000/powerpc-altivec64.c: Re-generated.
6268 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6269 * features/rs6000/powerpc-cell32l.c: Re-generated.
6270 * features/rs6000/powerpc-cell64l.c: Re-generated.
6271 * features/rs6000/powerpc-e500.c: Re-generated.
6272 * features/rs6000/powerpc-e500l.c: Re-generated.
6273 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6274 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6275 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6276 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6277 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6278 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6279 * features/rs6000/powerpc-vsx32.c: Re-generated.
6280 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6281 * features/rs6000/powerpc-vsx64.c: Re-generated.
6282 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6283 * features/rs6000/rs6000.c: Re-generated.
6284 * features/s390-linux32.c: Re-generated.
6285 * features/s390-linux32v1.c: Re-generated.
6286 * features/s390-linux32v2.c: Re-generated.
6287 * features/s390-linux64.c: Re-generated.
6288 * features/s390-linux64v1.c: Re-generated.
6289 * features/s390-linux64v2.c: Re-generated.
6290 * features/s390-te-linux64.c: Re-generated.
6291 * features/s390-tevx-linux64.c: Re-generated.
6292 * features/s390-vx-linux64.c: Re-generated.
6293 * features/s390x-linux64.c: Re-generated.
6294 * features/s390x-linux64v1.c: Re-generated.
6295 * features/s390x-linux64v2.c: Re-generated.
6296 * features/s390x-te-linux64.c: Re-generated.
6297 * features/s390x-tevx-linux64.c: Re-generated.
6298 * features/s390x-vx-linux64.c: Re-generated.
6299 * features/sparc/sparc32-solaris.c: Re-generated.
6300 * features/sparc/sparc64-solaris.c: Re-generated.
6301 * features/tic6x-c62x.c: Re-generated.
6302 * features/tic6x-c62x-linux.c: Re-generated.
6303 * features/tic6x-c64x.c: Re-generated.
6304 * features/tic6x-c64x-linux.c: Re-generated.
6305 * features/tic6x-c64xp.c: Re-generated.
6306 * features/tic6x-c64xp-linux.c: Re-generated.
6307
35b4818d
YQ
63082017-07-26 Yao Qi <yao.qi@linaro.org>
6309
6310 * i386-linux-tdep.c (i386_linux_read_description): New function.
6311 (i386_linux_core_read_description): Call
6312 i386_linux_read_description.
6313 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6314 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6315 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6316 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6317 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6318 * x86-linux-nat.c (x86_linux_read_description): Call
6319 i386_linux_read_description.
6320
8e2141c6
YQ
63212017-07-26 Yao Qi <yao.qi@linaro.org>
6322
6323 * NEWS: Mention it.
6324 * features/Makefile (%.c: %.xml): Pass the xml file name to
6325 command "maint print c-tdesc".
6326 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6327 name from 'arg'.
6328
b468ff4c
YQ
63292017-07-26 Yao Qi <yao.qi@linaro.org>
6330
6331 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6332 in-class initialization.
6333 (tdesc_create_feature): Call new instead of XCNEW.
6334 (free_target_description): Ue delete.
6335
b9c0e1b4
JB
63362017-07-25 John Baldwin <jhb@FreeBSD.org>
6337
6338 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6339
a04b5337
YQ
63402017-07-25 Yao Qi <yao.qi@linaro.org>
6341
6342 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6343 constant.
6344 (amd64_x32_init_abi): Likewise.
6345 * amd64-tdep.h (amd64_init_abi): Update declaration.
6346 (amd64_x32_init_abi): Likewise.
6347
02ad7fc2
YQ
63482017-07-25 Yao Qi <yao.qi@linaro.org>
6349
6350 PR tdep/21717
6351 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6352 condition for FPSCR.
6353 (arm_linux_store_inferior_registers): Likewise.
6354
b6f48cb0
TT
63552017-07-22 Tom Tromey <tom@tromey.com>
6356
6357 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6358 <syscalls_counts>: Now a std::vector.
6359 (get_catch_syscall_inferior_data): Use "new".
6360 (catch_syscall_inferior_data_cleanup): Use "delete".
6361 (insert_catch_syscall, remove_catch_syscall)
6362 (clear_syscall_counts): Update.
6363
e12c9b7a
TT
63642017-07-22 Tom Tromey <tom@tromey.com>
6365
6366 * break-catch-syscall.c (syscall_catchpoint)
6367 <syscalls_to_be_caught>: Now a std::vector<int>
6368 (~syscall_catchpoint): Remove.
6369 (insert_catch_syscall, remove_catch_syscall)
6370 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6371 (print_mention_catch_syscall, print_recreate_catch_syscall):
6372 Update.
6373 (create_syscall_event_catchpoint): Change type of "filter"
6374 parameter.
6375 (catch_syscall_split_args): Return a std::vector.
6376 (catch_syscall_command_1, catching_syscall_number_1): Update.
6377
4fa8aeac
TT
63782017-07-22 Tom Tromey <tom@tromey.com>
6379
6380 * break-catch-throw.c (struct exception_catchpoint)
6381 <exception_rx>: Now a std::string.
6382 (~exception_catchpoint): Remove.
6383 (print_one_detail_exception_catchpoint): Update.
6384 (handle_gnu_v3_exceptions): Change type of except_rx.
6385 (extract_exception_regexp): Return a std::string.
6386 (catch_exception_command_1): Update.
6387
f746a154
TT
63882017-07-22 Tom Tromey <tom@tromey.com>
6389
6390 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6391 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6392 std::vector.
6393 <catch_all>: Now a bool.
6394 (~signal_catchpoint): Remove.
6395 (signal_catchpoint_insert_location)
6396 (signal_catchpoint_remove_location)
6397 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6398 (signal_catchpoint_print_mention)
6399 (signal_catchpoint_print_recreate)
6400 (signal_catchpoint_explains_signal): Update.
6401 (create_signal_catchpoint): Change type of "filter" and
6402 "catch_all".
6403 (catch_signal_split_args): Return a std::vector. Change type of
6404 "catch_all".
6405 (catch_signal_command): Update.
6406
47e77640
PA
64072017-07-20 Pedro Alves <palves@redhat.com>
6408
6409 * ada-lang.c (ada_language_defn): Make extern.
6410 (_initialize_ada_language): Remove add_language call.
6411 * c-lang.c (c_language_defn, cplus_language_defn)
6412 (asm_language_defn, minimal_language_defn): Make extern.
6413 (_initialize_c_language): Delete.
6414 * completer.c (compare_cstrings): Delete, moved to utils.h.
6415 * d-lang.c (d_language_defn): Make extern.
6416 (_initialize_d_language): Remove add_language calls.
6417 * defs.h (enum language): Add comment.
6418 * f-lang.c (f_language_defn): Make extern.
6419 (_initialize_f_language): Remove add_language call.
6420 * go-lang.c (go_language_defn): Make extern.
6421 (_initialize_go_language): Remove add_language call.
6422 * language.c: Include <algorithm>.
6423 (languages): Redefine as const array.
6424 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6425 (set_language_command): Handle "local". Use for-range loop.
6426 (set_language): Remove loop.
6427 (language_enum): Rewrite.
6428 (language_def, language_str): Remove loops.
6429 (add_language): Delete.
6430 (add_set_language_command): New, based on add_languages.
6431 (skip_language_trampoline): Adjust.
6432 (local_language_defn): Delete.
6433 (language_gdbarch_post_init): Adjust.
6434 (_initialize_language): Remove add_language calls. Call
6435 add_set_language_command.
6436 * language.h (add_language): Delete.
6437 (auto_language_defn)
6438 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6439 (asm_language_defn, c_language_defn, cplus_language_defn)
6440 (d_language_defn, f_language_defn, go_language_defn)
6441 (m2_language_defn, objc_language_defn, opencl_language_defn)
6442 (pascal_language_defn, rust_language_defn): Declare.
6443 * m2-lang.c (m2_language_defn): Make extern.
6444 (_initialize_m2_language): Remove add_language call.
6445 * objc-lang.c (objc_language_defn): Make extern.
6446 (_initialize_objc_language): Remove add_language call.
6447 * opencl-lang.c (opencl_language_defn): Make extern.
6448 (_initialize_opencl_language): Remove add_language call.
6449 * p-lang.c (pascal_language_defn): Make extern.
6450 (_initialize_pascal_language): Delete.
6451 * rust-lang.c (rust_language_defn): Make extern.
6452 (_initialize_rust_language): Delete.
6453 * utils.h (compare_cstrings): New static inline function.
6454
edb0c9cb
PA
64552017-07-20 Pedro Alves <palves@redhat.com>
6456
6457 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6458 (get_var_value): Constify parameters.
6459 (get_int_var_value): Change prototype.
6460 (to_fixed_range_type): Adjust.
6461 * ada-lang.h (get_int_var_value): Change prototype.
6462
a778f165
PA
64632017-07-20 Pedro Alves <palves@redhat.com>
6464
6465 * dwarf2read.c (dw2_lookup_symbol): Use
6466 SYMBOL_MATCHES_SEARCH_NAME.
6467 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6468
42edd901
PA
64692017-07-20 Pedro Alves <palves@redhat.com>
6470
6471 * block.c (block_iter_name_step, block_iter_name_first)
6472 (block_iter_name_next): Delete.
6473 (block_lookup_symbol_primary): Adjust to use
6474 dict_iter_match_first/dict_iter_match_next.
6475 * block.h (block_iter_name_first, block_iter_name_next): Delete
6476 declarations.
6477 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6478 dict_iter_match_first/dict_iter_match_next.
6479
cf325299
PA
64802017-07-20 Pedro Alves <palves@redhat.com>
6481
6482 * cp-support.c (cp_find_first_component_aux): Add missing case for
6483 end of string.
6484
c5ed0576
DB
64852017-07-18 David Blaikie <dblaikie@gmail.com>
6486
6487 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6488 of dwo_cu's dwo_file.
6489
27841e76
YQ
64902017-07-18 Yao Qi <yao.qi@linaro.org>
6491
6492 * remote.c (store_registers_using_G): Remove one line comment.
6493
cfb7e58b
YQ
64942017-07-18 Yao Qi <yao.qi@linaro.org>
6495
6496 * regcache.c (regcache_cpy): Simplify it.
6497 (regcache::cpy_no_passthrough): Remove it.
6498 * regcache.h (cpy_no_passthrough): Remove it.
6499 (regcache_dup, regcache_cpy): Update comments.
6500
386535dd
PA
65012017-07-18 Pedro Alves <palves@redhat.com>
6502
6503 * remote-sim.c (sim_command_completer): Adjust to work with a
6504 completion_tracker instead of a VEC.
6505
c45ec17c
PA
65062017-07-17 Pedro Alves <palves@redhat.com>
6507
6508 * completer.c (complete_source_filenames): New function.
6509 (complete_address_and_linespec_locations): New function.
6510 (location_completer): Use complete_address_and_linespec_locations.
6511 (completion_tracker::build_completion_result): Honor the tracker's
6512 request to suppress append.
6513 * completer.h (completion_tracker::suppress_append_ws)
6514 (completion_tracker::set_suppress_append_ws): New methods.
6515 (completion_tracker::m_suppress_append_ws): New field.
6516 (complete_source_filenames): New declaration.
6517 * linespec.c (linespec_complete_what): New.
6518 (struct ls_parser) <complete_what, completion_word,
6519 completion_quote_char, completion_quote_end, completion_tracker>:
6520 New fields.
6521 (string_find_incomplete_keyword_at_end): New.
6522 (linespec_lexer_lex_string): Record quote char. If in completion
6523 mode, don't throw.
6524 (linespec_lexer_consume_token): Advance the completion word point.
6525 (linespec_lexer_peek_token): Save/restore completion info.
6526 (save_stream_and_consume_token): New.
6527 (set_completion_after_number): New.
6528 (linespec_parse_basic): Set what to complete next depending on
6529 token. Handle function and label completions specially.
6530 (parse_linespec): Disable objc shortcut in completion mode. Set
6531 what to complete next depending on token type. Skip keyword if in
6532 completion mode.
6533 (complete_linespec_component, linespec_complete): New.
6534 * linespec.h (linespec_complete): Declare.
6535
be966d42
PA
65362017-07-17 Pedro Alves <palves@redhat.com>
6537
6538 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6539 Handle 'operator<' / 'operator<<'.
6540
a2459270
PA
65412017-07-17 Pedro Alves <palves@redhat.com>
6542
6543 * completer.c (collect_explicit_location_matches): Handle
6544 MATCH_LABEL.
6545 (convert_explicit_location_to_linespec): New, factored out from
6546 ...
6547 (convert_explicit_location_to_sals): ... this.
6548 (complete_label): New.
6549 (linespec_complete_label, find_label_symbols_in_block): New.
6550 (find_label_symbols): Add completion_mode parameter and adjust to
6551 call find_label_symbols_in_block.
6552 * linespec.h (linespec_complete_label): Declare.
6553
c6756f62
PA
65542017-07-17 Pedro Alves <palves@redhat.com>
6555
6556 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6557 complete_symbol_mode parameter.
6558 * cli/cli-cmds.c (complete_command): Get the completion result out
6559 of the handle_brkchars tracker if used a custom word point.
6560 * completer.c: Include "linespec.h".
6561 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6562 (advance_to_expression_complete_word_point): New.
6563 (completion_tracker::completes_to_completion_word): New.
6564 (complete_files_symbols): Pass down
6565 complete_symbol_mode::EXPRESSION.
6566 (explicit_options, probe_options): New.
6567 (collect_explicit_location_matches): Complete on the
6568 explictit_loc->foo instead of word. Use
6569 linespec_complete_function. Handle MATCH_LINE. Handle offering
6570 keyword and options completions.
6571 (backup_text_ptr): Delete.
6572 (skip_keyword): New.
6573 (complete_explicit_location): Remove 'word' parameter. Add
6574 language, quoted_arg_start and quoted_arg_end parameters.
6575 Rewrite, parsing left to right.
6576 (location_completer): Rewrite.
6577 (location_completer_handle_brkchars): New function.
6578 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6579 (enum complete_line_internal_reason): Adjust comments.
6580 (completion_tracker::discard_completions): New.
6581 (completer_handle_brkchars_func_for_completer): Handle
6582 location_completer.
6583 (gdb_custom_word_point_brkchars)
6584 (gdb_org_rl_basic_quote_characters): New.
6585 (gdb_completion_word_break_characters_throw)
6586 (completion_find_completion_word): Handle trackers that use a
6587 custom word point.
6588 (completion_tracker::advance_custom_word_point_by): New.
6589 (completion_tracker::build_completion_result): Don't rely on
6590 readline appending the quote char.
6591 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6592 use a custom word point.
6593 (gdb_rl_attempted_completion_function): Restore
6594 rl_basic_quote_characters.
6595 * completer.h (class completion_tracker): Extend intro comment.
6596 (completion_tracker::set_quote_char)
6597 (completion_tracker::quote_char)
6598 (completion_tracker::set_use_custom_word_point)
6599 (completion_tracker::use_custom_word_point)
6600 (completion_tracker::custom_word_point)
6601 (completion_tracker::set_custom_word_point)
6602 (completion_tracker::advance_custom_word_point_by)
6603 (completion_tracker::completes_to_completion_word)
6604 (completion_tracker::discard_completions): New methods.
6605 (completion_tracker::m_quote_char)
6606 (completion_tracker::m_use_custom_word_point)
6607 (completion_tracker::m_custom_word_point): New fields.
6608 (advance_to_expression_complete_word_point): Declare.
6609 * f-lang.c (f_collect_symbol_completion_matches): Add
6610 complete_symbol_mode parameter.
6611 * language.h (struct language_defn)
6612 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6613 parameter.
6614 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6615 (linespec_complete_function): New function.
6616 (linespec_lexer_lex_keyword): Adjust.
6617 * linespec.h (linespec_keywords, linespec_complete_function): New
6618 declarations.
6619 * location.c (find_end_quote): New function.
6620 (explicit_location_lex_one): Add explicit_completion_info
6621 parameter. Save quoting info. Don't throw if being called for
6622 completion. Don't handle Ada operators here.
6623 (is_cp_operator, skip_op_false_positives, first_of)
6624 (explicit_location_lex_one_function): New function.
6625 (string_to_explicit_location): Replace 'dont_throw' parameter with
6626 an explicit_completion_info pointer parameter. Handle it. Don't
6627 use explicit_location_lex_one to lex function names. Use
6628 explicit_location_lex_one_function instead.
6629 * location.h (struct explicit_completion_info): New.
6630 (string_to_explicit_location): Replace 'dont_throw' parameter with
6631 an explicit_completion_info pointer parameter.
6632 * symtab.c (default_collect_symbol_completion_matches_break_on):
6633 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6634 (default_collect_symbol_completion_matches)
6635 (collect_symbol_completion_matches): Add complete_symbol_mode
6636 parameter.
6637 (collect_symbol_completion_matches_type): Pass down
6638 complete_symbol_mode::EXPRESSION.
6639 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6640 parameter. Handle LINESPEC mode.
6641 * symtab.h (complete_symbol_mode): New.
6642 (default_collect_symbol_completion_matches_break_on)
6643 (default_collect_symbol_completion_matches)
6644 (collect_symbol_completion_matches)
6645 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6646 parameter.
6647
1d550c82
PA
66482017-07-17 Pedro Alves <palves@redhat.com>
6649
6650 * utils.c (enum class strncmp_iw_mode): New.
6651 (strcmp_iw): Rename to ...
6652 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6653 parameters. Handle them.
6654 (strncmp_iw): New.
6655 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6656 * utils.h (strncmp_iw): Declare.
6657 (strcmp_iw): Move describing comments here.
6658
8090b426
PA
66592017-07-17 Pedro Alves <palves@redhat.com>
6660
6661 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6662 CP_OPERATOR_STR.
6663 * c-typeprint.c (is_type_conversion_operator): Use
6664 CP_OPERATOR_STR.
6665 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6666 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6667 CP_OPERATOR_LEN.
6668 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6669 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6670 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6671 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6672 CP_OPERATOR_STR.
6673 * location.c: Include "cp-support.h".
6674 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6675 CP_OPERATOR_STR.
6676 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6677 CP_OPERATOR_LEN.
6678
6a2c1b87
PA
66792017-07-17 Pedro Alves <palves@redhat.com>
6680
6681 * cli/cli-cmds.c (complete_command): Use a completion tracker
6682 along with completion_find_completion_word for handle_brkchars
6683 phase.
6684 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6685 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6686 (struct gdb_rl_completion_word_info): New.
6687 (gdb_rl_find_completion_word): New.
6688 (completion_find_completion_word): New.
6689 * completer.h (completion_find_completion_word): Declare.
6690
eb3ff9a5
PA
66912017-07-17 Pedro Alves <palves@redhat.com>
6692
6693 * ada-lang.c (symbol_completion_match): Adjust comments.
6694 (symbol_completion_add): Replace vector parameter with
6695 completion_tracker parameter. Use it.
6696 (ada_make_symbol_completion_list): Rename to...
6697 (ada_collect_symbol_completion_matches): ... this. Add
6698 completion_tracker parameter and use it.
6699 (ada_language_defn): Adjust.
6700 * break-catch-syscall.c (catch_syscall_completer): Adjust
6701 prototype and work with completion_tracker instead of VEC.
6702 * breakpoint.c (condition_completer): Adjust prototype and work
6703 with completion_tracker instead of VEC.
6704 * c-lang.c (c_language_defn, cplus_language_defn)
6705 (asm_language_defn, minimal_language_defn): Adjust to renames.
6706 * cli/cli-cmds.c (complete_command): Rework using
6707 completion_tracker. Catch exceptions when completing.
6708 * cli/cli-decode.c (integer_unlimited_completer)
6709 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6710 with completion_tracker instead of VEC.
6711 * command.h (struct completion_tracker): Forward declare.
6712 (completer_ftype, completer_handle_brkchars_ftype): Change
6713 types.
6714 (complete_on_cmdlist, complete_on_enum): Adjust.
6715 * completer.c: Include <algorithm>.
6716 (struct gdb_completer_state): New.
6717 (current_completion): New global.
6718 (readline_line_completion_function): Delete.
6719 (noop_completer, filename_completer)
6720 (filename_completer_handle_brkchars, complete_files_symbols)
6721 (linespec_location_completer): Adjust to work with a
6722 completion_tracker instead of a VEC.
6723 (string_or_empty): New.
6724 (collect_explicit_location_matches): Adjust to work with a
6725 completion_tracker instead of a VEC.
6726 (explicit_location_completer): Rename to ...
6727 (complete_explicit_location): ... this and adjust to work with a
6728 completion_tracker instead of a VEC.
6729 (location_completer): Adjust to work with a completion_tracker
6730 instead of a VEC.
6731 (add_struct_fields): Adjust to work with a completion_list instead
6732 of VEC.
6733 (expression_completer): Rename to ...
6734 (complete_expression): ... this and adjust to work with a
6735 completion_tracker instead of a VEC. Use complete_files_symbols.
6736 (expression_completer): Reimplement on top of complete_expression.
6737 (symbol_completer): Adjust to work with a completion_tracker
6738 instead of a VEC.
6739 (enum complete_line_internal_reason): Add describing comments.
6740 (complete_line_internal_normal_command): Adjust to work with a
6741 completion_tracker instead of a VEC.
6742 (complete_line_internal): Rename to ...
6743 (complete_line_internal_1): ... this and adjust to work with a
6744 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6745 handle_brkchars phase.
6746 (new_completion_tracker): Delete.
6747 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6748 complete_line_internal_1.
6749 (free_completion_tracker): Delete.
6750 (INITIAL_COMPLETION_HTAB_SIZE): New.
6751 (completion_tracker::completion_tracker)
6752 (completion_tracker::~completion_tracker): New.
6753 (maybe_add_completion): Delete.
6754 (completion_tracker::maybe_add_completion)
6755 (completion_tracker::add_completion)
6756 (completion_tracker::add_completions): New.
6757 (throw_max_completions_reached_error): Delete.
6758 (complete_line): Adjust to work with a completion_tracker instead
6759 of a VEC. Don't create a completion_tracker_t or check for max
6760 completions here.
6761 (command_completer, command_completer_handle_brkchars)
6762 (signal_completer, reg_or_group_completer_1)
6763 (reg_or_group_completer, default_completer_handle_brkchars):
6764 Adjust to work with a completion_tracker.
6765 (gdb_completion_word_break_characters_throw): New.
6766 (gdb_completion_word_break_characters): Reimplement.
6767 (line_completion_function): Delete.
6768 (completion_tracker::recompute_lowest_common_denominator)
6769 (expand_preserving_ws)
6770 (completion_tracker::build_completion_result)
6771 (completion_result::completion_result)
6772 (completion_result::completion_result)
6773 (completion_result::~completion_result)
6774 (completion_result::completion_result)
6775 (completion_result::release_match_list, compare_cstrings)
6776 (completion_result::sort_match_list)
6777 (completion_result::reset_match_list)
6778 (gdb_rl_attempted_completion_function_throw)
6779 (gdb_rl_attempted_completion_function): New.
6780 * completer.h (completion_list, struct completion_result)
6781 (class completion_tracker): New.
6782 (complete_line): Add completion_tracker parameter.
6783 (readline_line_completion_function): Delete.
6784 (gdb_rl_attempted_completion_function): New.
6785 (noop_completer, filename_completer, expression_completer)
6786 (location_completer, symbol_completer, command_completer)
6787 (signal_completer, reg_or_group_completer): Update prototypes.
6788 (completion_tracker_t, new_completion_tracker)
6789 (make_cleanup_free_completion_tracker): Delete.
6790 (enum maybe_add_completion_enum): Delete.
6791 (maybe_add_completion): Delete.
6792 (throw_max_completions_reached_error): Delete.
6793 * corefile.c (complete_set_gnutarget): Adjust to work with a
6794 completion_tracker instead of a VEC.
6795 * cp-abi.c (cp_abi_completer): Adjust to work with a
6796 completion_tracker instead of a VEC.
6797 * d-lang.c (d_language_defn): Adjust.
6798 * disasm.c (disassembler_options_completer): Adjust to work with a
6799 completion_tracker instead of a VEC.
6800 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6801 (f_collect_symbol_completion_matches): ... this. Adjust to work
6802 with a completion_tracker instead of a VEC.
6803 (f_language_defn): Adjust.
6804 * go-lang.c (go_language_defn): Adjust.
6805 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6806 Adjust to work with a completion_tracker instead of a VEC.
6807 * infrun.c (handle_completer): Likewise.
6808 * interps.c (interpreter_completer): Likewise.
6809 * interps.h (interpreter_completer): Likewise.
6810 * language.c (unknown_language_defn, auto_language_defn)
6811 (local_language_defn): Adjust.
6812 * language.h (language_defn::la_make_symbol_completion_list):
6813 Rename to ...
6814 (language_defn::la_collect_symbol_completion_matches): ... this
6815 and adjust to work with a completion_tracker instead of a VEC.
6816 * m2-lang.c (m2_language_defn): Adjust.
6817 * objc-lang.c (objc_language_defn): Adjust.
6818 * opencl-lang.c (opencl_language_defn): Adjust.
6819 * p-lang.c (pascal_language_defn): Adjust.
6820 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6821 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6822 with a completion_tracker.
6823 * rust-lang.c (rust_language_defn): Adjust.
6824 * symtab.c (free_completion_list, do_free_completion_list)
6825 (return_val, completion_tracker): Delete.
6826 (completion_list_add_name, completion_list_add_symbol)
6827 (completion_list_add_msymbol, completion_list_objc_symbol)
6828 (completion_list_add_fields, add_symtab_completions): Add
6829 completion_tracker parameter and use it.
6830 (default_make_symbol_completion_list_break_on_1): Rename to...
6831 (default_collect_symbol_completion_matches_break_on): ... this.
6832 Add completion_tracker parameter and use it instead of allocating
6833 a completion tracker here.
6834 (default_make_symbol_completion_list_break_on): Delete old
6835 implementation.
6836 (default_make_symbol_completion_list): Delete.
6837 (default_collect_symbol_completion_matches): New.
6838 (make_symbol_completion_list): Delete.
6839 (collect_symbol_completion_matches): New.
6840 (make_symbol_completion_type): Rename to ...
6841 (collect_symbol_completion_matches_type): ... this. Add
6842 completion_tracker parameter and use it instead of VEC.
6843 (make_file_symbol_completion_list_1): Rename to...
6844 (collect_file_symbol_completion_matches): ... this. Add
6845 completion_tracker parameter and use it instead of VEC.
6846 (make_file_symbol_completion_list): Delete.
6847 (add_filename_to_list): Use completion_list instead of a VEC.
6848 (add_partial_filename_data::list): Now a completion_list.
6849 (make_source_files_completion_list): Work with a completion_list
6850 instead of a VEC.
6851 * symtab.h: Include "completer.h".
6852 (default_make_symbol_completion_list_break_on)
6853 (default_make_symbol_completion_list, make_symbol_completion_list)
6854 (make_symbol_completion_type, make_file_symbol_completion_list)
6855 (make_source_files_completion_list): Delete.
6856 (default_collect_symbol_completion_matches_break_on)
6857 (default_collect_symbol_completion_matches)
6858 (collect_symbol_completion_matches)
6859 (collect_symbol_completion_matches_type)
6860 (collect_file_symbol_completion_matches)
6861 (make_source_files_completion_list): New.
6862 * top.c (init_main): Don't install a rl_completion_entry_function
6863 hook. Install a rl_attempted_completion_function hook instead.
6864 * tui/tui-layout.c (layout_completer): Adjust to work with a
6865 completion_tracker.
6866 * tui/tui-regs.c (tui_reggroup_completer):
6867 * tui/tui-win.c (window_name_completer, focus_completer)
6868 (winheight_completer): Adjust to work with a completion_tracker.
6869 * value.c: Include "completer.h".
6870 (complete_internalvar): Adjust to work with a completion_tracker.
6871 * value.h (complete_internalvar): Likewise.
6872
6e1dbf8c
PA
68732017-07-17 Pedro Alves <palves@redhat.com>
6874
6875 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6876 renames.
6877 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6878 comments to completer_ftype's declaration.
6879 <completer_handle_brkchars>: Change type to
6880 completer_handle_brkchars_ftype.
6881 * command.h (completer_ftype): Add describing comment and give
6882 names to parameters.
6883 (completer_ftype_void): Rename to ...
6884 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6885 (set_cmd_completer_handle_brkchars): Adjust.
6886 * completer.c (filename_completer_handle_brkchars): New function.
6887 (complete_line_internal_normal_command): New function, factored
6888 out from ...
6889 (complete_line_internal): ... here.
6890 (command_completer_handle_brkchars)
6891 (default_completer_handle_brkchars)
6892 (completer_handle_brkchars_func_for_completer): New functions.
6893 * completer.h (set_gdb_completion_word_break_characters): Delete
6894 declaration.
6895 (completer_handle_brkchars_func_for_completer): New declaration.
6896 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6897 completer_handle_brkchars_func_for_completer.
6898
78b13106
PA
68992017-07-17 Pedro Alves <palves@redhat.com>
6900
6901 * completer.c (symbol_completer): New function, based on
6902 make_symbol_completion_list_fn.
6903 * completer.h (symbol_completer): New declaration.
6904 * guile/scm-cmd.c (cmdscm_completers): Adjust.
6905 * python/py-cmd.c (completers): Adjust.
6906 * symtab.c (make_symbol_completion_list_fn): Delete.
6907 * symtab.h (make_symbol_completion_list_fn): Delete.
6908 * cli/cli-decode.c (add_cmd): Adjust.
6909
bbf2f4df
PA
69102017-07-17 Pedro Alves <palves@redhat.com>
6911
6912 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
6913 * dwarf2read.c: Include "filename-seen-cache.h".
6914 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
6915 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
6916 * filename-seen-cache.c: New file.
6917 * filename-seen-cache.h: New file.
6918 * symtab.c: Include "filename-seen-cache.h".
6919 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
6920 (create_filename_seen_cache, clear_filename_seen_cache)
6921 (delete_filename_seen_cache, filename_seen): Delete, parts moved
6922 to filename-seen-cache.h/filename-seen-cache.c.
6923 (output_source_filename, sources_info)
6924 (maybe_add_partial_symtab_filename)
6925 (make_source_files_completion_list): Adjust to use
6926 filename_seen_cache.
6927
330cdd98
PA
69282017-07-17 Pedro Alves <palves@redhat.com>
6929
6930 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
6931 fields.
6932 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
6933 dwarf2_debug_sections*)): New.
6934 (dwarf2_per_objfile::dwarf2_per_objfile(const
6935 dwarf2_per_objfile&)): Declare as deleted.
6936 (dwarf2_per_objfile::operator=): Declare as deleted.
6937 (dwarf2_per_objfile::dwarf2_per_objfile)
6938 (dwarf2_per_objfile::~dwarf2_per_objfile)
6939 (dwarf2_per_objfile::free_cached_comp_units): New.
6940 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
6941 ctor. Call dwarf2_per_objfile's ctor manually.
6942 (dwarf2_locate_sections): Deleted/refactored as ...
6943 (dwarf2_per_objfile::locate_sections): ... this new method.
6944 (free_cached_comp_units): Defer to
6945 dwarf2_per_objfile::free_cached_comp_units.
6946 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
6947
8880f2a9
TT
69482017-07-14 Tom Tromey <tom@tromey.com>
6949
6950 PR rust/21764:
6951 * rust-exp.y (convert_ast_to_expression): Add "want_type"
6952 parameter.
6953 <UNOP_SIZEOF>: Split into separate case.
6954 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
6955
65547233
TT
69562017-07-14 Tom Tromey <tom@tromey.com>
6957
6958 PR rust/21763:
6959 * symtab.c (symbol_matches_domain): Add language_rust to special
6960 case.
6961 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
6962 treat LOC_TYPEDEF symbols as variables.
6963
8f14146e
PA
69642017-07-14 Pedro Alves <palves@redhat.com>
6965
6966 * symtab.c (make_file_symbol_completion_list_1): Iterate over
6967 symtabs matching all symtabs with SRCFILE as file name instead of
6968 only considering the first hit, with lookup_symtab.
6969
2347965c
SM
69702017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6971
6972 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
6973 operator_name parameters.
6974 (gen_expr): Update function call.
6975
40f4af28
SM
69762017-07-14 Simon Marchi <simon.marchi@ericsson.com>
6977
6978 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
6979 parameter.
6980 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
6981 Likewise.
6982 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
6983 parameter, use agent_expr::gdbarch instead, update function
6984 calls.
6985 (locexpr_tracepoint_var_ref): Likewise.
6986 (loclist_tracepoint_var_ref): Likewise.
6987 * ax-gdb.c (gen_trace_static_fields): Likewise.
6988 (gen_traced_pop): Likewise.
6989 (gen_frame_args_address): Likewise.
6990 (gen_frame_locals_address): Likewise.
6991 (gen_var_ref): Likewise.
6992 (gen_struct_ref_recursive): Likewise.
6993 (gen_static_field): Likewise.
6994 (gen_maybe_namespace_elt): Likewise.
6995 (gen_expr): Likewise.
6996 (gen_trace_for_var): Likewise.
6997 (gen_trace_for_expr): Likewise.
6998 (gen_trace_for_return_address): Likewise.
6999
053f8057
SM
70002017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7001
7002 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7003 parameter.
7004 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7005
6661ad48
SM
70062017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7007
7008 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7009 from ax, update calls.
7010 (gen_usual_arithmetic): Likewise.
7011 (gen_integral_promotions): Likewise.
7012 (gen_bitfield_ref): Likewise.
7013 (gen_primitive_field): Likewise.
7014 (gen_struct_ref_recursive): Likewise.
7015 (gen_struct_ref): Likewise.
7016 (gen_maybe_namespace_elt): Likewise.
7017 (gen_struct_elt_for_reference): Likewise.
7018 (gen_namespace_elt): Likewise.
7019 (gen_aggregate_elt_ref): Likewise.
7020 (gen_expr): Get gdbarch from ax, update calls.
7021 (gen_expr_binop_rest): Likewise.
7022
c55a47e7
PA
70232017-07-13 Pedro Alves <palves@redhat.com>
7024
7025 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7026 as default tdesc.
7027 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7028 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7029 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7030 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7031 tdep.
7032 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7033 Get final tdesc from the tdep.
7034 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7035 default tdesc.
7036 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7037 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7038 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7039 Use it as default tdesc.
7040 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7041 down to amd_init_abi. No longer handle fallback tdesc here.
7042 * amd64-tdep.h (tdesc_x32): Declare.
7043 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7044 parameter.
7045 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7046 as default tdesc.
7047
55efceab
AA
70482017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7049
7050 * s390-linux-tdep.c (s390_process_record): Add support for
7051 instructions new in arch12.
7052
0aa37b65
JB
70532017-07-11 John Baldwin <jhb@FreeBSD.org>
7054
7055 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7056 PT_GETFSBASE and PT_GETGSBASE.
7057 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7058 PT_SETGSBASE.
7059
48aeef91
JB
70602017-07-11 John Baldwin <jhb@FreeBSD.org>
7061
7062 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7063 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7064 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7065 those rules.
7066 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7067 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7068 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7069 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7070 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7071 * features/i386/amd64.xml: Add 64bit-segments.xml.
7072 * features/i386/amd64-avx-avx512.c: Regenerated.
7073 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7074 * features/i386/amd64-avx-mpx.c: Regenerated.
7075 * features/i386/amd64-avx.c: Regenerated.
7076 * features/i386/amd64-mpx.c: Regenerated.
7077 * features/i386/amd64.c: Regenerated.
7078 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7079 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7080 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7081 * regformats/i386/amd64-avx.dat: Regenerated.
7082 * regformats/i386/amd64-mpx.dat: Regenerated.
7083 * regformats/i386/amd64.dat: Regenerated.
7084
77c501bc
YQ
70852017-07-10 Yao Qi <yao.qi@linaro.org>
7086
7087 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7088 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7089
6dc8d757
AK
70902017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7091
7092 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7093 unsetenv.
7094 * gnulib/aclocal.m4: Regenerate.
7095 * gnulib/config.in: Regenerate.
7096 * gnulib/configure: Regenerate.
7097 * gnulib/import/Makefile.am: Regenerate.
7098 * gnulib/import/Makefile.in: Regenerate.
7099 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7100 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7101 * gnulib/import/m4/environ.m4: New file.
7102 * gnulib/import/m4/setenv.m4: New file.
7103 * gnulib/import/setenv.c: New file.
7104 * gnulib/import/unsetenv.c: New file.
7105
266934d1
SM
71062017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7107
7108 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7109 address when op is DW_OP_addr.
7110
03278692
TT
71112017-07-09 Tom Tromey <tom@tromey.com>
7112
7113 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7114 check and apply to outer type.
7115
4b654465
JB
71162017-07-07 John Baldwin <jhb@FreeBSD.org>
7117
7118 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7119 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7120 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7121 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7122
2af9fc44
JB
71232017-07-07 John Baldwin <jhb@FreeBSD.org>
7124
7125 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7126
382b69bb
JB
71272017-07-07 John Baldwin <jhb@FreeBSD.org>
7128
7129 * corelow.c (get_core_siginfo): Remove.
7130 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7131 instead of get_core_siginfo.
7132 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7133 * gdbarch.h: Re-generate.
7134 * gdbarch.c: Re-generate.
7135 * linux-tdep.c (linux_core_xfer_siginfo): New.
7136 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7137
6e5eab33
JB
71382017-07-07 John Baldwin <jhb@FreeBSD.org>
7139
7140 * corelow.c (thread_section_name): Move to ...
7141 * gdbcore.h (thread_section_name): ... here.
7142
929edea9
JB
71432017-07-07 John Baldwin <jhb@FreeBSD.org>
7144
7145 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7146 (struct siginfo32): New.
7147 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7148 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7149 via ptrace(PT_LWPINFO).
7150
762c974a
JB
71512017-07-07 John Baldwin <jhb@FreeBSD.org>
7152
7153 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7154 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7155 (fbsd_get_siginfo_type): New.
7156 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7157 (_initialize_fbsd_tdep): New.
7158
33c5cd75
DB
71592017-07-06 David Blaikie <dblaikie@gmail.com>
7160
7161 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7162 a singular dwo_unit*) to support multiple CUs in the same way that
7163 multiple TUs are supported.
7164 (create_cus_hash_table): Replace create_dwo_cu with a function for
7165 parsing multiple CUs from a DWO file.
7166 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7167 create_dwo_cu.
7168 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7169 htab_find, rather than comparing the signature to a singleton CU in
7170 the dwo_file.
7171
8455d262
PA
71722017-07-06 Pedro Alves <palves@redhat.com>
7173
7174 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7175
4da3eb35
PA
71762017-07-04 Pedro Alves <palves@redhat.com>
7177
7178 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7179 * gdbtypes.h (TYPE_STATIC): Delete.
7180 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7181 is_synchronized, is_native>: Delete.
7182 <dummy>: Bump.
7183 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7184 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7185 (TYPE_FN_FIELD_ABSTRACT): Delete.
7186
5bfd255c
SM
71872017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7188
7189 * buffer.h (buffer_finish): Fix spelling mistakes.
7190
25c54127
EZ
71912017-07-01 Eli Zaretskii <eliz@gnu.org>
7192
7193 * .dir-locals.el: Automatically switch to C-style comments in
7194 versions of Emacs that support the feature.
7195
dc4bde35
SDJ
71962017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7197 Pedro Alves <palves@redhat.com>
7198
7199 PR cli/21688
7200 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7201 (process_next_line): New variable 'inline_cmd'.
7202 Adjust 'if' clauses for "python", "compile" and "guile" to use
7203 'command_name_equals' and check for '!inline_cmd'.
7204
51ed89aa
SDJ
72052017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7206
7207 PR cli/21688
7208 * cli/cli-script.c (command_name_equals_not_inline): New function.
7209 (process_next_line): Adjust 'if' clauses for "python", "compile"
7210 and "guile" to use command_name_equals_not_inline.
7211
eb17d413
PA
72122017-06-29 Pedro Alves <palves@redhat.com>
7213
7214 * completer.c (expression_completer): Call
7215 linespec_location_completer instead of location_completer.
7216
195bcdd5
PA
72172017-06-29 Pedro Alves <palves@redhat.com>
7218
7219 * completer.c (expression_completer): Remove code that recomputes
7220 'text' from 'word'.
7221
adc764e7
YQ
72222017-06-29 Yao Qi <yao.qi@linaro.org>
7223
7224 * regformats/regdat.sh: Generate code with
7225 "ifndef IN_PROCESS_AGENT".
7226
6e75794e
PA
72272017-06-28 Pedro Alves <palves@redhat.com>
7228
7229 * command.h: Include "common/scoped_restore.h".
7230
bc491f2e
YQ
72312017-06-28 Yao Qi <yao.qi@linaro.org>
7232
7233 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7234 instead of obstack_grow.
7235
41664b45
DG
72362017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7237
7238 PR gdb/21337
7239 * symfile.c (reread_symbols): Call objfiles_changed just before
7240 read_symbols.
7241
6da67eb1
PA
72422017-06-27 Pedro Alves <palves@redhat.com>
7243
7244 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7245 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7246 (completion_list_add_symbol, completion_list_add_msymbol):
7247 ... these new functions.
7248 (add_symtab_completions)
7249 (default_make_symbol_completion_list_break_on_1): Adjust.
7250
23732b1e
PA
72512017-06-27 Pedro Alves <palves@redhat.com>
7252
7253 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7254 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7255 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7256 dtor.
7257 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7258 'storage_obstack' field an auto_obstack. In-class initialize all
7259 non-bitfield fields. Make minsyms_read bool.
7260 * symfile.c (read_symbols): Adjust.
7261
a4d1e79a
AH
72622017-06-27 Alan Hayward <alan.hayward@arm.com>
7263
7264 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7265 (gdbsim_store_register): Likewise.
7266
8268c778
PA
72672017-06-27 Pedro Alves <palves@redhat.com>
7268
7269 * c-exp.y (name_obstack): Now an auto_obstack.
7270 (yylex): Use auto_obstack::clear.
7271 (c_parse): Use auto_obstack::clear instead of reinitializing and
7272 freeing the obstack.
7273 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7274 * d-exp.y (name_obstack): Now an auto_obstack.
7275 (yylex): Use auto_obstack::clear.
7276 (d_parse): Use auto_obstack::clear instead of reinitializing and
7277 freeing the obstack.
7278 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7279 auto_obstack.
7280 * dwarf2read.c (create_addrmap_from_index)
7281 (dwarf2_build_psymtabs_hard)
7282 (update_enumeration_type_from_children): Likewise.
7283 * gdb_obstack.h (auto_obstack): New type.
7284 * go-exp.y (name_obstack): Now an auto_obstack.
7285 (build_packaged_name): Use auto_obstack::clear.
7286 (go_parse): Use auto_obstack::clear instead of reinitializing and
7287 freeing the obstack.
7288 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7289 auto_obstack.
7290 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7291 * rust-exp.y (work_obstack): Now an auto_obstack.
7292 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7293 reinitializing and freeing the obstack.
7294 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7295 (host_char_to_target): Use auto_obstack.
7296 * utils.h (make_cleanup_obstack_free): Delete declaration.
7297 * valprint.c (generic_emit_char, generic_printstr): Use
7298 auto_obstack.
7299
db665f42
SM
73002017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7301
7302 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7303 thread.
7304 (darwin_init_thread_list): Don't update dummy thread.
7305 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7306
873c0814
SM
73072017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7308
7309 * record-full.c (netorder16): Remove.
7310
8b5a7a6e
SM
73112017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7312
7313 * common/diagnostics.h: Define macros for GCC.
7314 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7315 * common/vec.h: Include diagnostics.h.
7316 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7317 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7318 warning.
7319
d1435379
SM
73202017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7321
7322 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7323 New macro.
7324 * ada-lex.l: Ignore deprecated register warnings.
7325
cc75e0fd
SM
73262017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7327
7328 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7329 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7330
07809eaf
SM
73312017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7332
7333 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7334 its own line.
7335
f076f034
SM
73362017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7337
7338 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7339
0dd5cbc5
AH
73402017-06-23 Alan Hayward <alan.hayward@arm.com>
7341
7342 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7343 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7344 (xtensa_register_read_masked): Likewise.
7345
d4c6ce5b
SDJ
73462017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7347
7348 * common/environ.c (gdb_environ::unset): Update comment.
7349
16892a03
AH
73502017-06-22 Alan Hayward <alan.hayward@arm.com>
7351
7352 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7353 registers.
7354
d7dcbefc
AH
73552017-06-22 Alan Hayward <alan.hayward@arm.com>
7356
7357 * record-full.c (record_full_exec_insn): Use byte_vector.
7358
b30ff123
YQ
73592017-06-22 Yao Qi <yao.qi@linaro.org>
7360
7361 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7362 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7363
4fa847d7
AH
73642017-06-22 Alan Hayward <alan.hayward@arm.com>
7365
7366 * remote.c (cached_reg): Move from here...
7367 * regcache.h (cached_reg): ...to here.
7368 * python/py-unwind.c (struct reg_info): Remove.
7369 (cached_frame_info): Use cached_reg_t.
7370 (pyuw_prev_register): Likewise.
7371 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7372 (pyuw_dealloc_cache): Free all registers.
7373
f4906a9a
PA
73742017-06-22 Pedro Alves <palves@redhat.com>
7375 Simon Marchi <simon.marchi@ericsson.com>
7376
7377 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7378 warning.
7379 * common/diagnostics.h: New file.
7380
b45a1208
PA
73812017-06-22 Pedro Alves <palves@redhat.com>
7382
7383 * common/agent.h: Add include guards.
7384
e4da2c61
SM
73852017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7386
7387 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7388 talk about addressable units instead of bytes.
7389
96160d60
SDJ
73902017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7391
7392 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7393 of '::const_iterator'.
7394
9a6c7d9c
SDJ
73952017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7396
7397 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7398 'unittests/environ-selftests.c'.
7399 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7400 * charset.c (find_charset_names): Declare object 'iconv_env'.
7401 Update code to use 'iconv_env' object. Remove call to
7402 'free_environ'.
7403 * common/environ.c: Include <utility>.
7404 (make_environ): Delete function.
7405 (free_environ): Delete function.
7406 (gdb_environ::clear): New function.
7407 (gdb_environ::operator=): New function.
7408 (gdb_environ::get): Likewise.
7409 (environ_vector): Delete function.
7410 (set_in_environ): Delete function.
7411 (gdb_environ::set): New function.
7412 (unset_in_environ): Delete function.
7413 (gdb_environ::unset): New function.
7414 (gdb_environ::envp): Likewise.
7415 * common/environ.h: Include <vector>.
7416 (struct gdb_environ): Delete; transform into...
7417 (class gdb_environ): ... this class.
7418 (free_environ): Delete prototype.
7419 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7420 environ_vector): Likewise.
7421 * infcmd.c (run_command_1): Update code to call
7422 'envp' from 'gdb_environ' class.
7423 (environment_info): Update code to call methods from 'gdb_environ'
7424 class.
7425 (unset_environment_command): Likewise.
7426 (path_info): Likewise.
7427 (path_command): Likewise.
7428 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7429 (inferior::inferior): Initialize 'environment' using the host's
7430 information.
7431 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7432 Include "environ.h".
7433 (class inferior) <environment>: Change type from 'struct
7434 gdb_environ' to 'gdb_environ'.
7435 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7436 methods from 'gdb_environ' class.
7437 * solib.c (solib_find_1): Likewise
7438 * unittests/environ-selftests.c: New file.
7439
75c554cf
YQ
74402017-06-20 Yao Qi <yao.qi@linaro.org>
7441
7442 * features/i386/i386-linux.xml: Exchange the order of including
7443 32bit-linux.xml and 32bit-sse.xml.
7444 * features/i386/i386-linux.c: Regenerated.
7445
72ddacb7
YQ
74462017-06-20 Yao Qi <yao.qi@linaro.org>
7447
7448 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7449 Delete copy ctor and assignment operator.
7450 (tdesc_type): Likewise.
7451 (tdesc_feature): Likewise.
7452 (tdesc_free_reg): Remove.
7453 (tdesc_create_reg): Use new.
7454 (tdesc_free_type): Remove.
7455 (tdesc_create_vector): Use new.
7456 (tdesc_create_union): Likewise.
7457 (tdesc_create_flags): Likewise.
7458 (tdesc_create_enum): Likewise.
7459 (tdesc_free_feature): Delete.
7460 (free_target_description): Use delete.
7461
325c9fd4
JB
74622017-06-19 John Baldwin <jhb@FreeBSD.org>
7463
7464 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7465 registers.
7466
16b7a719
PA
74672017-06-19 Pedro Alves <palves@redhat.com>
7468
7469 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7470 after gdb::unlinker.
7471
1c8e01c9
SDJ
74722017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7473
7474 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7475 gdb_environ to access an environment variable.
7476
ffce45d2
TP
74772017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7478
7479 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7480 gdb_byte*.
7481
1d4fbac9
SM
74822017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7483
7484 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7485
8465943a
SM
74862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7487
7488 * configure: Re-generate.
7489 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7490
3e019bdc
SM
74912017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7492
7493 * configure: Re-generate.
7494 * warning.m4: Pass -Werror to compiler when checking for
7495 supported warning flags.
7496
cf0dd6f0
SM
74972017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7498
7499 * Makefile.in (COMPILE.pre): Add "-x c++".
7500
6f98355c
YQ
75012017-06-16 Alan Hayward <alan.hayward@arm.com>
7502 Pedro Alves <palves@redhat.com>
7503 Yao Qi <yao.qi@linaro.org>
7504
7505 * defs.h (RequireLongest): New.
7506 (extract_integer): Declare function template.
7507 (extract_signed_integer): Remove the declaration, but define it
7508 static inline.
7509 (extract_unsigned_integer): Likewise.
7510 (store_integer): Declare function template.
7511 (store_signed_integer): Remove the declaration, but define it
7512 static inline.
7513 (store_unsigned_integer): Likewise.
7514 * findvar.c (extract_integer): New function template.
7515 (extract_signed_integer): Remove.
7516 (extract_unsigned_integer): Remove.
7517 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7518 instantiations.
7519 (store_integer): New function template.
7520 (store_signed_integer): Remove.
7521 (store_unsigned_integer): Remove.
7522 (store_integer): Explicit instantiations.
7523 * regcache.c (regcache_raw_read_signed): Update.
7524 (regcache::raw_read): New function.
7525 (regcache::raw_read_signed): Remove.
7526 (regcache::raw_read_unsigned): Remove.
7527 (regcache_raw_read_unsigned): Update.
7528 (regcache_raw_write_unsigned): Update.
7529 (regcache::raw_write_signed): Remove.
7530 (regcache::raw_write): New function.
7531 (regcache_cooked_read_signed): Update.
7532 (regcache::raw_write_unsigned): Remove.
7533 (regcache::cooked_read_signed): Remove.
7534 (regcache_cooked_read_unsigned): Update.
7535 (regcache::cooked_read_unsigned): Remove.
7536 (regcache_cooked_write_signed): Update.
7537 (regcache_cooked_write_unsigned): Update.
7538 * regcache.h (regcache) <raw_read_signed>: Remove.
7539 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7540 <raw_read, raw_write>: New.
7541 <cooked_read_signed, cooked_write_signed>: Remove.
7542 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7543 <cooked_read, cooked_write>: New.
7544 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7545 (sh64_pseudo_register_write): Update.
7546
a87dc45a
AK
75472017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7548
7549 * arc-tdep.c (arc_disassembler_options): New variable.
7550 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7551 of default_print_insn.
7552 (arc_delayed_print_insn): Set info->section when needed,
7553 use default_print_insn to retrieve a disassembler.
7554
45159d6a
SDJ
75552017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7556
7557 PR gdb/21574
7558 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7559 to mention $SHELL and startup-with-shell.
7560
b46c4cf0
MF
75612017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7562
7563 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7564
6394c606
YQ
75652017-06-14 Yao Qi <yao.qi@linaro.org>
7566
7567 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7568 default_print_insn instead of print_insn_aarch64.
7569 * arm-tdep.c (gdb_print_insn_arm): Call
7570 default_print_insn instead of print_insn_big_arm
7571 and print_insn_little_arm.
7572 * i386-tdep.c (i386_print_insn): Call default_print_insn
7573 instead of print_insn_i386.
7574 * ia64-tdep.c (ia64_print_insn): Call
7575 default_print_insn instead of print_insn_ia64.
7576 * mips-tdep.c (gdb_print_insn_mips): Call
7577 default_print_insn instead of print_insn_big_mips
7578 and print_insn_little_mips.
7579 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7580 instead of print_insn_spu.
7581
d5722aa2
PA
75822017-06-14 Pedro Alves <palves@redhat.com>
7583
7584 * ada-lang.c: Include "common/byte-vector.h".
7585 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7586 * charset.c (wchar_iterator::iterate): Resize the vector instead
7587 of reserving it.
7588 * common/byte-vector.h: Include "common/def-vector.h".
7589 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7590 * cli/cli-dump.c: Include "common/byte-vector.h".
7591 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7592 * common/byte-vector.h: New file.
7593 * common/def-vector.h: New file.
7594 * common/default-init-alloc.h: New file.
7595 * dwarf2loc.c: Include "common/byte-vector.h".
7596 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7597 instead of reserving it.
7598 * dwarf2read.c: Include "common/byte-vector.h".
7599 (data_buf::m_vec): Now a gdb::byte_vector.
7600 * gdb_regex.c: Include "common/def-vector.h".
7601 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7602 * mi/mi-main.c: Include "common/byte-vector.h".
7603 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7604 * printcmd.c: Include "common/byte-vector.h".
7605 (print_scalar_formatted): Use gdb::byte_vector.
7606 * valprint.c: Include "common/byte-vector.h".
7607 (maybe_negate_by_bytes, print_decimal_chars): Use
7608 gdb::byte_vector.
7609
01ec7a27
SM
76102017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7611
7612 * darwin-nat.c: Include "nat/fork-inferior.h".
7613
848d9074
SM
76142017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7615
7616 * configure.nat: Factor out Darwin bits that are not
7617 architecture-specific. Add fork-inferior.o.
7618
3b912944
SM
76192017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7620
7621 * configure.nat: Factor out AIX bits that are not
7622 architecture-specific. Add fork-inferior.o.
7623
55acdf22
AA
76242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7625
7626 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7627 (read_pieced_value, write_pieced_value): ...here. Reduce to
7628 wrappers that just call rw_pieced_value.
7629
f65e2044
AA
76302017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7631
7632 * dwarf2loc.c (write_pieced_value): When writing the data for a
7633 memory piece, use write_memory_with_notification instead of
7634 write_memory.
7635
23f945bf
AA
76362017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7637
7638 * valops.c (read_value_memory): Change embedded_offset to
7639 represent a bit offset instead of a byte offset.
7640 * value.h (read_value_memory): Adjust comment.
7641
f236533e
AA
76422017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7643
7644 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7645 dest_offset_bits and source_offset_bits.
7646 (write_pieced_value): Likewise.
7647
65d84b76
AA
76482017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7649
7650 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7651 given by DW_OP_bit_piece.
7652 (write_pieced_value): Likewise.
7653
242d31ab
AA
76542017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7655
7656 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7657 some other preparations to the places where sufficient information
7658 is available.
7659 (write_pieced_value): Likewise.
7660
03c8af18
AA
76612017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7662
7663 * dwarf2loc.c (bits_to_bytes): New function.
7664 (read_pieced_value): Fix offset calculations for register pieces
7665 on big-endian targets.
7666 (write_pieced_value): Likewise.
7667
840989c1
AA
76682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7669
7670 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7671 (write_pieced_value): Likewise.
7672
359b19bb
AA
76732017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7674
7675 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7676 transfer the source value's least significant bits, instead of its
7677 lowest-addressed ones. Rename type_len to max_offset.
7678 (read_pieced_value): Mirror above changes to write_pieced_value as
7679 applicable.
7680
07c9ca3b
AA
76812017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7682
7683 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7684 truncate full bytes from dest_offset_bits before using it as an
7685 offset into the buffer.
7686
f1cc9874
AA
76872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7688
7689 * dwarf2loc.c (write_pieced_value): Include transfer size in
7690 byte-wise check.
7691
cdaac320
AA
76922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7693
7694 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7695 calculation of this_size.
7696
af547a96
AA
76972017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7698
7699 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7700 when targeting a bit-field.
7701 (write_pieced_value): Likewise.
7702
ddd7882a
AA
77032017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7704
7705 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7706 (allocate_piece_closure): Drop addr_size parameter.
7707 (dwarf2_evaluate_loc_desc_full): Adjust call to
7708 allocate_piece_closure.
7709
e9352324
AA
77102017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7711
7712 PR gdb/21226
7713 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7714 the LSB end, independent of endianness.
7715
d5d1163e
AA
77162017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7717
7718 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7719 size capping.
7720
032bb6ea
YQ
77212017-06-13 Yao Qi <yao.qi@linaro.org>
7722
7723 * mips-linux-nat.c: Move include features/mips*-linux.c to
7724 mips-linux-tdep.c.
7725 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7726 to mips-linux-tdep.c.
7727 * mips-linux-tdep.c: Include features/mips*-linux.c
7728 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7729 functions.
7730 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7731 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7732 (tdesc_mips64_dsp_linux): Declare.
7733
f12f6bad
TT
77342017-06-12 Tom Tromey <tom@tromey.com>
7735
7736 * valprint.h (val_print_type_code_int): Remove.
7737 * valprint.c (generic_val_print_int): Always call
7738 val_print_scalar_formatted.
7739 (val_print_type_code_int): Remove.
7740 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7741 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7742 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7743 * ada-valprint.c (ada_val_print_num): Use
7744 val_print_scalar_formatted.
7745
d9109c80
TT
77462017-06-12 Tom Tromey <tom@tromey.com>
7747
7748 * printcmd.c (print_scalar_formatted): Unify the two switches.
7749 Don't convert scalars to LONGEST.
7750
4ac0cb1c
TT
77512017-06-12 Tom Tromey <tom@tromey.com>
7752
7753 PR exp/16225:
7754 * valprint.h (print_decimal_chars): Update.
7755 * valprint.c (maybe_negate_by_bytes): New function.
7756 (print_decimal_chars): Add "is_signed" argument.
7757 * printcmd.c (print_scalar_formatted): Update.
7758
30a25466
TT
77592017-06-12 Tom Tromey <tom@tromey.com>
7760
7761 PR exp/16225:
7762 * valprint.h (print_binary_chars, print_hex_chars): Update.
7763 * valprint.c (val_print_type_code_int): Update.
7764 (print_binary_chars): Add "zero_pad" argument.
7765 (emit_octal_digit): New function.
7766 (print_octal_chars): Don't zero-pad.
7767 (print_decimal_chars): Likewise.
7768 (print_hex_chars): Add "zero_pad" argument.
7769 * sh64-tdep.c (sh64_do_fp_register): Update.
7770 * regcache.c (regcache::dump): Update.
7771 * printcmd.c (print_scalar_formatted): Update.
7772 * infcmd.c (default_print_one_register_info): Update.
7773
b3464d03
PA
77742017-06-12 Pedro Alves <palves@redhat.com>
7775 Alan Hayward <alan.hayward@arm.com>
7776
7777 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7778 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7779 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7780 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7781 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7782
4b76cda9
PA
77832017-06-12 Pedro Alves <palves@redhat.com>
7784
7785 * dwarf2read.c (mapped_symtab::data): Now a vector of
7786 symtab_index_entry instead of vector of
7787 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7788 whether an element's name is NULL instead of checking whether the
7789 element itself is NULL.
7790 (find_slot): Change return type. Adjust.
7791 (hash_expand, , add_index_entry, uniquify_cu_indices)
7792 (write_hash_table): Adjust.
7793
e8f8bcb3
PA
77942017-06-12 Pedro Alves <palves@redhat.com>
7795
7796 * dwarf2read.c (recursively_count_psymbols): New function.
7797 (write_psymtabs_to_index): Call it to compute number of psyms and
7798 pass estimate size of psyms_seen to unordered_set's ctor.
7799
70a1152b
PA
78002017-06-12 Pedro Alves <palves@redhat.com>
7801
7802 * dwarf2read.c (write_hash_table): Check if key already exists
7803 before emplacing.
7804
c2f134ac
PA
78052017-06-12 Pedro Alves <palves@redhat.com>
7806
7807 * dwarf2read.c (data_buf::append_space): Rename to...
7808 (data_buf::grow): ... this, and make private. Adjust all callers.
7809 (data_buf::append_uint): New method.
7810 (add_address_entry, write_one_signatured_type)
7811 (write_psymtabs_to_index): Use it.
7812
a81e6d4d
PA
78132017-06-12 Pedro Alves <palves@redhat.com>
7814
7815 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7816 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7817 (data_buf::file_write): Call ::fwrite directly.
7818
6fd931f2
PA
78192017-06-12 Pedro Alves <palves@redhat.com>
7820
7821 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7822 std::vector::erase.
7823
bc8f2430
JK
78242017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7825
7826 Code cleanup: C++ify .gdb_index producer.
7827 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7828 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7829 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7830 (create_strtab, add_string): Remove.
7831 (file_write, data_buf): New.
7832 (struct symtab_index_entry): Use std::vector for cu_indices.
7833 (struct mapped_symtab): Use std::vector for data.
7834 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7835 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7836 Remove.
7837 (find_slot): Change return type. Update it to the new data structures.
7838 (hash_expand, add_index_entry): Update it to the new data structures.
7839 (offset_type_compare): Remove.
7840 (uniquify_cu_indices): Update it to the new data structures.
7841 (c_str_view, c_str_view_hasher, vector_hasher): New.
7842 (add_indices_to_cpool): Remove.
7843 (write_hash_table): Update it to the new data structures.
7844 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7845 (eq_psymtab_cu_index): Remove.
7846 (psym_index_map): New typedef.
7847 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7848 reference and std::unordered_map for cu_index_htab.
7849 (add_address_entry, add_address_entry_worker, write_address_map)
7850 (write_psymbols): Update it to the new data structures.
7851 (write_obstack): Remove.
7852 (struct signatured_type_index_data): Change types_list to a data_buf
7853 reference and psyms_seen to a std::unordered_set reference.
7854 (write_one_signatured_type, recursively_write_psymbols)
7855 (write_psymtabs_to_index): Update it to the new data structures.
7856
c4dcb155
SM
78572017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7858
7859 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7860 separate-debug-file commands.
7861 * symfile.h (separate_debug_file_debug): New global.
7862 * symfile.c (separate_debug_file_debug): New global.
7863 (separate_debug_file_exists, find_separate_debug_file): Add
7864 debug output.
7865 (_initialize_symfile): Add "set debug separate-debug-file"
7866 command.
7867 * build-id.c (build_id_to_debug_bfd,
7868 find_separate_debug_file_by_buildid): Add debug output.
7869
6d45d4b4
SM
78702017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7871
7872 * gdbarch.sh (displaced_step_free_closure): Remove.
7873 * gdbarch.h, gdbarch.c: Re-generate.
7874 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7875 displaced_step_free_closure.
7876 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7877 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7878 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7879 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7880 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7881 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7882 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7883 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7884 * infrun.c (displaced_step_clear): Call xfree instead of
7885 gdbarch_displaced_step_free_closure.
7886
2f91880f
SDJ
78872017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7888
7889 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7890 NULL".
7891
b8b6e72f
AH
78922017-06-08 Alan Hayward <alan.hayward@arm.com>
7893
7894 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7895 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7896 (mn10300_push_dummy_call): Likewise.
7897
5369082e
AH
78982017-06-08 Alan Hayward <alan.hayward@arm.com>
7899
7900 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7901
ff4ca5ac
AH
79022017-06-08 Alan Hayward <alan.hayward@arm.com>
7903
7904 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
7905
aefd8b33
SDJ
79062017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7907
7908 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
7909 able to start inferiors using a shell.
7910 (New remote packets): Announce new packet "QStartupWithShell".
7911 * remote.c: Add PACKET_QStartupWithShell.
7912 (extended_remote_create_inferior): Handle new
7913 PACKET_QStartupWithShell.
7914 (remote_protocol_features) <QStartupWithShell>: New entry for
7915 PACKET_QStartupWithShell.
7916 (_initialize_remote): Call "add_packet_config_cmd" for
7917 QStartupShell.
7918
2090129c
SDJ
79192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7920 Pedro Alves <palves@redhat.com>
7921
7922 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
7923 and "nat/fork-inferior.h".
7924 * common/common-inferior.h: New file, with contents from
7925 "gdb/inferior.h".
7926 * commom/common-utils.c: Include "common-utils.h".
7927 (stringify_argv): New function.
7928 * common/common-utils.h (stringify_argv): New prototype.
7929 * configure.nat: Add "fork-inferior.o" as a dependency for
7930 "*linux*", "fbsd*" and "nbsd*" hosts.
7931 * corefile.c (get_exec_file): Update comment.
7932 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
7933 instead of "startup_inferior".
7934 (darwin_create_inferior): Call "add_thread_silent" after
7935 "fork_inferior".
7936 * fork-child.c: Cleanup unnecessary includes.
7937 (SHELL_FILE): Move to "common/common-fork-child.c".
7938 (environ): Likewise.
7939 (exec_wrapper): Initialize.
7940 (get_exec_wrapper): New function.
7941 (breakup_args): Move to "common/common-fork-child.c"; rename to
7942 "breakup_args_for_exec".
7943 (escape_bang_in_quoted_argument): Move to
7944 "common/common-fork-child.c".
7945 (saved_ui): New variable.
7946 (prefork_hook): New function.
7947 (postfork_hook): Likewise.
7948 (postfork_child_hook): Likewise.
7949 (gdb_startup_inferior): Likewise.
7950 (fork_inferior): Move to "common/common-fork-child.c". Update
7951 function to support gdbserver.
7952 (startup_inferior): Likewise.
7953 * gdbcore.h (get_exec_file): Remove declaration.
7954 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
7955 instead of "startup_inferior". Call "add_thread_silent" after
7956 "fork_inferior".
7957 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
7958 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
7959 instead of "startup_inferior". Call "add_thread_silent" after
7960 "fork_inferior".
7961 * inferior.h: Include "common-inferior.h".
7962 (trace_start_error): Move to "common/common-utils.h".
7963 (trace_start_error_with_name): Likewise.
7964 (fork_inferior): Move prototype to "nat/fork-inferior.h".
7965 (startup_inferior): Likewise.
7966 (gdb_startup_inferior): New prototype.
7967 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
7968 * nat/fork-inferior.h: New file.
7969 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
7970 instead of "startup_inferior". Call "add_thread_silent" after
7971 "fork_inferior".
7972 * target.h (target_terminal_init): Move prototype to
7973 "target/target.h".
7974 (target_terminal_inferior): Likewise.
7975 (target_terminal_ours): Likewise.
7976 * target/target.h (target_terminal_init): New prototype, moved
7977 from "target.h".
7978 (target_terminal_inferior): Likewise.
7979 (target_terminal_ours): Likewise.
7980 * utils.c (gdb_flush_out_err): New function.
7981
043a4934
SDJ
79822017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7983
7984 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
7985 * common/common-gdbthread.h: New file, with parts from
7986 "gdb/gdbthread.h".
7987 * gdbthread.h: Include "common-gdbthread.h".
7988 (switch_to_thread): Moved to "common/common-gdbthread.h".
7989
15652511
SDJ
79902017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7991
7992 * Makefile.in (SFILES): Add "common/job-control.c".
7993 (HFILES_NO_SRCDIR): Add "common/job-control.h".
7994 (COMMON_OBS): Add "job-control.o".
7995 * common/job-control.c: New file, with contents from
7996 "gdb/inflow.c".
7997 * common/job-control.h: New file, with contents from "terminal.h".
7998 * fork-child.c: Include "job-control.h".
7999 * inflow.c: Include "job-control.h".
8000 (gdb_setpgid): Move to "common/common-inflow.c".
8001 (_initialize_inflow): Move setting of "job_control" to
8002 "handle_job_control".
8003 * terminal.h (job_control): Moved to "common/common-terminal.h".
8004 (gdb_setpgid): Likewise.
8005 * top.c: Include "job_control.h".
8006 * utils.c: Likewise.
8007 (job_control): Moved to "job-control.c".
8008
2d7cc5c7
PA
80092017-06-07 Pedro Alves <palves@redhat.com>
8010
8011 * Makefile.in (SFILES): Add gdb_regex.c.
8012 (COMMON_OBS): Add gdb_regex.o.
8013 * ada-lang.c (ada_add_standard_exceptions)
8014 (ada_add_exceptions_from_frame, name_matches_regex)
8015 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8016 parameter type to compiled_regex. Adjust.
8017 (ada_exceptions_list): Use compiled_regex.
8018 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8019 std::unique_ptr<compiled_regex>.
8020 (exception_catchpoint::~exception_catchpoint): Remove regfree
8021 call.
8022 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8023 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8024 * breakpoint.c (solib_catchpoint::compiled): Now a
8025 std::unique_ptr<compiled_regex>.
8026 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8027 (check_status_catch_solib): Adjust to use compiled_regex.
8028 (add_solib_catchpoint): Adjust to use compiled_regex.
8029 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8030 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8031 compiled_regex reference. Adjust to use it.
8032 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8033 declaration. Include "gdb_regex.h".
8034 (apropos_cmd): Change regex parameter to compiled_regex reference.
8035 * gdb_regex.c: New file.
8036 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8037 declarations.
8038 (class compiled_regex): New.
8039 * linux-tdep.c: Include "common/gdb_optional.h".
8040 (struct mapping_regexes): New, factored out from
8041 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8042 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8043 gdb::optional and remove cleanups. Adjust to compiled_regex.
8044 * probe.c: Include "common/gdb_optional.h".
8045 (collect_probes): Use compiled_regex and gdb::optional and remove
8046 cleanups.
8047 * skip.c: Include "common/gdb_optional.h".
8048 (skiplist_entry::compiled_function_regexp): Now a
8049 gdb::optional<compiled_regex>.
8050 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8051 (free_skiplist_entry): Remove regfree call.
8052 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8053 compiled_regex and gdb::optional.
8054 * symtab.c: Include "common/gdb_optional.h".
8055 (search_symbols): Use compiled_regex and gdb::optional.
8056 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8057 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8058 to gdb_regex.c.
8059
50d6adef
AH
80602017-06-07 Alan Hayward <alan.hayward@arm.com>
8061
8062 * regcache.c (regcache::save): Avoid buffer use.
8063 (regcache::dump): Likewise.
8064
4a8a33c8
AH
80652017-06-07 Alan Hayward <alan.hayward@arm.com>
8066
8067 * sh-tdep.c (sh_pseudo_register_read): Remove
8068 MAX_REGISTER_SIZE.
8069 (sh_pseudo_register_write): Likewise.
8070 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8071 (sh64_pseudo_register_write): Likewise
8072
d1be909e
AH
80732017-06-07 Alan Hayward <alan.hayward@arm.com>
8074
8075 * aarch64-tdep.c (aarch64_store_return_value): Use
8076 V_REGISTER_SIZE.
8077 (aarch64_pseudo_read_value): Likewise.
8078 (aarch64_pseudo_write): Likewise.
8079
f4a65042
YQ
80802017-06-06 Yao Qi <yao.qi@linaro.org>
8081
8082 * regformats/regdef.h (set_register_cache): Remove the
8083 declaration.
8084
9f7fb0aa
AH
80852017-06-06 Alan Hayward <alan.hayward@arm.com>
8086
8087 * frame.c (frame_unwind_register_signed): Use
8088 frame_unwind_register_value.
8089
e1e01040
PA
80902017-06-06 Pedro Alves <palves@redhat.com>
8091
8092 PR breakpoints/21553
8093 * breakpoint.c (create_breakpoints_sal_default)
8094 (init_breakpoint_sal, create_breakpoint_sal): Use
8095 gdb::unique_xmalloc_ptr for string parameters.
8096 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8097 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8098 (base_breakpoint_create_breakpoints_sal)
8099 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8100 (strace_marker_create_breakpoints_sal)
8101 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8102 string parameters.
8103 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8104 gdb::unique_xmalloc_ptr for string parameters.
8105 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8106 parameters.
8107
fbe654c8
AH
81082017-06-06 Alan Hayward <alan.hayward@arm.com>
8109
8110 * alpha-tdep.c (alpha_register_to_value): Use
8111 get_frame_register_value.
8112 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8113
ae0d01d6
AH
81142017-06-06 Alan Hayward <alan.hayward@arm.com>
8115
8116 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8117 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8118 (ia64_value_to_register): Likewise.
8119 (ia64_extract_return_value): Likewise.
8120 (ia64_store_return_value): Likewise.
8121 (ia64_push_dummy_call): Likewise.
8122
49cf576c
JB
81232017-06-04 Joel Brobecker <brobecker@adacore.com>
8124
8125 GDB 8.0 released.
8126
26b6a6ab
SM
81272017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8128
8129 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8130
22827c51
SM
81312017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8132
8133 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8134 parameter.
8135 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8136
0e05cf3a
SM
81372017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8138
8139 * event-loop.c (poll_timers): Unallocate timer using delete
8140 instead of xfree.
8141
c1fc2657
SM
81422017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8143
8144 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8145 (struct breakpoint) <~breakpoint>: New.
8146 (struct watchpoint): Inherit from breakpoint.
8147 <~watchpoint>: New.
8148 <base>: Remove.
8149 (struct tracepoint): Inherit from breakpoint.
8150 <base>: Remove.
8151 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8152 (struct longjmp_breakpoint): Inherit from breakpoint.
8153 <~longjmp_breakpoint>: New.
8154 <base>: Remove.
8155 (new_breakpoint_from_type): Remove casts.
8156 (watchpoint_in_thread_scope): Remove reference to base field.
8157 (watchpoint_del_at_next_stop): Likewise.
8158 (update_watchpoint): Likewise.
8159 (watchpoint_check): Likewise.
8160 (bpstat_check_watchpoint): Likewise.
8161 (set_longjmp_breakpoint): Likewise.
8162 (struct fork_catchpoint): Inherit from breakpoint.
8163 <base>: Remove.
8164 (struct solib_catchpoint): Inherit from breakpoint.
8165 <~solib_catchpoint>: New.
8166 <base>: Remove.
8167 (dtor_catch_solib): Change to ...
8168 (solib_catchpoint::~solib_catchpoint): ... this.
8169 (breakpoint_hit_catch_solib): Remove reference to base field.
8170 (add_solib_catchpoint): Likewise.
8171 (create_fork_vfork_event_catchpoint): Likewise.
8172 (struct exec_catchpoint): Inherit from breakpoint.
8173 <~exec_catchpoint>: New.
8174 <base>: Remove.
8175 (dtor_catch_exec): Change to ...
8176 (exec_catchpoint::~exec_catchpoint): ... this.
8177 (dtor_watchpoint): Change to ...
8178 (watchpoint::~watchpoint): ... this.
8179 (watch_command_1): Remove reference to base field.
8180 (catch_exec_command_1): Likewise.
8181 (base_breakpoint_dtor): Change to ...
8182 (breakpoint::~breakpoint): ... this.
8183 (base_breakpoint_ops): Remove dtor field value.
8184 (longjmp_bkpt_dtor): Change to ...
8185 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8186 (strace_marker_create_breakpoints_sal): Remove reference to base
8187 field.
8188 (delete_breakpoint): Don't manually call breakpoint destructor.
8189 (create_tracepoint_from_upload): Remove reference to base field.
8190 (trace_pass_set_count): Likewise.
8191 (initialize_breakpoint_ops): Don't initialize
8192 momentary_breakpoint_ops, don't set dtors.
8193 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8194 <~ada_catchpoint>: New.
8195 <base>: Remove.
8196 (create_excep_cond_exprs): Remove reference to base field.
8197 (dtor_exception): Change to ...
8198 (ada_catchpoint::~ada_catchpoint): ... this.
8199 (dtor_catch_exception): Remove.
8200 (dtor_catch_exception_unhandled): Remove.
8201 (dtor_catch_assert): Remove.
8202 (create_ada_exception_catchpoint): Remove reference to base
8203 field.
8204 (initialize_ada_catchpoint_ops): Don't set dtors.
8205 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8206 breakpoint.
8207 <~signal_catchpoint>: New.
8208 <base>: Remove.
8209 (signal_catchpoint_dtor): Change to ...
8210 (signal_catchpoint::~signal_catchpoint): ... this.
8211 (create_signal_catchpoint): Remove reference to base field.
8212 (initialize_signal_catchpoint_ops): Don't set dtor.
8213 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8214 from breakpoint.
8215 <~syscall_catchpoint>: New.
8216 <base>: Remove.
8217 (dtor_catch_syscall): Change to ...
8218 (syscall_catchpoint::~syscall_catchpoint): ... this.
8219 (create_syscall_event_catchpoint): Remove reference to base
8220 field.
8221 (initialize_syscall_catchpoint_ops): Don't set dtor.
8222 * break-catch-throw.c (struct exception_catchpoint): Inherit
8223 from breakpoint.
8224 <~exception_catchpoint>: New.
8225 <base>: Remove.
8226 (dtor_exception_catchpoint): Change to ...
8227 (exception_catchpoint::~exception_catchpoint): ... this.
8228 (handle_gnu_v3_exceptions): Remove reference to base field.
8229 (initialize_throw_catchpoint_ops): Don't set dtor.
8230 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8231 field.
8232 * remote.c (remote_get_tracepoint_status): Likewise.
8233 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8234 * tracefile.c (tracefile_fetch_registers): Likewise.
8235 * tracepoint.c (actions_command): Likewise.
8236 (validate_actionline): Likewise.
8237 (tfind_1): Likewise.
8238 (get_traceframe_location): Likewise.
8239 (find_matching_tracepoint_location): Likewise.
8240 (parse_tracepoint_status): Likewise.
8241 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8242
3b0871f4
SM
82432017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8244
8245 * breakpoint.c (struct longjmp_breakpoint): New struct.
8246 (is_tracepoint_type): Change return type to bool.
8247 (is_longjmp_type): New function.
8248 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8249 (set_raw_breakpoint_without_location): Use
8250 new_breakpoint_from_type.
8251 (set_raw_breakpoint): Likewise.
8252
a5e364af
SM
82532017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8254
8255 * breakpoint.c (new_breakpoint_from_type): New function.
8256 (create_breakpoint_sal): Use new_breakpoint_from_type and
8257 unique_ptr.
8258 (create_breakpoint): Likewise.
8259
ae3b3f34
SM
82602017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8261
8262 * memattr.c (mem_info_command): Rename to ...
8263 (info_mem_command): ... this.
8264 (mem_enable_command): Rename to ...
8265 (enable_mem_command): ... this.
8266 (mem_disable_command): Rename to ...
8267 (disable_mem_command): ... this.
8268 (mem_delete_command): Rename to ...
8269 (delete_mem_command): ... this.
8270 (_initialize_mem): Adjust function names.
8271
13ace077
MM
82722017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8273
8274 * btrace.c (handle_pt_insn_events): New.
8275 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8276 STATUS. Split into this and ...
8277 (handle_pt_insn_event_flags): ... this.
8278
c56ccc05
MM
82792017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8280
8281 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8282 and struct pt_insn.resynced.
8283 * configure: Regenerated.
8284 * config.in: Regenerated.
8285
08c3f6d2
TW
82862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8287
8288 * btrace.c (ftrace_find_call_by_number): New function.
8289 (ftrace_new_function): Store objects, not pointers.
8290 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8291 ftrace_new_gap, ftrace_update_function,
8292 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8293 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8294 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8295 btrace_ends_with_single_insn, btrace_call_get): Account for
8296 btrace_thread_info::functions now storing objects.
8297 * btrace.h (struct btrace_thread_info): Add constructor.
8298 (struct btrace_thread_info) <functions>: Make std::vector.
8299 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8300 Initialize with default values.
8301 * record-btrace.c (record_btrace_frame_sniffer): Account for
8302 btrace_thread_info::functions now storing objects.
8303
8ffd39f2
TW
83042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8305
8306 * btrace.c: Remove typedef bfun_s.
8307 (ftrace_new_gap): Directly add gaps to the list of gaps.
8308 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8309 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8310 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8311 instead of gdb VEC.
8312
4aeb0dfc
TW
83132017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8314
8315 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8316 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8317 with btrace_thread_info::next_segment and
8318 btrace_thread_info::prev_segment.
8319 * btrace.h: Remove struct btrace_func_link.
8320 (struct btrace_function): Replace pair of function segment pointers
8321 with pair of indices.
8322 * python/py-record-btrace.c (btpy_call_prev_sibling,
8323 btpy_call_next_sibling): Replace references to
8324 btrace_thread_info::segment with btrace_thread_info::next_segment and
8325 btrace_thread_info::prev_segment.
8326 * record-btrace.c (record_btrace_frame_this_id): Use
8327 btrace_find_call_by_number.
8328
eb8f2b9c
TW
83292017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8330
8331 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8332 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8333 btrace_insn_next, btrace_insn_prev): Remove references to
8334 btrace_thread_info::flow.
8335 * btrace.h (struct btrace_function): Remove FLOW.
8336
42bfe59e
TW
83372017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8338
8339 * btrace.c (ftrace_find_call_by_number): New function.
8340 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8341 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8342 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8343 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8344 index.
8345 * btrace.h (struct btrace_function): Turn UP into an index.
8346 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8347 as an index.
8348 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8349 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8350 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8351
b54b03bd
TW
83522017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8353
8354 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8355 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8356 ftrace_update_function, ftrace_compute_global_level_offset,
8357 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8358 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8359 btrace_insn_end, btrace_is_empty): Remove references to
8360 btrace_thread_info::begin and btrace_thread_info::end.
8361 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8362 (struct btrace_thread_info) <functions>: Adjust comment.
8363 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8364 btrace_thread_info::begin.
8365
8286623c
TW
83662017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8367
8368 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8369 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8370 ftrace_update_function): Remove arguments that implicitly were always
8371 BTINFO->END.
8372 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8373 Don't pass BTINFO->END.
8374
a0f1b963
TW
83752017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8376
8377 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8378 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8379 btrace_find_insn_by_number): Replace function segment pointer with
8380 index.
8381 (btrace_insn_cmp): Simplify.
8382 * btrace.h: (struct btrace_insn_iterator) Rename index to
8383 insn_index. Replace function segment pointer with index into function
8384 segment vector.
8385 * record-btrace.c (record_btrace_call_history): Replace function
8386 segment pointer use with index.
8387 (record_btrace_frame_sniffer): Retrieve function call segment through
8388 vector.
8389 (record_btrace_set_replay): Remove defunc't safety check.
8390
f158f208
TW
83912017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8392
8393 * btrace.c (btrace_ends_with_single_insn): New function.
8394 (btrace_call_get, btrace_call_number, btrace_call_begin,
8395 btrace_call_end, btrace_call_next, btrace_call_prev,
8396 btrace_find_call_by_number): Use index into call segment vector
8397 instead of pointer.
8398 (btrace_call_cmp): Simplify.
8399 * btrace.h (struct btrace_call_iterator): Replace function call segment
8400 pointer with index into vector.
8401 * record-btrace.c (record_btrace_call_history): Use index instead of
8402 pointer.
8403
521103fd
TW
84042017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8405
8406 * btrace.c (btrace_insn_begin, btrace_insn_end,
8407 btrace_find_insn_by_number): Add btinfo to iterator.
8408 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8409
17b89b34
TW
84102017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8411
8412 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8413 and save pointers directly.
8414 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8415 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8416 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8417 changed signature of functions.
8418 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8419 (btrace_fetch): Remove code that adds btrace_function pointers to
8420 vector of btrace_functions.
8421 (btrace_clear): Simplify freeing vector of btrace_functions.
8422
2b51eddc
TW
84232017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8424
8425 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8426 Replace VEC_* with std::vector functions.
8427 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8428 (struct btrace_thread_info)<functions>: Change type to std::vector.
8429
db6be0d5
SM
84302017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8431
8432 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8433 "Removed targets and native configurations" up. Merge duplicate
8434 "New commands" sub-sections. Add "New options" sub-sections.
8435
b057297a
AH
84362017-05-26 Alan Hayward <alan.hayward@arm.com>
8437
8438 * defs.h (copy_integer_to_size): New declaration.
8439 * findvar.c (copy_integer_to_size): New function.
8440 (do_cint_test): New selftest function.
8441 (copy_integer_to_size_test): Likewise.
8442 (_initialize_findvar): Likewise.
8443 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8444 (mips_fbsd_collect_reg): Use raw_collect_integer.
8445 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8446 (mips64_fill_gregset): Use raw_collect_integer
8447 (mips64_fill_fpregset): Use raw_supply_integer.
8448 * regcache.c (regcache::raw_supply_integer): New function.
8449 (regcache::raw_collect_integer): Likewise.
8450 * regcache.h: (regcache::raw_supply_integer): New declaration.
8451 (regcache::raw_collect_integer): Likewise.
8452
b77b02a5
YQ
84532017-05-24 Yao Qi <yao.qi@linaro.org>
8454
8455 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8456 (COMMON_OBS): Add gdbarch-selftests.o.
8457 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8458 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8459 * gdbarch-selftests.c: New file.
8460 * regcache.h (regcache) <~regcache>: Mark it virtual if
8461 GDB_SELF_TEST.
8462 <raw_write>: Likewise.
8463
e521e87e
YQ
84642017-05-24 Yao Qi <yao.qi@linaro.org>
8465
8466 * regcache.c (current_regcache): Change it to
8467 regcache::current_regcache.
8468 (regcache_observer_target_changed): Update.
8469 (regcache_thread_ptid_changed): Make it a regcache static
8470 method.
8471 (regcache_thread_ptid_changed): Update.
8472 (class regcache_access): New.
8473 (current_regcache_test): Update.
8474 (_initialize_regcache): Update.
8475 * regcache.h: Include forward_list.
8476 (regcache): Declare regcache_thread_ptid_changed and declare
8477 registers_changed_ptid as friend.
8478
d8e07dda
YQ
84792017-05-24 Yao Qi <yao.qi@linaro.org>
8480
8481 * i387-tdep.c (i387_register_to_value): Use register_size
8482 instead of TYPE_LENGTH.
8483 * m68k-tdep.c (m68k_register_to_value): Likewise.
8484
8c8f9122
YQ
84852017-05-24 Yao Qi <yao.qi@linaro.org>
8486
8487 * i387-tdep.c (i387_convert_register_p): Return false if type
8488 code isn't TYPE_CODE_FLT.
8489
68fce50f
YQ
84902017-05-24 Yao Qi <yao.qi@linaro.org>
8491
8492 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8493 length is 4.
8494 (alpha_register_to_value): Remove type length check.
8495 (alpha_value_to_register): Likewise.
8496
88954b49
YQ
84972017-05-24 Yao Qi <yao.qi@linaro.org>
8498
8499 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8500 TYPE_CODE_FLT.
8501
e3ec9b69
YQ
85022017-05-24 Yao Qi <yao.qi@linaro.org>
8503
8504 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8505 TYPE_CODE_FLT or not.
8506
cdd238da
YQ
85072017-05-24 Yao Qi <yao.qi@linaro.org>
8508
8509 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8510 * avr-tdep.c (avr_gdbarch_init): Likewise.
8511 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8512 * cris-tdep.c (cris_gdbarch_init): Likewise.
8513 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8514 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8515 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8516 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8517 * mep-tdep.c (mep_gdbarch_init): Likewise.
8518 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8519 * mips-tdep.c (mips_gdbarch_init): Likewise.
8520 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8521 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8522 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8523 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8524 * v850-tdep.c (v850_gdbarch_init): Likewise.
8525
7a3929c4
YQ
85262017-05-24 Yao Qi <yao.qi@linaro.org>
8527
8528 * selftest-arch.c (tests_with_arch): Call registers_changed
8529 and reinit_frame_cache.
8530 * selftest.c (run_self_tests): Likewise.
8531
f4985dba
YQ
85322017-05-24 Yao Qi <yao.qi@linaro.org>
8533
8534 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8535 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8536
ab20fa4a
YQ
85372017-05-24 Yao Qi <yao.qi@linaro.org>
8538
8539 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8540 set_gdbarch_print_insn.
8541
f532ab94
YQ
85422017-05-24 Yao Qi <yao.qi@linaro.org>
8543
8544 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8545 set_gdbarch_print_insn.
8546
39503f82
YQ
85472017-05-24 Yao Qi <yao.qi@linaro.org>
8548
8549 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8550 set_gdbarch_print_insn.
8551 * arc-tdep.c (arc_gdbarch_init): Likewise.
8552 * arch-utils.c: include dis-asm.h.
8553 (default_print_insn): New function.
8554 * arch-utils.h (default_print_insn): Declare.
8555 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8556 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8557 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8558 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8559 * frv-tdep.c (frv_gdbarch_init): Likewise.
8560 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8561 * gdbarch.sh (print_insn): Use default_print_insn.
8562 * gdbarch.c: Regenerated.
8563 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8564 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8565 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8566 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8567 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8568 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8569 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8570 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8571 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8572 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8573 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8574 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8575 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8576 * mt-tdep.c (mt_gdbarch_init): Likewise.
8577 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8578 * nios2-tdep.c (nios2_print_insn): Remove.
8579 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8580 * rx-tdep.c (rx_gdbarch_init): Likewise.
8581 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8582 * score-tdep.c (score_print_insn): Remove.
8583 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8584 * sh-tdep.c (sh_gdbarch_init): Likewise.
8585 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8586 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8587 * tic6x-tdep.c (tic6x_print_insn): Remove.
8588 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8589 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8590 * v850-tdep.c (v850_gdbarch_init): Likewise.
8591 * vax-tdep.c (vax_gdbarch_init): Likewise.
8592 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8593 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8594
f7241d4f
JB
85952017-05-23 John Baldwin <jhb@FreeBSD.org>
8596
8597 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8598 (MIPS_FP0_REGNUM): Remove.
8599 (MIPS_FSR_REGNUM): Remove.
8600 (mips_fbsd_supply_fpregs): Use mips_regnum.
8601 (mips_fbsd_supply_gregs): Likewise.
8602 (mips_fbsd_collect_fpregs): Likewise.
8603 (mips_fbsd_collect_gregs): Likewise.
8604
d489d81d
JB
86052017-05-23 John Baldwin <jhb@FreeBSD.org>
8606
8607 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8608 (getpfpregs_supplies): New function.
8609 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8610 getfpregs_supplies.
8611 (mips_fbsd_store_inferior_registers): Likewise.
8612
e11b3cdc
PA
86132017-05-22 Pedro Alves <palves@redhat.com>
8614
8615 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8616 maintainer.
8617
0f068fb5
AH
86182017-05-22 Alan Hayward <alan.hayward@arm.com>
8619
8620 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8621 (store_register): Likewise.
8622 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8623 (get_decimal_float_return_value): Likewise.
8624 (do_ppc_sysv_return_value): Likewise.
8625 (ppc64_sysv_abi_push_integer): Likewise.
8626 (ppc64_sysv_abi_push_freg): Likewise.
8627 (ppc64_sysv_abi_return_value_base): Likewise.
8628 (ppc64_sysv_abi_return_value): Likewise.
8629 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8630 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8631 * rs6000-nat.c: Likewise.
8632 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8633 (rs6000_value_to_register): Likewise.
8634 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8635
e6cf65f2
TT
86362017-05-21 Tom Tromey <tom@tromey.com>
8637
8638 PR rust/21466:
8639 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8640 arrays as "[T]", not "[T; ]".
8641
43cc5389
TT
86422017-05-19 Tom Tromey <tom@tromey.com>
8643
8644 PR rust/21484:
8645 * rust-lang.c (exp_descriptor_rust): New function.
8646 (rust_language_defn): Use it.
8647 * p-lang.c (pascal_language_defn): Update.
8648 * opencl-lang.c (opencl_language_defn): Update.
8649 * objc-lang.c (objc_language_defn): Update.
8650 * m2-lang.c (m2_language_defn): Update.
8651 * language.h (struct language_defn)
8652 <la_watch_location_expression>: New member.
8653 * language.c (unknown_language_defn, auto_language_defn)
8654 (local_language_defn): Update.
8655 * go-lang.c (go_language_defn): Update.
8656 * f-lang.c (f_language_defn): Update.
8657 * d-lang.c (d_language_defn): Update.
8658 * c-lang.h (c_watch_location_expression): Declare.
8659 * c-lang.c (c_watch_location_expression): New function.
8660 (c_language_defn, cplus_language_defn, asm_language_defn)
8661 (minimal_language_defn): Use it.
8662 * breakpoint.c (watch_command_1): Call
8663 la_watch_location_expression.
8664 * ada-lang.c (ada_language_defn): Update.
8665
7a6e7fcc
RO
86662017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8667
6e7e1744
RO
8668 PR tui/21482
8669 * gdb_curses.h (NOMACROS): Define.
8670 (NCURSES_NOMACROS): Define.
8671
86722017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8673
8674 PR tui/21482
7a6e7fcc
RO
8675 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8676 arg to char *.
8677 * tui/tui-wingeneral.c (box_win): Likewise.
8678 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8679 (tui_show_source_line): Likewise.
8680 (tui_show_exec_info_content): Likewise.
8681
1933fd8e
VM
86822017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8683
8684 * sparc-tdep.c (sparc_structure_return_p)
8685 (sparc_arg_on_registers_p): New functions.
8686 (sparc32_store_arguments): Use them.
8687 * sparc64-tdep.c (sparc64_16_byte_align_p)
8688 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8689 Handle TYPE_CODE_ARRAY.
8690
21873064
YQ
86912017-05-17 Yao Qi <yao.qi@linaro.org>
8692
8693 * cli/cli-decode.c (add_alias_cmd): New function.
8694 * command.h (add_alias_cmd): Declare.
8695 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8696 instead call add_alias_cmd.
8697
2b351b19
PA
86982017-05-17 Pedro Alves <palves@redhat.com>
8699
8700 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8701 (nat_makefile_frag): ... this. All references updated.
8702 * configure.ac: Likewise.
8703 * configure.nat: Likewise. Enhance comments.
8704 * configure: Regenerate.
8705
5f2ad7a3
RO
87062017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8707
8708 * procfs.c (procfs_create_inferior): Change prototype to match
8709 definition.
8710
adf3dde5
EZ
87112017-05-13 Eli Zaretskii <eliz@gnu.org>
8712
8713 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8714 C++ compiler warning.
8715
6830f270
TT
87162017-05-12 Tom Tromey <tom@tromey.com>
8717
8718 PR rust/21483:
8719 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8720 recurse, just call value_struct_elt directly.
8721
68f2f2e3
TT
87222017-05-12 Tom Tromey <tom@tromey.com>
8723
8724 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8725 OP_RUST_ARRAY>: Fix.
8726
256afbc2
TT
87272017-05-12 Tom Tromey <tom@tromey.com>
8728
8729 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8730
94bb8dfe
YQ
87312017-05-09 Yao Qi <yao.qi@linaro.org>
8732
8733 * regcache.c: Include <forward_list>.
8734 (struct regcache_list): Remove.
8735 (current_regcache): Update.
8736 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8737 (regcache_thread_ptid_changed): Likewise.
8738 (registers_changed_ptid): Likewise.
8739 (current_regcache_size): Likewise.
8740
8248946c
YQ
87412017-05-09 Yao Qi <yao.qi@linaro.org>
8742
8743 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8744 (current_regcache_size): New function.
8745 (current_regcache_test): New function.
8746 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8747
313c5961
AH
87482017-05-08 Alan Hayward <alan.hayward@arm.com>
8749
8750 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8751 (print_gp_register_row): Use get_frame_register_value.
8752
27bfc1d1
AH
87532017-05-08 Alan Hayward <alan.hayward@arm.com>
8754
8755 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8756 (mips_supply_fpregset): Likewise.
8757 (mips64_supply_gregset): Likewise.
8758
146e6c5c
AH
87592017-05-08 Alan Hayward <alan.hayward@arm.com>
8760
8761 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8762 regcache->raw_supply_zeroed.
8763
e50f25ec
SDJ
87642017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8765
8766 * configure.nat: Rearrange 'case' statements to match
8767 host before cpu.
8768
21ea5acd
SDJ
87692017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8770
8771 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8772 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8773 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8774 "@nat_extra_makefile_frag@".
8775 (Makefile): Remove dependency on "@frags@".
8776 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8777 (data-directory/Makefile): Likewise.
8778 * config/aarch64/linux.mh: Deleted; moved contents to
8779 "gdb/configure.nat".
8780 * config/alpha/alpha-linux.mh: Likewise.
8781 * config/alpha/nbsd.mh: Likewise.
8782 * config/arm/linux.mh: Likewise.
8783 * config/arm/nbsdelf.mh: Likewise.
8784 * config/i386/cygwin.mh: Likewise.
8785 * config/i386/cygwin64.mh: Likewise.
8786 * config/i386/darwin.mh: Likewise.
8787 * config/i386/fbsd.mh: Likewise.
8788 * config/i386/fbsd64.mh: Likewise.
8789 * config/i386/go32.mh: Likewise.
8790 * config/i386/i386gnu.mh: Likewise.
8791 * config/i386/i386sol2.mh: Likewise.
8792 * config/i386/linux.mh: Likewise.
8793 * config/i386/linux64.mh: Likewise.
8794 * config/i386/mingw.mh: Likewise.
8795 * config/i386/mingw64.mh: Likewise.
8796 * config/i386/nbsd64.mh: Likewise.
8797 * config/i386/nbsdelf.mh: Likewise.
8798 * config/i386/nto.mh: Likewise.
8799 * config/i386/obsd.mh: Likewise.
8800 * config/i386/obsd64.mh: Likewise.
8801 * config/i386/sol2-64.mh: Likewise.
8802 * config/ia64/linux.mh: Likewise.
8803 * config/m32r/linux.mh: Likewise.
8804 * config/m68k/linux.mh: Likewise.
8805 * config/m68k/nbsdelf.mh: Likewise.
8806 * config/m68k/obsd.mh: Likewise.
8807 * config/m88k/obsd.mh: Likewise.
8808 * config/mips/fbsd.mh: Likewise.
8809 * config/mips/linux.mh: Likewise.
8810 * config/mips/nbsd.mh: Likewise.
8811 * config/mips/obsd64.mh: Likewise.
8812 * config/pa/linux.mh: Likewise.
8813 * config/pa/nbsd.mh: Likewise.
8814 * config/pa/obsd.mh: Likewise.
8815 * config/powerpc/aix.mh: Likewise.
8816 * config/powerpc/fbsd.mh: Likewise.
8817 * config/powerpc/linux.mh: Likewise.
8818 * config/powerpc/nbsd.mh: Likewise.
8819 * config/powerpc/obsd.mh: Likewise.
8820 * config/powerpc/ppc64-linux.mh: Likewise.
8821 * config/powerpc/spu-linux.mh: Likewise.
8822 * config/s390/linux.mh: Likewise.
8823 * config/sh/nbsd.mh: Likewise.
8824 * config/sparc/fbsd.mh: Likewise.
8825 * config/sparc/linux.mh: Likewise.
8826 * config/sparc/linux64.mh: Likewise.
8827 * config/sparc/nbsd64.mh: Likewise.
8828 * config/sparc/nbsdelf.mh: Likewise.
8829 * config/sparc/obsd64.mh: Likewise.
8830 * config/sparc/sol2.mh: Likewise.
8831 * config/tilegx/linux.mh: Likewise.
8832 * config/vax/nbsdelf.mh: Likewise.
8833 * config/vax/obsd.mh: Likewise.
8834 * config/xtensa/linux.mh: Likewise.
8835 * config/i386/i386gnu.mn: New file, with excerpts from
8836 "config/i386/i386gnu.mh".
8837 * configure: Regenerate.
8838 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8839 *.mh files under "gdb/config".
8840 * configure.nat: New file, with contents from the
8841 "gdb/config/*/*.mh" files.
8842
7ed1acaf
TW
88432017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8844
8845 * btrace.c (btrace_clear): Free insn vector.
8846
e13cb306
PA
88472017-05-05 Pedro Alves <palves@redhat.com>
8848
8849 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8850 * configure: Regenerate.
8851
5ed8105e
PA
88522017-05-04 Pedro Alves <palves@redhat.com>
8853
8854 * Makefile.in (SFILES): Add progspace-and-thread.c.
8855 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8856 (COMMON_OBS): Add progspace-and-thread.o.
8857 * breakpoint.c: Include "progspace-and-thread.h".
8858 (update_inserted_breakpoint_locations)
8859 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8860 Use scoped_restore_current_pspace_and_thread.
8861 (create_std_terminate_master_breakpoint): Use
8862 scoped_restore_current_program_space.
8863 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8864 (print_breakpoint_location): Use
8865 scoped_restore_current_program_space.
8866 (bp_loc_is_permanent): Use
8867 scoped_restore_current_pspace_and_thread.
8868 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8869 (download_tracepoint_locations): Use
8870 scoped_restore_current_pspace_and_thread.
8871 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8872 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8873 (enum step_over_calls_kind): Moved from inferior.h.
8874 (class scoped_restore_current_thread): New class.
8875 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8876 declaration.
8877 (scoped_restore_current_thread): New class.
8878 * infcmd.c: Include "common/gdb_optional.h".
8879 (continue_1, proceed_after_attach): Use
8880 scoped_restore_current_thread.
8881 (notice_new_inferior): Use scoped_restore_current_thread.
8882 * inferior.c: Include "progspace-and-thread.h".
8883 (restore_inferior, save_current_inferior): Delete.
8884 (add_inferior_command, clone_inferior_command): Use
8885 scoped_restore_current_pspace_and_thread.
8886 * inferior.h (scoped_restore_current_inferior): New class.
8887 * infrun.c: Include "progspace-and-thread.h" and
8888 "common/gdb_optional.h".
8889 (follow_fork_inferior): Use
8890 scoped_restore_current_pspace_and_thread.
8891 (scoped_restore_exited_inferior): New class.
8892 (handle_vfork_child_exec_or_exit): Use
8893 scoped_restore_exited_inferior,
8894 scoped_restore_current_pspace_and_thread,
8895 scoped_restore_current_thread and scoped_restore.
8896 (fetch_inferior_event): Use scoped_restore_current_thread.
8897 * linespec.c (decode_line_full, decode_line_1): Use
8898 scoped_restore_current_program_space.
8899 * mi/mi-main.c: Include "progspace-and-thread.h".
8900 (exec_continue): Use scoped_restore_current_thread.
8901 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8902 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8903 * proc-service.c (ps_pglobal_lookup): Use
8904 scoped_restore_current_program_space.
8905 * progspace-and-thread.c: New file.
8906 * progspace-and-thread.h: New file.
8907 * progspace.c (release_program_space, clone_program_space): Use
8908 scoped_restore_current_program_space.
8909 (restore_program_space, save_current_program_space)
8910 (save_current_space_and_thread): Delete.
8911 (switch_to_program_space_and_thread): Moved to
8912 progspace-and-thread.c.
8913 * progspace.h (save_current_program_space)
8914 (save_current_space_and_thread): Delete declarations.
8915 (scoped_restore_current_program_space): New class.
8916 * remote.c (remote_btrace_maybe_reopen): Use
8917 scoped_restore_current_thread.
8918 * symtab.c: Include "progspace-and-thread.h".
8919 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
8920 * thread.c (print_thread_info_1): Use
8921 scoped_restore_current_thread.
8922 (struct current_thread_cleanup): Delete.
8923 (do_restore_current_thread_cleanup)
8924 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
8925 (scoped_restore_current_thread::~scoped_restore_current_thread):
8926 ... this new dtor.
8927 (make_cleanup_restore_current_thread): Rename/convert to ...
8928 (scoped_restore_current_thread::scoped_restore_current_thread):
8929 ... this new ctor.
8930 (thread_apply_all_command): Use scoped_restore_current_thread.
8931 (thread_apply_command): Use scoped_restore_current_thread.
8932 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
8933 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
8934
f6223dbb
PA
89352017-05-04 Pedro Alves <palves@redhat.com>
8936
8937 * thread.c (make_cleanup_restore_current_thread): Move
8938 find_thread_ptid call before the is_stopped call. Assert that the
8939 thread is found. Replace is_stopped call by checking the thread's
8940 state directly. Remove unnecessary NULL-thread check.
8941
3c3ae77e
PA
89422017-05-04 Pedro Alves <palves@redhat.com>
8943
8944 * corelow.c (thread_section_name): New class.
8945 (get_core_register_section, get_core_siginfo): Use it.
8946
45eba0ab
AA
89472017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
8948
8949 * corelow.c (sniff_core_bfd): Remove extra semicolon.
8950 (get_core_register_section): Remove xfree of NULL pointer.
8951
f81fdd35
AH
89522017-05-03 Alan Hayward <alan.hayward@arm.com>
8953
8954 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
8955 * regcache.c (regcache::raw_supply_zeroed): New function.
8956 * regcache.h (regcache::raw_supply_zeroed): New declaration.
8957
35837774
SM
89582017-05-03 Simon Marchi <simon.marchi@ericsson.com>
8959
8960 * gdbarch.sh: Remove commented out definition of
8961 TARGET_CHAR_BIT.
8962 * gdbarch.h: Re-generate.
8963
c94fee56
SDJ
89642017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
8965
8966 * configure: Regenerate.
8967
d17f7b36
SM
89682017-05-02 Simon Marchi <simon.marchi@ericsson.com>
8969
8970 * solib-target.c (solib_target_relocate_section_addresses):
8971 Remove num_section_bases, num_bases, segment_bases variables.
8972
b560ebd6
SM
89732017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8974
8975 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
8976
f2f46dfc
SM
89772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8978
8979 * solib-target.c: Include <vector>
8980 (struct lm_info_target) <~lm_info_target>: Remove.
8981 <segment_bases, section_bases>: Change type to
8982 std::vector<CORE_ADDR>.
8983 (library_list_start_segment, library_list_start_section,
8984 library_list_end_library,
8985 solib_target_relocate_section_addresses): Adjust.
8986
a0ff9e1a
SM
89872017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
8988
8989 * gdbarch.sh (software_single_step): Change return type to
8990 std::vector<CORE_ADDR>.
8991 * gdbarch.c, gdbarch.h: Re-generate.
8992 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
8993 Adjust.
8994 (arm_deal_with_atomic_sequence_raw): Adjust.
8995 (thumb_get_next_pcs_raw): Adjust.
8996 (arm_get_next_pcs_raw): Adjust.
8997 (arm_get_next_pcs): Adjust.
8998 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
8999 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9000 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9001 (alpha_software_single_step): Adjust.
9002 * alpha-tdep.h (alpha_software_single_step): Adjust.
9003 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9004 * arm-tdep.c (arm_software_single_step): Adjust.
9005 (arm_breakpoint_kind_from_current_state): Adjust.
9006 * arm-tdep.h (arm_software_single_step): Adjust.
9007 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9008 * cris-tdep.c (cris_software_single_step): Adjust.
9009 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9010 (micromips_deal_with_atomic_sequence): Adjust.
9011 (deal_with_atomic_sequence): Adjust.
9012 (mips_software_single_step): Adjust.
9013 * mips-tdep.h (mips_software_single_step): Adjust.
9014 * moxie-tdep.c (moxie_software_single_step): Adjust.
9015 * nios2-tdep.c (nios2_software_single_step): Adjust.
9016 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9017 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9018 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9019 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9020 * sparc-tdep.c (sparc_software_single_step): Adjust.
9021 * spu-tdep.c (spu_software_single_step): Adjust.
9022 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9023
ea480a30
SM
90242017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9025
9026 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9027 * gdbarch.h: Re-generate.
9028
d050f7d7
TW
90292017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9030
9031 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9032 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9033 * python/py-instruction.c, python/py-instruction.h: New file.
9034 * python/py-record.c: Add py-instruction.h include.
9035 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9036 gdb.RecordInstruction.
9037 * python/python-internal.h: Add gdbpy_initialize_instruction
9038 declaration.
9039 * python/python.c (do_start_initialization): Add
9040 gdbpy_initialize_instruction.
9041
14f819c8
TW
90422017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9043
9044 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9045 Remove.
9046 (btrace_func_from_recpy_func): New function.
9047 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9048 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9049 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9050 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9051 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9052 Also, use new helper functions.
9053 (btpy_list_item): Use new helper functions.
9054 (recpy_bt_function_call_history): Use new type name.
9055 (btpy_call_getset): Remove.
9056 (gdbpy_initialize_btrace): Remove code to initialize
9057 gdb.BtraceFunctionCall.
9058 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9059 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9060 recpy_bt_func_prev, recpy_bt_func_next): New export.
9061 * python/py-record.c (recpy_func_type): New static object.
9062 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9063 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9064 recpy_func_next): New function.
9065 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9066 (recpy_func_getset): New static object.
9067 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9068 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9069
0ed5da75
TW
90702017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9071
9072 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9073 (btpy_object, btpy_insn_type, btpy_new): Remove.
9074 (btpy_list_object): Use gdb.RecordInstruction type instead of
9075 gdb.BtraceInstruction type.
9076 (btrace_insn_from_recpy_insn): New function.
9077 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9078 btpy_new.
9079 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9080 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9081 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9082 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9083 instead of btpy_object.
9084 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9085 btpy_insn_data, btpy_insn_decode): Rename to ...
9086 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9087 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9088 recpy_bt_insn_decode): This. Also, use new helper functions.
9089 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9090 recpy_insn_type.
9091 (btpy_insn_getset): Remove.
9092 (gdbpy_initialize_btrace): Remove code to initialize
9093 gdb.BtraceInstruction. Use recpy_element_object.
9094 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9095 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9096 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9097 * python/py-record.c (recpy_insn_type): New static object.
9098 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9099 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9100 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9101 New function.
9102 (recpy_insn_getset): New static object.
9103 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9104 * python/py-record.h (recpy_element_object): New typedef.
9105 (recpy_insn_type, recpy_insn_new): New export.
9106
913aeadd
TW
91072017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9108
9109 * py-record-btrace.c (btpy_insn_new): Removed.
9110 (btpy_insn_or_gap_new): New function.
9111 (btpy_insn_error): Removed.
9112 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9113 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9114 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9115 btpy_insn_or_gap_new instead of btpy_insn_new.
9116 (btpy_insn_getset): Remove btpy_insn_error.
9117 * py-record.c (recpy_gap_type): New static object.
9118 (recpy_gap_object): New typedef.
9119 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9120 recpy_gap_reason_string): New function.
9121 (recpy_gap_getset): New static object.
9122 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9123 * py-record.h (recpy_gap_new): New export.
9124
a3be24ad
TW
91252017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9126
9127 * python/py-record.c (recpy_ptid): Remove.
9128 (recpy_record_getset): Remove recpy_ptid.
9129
ae20e79a
TW
91302017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9131
9132 * btrace.c (btrace_fetch): Set inferior_ptid.
9133 * python/py-record-btrace.c: Add "py-record.h" include.
9134 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9135 recpy_bt_end, recpy_bt_instruction_history,
9136 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9137 in gdb.Record object instead of current ptid.
9138 * python/py-record.c: Include new "py-record.h" file.
9139 (recpy_record_object): Moved to py-record.h.
9140 * python/py-record.h: New file.
9141
8d0050ea
TW
91422017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9143
9144 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9145 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9146 indentation.
9147
3f380b50
JB
91482017-05-01 Joel Brobecker <brobecker@adacore.com>
9149
9150 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9151 the past maintainers section.
9152
07495424
YQ
91532017-04-28 Yao Qi <yao.qi@linaro.org>
9154
9155 * infcmd.c (get_return_value): Use regcache ctor, and remove
9156 cleanup.
9157
deb1fa3e
YQ
91582017-04-28 Yao Qi <yao.qi@linaro.org>
9159 Pedro Alves <palves@redhat.com>
9160
9161 * regcache.c (regcache::regcache): New tag dispatch ctor.
9162 (do_cooked_read): Moved above.
9163 (regcache_dup): Use the tag dispatch ctor..
9164 * regcache.h (regcache): Declare ctor, delete copy ctor and
9165 assignment operator, remove friend regcache_dup.
9166
b421c83c
YQ
91672017-04-28 Yao Qi <yao.qi@linaro.org>
9168
9169 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9170 call method save instead of regcache_cpy.
9171 * regcache.h (struct regcache): Make regcache_dup a friend.
9172
ef79d9a3
YQ
91732017-04-28 Yao Qi <yao.qi@linaro.org>
9174
9175 * regcache.c (struct regcache): Move to regcache.h
9176 (regcache::arch): New method.
9177 (regcache_get_ptid): Update.
9178 (get_regcache_arch): Call arch method.
9179 (get_regcache_aspace): Call method aspace.
9180 (register_buffer): Change it to method.
9181 (regcache_save): Change it to regcache::save.
9182 (regcache_restore): Likewise.
9183 (regcache_cpy_no_passthrough): Remove the declaration.
9184 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9185 (regcache_cpy_no_passthrough): Change it to method
9186 cpy_no_passthrough.
9187 (regcache_register_status): Change it to method
9188 get_register_status.
9189 (regcache_invalidate): Change it to method invalidate.
9190 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9191 (regcache_raw_update): Change it to method raw_update.
9192 (regcache_raw_read): Likewise.
9193 (regcache_raw_read_signed): Likewise.
9194 (regcache_raw_read_unsigned): Likewise.
9195 (regcache_raw_write_signed): Likewise.
9196 (regcache_raw_write_unsigned): Likewise.
9197 (regcache_cooked_read): Likewise.
9198 (regcache_cooked_read_value): Likewise.
9199 (regcache_cooked_read_signed): Likewise.
9200 (regcache_cooked_read_unsigned): Likewise.
9201 (regcache_cooked_write_signed): Likewise.
9202 (regcache_cooked_write_unsigned): Likewise.
9203 (regcache_raw_set_cached_value): Likewise.
9204 (regcache_raw_write): Likewise.
9205 (regcache_cooked_write): Likewise.
9206 (regcache_xfer_part): Likewise.
9207 (regcache_raw_read_part): Likewise.
9208 (regcache_raw_write_part): Likewise.
9209 (regcache_cooked_read_part): Likewise.
9210 (regcache_cooked_write_part): Likewise.
9211 (regcache_raw_supply): Likewise.
9212 (regcache_raw_collect): Likewise.
9213 (regcache_transfer_regset): Likewise.
9214 (regcache_supply_regset): Likewise.
9215 (regcache_collect_regset): Likewise.
9216 (regcache_debug_print_register): Likewise.
9217 (enum regcache_dump_what): Move it to regcache.h.
9218 (regcache_dump): Change it to method dump.
9219 * regcache.h (enum regcache_dump_what): New.
9220 (class regcache): New.
9221 * target.c (target_fetch_registers): Call method
9222 debug_print_register.
9223 (target_store_registers): Likewise.
9224
f8fdb78e
SM
92252017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9226
9227 * windows-nat.c (struct lm_info_windows): Initialize field.
9228 (windows_make_so): Allocate lm_info_windows with new.
9229 (windows_free_so): Free lm_info_windows with delete.
9230
9ccbfd7b
SM
92312017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9232
9233 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9234 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9235 cleanup.
9236 (darwin_free_so): Free lm_info_darwin with delete.
9237
76e75227
SM
92382017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9239
9240 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9241 <l_addr_p>: Change type to bool.
9242 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9243 (svr4_free_so): Free lm_info_svr4 with delete.
9244 (svr4_copy_library_list): Replace memcpy with call to copy
9245 constructor.
9246 (library_list_start_library, svr4_default_sos): Allocate
9247 lm_info_svr4 with new.
9248
51046d9e
SM
92492017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9250
9251 * solib-target.c (struct lm_info_target): Add destructor,
9252 initialize fields.
9253 <name>: Change type to std::string.
9254 (library_list_start_library): Allocate lm_info_target with new.
9255 (solib_target_free_library_list): Free lm_info_target with
9256 delete.
9257 (solib_target_current_sos): Adapt to std::string.
9258 (solib_target_free_so): Free lm_info_target with delete.
9259
4023ae76
SM
92602017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9261
9262 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9263 fields.
9264 (frv_current_sos): Allocate lm_info_frv with new.
9265 (frv_relocate_main_executable): Free lm_info_frv with delete,
9266 allocate with new.
9267 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9268
af43057b
SM
92692017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9270
9271 * solib-frv.c (struct lm_info_frv): Fix indentation.
9272
b0911207
SM
92732017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9274
9275 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9276 map field.
9277 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9278 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9279 and allocate with new.
9280 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9281
6c401f72
SM
92822017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9283
9284 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9285 <filename, member_name>: Change type to std::string.
9286 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9287 (library_list_start_library): Allocate lm_info_aix with new.
9288 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9289 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9290 with copy constructor.
9291
d0e449a1
SM
92922017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9293
9294 * solist.h (struct lm_info): Remove.
9295 (struct lm_info_base): New class.
9296 (struct so_list) <lm_info>: Change type to lm_info_base *.
9297 * nto-tdep.c (struct lm_info): Remove.
9298 (lm_addr): Adjust.
9299 * solib-aix.c (struct lm_info): Rename to ...
9300 (struct lm_info_aix): ... this. Extend lm_info_base.
9301 (lm_info_p): Rename to ...
9302 (lm_info_aix_p): ... this, and adjust.
9303 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9304 solib_aix_parse_libraries, library_list_start_library,
9305 solib_aix_free_library_list, solib_aix_parse_libraries,
9306 solib_aix_get_library_list,
9307 solib_aix_relocate_section_addresses, solib_aix_free_so,
9308 solib_aix_get_section_offsets,
9309 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9310 Adjust.
9311 (struct solib_aix_inferior_data) <library_list>: Adjust.
9312 * solib-darwin.c (struct lm_info): Rename to ...
9313 (struct lm_info_darwin): ... this. Extend lm_info_base.
9314 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9315 * solib-dsbt.c (struct lm_info): Rename to ...
9316 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9317 (struct dsbt_info) <main_executable_lm_info): Adjust.
9318 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9319 dsbt_relocate_section_addresses): Adjust.
9320 * solib-frv.c (struct lm_info): Rename to ...
9321 (struct lm_info_frv): ... this. Extend lm_info_base.
9322 (main_executable_lm_info): Adjust.
9323 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9324 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9325 find_canonical_descriptor_in_load_object,
9326 frv_fdpic_find_canonical_descriptor): Adjust.
9327 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9328 to lm_info_svr4.
9329 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9330 svr4_clear_so, svr4_copy_library_list,
9331 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9332 svr4_current_sos, svr4_fetch_objfile_link_map,
9333 solist_update_incremental): Adjust.
9334 * solib-svr4.h (struct lm_info_svr4): Move here from
9335 solib-svr4.c.
9336 * solib-target.c (struct lm_info): Rename to ...
9337 (struct lm_info_target): ... this. Extend lm_info_base.
9338 (lm_info_p): Rename to ...
9339 (lm_info_target_p): ... this.
9340 (solib_target_parse_libraries, library_list_start_segment,
9341 library_list_start_section, library_list_start_library,
9342 library_list_end_library, solib_target_free_library_list,
9343 solib_target_current_sos, solib_target_free_so,
9344 solib_target_relocate_section_addresses): Adjust.
9345 * windows-nat.c (struct lm_info): Rename to ...
9346 (struct lm_info_windows): ... this. Extend lm_info_base.
9347 (windows_make_so, handle_load_dll, handle_unload_dll,
9348 windows_xfer_shared_libraries): Adjust.
9349
434a4023
SM
93502017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9351
9352 * solib-darwin.c (struct darwin_so_list): Remove.
9353 (darwin_current_sos): Allocate an so_list object instead of a
9354 darwin_so_list, separately allocate an lm_info object.
9355 (darwin_free_so): Free lm_info.
9356
428544e8
JB
93572017-04-28 John Baldwin <jhb@FreeBSD.org>
9358
9359 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9360 with fprintf_filtered.
9361
4621115f
YQ
93622017-04-28 Yao Qi <yao.qi@linaro.org>
9363
9364 * regcache.c (regcache::regcache): New function.
9365 (regcache::~regcache): New function.
9366 (regcache_xmalloc_1): Remove.
9367 (regcache_xmalloc): Call new regcache.
9368 (regcache_xfree): Call delete regcache.
9369 (get_thread_arch_aspace_regcache): Call new regcache.
9370
339053c2
YQ
93712017-04-28 Yao Qi <yao.qi@linaro.org>
9372
9373 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9374 lwp instead of ptid_get_lwp.
9375
7974a605
YQ
93762017-04-28 Yao Qi <yao.qi@linaro.org>
9377
9378 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9379 lwp_info instead of getting from inferior_ptid.
9380
e15c3eb4
KS
93812017-04-27 Keith Seitz <keiths@redhat.com>
9382
9383 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9384 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9385 (CV_CONVERSION_BADNESS): Define.
9386 (rank_one_type): Remove overly restrictive rvalue reference
9387 rank checks.
9388 Add cv-qualifier checks and subranks for type equality.
9389 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9390 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9391 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9392
72bc1d24
SM
93932017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9394
9395 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9396 count when creating the object.
9397
55bcecda
UW
93982017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9399 Ulrich Weigand <uweigand@de.ibm.com>
9400
9401 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9402 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9403 is used in AIX.
9404 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9405 (process_xcoff_symbol): Likewise.
9406 (scan_xcoff_symtab): Likewise.
9407
5c99fcf8
AH
94082017-04-26 Alan Hayward <alan.hayward@arm.com>
9409
9410 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9411 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9412 (ia64_access_reg): Use get_frame_register_unsigned.
9413 (ia64_access_rse_reg): Likewise.
9414 (ia64_libunwind_frame_prev_register): Likewise.
9415
b41c5a85
JW
94162017-04-26 Jiong Wang <jiong.wang@arm.com>
9417
9418 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9419 * gdbarch.c: Regenerated.
9420 * gdbarch.h: Regenerated.
9421 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9422 visibility external.
9423 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9424 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9425 (enum cfa_how_kind): Move to ...
9426 (struct dwarf2_frame_state_reg_info): Likewise.
9427 (struct dwarf2_frame_state): Likewise.
9428 * dwarf2-frame.h: ... here.
9429 (dwarf2_frame_state_alloc_regs): New declaration.
9430 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9431 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9432
c185f580
AH
94332017-04-26 Alan Hayward <alan.hayward@arm.com>
9434
9435 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9436 regcache_raw_read_unsigned.
9437 (xtensa_pseudo_register_write): Likewise.
9438
19c45594
AH
94392017-04-26 Alan Hayward <alan.hayward@arm.com>
9440
9441 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9442 (nds32_pseudo_register_write): Likewise.
9443
4658f12e
YQ
94442017-04-25 Yao Qi <yao.qi@linaro.org>
9445
9446 * regcache.c (struct regcache) <readonly_p>: Change its type
9447 to bool.
9448 (regcache_xmalloc_1): Update parameter type and callers update.
9449
d581dda8
YQ
94502017-04-25 Yao Qi <yao.qi@linaro.org>
9451
9452 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9453 set_gdbarch_wchar_bit.
9454 * arm-tdep.c (arm_gdbarch_init): Likewise.
9455
debed3db
PA
94562017-04-25 Pedro Alves <palves@redhat.com>
9457
9458 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9459 (BothAreRelocatable, memcopy, memmove): Don't define.
9460 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9461 macros.
9462
b0b92aeb
PA
94632017-04-25 Pedro Alves <palves@redhat.com>
9464
9465 * common/common-defs.h: Include "common/poison.h".
9466 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9467 and adjust.
9468 * common/poison.h: New file.
9469 * common/traits.h: Include <type_traits>.
9470 (Not, Or, Requires): New, moved from common/function-view.h.
9471
16c4d54a
PA
94722017-04-25 Pedro Alves <palves@redhat.com>
9473
9474 * breakpoint.h (struct breakpoint): In-class initialize all
9475 fields. Make boolean fields "bool".
9476 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9477 memset call and initializations no longer necessary.
9478
b5c36682
PA
94792017-04-25 Pedro Alves <palves@redhat.com>
9480
9481 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9482 reference.
9483 (pt_btrace_insn): New function.
9484 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9485
5625a286
PA
94862017-04-25 Pedro Alves <palves@redhat.com>
9487
9488 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9489 "base" field and inherit from "bp_location" instead. Add
9490 non-default ctor.
9491 (allocate_location_exception): Use new non-default ctor.
9492 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9493 (init_bp_location): Convert to ...
9494 (bp_location::bp_location): ... this new ctor, and remove memset
9495 call.
9496 (base_breakpoint_allocate_location): Use the new non-default ctor.
9497 * breakpoint.h (bp_location): Now a class. Declare default and
9498 non-default ctors. In-class initialize all members.
9499 (init_bp_location): Remove declaration.
9500
23bcc18f
PA
95012017-04-25 Pedro Alves <palves@redhat.com>
9502
9503 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9504 assignment operator.
9505
e1ba3053
YQ
95062017-04-24 Yao Qi <yao.qi@linaro.org>
9507
9508 * doublest.c (convert_doublest_to_floatformat): Call
9509 floatformat_totalsize_bytes.
9510
10f489e5
TT
95112017-04-22 Tom Tromey <tom@tromey.com>
9512
9513 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9514 ui_out_emit_list.
9515 * stack.c (print_frame): Use ui_out_emit_list.
9516 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9517 ui_out_emit_list.
9518 * mi/mi-main.c (print_one_inferior)
9519 (mi_cmd_data_list_register_names)
9520 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9521 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9522 ui_out_emit_list.
9523 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9524 (mi_output_solib_attribs): Use ui_out_emit_list,
9525 ui_out_emit_tuple.
9526 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9527 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9528 (mi_cmd_stack_list_args, list_args_or_locals): Use
9529 ui_out_emit_list.
9530 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9531 * breakpoint.c (print_solib_event, output_thread_groups): Use
9532 ui_out_emit_list.
9533
0092b74d
TT
95342017-04-22 Tom Tromey <tom@tromey.com>
9535
9536 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9537 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9538 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9539
a14a62dd
TT
95402017-04-22 Tom Tromey <tom@tromey.com>
9541
9542 * tracepoint.c (tvariables_info_1)
9543 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9544
46b9c129
TT
95452017-04-22 Tom Tromey <tom@tromey.com>
9546
9547 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9548 annotate_arg_emitter.
9549 * breakpoint.c (print_mention_watchpoint)
9550 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9551 * annotate.h (struct annotate_arg_emitter): New.
9552
2e783024
TT
95532017-04-22 Tom Tromey <tom@tromey.com>
9554
9555 * record-btrace.c (record_btrace_insn_history)
9556 (record_btrace_insn_history_range, record_btrace_call_history)
9557 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9558 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9559 ui_out_emit_tuple.
9560 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9561 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9562 * skip.c (skip_info): Use ui_out_emit_tuple.
9563 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9564 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9565 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9566 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9567 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9568 ui_out_emit_tuple.
9569 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9570 (output_register, mi_cmd_data_read_memory)
9571 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9572 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9573 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9574 Use ui_out_emit_tuple.
9575 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9576 ui_out_emit_tuple.
9577 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9578 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9579 * linux-thread-db.c (info_auto_load_libthread_db): Use
9580 ui_out_emit_tuple.
9581 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9582 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9583 * disasm.c (do_mixed_source_and_assembly_deprecated)
9584 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9585 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9586 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9587 * breakpoint.c (print_one_breakpoint_location)
9588 (print_one_breakpoint): Use ui_out_emit_tuple.
9589 * auto-load.c (print_script, info_auto_load_cmd): Use
9590 ui_out_emit_tuple.
9591 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9592
9be21bb4
SM
95932017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9594
9595 * thread.c (print_thread_info_1): Remove dead code.
9596
0d4c07af
JK
95972017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9598
9599 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9600 GDB_SELF_TEST.
9601 * arm-tdep.c (selftests::arm_record_test): Likewise.
9602
4daf993d
YQ
96032017-04-21 Yao Qi <yao.qi@linaro.org>
9604
9605 * regcache.c (regcache_restore): Remove argument 2. Replace
9606 argument 3 with regcache. Get register status from
9607 src->register_status and get register contents from
9608 register_buffer (src, regnum).
9609 (regcache_cpy): Update.
9610
a6c21d4a
PA
96112017-04-19 Pedro Alves <palves@redhat.com>
9612
9613 * gdbthread.h (thread): Add missing closing parenthesis in
9614 comment.
9615
3a3fd0fd
PA
96162017-04-19 Pedro Alves <palves@redhat.com>
9617
9618 * common/refcounted-object.h: New file.
9619 * gdbthread.h: Include "common/refcounted-object.h".
9620 (thread_info): Inherit from refcounted_object and add comments.
9621 (thread_info::incref, thread_info::decref)
9622 (thread_info::m_refcount): Delete.
9623 (thread_info::deletable): Use the refcounted_object::refcount()
9624 method.
9625 * inferior.c (current_inferior_): Add comment.
9626 (set_current_inferior): Increment/decrement refcounts.
9627 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9628 not-deletable instead of comparing with the current inferior.
9629 (initialize_inferiors): Increment the initial inferior's refcount.
9630 * inferior.h (struct inferior): Forward declare.
9631 Include "common/refcounted-object.h".
9632 (current_inferior, set_current_inferior): Move declaration to
9633 before struct inferior's definition, and fix comment.
9634 (inferior): Inherit from refcounted_object. Add comments.
9635 * thread.c (switch_to_thread_no_regs): Reference the thread's
9636 inferior pointer directly instead of doing a ptid lookup.
9637 (switch_to_no_thread): New function.
9638 (switch_to_thread(thread_info *)): New function, factored out
9639 from ...
9640 (switch_to_thread(ptid_t)): ... this.
9641 (restore_current_thread): Delete.
9642 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9643 fields, and add 'inf' field.
9644 (do_restore_current_thread_cleanup): Check whether old->inf is
9645 alive instead of looking up an inferior by ptid. Use
9646 switch_to_thread and switch_to_no_thread.
9647 (restore_current_thread_cleanup_dtor): Use old->inf directly
9648 instead of lookup up an inferior by id. Decref the inferior.
9649 Don't restore 'removable'.
9650 (make_cleanup_restore_current_thread): Same the inferior pointer
9651 in old, instead of the inferior number. Incref the inferior.
9652 Don't save/clear 'removable'.
9653
9bcb1f16
PA
96542017-04-19 Pedro Alves <palves@redhat.com>
9655
9656 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9657 unittests/scoped_restore-selftests.c.
9658 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9659 * common/scoped_restore.h (scoped_restore_base): Make "class".
9660 (scoped_restore_base::release): New public method.
9661 (scoped_restore_base::scoped_restore_base): New protected ctor.
9662 (scoped_restore_base::m_saved_var): New protected field.
9663 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9664 scoped_restore_base base class instead of m_saved_var directly.
9665 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9666 (scoped_restore_tmpl::scoped_restore_tmpl(const
9667 scoped_restore_tmpl<T>&)): Likewise.
9668 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9669 method.
9670 (scoped_restore_tmpl::saved_var): New method.
9671 (scoped_restore_tmpl::m_saved_var): Delete.
9672 * inferior.h (inferior::detaching): Now a bool.
9673 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9674 cleanup.
9675 * unittests/scoped_restore-selftests.c: New file.
9676
26fcd539
PA
96772017-04-19 Pedro Alves <palves@redhat.com>
9678
9679 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9680 Re-sort in alphabetic order.
9681
fdd243b0
PA
96822017-04-18 Pedro Alves <palves@redhat.com>
9683
9684 * xml-support.c (obstack_xml_printf): Delete.
9685 * xml-support.h (obstack_xml_printf): Delete.
9686
4895cde2
PA
96872017-04-18 Pedro Alves <palves@redhat.com>
9688
9689 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9690 vdebug, verror, body_text, start_element, end_element, name,
9691 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9692 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9693 is_xinclude>: Make private and add m_ prefix.
9694 (gdb_xml_parser::body_text): New method, based on ...
9695 (gdb_xml_body_text): ... this. Adjust.
9696 (gdb_xml_parser::vdebug): New method, based on ...
9697 (gdb_xml_debug): ... this. Adjust.
9698 (gdb_xml_parser::verror): New method, based on ...
9699 (gdb_xml_error): ... this. Adjust.
9700 (gdb_xml_parser::start_element): New method, based on ...
9701 (gdb_xml_start_element): ... this. Adjust.
9702 (gdb_xml_start_element_wrapper): Defer to
9703 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9704 (gdb_xml_parser::end_element): New method, based on ...
9705 (gdb_xml_end_element_wrapper): ... this. Adjust.
9706 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9707 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9708 (gdb_xml_parser::use_dtd): New method, based on ...
9709 (gdb_xml_use_dtd): ... this. Adjust.
9710 (gdb_xml_parser::parse): New method, based on ...
9711 (gdb_xml_parse): ... this. Adjust.
9712 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9713 (xinclude_start_include): Adjust to call the parser's name method.
9714 (xml_xinclude_default, xml_xinclude_start_doctype)
9715 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9716 method.
9717 (xml_process_xincludes): Adjust to call parser methods.
9718 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9719 declarations.
9720
bd8a901f
PA
97212017-04-18 Pedro Alves <palves@redhat.com>
9722
9723 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9724 gdb::optional<std::string>.
9725 * xml-support.c: Include <string>.
9726 (scope_level::scope_level(scope_level &&))
9727 (scope_level::~scope_level): Delete.
9728 (scope_level::body): Now a std::string.
9729 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9730 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9731 parameter.
9732 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9733 (xinclude_parsing_data::output): Now a std::string reference.
9734 (xinclude_start_include): Adjust.
9735 (xml_xinclude_default): Adjust.
9736 (xml_process_xincludes): Add 'output' parameter, and return bool.
9737 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9738 and return bool.
9739 * xml-tdesc.c: Include <unordered_map> and <string>.
9740 (tdesc_xml_cache): Delete.
9741 (tdesc_xml_cache_s): Delete.
9742 (xml_cache): Now an std::unordered_map.
9743 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9744 (target_fetch_description_xml): Change return type to
9745 gdb::optional<std::string>, and adjust.
9746 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9747 (target_fetch_description_xml): Change return type to
9748 gdb::optional<std::string>.
9749
d35d1958
PA
97502017-04-18 Pedro Alves <palves@redhat.com>
9751
9752 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9753 unittests/optional-selftests.c.
9754 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9755 * unittests/optional-selftests.c: New file.
9756 * unittests/optional/assignment/1.cc: New file.
9757 * unittests/optional/assignment/2.cc: New file.
9758 * unittests/optional/assignment/3.cc: New file.
9759 * unittests/optional/assignment/4.cc: New file.
9760 * unittests/optional/assignment/5.cc: New file.
9761 * unittests/optional/assignment/6.cc: New file.
9762 * unittests/optional/assignment/7.cc: New file.
9763 * unittests/optional/cons/copy.cc: New file.
9764 * unittests/optional/cons/default.cc: New file.
9765 * unittests/optional/cons/move.cc: New file.
9766 * unittests/optional/cons/value.cc: New file.
9767 * unittests/optional/in_place.cc: New file.
9768 * unittests/optional/observers/1.cc: New file.
9769 * unittests/optional/observers/2.cc: New file.
9770
22796e97
PA
97712017-04-18 Pedro Alves <palves@redhat.com>
9772
9773 * common/gdb_optional.h: Include common/traits.h.
9774 (in_place_t): New type.
9775 (in_place): New constexpr variable.
9776 (optional::optional): Remove member initialization of
9777 m_instantiated.
9778 (optional::optional(in_place_t...)): New constructor.
9779 (optional::~optional): Use reset.
9780 (optional::optional(const optional&)): New.
9781 (optional::optional(const optional&&)): New.
9782 (optional::optional(T &)): New.
9783 (optional::optional(T &&)): New.
9784 (operator::operator=(const optional &)): New.
9785 (operator::operator=(optional &&)): New.
9786 (operator::operator= (const T &))
9787 (operator::operator= (T &&))
9788 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9789 (operator::reset): New.
9790 (operator::m_instantiated):: Add in-class initializer.
9791 * common/traits.h: Include <type_traits>.
9792 (struct And): New types.
9793
a7fc9b61
PA
97942017-04-18 Pedro Alves <palves@redhat.com>
9795
9796 * xml-support.c: Include <vector>.
9797 (scope_level::scope_level(const gdb_xml_element *))
9798 (scope_level::scope_level(scope_level&&)): New.
9799 (scope_level::~scope_level): New.
9800 (scope_level_s): Delete.
9801 (gdb_xml_parser::scopes): Now a std::vector.
9802 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9803 Use std::vector.
9804 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9805 scope cleanup code.
9806 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9807 of the scopes member. Use std::vector::emplace_back.
9808
010151c9
PA
98092017-04-18 Pedro Alves <palves@redhat.com>
9810
9811 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9812 a bool.
9813 (gdb_xml_end_element): Change type of first parameter.
9814 (gdb_xml_cleanup): Rename to ...
9815 (gdb_xml_parser::~gdb_xml_parser): ... this.
9816 (gdb_xml_create_parser_and_cleanup): Delete with ...
9817 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9818 to this new ctor.
9819 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9820 using gdb_xml_create_parser_and_cleanup.
9821 (xinclude_parsing_data): Add ctor/dtor.
9822 (xml_xinclude_cleanup): Delete.
9823 (xml_process_xincludes): Create a local xinclude_parsing_data
9824 instead of heap-allocating one. Create a local gdb_xml_parser
9825 instead of heap-allocating one with
9826 gdb_xml_create_parser_and_cleanup.
9827
d56060f0
JB
98282017-04-18 John Baldwin <jhb@FreeBSD.org>
9829
9830 PR threads/20743
9831 * fbsd-nat.c (resume_one_thread_cb): Remove.
9832 (resume_all_threads_cb): Remove.
9833 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9834 iterate_over_threads.
9835
305d16a9
JB
98362017-04-17 Joel Brobecker <brobecker@adacore.com>
9837
9838 * NEWS: Create a new section for the next release branch.
9839 Rename the section of the current branch, now that it has
9840 been cut.
9841
8bb57231
JB
98422017-04-17 Joel Brobecker <brobecker@adacore.com>
9843
9844 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9845 * version.in: Bump version to 8.0.50.DATE-git.
9846
096c92dd
SDJ
98472017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9848
9849 PR gdb/21385
9850 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9851 independently of the host, and fix build breakage on Cygwin.
9852
0550c955
PA
98532017-04-13 Pedro Alves <palves@redhat.com>
9854
9855 * inferior.c (free_inferior): Convert to ...
9856 (inferior::~inferior): ... this dtor.
9857 (inferior::inferior): New ctor, factored out from ...
9858 (add_inferior_silent): ... here. Allocate the inferior with a new
9859 expression.
9860 (delete_inferior): Call delete instead of free_inferior.
9861 * inferior.h (gdb_environ, continuation): Forward declare.
9862 (inferior): Now a class. Add in-class initialization to all
9863 members. Make boolean fields bool, except 'detaching'.
9864 (inferior::inferior): New explicit ctor.
9865 (inferior::~inferior): New.
9866
e3d60dfc
PA
98672017-04-13 Pedro Alves <palves@redhat.com>
9868
9869 * inferior.c (init_inferior_list): Delete.
9870 * inferior.h (init_inferior_list): Delete.
9871
5fd69d0a
PA
98722017-04-13 Pedro Alves <palves@redhat.com>
9873
9874 PR threads/13217
9875 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9876 (top level): Call it twice, with different thread sets.
9877
c6609450
PA
98782017-04-13 Pedro Alves <palves@redhat.com>
9879
9880 * thread.c: Include <algorithm>.
9881 (thread_array_cleanup): Delete.
9882 (scoped_inc_dec_ref): New class.
9883 (live_threads_count): New function.
9884 (set_thread_refcount): Delete.
9885 (tp_array_compar_ascending): Now a bool.
9886 (tp_array_compar): Convert to a std::sort comparison function.
9887 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9888 and live_threads_count.
9889
2a00d7ce
PA
98902017-04-13 Pedro Alves <palves@redhat.com>
9891
9892 * infrun.c (follow_fork_inferior): Also switch the current
9893 inferior.
9894
441d7c93
PA
98952017-04-13 Pedro Alves <palves@redhat.com>
9896
9897 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9898 before calling create_internal_breakpoint.
9899
808480f6
PA
99002017-04-13 Pedro Alves <palves@redhat.com>
9901
9902 * fork-child.c (execv_argv): New class.
9903 (breakup_args): Refactored as ...
9904 (execv_argv::init_for_no_shell): .. this method of execv_argv.
9905 Copy arguments to storage and replace separators with NULL
9906 terminators in place.
9907 (escape_bang_in_quoted_argument): Adjust to return bool.
9908 (execv_argv::execv_argv): New ctor.
9909 (execv_argv::init_for_shell): New method, factored out from
9910 fork_inferior. Don't strdup strings into the vector.
9911 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
9912 Remove free_vector_argv call.
9913
ad3d022a
YQ
99142017-04-13 Yao Qi <yao.qi@linaro.org>
9915
9916 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
9917 tdep->rx_psw_type.
9918
e6ddc3bf
YQ
99192017-04-13 Yao Qi <yao.qi@linaro.org>
9920
9921 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
9922 * rx-tdep.c (rx_gdbarch_init): Likewise.
9923
bfb8cf90
PA
99242017-04-13 Pedro Alves <palves@redhat.com>
9925
9926 * breakpoint.h (struct breakpoint): Reindent.
9927
f5336ca5
PA
99282017-04-13 Pedro Alves <palves@redhat.com>
9929
9930 * breakpoint.c (bp_location): Rename to ...
9931 (bp_locations): ... this. All references updated.
9932 (bp_location_count): Rename to ...
9933 (bp_locations_count): ... this. All references updated.
9934 (bp_location_placed_address_before_address_max): Rename to ...
9935 (bp_locations_placed_address_before_address_max): ... this. All
9936 references updated.
9937 (bp_location_shadow_len_after_address_max): Rename to ...
9938 (bp_locations_shadow_len_after_address_max): ... this. All
9939 references updated.
9940 (bp_location_compare_addrs): Rename to ...
9941 (bp_locations_compare_addrs): ... this. All references updated.
9942 (bp_location_compare):Rename to ...
9943 (bp_locations_compare): ... this. All references updated.
9944 (bp_location_target_extensions_update): Rename to ...
9945 (bp_locations_target_extensions_update): ... this. All references
9946 updated.
9947
be628ab8
SDJ
99482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
9949
9950 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
9951 * common/common.m4: Check headers 'termios.h', 'termio.h' and
9952 'sgtty.h'.
9953 * common/gdb_termios.h: New file, with parts of "terminal.h".
9954 * inflow.c: Include "gdb_termios.h".
9955 * ser-unix.c: Include "gdb_termios.h".
9956 * terminal.h: Move terminal-related defines to
9957 "common/gdb_termios.h".
9958
8e9e35b1
TT
99592017-04-12 Tom Tromey <tom@tromey.com>
9960
9961 * probe.c (parse_probes): Update.
9962 * location.h (delete_event_location): Don't declare.
9963 (event_location_deleter::operator()): Update.
9964 * location.c (event_location_deleter::operator()): Rename from
9965 delete_event_location.
9966 * linespec.h (linespec_result) <location>: Change type to
9967 event_location_up.
9968 * linespec.c (canonicalize_linespec, event_location_to_sals)
9969 (decode_objc): Update.
9970 (linespec_result): Don't call delete_event_location.
9971 * breakpoint.c (create_breakpoints_sal)
9972 (bkpt_probe_create_sals_from_location)
9973 (strace_marker_create_sals_from_location): Update.
9974
16e802b9
TT
99752017-04-12 Tom Tromey <tom@tromey.com>
9976
9977 * linespec.h (struct linespec_result): Add constructor and
9978 destructor.
9979 (init_linespec_result, destroy_linespec_result)
9980 (make_cleanup_destroy_linespec_result): Don't declare.
9981 * linespec.c (init_linespec_result): Remove.
9982 (linespec_result::~linespec_result): Rename from
9983 destroy_linespec_result. Update.
9984 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
9985 Remove.
9986 * breakpoint.c (create_breakpoint, break_range_command)
9987 (decode_location_default): Update.
9988 * ax-gdb.c (agent_command_1): Update.
9989
d28cd78a
TT
99902017-04-12 Tom Tromey <tom@tromey.com>
9991
9992 * remote.c (remote_download_tracepoint): Update.
9993 * python/py-breakpoint.c (bppy_get_location): Update.
9994 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
9995 (gdbscm_breakpoint_location): Update.
9996 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
9997 * breakpoint.h (struct breakpoint) <location, location_range_end>:
9998 Change type to event_location_up.
9999 * breakpoint.c (create_overlay_event_breakpoint)
10000 (create_longjmp_master_breakpoint)
10001 (create_std_terminate_master_breakpoint)
10002 (create_exception_master_breakpoint)
10003 (breakpoint_event_location_empty_p, print_breakpoint_location)
10004 (print_one_breakpoint_location, create_thread_event_breakpoint)
10005 (init_breakpoint_sal, create_breakpoint)
10006 (print_recreate_ranged_breakpoint, break_range_command)
10007 (init_ada_exception_breakpoint, say_where): Update.
10008 (base_breakpoint_dtor): Don't call delete_event_location.
10009 (bkpt_print_recreate, tracepoint_print_recreate)
10010 (dprintf_print_recreate, update_static_tracepoint)
10011 (breakpoint_re_set_default): Update.
10012
711799d5
TT
100132017-04-12 Tom Tromey <tom@tromey.com>
10014
10015 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10016 type of "to_do". Update.
10017 (compute_stack_depth): Use std::vector.
10018
52d214d3
TT
100192017-04-12 Tom Tromey <tom@tromey.com>
10020
10021 * printcmd.c (find_instruction_backward): Use std::vector.
10022
4c404b8b
TT
100232017-04-12 Tom Tromey <tom@tromey.com>
10024
10025 * symfile.c (objfilep): Remove typedef.
10026 (reread_symbols): Use a std::vector.
10027
156d9eab
TT
100282017-04-12 Tom Tromey <tom@tromey.com>
10029
10030 * mi/mi-main.c (exec_direction_forward): Remove.
10031 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10032 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10033 scoped_restore.
10034 * guile/guile.c (guile_repl_command, guile_command)
10035 (gdbscm_execute_gdb_command): Use scoped_restore.
10036 * go-exp.y (go_parse): Use scoped_restore.
10037 * d-exp.y (d_parse): Use scoped_restore.
10038 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10039 * c-exp.y (c_parse): Use scoped_restore.
10040
4d89769a
TT
100412017-04-12 Tom Tromey <tom@tromey.com>
10042
10043 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10044 (mi_parse): Update return type.
10045 (mi_parse_free): Remove.
10046 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10047 (mi_parse::~mi_parse): Rename from mi_parse_free.
10048 (mi_parse_cleanup): Remove.
10049 (mi_parse): Return a unique_ptr. Use new.
10050 * mi/mi-main.c (mi_execute_command): Update.
10051
4b217cc7
TT
100522017-04-12 Tom Tromey <tom@tromey.com>
10053
10054 * location.c (explicit_location_lex_one): Return a
10055 unique_xmalloc_ptr.
10056 (string_to_explicit_location): Update. Remove cleanups.
10057
59d3651b
TT
100582017-04-12 Tom Tromey <tom@tromey.com>
10059
10060 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10061 (compare_value_and_voffset): Change type. Update.
10062 (compute_vtable_size): Change type of "offset_vec".
10063 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10064 (gnuv3_get_typeid): Remove extraneous declaration.
10065
b24b0d6c
TT
100662017-04-12 Tom Tromey <tom@tromey.com>
10067
10068 * charset.h (wchar_iterator): Fix comment.
10069
80a3b8c5
TT
100702017-04-12 Tom Tromey <tom@tromey.com>
10071
10072 * charset.c (iconv_wrapper): New class.
10073 (cleanup_iconv): Remove.
10074 (convert_between_encodings): Use it.
10075
c83dd867
TT
100762017-04-12 Tom Tromey <tom@tromey.com>
10077
10078 * symfile.h (increment_reading_symtab): Update type.
10079 * symfile.c (decrement_reading_symtab): Remove.
10080 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10081 * psymtab.c (psymtab_to_symtab): Update.
10082 * dwarf2read.c (dw2_instantiate_symtab): Update.
10083
0e8621a0
TT
100842017-04-12 Tom Tromey <tom@tromey.com>
10085
10086 * jit.c (struct jit_reader): Declare separately. Add constructor
10087 and destructor. Change type of "handle".
10088 (loaded_jit_reader): Define separately.
10089 (jit_reader_load): Update. New "new".
10090 (jit_reader_unload_command): Use "delete".
10091 * gdb-dlfcn.h (struct dlclose_deleter): New.
10092 (gdb_dlhandle_up): New typedef.
10093 (gdb_dlopen, gdb_dlsym): Update types.
10094 (gdb_dlclose): Remove.
10095 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10096 (gdb_dlsym): Change type of "handle".
10097 (make_cleanup_dlclose): Remove.
10098 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10099 * compile/compile-c-support.c (load_libcc): Update.
10100
67d89901
TT
101012017-04-12 Tom Tromey <tom@tromey.com>
10102
10103 * symtab.h (find_pcs_for_symtab_line): Change return type.
10104 * symtab.c (find_pcs_for_symtab_line): Change return type.
10105 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10106 type of "vec". Update.
10107 (ltpy_get_pcs_for_line): Update.
10108 * linespec.c (decode_digits_ordinary): Update.
10109
93921405
TT
101102017-04-12 Tom Tromey <tom@tromey.com>
10111
10112 * tracepoint.c (actions_command): Update.
10113 * python/python.c (python_command, python_interactive_command):
10114 Update.
10115 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10116 * guile/guile.c (guile_command): Update.
10117 * defs.h (read_command_lines, read_command_lines_1): Return
10118 command_line_up.
10119 (command_lines_deleter): New struct.
10120 (command_line_up): New typedef.
10121 * compile/compile.c (compile_code_command)
10122 (compile_print_command): Update.
10123 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10124 command_line_up.
10125 (make_cleanup_free_command_lines): Remove.
10126 * cli/cli-script.c (get_command_line, read_command_lines_1)
10127 (copy_command_lines): Return command_line_up.
10128 (while_command, if_command, read_command_lines, define_command)
10129 (document_command): Update.
10130 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10131 Remove.
10132 * breakpoint.h (breakpoint_set_commands): Change type of
10133 "commands".
10134 * breakpoint.c (breakpoint_set_commands): Change type of
10135 "commands". Update.
10136 (do_map_commands_command, update_dprintf_command_list)
10137 (create_tracepoint_from_upload): Update.
10138
ffc2605c
TT
101392017-04-12 Tom Tromey <tom@tromey.com>
10140
10141 * tracepoint.c (scope_info): Update.
10142 * spu-tdep.c (spu_catch_start): Update.
10143 * python/python.c (gdbpy_decode_line): Update.
10144 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10145 * python/py-breakpoint.c (bppy_init): Update.
10146 * probe.c (parse_probes): Update.
10147 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10148 * location.h (event_location_deleter): New struct.
10149 (event_location_up): New typedef.
10150 (new_linespec_location, new_address_location, new_probe_location)
10151 (new_explicit_location, copy_event_location)
10152 (string_to_event_location, string_to_event_location_basic)
10153 (string_to_explicit_location): Update return type.
10154 (make_cleanup_delete_event_location): Remove.
10155 * location.c (new_linespec_location, new_address_location)
10156 (new_probe_location, new_explicit_location, copy_event_location):
10157 Return event_location_up.
10158 (delete_event_location_cleanup)
10159 (make_cleanup_delete_event_location): Remove.
10160 (string_to_explicit_location, string_to_event_location_basic)
10161 (string_to_event_location): Return event_location_up.
10162 * linespec.c (canonicalize_linespec, event_location_to_sals)
10163 (decode_line_with_current_source)
10164 (decode_line_with_last_displayed, decode_objc): Update.
10165 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10166 * completer.c (location_completer): Update.
10167 * cli/cli-cmds.c (edit_command, list_command): Update.
10168 * breakpoint.c (create_overlay_event_breakpoint)
10169 (create_longjmp_master_breakpoint)
10170 (create_std_terminate_master_breakpoint)
10171 (create_exception_master_breakpoint)
10172 (create_thread_event_breakpoint): Update.
10173 (init_breakpoint_sal): Update. Remove some dead code.
10174 (create_breakpoint_sal): Change type of "location". Update.
10175 (create_breakpoints_sal, create_breakpoint, break_command_1)
10176 (dprintf_command, break_range_command, until_break_command)
10177 (init_ada_exception_breakpoint)
10178 (strace_marker_create_sals_from_location)
10179 (update_static_tracepoint, trace_command, ftrace_command)
10180 (strace_command, create_tracepoint_from_upload): Update.
10181 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10182 * ax-gdb.c (agent_command_1): Update.
10183
8f10c932
PA
101842017-04-12 Pedro Alves <palves@redhat.com>
10185
10186 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10187 * configure.tgt: Handle i[34567]86-*-go32* and
10188 i[34567]86-*-msdosdjgpp*.
10189 * i386-tdep.c (i386_svr4_reg_to_regnum):
10190 Make extern.
10191 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10192 i386-go32-tdep.c.
10193 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10194 * i386-go32-tdep.c: New file.
10195 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10196 declarations.
10197
0a31ccfb
SM
101982017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10199
10200 * aix-thread.c (pd_status2str): Change return type to const char *.
10201
e9bb3fbb
PA
102022017-04-12 Pedro Alves <palves@redhat.com>
10203
10204 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10205 calls to set_gdbarch_gnu_triplet_regexp.
10206
53375380
PA
102072017-04-12 Pedro Alves <palves@redhat.com>
10208
10209 PR gdb/21323
10210 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10211 New enum value.
10212 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10213 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10214 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10215 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10216 * gdbarch.h, gdbarch.c: Regenerate.
10217 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10218 gdbarch_wchar_bit and gdbarch_wchar_signed.
10219 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10220 * arm-tdep.c (arm_gdbarch_init): Likewise.
10221 * avr-tdep.c (avr_gdbarch_init): Likewise.
10222 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10223 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10224 * i386-tdep.c (i386_go32_init_abi): Likewise.
10225 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10226 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10227 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10228 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10229 * sh-tdep.c (sh_gdbarch_init): Likewise.
10230 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10231 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10232 * windows-tdep.c (windows_init_abi): Likewise.
10233 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10234
53e710ac
PA
102352017-04-12 Pedro Alves <palves@redhat.com>
10236
10237 PR c++/21323
10238 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10239 cplus_primitive_type_char32_t>: New enum values.
10240 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10241 and cplus_primitive_type_char32_t.
10242 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10243 32, use the archtecture's built-in type for char16_t and char32_t,
10244 respectively. Otherwise, fallback to init_integer_type as before,
10245 but make the type unsigned, and issue a complaint.
10246 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10247
ab0538b8
AH
102482017-04-12 Alan Hayward <alan.hayward@arm.com>
10249
5e0e0422 10250 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
10251 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10252
5430098f
SDJ
102532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10254
10255 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10256 'const char *'.
10257
7c5ded6a
SDJ
102582017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10259
10260 * common/common-utils.c (free_vector_argv): New function.
10261 * common/common-utils.h: Include <vector>.
10262 (free_vector_argv): New prototype.
10263 * darwin-nat.c (darwin_create_inferior): Rewrite function
10264 prototype in order to constify "exec_file" and accept a
10265 "std::string" for "allargs".
10266 * fork-child.c: Include <vector>.
10267 (breakup_args): Rewrite function, using C++.
10268 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10269 and accept "std::string" for "allargs". Update the code to
10270 calculate "argv" based on "allargs". Update calls to "exec_fun"
10271 and "execvp".
10272 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10273 order to constify "exec_file" and accept a "std::string" for
10274 "allargs".
10275 * go32-nat.c (go32_create_inferior): Likewise.
10276 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10277 * infcmd.c (run_command_1): Constify "exec_file". Use
10278 "std::string" for inferior arguments.
10279 * inferior.h (fork_inferior): Update prototype.
10280 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10281 prototype in order to constify "exec_file" and accept a
10282 "std::string" for "allargs".
10283 * nto-procfs.c (procfs_create_inferior): Likewise.
10284 * procfs.c (procfs_create_inferior): Likewise.
10285 * remote-sim.c (gdbsim_create_inferior): Likewise.
10286 * remote.c (extended_remote_run): Update code to accept
10287 "std::string" as argument.
10288 (extended_remote_create_inferior): Rewrite function prototype in
10289 order to constify "exec_file" and accept a "std::string" for
10290 "allargs".
10291 * rs6000-nat.c (super_create_inferior): Likewise.
10292 (rs6000_create_inferior): Likewise.
10293 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10294 * windows-nat.c (windows_create_inferior): Likewise.
10295
ae0eee42
PA
102962017-04-11 Pedro Alves <palves@redhat.com>
10297
10298 * thread.c: Fix whitespace throughout.
10299
a6acac06
PR
103002017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10301
10302 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10303
64403bd1
AH
103042017-04-11 Alan Hayward <alan.hayward@arm.com>
10305
10306 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10307
a5bef50f
SDJ
103082017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10309
10310 PR gdb/21364
10311 * osdata.c (info_osdata): Check if 'type' is an empty string
10312 instead of NULL.
10313
9295a5a9
PA
103142017-04-10 Pedro Alves <palves@redhat.com>
10315
10316 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10317 (ptid_to_global_thread_id, in_thread_list)
10318 (do_captured_list_thread_ids, set_resumed, set_running)
10319 (set_executing, set_stop_requested, finish_thread_state)
10320 (validate_registers_access, can_access_registers_ptid)
10321 (print_thread_info_1, switch_to_thread)
10322 (do_restore_current_thread_cleanup)
10323 (make_cleanup_restore_current_thread, thread_command)
10324 (thread_name_command): Use operator== instead of ptid_equal.
10325
996812e3
PA
103262017-04-10 Pedro Alves <palves@redhat.com>
10327
10328 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10329 (current_thread_cleanup_chain): Delete.
10330 (restore_current_thread_cleanup_dtor)
10331 (make_cleanup_restore_current_thread): Remove references to
10332 current_thread_cleanup_chain.
10333
845b344f
AH
103342017-04-10 Alan Hayward <alan.hayward@arm.com>
10335
10336 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10337 REG_UNKNOWN.
10338
803bdfe4
YQ
103392017-04-10 Yao Qi <yao.qi@linaro.org>
10340
10341 PR gdb/19942
10342 * gdbthread.h (thread_info::deletable): New method.
10343 (thread_info::incref): New method.
10344 (thread_info::decref): New method.
10345 (thread_info::refcount): Move it to private.
10346 * infrun.c (save_stop_context): Call inc_refcount.
10347 (release_stop_context_cleanup): Likewise.
10348 * thread.c (set_thread_exited): New function.
10349 (init_thread_list): Delete "tp" only it is deletable, otherwise
10350 call set_thread_exited.
10351 (delete_thread_1): Call set_thread_exited.
10352 (current_thread_cleanup) <inferior_pid>: Remove.
10353 <thread>: New field.
10354 (restore_current_thread_ptid_changed): Removed.
10355 (do_restore_current_thread_cleanup): Adjust.
10356 (restore_current_thread_cleanup_dtor): Don't call
10357 find_thread_ptid.
10358 (set_thread_refcount): Use dec_refcount.
10359 (make_cleanup_restore_current_thread): Adjust.
10360 (thread_apply_all_command): Call inc_refcount.
10361 (_initialize_thread): Don't call
10362 observer_attach_thread_ptid_changed.
10363
8c25b497
YQ
103642017-04-10 Yao Qi <yao.qi@linaro.org>
10365
10366 * thread.c (delete_thread_1): Hoist code on marking thread as
10367 exited.
10368
8473b447
SM
103692017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10370
10371 * windows-nat.c (windows_detach): Initialize ptid with
10372 minus_one_ptid.
10373
6670ec13
SM
103742017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10375
10376 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10377
ba2f91bb
AH
103782017-04-07 Alan Hayward <alan.hayward@arm.com>
10379
10380 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10381 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10382 (bfin_pseudo_register_write): Likewise
10383
436252de
SM
103842017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10385
10386 * common/ptid.h (struct ptid): Change to...
10387 (class ptid_t): ... this.
10388 <ptid_t>: New constructors.
10389 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10390 matches>: New methods.
10391 <make_null, make_minus_one>: New static methods.
10392 <pid>: Rename to...
10393 <m_pid>: ...this.
10394 <lwp>: Rename to...
10395 <m_lwp>: ...this.
10396 <tid>: Rename to...
10397 <m_tid>: ...this.
10398 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10399 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10400 as references, move comment to class ptid_t.
10401 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10402 ptid_t static methods.
10403 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10404 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10405 Take ptid arguments as references, implement using ptid_t methods.
10406 * unittests/ptid-selftests.c: New file.
10407 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10408 unittests/ptid-selftests.c.
10409 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10410
0dedf377
TP
104112017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10412
10413 * python/python.c (python_run_simple_file): Cast mode literal to
10414 non-const char pointer as expected by PyFile_FromString.
10415
4e9868d4
SM
104162017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10417
10418 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10419 minus_one_ptid and null_ptid.
10420
9bf2a700
PA
104212017-04-05 Pedro Alves <palves@redhat.com>
10422
10423 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10424 * configure: Regenerate.
10425
a121b7c1
PA
104262017-04-05 Pedro Alves <palves@redhat.com>
10427
10428 * ada-exp.y (yyerror): Constify.
10429 * ada-lang.c (bound_name, get_selections)
10430 (ada_variant_discrim_type)
10431 (ada_variant_discrim_name, ada_value_struct_elt)
10432 (ada_lookup_struct_elt_type, is_unchecked_variant)
10433 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10434 (catch_ada_exception_command_split)
10435 (catch_ada_assert_command_split, catch_assert_command)
10436 (ada_op_name): Constify.
10437 * ada-lang.h (ada_yyerror, get_selections)
10438 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10439 * arc-tdep.c (arc_print_frame_cache): Constify.
10440 * arm-tdep.c (arm_skip_stub): Constify.
10441 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10442 (gen_aggregate_elt_ref): Constify.
10443 * bcache.c (print_bcache_statistics): Constify.
10444 * bcache.h (print_bcache_statistics): Constify.
10445 * break-catch-throw.c (catch_exception_command_1):
10446 * breakpoint.c (struct ep_type_description::description):
10447 Constify.
10448 (add_solib_catchpoint): Constify.
10449 (catch_fork_command_1): Add cast.
10450 (add_catch_command): Constify.
10451 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10452 Constify.
10453 * bsd-uthread.c (bsd_uthread_state): Constify.
10454 * buildsym.c (patch_subfile_names): Constify.
10455 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10456 Constify.
10457 * c-exp.y (yyerror): Constify.
10458 (token::oper): Constify.
10459 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10460 * c-varobj.c (cplus_describe_child): Constify.
10461 * charset.c (find_charset_names): Add cast.
10462 (find_charset_names): Constify array and add const_cast.
10463 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10464 (edit_command): Constify.
10465 * cli/cli-decode.c (lookup_cmd): Constify.
10466 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10467 Constify.
10468 (struct dump_context): Constify.
10469 (add_dump_command, restore_command): Constify.
10470 * cli/cli-script.c (get_command_line): Constify.
10471 * cli/cli-script.h (get_command_line): Constify.
10472 * cli/cli-utils.c (check_for_argument): Constify.
10473 * cli/cli-utils.h (check_for_argument): Constify.
10474 * coff-pe-read.c (struct read_pe_section_data): Constify.
10475 * command.h (lookup_cmd): Constify.
10476 * common/print-utils.c (decimal2str): Constify.
10477 * completer.c (gdb_print_filename): Constify.
10478 * corefile.c (set_gnutarget): Constify.
10479 * cp-name-parser.y (yyerror): Constify.
10480 * cp-valprint.c (cp_print_class_member): Constify.
10481 * cris-tdep.c (cris_register_name, crisv32_register_name):
10482 Constify.
10483 * d-exp.y (yyerror): Constify.
10484 (struct token::oper): Constify.
10485 * d-lang.h (d_yyerror): Constify.
10486 * dbxread.c (struct header_file_location::name): Constify.
10487 (add_old_header_file, add_new_header_file, last_function_name)
10488 (dbx_next_symbol_text, add_bincl_to_list)
10489 (find_corresponding_bincl_psymtab, set_namestring)
10490 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10491 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10492 * defs.h (command_line_input, print_address_symbolic)
10493 (deprecated_readline_begin_hook): Constify.
10494 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10495 Constify.
10496 * event-top.c (handle_line_of_input): Constify and add cast.
10497 * exceptions.c (catch_errors): Constify.
10498 * exceptions.h (catch_errors): Constify.
10499 * expprint.c (print_subexp_standard, op_string, op_name)
10500 (op_name_standard, dump_raw_expression, dump_raw_expression):
10501 * expression.h (op_name, op_string, dump_raw_expression):
10502 Constify.
10503 * f-exp.y (yyerror): Constify.
10504 (struct token::oper): Constify.
10505 (struct f77_boolean_val::name): Constify.
10506 * f-lang.c (f_word_break_characters): Constify.
10507 * f-lang.h (f_yyerror): Constify.
10508 * fork-child.c (fork_inferior): Add cast.
10509 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10510 (new_variant): Constify.
10511 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10512 * gdbarch.c: Regenerate.
10513 * gdbcore.h (set_gnutarget): Constify.
10514 * go-exp.y (yyerror): Constify.
10515 (token::oper): Constify.
10516 * go-lang.h (go_yyerror): Constify.
10517 * go32-nat.c (go32_sysinfo): Constify.
10518 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10519 * guile/scm-cmd.c (cmdscm_function): Constify.
10520 * guile/scm-param.c (pascm_param_value): Constify.
10521 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10522 (h8300sx_register_name): Constify.
10523 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10524 Constify.
10525 * ia64-tdep.c (ia64_register_names): Constify.
10526 * infcmd.c (construct_inferior_arguments): Constify.
10527 (path_command, attach_post_wait): Constify.
10528 * language.c (show_range_command, show_case_command)
10529 (unk_lang_error): Constify.
10530 * language.h (language_defn::la_error)
10531 (language_defn::la_name_of_this): Constify.
10532 * linespec.c (decode_line_2): Constify.
10533 * linux-thread-db.c (thread_db_err_str): Constify.
10534 * lm32-tdep.c (lm32_register_name): Constify.
10535 * m2-exp.y (yyerror): Constify.
10536 * m2-lang.h (m2_yyerror): Constify.
10537 * m32r-tdep.c (m32r_register_names): Constify and make static.
10538 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10539 * m88k-tdep.c (m88k_register_name): Constify.
10540 * macroexp.c (appendmem): Constify.
10541 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10542 (upgrade_type, parse_external, parse_partial_symbols)
10543 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10544 (new_symbol): Constify.
10545 * memattr.c (mem_info_command): Constify.
10546 * mep-tdep.c (register_name_from_keyword): Constify.
10547 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10548 Constify.
10549 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10550 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10551 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10552 cast.
10553 (mi_execute_async_cli_command): Constify.
10554 * mips-tdep.c (mips_register_name): Constify.
10555 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10556 (am33_register_name, am33_2_register_name)
10557 * moxie-tdep.c (moxie_register_names): Constify.
10558 * nat/linux-osdata.c (osdata_type): Constify fields.
10559 * nto-tdep.c (nto_parse_redirection): Constify.
10560 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10561 (lookup_child_selector): Constify.
10562 (objc_methcall::name): Constify.
10563 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10564 (lookup_struct_typedef): Constify.
10565 * objfiles.c (pc_in_section): Constify.
10566 * objfiles.h (pc_in_section): Constify.
10567 * p-exp.y (struct token::oper): Constify.
10568 (yyerror): Constify.
10569 * p-lang.h (pascal_yyerror): Constify.
10570 * parser-defs.h (op_name_standard): Constify.
10571 (op_print::string): Constify.
10572 (exp_descriptor::op_name): Constify.
10573 * printcmd.c (print_address_symbolic): Constify.
10574 * psymtab.c (print_partial_symbols): Constify.
10575 * python/py-breakpoint.c (stop_func): Constify.
10576 (bppy_get_expression): Constify.
10577 * python/py-cmd.c (cmdpy_completer::name): Constify.
10578 (cmdpy_function): Constify.
10579 * python/py-event.c (evpy_add_attribute)
10580 (gdbpy_initialize_event_generic): Constify.
10581 * python/py-event.h (evpy_add_attribute)
10582 (gdbpy_initialize_event_generic): Constify.
10583 * python/py-evts.c (add_new_registry): Constify.
10584 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10585 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10586 * python/py-inferior.c (get_buffer): Add cast.
10587 * python/py-param.c (parm_constant::name): Constify.
10588 * python/py-unwind.c (fprint_frame_id): Constify.
10589 * python/python.c (gdbpy_parameter_value): Constify.
10590 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10591 * remote.c (memory_packet_config::name): Constify.
10592 (show_packet_config_cmd, remote_write_bytes)
10593 (remote_buffer_add_string):
10594 * reverse.c (exec_reverse_once): Constify.
10595 * rs6000-tdep.c (variant::name, variant::description): Constify.
10596 * rust-exp.y (rustyyerror): Constify.
10597 * rust-lang.c (rust_op_name): Constify.
10598 * rust-lang.h (rustyyerror): Constify.
10599 * serial.h (serial_ops::name): Constify.
10600 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10601 (sh_sh3e_register_name, sh_sh2e_register_name)
10602 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10603 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10604 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10605 (sh_sh4al_dsp_register_name): Constify.
10606 * sh64-tdep.c (sh64_register_name): Constify.
10607 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10608 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10609 * stabsread.c (patch_block_stabs, read_type_number)
10610 (ref_map::stabs, ref_add, process_reference)
10611 (symbol_reference_defined, define_symbol, define_symbol)
10612 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10613 (read_one_struct_field, read_struct_fields, read_baseclasses)
10614 (read_tilde_fields, read_struct_type, read_array_type)
10615 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10616 (read_huge_number, read_range_type, read_args, common_block_start)
10617 (find_name_end): Constify.
10618 * stabsread.h (common_block_start, define_symbol)
10619 (process_one_symbol, symbol_reference_defined, ref_add):
10620 * symfile.c (get_section_index, add_symbol_file_command):
10621 * symfile.h (get_section_index): Constify.
10622 * target-descriptions.c (tdesc_type::name): Constify.
10623 (tdesc_free_type): Add cast.
10624 * target.c (find_default_run_target):
10625 (add_deprecated_target_alias, find_default_run_target)
10626 (target_announce_detach): Constify.
10627 (do_option): Constify.
10628 * target.h (add_deprecated_target_alias): Constify.
10629 * thread.c (print_thread_info_1): Constify.
10630 * top.c (deprecated_readline_begin_hook, command_line_input):
10631 Constify.
10632 (init_main): Add casts.
10633 * top.h (handle_line_of_input): Constify.
10634 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10635 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10636 (tfind_command): Rename to ...
10637 (tfind_command_1): ... this and constify.
10638 (tfind_command): New function.
10639 (tfind_end_command, tfind_start_command): Adjust.
10640 (encode_source_string): Constify.
10641 * tracepoint.h (encode_source_string): Constify.
10642 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10643 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10644 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10645 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10646 * tui/tui-win.c (parse_scrolling_args): Constify.
10647 * tui/tui-windata.c (tui_erase_data_content): Constify.
10648 * tui/tui-windata.h (tui_erase_data_content): Constify.
10649 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10650 * tui/tui.c (tui_enable): Add cast.
10651 * utils.c (defaulted_query): Constify.
10652 (init_page_info): Add cast.
10653 (puts_debug, subset_compare): Constify.
10654 * utils.h (subset_compare): Constify.
10655 * varobj.c (varobj_format_string): Constify.
10656 * varobj.h (varobj_format_string): Constify.
10657 * vax-tdep.c (vax_register_name): Constify.
10658 * windows-nat.c (windows_detach): Constify.
10659 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10660 * xml-support.c (gdb_xml_end_element): Constify.
10661 * xml-tdesc.c (tdesc_start_reg): Constify.
10662 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10663 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10664 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10665
995816ba
PA
106662017-04-05 Pedro Alves <palves@redhat.com>
10667
10668 * proc-api.c (struct trans): Constify.
10669 (procfs_note): Constify.
10670 * proc-events.c (struct trans, syscall_table):
10671 * proc-flags.c (struct trans): Constify.
10672 * proc-utils.h (procfs_note): Constify.
10673 * proc-why.c (struct trans): Constify.
10674 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10675 (procfs_detach): Constify.
10676 * sol-thread.c (struct string_map): Constify.
10677 (td_err_string, td_state_string): Constify.
10678
3e83a920
PA
106792017-04-05 Pedro Alves <palves@redhat.com>
10680
10681 * proc-api.c (procfs_filename): Don't initialize
10682 procfs_filename.
10683 (prepare_to_trace): Assume procfs_filename is non-NULL.
10684 (_initialize_proc_api): Give procfs_filename a default value here.
10685
63160a43
PA
106862017-04-05 Pedro Alves <palves@redhat.com>
10687
10688 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10689 'cond_string' parameter.
10690 (extract_exception_regexp): Constify 'string' parameter.
10691 (catch_exception_command_1): Constify.
10692 * breakpoint.c (init_catchpoint)
10693 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10694 parameter.
10695 (ep_parse_optional_if_clause, catch_fork_command_1)
10696 (catch_exec_command_1): Constify.
10697 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10698 parameter.
10699 (ep_parse_optional_if_clause): Constify.
10700 * cli/cli-utils.c (remove_trailing_whitespace)
10701 (check_for_argument): Constify.
10702 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10703 non-const overload.
10704 (check_for_argument): Likewise.
10705
9b2eba3d
PA
107062017-04-05 Pedro Alves <palves@redhat.com>
10707
10708 * event-top.c (command_line_handler): Add cast to execute_command
10709 call.
10710 * record-btrace.c (cmd_record_btrace_bts_start)
10711 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10712 (cmd_record_btrace_start): Add cast to execute_command call.
10713 * record-full.c (record_full_goto_insn):
10714 * record.c (record_start, record_stop): Add cast to
10715 execute_command_to_string calls.
10716 (cmd_record_start): Add cast to execute_command calls.
10717
2adadf51
PA
107182017-04-05 Pedro Alves <palves@redhat.com>
10719
10720 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10721 static inline function.
10722 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10723 array and use gdb_PyArg_ParseTupleAndKeywords.
10724 * python/py-cmd.c (cmdpy_init): Likewise.
10725 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10726 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10727 (infpy_search_memory): Likewise.
10728 * python/py-objfile.c (objfpy_add_separate_debug_file)
10729 (gdbpy_lookup_objfile): Likewise.
10730 * python/py-symbol.c (gdbpy_lookup_symbol)
10731 (gdbpy_lookup_global_symbol): Likewise.
10732 * python/py-type.c (gdbpy_lookup_type): Likewise.
10733 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10734 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10735 Likewise.
10736
0d1f4ceb
PA
107372017-04-05 Pedro Alves <palves@redhat.com>
10738
10739 * python/python-internal.h (gdb_PyGetSetDef): New type.
10740 * python/py-block.c (block_object_getset)
10741 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10742 * python/py-event.c (event_object_getset)
10743 (finish_breakpoint_object_getset): Likewise.
10744 * python/py-inferior.c (inferior_object_getset): Likewise.
10745 * python/py-infthread.c (thread_object_getset): Likewise.
10746 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10747 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10748 * python/py-objfile.c (objfile_getset): Likewise.
10749 * python/py-progspace.c (pspace_getset): Likewise.
10750 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10751 Likewise.
10752 * python/py-record.c (recpy_record_getset): Likewise.
10753 * python/py-symbol.c (symbol_object_getset): Likewise.
10754 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10755 Likewise.
10756 * python/py-type.c (type_object_getset, field_object_getset):
10757 Likewise.
10758 * python/py-value.c (value_object_getset): Likewise.
10759
4d759979
PA
107602017-04-05 Pedro Alves <palves@redhat.com>
10761
10762 * python/python-internal.h (gdb_PyObject_CallMethod)
10763 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10764 New functions.
10765 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10766 (PySys_GetObject, PySys_SetPath): New macros.
10767
fdf9e36f
PA
107682017-04-05 Pedro Alves <palves@redhat.com>
10769
10770 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10771 info_osdata_command.
10772 * osdata.c (info_osdata_command): Rename to ...
10773 (info_osdata): ... this. Constify 'type' parameter, and remove
10774 the 'from_tty' parameter. Accept NULL TYPE.
10775 (info_osdata_command): New function.
10776 * osdata.h (info_osdata_command): Remove declaration.
10777 (info_osdata): New declaration.
10778
9f33b8b7
PA
107792017-04-05 Pedro Alves <palves@redhat.com>
10780
10781 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10782 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10783 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10784 parameter.
10785 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10786 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10787 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10788 parameter.
10789 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10790 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10791 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10792 (mi_cmd_file_list_exec_source_files)
10793 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10794 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10795 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10796 parameter.
10797 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10798 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10799 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10800 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10801 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10802 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10803 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10804 'command' parameter.
10805 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10806 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10807 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10808 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10809 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10810 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10811 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10812 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10813 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10814 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10815 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10816 parameter.
10817 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10818 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10819 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10820 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10821 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10822 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10823 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10824 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10825 (mi_cmd_data_list_changed_registers)
10826 (mi_cmd_data_write_register_values)
10827 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10828 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10829 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10830 (mi_cmd_list_features, mi_cmd_list_target_features)
10831 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10832 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10833 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10834 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10835 (mi_cmd_trace_frame_collected): Constify 'command'
10836 parameter.
10837 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10838 'command' parameter.
10839
67cb5b2d
PA
108402017-04-05 Pedro Alves <palves@redhat.com>
10841
10842 * ada-lang.c (ada_completer_word_break_characters): Now a const
10843 array.
10844 (ada_get_gdb_completer_word_break_characters): Constify.
10845 * completer.c (gdb_completer_command_word_break_characters)
10846 (gdb_completer_file_name_break_characters)
10847 (gdb_completer_quote_characters): Now const arrays.
10848 (get_gdb_completer_quote_characters): Constify.
10849 (set_rl_completer_word_break_characters): New function.
10850 (set_gdb_completion_word_break_characters)
10851 (complete_line_internal): Use it.
10852 * completer.h (get_gdb_completer_quote_characters): Constify.
10853 (set_rl_completer_word_break_characters): Declare.
10854 * f-lang.c (f_word_break_characters): Constify.
10855 * language.c (default_word_break_characters): Constify.
10856 * language.h (language_defn::la_word_break_characters): Constify.
10857 (default_word_break_characters): Constify.
10858 * top.c (init_main): Use set_rl_completer_word_break_characters.
10859
7a114964
PA
108602017-04-05 Pedro Alves <palves@redhat.com>
10861
10862 * aix-thread.c (aix_thread_pid_to_str)
10863 (aix_thread_extra_thread_info): Constify.
10864 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10865 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10866 (bsd_uthread_pid_to_str): Constify.
10867 * corelow.c (core_pid_to_str): Constify.
10868 * darwin-nat.c (darwin_pid_to_str): Constify.
10869 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10870 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10871 Constify.
10872 * gnu-nat.c (gnu_pid_to_str): Constify.
10873 * go32-nat.c (go32_pid_to_str): Constify.
10874 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10875 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10876 * inferior.c (inferior_pid_to_str): Constify.
10877 * linux-nat.c (linux_nat_pid_to_str): Constify.
10878 * linux-tdep.c (linux_core_pid_to_str): Constify.
10879 * linux-thread-db.c (thread_db_pid_to_str)
10880 (thread_db_extra_thread_info): Constify.
10881 * nto-tdep.c (nto_extra_thread_info): Constify.
10882 * nto-tdep.h (nto_extra_thread_info): Constify.
10883 * obsd-nat.c (obsd_pid_to_str): Constify.
10884 * procfs.c (procfs_pid_to_str): Constify.
10885 * ravenscar-thread.c (ravenscar_extra_thread_info)
10886 (ravenscar_pid_to_str): Constify.
10887 * remote-sim.c (gdbsim_pid_to_str): Constify.
10888 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10889 Constify.
10890 * sol-thread.c (solaris_pid_to_str): Constify.
10891 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10892 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10893 * target.c (default_pid_to_str, target_pid_to_str)
10894 (normal_pid_to_str, default_pid_to_str): Constify.
10895 * target.h (target_ops::to_pid_to_str)
10896 (target_ops::to_extra_thread_info): Constify.
10897 (target_pid_to_str, normal_pid_to_str): Constify.
10898 * windows-nat.c (windows_pid_to_str): Constify.
10899 * gdbarch.sh (core_pid_to_str): Constify.
10900 * target-delegates.c: Regenerate.
10901 * gdbarch.h, gdbarch.c: Regenerate.
10902
69bbf465
PA
109032017-04-05 Pedro Alves <palves@redhat.com>
10904
10905 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
10906 the memory of the temporary warning_pre_print override.
10907 * utils.c (warning_pre_print): Constify.
10908 * utils.h (warning_pre_print): Constify.
10909
be47f9e8
PA
109102017-04-05 Pedro Alves <palves@redhat.com>
10911
10912 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
10913 (shell_command): New function.
10914 (make_command): Use std::string.
10915 (init_cli_cmds): Register shell_command instead of shell_escape.
10916
bde6261a
PA
109172017-04-05 Pedro Alves <palves@redhat.com>
10918
10919 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
10920 * tracepoint.c (default_collect): Don't initialize.
10921
b38ef47f
PA
109222017-04-05 Pedro Alves <palves@redhat.com>
10923
10924 * macroexp.c (macro_buffer::shared): Now a bool.
10925 (init_buffer): Update.
10926 (init_shared_buffer): Constify 'addr' parameter.
10927 (substitute_args, expand, macro_expand, macro_expand_next): Remove
10928 casts.
10929
f995bbe8
PA
109302017-04-05 Pedro Alves <palves@redhat.com>
10931
10932 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
10933 * disasm.c (set_disassembler_options): Constify local.
10934 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
10935
4a596fe2
SDJ
109362017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
10937
10938 PR gdb/21352
10939 * tracefile.c (tsave_command): Fix argument parsing for '-r'
10940 option.
10941
2cad08ea
YQ
109422017-04-05 Yao Qi <yao.qi@linaro.org>
10943
10944 * frame.c (frame_unwind_register_unsigned): Call
10945 frame_unwind_register_value.
10946
55a98976
YQ
109472017-04-05 Yao Qi <yao.qi@linaro.org>
10948
10949 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
10950 Use gdb_test_multiple, and don't match anchor.
10951
4ac40124
PA
109522017-04-05 Pedro Alves <palves@redhat.com>
10953
10954 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
10955 (Write After Approval): Remove Simon Marchi.
10956
c053b654
PA
109572017-04-05 Pedro Alves <palves@redhat.com>
10958
10959 * common/gdb_optional.h (optional::optional): Make constexpr and
10960 initialize m_dummy.
10961
4c7bf4f9
JB
109622017-04-04 John Baldwin <jhb@FreeBSD.org>
10963
10964 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10965 (amd64fbsd_jmp_buf_reg_offset): Remove.
10966 (amd64fbsd_supply_uthread): Remove function.
10967 (amd64fbsd_collect_uthread): Remove function.
10968 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
10969 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
10970 (x86_64-*-freebsd*): Remove bsd-uthread.o.
10971 (fbsd-nat.c): Update comment.
10972 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
10973 (i386fbsd_jmp_buf_reg_offset): Remove.
10974 (i386fbsd_supply_uthread): Remove function.
10975 (i386fbsd_collect_uthread): Remove function.
10976 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
10977
1e1a8bef
JB
109782017-04-04 John Baldwin <jhb@FreeBSD.org>
10979
10980 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
10981 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
10982 * NEWS: Mention that support for FreeBSD/alpha was removed.
10983 * alpha-fbsd-tdep.c: Delete file.
10984 * config/alpha/fbsd.mh: Delete file.
10985 * configure.host: Delete alpha*-*-freebsd* and
10986 alpha*-*-kfreebsd*-gnu.
10987 * configure.tgt: Delete alpha*-*-freebsd* and
10988 alpha*-*-kfreebsd*-gnu.
10989
49907934
JB
109902017-04-04 John Baldwin <jhb@FreeBSD.org>
10991
10992 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
10993 amd64bsd_store_inferior_registers): Use ptid from regcache.
10994
6f77053d
PA
109952017-04-04 Pedro Alves <palves@redhat.com>
10996
10997 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
10998 data fields, make them private and add "m_" prefixes.
10999 (lnp_state_machine::lnp_state_machine): New ctor.
11000 (record_line, check_line_address, handle_set_discriminator)
11001 (handle_set_address, handle_advance_pc, handle_special_opcode)
11002 (handle_advance_line, handle_set_file, handle_negate_stmt)
11003 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11004 (end_sequence, advance_line): New methods.
11005 (m_gdbarch, m_record_lines_p): New fields.
11006 (lnp_reader_state): Delete.
11007 (dwarf_record_line): Rename to ...
11008 (lnp_state_machine::record_line): ... adjust.
11009 (init_lnp_state_machine): Delete.
11010 (lnp_state_machine::lnp_state_machine): New.
11011 (check_line_address): Rename to ...
11012 (lnp_state_machine::check_line_address): This.
11013 (dwarf_decode_lines_1): Remove reference to "reader_state".
11014 Adjust lnp_state_machine having a non-default ctor. Use bool.
11015 State machine internal state manipulation moved to
11016 lnp_state_machine methods.
11017
9c541725
PA
110182017-04-04 Pedro Alves <palves@redhat.com>
11019
11020 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11021 unittests/offset-type-selftests.c.
11022 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11023 * common/offset-type.h: New file.
11024 * common/preprocessor.h: New file.
11025 * common/traits.h: New file.
11026 * common/valid-expr.h: New file.
11027 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11028 sect_offset and cu_offset strong typedefs throughout.
11029 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11030 typedefs throughout.
11031 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11032 sect_offset and cu_offset strong typedefs throughout.
11033 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11034 typedefs throughout.
11035 * gdbtypes.h: Include "common/offset-type.h".
11036 (cu_offset): Now an offset type (strong typedef) instead of a
11037 struct.
11038 (sect_offset): Likewise.
11039 (union call_site_parameter_u): Rename "param_offset" field to
11040 "param_cu_off".
11041 * unittests/offset-type-selftests.c: New file.
11042
ecfb656c
PA
110432017-04-04 Pedro Alves <palves@redhat.com>
11044
11045 * common/underlying.h: New file.
11046 * dwarf2read.c: Include "common/gdb_optional.h" and
11047 "common/underlying.h".
11048 (dir_index, file_name_index): New types.
11049 (file_entry): Use them.
11050 (file_entry::include): Use to_underlying.
11051 (line_header::add_file_name): Use dir_index.
11052 (read_formatted_entries): Use gdb::optional. Read form before
11053 writting to file_entry.
11054 (dwarf_decode_line_header): Use dir_index.
11055 (lnp_state_machine::current_file): Use to_underlying.
11056 (lnp_state_machine::file): Change type to file_name_index.
11057 (dwarf_record_line): Use to_underlying.
11058 (init_lnp_state_machine): Use file_name_index.
11059 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11060
d194f1fe
PA
110612017-04-04 Pedro Alves <palves@redhat.com>
11062
11063 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11064 operator bool, has_value and get methods.
11065
fff8551c
PA
110662017-04-04 Pedro Alves <palves@redhat.com>
11067
11068 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11069 fields.
11070 (line_header): Initialize all data fields. Change type of
11071 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11072 Change type of include_dirs to std::vector<const char *>. Remove
11073 num_include_dirs, include_dirs_size. Change type of file_names to
11074 std::vector<file_entry>. Remove num_file_names, file_names_size.
11075 (line_header::line_header): New.
11076 (line_header::add_include_dir, line_header::add_file_name): New
11077 methods.
11078 (line_header::include_dir_at): Remove NULL check.
11079 (line_header::file_name_at): Add const overload.
11080 (line_header_up): New unique_ptr typedef.
11081 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11082 std::vector. Remove free_line_header call.
11083 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11084 free_line_header call.
11085 (free_cu_line_header): Delete.
11086 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11087 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11088 Adjust to use std::vector.
11089 (free_line_header): Delete.
11090 (free_line_header_voidp): Use delete.
11091 (add_include_dir): Replace with ...
11092 (line_header::add_include_dir): ... this method. Use std::vector.
11093 (add_file_name): Replace with ...
11094 (line_header::add_file_name): ... this method. Use std::vector.
11095 (add_include_dir_stub): Delete.
11096 (read_formatted_entries): Remove memset.
11097 (dwarf_decode_line_header): Return a line_header_up instead of a
11098 raw pointer. Remove cleanup handling. Pass lambdas to
11099 read_formatted_entries. Adjust to use line_header methods.
11100 (dwarf_decode_lines_1): Adjust to use line_header methods.
11101 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11102 use std::vector.
11103
d62a8ae2
SM
111042017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11105
11106 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11107 instead of struct ptid.
11108
db3a1dc7
AH
111092017-05-04 Alan Hayward <alan.hayward@arm.com>
11110
11111 * frame.c (get_frame_register_bytes): Unwind using value.
11112 (put_frame_register_bytes): Likewise.
11113
b1b45502
IB
111142017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11115
11116 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11117 aggregate-like.
11118
ec13808e
JK
111192017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11120
11121 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11122
12316564
YQ
111232017-03-29 Yao Qi <yao.qi@linaro.org>
11124
11125 * gdbthread.h (struct thread_info): Declare constructor and
11126 destructor. Add some in-class member initializers.
11127 * thread.c (free_thread): Remove.
11128 (init_thread_list): Call delete instead of free_thread.
11129 (new_thread): Call thread_info constructor.
11130 (thread_info::thread_info): New function.
11131 (thread_info::~thread_info): New function.
11132 (delete_thread_1): Call delete instead of free_thread.
11133 (make_cleanup_restore_current_thread): Move tp and frame to
11134 inner block.
11135
fe5f7374
AK
111362017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11137
11138 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11139 (arc_skip_prologue): Likewise.
11140 (arc_make_frame_cache): Likewise.
11141 (arc_pv_get_operand): New function.
11142 (arc_is_in_prologue): Likewise.
11143 (arc_analyze_prologue): Likewise.
11144 (arc_print_frame_cache): Likewise.
11145 (MAX_PROLOGUE_LENGTH): New constant.
11146
eea78757
AK
111472017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11148
11149 * configure.tgt: Add arc-insn.o.
11150 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11151 (dump_arc_instruction_command): New function.
11152 (arc_fprintf_disasm): Likewise.
11153 (arc_disassemble_info): Likewise.
11154 (arc_insn_get_operand_value): Likewise.
11155 (arc_insn_get_operand_value_signed): Likewise.
11156 (arc_insn_get_memory_base_reg): Likewise.
11157 (arc_insn_get_memory_offset): Likewise.
11158 (arc_insn_get_branch_target): Likewise.
11159 (arc_insn_dump): Likewise.
11160 (arc_insn_get_linear_next_pc): Likewise.
11161 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11162 (arc_disassemble_info): Likewise.
11163 (arc_insn_get_branch_target): Likewise.
11164 (arc_insn_get_linear_next_pc): Likewise.
11165 * NEWS: Mention new "maint print arc arc-instruction".
11166
3be78afd
AK
111672017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11168
11169 * arc-tdep (maintenance_print_arc_list): New variable.
11170 (maintenance_print_arc_command): New function.
11171
296ec4fa
AK
111722017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11173
11174 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11175 Add "limm" and "reserved".
11176 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11177 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11178 * arc-tdep.h (arc_regnum): Likewise.
11179
f74f865e
MF
111802017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11181
11182 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11183 for THREADPTR register.
11184 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11185 register.
11186 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11187 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11188 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11189
0d0bf81a
MF
111902017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11191
11192 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11193 registers above gdbarch_num_regs (gdbarch) as privileged in
11194 call0 ABI.
11195
0ce4291e
MF
111962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11197
11198 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11199 for a single specified register or for all registers in
11200 a0_base..a0_base + C0_NREGS range.
11201 (supply_gregset_reg): Call regcache_raw_supply for a single
11202 specified register or for all registers in a0_base..a0_base +
11203 C0_NREGS range.
11204
c56054f9
MF
112052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11206
11207 * arch/xtensa.h (C0_NREGS): Add definition.
11208 * xtensa-tdep.c (C0_NREGS): Remove definition.
11209
a4398628
MF
112102017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11211
11212 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11213 Drop xtensa_default_isa initialization.
11214 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11215
8c43009f
PA
112162017-03-27 Pedro Alves <palves@redhat.com>
11217
11218 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11219 (file_entry::include_dir): New method.
11220 (line_header::include_dir_at, line_header::file_name_at): New
11221 methods.
11222 (setup_type_unit_groups, setup_type_unit_groups)
11223 (psymtab_include_file_name): Simplify using the new methods.
11224 (lnp_state_machine) <the_line_header>: New field.
11225 <file>: Add comment.
11226 (lnp_state_machine::current_file): New method.
11227 (dwarf_record_line): Simplify using the new methods.
11228 (init_lnp_state_machine): Initialize the "the_line_header" field.
11229 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11230 Simplify using the new methods.
11231
a7e80b9e
PA
112322017-03-27 Pedro Alves <palves@redhat.com>
11233
11234 * cp-name-parser.y (make_empty): Delete.
11235 (demangler_special, nested_name, ptr_operator, array_indicator)
11236 (direct_declarator, declarator_1): Use fill_comp instead of
11237 make_empty.
11238
21047726
PA
112392017-03-27 Pedro Alves <palves@redhat.com>
11240
11241 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11242 to ATTRIBUTE_PRINTF.
11243 * solib-target.c (library_list_start_list): Print "string" not
11244 "version".
11245 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11246 gdb_xml_error call.
11247
d721ba37
PA
112482017-03-27 Pedro Alves <palves@redhat.com>
11249
11250 * dwarf2read.c (struct file_and_directory): New.
11251 (dwarf2_get_dwz_file): Adjust to use std::string.
11252 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11253 (find_file_and_directory): Adjust to return a file_and_directory
11254 object.
11255 (read_file_scope): Adjust to use file_and_directory. Remove
11256 make_cleanup/do_cleanups calls.
11257 (open_and_init_dwp_file): Adjust to use std::string. Remove
11258 make_cleanup/do_cleanups calls.
11259 * python/python.c (do_start_initialization): Adjust to ldirname
11260 returning a std::string.
11261 * utils.c (ldirname): Now returns a std::string.
11262 * utils.h (ldirname): Change return type to std::string.
11263 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11264 returning a std::string.
11265 * xml-tdesc.c (file_read_description_xml): Likewise.
11266
ed771251
AH
112672017-03-24 Alan Hayward <alan.hayward@arm.com>
11268
11269 * regcache.c (regcache_debug_print_register): New function.
11270 * regcache.h (regcache_debug_print_register): New declaration.
11271 * target.c (debug_print_register): Remove.
11272 (target_fetch_registers): Call regcache_debug_print_register.
11273 (target_store_registers): Likewise.
11274
568c1b9f
PB
112752017-03-24 Pádraig Brady <pbrady@fb.com>
11276
11277 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11278 reference beyond the 'lh->include_dirs' array before accessing to
11279 it.
11280 (psymtab_include_file_name): Likewise.
11281 (dwarf_decode_lines_1): Likewise.
11282 (dwarf_decode_lines): Likewise.
11283 (file_file_name): Likewise.
11284
3e00d44f
SM
112852017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11286
11287 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11288 inferior_ptid.
11289 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11290 ps_lsetfpregs): Likewise.
11291 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11292 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11293 ps_lsetfpregs): Likewise.
11294 * target.c (target_fetch_registers, target_store_registers):
11295 Remove asserts.
11296
077ae656
AH
112972017-03-23 Alan Hayward <alan.hayward@arm.com>
11298
11299 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11300
1e2b521d
YQ
113012017-03-23 Yao Qi <yao.qi@linaro.org>
11302
11303 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11304 (_initialize_aarch64_tdep): Register it.
11305 (aarch64_record_load_store): Handle PRFM instruction.
11306 (aarch64_process_record_test): New function.
11307
33877125
YQ
113082017-03-23 Yao Qi <yao.qi@linaro.org>
11309
11310 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11311 indentation.
11312
a0eef940
YQ
113132017-03-23 Yao Qi <yao.qi@linaro.org>
11314
11315 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11316
3f2a3564
PR
113172017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11318
11319 python/python.c (do_start_initialization): Fix memory leak.
11320
b67aeab0
SM
113212017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11322
11323 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11324 using get_ptrace_pid.
11325 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11326 inferior_ptid.
11327 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11328 inferior_ptid instead of pid.
11329
ffdbe864
YQ
113302017-03-22 Yao Qi <yao.qi@linaro.org>
11331
11332 * aarch64-tdep.c: Wrap locally used classes in anonymous
11333 namespace.
11334 * arm-tdep.c: Likewise.
11335 * linespec.c: Likewise.
11336 * ui-out.c: Likewise.
11337
9d736fbf
JG
113382017-03-22 Jonah Graham <jonah@kichwacoders.com>
11339
11340 PR gdb/19637
11341 * python/lib/gdb/printer/bound_registers.py: Import sys.
11342
3de88e9a
SM
113432017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11344
11345 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11346 windows_thread_info parameter and use it instead of
11347 current_thread.
11348 (windows_fetch_inferior_registers): Don't set current_thread,
11349 pass the thread to do_windows_fetch_inferior_registers. Use
11350 ptid from regcache instead of inferior_ptid.
11351 (do_windows_store_inferior_registers): Add windows_thread_info
11352 parameter and use it instead of current_thread.
11353 (windows_store_inferior_registers): Don't set current_thread,
11354 pass the thread to do_windows_store_inferior_registers. Use
11355 ptid from regcache instead of inferior_ptid.
11356
0e7b8f61
SM
113572017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11358
11359 * ser-mingw.c (ser_windows_raw): Remove reference to
11360 struct serial::current_timeout.
11361
5badf10a
IR
113622017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11363
11364 PR tdep/20928
11365 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11366 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11367 (sparc64_fsr_type): Fix %fsr decoding.
11368
cee59b3f
TW
113692017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11370
11371 * python/py-record-btrace.c (btpy_insn_data): Change return type
11372 for Python 2.
11373
639a9038
SM
113742017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11375
11376 * spu-linux-nat.c (spu_fetch_inferior_registers,
11377 spu_store_inferior_registers): Use ptid from regcache, set and
11378 restore inferior_ptid.
11379 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11380 Likewise.
11381
bcc0c096
SM
113822017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11383
11384 * i386-linux-nat.c (fetch_register, store_register,
11385 i386_linux_fetch_inferior_registers,
11386 i386_linux_store_inferior_registers): Use ptid from regcache.
11387 * ia64-linux-nat.c (ia64_linux_fetch_register,
11388 ia64_linux_store_register): Likewise.
11389 * inf-ptrace.c (inf_ptrace_fetch_register,
11390 inf_ptrace_store_register): Likewise.
11391 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11392 m32r_linux_store_inferior_registers): Likewise.
11393 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11394 m68kbsd_store_inferior_registers): Likewise.
11395 * m68k-linux-nat.c (fetch_register, store_register,
11396 m68k_linux_fetch_inferior_registers,
11397 m68k_linux_store_inferior_registers): Likewise.
11398 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11399 m88kbsd_store_inferior_registers): Likewise.
11400 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11401 mips_fbsd_store_inferior_registers): Likewise.
11402 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11403 mips64_linux_regsets_store_registers): Likewise.
11404 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11405 mipsnbsd_store_inferior_registers): Likewise.
11406 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11407 mips64obsd_store_inferior_registers): Likewise.
11408 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11409 Likewise.
11410 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11411 ppcfbsd_store_inferior_registers): Likewise.
11412 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11413 ppc_linux_store_inferior_registers): Likewise.
11414 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11415 ppcnbsd_store_inferior_registers): Likewise.
11416 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11417 ppcobsd_store_registers): Likewise.
11418 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11419 Likewise.
11420 * ravenscar-thread.c (ravenscar_fetch_registers,
11421 ravenscar_store_registers, ravenscar_prepare_to_store):
11422 Likewise.
11423 * record-btrace.c (record_btrace_fetch_registers,
11424 record_btrace_store_registers, record_btrace_prepare_to_store):
11425 Likewise.
11426 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11427 Lookup inferior using ptid from regcache, instead of
11428 current_inferior.
11429 * remote.c (remote_fetch_registers, remote_store_registers): Use
11430 ptid from regcache.
11431 * rs6000-nat.c (fetch_register, store_register): Likewise.
11432 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11433 s390_linux_store_inferior_registers): Likewise.
11434 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11435 shnbsd_store_inferior_registers): Likewise.
11436 * sol-thread.c (sol_thread_fetch_registers,
11437 sol_thread_store_registers): Likewise.
11438 * sparc-nat.c (sparc_fetch_inferior_registers,
11439 sparc_store_inferior_registers): Likewise.
11440 * tilegx-linux-nat.c (fetch_inferior_registers,
11441 store_inferior_registers): Likewise.
11442 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11443 vaxbsd_store_inferior_registers): Likewise.
11444 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11445 store_xtregs): Likewise.
11446
c0f55cc6
AV
114472017-03-20 Artemiy Volkov <artemiyv@acm.org>
11448
11449 PR gdb/14441
11450 * NEWS: Mention support for rvalue references in GDB and python.
11451 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11452 supports both lvalue and rvalue references.
11453
15c0a2a9
AV
114542017-03-20 Artemiy Volkov <artemiyv@acm.org>
11455
11456 PR gdb/14441
11457 * gdbtypes.c (rank_one_type): Implement overloading
11458 resolution rules regarding rvalue references.
11459
aa006118
AV
114602017-03-20 Artemiy Volkov <artemiyv@acm.org>
11461
11462 PR gdb/14441
11463 * aarch64-tdep.c (aarch64_type_align)
11464 (aarch64_extract_return_value, aarch64_store_return_value): Change
11465 lvalue reference type checks to general reference type checks.
11466 * amd64-tdep.c (amd64_classify): Likewise.
11467 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11468 Likewise.
11469 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11470 (arm_store_return_value): Likewise.
11471 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11472 * c-typeprint.c (c_print_type): Likewise.
11473 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11474 (cplus_number_of_children, cplus_describe_child): Likewise.
11475 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11476 * completer.c (expression_completer): Likewise.
11477 * cp-support.c (make_symbol_overload_list_adl_namespace):
11478 Likewise.
11479 * darwin-nat-info.c (info_mach_region_command): Likewise.
11480 * dwarf2loc.c (entry_data_value_coerce_ref)
11481 (value_of_dwarf_reg_entry): Likewise.
11482 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11483 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11484 Likewise.
11485 * findvar.c (extract_typed_address, store_typed_address):
11486 Likewise.
11487 * gdbtypes.c (rank_one_type): Likewise.
11488 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11489 * infcall.c (value_arg_coerce): Likewise.
11490 * language.c (pointer_type): Likewise.
11491 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11492 Likewise.
11493 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11494 * mn10300-tdep.c (mn10300_type_align): Likewise.
11495 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11496 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11497 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11498 Likewise.
11499 * printcmd.c (print_formatted, x_command): Likewise.
11500 * python/py-type.c (typy_get_composite, typy_template_argument):
11501 Likewise.
11502 * python/py-value.c (valpy_referenced_value)
11503 (valpy_get_dynamic_type, value_has_field): Likewise.
11504 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11505 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11506 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11507 * spu-tdep.c (spu_scalar_value_p): Likewise.
11508 * symtab.c (lookup_symbol_aux): Likewise.
11509 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11510 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11511 Likewise.
11512 * valops.c (value_cast_pointers, value_cast)
11513 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11514 (value_struct_elt, value_struct_elt_bitpos)
11515 (value_find_oload_method_list, find_overload_match)
11516 (value_rtti_indirect_type): Likewise.
11517 * valprint.c (val_print_scalar_type_p, generic_val_print):
11518 Likewise.
11519 * value.c (value_actual_type, value_as_address, unpack_long)
11520 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11521 (coerce_ref): Likewise.
11522 * varobj.c (varobj_get_value_type): Likewise.
11523
3fcf899d
AV
115242017-03-20 Artemiy Volkov <artemiyv@acm.org>
11525
11526 PR gdb/14441
11527 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11528 table of constants.
11529 * python/lib/gdb/command/explore.py: Support exploring values
11530 of rvalue reference types.
11531 * python/lib/gdb/types.py: Implement get_basic_type() for
11532 rvalue reference types.
11533 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11534 constant.
11535 * python/py-value.c (valpy_getitem): Add an rvalue reference
11536 check.
11537 (valpy_reference_value): Add new parameter "refcode".
11538 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11539 New wrappers for valpy_reference_value().
11540 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11541 (gdbpy_invoke_xmethod): Likewise.
11542
4297a3f0
AV
115432017-03-20 Artemiy Volkov <artemiyv@acm.org>
11544
11545 PR gdb/14441
11546 * dwarf2read.c (process_die, read_type_die_1): Handle the
11547 DW_TAG_rvalue_reference_type DIE.
11548 (read_tag_reference_type): Add new parameter "refcode".
11549
e1cb3213
AV
115502017-03-20 Artemiy Volkov <artemiyv@acm.org>
11551
11552 PR gdb/14441
11553 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11554 (c_type_print_modifier, c_type_print_varspec_suffix)
11555 (c_type_print_base): Support printing rvalue reference types.
11556 * c-valprint.c (c_val_print, c_value_print): Support printing
11557 rvalue reference values.
11558
e4347c89
AV
115592017-03-20 Artemiy Volkov <artemiyv@acm.org>
11560
11561 PR gdb/14441
11562 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11563 typename.
11564 * cp-support.c (replace_typedefs): Handle
11565 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11566 * python/py-type.c (typy_lookup_type): Likewise.
11567
53cc15f5
AV
115682017-03-20 Artemiy Volkov <artemiyv@acm.org>
11569
11570 PR gdb/14441
11571 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11572 * parse.c (insert_type): Change assert statement.
11573 (follow_types): Handle rvalue reference types.
11574 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11575 constant.
11576
a65cfae5
AV
115772017-03-20 Artemiy Volkov <artemiyv@acm.org>
11578
11579 PR gdb/14441
11580 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11581 value_ref() interface.
11582 * c-valprint.c (c_value_print): Likewise.
11583 * infcall.c (value_arg_coerce): Likewise.
11584 * python/py-value.c (valpy_reference_value): Likewise.
11585 * valops.c (value_cast, value_reinterpret_cast)
11586 (value_dynamic_cast, typecmp): Likewise.
11587 (value_ref): Parameterize by kind of return value reference type.
11588 * value.h (value_ref): Add new parameter "refcode".
11589
3b224330
AV
115902017-03-20 Artemiy Volkov <artemiyv@acm.org>
11591
11592 PR gdb/14441
11593 * dwarf2read.c (read_tag_reference_type): Use
11594 lookup_lvalue_reference_type() instead of lookup_reference_type().
11595 * eval.c (evaluate_subexp_standard): Likewise.
11596 * f-exp.y: Likewise.
11597 * gdbtypes.c (make_reference_type, lookup_reference_type):
11598 Generalize with rvalue reference types.
11599 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11600 convenience wrappers for lookup_reference_type().
11601 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11602 reference kind parameter.
11603 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11604 wrappers for lookup_reference_type().
11605 * guile/scm-type.c (gdbscm_type_reference): Use
11606 lookup_lvalue_reference_type() instead of lookup_reference_type().
11607 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11608 * parse.c (follow_types): Likewise.
11609 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11610 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11611 Likewise.
11612 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11613 (gdbpy_invoke_xmethod): Likewise.
11614 * stabsread.c: Provide extra argument to make_reference_type()
11615 call.
11616 * valops.c (value_ref, value_rtti_indirect_type): Use
11617 lookup_lvalue_reference_type() instead of lookup_reference_type().
11618
f9aeb8d4
AV
116192017-03-20 Artemiy Volkov <artemiyv@acm.org>
11620
11621 PR gdb/14441
11622 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11623 (TYPE_IS_REFERENCE): New macro.
11624 (struct type): Add rvalue_reference_type field.
11625 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11626
51457a05
MAL
116272017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11628
11629 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11630 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11631 New function definition.
11632 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11633 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11634 New function declaration.
11635 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11636 * mi/mi-interp.h: New file.
11637 * solib.c (info_sharedlibrary_command): Replace for loop with
11638 ALL_SO_LIBS macro
11639 * solib.h (update_solib_list): New function declaration.
11640 (so_list_head): Move macro.
11641 * solist.h (ALL_SO_LIBS): New macro.
11642
e696b3ad
MAL
116432017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11644
11645 * infcmd.c (post_create_inferior): Remove unused argument in
11646 call to solib_add.
11647 * remote.c (remote_start_remote): Likewise.
11648 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11649 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11650 (enable_break): Likewise.
11651 * solib.c (update_solib_list): Remove unused target argument
11652 and its documentation.
11653 (solib_add): Remove unused target argument. Remove unused
11654 argument in call to update_solib_list.
11655 (info_sharedlibrary_command): Remove unused argument in call
11656 to update_solib_list.
11657 (sharedlibrary_command): Remove unused argument in call to
11658 solib_add.
11659 (handle_solib_event): Likewise.
11660 (reload_shared_libraries): Likewise.
11661 * solib.h (solib_add): Remove unused target argument.
11662
dcb84eda
AA
116632017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11664
11665 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11666 (s390_displaced_step_fixup): Cover relative branches with the
11667 default fixup handling. This fixes lack of support for some
11668 relative branch instructions.
11669
d9cb6cdc
SM
116702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11671
11672 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11673 ptid from regcache.
11674
1afaf9f4
SM
116752017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11676
11677 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11678 i386_darwin_store_inferior_registers): Use ptid from regcache.
11679
aac12e24
SM
116802017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11681
11682 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11683 i386bsd_store_inferior_registers): Use ptid from regcache.
11684
bbe1eef1
SM
116852017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11686
11687 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11688 hppaobsd_store_registers): Use ptid from regcache.
11689
10799020
SM
116902017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11691
11692 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11693 hppanbsd_store_registers): Use ptid from regcache.
11694
00204cf7
SM
116952017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11696
11697 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11698 from regcache. Use get_ptrace_pid.
11699
11a33714
SM
117002017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11701
11702 * corelow.c (get_core_register_section): Use ptid from regcache,
11703 update doc.
11704
317cd492
SM
117052017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11706
11707 * bsd-uthread.c (bsd_uthread_fetch_registers,
11708 bsd_uthread_store_registers): Use ptid from regcache, set and
11709 restore inferior_ptid.
11710
9ac8a7c2
SM
117112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11712
11713 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11714 fetch_fp_regs, store_register, store_regs, store_fp_register,
11715 store_fp_regs): Use ptid from regcache.
11716
4ac4bb6a
SM
117172017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11718
11719 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11720 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11721 store_vfp_regs): Use ptid from regcache.
11722
9bcbdca8
PA
117232017-03-17 Pedro Alves <palves@redhat.com>
11724
11725 PR remote/21188
11726 * ser-base.c (ser_base_wait_for): Add comment.
11727 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11728 version.
11729 * ser-unix.c (hardwire_raw): Remove reference to
11730 scb->current_timeout.
11731 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11732 (hardwire_ops): Install ser_base_readchar instead of
11733 hardwire_readchar.
11734 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11735 Remove fields.
11736
7503099f
JG
117372017-03-17 Jonah Graham <jonah@kichwacoders.com>
11738
11739 PR gdb/19637
11740 * python/lib/gdb/printer/bound_registers.py: Add support for
11741 Python 3.
11742
7942e96e
AA
117432017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11744
11745 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11746 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11747 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11748 byte_offset to subobj_byte_offset. Fix the handling of
11749 DWARF_VALUE_STACK on big-endian targets when coming via an
11750 implicit pointer.
11751 (dwarf2_evaluate_loc_desc): Adjust call to
11752 dwarf2_evaluate_loc_desc_full.
11753 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11754 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11755
ba14f379
YQ
117562017-03-16 Yao Qi <yao.qi@linaro.org>
11757
11758 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11759 and REVSH instructions.
11760
b121eeb9
YQ
117612017-03-16 Yao Qi <yao.qi@linaro.org>
11762
11763 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11764 (arm_record_test): Declare.
11765 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11766 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11767 align with the manual.
11768 (thumb_record_misc): Adjust the code order to align with the
11769 manual.
11770 (thumb2_record_decode_insn_handler): Fix instruction matching.
11771 (instruction_reader_thumb): New class.
11772 (arm_record_test): New function.
11773
728a7913
YQ
117742017-03-16 Yao Qi <yao.qi@linaro.org>
11775
11776 * arm-tdep.c (abstract_memory_reader): New class.
11777 (instruction_reader): New class.
11778 (extract_arm_insn): Add argument 'reader'. Callers updated.
11779 (decode_insn): Likewise.
11780
34b43320
DE
117812017-03-16 Doug Evans <dje@google.com>
11782
a7c0469f
DE
11783 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11784 member. Change type of TYPE member to SCM. All uses updated.
11785 (lsscm_make_lazy_string_smob): Add assert.
11786 (lsscm_make_lazy_string): Flag bad length values.
11787 (lsscm_elt_type): New function.
11788 (gdbscm_lazy_string_to_value): Rewrite to use
11789 lsscm_safe_lazy_string_to_value.
11790 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11791 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11792 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11793 in incoming type.
11794 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11795 * guile/scm-type.c (tyscm_scm_to_type): New function.
11796
117972017-03-15 Doug Evans <dje@google.com>
11798
34b43320
DE
11799 PR python/17728, python/18439, python/18779
11800 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11801 member. Change type of TYPE member to PyObject *. All uses updated.
11802 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11803 (gdbpy_create_lazy_string_object): Flag bad length values.
11804 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11805 Handle typedefs in incoming type.
11806 (stpy_lazy_string_elt_type): New function.
11807 (gdbpy_extract_lazy_string): Call it.
11808 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11809 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11810 typedefs in incoming type.
11811
a3a5fecc
DE
118122017-03-16 Doug Evans <dje@google.com>
11813
11814 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11815 * guile/scm-type.c (tyscm_scm_to_type): New function.
11816
28f1c605
JW
118172017-03-16 Jiong Wang <jiong.wang@arm.com>
11818
11819 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11820 "ULONGEST" for "skip".
11821
87c336f6
AA
118222017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11823
11824 PR gdb/21220
11825 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11826 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11827 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11828 over ptrace peek/poke until end of buffer or error.
11829
cf81cf60
SM
118302017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11831
11832 * parse.c (length_of_subexp): Make static.
11833 * parser-defs.h (length_of_subexp): Remove.
11834
a379284a
AA
118352017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11836
11837 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11838 as well.
11839
8a6200ba
PA
118402017-03-14 Pedro Alves <palves@redhat.com>
11841
11842 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11843 (main): Use std::unique_ptr. Remove calls to
11844 cp_demangled_name_parse_free.
11845
f79ec206
SM
118462017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11847
11848 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11849 alphabsd_store_inferior_registers): Use regcache->ptid instead
11850 of inferior_ptid.
11851
edb5fb00
SM
118522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11853
11854 * aix-thread.c (aix_thread_fetch_registers,
11855 aix_thread_store_registers): Use regcache->ptid instead of
11856 inferior_ptid.
11857
55119686
SM
118582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11859
11860 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11861 store_gregs_to_thread, fetch_fpregs_from_thread,
11862 store_fpregs_to_thread): Use regcache->ptid instead of
11863 inferior_ptid.
11864
6a06fbb7
SM
118652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11866
11867 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11868 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11869 instead of inferior_ptid.
11870
c6386875
SM
118712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11872
11873 * target.c (target_fetch_registers, target_store_registers): Add
11874 assert.
11875
ddaaf0fb
SM
118762017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11877
11878 * regcache.h (regcache_get_ptid): New function.
11879 * regcache.c (regcache_get_ptid): New function.
11880
b9da89d1 118812017-03-13 Mark Wielaard <mark@klomp.org>
11882
11883 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11884
5f4d1085
KS
118852017-03-10 Keith Seitz <keiths@redhat.com>
11886
11887 PR c++/8218
11888 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11889
c65d6b55
PA
118902017-03-08 Pedro Alves <palves@redhat.com>
11891
11892 PR gdb/18360
11893 * infrun.c (start_step_over, do_target_resume, resume)
11894 (restart_threads): Assert we're not resuming a thread that is
11895 meant to be stopped.
11896 (infrun_thread_stop_requested_callback): Delete.
11897 (infrun_thread_stop_requested): If the thread is internally
11898 stopped, queue a pending stop event and clear the thread's
11899 inline-frame state.
11900 (handle_stop_requested): New function.
11901 (handle_syscall_event, handle_inferior_event_1): Use
11902 handle_stop_requested.
11903 (handle_stop_requested): New function.
11904 (handle_signal_stop): Set the thread's stop_signal here instead of
11905 at caller.
11906 (finish_step_over): Clear step over info unconditionally.
11907 (handle_signal_stop): If the user had interrupted the event
11908 thread, consider the stop a random signal.
11909 (handle_signal_stop) <signal arrived while stepping over
11910 breakpoint>: Don't restart threads here.
11911 (stop_waiting): Don't clear step-over info here.
11912
15c22686
PA
119132017-03-08 Pedro Alves <palves@redhat.com>
11914
11915 PR 21206
11916 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
11917 goes to argument 2, not 1.
11918
6e5d74e7
PA
119192017-03-08 Pedro Alves <palves@redhat.com>
11920
11921 PR cli/21218
11922 * top.c (gdb_readline_wrapper): Avoid passing NULL to
11923 display_gdb_prompt.
11924 (command_line_input): Add comment.
11925
9753a2f6
PA
119262017-03-08 Pedro Alves <palves@redhat.com>
11927
11928 PR tui/21216
11929 * tui/tui-file.c (tui_file::write): New.
11930 * tui/tui-file.h (tui_file): Override "write".
11931 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
11932 factored out from ...
11933 (tui_puts): ... here.
11934 (tui_putc): Use them.
11935 (tui_write): New function.
11936 * tui/tui-io.h (tui_write): Declare.
11937
1672e0d9
SDJ
119382017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
11939
11940 * Makefile.in (SFILES): Replace "environ.c" with
11941 "common/environ.c".
11942 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
11943 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
11944 to...
11945 * common/environ.c: ... here.
11946 * environ.h: Moved to...
11947 * common/environ.h: ... here.
11948
f7bb4e3a
PB
119492017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11950
11951 * gdbarch.sh (pstring_ptr): New static function.
11952 (gdbarch_disassembler_options): Use it.
11953 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
11954 not valid_disassembler_option->name.
11955 * gdbarch.c: Regenerate.
11956
e45ced6c
PB
119572017-03-07 Peter Bergner <bergner@vnet.ibm.com>
11958
11959 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
11960
5f6fd321
PA
119612017-03-07 Pedro Alves <palves@redhat.com>
11962
11963 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
11964
6dbb839a 119652017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
11966
11967 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
11968 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
11969 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 11970 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 11971
d274ecf4
SM
119722017-03-06 Simon Marchi <simon.marchi@ericsson.com>
11973
11974 * xtensa-linux-nat.c (fetch_gregs): Remove const.
11975
df97be55
SM
119762017-03-03 Simon Marchi <simon.marchi@ericsson.com>
11977
11978 * remote.c (remote_add_target_side_commands): Use range-based
11979 for loop.
11980
7d45f3df
YQ
119812017-03-03 Yao Qi <yao.qi@linaro.org>
11982
11983 PR gdb/21165
11984 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
11985 value is lazy.
11986 * valprint.c (common_val_print): Likewise.
11987
65b48a81
PB
119882017-02-28 Peter Bergner <bergner@vnet.ibm.com>
11989
11990 * NEWS: Mention new set/show disassembler-options commands.
11991 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
11992 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
11993 (prospective_options): New static variable.
11994 (gdb_disassembler::gdb_disassembler): Initialize
11995 m_di.disassembler_options.
11996 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
11997 (get_disassembler_options): New function.
11998 (set_disassembler_options): Likewise.
11999 (set_disassembler_options_sfunc): Likewise.
12000 (show_disassembler_options_sfunc): Likewise.
12001 (disassembler_options_completer): Likewise.
12002 (_initialize_disasm): Likewise.
12003 * disasm.h (get_disassembler_options): New prototype.
12004 (set_disassembler_options): Likewise.
12005 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12006 (gdbarch_verify_disassembler_options): Likewise.
12007 * gdbarch.c: Regenerate.
12008 * gdbarch.h: Likewise.
12009 * arm-tdep.c (num_disassembly_options): Delete.
12010 (set_disassembly_style): Likewise.
12011 (arm_disassembler_options): New static variable.
12012 (set_disassembly_style_sfunc): Convert short style name into long
12013 option name. Call set_disassembler_options.
12014 (show_disassembly_style_sfunc): New function.
12015 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12016 set_gdbarch_verify_disassembler_options.
12017 (_initialize_arm_tdep): Delete regnames variable and update callers.
12018 (arm_disassembler_options): Initialize.
12019 (disasm_options): New variable.
12020 (num_disassembly_options): Rename from this...
12021 (num_disassembly_styles): ...to this. Compute by scanning through
12022 disasm_options.
12023 (valid_disassembly_styles): Initialize using disasm_options.
12024 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12025 set_arm_regname_option.
12026 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12027 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12028 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12029 set_gdbarch_verify_disassembler_options.
12030 * s390-tdep.c (s390_disassembler_options): New static variable.
12031 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12032 set_gdbarch_verify_disassembler_options.
12033
d538e36d
SM
120342017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12035
12036 * remote.c (remote_add_target_side_condition): Remove "struct"
12037 keyword from range-based for loop.
12038
83621223
SM
120392017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12040
12041 * remote.c (remote_add_target_side_condition): Use range-based
12042 for loop. Update comment.
12043
2123df0e
YQ
120442017-02-27 Yao Qi <yao.qi@linaro.org>
12045
12046 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12047
8e368124
AH
120482017-02-26 Alan Hayward <alan.hayward@arm.com>
12049
12050 * regcache.c (regcache_raw_update): New function.
12051 (regcache_raw_read): Move code to regcache_raw_update.
12052 * regcache.h (regcache_raw_update): New declaration.
12053 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12054
a49dd8dd
JK
120552017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12056
12057 * dwarf2read.c (create_debug_type_hash_table): Initialize
12058 header.signature and header.type_offset_in_tu.
12059
34e4bae9
PA
120602017-02-24 Pedro Alves <palves@redhat.com>
12061
12062 * symtab.c (make_file_symbol_completion_list_1): Use
12063 add_symtab_completions.
12064
b0e4b369
AH
120652017-02-24 Alan Hayward <alan.hayward@arm.com>
12066
12067 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12068
975c21ab
AH
120692017-02-24 Alan Hayward <alan.hayward@arm.com>
12070
12071 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12072 I386_MAX_REGISTER_SIZE.
12073 (i386_pseudo_register_write): Likewise.
12074 (i386_process_record): Likewise.
12075 * i387-tdep.c (i387_supply_xsave): Likewise.
12076 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12077 (store_register): Likewise.
12078
14bc53a8
PA
120792017-02-23 Pedro Alves <palves@redhat.com>
12080
12081 * ada-lang.c: Include "common/function-view.h".
12082 (ada_iterate_over_symbols): Adjust to use function_view as
12083 callback type.
12084 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12085 (ada_make_symbol_completion_list): Use a lambda.
12086 (ada_exc_search_name_matches): Delete.
12087 (name_matches_regex): New.
12088 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12089 * compile/compile-c-support.c: Include "common/function-view.h".
12090 (print_one_macro): Change prototype to accept a ui_file pointer.
12091 (write_macro_definitions): Use a lambda.
12092 * dwarf2read.c: Include "common/function-view.h".
12093 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12094 (dw2_expand_symtabs_matching): Adjust to use function_view as
12095 callback type.
12096 * language.h: Include "common/function-view.h".
12097 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12098 function_view as callback type.
12099 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12100 * linespec.c: Include "common/function-view.h".
12101 (collect_info::add_symbol): New method.
12102 (struct symbol_and_data_callback, iterate_inline_only, struct
12103 symbol_matcher_data, iterate_name_matcher): Delete.
12104 (iterate_over_all_matching_symtabs): Adjust to use function_view
12105 as callback type and lambdas.
12106 (iterate_over_file_blocks): Adjust to use function_view as
12107 callback type.
12108 (decode_compound_collector): Now a class with private fields.
12109 (decode_compound_collector::release_symbols): New method.
12110 (collect_one_symbol): Rename to...
12111 (decode_compound_collector::operator()): ... this and adjust.
12112 (lookup_prefix_sym): decode_compound_collector construction bits
12113 move to decode_compound_collector ctor. Pass the
12114 decode_compound_collector object directly as callback. Remove
12115 cleanups and use decode_compound_collector::release_symbols
12116 instead.
12117 (symtab_collector): Now a class with private fields.
12118 (symtab_collector::release_symtabs): New method.
12119 (add_symtabs_to_list): Rename to...
12120 (symtab_collector::operator()): ... this and adjust.
12121 (collect_symtabs_from_filename): symtab_collector construction
12122 bits move to symtab_collector ctor. Pass the symtab_collector
12123 object directly as callback. Remove cleanups and use
12124 symtab_collector::release_symtabs instead.
12125 (collect_symbols): Delete.
12126 (add_matching_symbols_to_info): Use lambdas.
12127 * macrocmd.c (print_macro_callback): Delete.
12128 (info_macro_command): Use a lambda.
12129 (info_macros_command): Pass print_macro_definition as callable
12130 directly.
12131 (print_one_macro): Remove 'ignore' parameter.
12132 (macro_list_command): Adjust.
12133 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12134 (macro_for_each_data::user_data): Delete field.
12135 (foreach_macro): Adjust to call the function_view.
12136 (macro_for_each): Adjust to use function_view as callback type.
12137 (foreach_macro_in_scope): Adjust to call the function_view.
12138 (macro_for_each_in_scope): Adjust to use function_view as callback
12139 type.
12140 * macrotab.h: Include "common/function-view.h".
12141 (macro_callback_fn): Declare a prototype instead of a pointer.
12142 Remove "user_data" parameter.
12143 (macro_for_each, macro_for_each_in_scope): Adjust to use
12144 function_view as callback type.
12145 * psymtab.c (partial_map_expand_apply)
12146 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12147 Adjust to use function_view as callback type and to return bool.
12148 (psym_expand_symtabs_matching): Adjust to use function_view as
12149 callback types.
12150 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12151 to use function_view as callback type and to return bool.
12152 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12153 callback types.
12154 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12155 as callback types.
12156 * symfile.h: Include "common/function-view.h".
12157 (expand_symtabs_file_matcher_ftype)
12158 (expand_symtabs_symbol_matcher_ftype)
12159 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12160 return bool.
12161 (quick_symbol_functions::map_symtabs_matching_filename)
12162 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12163 function_view as callback type and return bool.
12164 (expand_symtabs_matching): Adjust to use function_view as callback
12165 type.
12166 (maintenance_expand_name_matcher)
12167 (maintenance_expand_file_matcher): Delete.
12168 (maintenance_expand_symtabs): Use lambdas.
12169 * symtab.c (iterate_over_some_symtabs): Adjust to use
12170 function_view as callback types and return bool.
12171 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12172 of a cleanup.
12173 (lookup_symtab_callback): Delete.
12174 (lookup_symtab): Use a lambda.
12175 (iterate_over_symbols): Adjust to use function_view as callback
12176 type.
12177 (struct search_symbols_data, search_symbols_file_matches)
12178 (search_symbols_name_matches): Delete.
12179 (search_symbols): Use a pair of lambdas.
12180 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12181 (symtab_expansion_callback): Delete.
12182 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12183 * symtab.h: Include "common/function-view.h".
12184 (iterate_over_some_symtabs): Adjust to use function_view as
12185 callback type and return bool.
12186 (iterate_over_symtabs): Adjust to use function_view as callback
12187 type.
12188 (symbol_found_callback_ftype): Remove 'data' parameter and return
12189 bool.
12190 (iterate_over_symbols): Adjust to use function_view as callback
12191 type.
12192
07e253aa
PA
121932017-02-23 Pedro Alves <palves@redhat.com>
12194
12195 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12196 (%.o) <unittests/%.c>: New pattern.
12197 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12198 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12199 * common/function-view.h: New file.
12200 * unittests/function-view-selftests.c: New file.
12201 * configure: Regenerate.
12202
8eaf5320
SM
122032017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12204
12205 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12206 inferior_ptid.
12207 * go32-nat.c (go32_thread_alive): Likewise.
12208
38768751
YQ
122092017-02-23 Yao Qi <yao.qi@linaro.org>
12210
12211 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12212 delete.
12213
0a8beaba
YQ
122142017-02-23 Yao Qi <yao.qi@linaro.org>
12215
12216 * varobj.c (varobj_clear_saved_item): Use delete instead of
12217 xfree.
12218 (update_dynamic_varobj_children): Likewise.
12219
58fdfd2c
JK
122202017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12221
12222 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12223
1b90b139
SM
122242017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12225
12226 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12227 m_enum_value to 0 in default constructor.
12228
2039d74e
EBM
122292017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12230
12231 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12232 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12233 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12234 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12235 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12236 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12237 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12238 IS_STORE_CONDITIONAL_INSN.
12239
7814882a
JK
122402017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12241
12242 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12243
0ae60b63
JK
122442017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12245
12246 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12247
0224619f
JK
122482017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12249
12250 * dwarf2read.c (skip_one_die, read_attribute_value)
12251 (dwarf2_const_value_attr, dump_die_shallow)
12252 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12253 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12254
0af92d60
JK
122552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12256
12257 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12258 (dwarf_parse_macro_header): Accept DWARF version 5.
12259 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12260
216f72a1
JK
122612017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12262
12263 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12264 DW_AT_GNU_*.
12265 * common/common-exceptions.h (enum errors): Likewise.
12266 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12267 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12268 (dwarf_expr_context::execute_stack_op): Likewise.
12269 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12270 Likewise.
12271 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12272 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12273 (show_entry_values_debug, call_site_to_target_addr)
12274 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12275 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12276 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12277 (value_of_dwarf_block_entry, indirect_pieced_value)
12278 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12279 (disassemble_dwarf_expression): Likewise.
12280 * dwarf2read.c (process_die, inherit_abstract_dies)
12281 (read_call_site_scope): Likewise.
12282 * gdbtypes.h (struct func_type, struct call_site_parameter)
12283 (struct call_site): Likewise.
12284 * stack.c (read_frame_arg): Likewise.
12285 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12286
43988095
JK
122872017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12288
12289 * defs.h (read_unsigned_leb128): New declaration.
12290 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12291 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12292 (dwarf2_find_location_expression): Call also
12293 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12294 * dwarf2loc.h (dwarf2_version): New declaration.
12295 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12296 rnglists.
12297 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12298 .debug_rnglists.
12299 (struct dwop_section_names): Add loclists_dwo.
12300 (dwop_section_names): Add .debug_loclists.dwo.
12301 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12302 (struct dwarf2_per_cu_data): Add dwarf_version.
12303 (struct dwo_sections): Add loclists.
12304 (struct attr_abbrev): Add implicit_const.
12305 (read_indirect_line_string): New declaration.
12306 (read_unsigned_leb128): Delete declaration.
12307 (rcuh_kind): New definition.
12308 (read_and_check_comp_unit_head): Change parameter
12309 is_debug_types_section to section_kind.
12310 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12311 (read_comp_unit_head): Change parameter abfd to section, add parameter
12312 section_kind. Handle DWARF-5.
12313 (error_check_comp_unit_head): Accept also DWARF version 5.
12314 (read_and_check_comp_unit_head): Change parameter
12315 is_debug_types_section to section_kind.
12316 (read_and_check_type_unit_head): Delete function.
12317 (read_abbrev_offset): Handle DWARF-5.
12318 (create_debug_type_hash_table): Add parameter section_kind. Process
12319 only DW_UT_type. Use signature and type_offset_in_tu from struct
12320 comp_unit_head.
12321 (create_debug_types_hash_table): Update create_debug_type_hash_table
12322 caller.
12323 (create_all_type_units): Call create_debug_type_hash_table.
12324 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12325 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12326 caller.
12327 (skip_one_die): Handle DW_FORM_implicit_const.
12328 (dwarf2_rnglists_process): New function.
12329 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12330 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12331 (read_attribute_value): Handle DW_FORM_implicit_const,
12332 DW_FORM_line_strp.
12333 (read_attribute): Handle DW_FORM_implicit_const.
12334 (read_indirect_string_at_offset_from): New function from
12335 read_indirect_string_at_offset.
12336 (read_indirect_string_at_offset): Call
12337 read_indirect_string_at_offset_from.
12338 (read_indirect_line_string_at_offset): New function.
12339 (read_indirect_string): New function comment.
12340 (read_indirect_line_string): New function.
12341 (read_unsigned_leb128): Make it global.
12342 (dwarf2_string_attr): Handle DWARF-5.
12343 (add_include_dir_stub, read_formatted_entries): New functions.
12344 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12345 Handle DWARF-5.
12346 (per_cu_header_read_in): Update read_comp_unit_head caller.
12347 (dwarf2_version): New function.
12348 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12349 rnglists.
12350 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12351 fields.
12352
22d2f3ab
JK
123532017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12354
12355 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12356
5f46c5a5
JK
123572017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12358
12359 * dwarf2read.c (dwarf2_ranges_process): New function from
12360 dwarf2_ranges_read.
12361 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12362 dwarf2_ranges_process.
12363
78d4d2c5
JK
123642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12365
12366 * dwarf2read.c (create_debug_type_hash_table): New function from
12367 create_debug_types_hash_table.
12368 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12369 (create_all_type_units, open_and_init_dwo_file): Update
12370 create_debug_types_hash_table callers.
12371
1b076f25
SDJ
123722017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12373
12374 PR gdb/16188
12375 * fork-child.c (trace_start_error): Fix thinko. va_end should
12376 refer to 'ap', not 'args'.
12377
0db8980c
SDJ
123782017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12379 Pedro Alves <palves@redhat.com>
12380
12381 PR gdb/16188
12382 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12383 calls succeeded.
12384 * fork-child.c (trace_start_error): New function.
12385 (trace_start_error_with_name): Likewise.
12386 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12387 * inf-ptrace.c (inf_ptrace_me): Likewise.
12388 * inferior.h (trace_start_error): New prototype.
12389 (trace_start_error_with_name): Likewise.
12390
99e8a4f9
SDJ
123912017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12392
12393 PR gdb/21164
12394 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12395 NULL before using it.
12396 * symmisc.c (maintenance_print_symbols): Likewise.
12397 (maintenance_print_msymbols): Likewise.
12398
4e746bb6
TW
123992017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12400
12401 * NEWS: Add record Python bindings entry.
12402
124032017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12404
12405 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12406 py-record-full.o.
12407 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12408 * python/py-record-btrace.c, python/py-record-btrace.h,
12409 python/py-record-full.c, python/py-record-full.h: New file.
12410 * python/py-record.c: Add include for py-record-btrace.h and
12411 py-record-full.h.
12412 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12413 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12414 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12415 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12416 New definition.
12417 (gdbpy_initialize_btrace): New export.
12418 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12419
124202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12421
12422 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12423 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12424 * python/py-record.c: New file.
12425 * python/python-internal.h (gdbpy_start_recording,
12426 gdbpy_current_recording, gdpy_stop_recording,
12427 gdbpy_initialize_record): New export.
12428 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12429 (python_GdbMethods): Add gdbpy_start_recording,
12430 gdbpy_current_recording and gdbpy_stop_recording.
12431
124322017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12433
12434 * record-btrace.c (record_btrace_record_method): New function.
12435 (init_record_btrace_ops): Initialize to_record_method.
12436 * record-full.c (record_full_record_method): New function.
12437 (init_record_full_ops, init_record_full_core_ops): Add
12438 record_full_record_method.
12439 * record.h (enum record_method): New enum.
12440 * target-debug.h (target_debug_print_enum_record_method: New define.
12441 * target-delegates.c: Regenerate.
12442 * target.c (target_record_method): New function.
12443 * target.h: Include record.h.
12444 (struct target_ops) <to_record_method>: New field.
12445 (target_record_method): New export.
12446
124472017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12448
12449 * record.h (record_start, record_stop): New export.
12450 * record.c (record_start, record_stop): New function.
12451
124522017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12453
12454 * btrace.c (btrace_fetch): Copy function call segments pointer
12455 into a vector.
12456 (btrace_clear): Clear the vector.
12457 (btrace_find_insn_by_number): Use binary search to find the correct
12458 function call segment.
12459 * btrace.h (brace_fun_p): New typedef.
12460 (struct btrace_thread_info) <functions>: New field.
12461
124622017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12463
12464 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12465 * btrace.c (btrace_decode_error): ... here. New function.
12466 * btrace.h (btrace_decode_error): New export.
12467
124682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12469
12470 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12471 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12472 btrace_find_insn_by_number): Remove special case for gaps.
12473 * btrace.h (btrace_insn_get_error): New export.
12474 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12475 * record-btrace.c (btrace_insn_history): Print number for gaps.
12476 (record_btrace_info, record_btrace_goto): Handle gaps.
12477
3f77c769
TT
124782017-02-14 Tom Tromey <tom@tromey.com>
12479
12480 PR python/13598:
12481 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12482 event.
12483 * python/py-evts.c (gdbpy_initialize_py_events): Add
12484 before_prompt registry.
12485 * python/py-events.h (events_object) <before_prompt>: New field.
12486
4c2c7ac6
MM
124872017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12488
12489 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12490
5cf30ebf
LM
124912017-02-13 Luis Machado <lgustavo@codesourcery.com>
12492
12493 * symfile (_initialize_symfile): Add usage text to the load command's
12494 help text.
12495
26a06916
SM
124962017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12497
12498 * utils.c (defaulted_query): Don't query on secondary UIs.
12499
0b145e37
TT
125002017-02-10 Tom Tromey <tom@tromey.com>
12501
12502 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12503
2d8365c4
TT
125042017-02-10 Tom Tromey <tom@tromey.com>
12505
12506 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12507 "cleanup" local.
12508 * python/py-type.c (typy_legacy_template_argument): Remove
12509 unnecessary "cleanup" local.
12510
2bb8f231
TT
125112017-02-10 Tom Tromey <tom@tromey.com>
12512
12513 * python/python.c (do_start_initialization): New function, from
12514 _initialize_python.
12515 (_initialize_python): Call do_start_initialization.
12516 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12517 goto.
12518
1bdfaf42
TT
125192017-02-10 Tom Tromey <tom@tromey.com>
12520
12521 * python/py-prettyprint.c (pretty_print_one_value): Use
12522 gdbpy_ref.
12523
88b6faea
TT
125242017-02-10 Tom Tromey <tom@tromey.com>
12525
12526 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12527 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12528 gdbpy_ref.
12529 * python/py-type.c (field_new): Use gdbpy_ref.
12530 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12531 gdbpy_ref.
12532 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12533 (py_free_pspace): Likewise.
12534 (pspace_to_pspace_object): Likewise.
12535 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12536 (py_free_objfile): Likewise.
12537 (objfile_to_objfile_object): Likewise.
12538 * python/py-inferior.c (delete_thread_object): Use
12539 gdbpy_ref.
12540 (infpy_read_memory): Likewise.
12541 (py_free_inferior): Likewise.
12542 * python/py-evtregistry.c (create_eventregistry_object): Use
12543 gdbpy_ref.
12544 * python/py-event.c (create_event_object): Use gdbpy_ref.
12545
7780f186
TT
125462017-02-10 Tom Tromey <tom@tromey.com>
12547
12548 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12549 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12550 used.
12551 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12552 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12553 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12554 python/py-framefilter.c, python/py-function.c,
12555 python/py-inferior.c, python/py-infevents.c,
12556 python/py-linetable.c, python/py-newobjfileevent.c,
12557 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12558 python/py-signalevent.c, python/py-stopevent.c,
12559 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12560 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12561 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12562 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12563
d4b0bb18
TT
125642017-02-10 Tom Tromey <tom@tromey.com>
12565
12566 * ui-out.h (ui_out_emit_type): New class.
12567 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12568 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12569 and ui_out_emit_tuple.
12570 (enumerate_locals): Likewise.
12571 (py_mi_print_variables, py_print_locals, py_print_args): Use
12572 ui_out_emit_list.
12573 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12574 ui_out_emit_list.
12575 * common/gdb_optional.h: New file.
12576
f67f945c
MG
125772017-02-10 Martin Galvan <martingalvan@sourceware.org>
12578
12579 * MAINTAINERS (Write After Approval): Update my e-mail address.
12580
18da0c51
MG
125812017-02-10 Martin Galvan <martingalvan@sourceware.org>
12582
12583 PR gdb/21122
12584 * breakpoint.c (_initialize_breakpoint): Update the help description
12585 of the 'commands' command to indicate that it takes a list argument.
12586
62c14536
SM
125872017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12588
12589 * interps.c (current_interp_set_logging): Remove "return".
12590
ff6fa247
GB
125912017-02-09 Gary Benson <gbenson@redhat.com>
12592
12593 * symtab.c (add_symtab_completions): Prevent NULL pointer
12594 dereference.
12595
a474bd8e
PA
125962017-02-08 Pedro Alves <palves@redhat.com>
12597
12598 * interps.c (interp::interp): Remove reference to quiet_p.
12599 (interp_set): Make static. Remove dead "Switching to" output
12600 code.
12601 (interp_quiet_p, interp_set_quiet): Delete.
12602 (interpreter_exec_cmd): Don't set the interpreter quiet.
12603 * interps.h (interp_quiet_p): Make static.
12604 (class interp) <quiet_p>: Remove field
12605
3d7b173c
JG
126062017-02-08 Jerome Guitton <guitton@adacore.com>
12607
604c4576
JG
12608 * cli/cli-decode.c (find_command_name_length): Make it extern.
12609 * cli/cli-decode.h (find_command_name_length): Declare.
12610 * cli/cli-script.c (command_name_equals, line_first_arg):
12611 New functions.
12612 (process_next_line): Use cli-decode to parse command names.
12613 (build_command_line): Make args a constant pointer.
12614
126152017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 12616
3d7b173c
JG
12617 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12618 Remove case-insensitive search.
12619
1291063d
JM
126202017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12621
12622 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12623 at the end of the line. Avoids an ARI warning.
12624
20b477a7
LM
126252017-02-06 Luis Machado <lgustavo@codesourcery.com>
12626
12627 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12628 rdseed instructions.
12629 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12630
3f7b46f2
IR
126312017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12632
12633 PR tdep/20936
12634 Provide and use sparc32 and sparc64 target description XML files.
12635 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12636 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12637 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12638 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12639 * features/sparc/sparc32-solaris.xml: New file.
12640 * features/sparc/sparc64-solaris.xml: New file.
12641 * features/sparc/sparc32-solaris.c: Generated.
12642 * features/sparc/sparc64-solaris.c: Generated.
12643 * sparc-tdep.h: Account for differences in target descriptions.
12644 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12645 (sparc32_register_type): Use target provided registers.
12646 (validate_tdesc_registers): New function.
12647 (sparc32_gdbarch_init): Use tdesc_has_registers.
12648 Set pseudoregister functions.
12649 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12650 (sparc64_register_type): Use target provided registers.
12651 (sparc64_init_abi): Set pseudoregister functions.
12652
f0fd41c1
TT
126532017-02-03 Tom Tromey <tom@tromey.com>
12654
12655 PR rust/21097:
12656 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12657 with a single member.
12658
d6f9b0fb
PA
126592017-02-03 Pedro Alves <palves@redhat.com>
12660
12661 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12662 (cli_interp_base::~cli_interp_base): New.
12663 (cli_interp): New struct.
12664 (as_cli_interp): Cast the interp itself to cli_interp.
12665 (cli_interpreter_pre_command_loop): Rename to ...
12666 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12667 parameter.
12668 (cli_interpreter_init): Rename to ...
12669 (cli_interp::init): ... this. Remove 'self' parameter. Use
12670 boolean. Make extern.
12671 (cli_interpreter_resume): Rename to ...
12672 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12673 extern.
12674 (cli_interpreter_suspend): Rename to ...
12675 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12676 extern.
12677 (cli_interpreter_exec): Rename to ...
12678 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12679 extern.
12680 (cli_interpreter_supports_command_editing): Rename to ...
12681 (cli_interp_base::supports_command_editing): ... this. Remove
12682 'interp' parameter. Make extern.
12683 (cli_ui_out): Rename to ...
12684 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12685 Make extern.
12686 (cli_set_logging): Rename to ...
12687 (cli_interp_base::set_logging): ... this. Remove 'interp'
12688 parameter. Make extern.
12689 (cli_interp_procs): Delete.
12690 (cli_interp_factory): Adjust to use "new".
12691 * cli/cli-interp.h: Include "interps.h".
12692 (struct cli_interp_base): New struct.
12693 * interps.c (struct interp): Delete. Fields moved to interps.h.
12694 (interp_new): Delete.
12695 (interp::interp, interp::~interp): New.
12696 (interp_set): Use bool, and return void. Assume the interpreter
12697 has suspend, init and resume methods, and that the all return
12698 void.
12699 (set_top_level_interpreter): interp_set returns void.
12700 (interp_ui_out): Adapt.
12701 (current_interp_set_logging): Adapt.
12702 (interp_data): Delete.
12703 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12704 (interp_exec): Adapt.
12705 (top_level_interpreter_data): Delete.
12706 * interps.h (interp_init_ftype, interp_resume_ftype)
12707 (interp_suspend_ftype, interp_exec_ftype)
12708 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12709 (class interp): New.
12710 (interp_new): Delete.
12711 (interp_set): Now returns void. Use bool.
12712 (interp_data, top_level_interpreter_data): Delete.
12713 * mi/mi-common.h: Include interps.h.
12714 (class mi_interp): Inherit from interp. Define a ctor. Declare
12715 init, resume, suspect, exec, interp_ui_out, set_logging and
12716 pre_command_loop methods.
12717 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12718 (mi_interpreter_init): Rename to ...
12719 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12720 bool, return void and make extern. Adjust.
12721 (mi_interpreter_resume): ... Rename to ...
12722 (mi_interp::resume): ... this. Remove the 'data' parameter,
12723 return void and make extern. Adjust.
12724 (mi_interpreter_suspend): ... Rename to ...
12725 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12726 return void and make extern. Adjust.
12727 (mi_interpreter_exec): ... Rename to ...
12728 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12729 extern. Adjust.
12730 (mi_interpreter_pre_command_loop): ... Rename to ...
12731 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12732 parameter and make extern.
12733 (mi_on_normal_stop_1): Adjust.
12734 (mi_ui_out): Rename to ...
12735 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12736 parameter and make extern. Adjust.
12737 (mi_set_logging): Rename to ...
12738 (mi_interp::set_logging): ... this. Remove the 'interp'
12739 parameter and make extern. Adjust.
12740 (mi_interp_procs): Delete.
12741 (mi_interp_factory): Adjust to use 'new'.
12742 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12743 (mi_print_exception, mi_execute_command, mi_load_progress):
12744 Adjust.
12745 * tui/tui-interp.c (tui_interp): New class.
12746 (as_tui_interp): Return a tui_interp pointer.
12747 (tui_on_normal_stop, tui_on_signal_received)
12748 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12749 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12750 to use interp::interp_ui_out.
12751 (tui_init): Rename to ...
12752 (tui_interp::init): ... this. Remove the 'self' parameter, use
12753 bool, return void and make extern. Adjust.
12754 (tui_resume): Rename to ...
12755 (tui_interp::resume): ... this. Remove the 'data' parameter,
12756 return void and make extern. Adjust.
12757 (tui_suspend): Rename to ...
12758 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12759 return void and make extern. Adjust.
12760 (tui_ui_out): Rename to ...
12761 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12762 parameter, and make extern. Adjust.
12763 (tui_exec): Rename to ...
12764 (tui_interp::exec): ... this. Remove the 'data' parameter and
12765 make extern.
12766 (tui_interp_procs): Delete.
12767 (tui_interp_factory): Use "new".
12768
65c40c95
TT
127692017-02-02 Tom Tromey <tom@tromey.com>
12770
12771 * rust-exp.y (ends_raw_string, space_then_number)
12772 (rust_identifier_start_p): Return bool.
12773 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12774 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12775 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12776 (rust_chartype_p): Return bool.
12777 (val_print_struct, rust_print_struct_def, rust_print_type):
12778 Update.
12779 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12780 Return bool.
12781
b50f188d
TT
127822017-02-02 Tom Tromey <tom@tromey.com>
12783
12784 * rust-lang.c: Reindent.
12785
03c85b11
TT
127862017-02-02 Tom Tromey <tom@tromey.com>
12787
12788 * rust-lang.h (rust_crate_for_block): Update.
12789 * rust-lang.c (rust_crate_for_block): Return std::string.
12790 (rust_get_disr_info): Use std:;string, not
12791 gdb::unique_xmalloc_ptr.
12792 * rust-exp.y (crate_name): Update.
12793
9b6da501
PA
127942017-02-02 Pedro Alves <palves@redhat.com>
12795
12796 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12797 field out of gdb_disassembler_test and make it static.
12798
ec4cb20b
PA
127992017-02-02 Pedro Alves <palves@redhat.com>
12800
12801 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12802 mi1_interp and mi_interp fields.
12803
5be5dbf0
PA
128042017-02-02 Pedro Alves <palves@redhat.com>
12805
616268b6
PA
12806 * cli/cli-interp.c (struct saved_output_files, saved_output):
12807 Moved from cli/cli-logging.c.
12808 (cli_set_logging): New function.
12809 (cli_interp_procs): Install cli_set_logging.
12810 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12811 Declare.
12812 * cli/cli-logging.c (struct saved_output_files, saved_output):
12813 Moved to cli/cli-interp.c.
12814 (pop_output_files): Don't save outputs here.
12815 (make_logging_output): New function.
12816 (handle_redirections): Don't build tee nor save previous outputs
12817 here.
12818 * interps.c (current_interp_set_logging): Change prototype.
12819 Assume there's always a set_logging_proc method installed.
12820 * interps.h (interp_set_logging_ftype): Change prototype.
12821 (current_interp_set_logging): Change prototype and adjust comment.
12822 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12823 use make_logging_output.
12824 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
128252017-02-02 Pedro Alves <palves@redhat.com>
12826
5be5dbf0
PA
12827 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12828 from ...
12829 (set_logging_overwrite): ... here.
12830 (logging_no_redirect_file): Delete.
12831 (set_logging_redirect): Don't handle redirection on the fly.
12832 Instead warn that "logging off" / "logging on" is necessary.
12833 (pop_output_files): Delete references to logging_no_redirect_file.
12834 (show_logging_command): Always speak in terms of what will happen
12835 once logging is reenabled.
12836
c99cc448
PA
128372017-02-02 Pedro Alves <palves@redhat.com>
12838
12839 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12840
8b172ce7
PA
128412017-02-02 Pedro Alves <palves@redhat.com>
12842
12843 * disasm.c (gdb_pretty_print_insn): Rename to ...
12844 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12845 Remove gdbarch parameter. Adapt to clear the object's buffers
12846 instead of allocating new buffers, and to print using the object's
12847 gdb_disassembler instead of calling gdb_print_insn.
12848 (dump_insns): Use gdb_pretty_print_disassembler.
12849 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12850 (gdb_pretty_print_disassembler): New class.
12851 * record-btrace.c (btrace_insn_history): Use
12852 gdb_pretty_print_disassembler.
12853
d7e74731
PA
128542017-02-02 Pedro Alves <palves@redhat.com>
12855
12856 * ada-lang.c (type_as_string): Use string_file.
12857 * ada-valprint.c (ada_print_floating): Use string_file.
12858 * ada-varobj.c (ada_varobj_scalar_image)
12859 (ada_varobj_get_value_image): Use string_file.
12860 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12861 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12862 * breakpoint.c (update_inserted_breakpoint_locations)
12863 (insert_breakpoint_locations, reattach_breakpoints)
12864 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12865 (print_it_watchpoint): Use string_file.
12866 (save_breakpoints): Use stdio_file.
12867 * c-exp.y (oper): Use string_file.
12868 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12869 tee_file.
12870 (pop_output_files): Use delete.
12871 (handle_redirections): Use stdio_file and tee_file.
12872 * cli/cli-setshow.c (do_show_command): Use string_file.
12873 * compile/compile-c-support.c (c_compute_program): Use
12874 string_file.
12875 * compile/compile-c-symbols.c (generate_vla_size): Take a
12876 'string_file &' instead of a 'ui_file *'.
12877 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12878 of a 'ui_file *'. Use string_file.
12879 (generate_c_for_variable_locations): Take a 'string_file &'
12880 instead of a 'ui_file *'.
12881 * compile/compile-internal.h (generate_c_for_for_one_variable):
12882 Take a 'string_file &' instead of a 'ui_file *'.
12883 * compile/compile-loc2c.c (push, pushf, unary, binary)
12884 (print_label, pushf_register_address, pushf_register)
12885 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12886 'ui_file *'. Adjust.
12887 * compile/compile.c (compile_to_object): Use string_file.
12888 * compile/compile.h (compile_dwarf_expr_to_c)
12889 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12890 'ui_file *'.
12891 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12892 (replace_typedefs_qualified_name): Use string_file and
12893 obstack_copy0.
12894 * disasm.c (gdb_pretty_print_insn): Use string_file.
12895 (gdb_disassembly): Adjust reference the null_stream global.
12896 (do_ui_file_delete): Delete.
12897 (gdb_insn_length): Use null_stream.
12898 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12899 * dwarf2loc.c (dwarf2_compile_property_to_c)
12900 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12901 'string_file &' instead of a 'ui_file *'.
12902 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12903 * dwarf2read.c (do_ui_file_peek_last): Delete.
12904 (dwarf2_compute_name): Use string_file.
12905 * event-top.c (gdb_setup_readline): Use stdio_file.
12906 * gdbarch.sh (verify_gdbarch): Use string_file.
12907 * gdbtypes.c (safe_parse_type): Use null_stream.
12908 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
12909 string_file.
12910 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
12911 'string_file *' instead of a 'ui_file *'.
12912 (gdbscm_arch_disassemble): Use string_file.
12913 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
12914 * guile/scm-ports.c (class ioscm_file_port): Now a class that
12915 inherits from ui_file.
12916 (ioscm_file_port_delete, ioscm_file_port_rewind)
12917 (ioscm_file_port_put): Delete.
12918 (ioscm_file_port_write): Rename to ...
12919 (ioscm_file_port::write): ... this. Remove file_port_magic
12920 checks.
12921 (ioscm_file_port_new): Delete.
12922 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
12923 ui_file_up.
12924 * guile/scm-type.c (tyscm_type_name): Use string_file.
12925 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
12926 Use string_file.
12927 * infcmd.c (print_return_value_1): Use string_file.
12928 * infrun.c (print_target_wait_results): Use string_file.
12929 * language.c (add_language): Use string_file.
12930 * location.c (explicit_to_string_internal): Use string_file.
12931 * main.c (captured_main_1): Use null_file.
12932 * maint.c (maintenance_print_architecture): Use stdio_file.
12933 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
12934 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
12935 event_channel>: Change type to mi_console_file pointer.
12936 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
12937 (mi_console_file_delete): Delete.
12938 (struct mi_console_file): Delete.
12939 (mi_console_file_magic): Delete.
12940 (mi_console_file_new): Delete.
12941 (mi_console_file::mi_console_file): New.
12942 (mi_console_file_delete): Delete.
12943 (mi_console_file_fputs): Delete.
12944 (mi_console_file::write): New.
12945 (mi_console_raw_packet): Delete.
12946 (mi_console_file::flush): New.
12947 (mi_console_file_flush): Delete.
12948 (mi_console_set_raw): Rename to ...
12949 (mi_console_file::set_raw): ... this.
12950 * mi/mi-console.h (class mi_console_file): New class.
12951 (mi_console_file_new, mi_console_set_raw): Delete.
12952 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
12953 (mi_set_logging): Use delete and tee_file. Adjust.
12954 * mi/mi-main.c (output_register): Use string_file.
12955 (mi_cmd_data_evaluate_expression): Use string_file.
12956 (mi_cmd_data_read_memory): Use string_file.
12957 (mi_cmd_execute, print_variable_or_computed): Use string_file.
12958 * mi/mi-out.c (mi_ui_out::main_stream): New.
12959 (mi_ui_out::rewind): Use main_stream and
12960 string_file.
12961 (mi_ui_out::put): Use main_stream and string_file.
12962 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12963 Allocate a 'string_file' instead.
12964 (mi_out_new): Don't allocate a mem_fileopen stream here.
12965 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
12966 (mi_ui_out::main_stream): Declare method.
12967 * printcmd.c (eval_command): Use string_file.
12968 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
12969 * python/py-arch.c (archpy_disassemble): Use string_file.
12970 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
12971 * python/py-frame.c (frapy_str): Use string_file.
12972 * python/py-framefilter.c (py_print_type, py_print_single_arg):
12973 Use string_file.
12974 * python/py-type.c (typy_str): Use string_file.
12975 * python/py-unwind.c (unwind_infopy_str): Use string_file.
12976 * python/py-value.c (valpy_str): Use string_file.
12977 * record-btrace.c (btrace_insn_history): Use string_file.
12978 * regcache.c (regcache_print): Use stdio_file.
12979 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
12980 * remote.c (escape_buffer): Use string_file.
12981 * rust-lang.c (rust_get_disr_info): Use string_file.
12982 * serial.c (serial_open_ops_1): Use stdio_file.
12983 (do_serial_close): Use delete.
12984 * stack.c (print_frame_arg): Use string_file.
12985 (print_frame_args): Remove local mem_fileopen stream, not used.
12986 (print_frame): Use string_file.
12987 * symmisc.c (maintenance_print_symbols): Use stdio_file.
12988 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
12989 Take a 'string_file *' instead of a 'ui_file *'.
12990 * top.c (new_ui): Use stdio_file and stderr_file.
12991 (free_ui): Use delete.
12992 (execute_command_to_string): Use string_file.
12993 (quit_confirm): Use string_file.
12994 * tracepoint.c (collection_list::append_exp): Use string_file.
12995 * tui/tui-disasm.c (tui_disassemble): Use string_file.
12996 * tui/tui-file.c: Don't include "ui-file.h".
12997 (enum streamtype, struct tui_stream): Delete.
12998 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
12999 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13000 (tui_file::tui_file): New method.
13001 (tui_file_fputs): Delete.
13002 (tui_file_get_strbuf): Delete.
13003 (tui_file::puts): New method.
13004 (tui_file_adjust_strbuf): Delete.
13005 (tui_file_flush): Delete.
13006 (tui_file::flush): New method.
13007 * tui/tui-file.h: Tweak intro comment.
13008 Include ui-file.h.
13009 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13010 (tui_file_adjust_strbuf): Delete declarations.
13011 (class tui_file): New class.
13012 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13013 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13014 (tui_register_format): Use string_stream.
13015 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13016 (tui_get_function_from_frame): Use string_file.
13017 * typeprint.c (type_to_string): Use string_file.
13018 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13019 (null_stream): New global.
13020 (ui_file_delete): Delete.
13021 (ui_file::ui_file): New.
13022 (null_file_isatty): Delete.
13023 (ui_file::~ui_file): New.
13024 (null_file_rewind): Delete.
13025 (ui_file::printf): New.
13026 (null_file_put): Delete.
13027 (null_file_flush): Delete.
13028 (ui_file::putstr): New.
13029 (null_file_write): Delete.
13030 (ui_file::putstrn): New.
13031 (null_file_read): Delete.
13032 (ui_file::putc): New.
13033 (null_file_fputs): Delete.
13034 (null_file_write_async_safe): Delete.
13035 (ui_file::vprintf): New.
13036 (null_file_delete): Delete.
13037 (null_file::write): New.
13038 (null_file_fseek): Delete.
13039 (null_file::puts): New.
13040 (ui_file_data): Delete.
13041 (null_file::write_async_safe): New.
13042 (gdb_flush, ui_file_isatty): Adjust.
13043 (ui_file_put, ui_file_rewind): Delete.
13044 (ui_file_write): Adjust.
13045 (ui_file_write_for_put): Delete.
13046 (ui_file_write_async_safe, ui_file_read): Adjust.
13047 (ui_file_fseek): Delete.
13048 (fputs_unfiltered): Adjust.
13049 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13050 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13051 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13052 (set_ui_file_data): Delete.
13053 (string_file::~string_file, string_file::write)
13054 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13055 (do_ui_file_as_string, ui_file_as_string): Delete.
13056 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13057 (struct mem_file): Delete.
13058 (mem_file_new): Delete.
13059 (stdio_file::stdio_file): New.
13060 (mem_file_delete): Delete.
13061 (stdio_file::stdio_file): New.
13062 (mem_fileopen): Delete.
13063 (stdio_file::~stdio_file): New.
13064 (mem_file_rewind): Delete.
13065 (stdio_file::set_stream): New.
13066 (mem_file_put): Delete.
13067 (stdio_file::open): New.
13068 (mem_file_write): Delete.
13069 (stdio_file_magic, struct stdio_file): Delete.
13070 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13071 (stdio_file::flush): New.
13072 (stdio_file_read): Rename to ...
13073 (stdio_file::read): ... this. Adjust.
13074 (stdio_file_write): Rename to ...
13075 (stdio_file::write): ... this. Adjust.
13076 (stdio_file_write_async_safe): Rename to ...
13077 (stdio_file::write_async_safe) ... this. Adjust.
13078 (stdio_file_fputs): Rename to ...
13079 (stdio_file::puts) ... this. Adjust.
13080 (stdio_file_isatty): Delete.
13081 (stdio_file_fseek): Delete.
13082 (stdio_file::isatty): New.
13083 (stderr_file_write): Rename to ...
13084 (stderr_file::write) ... this. Adjust.
13085 (stderr_file_fputs): Rename to ...
13086 (stderr_file::puts) ... this. Adjust.
13087 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13088 (stderr_file::stderr_file): New.
13089 (tee_file_magic): Delete.
13090 (struct tee_file): Delete.
13091 (tee_file::tee_file): New.
13092 (tee_file_new): Delete.
13093 (tee_file::~tee_file): New.
13094 (tee_file_delete): Delete.
13095 (tee_file_flush): Rename to ...
13096 (tee_file::flush): ... this. Adjust.
13097 (tee_file_write): Rename to ...
13098 (tee_file::write): ... this. Adjust.
13099 (tee_file::write_async_safe): New.
13100 (tee_file_fputs): Rename to ...
13101 (tee_file::puts): ... this. Adjust.
13102 (tee_file_isatty): Rename to ...
13103 (tee_file::isatty): ... this. Adjust.
13104 * ui-file.h (struct obstack, struct ui_file): Don't
13105 forward-declare.
13106 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13107 (ui_file_write_ftype)
13108 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13109 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13110 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13111 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13112 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13113 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13114 (set_ui_file_fseek): Delete.
13115 (ui_file_data, ui_file_delete, ui_file_rewind)
13116 (struct ui_file): New.
13117 (ui_file_up): New.
13118 (class null_file): New.
13119 (null_stream): Declare.
13120 (ui_file_write_for_put, ui_file_put): Delete.
13121 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13122 Delete.
13123 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13124 (gdb_fopen, tee_file_new): Delete.
13125 (struct string_file): New.
13126 (struct stdio_file): New.
13127 (stdio_file_up): New.
13128 (struct stderr_file): New.
13129 (class tee_file): New.
13130 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13131 of a 'ui_file *'. Adjust.
13132 * ui-out.h (class ui_out) <field_stream>: Likewise.
13133 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13134 (null_stream): Delete.
13135 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13136 Adjust.
13137 * utils.h (struct ui_file): Delete forward declaration..
13138 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13139 (error_stream): Take a 'string_file &' instead of a
13140 'ui_file *'.
13141 * varobj.c (varobj_value_get_print_value): Use string_file.
13142 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13143 * gdbarch.c: Regenerate.
13144
187808b0
PA
131452017-02-02 Pedro Alves <palves@redhat.com>
13146
13147 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13148 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13149 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13150 Adjust to call gdb_print_insn instead of
13151 gdb_disassembler::print_insn.
13152 (dump_insns, do_mixed_source_and_assembly_deprecated)
13153 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13154 'gdbarch' parameter. Remove gdb_disassembler parameter.
13155 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13156 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13157 declaration.
13158 (gdb_pretty_print_insn): Re-add declaration.
13159 * record-btrace.c (btrace_insn_history): Don't allocate a
13160 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13161
7a8eb317
SM
131622017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13163
13164 * disasm.h (gdb_disassembly): Remove file_string parameter.
13165 * disasm.c (gdb_disassembly): Likewise.
13166 * cli/cli-cmds.c (print_disassembly): Adapt.
13167 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13168 * stack.c (do_gdb_disassembly): Likewise.
13169
7346ef59
AA
131702017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13171
13172 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13173 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13174 targets. And if the implicit value is longer than needed, extract
13175 the first bytes instead of the "least significant" ones.
13176
cd4007e4
MM
131772017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13178
13179 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13180 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13181 (btrace_fetch): Assert can_access_registers_ptid.
13182 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13183 validate_registers_access.
13184
cf77c34e
MM
131852017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13186
13187 * gdbthread.h (can_access_registers_ptid): New.
13188 * thread.c (can_access_registers_ptid): New.
13189
be85ce7d
PA
131902017-02-01 Pedro Alves <palves@redhat.com>
13191
13192 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13193
29b0b251
PA
131942017-01-31 Pedro Alves <palves@redhat.com>
13195
13196 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13197 Fix typos.
13198
289b5b24
PA
131992017-01-31 Pedro Alves <palves@redhat.com>
13200
13201 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13202 not used.
13203
b47413b4
PA
132042017-01-31 Pedro Alves <palves@redhat.com>
13205
13206 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13207
60adb36c
PA
132082017-01-31 Pedro Alves <palves@redhat.com>
13209
13210 * common/scoped_restore.h
13211 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13212 change the value's parameter type to T2.
13213 (make_scoped_restore): Likewise.
13214
2735833d
WT
132152017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13216 Richard Henderson <rth@redhat.com>
13217
13218 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13219 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13220 GS_BASE for older kernels.
13221 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13222 GS_BASE for older kernels.
13223 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13224 and GS_BASE to the offset table.
13225 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13226 system register group.
13227 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13228 for older kernels.
13229 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13230 amd64 ABI.
13231 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13232 AMD64_GSBASE_REGNUM.
13233 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13234 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13235 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13236 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13237 i386/64bit-segments.xml in those rules.
13238 * features/i386/64bit-segments.xml: New file.
13239 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13240 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13241 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13242 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13243 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13244 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13245 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13246 * features/i386/amd64-avx-linux.c: Regenerated.
13247 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13248 * features/i386/amd64-avx-mpx.c: Regenerated.
13249 * features/i386/amd64-avx512-linux.c: Regenerated.
13250 * features/i386/amd64-linux.c: Regenerated.
13251 * features/i386/amd64-mpx-linux.c: Regenerated.
13252 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13253 * features/i386/i386-avx-mpx.c: Regenerated.
13254 * features/i386/x32-avx-linux.c: Regenerated.
13255 * features/i386/x32-avx512-linux.c: Regenerated.
13256 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13257 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13258 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13259 * regformats/i386/amd64-linux.dat: Regenerated.
13260 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13261 * regformats/i386/x32-avx-linux.dat: Regenerated.
13262 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13263 * regformats/i386/x32-linux.dat: Regenerated.
13264
8884e97e
WT
132652017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13266
13267 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13268 Set to AMD64_NUM_REGS.
13269
7005d26a
WT
132702017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13271
13272 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13273 that checks validity of a register number.
13274
4bd2e1b2
KC
132752017-01-27 Kees Cook <keescook@google.com>
13276
13277 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13278 fetch_fpregs if target has fpa registers.
13279 (arm_linux_store_inferior_registers): Call store_fpregs if target
13280 has fpa registers.
13281
7cf1de6c
AA
132822017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13283
13284 * cris-tdep.c (cris_gdbarch_init): Remove check for
13285 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13286
874a1c8c
AT
132872017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13288
13289 * corelow.c (get_core_register_section): Check for regset
13290 existence before checking for REGSET_VARIABLE_SIZE.
13291
d8b49cf0
YQ
132922017-01-26 Yao Qi <yao.qi@linaro.org>
13293 Pedro Alves <palves@redhat.com>
13294
13295 PR gdb/20939
13296 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13297 call memory_error, save memaddr instead.
13298 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13299 negative, cal memory_error.
13300 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13301
658ca58c
YQ
133022017-01-26 Yao Qi <yao.qi@linaro.org>
13303
13304 * disasm-selftests.c (memory_error_test): New function.
13305 (_initialize_disasm_selftests): Register memory_error_test.
13306
79843d45
YQ
133072017-01-26 Yao Qi <yao.qi@linaro.org>
13308
13309 * Makefile.in (SFILES): Add disasm-selftests.c and
13310 selftest-arch.c.
13311 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13312 * disasm-selftests.c: New file.
13313 * selftest-arch.c: New file.
13314 * selftest-arch.h: New file.
13315
8cafda32
YQ
133162017-01-26 Yao Qi <yao.qi@linaro.org>
13317
13318 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13319 to bfd_arch_mep. Don't return 0 if section is not
13320 found. Call print_insn_mep.
13321
e47ad6c0
YQ
133222017-01-26 Pedro Alves <palves@redhat.com>
13323 Yao Qi <yao.qi@linaro.org>
13324
13325 * arm-tdep.c: Include "disasm.h".
13326 (gdb_print_insn_arm): Update code to get gdbarch.
13327 * disasm.c (dis_asm_read_memory): Change it to
13328 gdb_disassembler::dis_asm_read_memory.
13329 (dis_asm_memory_error): Likewise.
13330 (dis_asm_print_address): Likewise.
13331 (gdb_pretty_print_insn): Change it to
13332 gdb_disassembler::pretty_print_insn.
13333 (dump_insns): Add one argument gdb_disassemlber. All
13334 callers updated.
13335 (do_mixed_source_and_assembly_deprecated): Likewise.
13336 (do_mixed_source_and_assembly): Likewise.
13337 (do_assembly_only): Likewise.
13338 (gdb_disassembler::gdb_disassembler): New.
13339 (gdb_disassembler::print_insn): New.
13340 * disasm.h (class gdb_disassembler): New.
13341 (gdb_pretty_print_insn): Remove declaration.
13342 (gdb_disassemble_info): Likewise.
13343 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13344 (gdbscm_disasm_read_memory_worker): Update.
13345 (gdbscm_disasm_read_memory): Update.
13346 (gdbscm_disasm_memory_error): Remove.
13347 (gdbscm_disasm_print_address): Remove.
13348 (gdbscm_disassembler::gdbscm_disassembler): New.
13349 (gdbscm_print_insn_from_port): Update.
13350 * mips-tdep.c: Include disasm.h.
13351 (gdb_print_insn_mips): Update code to get gdbarch.
13352 * record-btrace.c (btrace_insn_history): Update.
13353 * spu-tdep.c: Include disasm.h.
13354 (struct spu_dis_asm_data): Remove.
13355 (struct spu_dis_asm_info): New.
13356 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13357 SPU id.
13358 (gdb_print_insn_spu): Cast disassemble_info to
13359 spu_dis_asm_info.
13360
80d75874
YQ
133612017-01-26 Yao Qi <yao.qi@linaro.org>
13362
13363 * disasm.c (do_ui_file_delete): Delete.
13364 (gdb_insn_length): Move code creating stream to ...
13365 * utils.c (null_stream): ... here. New function.
13366 * utils.h (null_stream): Declare.
13367
60685cd0
SM
133682017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13369
13370 * python/py-inferior.c (find_thread_object): Return directly
13371 from the loop. Remove "found" variable.
13372
eb1cdb62
JB
133732017-01-21 Joel Brobecker <brobecker@adacore.com>
13374
13375 GDB 7.12.1 released.
13376
b1ce6568
SM
133772017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13378
13379 * python/py-function.c (fnpy_call): Reorder declarations to have
13380 the gdbpy_enter object declared first.
13381 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13382
6f8b0407
SM
133832017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13384
fec93fb1 13385 PR python/21068
6f8b0407
SM
13386 * python/python-internal.h (PyMem_RawMalloc): Define for
13387 Python < 3.4.
13388 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13389 PyMem_RawMalloc instead of PyMem_Malloc.
13390
78cbbba8
LM
133912017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13392 Luis Machado <lgustavo@codesourcery.com>
13393
13394 * NEWS (New commands): Mention flash-erase.
13395 (New MI commands): Mention target-flash-erase.
13396 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13397 command.
13398 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13399 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13400 * target.c (flash_erase_command): New function.
13401 (initialize_targets): Add new flash-erase command.
13402 * target.h (flash_erase_command): New declaration.
13403
2132fe85
JB
134042017-01-20 Joel Brobecker <brobecker@adacore.com>
13405
13406 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13407 HAVE_SYS_PROCFS_H is defined.
13408
d1dff226
AH
134092017-01-18 Alan Hayward <alan.hayward@arm.com>
13410
13411 * remote.c (struct cached_reg): Change data into a pointer.
13412 * (stop_reply_dtr): Free data pointers before deleting vector.
13413 (process_stop_reply): Likewise.
13414 (remote_parse_stop_reply): Allocate space for data
13415
9890e433
AH
134162017-01-18 Alan Hayward <alan.hayward@arm.com>
13417
13418 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13419 MAX_REGISTER_SIZE.
13420 (amd64_pseudo_register_read_value): Likewise.
13421 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13422 (store_register_using_P): Likewise.
13423 * regcache.c (regcache_xfer_part): Likewise.
13424
7a36499a
IR
134252017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13426
13427 Split real and pseudo registers.
13428 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13429 (sparc32_pseudo_regnum): New enum.
13430 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13431 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13432 (SPARC32_CP0_REGISTERS): New macro.
13433 (sparc32_pseudo_register_name): New function.
13434 (sparc32_register_name): Use sparc32_pseudo_register_name.
13435 (sparc32_pseudo_register_type): New function.
13436 (sparc32_register_type): Use sparc32_pseudo_register_type.
13437 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13438 pseudo register numbers.
13439 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13440 (SPARC64_CP0_REGISTERS): New macro.
13441 (sparc64_pseudo_register_name): New function.
13442 (sparc64_register_name): Use sparc64_pseudo_register_name.
13443 (sparc64_pseudo_register_type): New function.
13444 (sparc64_register_type): Use sparc64_pseudo_register_type.
13445 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13446 pseudo register numbers.
13447 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13448 sparc64_store_arguments): Handle pseudo register numbers.
13449
6f8976bf
YQ
134502017-01-13 Yao Qi <yao.qi@linaro.org>
13451
13452 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13453 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13454 output.
13455 (getpkt_or_notif_sane_1): Likewise.
13456
e4241ace
YQ
134572017-01-13 Yao Qi <yao.qi@linaro.org>
13458
13459 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13460 of CC. Pass "-x c++-header" instead of "-x c".
13461
3015c064
SM
134622017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13463
13464 * remote.c (remote_can_async_p): Update comment.
13465
fde1b17d
SM
134662017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13467
13468 * linux-nat.c (linux_nat_can_async_p): Update comment.
13469
ca1ca08b
SM
134702017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13471
13472 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13473
4ad2da73
SM
134742017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13475
13476 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13477
c8b23b3f
TT
134782017-01-10 Tom Tromey <tom@tromey.com>
13479
13480 * python/py-type.c (typy_legacy_template_argument): Update.
13481 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13482 ~demangle_parse_info): Declare new members.
13483 (cp_demangled_name_to_comp): Return unique_ptr.
13484 (cp_demangled_name_parse_free)
13485 (make_cleanup_cp_demangled_name_parse_free)
13486 (cp_new_demangle_parse_info): Remove.
13487 * cp-support.c (do_demangled_name_parse_free_cleanup)
13488 (make_cleanup_cp_demangled_name_parse_free): Remove.
13489 (inspect_type, cp_canonicalize_string_full)
13490 (cp_canonicalize_string): Update.
13491 (mangled_name_to_comp): Change return type.
13492 (cp_class_name_from_physname, method_name_from_physname)
13493 (cp_func_name, cp_remove_params): Update.
13494 * cp-name-parser.y (demangle_parse_info): New constructor, from
13495 cp_new_demangle_parse_info.
13496 (~demangle_parse_info): New destructor, from
13497 cp_demangled_name_parse_free.
13498 (cp_merge_demangle_parse_infos): Update.
13499 (cp_demangled_name_to_comp): Change return type.
13500
1ac32117
TT
135012017-01-10 Tom Tromey <tom@tromey.com>
13502
13503 * top.c (prevent_dont_repeat): Change return type.
13504 * python/python.c (execute_gdb_command): Use std::string.
13505 Update.
13506 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13507 * command.h (prevent_dont_repeat): Change return type.
13508 * breakpoint.c (bpstat_do_actions_1): Update.
13509
0cf08227
TT
135102017-01-10 Tom Tromey <tom@tromey.com>
13511
13512 * value.h (scoped_value_mark::~scoped_value_mark): Call
13513 free_to_mark.
13514 (scoped_value_mark::free_to_mark): New method.
13515 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13516 scoped_value_mark.
13517
eb115069
TT
135182017-01-10 Tom Tromey <tom@tromey.com>
13519
13520 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13521 (valpy_reference_value, valpy_const_value, valpy_get_address)
13522 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13523 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13524 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13525 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13526 scoped_value_mark.
13527 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13528 * value.h (scoped_value_mark): New class.
13529
906768f9
TT
135302017-01-10 Tom Tromey <tom@tromey.com>
13531
13532 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13533 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13534 * psymtab.c (discard_psymtabs_upto): Remove.
13535 (make_cleanup_discard_psymtabs): Remove.
13536 (struct psymtab_state): Remove.
13537
bef155c3
TT
135382017-01-10 Tom Tromey <tom@tromey.com>
13539
13540 * record-full.c (record_full_save_cleanups): Remove.
13541 (record_full_save): Use gdb::unlinker.
13542 * gcore.c (do_bfd_delete_cleanup): Remove.
13543 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13544 cleanups.
13545 * dwarf2read.c (unlink_if_set): Remove.
13546 (write_psymtabs_to_index): Use gdb::unlinker.
13547 * common/gdb_unlinker.h: New file.
13548
192b62ce
TT
135492017-01-10 Tom Tromey <tom@tromey.com>
13550
13551 * windows-tdep.c (windows_xfer_shared_library): Update.
13552 * windows-nat.c (windows_make_so): Update.
13553 * utils.h (make_cleanup_bfd_unref): Remove.
13554 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13555 * symfile.h (symfile_bfd_open)
13556 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13557 * symfile.c (read_symbols, symbol_file_add)
13558 (separate_debug_file_exists): Update.
13559 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13560 (generic_load, reread_symbols): Update.
13561 * symfile-mem.c (symbol_file_add_from_memory): Update.
13562 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13563 (spu_symbol_file_add_from_memory): Update.
13564 * solist.h (struct target_so_ops) <bfd_open>: Return
13565 gdb_bfd_ref_ptr.
13566 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13567 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13568 gdb_bfd_ref_ptr.
13569 (solib_map_sections, reload_shared_libraries_1): Update.
13570 * solib-svr4.c (enable_break): Update.
13571 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13572 * solib-frv.c (enable_break2): Update.
13573 * solib-dsbt.c (enable_break): Update.
13574 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13575 gdb_bfd_ref_ptr.
13576 (darwin_solib_get_all_image_info_addr_at_init): Update.
13577 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13578 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13579 * record-full.c (record_full_save): Update.
13580 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13581 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13582 * minidebug.c (find_separate_debug_file_in_section): Return
13583 gdb_bfd_ref_ptr.
13584 * machoread.c (macho_add_oso_symfile): Change abfd to
13585 gdb_bfd_ref_ptr.
13586 (macho_symfile_read_all_oso): Update.
13587 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13588 (macho_symfile_read): Update.
13589 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13590 (jit_bfd_try_read_symtab): Update.
13591 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13592 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13593 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13594 gdb_bfd_ref_ptr.
13595 (gdb_bfd_ref_policy): New struct.
13596 (gdb_bfd_ref_ptr): New typedef.
13597 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13598 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13599 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13600 gdb_bfd_ref_ptr.
13601 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13602 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13603 (gcore_command): Update.
13604 * exec.c (exec_file_attach): Update.
13605 * elfread.c (elf_symfile_read): Update.
13606 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13607 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13608 (open_and_init_dwo_file): Update.
13609 (open_dwp_file): Return gdb_bfd_ref_ptr.
13610 (open_and_init_dwp_file): Update.
13611 * corelow.c (core_open): Update.
13612 * compile/compile-object-load.c (compile_object_load): Update.
13613 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13614 * coffread.c (coff_symfile_read): Update.
13615 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13616 gdb_bfd_ref_ptr. Rename.
13617 (dump_bfd_file, restore_command): Update.
13618 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13619 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13620 (find_separate_debug_file_by_buildid): Update.
13621
50315b21
TT
136222017-01-10 Tom Tromey <tom@tromey.com>
13623
13624 * common/gdb_ref_ptr.h: New file.
13625 * python/py-ref.h (struct gdbpy_ref_policy): New.
13626 (gdbpy_ref): Now a typedef.
13627
fc4007c9
TT
136282017-01-10 Tom Tromey <tom@tromey.com>
13629
13630 * utils.h (make_cleanup_htab_delete): Don't declare.
13631 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13632 Remove.
13633 * linespec.c (decode_compound_collector): Add constructor,
13634 destructor.
13635 (lookup_prefix_sym): Remove cleanup.
13636 (symtab_collector): Add constructor, destructor.
13637 (collect_symtabs_from_filename): Remove cleanup.
13638 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13639 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13640 Use htab_up.
13641 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13642 * dwarf2read.c (dw2_expand_symtabs_matching)
13643 (dw2_map_symbol_filenames, dwarf_decode_macros)
13644 (write_psymtabs_to_index): Use htab_up.
13645 * dwarf2loc.c (func_verify_no_selftailcall)
13646 (call_site_find_chain_1, func_verify_no_selftailcall)
13647 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13648 std::vector, gdb::unique_xmalloc_ptr.
13649 (call_sitep): Remove typedef.
13650 (dwarf2_locexpr_baton_eval): Remove unused variable.
13651
8dbcee67
TT
136522017-01-10 Tom Tromey <tom@tromey.com>
13653
13654 * python/python-internal.h (make_cleanup_py_decref)
13655 (make_cleanup_py_xdecref): Don't declare.
13656 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13657 (py_xdecref, make_cleanup_py_xdecref): Remove.
13658
13df46cc
TT
136592017-01-10 Tom Tromey <tom@tromey.com>
13660
13661 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13662 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13663
06fc9bf7
TT
136642017-01-10 Tom Tromey <tom@tromey.com>
13665
13666 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13667
830a4934
TT
136682017-01-10 Tom Tromey <tom@tromey.com>
13669
13670 * python/py-utils.c (unicode_to_encoded_string)
13671 (python_string_to_target_string)
13672 (python_string_to_target_python_string)
13673 (python_string_to_host_string, gdbpy_obj_to_string)
13674 (get_addr_from_python): Use gdbpy_ref.
13675
4586d543
TT
136762017-01-10 Tom Tromey <tom@tromey.com>
13677
13678 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13679 gdbpy_ref.
13680
59876f8f
TT
136812017-01-10 Tom Tromey <tom@tromey.com>
13682
13683 * python/python.c (eval_python_command, gdbpy_decode_line)
13684 (gdbpy_run_events, gdbpy_start_type_printers)
13685 (gdbpy_apply_type_printers): Use gdbpy_ref.
13686
97d83487
TT
136872017-01-10 Tom Tromey <tom@tromey.com>
13688
13689 * python/py-param.c (get_doc_string, compute_enum_values): Use
13690 gdbpy_ref.
13691
9205649a
TT
136922017-01-10 Tom Tromey <tom@tromey.com>
13693
13694 * python/py-inferior.c (find_thread_object, build_inferior_list):
13695 Use gdbpy_ref.
13696
74c49d45
TT
136972017-01-10 Tom Tromey <tom@tromey.com>
13698
13699 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13700
16361ffb
TT
137012017-01-10 Tom Tromey <tom@tromey.com>
13702
13703 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13704 gdbpy_ref.
13705
905f2cca
TT
137062017-01-10 Tom Tromey <tom@tromey.com>
13707
13708 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13709 extra incref.
13710 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13711 Use gdbpy_ref.
13712
64081434
TT
137132017-01-10 Tom Tromey <tom@tromey.com>
13714
13715 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13716 gdbpy_ref.
13717
59e9e831
TT
137182017-01-10 Tom Tromey <tom@tromey.com>
13719
13720 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13721 decref results of PyArg_ParseTupleAndKeywords.
13722
9de10f6d
TT
137232017-01-10 Tom Tromey <tom@tromey.com>
13724
13725 * python/python.c (python_run_simple_file): Use
13726 unique_xmalloc_ptr, gdbpy_ref.
13727
2bd5759d
TT
137282017-01-10 Tom Tromey <tom@tromey.com>
13729
13730 * python/py-prettyprint.c (print_stack_unless_memory_error)
13731 (print_string_repr, print_children): Use gdbpy_ref.
13732 (dummy_python_frame): New class.
13733 (dummy_python_frame::dummy_python_frame): Rename from
13734 push_dummy_python_frame.
13735 (py_restore_tstate): Remove.
13736
3b4e0e01
TT
137372017-01-10 Tom Tromey <tom@tromey.com>
13738
13739 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13740
17a22718
TT
137412017-01-10 Tom Tromey <tom@tromey.com>
13742
13743 * python/python.c (ensure_python_env, restore_python_env):
13744 Remove.
13745 * python/python-internal.h (ensure_python_env): Don't declare.
13746 * varobj.h (varobj_ensure_python_env): Don't declare.
13747 * varobj.c (varobj_ensure_python_env): Remove.
13748
68cdc557
TT
137492017-01-10 Tom Tromey <tom@tromey.com>
13750
13751 * varobj.c (varobj_value_get_print_value): Use
13752 gdbpy_enter_varobj.
13753
1eba6383
TT
137542017-01-10 Tom Tromey <tom@tromey.com>
13755
13756 * python/py-prettyprint.c (print_string_repr, print_children):
13757 Update.
13758 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13759 of "encoding".
13760 * varobj.c (varobj_value_get_print_value): Update.
13761 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13762
bde7b3e3
TT
137632017-01-10 Tom Tromey <tom@tromey.com>
13764
13765 * varobj.c (varobj_get_display_hint)
13766 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13767 (varobj_set_visualizer, free_variable): Use
13768 gdbpy_enter_varobj.
13769
a7785f8c
TT
137702017-01-10 Tom Tromey <tom@tromey.com>
13771
13772 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13773 (do_finish_initialization): New function. Use gdbpy_ref.
13774 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13775 do_finish_initialization.
13776
2865bfce
TT
137772017-01-10 Tom Tromey <tom@tromey.com>
13778
13779 * python/py-param.c (get_set_value, get_show_value): Use
13780 gdbpy_enter, gdbpy_ref.
13781
0e9dcc75
TT
137822017-01-10 Tom Tromey <tom@tromey.com>
13783
13784 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13785
12a5cedd
TT
137862017-01-10 Tom Tromey <tom@tromey.com>
13787
13788 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13789
788f2586
TT
137902017-01-10 Tom Tromey <tom@tromey.com>
13791
13792 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13793 Use gdbpy_enter_varobj.
13794
6cd67bea
TT
137952017-01-10 Tom Tromey <tom@tromey.com>
13796
13797 * varobj.c (gdbpy_enter_varobj): New constructor.
13798 * python/python-internal.h (gdbpy_enter_varobj): New class.
13799 * python/py-varobj.c (py_varobj_get_iterator): Use
13800 gdbpy_enter_varobj.
13801
14b122bf
TT
138022017-01-10 Tom Tromey <tom@tromey.com>
13803
13804 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13805 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13806 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13807 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13808 unique_xmalloc_ptr.
13809 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13810
bf1ca3b9
TT
138112017-01-10 Tom Tromey <tom@tromey.com>
13812
13813 * python/py-xmethods.c (invoke_match_method): Use
13814 gdbpy_ref.
13815
572a5524
TT
138162017-01-10 Tom Tromey <tom@tromey.com>
13817
13818 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13819 gdbpy_enter, gdbpy_ref.
13820
396a78b6
TT
138212017-01-10 Tom Tromey <tom@tromey.com>
13822
13823 * python/python.c (python_interactive_command): Use gdbpy_enter.
13824
a88b13c7
TT
138252017-01-10 Tom Tromey <tom@tromey.com>
13826
13827 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13828 gdbpy_ref.
13829
e9f0c363
TT
138302017-01-10 Tom Tromey <tom@tromey.com>
13831
13832 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13833 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13834
6349f452
TT
138352017-01-10 Tom Tromey <tom@tromey.com>
13836
13837 * utils.h (htab_deleter): New struct.
13838 (htab_up): New typedef.
13839 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13840 gdbpy_enter, gdbpy_ref, htab_up.
13841
c0171de6
TT
138422017-01-10 Tom Tromey <tom@tromey.com>
13843
13844 * python/py-unwind.c (pending_frame_invalidate): Remove.
13845 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13846
f18e226f
TT
138472017-01-10 Tom Tromey <tom@tromey.com>
13848
13849 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13850 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13851
c57af3f1
TT
138522017-01-10 Tom Tromey <tom@tromey.com>
13853
13854 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13855
60e600ec
TT
138562017-01-10 Tom Tromey <tom@tromey.com>
13857
13858 * python/python.c (gdbpy_eval_from_control_command)
13859 (gdbpy_source_script, gdbpy_run_events)
13860 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13861 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13862 gdbpy_enter.
13863
bf7da5b0
TT
138642017-01-10 Tom Tromey <tom@tromey.com>
13865
13866 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13867
2d38bced
TT
138682017-01-10 Tom Tromey <tom@tromey.com>
13869
13870 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13871
07bc7329
TT
138722017-01-10 Tom Tromey <tom@tromey.com>
13873
13874 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13875 (python_on_inferior_call_pre, python_on_inferior_call_post)
13876 (python_on_memory_change, python_on_register_change)
13877 (python_inferior_exit, python_new_objfile, add_thread_object)
13878 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13879
6e7c365e
TT
138802017-01-10 Tom Tromey <tom@tromey.com>
13881
13882 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13883 (bpfinishpy_handle_exit): Use gdbpy_enter.
13884
6ba0cd40
TT
138852017-01-10 Tom Tromey <tom@tromey.com>
13886
13887 * python/py-cmd.c (cmdpy_destroyer)
13888 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13889 gdbpy_enter.
13890
de2dc875
TT
138912017-01-10 Tom Tromey <tom@tromey.com>
13892
13893 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13894 gdbpy_enter.
13895 (gdbpy_breakpoint_has_cond): Likewise.
13896
4ecee2c4
TT
138972017-01-10 Tom Tromey <tom@tromey.com>
13898
13899 * python/python.c (gdbpy_enter): New constructor.
13900 (~gdbpy_enter): New destructor.
13901 (restore_python_env, ensure_python_env): Rewrite.
13902 * python/python-internal.h (gdbpy_enter): New class.
13903
37fce74f
TT
139042017-01-10 Tom Tromey <tom@tromey.com>
13905
13906 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
13907
53a0cca3
TT
139082017-01-10 Tom Tromey <tom@tromey.com>
13909
13910 * python/py-value.c (value_has_field, get_field_flag)
13911 (get_field_type, valpy_getitem, convert_value_from_python): Use
13912 gdbpy_ref.
13913
ff3724f5
TT
139142017-01-10 Tom Tromey <tom@tromey.com>
13915
13916 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
13917 gdbpy_ref.
13918
0700aea5
TT
139192017-01-10 Tom Tromey <tom@tromey.com>
13920
13921 * python/py-prettyprint.c (search_pp_list)
13922 (find_pretty_printer_from_objfiles)
13923 (find_pretty_printer_from_progspace)
13924 (find_pretty_printer_from_gdb, find_pretty_printer)
13925 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
13926 gdbpy_ref.
13927
1bb44c9f
TT
139282017-01-10 Tom Tromey <tom@tromey.com>
13929
13930 * python/py-param.c (call_doc_function): Use gdbpy_ref.
13931
87ce03fd
TT
139322017-01-10 Tom Tromey <tom@tromey.com>
13933
13934 * python/py-linetable.c (build_line_table_tuple_from_pcs)
13935 (ltpy_get_all_source_lines): Use gdbpy_ref.
13936
ee0a3fb8
TT
139372017-01-10 Tom Tromey <tom@tromey.com>
13938
13939 * python/py-framefilter.c (extract_sym, extract_value)
13940 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
13941 gdbpy_ref.
13942
bf2a52fa
TT
139432017-01-10 Tom Tromey <tom@tromey.com>
13944
13945 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
13946
f59fe7f8
TT
139472017-01-10 Tom Tromey <tom@tromey.com>
13948
13949 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
13950
80bd970a
TT
139512017-01-10 Tom Tromey <tom@tromey.com>
13952
13953 * python/py-function.c (convert_values_to_python, fnpy_init): Use
13954 gdbpy_ref.
13955
d1b3de2e
TT
139562017-01-10 Tom Tromey <tom@tromey.com>
13957
13958 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
13959
3bb43384
TT
139602017-01-10 Tom Tromey <tom@tromey.com>
13961
13962 * python/py-type.c (convert_field, make_fielditem, typy_fields)
13963 (typy_range): Use gdbpy_ref.
13964
abf5651e
TT
139652017-01-10 Tom Tromey <tom@tromey.com>
13966
13967 * python/py-threadevent.c (create_thread_event_object): Use
13968 gdbpy_ref.
13969 * python/py-stopevent.c (create_stop_event_object): Simplify.
13970 (emit_stop_event): Use gdbpy_ref.
13971 * python/py-signalevent.c (create_signal_event_object): Use
13972 gdbpy_ref.
13973 * python/py-newobjfileevent.c (create_new_objfile_event_object)
13974 (emit_new_objfile_event, create_clear_objfiles_event_object)
13975 (emit_clear_objfiles_event): Use gdbpy_ref.
13976 * python/py-infevents.c (create_inferior_call_event_object)
13977 (create_register_changed_event_object)
13978 (create_memory_changed_event_object, emit_inferior_call_event)
13979 (emit_memory_changed_event, emit_register_changed_event): Use
13980 gdbpy_ref.
13981 * python/py-exitedevent.c (create_exited_event_object)
13982 (emit_exited_event): Use gdbpy_ref.
13983 * python/py-event.h (evpy_emit_event): Remove
13984 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
13985 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
13986 * python/py-continueevent.c (emit_continue_event): Use
13987 gdbpy_ref.
13988 * python/py-breakpoint.c (gdbpy_breakpoint_created)
13989 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
13990 gdbpy_ref.
13991 * python/py-bpevent.c (create_breakpoint_event_object): Use
13992 gdbpy_ref.
13993
a68ff33e
TT
139942017-01-10 Tom Tromey <tom@tromey.com>
13995
13996 * python/py-ref.h: New file.
13997
7becfd03
SM
139982017-01-10 Simon Marchi <simon.marchi@ericsson.com>
13999
14000 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14001 void.
14002 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14003 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14004 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14005 * ui-out.c (ui_out::redirect): Likewise.
14006 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14007 * cli/cli-logging.c (set_logging_redirect): Update call site of
14008 ui_out::redirect.
14009 (handle_redirections): Likewise.
14010 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14011 * top.c (execute_command_to_string): Likewise.
14012 * utils.c (do_ui_out_redirect_pop): Likewise.
14013
df294654
SM
140142017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14015
14016 * stack.c (_initialize_stack): Update "frame" command help message.
14017
f5e6296e
IB
140182017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14019
14020 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14021
0e2d6fa6
YQ
140222017-01-06 Yao Qi <yao.qi@linaro.org>
14023
14024 * x86-linux-nat.h: Include gdb_proc_service.h.
14025
44d6d3f9
YQ
140262017-01-06 Yao Qi <yao.qi@linaro.org>
14027
14028 * ser-base.h: Include serial.h.
14029
656731fe
YQ
140302017-01-06 Yao Qi <yao.qi@linaro.org>
14031
14032 * ppc-linux-tdep.h: Include ppc-tdep.h.
14033
1ca8f924
YQ
140342017-01-06 Yao Qi <yao.qi@linaro.org>
14035
14036 * nat/amd64-linux-siginfo.h: Include signal.h.
14037
bc3008c4
YQ
140382017-01-06 Yao Qi <yao.qi@linaro.org>
14039
14040 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14041
66c80d03
YQ
140422017-01-06 Yao Qi <yao.qi@linaro.org>
14043
14044 * mi/mi-parse.h: Include mi-cmds.h.
14045
051d2dda
YQ
140462017-01-06 Yao Qi <yao.qi@linaro.org>
14047
14048 * inf-loop.c: Don't include "target.h".
14049 * inf-loop.h: Include it here.
14050
8018d34f
YQ
140512017-01-06 Yao Qi <yao.qi@linaro.org>
14052
14053 * dfp.h: Include "dboulest.h" and "expression.h".
14054
c0b8369c
YQ
140552017-01-06 Yao Qi <yao.qi@linaro.org>
14056
14057 * ax-gdb.h: Include "ax.h".
14058
ad5cba2a
YQ
140592017-01-06 Yao Qi <yao.qi@linaro.org>
14060
14061 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14062 with nat/gdb_ptrace.h.
14063
1c33cd7f
YQ
140642017-01-05 Yao Qi <yao.qi@linaro.org>
14065
14066 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14067 new line.
14068 (mips64_fbsd_sigframe_init): Likewise.
14069
c988ac1d
JB
140702017-01-04 John Baldwin <jhb@FreeBSD.org>
14071
14072 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14073 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14074
b268007c
JB
140752017-01-04 John Baldwin <jhb@FreeBSD.org>
14076
14077 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14078 * NEWS: Mention new FreeBSD/mips native configuration.
14079 * config/mips/fbsd.mh: New file.
14080 * configure.host: Add mips*-*-freebsd*.
14081 * mips-fbsd-nat.c: New file.
14082
387360da
JB
140832017-01-04 John Baldwin <jhb@FreeBSD.org>
14084
14085 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14086 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14087 * NEWS: Mention new FreeBSD/mips target.
14088 * configure.tgt: Add mips*-*-freebsd*.
14089 * mips-fbsd-tdep.c: New file.
14090 * mips-fbsd-tdep.h: New file.
14091
2aaaf250
YQ
140922017-01-04 Yao Qi <yao.qi@linaro.org>
14093
14094 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14095 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14096
61baf725
JB
140972017-01-01 Joel Brobecker <brobecker@adacore.com>
14098
6dbb839a 14099 Update copyright year range in all GDB files.
61baf725 14100
c113e7ff 141012017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 14102
c113e7ff 14103 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 14104
c113e7ff 14105For older changes see ChangeLog-2016.
c906108c
SS
14106\f
14107Local Variables:
14108mode: change-log
14109left-margin: 8
14110fill-column: 74
14111version-control: never
57da7796 14112coding: utf-8
c906108c 14113End:
This page took 2.599271 seconds and 4 git commands to generate.