]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Introduce string_appendf/string_vappendf
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
31b833b3
PA
12017-10-30 Pedro Alves <palves@redhat.com>
2
3 * common/common-utils.c (string_appendf, string_vappendf): New
4 functions.
5 * common/common-utils.h (string_appendf, string_vappendf): New
6 declarations.
7 * unittests/common-utils-selftests.c (string_appendf_func)
8 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
9 (string_vappendf_tests): New functions.
10 (_initialize_common_utils_selftests): Register "string_appendf" and
11 "string_vappendf tests".
12
4a250334
PA
132017-10-30 Pedro Alves <palves@redhat.com>
14
15 * unittests/common-utils-selftests.c (format_func): New typedef.
16 (string_printf_tests, string_vprintf_tests): Tests factored out
17 and merged to ...
18 (test_format_func): ... this new function.
19 (string_printf_tests, string_vprintf_tests): Reimplement on top of
20 test_format_func.
21
16c5c17e
SM
222017-10-29 Simon Marchi <simon.marchi@ericsson.com>
23
24 * darwin-nat.c: Remove include of gdb.h.
25
7ca51576
SM
262017-10-29 Simon Marchi <simon.marchi@ericsson.com>
27
28 * xtensa-xtregs.c: Fix formatting issues.
29
c1342859
SM
302017-10-29 Simon Marchi <simon.marchi@ericsson.com>
31
32 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
33
484d8d36
MD
342017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
35
36 PR python/21213
37 * python/py-infthread.c (thpy_get_inferior): Increment reference
38 of inferior before returning it.
39
b5540b5f
SM
402017-10-27 Simon Marchi <simon.marchi@ericsson.com>
41
42 * unittests/common-utils-selftests.c (format): Add
43 ATTRIBUTE_PRINTF.
44
5a9dcda1
SM
452017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
46
47 * xml-syscall.c (struct syscall_desc): Add constructor.
48 <name>: Change type to std::string.
49 (syscall_desc_up): New typedef.
50 (syscall_desc_p): Remove typeder.
51 (DEF_VEC_P(syscall_desc_p)): Remove.
52 (struct syscall_group_desc): Add constructor.
53 <name>: Change type to std::string.
54 <syscalls>: Change type to std::vector.
55 (syscall_group_desc_up): New typedef.
56 (syscall_group_desc_p): Remove typedef.
57 (DEF_VEC_P(syscall_group_desc_p)): Remove.
58 (struct syscalls_info) <syscalls>: Change type to std::vector of
59 unique_ptr.
60 <groups>: Likewise.
61 <my_gdb_datadir>: Change type to std::string.
62 (syscalls_info_up): New typedef.
63 (allocate_syscalls_info): Remove.
64 (syscalls_info_free_syscalls_desc): Remove.
65 (syscalls_info_free_syscall_group_desc): Remove.
66 (free_syscalls_info): Remove.
67 (make_cleanup_free_syscalls_info): Remove.
68 (syscall_group_create_syscall_group_desc): Adjust.
69 (syscall_group_add_syscall): Adjust.
70 (syscall_create_syscall_desc): Adjust.
71 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
72 (init_syscalls_info): Adjust.
73 (syscall_group_get_group_by_name): Adjust.
74 (xml_get_syscall_number): Adjust.
75 (xml_get_syscall_name): Adjust.
76 (xml_list_of_syscalls): Adjust.
77 (xml_list_syscalls_by_group): Adjust.
78 (xml_list_of_groups): Adjust.
79
45461e0d
SM
802017-10-27 Simon Marchi <simon.marchi@ericsson.com>
81
82 * probe.h: Don't include gdb_vecs.h.
83 (DEF_VEC_P (probe_p)): Remove.
84 (find_probes_in_objfile): Return an std::vector.
85 * probe.c (find_probes_in_objfile): Likewise.
86 * breakpoint.c (breakpoint_objfile_data)
87 <longjmp_probes>: Change type to std::vector.
88 <exception_probes>: Likewise.
89 (free_breakpoint_probes): Don't manually free vectors.
90 (create_longjmp_master_breakpoint): Adjust.
91 (create_exception_master_breakpoint): Adjust.
92 * solib-svr4.c (svr4_create_probe_breakpoints): Change
93 parameter type, adjust.
94 (svr4_create_solib_event_breakpoints): Adjust.
95
43dce439
SM
962017-10-27 Simon Marchi <simon.marchi@ericsson.com>
97
98 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
99 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
100 with new.
101 (free_breakpoint_probes): Rename to ...
102 (free_breakpoint_objfile_data): ... this, and call delete on
103 bp_objfile_data..
104
6a1b9516
SM
1052017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
106
107 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
108 (loaded_script_ptr): Remove typedef.
109 (DEF_VEC_P (loaded_script_ptr)): Remove.
110 (struct collect_matching_scripts_data): Add constructor.
111 <scripts_p>: Change type to (pointer to) std::vector.
112 (collect_matching_scripts_data): Adjust.
113 (sort_scripts_by_name): Make suitable for std::sort.
114 (print_scripts): Don't sort vector, adjust to std::vector.
115 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
116
593e3209
SM
1172017-10-27 Simon Marchi <simon.marchi@ericsson.com>
118
119 * symfile.c (filename_language): Make struct, not typedef. Add
120 constructor.
121 <ext>: Change type to std::string.
122 (DEF_VEC_O (filename_language)): Remove.
123 (filename_language_table): Change type to std::vector.
124 (add_filename_language): Adjust.
125 (set_ext_lang_command): Adjust.
126 (info_ext_lang_command): Adjust.
127 (deduce_language_from_filename): Adjust.
128 (class scoped_restore_filename_language_table): Remove.
129 (test_filename_language): Use scoped_restore.
130 (test_set_ext_lang_command): Use scoped_restore, adjust to
131 std::vector change.
132
32fa66eb
SM
1332017-10-27 Simon Marchi <simon.marchi@ericsson.com>
134
135 * symfile.c: Include selftest.h.
136 (class scoped_restore_filename_language_table): New.
137 (test_filename_language): New test.
138 (test_set_ext_lang_command): New test.
139 (_initialize_symfile): Register tests.
140
4a27f119
KS
1412017-10-27 Keith Seitz <keiths@redhat.com>
142
143 * breakpoint.c (print_breakpoint_location): Use the symbol saved
144 in the bp_location, falling back to find_pc_sect_function when
145 needed.
146 (add_location_to_breakpoint): Save sal->symbol.
147 * breakpoint.h (struct bp_location) <symbol>: New field.
148 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
149 * symtab.h (struct symtab_and_line) <symbol>: New field.
150
a43f3893
PF
1512017-10-26 Patrick Frants <osscontribute@gmail.com>
152
7453e6b2 153 PR gdb/13669
a43f3893
PF
154 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
155 to rewind obstack.
156
23cc4e1b
PA
1572017-10-26 Pedro Alves <palves@redhat.com>
158
159 * remote.c (remote_async_terminal_ours_p): Delete.
160 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
161 Remove references to 'remote_async_terminal_ours_p'.
162
6abc18bb
YQ
1632017-10-26 Yao Qi <yao.qi@linaro.org>
164
165 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
166
bd522513
YQ
1672017-10-26 Yao Qi <yao.qi@linaro.org>
168
169 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
170 aspace const.
171 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
172 Likewise.
173 * breakpoint.c (bpstat_check_location): Remove cast.
174 (breakpoint_hit_catch_fork): Make aspce const.
175 (breakpoint_hit_catch_solib): Likewise.
176 (breakpoint_hit_catch_exec): Likewise.
177 (breakpoint_hit_ranged_breakpoint): Likewise.
178 (breakpoint_hit_watchpoint): Likewise.
179 (base_breakpoint_breakpoint_hit): Likewise.
180 (bkpt_breakpoint_hit): Likewise.
181 (dprintf_breakpoint_hit): Likewise.
182 (tracepoint_breakpoint_hit): Likewise.
183 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
184
accd0bcd
YQ
1852017-10-26 Yao Qi <yao.qi@linaro.org>
186
187 * breakpoint.c (breakpoint_location_address_match): Change
188 "struct address_space *" to "const address_space".
189 (breakpoint_location_address_range_overlap): Likewise.
190 (breakpoint_here_p): Likewise.
191 (breakpoint_in_range_p): Likewise.
192 (moribund_breakpoint_here_p): Likewise.
193 (bp_location_inserted_here_p): Likewise.
194 (software_breakpoint_inserted_here_p): Likewise.
195 (hardware_breakpoint_inserted_here_p): Likewise.
196 (hardware_watchpoint_inserted_in_range): Likewise.
197 (bpstat_check_location): Likewise.
198 (bpstat_stop_status): Likewise.
199 (breakpoint_address_match): Likewise.
200 (breakpoint_address_match_range): Likewise.
201 (breakpoint_location_address_match): Likewise.
202 (breakpoint_location_address_range_overlap): Likewise.
203 (insert_single_step_breakpoint): Likewise.
204 (breakpoint_has_location_inserted_here): Likewise.
205 (single_step_breakpoint_inserted_here_p): Likewise.
206 (pc_at_non_inline_function): Likewise.
207 * breakpoint.h (bpstat_stop_status): Update declaration.
208 (breakpoint_here_p): Likewise.
209 (breakpoint_in_range_p): Likewise.
210 (moribund_breakpoint_here_p): Likewise.
211 (breakpoint_inserted_here_p): Likewise.
212 (software_breakpoint_inserted_here_p): Likewise.
213 (hardware_breakpoint_inserted_here_p): Likewise.
214 (breakpoint_has_location_inserted_here): Likewise.
215 (single_step_breakpoint_inserted_here_p): Likewise.
216 (hardware_watchpoint_inserted_in_range): Likewise.
217 (breakpoint_address_match): Likewise.
218 (insert_single_step_breakpoint): Likewise.
219 (pc_at_non_inline_function): Likewise.
220 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
221 * record.c (record_check_stopped_by_breakpoint): Likewise.
222 * record.h (record_check_stopped_by_breakpoint): Likewise.
223 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
224
ac7936df
YQ
2252017-10-25 Yao Qi <yao.qi@linaro.org>
226
227 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
228 regcache->arch () instead get_regcache_arch.
229 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
230 Likewise.
231 (aarch64_fbsd_store_inferior_registers): Likewise.
232 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
233 (store_gregs_to_thread): Likewise.
234 (fetch_fpregs_from_thread): Likewise.
235 (store_fpregs_to_thread): Likewise.
236 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
237 (aarch64_store_return_value): Likewise.
238 (aarch64_software_single_step): Likewise.
239 * aix-thread.c (aix_thread_wait): Likewise.
240 (supply_reg32): Likewise.
241 (supply_sprs64): Likewise.
242 (supply_sprs32): Likewise.
243 (fill_gprs64): Likewise.
244 (fill_gprs32): Likewise.
245 (fill_sprs64): Likewise.
246 (fill_sprs32): Likewise.
247 (store_regs_user_thread): Likewise.
248 (store_regs_kernel_thread): Likewise.
249 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
250 (alphabsd_store_inferior_registers): Likewise.
251 * alpha-tdep.c (alpha_extract_return_value): Likewise.
252 (alpha_store_return_value): Likewise.
253 (alpha_deal_with_atomic_sequence): Likewise.
254 (alpha_next_pc): Likewise.
255 (alpha_software_single_step): Likewise.
256 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
257 (amd64bsd_store_inferior_registers): Likewise.
258 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
259 Likewise.
260 (amd64_linux_store_inferior_registers): Likewise.
261 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
262 (amd64_collect_native_gregset): Likewise.
263 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
264 (amd64obsd_collect_uthread): Likewise.
265 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
266 (amd64_collect_fpregset): Likewise.
267 (amd64_supply_fxsave): Likewise.
268 (amd64_supply_xsave): Likewise.
269 (amd64_collect_fxsave): Likewise.
270 (amd64_collect_xsave): Likewise.
271 * arc-tdep.c (arc_write_pc): Likewise.
272 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
273 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
274 (arm_fbsd_store_inferior_registers): Likewise.
275 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
276 (store_vfp_regs): Likewise.
277 (arm_linux_fetch_inferior_registers): Likewise.
278 (arm_linux_store_inferior_registers): Likewise.
279 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
280 (arm_linux_sigreturn_next_pc): Likewise.
281 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
282 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
283 (fetch_register): Likewise.
284 (store_register): Likewise.
285 * arm-tdep.c (arm_is_thumb): Likewise.
286 (displaced_in_arm_mode): Likewise.
287 (bx_write_pc): Likewise.
288 (arm_get_next_pcs_addr_bits_remove): Likewise.
289 (arm_software_single_step): Likewise.
290 (arm_extract_return_value): Likewise.
291 (arm_store_return_value): Likewise.
292 (arm_write_pc): Likewise.
293 * bfin-tdep.c (bfin_extract_return_value): Likewise.
294 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
295 (bsd_uthread_store_registers): Likewise.
296 * core-regset.c (fetch_core_registers): Likewise.
297 * corelow.c (get_core_registers): Likewise.
298 * cris-tdep.c (cris_store_return_value): Likewise.
299 (cris_extract_return_value): Likewise.
300 (find_step_target): Likewise.
301 (find_step_target): Likewise.
302 (cris_software_single_step): Likewise.
303 * ctf.c (ctf_fetch_registers): Likewise.
304 * darwin-nat.c (cancel_breakpoint): Likewise.
305 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
306 * frv-tdep.c (frv_extract_return_value): Likewise.
307 * ft32-tdep.c (ft32_store_return_value): Likewise.
308 (ft32_extract_return_value): Likewise.
309 * go32-nat.c (fetch_register): Likewise.
310 (go32_fetch_registers): Likewise.
311 (go32_store_registers): Likewise.
312 (store_register): Likewise.
313 * h8300-tdep.c (h8300_extract_return_value): Likewise.
314 (h8300_store_return_value): Likewise.
315 * hppa-linux-nat.c (fetch_register): Likewise.
316 (store_register): Likewise.
317 (hppa_linux_fetch_inferior_registers): Likewise.
318 (hppa_linux_store_inferior_registers): Likewise.
319 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
320 (i386_darwin_store_inferior_registers): Likewise.
321 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
322 (gnu_store_registers): Likewise.
323 * i386-linux-nat.c (fetch_register): Likewise.
324 (store_register): Likewise.
325 (supply_gregset): Likewise.
326 (fill_gregset): Likewise.
327 (i386_linux_fetch_inferior_registers): Likewise.
328 (i386_linux_store_inferior_registers): Likewise.
329 (i386_linux_resume): Likewise.
330 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
331 Likewise.
332 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
333 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
334 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
335 (i386obsd_collect_uthread): Likewise.
336 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
337 (i386_supply_gregset): Likewise.
338 (i386_collect_gregset): Likewise.
339 (i386_supply_fpregset): Likewise.
340 (i386_collect_fpregset): Likewise.
341 (i386_mpx_bd_base): Likewise.
342 * i386-v4-nat.c (supply_fpregset): Likewise.
343 (fill_fpregset): Likewise.
344 * i387-tdep.c (i387_supply_fsave): Likewise.
345 (i387_collect_fsave): Likewise.
346 (i387_supply_fxsave): Likewise.
347 (i387_collect_fxsave): Likewise.
348 (i387_supply_xsave): Likewise.
349 (i387_collect_xsave): Likewise.
350 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
351 (ia64_linux_store_registers): Likewise.
352 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
353 (ia64_extract_return_value): Likewise.
354 (ia64_store_return_value): Likewise.
355 (find_func_descr): Likewise.
356 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
357 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
358 (inf_ptrace_store_registers): Likewise.
359 * infrun.c (use_displaced_stepping): Likewise.
360 (displaced_step_prepare_throw): Likewise.
361 (resume): Likewise.
362 (proceed): Likewise.
363 (do_target_wait): Likewise.
364 (adjust_pc_after_break): Likewise.
365 (handle_inferior_event_1): Likewise.
366 (handle_signal_stop): Likewise.
367 (save_infcall_suspend_state): Likewise.
368 (restore_infcall_suspend_state): Likewise.
369 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
370 * jit.c (jit_frame_prev_register): Likewise.
371 * linux-nat.c (save_stop_reason): Likewise.
372 (linux_nat_wait_1): Likewise.
373 (resume_stopped_resumed_lwps): Likewise.
374 * linux-record.c (record_linux_sockaddr): Likewise.
375 (record_linux_msghdr): Likewise.
376 (record_linux_system_call): Likewise.
377 * linux-tdep.c (linux_collect_thread_registers): Likewise.
378 * lm32-tdep.c (lm32_extract_return_value): Likewise.
379 (lm32_store_return_value): Likewise.
380 * m32c-tdep.c (m32c_read_flg): Likewise.
381 (m32c_pseudo_register_read): Likewise.
382 (m32c_pseudo_register_write): Likewise.
383 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
384 (m32r_linux_collect_gregset): Likewise.
385 * m32r-tdep.c (m32r_store_return_value): Likewise.
386 (m32r_extract_return_value): Likewise.
387 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
388 (m68kbsd_collect_fpregset): Likewise.
389 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
390 * m68k-linux-nat.c (fetch_register): Likewise.
391 (old_fetch_inferior_registers): Likewise.
392 (old_store_inferior_registers): Likewise.
393 (store_regs): Likewise.
394 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
395 (m68k_svr4_store_return_value): Likewise.
396 * m88k-tdep.c (m88k_store_arguments): Likewise.
397 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
398 (mi_cmd_data_write_register_values): Likewise.
399 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
400 (mips_fbsd_store_inferior_registers): Likewise.
401 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
402 (mips_fbsd_supply_gregs): Likewise.
403 (mips_fbsd_collect_fpregs): Likewise.
404 (mips_fbsd_collect_gregs): Likewise.
405 (mips_fbsd_supply_fpregset): Likewise.
406 (mips_fbsd_collect_fpregset): Likewise.
407 (mips_fbsd_supply_gregset): Likewise.
408 (mips_fbsd_collect_gregset): Likewise.
409 * mips-linux-nat.c (supply_gregset): Likewise.
410 (fill_gregset): Likewise.
411 (supply_fpregset): Likewise.
412 (fill_fpregset): Likewise.
413 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
414 (mips_fill_gregset): Likewise.
415 (mips_supply_fpregset): Likewise.
416 (mips_fill_fpregset): Likewise.
417 (mips64_supply_gregset): Likewise.
418 (micromips_linux_sigframe_validate): Likewise.
419 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
420 (mipsnbsd_fetch_inferior_registers): Likewise.
421 (mipsnbsd_store_inferior_registers): Likewise.
422 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
423 (mipsnbsd_supply_gregset): Likewise.
424 (mipsnbsd_iterate_over_regset_sections): Likewise.
425 (mipsnbsd_supply_reg): Likewise.
426 (mipsnbsd_supply_fpreg): Likewise.
427 * mips-tdep.c (mips_in_frame_stub): Likewise.
428 (mips_dummy_id): Likewise.
429 (is_octeon_bbit_op): Likewise.
430 (micromips_bc1_pc): Likewise.
431 (extended_mips16_next_pc): Likewise.
432 (mips16_next_pc): Likewise.
433 (deal_with_atomic_sequence): Likewise.
434 * moxie-tdep.c (moxie_process_readu): Likewise.
435 * nios2-tdep.c (nios2_get_next_pc): Likewise.
436 * nto-procfs.c (procfs_store_registers): Likewise.
437 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
438 (ppcfbsd_store_inferior_registers): Likewise.
439 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
440 (fetch_altivec_register): Likewise.
441 (get_spe_registers): Likewise.
442 (fetch_spe_register): Likewise.
443 (fetch_altivec_registers): Likewise.
444 (fetch_all_gp_regs): Likewise.
445 (fetch_all_fp_regs): Likewise.
446 (store_vsx_register): Likewise.
447 (store_altivec_register): Likewise.
448 (set_spe_registers): Likewise.
449 (store_spe_register): Likewise.
450 (store_altivec_registers): Likewise.
451 (store_all_gp_regs): Likewise.
452 (store_all_fp_regs): Likewise.
453 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
454 (ppc_linux_collect_gregset): Likewise.
455 (ppc_canonicalize_syscall): Likewise.
456 (ppc_linux_record_signal): Likewise.
457 (ppu2spu_prev_register): Likewise.
458 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
459 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
460 (ppcobsd_store_registers): Likewise.
461 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
462 Likewise.
463 (ppc_ravenscar_generic_store_registers): Likewise.
464 * procfs.c (procfs_fetch_registers): Likewise.
465 (procfs_store_registers): Likewise.
466 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
467 (ravenscar_store_registers): Likewise.
468 (ravenscar_prepare_to_store): Likewise.
469 * record-btrace.c (record_btrace_fetch_registers): Likewise.
470 * record-full.c (record_full_wait_1): Likewise.
471 (record_full_registers_change): Likewise.
472 (record_full_store_registers): Likewise.
473 (record_full_core_fetch_registers): Likewise.
474 (record_full_save): Likewise.
475 (record_full_goto_insn): Likewise.
476 * regcache.c (regcache_register_size): Likewise.
477 (get_regcache_arch): Remove.
478 (regcache_read_pc): Likewise.
479 * regcache.h (get_regcache_arch): Remove.
480 * remote-sim.c (gdbsim_fetch_register): Likewise.
481 (gdbsim_store_register): Likewise.
482 * remote.c (fetch_register_using_p): Likewise.
483 (send_g_packet): Likewise.
484 (remote_prepare_to_store): Likewise.
485 (store_registers_using_G): Likewise.
486 * reverse.c (save_bookmark_command): Likewise.
487 (goto_bookmark_command): Likewise.
488 * rs6000-aix-tdep.c (branch_dest): Likewise.
489 * rs6000-nat.c (rs6000_ptrace64): Likewise.
490 (fetch_register): Likewise.
491 * rs6000-tdep.c (ppc_supply_reg): Likewise.
492 (ppc_collect_reg): Likewise.
493 (ppc_collect_gregset): Likewise.
494 (ppc_collect_fpregset): Likewise.
495 (ppc_collect_vsxregset): Likewise.
496 (ppc_collect_vrregset): Likewise.
497 (ppc_displaced_step_hw_singlestep): Likewise.
498 (rs6000_pseudo_register_read): Likewise.
499 (rs6000_pseudo_register_write): Likewise.
500 * s390-linux-nat.c (supply_gregset): Likewise.
501 (fill_gregset): Likewise.
502 (s390_linux_fetch_inferior_registers): Likewise.
503 * s390-linux-tdep.c (s390_write_pc): Likewise.
504 (s390_software_single_step): Likewise.
505 (s390_all_but_pc_registers_record): Likewise.
506 (s390_linux_syscall_record): Likewise.
507 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
508 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
509 (shnbsd_store_inferior_registers): Likewise.
510 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
511 (sh_extract_return_value_fpu): Likewise.
512 (sh_store_return_value_nofpu): Likewise.
513 (sh_corefile_supply_regset): Likewise.
514 (sh_corefile_collect_regset): Likewise.
515 * sh64-tdep.c (sh64_extract_return_value): Likewise.
516 (sh64_store_return_value): Likewise.
517 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
518 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
519 (sparc_store_inferior_registers): Likewise.
520 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
521 (sparc_ravenscar_prepare_to_store): Likewise.
522 * sparc-tdep.c (sparc32_store_arguments): Likewise.
523 (sparc_analyze_control_transfer): Likewise.
524 (sparc_step_trap): Likewise.
525 (sparc_software_single_step): Likewise.
526 (sparc32_gdbarch_init): Likewise.
527 (sparc_supply_rwindow): Likewise.
528 (sparc_collect_rwindow): Likewise.
529 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
530 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
531 (sparc64nbsd_collect_gregset): Likewise.
532 (sparc64nbsd_supply_fpregset): Likewise.
533 (sparc64nbsd_collect_fpregset): Likewise.
534 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
535 (sparc64_supply_gregset): Likewise.
536 (sparc64_collect_gregset): Likewise.
537 (sparc64_supply_fpregset): Likewise.
538 (sparc64_collect_fpregset): Likewise.
539 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
540 * spu-tdep.c (spu_unwind_sp): Likewise.
541 (spu2ppu_prev_register): Likewise.
542 (spu_memory_remove_breakpoint): Likewise.
543 * stack.c (return_command): Likewise.
544 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
545 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
546 * tracefile.c (trace_save_ctf): Likewise.
547 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
548 (do_windows_store_inferior_registers): Likewise.
549 (windows_resume): Likewise.
550 * xtensa-linux-nat.c (fill_gregset): Likewise.
551 (supply_gregset_reg): Likewise.
552 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
553 (xtensa_register_read_masked): Likewise.
554 (xtensa_supply_gregset): Likewise.
555 (xtensa_extract_return_value): Likewise.
556 (xtensa_store_return_value): Likewise.
557
edd079d9
UW
5582017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
559
560 * doublest.c (floatformat_from_string): New function.
561 * doublest.h (floatformat_from_string): Add prototype.
562
563 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
564 (OP_FLOAT): ... this.
565 * expression.h: Do not include "doublest.h".
566 (union exp_element): Replace doubleconst and decfloatconst by
567 new element floatconst.
568 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
569 (ada_evaluate_subexp): Likewise.
570 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
571 OP_DOUBLE and OP_DECFLOAT.
572 * expprint.c (print_subexp_standard): Likewise.
573 (dump_subexp_body_standard): Likewise.
574 * breakpoint.c (watchpoint_exp_is_const): Likewise.
575
576 * parse.c: Include "dfp.h".
577 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
578 (write_exp_elt_floatcst): New function.
579 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
580 and OP_DECFLOAT.
581 (operator_check_standard): Likewise.
582 (parse_float): Do not accept suffix. Take type as input. Return bool.
583 Return target format buffer instead of host DOUBLEST.
584 Use floatformat_from_string and decimal_from_string to parse
585 either binary or decimal floating-point types.
586 (parse_c_float): Remove.
587 * parser-defs.h: Do not include "doublest.h".
588 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
589 (write_exp_elt_floatcst): Add prototype.
590 (parse_float): Update prototype.
591 (parse_c_float): Remove.
592
593 * c-exp.y: Do not include "dfp.h".
594 (typed_val_float): Use byte buffer instead of DOUBLEST.
595 (typed_val_decfloat): Remove.
596 (DECFLOAT): Remove.
597 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
598 (parse_number): Update to new parse_float interface.
599 Parse suffixes and determine type before calling parse_float.
600 Handle decimal and binary FP types the same way.
601
602 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
603 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
604 (parse_number): Update to new parse_float interface.
605 Parse suffixes and determine type before calling parse_float.
606
607 * f-exp.y: Replace dval by typed_val_float.
608 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
609 (parse_number): Use parse_float instead of atof.
610
611 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
612 (parse_go_float): Remove.
613 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
614 (parse_number): Call parse_float instead of parse_go_float.
615 Parse suffixes and determine type before calling parse_float.
616
617 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
618 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
619 (parse_number): Update to new parse_float interface.
620 Parse suffixes and determine type before calling parse_float.
621
622 * m2-exp.y: Replace dval by byte buffer val.
623 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
624 (parse_number): Call parse_float instead of atof.
625
626 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
627 (lex_number): Call parse_float instead of strtod.
628 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
629 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
630 Use write_exp_elt_floatcst.
631 (unit_testing): Remove static variable.
632 (rust_type): Do not check unit_testing.
633 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
634
635 * ada-exp.y (type_float, type_double): Remove.
636 (typed_val_float): Use byte buffer instead of DOUBLEST.
637 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
638 * ada-lex.l (processReal): Use parse_float instead of sscanf.
639
cc628f3d
AH
6402017-10-25 Alan Hayward <alan.hayward@arm.com>
641
642 * aarch64-tdep.h (enum aarch64_regnum): Remove.
643 * arch/aarch64.h: New file.
644
09a7c6aa
UW
6452017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
646
647 * dfp.h (decimal_from_string): Use const reference for argument.
648 * dfp.c (decimal_from_string): Likewise.
649
8ba0dd51
UW
6502017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
651
652 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
653 * sh64-tdep.c (sh64_do_fp_register): Likewise.
654 * mips-tdep.c (mips_print_fp_register): Likewise.
655
16e812b2
UW
6562017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
657
658 * common/format.h (enum argclass): Replace decfloat_arg by
659 dec32float_arg, dec64float_arg, and dec128float_arg.
660 * common/format.c (parse_format_string): Update to return
661 new decimal float argument classes.
662
663 * printcmd.c (printf_decfloat): Rename to ...
664 (printf_floating): ... this. Add argclass argument, and use it
665 instead of parsing the format string again. Add support for
666 binary floating-point values, using floatformat_to_string.
667 Convert value to the target format if it doesn't already match.
668 (ui_printf): Call printf_floating instead of printf_decfloat,
669 also for double_arg / long_double_arg. Pass argclass.
670
671 * dfp.c (decimal_to_string): Add format string argument.
672 * dfp.h (decimal_to_string): Likewise.
673
674 * doublest.c (floatformat_to_string): Add format string argument.
675 * doublest.h (floatformat_to_string): Likewise.
676
fdf0cbc2
UW
6772017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
678
679 * doublest.c (floatformat_precision): New routine.
680 (floatformat_to_string): Likewise.
681 * doublest.c (floatformat_to_string): Add prototype.
682
683 * printcmd.c (print_scalar_formatted): Only call print_floating
684 on floating-point types.
685 * valprint.c: Do not include "floatformat.h".
686 (generic_val_print_decfloat): Remove.
687 (generic_val_print): Call generic_val_print_float for both
688 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
689 (print_floating): Use floatformat_to_string. Handle decimal float.
690 (print_decimal_floating): Remove, merge into floatformat_to_string.
691 * value.h (print_decimal_floating): Remove.
692
693 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
694
5033013f
UW
6952017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
696
697 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
698
a664f67e
SM
6992017-10-21 Simon Marchi <simon.marchi@ericsson.com>
700
701 * memattr.h: Don't include vec.h.
702 (struct mem_attrib): Initialize fields.
703 <unknown>: New static method.
704 (struct mem_region): Add constructors, operator<, initialize
705 fields.
706 * memattr.c: Include algorithm.
707 (default_mem_attrib, unknown_mem_attrib): Remove.
708 (user_mem_region_list): New global.
709 (target_mem_region_list, mem_region_list): Change type to
710 std::vector<mem_region>.
711 (mem_use_target): Now a function.
712 (target_mem_regions_valid): Change type to bool.
713 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
714 (require_user_regions): Adjust.
715 (require_target_regions): Adjust.
716 (create_mem_region): Adjust.
717 (lookup_mem_region): Adjust.
718 (invalidate_target_mem_regions): Adjust.
719 (mem_clear): Rename to...
720 (user_mem_clear): ... this, and adjust.
721 (mem_command): Adjust.
722 (info_mem_command): Adjust.
723 (mem_enable, enable_mem_command, mem_disable,
724 disable_mem_command): Adjust.
725 (mem_delete): Adjust.
726 (delete_mem_command): Adjust.
727 * memory-map.h (parse_memory_map): Return an std::vector.
728 * memory-map.c (parse_memory_map): Likewise.
729 (struct memory_map_parsing_data): Add constructor.
730 <memory_map>: Point to std::vector.
731 (memory_map_start_memory): Adjust.
732 (memory_map_end_memory): Adjust.
733 (memory_map_end_property): Adjust.
734 (clear_result): Remove.
735 * remote.c (remote_memory_map): Return an std::vector.
736 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
737 Remove.
738 (target_debug_print_mem_region_vector): New.
739 * target-delegates.c: Regenerate.
740 * target.h (mem_region_vector): New typedef.
741 (to_memory_map): Return mem_region_vector.
742 (target_memory_map): Return an std::vector.
743 * target.c (target_memory_map): Return an std::vector.
744 (flash_erase_command): Adjust.
745
6e17c565
SM
7462017-10-21 Simon Marchi <simon.marchi@ericsson.com>
747
748 * memory-map.c (struct memory_map_parsing_data) <property_name>:
749 Change type to std::string.
750 (memory_map_start_property): Adjust.
751 (memory_map_end_property): Adjust.
752
cfba9872
SM
7532017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
754
755 * infrun.h: Include common/byte-vector.h.
756 (struct displaced_step_closure): New struct.
757 (struct buf_displaced_step_closure): New struct.
758 * infrun.c (displaced_step_closure::~displaced_step_closure):
759 Provide default implementation.
760 (displaced_step_clear): Deallocate step closure with delete.
761 * aarch64-tdep.c (displaced_step_closure): Rename to ...
762 (aarch64_displaced_step_closure): ... this, extend
763 displaced_step_closure.
764 (aarch64_displaced_step_data) <dsc>: Change type to
765 aarch64_displaced_step_closure.
766 (aarch64_displaced_step_copy_insn): Adjust to type change, use
767 unique_ptr.
768 (aarch64_displaced_step_fixup): Add cast for displaced step
769 closure.
770 * amd64-tdep.c (displaced_step_closure): Rename to ...
771 (amd64_displaced_step_closure): ... this, extend
772 displaced_step_closure.
773 <insn_buf>: Change type to std::vector<gdb_byte>.
774 <max_len>: Remove.
775 (fixup_riprel): Change type of DSC parameter, adjust to type
776 change of insn_buf.
777 (fixup_displaced_copy): Change type of DSC parameter.
778 (amd64_displaced_step_copy_insn): Instantiate
779 amd64_displaced_step_closure.
780 (amd64_displaced_step_fixup): Add cast for closure type, adjust
781 to type change of insn_buf.
782 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
783 parameter DSC.
784 (arm_linux_copy_svc): Likewise.
785 (cleanup_kernel_helper_return): Likewise.
786 (arm_catch_kernel_helper_return): Likewise.
787 (arm_linux_displaced_step_copy_insn): Instantiate
788 arm_displaced_step_closure.
789 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
790 (displaced_read_reg): Change type of parameter DSC.
791 (branch_write_pc): Likewise.
792 (load_write_pc): Likewise.
793 (alu_write_pc): Likewise.
794 (displaced_write_reg): Likewise.
795 (arm_copy_unmodified): Likewise.
796 (thumb_copy_unmodified_32bit): Likewise.
797 (thumb_copy_unmodified_16bit): Likewise.
798 (cleanup_preload): Likewise.
799 (install_preload): Likewise.
800 (arm_copy_preload): Likewise.
801 (thumb2_copy_preload): Likewise.
802 (install_preload_reg): Likewise.
803 (arm_copy_preload_reg): Likewise.
804 (cleanup_copro_load_store): Likewise.
805 (install_copro_load_store): Likewise.
806 (arm_copy_copro_load_store) Likewise.
807 (thumb2_copy_copro_load_store): Likewise.
808 (cleanup_branch): Likewise.
809 (install_b_bl_blx): Likewise.
810 (arm_copy_b_bl_blx): Likewise.
811 (thumb2_copy_b_bl_blx): Likewise.
812 (thumb_copy_b): Likewise.
813 (install_bx_blx_reg): Likewise.
814 (arm_copy_bx_blx_reg): Likewise.
815 (thumb_copy_bx_blx_reg): Likewise.
816 (cleanup_alu_imm): Likewise.
817 (arm_copy_alu_imm): Likewise.
818 (thumb2_copy_alu_imm): Likewise.
819 (cleanup_alu_reg): Likewise.
820 (install_alu_reg): Likewise.
821 (arm_copy_alu_reg): Likewise.
822 (thumb_copy_alu_reg): Likewise.
823 (cleanup_alu_shifted_reg): Likewise.
824 (install_alu_shifted_reg): Likewise.
825 (arm_copy_alu_shifted_reg): Likewise.
826 (cleanup_load): Likewise.
827 (cleanup_store): Likewise.
828 (arm_copy_extra_ld_st): Likewise.
829 (install_load_store): Likewise.
830 (thumb2_copy_load_literal): Likewise.
831 (thumb2_copy_load_reg_imm): Likewise.
832 (arm_copy_ldr_str_ldrb_strb): Likewise.
833 (cleanup_block_load_all): Likewise.
834 (cleanup_block_store_pc): Likewise.
835 (cleanup_block_load_pc): Likewise.
836 (arm_copy_block_xfer): Likewise.
837 (thumb2_copy_block_xfer): Likewise.
838 (cleanup_svc): Likewise.
839 (install_svc): Likewise.
840 (arm_copy_svc): Likewise.
841 (thumb_copy_svc): Likewise.
842 (arm_copy_undef): Likewise.
843 (thumb_32bit_copy_undef): Likewise.
844 (arm_copy_unpred): Likewise.
845 (arm_decode_misc_memhint_neon): Likewise.
846 (arm_decode_unconditional): Likewise.
847 (arm_decode_miscellaneous): Likewise.
848 (arm_decode_dp_misc): Likewise.
849 (arm_decode_ld_st_word_ubyte): Likewise.
850 (arm_decode_media): Likewise.
851 (arm_decode_b_bl_ldmstm): Likewise.
852 (arm_decode_ext_reg_ld_st): Likewise.
853 (thumb2_decode_dp_shift_reg): Likewise.
854 (thumb2_decode_ext_reg_ld_st): Likewise.
855 (arm_decode_svc_copro): Likewise.
856 (thumb2_decode_svc_copro): Likewise.
857 (install_pc_relative): Likewise.
858 (thumb_copy_pc_relative_16bit): Likewise.
859 (thumb_decode_pc_relative_16bit): Likewise.
860 (thumb_copy_pc_relative_32bit): Likewise.
861 (thumb_copy_16bit_ldr_literal): Likewise.
862 (thumb_copy_cbnz_cbz): Likewise.
863 (thumb2_copy_table_branch): Likewise.
864 (cleanup_pop_pc_16bit_all): Likewise.
865 (thumb_copy_pop_pc_16bit): Likewise.
866 (thumb_process_displaced_16bit_insn): Likewise.
867 (decode_thumb_32bit_ld_mem_hints): Likewise.
868 (thumb_process_displaced_32bit_insn): Likewise.
869 (thumb_process_displaced_insn): Likewise.
870 (arm_process_displaced_insn): Likewise.
871 (arm_displaced_init_closure): Likewise.
872 (arm_displaced_step_fixup): Add cast for closure.
873 * arm-tdep.h: Include infrun.h.
874 (displaced_step_closure): Rename to ...
875 (arm_displaced_step_closure): ... this, extend
876 displaced_step_closure.
877 <u::svc::copy_svc_os>: Change type of parameter DSC.
878 <cleanup>: Likewise.
879 (arm_process_displaced_insn): Likewise.
880 (arm_displaced_init_closure): Likewise.
881 (displaced_read_reg): Likewise.
882 (displaced_write_reg): Likewise.
883 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
884 Adjust.
885 * i386-tdep.h: Include infrun.h.
886 (i386_displaced_step_closure): New typedef.
887 * i386-tdep.c (i386_displaced_step_copy_insn): Use
888 i386_displaced_step_closure.
889 (i386_displaced_step_fixup): Adjust.
890 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
891 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
892 and unique_ptr.
893 (ppc_displaced_step_fixup): Adjust.
894 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
895 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
896 and unique_ptr.
897 (s390_displaced_step_fixup): Adjust.
898
b392b304
SM
8992017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
900
901 * interps.h (interp_resume, interp_suspend, interp_set_temp):
902 Remove declarations.
903
d5833c62
TT
9042017-10-20 Tom Tromey <tom@tromey.com>
905
906 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
907 std::vector.
908 (gdb_bfd_record_inclusion): Update.
909 (bfdp): Remove typedef.
910
06d5bbc8
TT
9112017-10-20 Tom Tromey <tom@tromey.com>
912
913 * gdb_bfd.c (gdb_bfd_ref): Use new.
914 (struct gdb_bfd_data): Add constructor, destructor, and member
915 initializers.
916 (gdb_bfd_unref): Use delete.
917
2712ce2e
TT
9182017-10-20 Tom Tromey <tom@tromey.com>
919
920 * exec.c (exec_file_attach): Use new_bfd_ref.
921 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
922 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
923 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
924 new_bfd_ref.
925 * gdb_bfd.h (new_bfd_ref): New function.
926
fcc8fb2f
PA
9272017-10-20 Pedro Alves <palves@redhat.com>
928
929 * main.c (captured_command_loop): Add attribute noinline.
930
4c2287b0
SM
9312017-10-19 Simon Marchi <simon.marchi@ericsson.com>
932
933 * interps.c (struct interp_factory): Add constructor.
934 (interp_factory_p): Remove typedef.
935 (DEF_VEC_P(interp_factory_p)): Remove.
936 (interpreter_factories): Change type to std::vector.
937 (interp_factory_register): Adjust.
938 (interp_lookup): Adjust.
939 (interpreter_completer): Adjust.
940
3d415c26
TT
9412017-10-19 Tom Tromey <tom@tromey.com>
942
943 * break-catch-syscall.c (catch_syscall_completer): Use
944 std::string, gdb::unique_xmalloc_ptr.
945
395423c4
TT
9462017-10-19 Tom Tromey <tom@tromey.com>
947
948 * infcall.c (call_function_by_hand_dummy): Use std::string.
949
54f70bc1
TT
9502017-10-19 Tom Tromey <tom@tromey.com>
951
952 * mi/mi-main.c (mi_cmd_execute): Update.
953 * top.h (prepare_execute_command): Return scoped_value_mark.
954 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
955 Add move constructor.
956 * top.c (prepare_execute_command): Return scoped_value_mark.
957 (execute_command): Update.
958
63929e84
PA
9592017-10-19 Pedro Alves <palves@redhat.com>
960
961 * xml-support.c (xml_fetch_content_from_file): Check fread's
962 return.
963
a75868f5
PA
9642017-10-19 Pedro Alves <palves@redhat.com>
965
966 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
967 async.
968 (handle_error_fd): New function.
969 (ser_base_async): Add/delete an event loop file handler for
970 error_fd.
971
2edf834e
PA
9722017-10-19 Pedro Alves <palves@redhat.com>
973
974 * xml-support.c (xml_fetch_content_from_file): Don't read in
975 chunks. Instead use fseek to determine the file's size, and read
976 it in one go.
977
c8ba13ad
KS
9782017-11-18 Keith Seitz <keiths@redhat.com>
979
980 * c-exp.y (oper): Canonicalize conversion operators of user-defined
981 types.
982 Add whitespace to front of type name.
983
37534686
KS
9842017-10-18 Keith Seitz <keiths@redhat.com>
985
986 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
987 DW_AT_accessibility.
988
28c7c158
YQ
9892017-10-18 Yao Qi <yao.qi@linaro.org>
990
991 * features/tic6x-c62x-linux.c: Remove.
992
30f0b101
TT
9932017-10-17 Tom Tromey <tom@tromey.com>
994
995 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
996 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
997 (do_mixed_source_and_assembly): Likewise.
998
57e12da9
TT
9992017-10-17 Tom Tromey <tom@tromey.com>
1000
1001 * regcache.c (regcache::xfer_part): Remove assertion.
1002
7b700999
PA
10032017-10-17 Pedro Alves <palves@redhat.com>
1004
1005 * xml-support.c (xml_fetch_content_from_file): Call
1006 unique_ptr::release() instead unique_ptr::get() when passing
1007 through xrealloc.
1008
d3037ba6
YQ
10092017-10-17 Yao Qi <yao.qi@linaro.org>
1010
1011 * regcache.c (regcache::xfer_part): Remove parameters read and
1012 write, add parameter is_raw. All callers are updated.
1013
83d5a34d
KS
10142017-10-16 Keith Seitz <keiths@redhat.com>
1015
1016 * c-typeprint.c (enum access_specifier): Moved here from
1017 c_type_print_base.
1018 (output_access_specifier): New function.
1019 (c_type_print_base): Consider typedefs when assessing
1020 whether access labels are needed.
1021 Use output_access_specifier as needed.
1022 Output access specifier for typedefs, if needed.
1023 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1024 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1025 fields.
1026 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1027 accessor macros.
1028
87028b87
TT
10292017-10-16 Tom Tromey <tom@tromey.com>
1030
1031 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1032 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1033 * target.c (target_fileio_read_stralloc): Update.
1034 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1035 * target.h (target_fileio_read_stralloc): Return
1036 unique_xmalloc_ptr.
1037
b7b030ad
TT
10382017-10-16 Tom Tromey <tom@tromey.com>
1039
1040 * xml-syscall.c (xml_init_syscalls_info): Update.
1041 * xml-support.c (xinclude_start_include): Update.
1042 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1043 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1044 (xml_fetch_content_from_file): Likewise.
1045 * osdata.c (get_osdata): Update.
1046 * target.h (target_read_stralloc, target_get_osdata): Return
1047 unique_xmalloc_ptr.
1048 * solib-aix.c (solib_aix_get_library_list): Update.
1049 * solib-target.c (solib_target_current_sos): Update.
1050 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1051 * xml-tdesc.c (fetch_available_features_from_target): Update.
1052 (target_fetch_description_xml): Update.
1053 (file_read_description_xml): Update.
1054 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1055 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1056 (remote_pid_to_exec_file): Update.
1057 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1058 (target_get_osdata): Likewise.
1059
b80406ac
TT
10602017-10-16 Tom Tromey <tom@tromey.com>
1061
1062 * remote.c (remote_register_number_and_offset): Use std::vector.
1063 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1064 (putpkt_binary): Use gdb::def_vector.
1065 (compare_sections_command): Use gdb::byte_vector.
1066
a90ecff8
TT
10672017-10-16 Tom Tromey <tom@tromey.com>
1068
1069 * ppc-linux-nat.c (hwdebug_insert_point): Use
1070 gdb::unique_xmalloc_ptr, XDUP.
1071
2dc0e219
TT
10722017-10-16 Tom Tromey <tom@tromey.com>
1073
1074 * probe.c (parse_probes): Use std::string.
1075 (info_probes_for_ops, enable_probes_command)
1076 (disable_probes_command): Remove cleanups.
1077
b05628f0
TT
10782017-10-16 Tom Tromey <tom@tromey.com>
1079
1080 * buildsym.c (block_compar): Remove.
1081 (end_symtab_get_static_block): Use std::vector.
1082
a79b1bc6
SM
10832017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1084
1085 * memrange.h (struct mem_range): Define operator< and operator==.
1086 (mem_range_s): Remove.
1087 (DEF_VEC_O (mem_range_s)): Remove.
1088 (normalize_mem_ranges): Change parameter type to std::vector.
1089 * memrange.c (compare_mem_ranges): Remove.
1090 (normalize_mem_ranges): Change parameter type to std::vector,
1091 adjust to vector change.
1092 * exec.c (section_table_available_memory): Return vector, remove
1093 parameter.
1094 (section_table_read_available_memory): Adjust to std::vector
1095 change.
1096 * remote.c (remote_read_bytes): Adjust to std::vector
1097 change.
1098 * tracepoint.h (traceframe_available_memory): Change parameter
1099 type to std::vector.
1100 * tracepoint.c (traceframe_available_memory): Change parameter
1101 type to std::vector, adjust.
1102 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1103 std::vector change.
1104 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1105 unittests/memrange-selftests.c.
1106 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1107 * gdb/unittests/memrange-selftests.c: New file.
1108
63f0e930
PA
11092017-10-16 Pedro Alves <palves@redhat.com>
1110
1111 * elfread.c (probe_key_free): Rename range-for variable.
1112 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1113 (find_probe_by_pc, collect_probes): Rename range-for variable.
1114
c40c7bfc
YQ
11152017-10-16 Yao Qi <yao.qi@linaro.org>
1116
1117 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1118 * features/tic6x-c62x.c: Remove.
1119 * features/tic6x-c64x-linux.c: Remove.
1120 * features/tic6x-c64x.c: Remove.
1121 * features/tic6x-c64xp-linux.c: Remove.
1122 * features/tic6x-c64xp.c: Remove.
1123 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1124 initialize_tdesc_tic6x_*_linux functions.
1125 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1126 initialize_tdesc_tic6x_* functions.
1127
df27ae6a
YQ
11282017-10-16 Yao Qi <yao.qi@linaro.org>
1129
1130 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1131 tic6x-c62x.
1132 * regformats/tic6x-c62x.dat: Remove.
1133 * regformats/tic6x-c64x.dat: Remove.
1134 * regformats/tic6x-c64xp.dat: Remove.
1135
86766165
SM
11362017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1137
1138 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1139 (the !HAVE_LIBEXPAT version).
1140
824dfcc3
SM
11412017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1144 const.
1145
2098b393
SM
11462017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1147
1148 * target.h: Include tracepoint.h.
1149 (enum trace_find_type): Move to tracepoint.h.
1150 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1151 * tracepoint.h: Don't include target.h
1152 (enum trace_find_type): Move from target.h.
1153 (parse_traceframe_info): Return a unique ptr.
1154 * tracepoint.c (current_traceframe_info): Change type to unique
1155 ptr.
1156 (free_traceframe_info): Remove.
1157 (clear_traceframe_info): Don't manually free
1158 current_traceframe_info.
1159 (free_result): Remove.
1160 (parse_traceframe_info): Return a unique ptr.
1161 (get_traceframe_info): Adjust to unique ptr.
1162 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1163 * remote.c (remote_traceframe_info): Return a unique ptr.
1164 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1165 ptr.
1166 * target-debug.h (target_debug_print_traceframe_info_up): New
1167 macro.
1168 * target-delegates.c: Regenerate.
1169
4cdd21a8
SM
11702017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1171
1172 * memrange.h (struct mem_range): Add constructors.
1173 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1174 std::vector<mem_range>.
1175 * tracepoint.c (free_traceframe_info): Don't manually free
1176 vector.
1177 (traceframe_info_start_memory): Adjust to vector change.
1178 (traceframe_available_memory): Likewise.
1179 * tracefile-tfile.c (build_traceframe_info): Likewise.
1180 * ctf.c (ctf_traceframe_info): Likewise.
1181
d0d292a2
SM
11822017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1183
1184 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1185 std::vector<int>.
1186 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1187 (traceframe_info_start_tvar): Adjust to vector change.
1188 (parse_traceframe_info): Allocate with new.
1189 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1190 vector change.
1191 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1192 change.
1193 tfile_traceframe_info): Allocate with new.
1194 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1195 change.
1196
8d3c73ef
SM
11972017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1198
1199 * tracepoint.c (traceframe_info): Rename to...
1200 (current_traceframe_info): ...this.
1201 (clear_traceframe_info): Adjust.
1202 (get_traceframe_info): Adjust.
1203
b129dcac
SM
12042017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1205
1206 * nat/linux-osdata.c: Include algorithm.
1207 (compare_processes): Remove.
1208 (struct pid_pgid_entry): New struct.
1209 (linux_xfer_osdata_processgroups): Use std::vector instead of
1210 XNEWVEC.
1211
af5bf4ad
SM
12122017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1213
1214 * objfiles.h: Don't include symfile.h.
1215 (struct partial_symbol): Remove forward-declaration.
1216 (struct objfile) <global_psymbols, static_psymbols>: Change type
1217 to std::vector<partial_symbol *>.
1218 * objfiles.c (objfile::objfile): Don't memset those fields.
1219 (objfile::~objfile): Don't free those fields.
1220 * psympriv.h (struct psymbol_allocation_list): Remove
1221 forward-declaration.
1222 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1223 to std::vector.
1224 (start_psymtab_common): Change parameters to std::vector.
1225 * psymtab.c: Include algorithm.
1226 (require_partial_symbols): Call shrink_to_fit.
1227 (find_pc_sect_psymbol): Adjust to vector change.
1228 (match_partial_symbol): Likewise.
1229 (lookup_partial_symbol): Likewise.
1230 (psym_relocate): Likewise.
1231 (dump_psymtab): Likewise.
1232 (recursively_search_psymtabs): Likewise.
1233 (compare_psymbols): Remove.
1234 (sort_pst_symbols): Adjust to vector change.
1235 (start_psymtab_common): Likewise.
1236 (end_psymtab_common): Likewise.
1237 (psymbol_bcache_full): De-constify return value.
1238 (add_psymbol_to_bcache): Likewise.
1239 (extend_psymbol_list): Remove.
1240 (append_psymbol_to_list): Adjust to vector change.
1241 (add_psymbol_to_list): Likewise.
1242 (init_psymbol_list): Likewise.
1243 (maintenance_info_psymtabs): Likewise.
1244 (maintenance_check_psymtabs): Likewise.
1245 * symfile.h (struct psymbol_allocation_list): Remove.
1246 * symfile.c (reread_symbols): Adjust to vector change.
1247 * dbxread.c (start_psymtab): Change type of parameters.
1248 (dbx_symfile_read): Adjust to vector change.
1249 (read_dbx_symtab): Likewise.
1250 (start_psymtab): Change type of parameters.
1251 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1252 (create_partial_symtab): Likewise.
1253 (add_partial_symbol): Likewise.
1254 (write_one_signatured_type): Likewise.
1255 (recursively_write_psymbols): Likewise.
1256 * mdebugread.c (parse_partial_symbols): Likewise.
1257 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1258 (scan_xcoff_symtab): Adjust to vector change.
1259 (xcoff_initial_scan): Likewise.
1260
3ec5942f
SM
12612017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1262
1263 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1264
2399fe6a
YQ
12652017-10-13 Yao Qi <yao.qi@linaro.org>
1266
1267 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1268 Remove s390x-*-expedite, add s390x-expedite.
1269
4bf3f4a8
YQ
12702017-10-13 Yao Qi <yao.qi@linaro.org>
1271
1272 * features/s390-gs-linux64.c: Regenerated.
1273 * features/s390x-gs-linux64.c: Regenerated.
1274
9e86da07
TT
12752017-10-13 Tom Tromey <tom@tromey.com>
1276
1277 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1278 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1279 delete.
1280 * symfile.c (symbol_file_add_with_addrs): Use new.
1281 (symbol_file_add_separate): Update comment.
1282 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1283 * jit.c (jit_object_close_impl): Use new.
1284 (jit_unregister_code): Use delete.
1285 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1286 (~objfile): Rename from free_objfile.
1287 (free_objfile_separate_debug, do_free_objfile_cleanup)
1288 (free_all_objfiles, objfile_purge_solibs): Use delete.
1289 * objfiles.h (struct objfile): Add constructor and destructor.
1290 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1291 (allocate_objfile, free_objfile): Don't declare.
1292 (struct objstats): Add initializers.
1293
c2508e90
SM
12942017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1297 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1298 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1299 * gdbarch.h: Regenerate.
1300 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1301 Adjust comment.
1302 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1303 (i386_displaced_step_fixup): Adjust comment.
1304 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1305
a900ff72
TT
13062017-10-12 Tom Tromey <tom@tromey.com>
1307
1308 * prologue-value.h (pv_area::store_would_trash): Return bool.
1309 (pv_area::find_reg): Likewise.
1310 * prologue-value.c (pv_area::store_would_trash): Return bool.
1311 (pv_area::find_reg): Likewise.
1312
f7b7ed97
TT
13132017-10-12 Tom Tromey <tom@tromey.com>
1314
1315 * s390-linux-tdep.c (s390_store, s390_load)
1316 (s390_check_for_saved, s390_analyze_prologue): Update.
1317 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1318 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1319 * prologue-value.h (class pv_area): Move from prologue-value.c.
1320 Change names of members. Add constructor, destructor, member
1321 functions.
1322 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1323 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1324 (pv_area_fetch, pv_area_scan): Don't declare.
1325 * prologue-value.c (struct pv_area::area_entry): Now member of
1326 pv_area.
1327 (struct pv_area): Move to prologue-value.h.
1328 (pv_area::pv_area): Rename from make_pv_area.
1329 (pv_area::~pv_area): Rename from free_pv_area.
1330 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1331 (clear_entries, find_entry, overlaps, store_would_trash, store)
1332 (fetch, find_reg, scan): Now member of pv_area.
1333 Remove "area" argument. Update.
1334 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1335 Update.
1336 * mn10300-tdep.c (push_reg, check_for_saved)
1337 (mn10300_analyze_prologue): Update.
1338 * mep-tdep.c (is_arg_spill, check_for_saved)
1339 (mep_analyze_prologue): Update.
1340 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1341 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1342 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1343 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1344 Update.
1345 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1346 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1347
466eecee
SM
13482017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1349
1350 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1351 * linux-nat.c (linux_nat_delete_thread): New variable.
1352 (lwp_free): Invoke linux_nat_delete_thread if set.
1353 (linux_nat_set_delete_thread): New function.
1354 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1355 thread delete callback.
1356 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1357 (_initialize_arm_linux_nat): Assign thread delete callback.
1358 * s390-linux-nat.c (s390_delete_thread): New function.
1359 (_initialize_s390_nat): Assign thread delete callback.
1360 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1361 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1362 function.
1363 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1364 declaration.
1365 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1366 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1367
f71c8822
TT
13682017-10-09 Tom Tromey <tom@tromey.com>
1369
1370 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1371 std::string.
1372 * tui/tui-layout.c (enum tui_status): Use std::string.
1373
981a3fb3
TT
13742017-10-11 Tom Tromey <tom@tromey.com>
1375
1376 * gdbthread.h (thread_command): Constify.
1377 * inferior.h (detach_command): Constify.
1378 * top.h (set_history, show_history): Constify.
1379 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1380 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1381 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1382 * printcmd.c (set_command): Constify.
1383 (non_const_set_command): New function.
1384 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1385 * breakpoint.c (enable_command, disable_command, delete_command)
1386 (catch_command, tcatch_command, set_breakpoint_cmd)
1387 (show_breakpoint_cmd): Constify.
1388 * macrocmd.c (macro_command): Constify.
1389 * infcmd.c (unset_command, kill_command, detach_command)
1390 (info_proc_cmd): Constify.
1391 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1392 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1393 (info_auto_load_cmd): Constify.
1394 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1395 (unset_tdesc_cmd): Constify.
1396 * ada-lang.c (set_ada_command, show_ada_command)
1397 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1398 * guile/guile.c (set_guile_command, show_guile_command)
1399 (info_guile_command): Constify.
1400 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1401 Constify.
1402 * skip.c (skip_command): Constify.
1403 * compile/compile.c (_initialize_compile): Constify.
1404 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1405 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1406 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1407 (maint_btrace_pt_show_cmd): Constify.
1408 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1409 Constify.
1410 * python/python.c (user_show_python, user_set_python): Constify.
1411 * mips-tdep.c (set_mips_command, show_mips_command)
1412 (set_mipsfpu_command): Constify.
1413 * record-btrace.c (cmd_record_btrace_start)
1414 (cmd_set_record_btrace, cmd_show_record_btrace)
1415 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1416 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1417 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1418 Constify.
1419 * symfile.c (overlay_command): Constify.
1420 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1421 * cli/cli-logging.c (set_logging_command, show_logging_command):
1422 Constify.
1423 * cli/cli-dump.c (dump_command, append_command)
1424 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1425 (tekhex_dump_command, binary_dump_command)
1426 (binary_append_command): Constify.
1427 * cli/cli-decode.c (struct cmd_list_element): Change type of
1428 "fun".
1429 * cli/cli-cmds.c (info_command, show_command, set_debug)
1430 (show_debug): Constify.
1431 (show_command): Add non-const overload.
1432 * top.c (set_history, show_history): Constify.
1433 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1434 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1435 * target.c (target_command): Constify.
1436 * sparc64-tdep.c (info_adi_command): Constify.
1437 * record-full.c (cmd_record_full_start): Constify.
1438 (set_record_full_command): Constify. Fix typo.
1439 (show_record_full_command): Constify.
1440 * thread.c (thread_command, thread_apply_command): Constify.
1441 * memattr.c (dummy_cmd): Constify.
1442 * value.c (function_command): Constify.
1443 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1444 * probe.c (info_probes_command): Constify.
1445 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1446 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1447 (show_thread_cmd, set_thread_default_cmd)
1448 (show_thread_default_cmd): Constify.
1449 (check_empty): Constify.
1450 * tracepoint.c (tfind_command): Constify.
1451 * cp-support.c (maint_cplus_command): Constify.
1452 * windows-tdep.c (info_w32_command): Constify.
1453 * record.c (cmd_record_start, set_record_command)
1454 (show_record_command, info_record_command, cmd_record_goto):
1455 Constify.
1456 * ravenscar-thread.c (set_ravenscar_command)
1457 (show_ravenscar_command): Constify.
1458 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1459 Constify.
1460 (add_internal_problem_command): Remove casts.
1461 * arc-tdep.c (maintenance_print_arc_command): Constify.
1462 * valprint.c (set_print, show_print, set_print_raw)
1463 (show_print_raw): Constify.
1464 * maint.c (maintenance_command, maintenance_info_command)
1465 (maintenance_print_command, maintenance_set_cmd)
1466 (maintenance_show_cmd, set_per_command_cmd)
1467 (show_per_command_cmd, maintenance_check_command): Constify.
1468 * language.c (set_check, show_check): Constify.
1469 * typeprint.c (show_print_type, set_print_type): Constify.
1470 * go32-nat.c (go32_info_dos_command): Constify.
1471
fdf44873
TT
14722017-10-11 Tom Tromey <tom@tromey.com>
1473
1474 * breakpoint.c (prepare_re_set_context): Remove.
1475 (breakpoint_re_set_one): Update. Don't use cleanups.
1476 (breakpoint_re_set): Use scoped_restore, std::string, and
1477 scoped_restore_current_language.
1478
81b1e71c
TT
14792017-10-11 Tom Tromey <tom@tromey.com>
1480
1481 * breakpoint.c (commands_command_1): Use std::string.
1482 (cleanup_executing_breakpoints): Remove.
1483 (bpstat_do_actions_1): Use scoped_restore.
1484 (bpstat_check_watchpoint): Use std::string.
1485 (decode_static_tracepoint_spec): Likewise.
1486 (break_range_command): Likewise.
1487 (watch_command_1): Likewise.
1488 (compare_breakpoints): Change argument types.
1489 (clear_command): Use std::vector.
1490 (cleanup_executing_breakpoints): Remove.
1491 (update_global_location_list): Use unique_xmalloc_ptr.
1492 (strace_command): Remove unused declaration.
1493
4f9d9906
JB
14942017-10-11 John Baldwin <jhb@FreeBSD.org>
1495
1496 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1497 * NEWS: Mention new FreeBSD/arm native configuration.
1498 * configure.host: Add arm*-*-freebsd*.
1499 * configure.nat: Likewise.
1500 * arm-fbsd-nat.c: New file.
1501
7176dfd2
JB
15022017-10-11 John Baldwin <jhb@FreeBSD.org>
1503
1504 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1505 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1506 * NEWS: Mention new FreeBSD/arm target.
1507 * configure.tgt: Add arm*-*-freebsd*.
1508 * arm-fbsd-tdep.c: New file.
1509 * arm-fbsd-tdep.h: New file.
1510
fe220226
MR
15112017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1512
1513 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1514 `gdbarch_elfcore_write_linux_prpsinfo'.
1515 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1516 method.
1517 (elf_internal_linux_prpsinfo): Remove declaration.
1518 * gdbarch.h: Regenerate.
1519 * gdbarch.c: Regenerate.
1520
a2f63b2e
MR
15212017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1522
1523 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1524 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1525
458ca1d0
PA
15262017-10-11 Pedro Alves <palves@redhat.com>
1527
1528 * breakpoint.c (reattach_breakpoints): Delete.
1529 * breakpoint.h (reattach_breakpoints): Delete.
1530
905014d7
SM
15312017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1532
1533 * symfile.c (registered_sym_fns): Make struct, not typedef.
1534 (DEF_VEC_O (registered_sym_fns)): Remove.
1535 (symtab_fns): Change type to std::vector.
1536 (add_symtab_fns): Adjust.
1537 (find_sym_fns): Adjust.
1538
56d704da
AK
15392017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1540
1541 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1542 * arc-tdep.h (arc_arch_is_em): New function.
1543 (arc_arch_is_hs): Likewise.
1544
7fa29be9
EB
15452017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1546
1547 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1548 parentheses in the declaration.
1549 (macro_lookup_inclusion): Likewise.
1550 (macro_lookup_definition): Likewise.
1551 * p-lang.h (pascal_builtin_types): Likewise.
1552 * tui/tui-data.c (tui_win_list): Likewise.
1553 * tui/tui-data.h (tui_win_list): Likewise.
1554 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1555
d9b477e3
KB
15562017-10-11 Mark Rages <markrages@gmail.com>
1557
1558 * target-memory.c (block_boundaries): Fix for block address not
1559 aligned on block size.
1560
65630365
PA
15612017-10-10 Pedro Alves <palves@redhat.com>
1562 Tom Tromey <tom@tromey.com>
1563
1564 * breakpoint.c (struct captured_breakpoint_query_args)
1565 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1566 (print_breakpoint): New.
1567 * breakpoint.h (print_breakpoint): Declare.
1568 * common/common-exceptions.h (enum return_reason): Remove
1569 references to catch_exceptions.
1570 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1571 Delete.
1572 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1573 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1574 * gdb.h: Delete.
1575 * gdbthread.h (thread_select): Declare.
1576 * mi/mi-cmd-break.c: Don't include gdb.h.
1577 (breakpoint_notify): Use print_breakpoint.
1578 * mi/mi-cmd-catch.c: Don't include gdb.h.
1579 * mi/mi-interp.c: Don't include gdb.h.
1580 (mi_print_breakpoint_for_event): New.
1581 (mi_breakpoint_created, mi_breakpoint_modified): Use
1582 mi_print_breakpoint_for_event.
1583 * mi/mi-main.c: Don't include gdb.h.
1584 (mi_cmd_thread_select): Parse the global thread ID here. Use
1585 thread_select instead of gdb_thread_select.
1586 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1587 of using gdb_list_thread_ids.
1588 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1589 FILEIO_ENOSYS here.
1590 (remote_fileio_request): Use TRY/CATCH instead of
1591 catch_exceptions.
1592 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1593 (symbol_file_add_from_memory_wrapper): Delete.
1594 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1595 * thread.c: Don't include gdb.h.
1596 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1597 (thread_alive): Use thread_select.
1598 (do_captured_thread_select): Delete, parts salvaged as ...
1599 (thread_select): ... this new function.
1600 (gdb_thread_select): Delete.
1601
bf469271
PA
16022017-10-10 Pedro Alves <palves@redhat.com>
1603 Tom Tromey <tom@tromey.com>
1604
1605 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1606 and reverse logic.
1607 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1608 No longer macros. Instead ...
1609 (enum wp_check_result): They're now values of this new
1610 enumeration.
1611 (watchpoint_check): Change return type to wp_check_result and
1612 parameter type to bpstat.
1613 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1614 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1615 catch_errors. Reverse logic of watchpoint_check call.
1616 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1617 pointer as parameter.
1618 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1619 * common/common-exceptions.c (throw_exception_sjlj): Update
1620 comments to avoid mentioning catch_errors.
1621 * exceptions.c (catch_errors): Delete.
1622 * exceptions.h: Update comments to avoid mentioning catch_errors.
1623 (catch_errors_ftype, catch_errors): Delete.
1624 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1625 (hook_stop_stub): Delete.
1626 (restore_selected_frame): Change return type to void, and
1627 parameter type to const frame_id &.
1628 (restore_infcall_control_state): Use TRY/CATCH instead of
1629 catch_errors.
1630 * main.c (captured_command_loop): Return void and remove
1631 parameter. Remove references to catch_errors.
1632 (captured_main): Use TRY/CATCH instead of catch_errors.
1633 * objc-lang.c (objc_submethod_helper_data)
1634 (find_objc_msgcall_submethod_helper): Delete.
1635 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1636 catch_errors.
1637 * record-full.c (record_full_message): Return void.
1638 (record_full_message_args, record_full_message_wrapper): Delete.
1639 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1640 instead of catch_errors.
1641 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1642 parameter type to int.
1643 * solib-darwin.c (open_symbol_file_object): Ditto.
1644 * solib-dsbt.c (open_symbol_file_object): Ditto.
1645 * solib-frv.c (open_symbol_file_object): Ditto.
1646 * solib-svr4.c (open_symbol_file_object): Ditto.
1647 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1648 * solib.c (update_solib_list): Use TRY/CATCH instead of
1649 catch_errors.
1650 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1651 Change type.
1652 * symmisc.c (struct print_symbol_args): Remove.
1653 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1654 (print_symbol): Change type.
1655 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1656 and remove parameters.
1657 (catch_errors): New.
1658 (get_windows_debug_event): Adjust.
1659
1a56bfa5
TT
16602017-10-09 Tom Tromey <tom@tromey.com>
1661
1662 * mi/mi-main.c (free_splay_tree): Remove.
1663 (list_available_thread_groups): Use splay_tree_up.
1664 * common/gdb_splay_tree.h: New file.
1665
0c478e2d
TT
16662017-10-09 Tom Tromey <tom@tromey.com>
1667
1668 * mi/mi-main.c (do_nothing): Remove.
1669 (list_available_thread_groups): Update.
1670
cbd2b4e3
PA
16712017-10-09 Pedro Alves <palves@redhat.com>
1672
1673 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1674 reading registers when switching context.
1675
a181c0bf
JB
16762017-10-09 John Baldwin <jhb@FreeBSD.org>
1677
1678 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1679 (fbsd_convert_siginfo): Likewise.
1680 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1681
6e66f753
SM
16822017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1683
1684 * configure.ac (try_guile_versions): Remove guile-2.2.
1685 * configure: Regenerate.
1686
890e9790
TT
16872017-10-09 Tom Tromey <tom@tromey.com>
1688
1689 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1690 (COMPILE.pre): Use $(CXX).
1691
109483d9
PA
16922017-10-09 Pedro Alves <palves@redhat.com>
1693
1694 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1695 Use bool.
1696 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1697 * cp-support.h (cp_remove_params): Now returns a
1698 gdb::unique_xmalloc_ptr.
1699 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1700 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1701 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1702 returning a gdb::unique_xmalloc_ptr.
1703 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1704 * stack.c (find_frame_funname): Adjust to cp_remove_params
1705 returning a gdb::unique_xmalloc_ptr.
1706
791afaa2
TT
17072017-10-08 Tom Tromey <tom@tromey.com>
1708
1709 * dwarf2read.c (dwarf2_get_dwz_file): Use
1710 gdb::unique_xmalloc_ptr.
1711 (find_slot_in_mapped_hash): Likewise.
1712 (dwarf2_physname): Likewise.
1713 (create_dwo_unit_in_dwp_v1): Use std::string.
1714 (create_dwo_unit_in_dwp_v2): Likewise.
1715 (lookup_dwo_cutu): Likewise.
1716 (inherit_abstract_dies): Use std::vector.
1717 (read_array_type): Likewise.
1718 (dwarf_decode_macros): Remove unused declaration.
1719 (unsigned_int_compar): Remove.
1720 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1721 (psymtabs_addrmap_cleanup): Remove.
1722
30a9c02f
TT
17232017-10-08 Tom Tromey <tom@tromey.com>
1724
1725 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1726 * frame.h (frame_cleanup_after_sniffer): Declare.
1727 (frame_prepare_for_sniffer): Return void.
1728 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1729 type of argument.
1730 (frame_prepare_for_sniffer): Return void.
1731
757325a3
TT
17322017-10-08 Tom Tromey <tom@tromey.com>
1733
1734 * utils.h (make_cleanup_value_free): Remove.
1735 * utils.c (do_value_free, struct cleanup): Remove.
1736 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1737 Use gdb_value_up.
1738 * value.h (struct value_deleter): New.
1739 (gdb_value_up): New typedef.
1740
b9c04fb2
TT
17412017-10-08 Tom Tromey <tom@tromey.com>
1742
1743 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1744 (make_cleanup_free_search_symbols): Remove.
1745 (search_symbols): Return std::vector.
1746 (symbol_search::compare_search_syms): Now member of
1747 symbol_search. Change arguments.
1748 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1749 (symtab_symbol_info, rbreak_command): Update.
1750 * symtab.h (struct symbol_search) <next>: Remove.
1751 Add constructors.
1752 (symbol_search::operator<): New function.
1753 (symbol_search::operator==): New function.
1754 (search_symbols): Remove std::vector.
1755 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1756 (symbol_search::compare_search_syms): Declare.
1757
0d28b0a5
YQ
17582017-10-06 Yao Qi <yao.qi@linaro.org>
1759
1760 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1761 arch/aarch64-insn.o.
1762 Remove one rule.
1763 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1764
71917808
YQ
17652017-10-06 Yao Qi <yao.qi@linaro.org>
1766
1767 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1768 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1769 arch/arm-linux.o respectively.
1770 * configure.tgt: Likewise.
1771
2081b2b2
YQ
17722017-10-06 Yao Qi <yao.qi@linaro.org>
1773
1774 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1775 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1776
a1b85d28
PA
17772017-10-06 Pedro Alves <palves@redhat.com>
1778
1779 * windows-nat.c: Include <algorithm>.
1780
d97987e2
YQ
17812017-10-06 Yao Qi <yao.qi@linaro.org>
1782
1783 * configure.tgt (i386_tobjs): New variable.
1784 (amd64_tobjs): New variable.
1785 Set $cpu_obs and $os_obs.
1786
f38307f5
YQ
17872017-10-06 Yao Qi <yao.qi@linaro.org>
1788
1789 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1790 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1791 (clean): Remove object files and dependency files.
1792 (distclean): Remove the directory.
1793 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1794 * configure: Re-generated.
1795 * configure.tgt: Replace amd64.o with arch/amd64.o.
1796
2f924de6
JM
17972017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1798
1799 PR build/22188
1800 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1801 and SETEND.
1802
2fd9d7ca
PA
18032017-10-05 Pedro Alves <palves@redhat.com>
1804
1805 * linux-nat.c (linux_child_follow_fork): When following the parent
1806 and detaching the child, consult the parent thread's architecture
1807 instead of the child's.
1808
d13b8493
UW
18092017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1810
1811 * ax.h: Do not include "doublest.h".
1812 (union agent_val): Remove.
1813
3b4b2f16
UW
18142017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1815
1816 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1817 (decimal_to_string): Return std::string object.
1818 (decimal_from_string): Accept std::string object. Return bool.
1819 (decimal_from_integral, decimal_from_doublest): Remove.
1820 (decimal_from_longest): Add prototype.
1821 (decimal_from_ulongest): Likewise.
1822 (decimal_to_longest): Likewise.
1823 (decimal_from_doublest): Likewise.
1824 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1825 (MAX_DECIMAL_STRING): Move here.
1826 (decimal_to_string): Return std::string object.
1827 (decimal_from_string): Accept std::string object. Return bool.
1828 (decimal_from_integral): Remove, replace by ...
1829 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1830 (decimal_to_longest): New function.
1831 (decimal_from_floating): Remove, replace by ...
1832 (decimal_from_doublest): ... this new function.
1833 (decimal_to_doublest): Update to new decimal_to_string interface.
1834
1835 * value.c (unpack_long): Use decimal_to_longest.
1836 * valops.c (value_cast): Use decimal_from_doublest instead of
1837 decimal_from_floating. Use decimal_from_[u]longest isntead of
1838 decimal_from_integral.
1839 * valarith.c (value_args_as_decimal): Likewise.
1840 * valprint.c (print_decimal_floating): Update to new
1841 decimal_to_string interface.
1842 * printcmd.c (printf_decfloat): Likewise.
1843 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1844
1841ee5d
UW
18452017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1846
1847 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1848 * gdbtypes.c: Include "floatformat.h".
1849 * value.c: Likewise.
1850 * m68k-tdep.c: Likewise.
1851
1852 * findvar.c: Do not include "floatformat.h".
1853 * amd64-darwin-tdep.c: Likewise.
1854 * arm-linux-tdep.c: Likewise.
1855 * i386-darwin-tdep.c: Likewise.
1856 * i387-tdep.c: Likewise.
1857 * m68k-linux-tdep.c: Likewise.
1858 * mep-tdep.c: Likewise.
1859 * mips-tdep.c: Likewise.
1860 * nios2-tdep.c: Likewise.
1861 * s390-linux-tdep.c: Likewise.
1862 * sparc-obsd-tdep.c: Likewise.
1863 * sparc-tdep.c: Likewise.
1864 * sparc64-tdep.c: Likewise.
1865 * spu-tdep.c: Likewise.
1866 * tic6x-tdep.c: Likewise.
1867 * tilegx-tdep.c: Likewise.
1868 * vax-tdep.c: Likewise.
1869 * xstormy16-tdep.c: Likewise.
1870 * xtensa-tdep.c: Likewise.
1871
1872 * top.c: Do not include "doublest.h".
1873 * aarch64-tdep.c: Likewise.
1874 * alpha-tdep.c: Likewise.
1875 * arm-linux-tdep.c: Likewise.
1876 * m68k-linux-tdep.c: Likewise.
1877 * tilegx-tdep.c: Likewise.
1878 * xstormy16-tdep.c: Likewise.
1879
a80a6471
JB
18802017-10-05 John Baldwin <jhb@FreeBSD.org>
1881
1882 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1883 (mipsn32_fbsd_sigframe): Define.
1884 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1885 for FreeBSD/mipsn32.
1886
12c4bd7f
JB
18872017-10-05 John Baldwin <jhb@FreeBSD.org>
1888
1889 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1890 AT_HWCAP.
1891
c91933e9
TG
18922017-10-05 Tristan Gingold <tgingold@free.fr>
1893
1894 * MAINTAINERS (Misc): Update my email address.
1895
5cd63fda
PA
18962017-10-04 Pedro Alves <palves@redhat.com>
1897
1898 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1899 it instead of target_gdbarch.
1900 (get_remote_state, get_remote_packet_size): Adjust
1901 get_remote_arch_state calls, passing down target_gdbarch
1902 explicitly.
1903 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1904 'gdbarch' and use it instead of target_gdbarch.
1905 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1906 passing down target_gdbarch explicitly.
1907 (struct stop_reply) <arch>: New field.
1908 (remote_parse_stop_reply): Use the stopped thread's architecture,
1909 not the current inferior's. Save the architecture in the
1910 stop_reply.
1911 (process_stop_reply): Use the stop reply's architecture.
1912 (process_g_packet, remote_fetch_registers)
1913 (remote_prepare_to_store, store_registers_using_G)
1914 (remote_store_registers): Adjust get_remote_arch_state calls,
1915 using the regcache's architecture.
1916 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1917 passing down target_gdbarch explicitly.
1918 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1919 beneath instead of calling target_gdbarch.
1920 * target.c (default_thread_architecture): Use the specified
1921 inferior's architecture, instead of the current inferior's
1922 architecture (via target_gdbarch).
1923
ed4227b7
PA
19242017-10-04 Pedro Alves <palves@redhat.com>
1925
1926 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1927 case.
1928 (regcache_print): Handle !target_has_registers here instead.
1929
55b11ddf
PA
19302017-10-04 Pedro Alves <palves@redhat.com>
1931
1932 * frame.c (create_test_frame): Delete.
1933 * frame.h (create_test_frame): Delete.
1934 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1935 (class regcache_test): Delete.
1936 (test_target_has_registers, test_target_has_stack)
1937 (test_target_has_memory, test_target_prepare_to_store)
1938 (test_target_store_registers): New functions.
1939 (test_target_ops): New class.
1940 (register_to_value_test): Error out if there's already a
1941 process_stratum (or higher) target pushed. Create a fuller mock
1942 environment, with mock target_ops, inferior, address space, thread
1943 and inferior_ptid.
1944 * progspace.c (struct address_space): Move to ...
1945 * progspace.h (struct address_space): ... here.
1946 * regcache.h (regcache::~regcache, regcache::raw_write)
1947 [GDB_SELF_TEST]: No longer virtual.
1948
4c71c105
SM
19492017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1950
1951 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1952
73dcd72d
PA
19532017-10-04 Pedro Alves <palves@redhat.com>
1954
1955 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1956 out of 'between TRY and CATCH'.
1957
44704526
PA
19582017-10-04 Pedro Alves <palves@redhat.com>
1959
1960 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1961 * common/common-exceptions.h (TRY): Open an outermost scope.
1962 Expand intro comment.
1963 (CATCH): Reindent.
1964 (END_CATCH): Close the outermost scope.
1965 * completer.c (complete_line_internal): Add missing END_CATCH.
1966
bc3b087d
SDJ
19672017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1968
1969 * NEWS (Changes since GDB 8.0): Add entry about new
1970 'set-cwd-on-gdbserver' feature.
1971 (New remote packets): Add entry for QSetWorkingDir.
1972 * common/common-inferior.h (set_inferior_cwd): New prototype.
1973 * infcmd.c (set_inferior_cwd): Remove "static".
1974 (show_cwd_command): Expand text to include remote debugging.
1975 * remote.c: Add PACKET_QSetWorkingDir.
1976 (remote_protocol_features) <QSetWorkingDir>: New entry for
1977 PACKET_QSetWorkingDir.
1978 (extended_remote_set_inferior_cwd): New function.
1979 (extended_remote_create_inferior): Call
1980 "extended_remote_set_inferior_cwd".
1981 (_initialize_remote): Call "add_packet_config_cmd" for
1982 QSetWorkingDir.
1983
d092c5a2
SDJ
19842017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1985
1986 * NEWS (New commands): Mention "set/show cwd".
1987 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
1988 "cd" command's help text.
1989 * common/common-inferior.h (get_inferior_cwd): New prototype.
1990 * infcmd.c (inferior_cwd_scratch): New global variable.
1991 (set_inferior_cwd): New function.
1992 (get_inferior_cwd): Likewise.
1993 (set_cwd_command): Likewise.
1994 (show_cwd_command): Likewise.
1995 (_initialize_infcmd): Add "set/show cwd" commands.
1996 * inferior.h (class inferior) <cwd>: New field.
1997 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
1998 (fork_inferior): Change inferior's cwd before its execution.
1999 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2000 to CreateProcess.
2001
7da0a886
SDJ
20022017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2003
2004 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2005 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2006 (COMMON_OBS): Add gdb_tilde_expand.o.
2007 * common/gdb_tilde_expand.c: New file.
2008 * common/gdb_tilde_expand.h: Likewise.
2009
db8dd160
MR
20102017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2011
2012 * gdbarch.sh (objfile): Remove duplicate declaration.
2013 * gdbarch.h: Regenerate.
2014
f8bfbf22
TT
20152017-10-03 Tom Tromey <tom@tromey.com>
2016
2017 * utils.c (internal_vproblem): Use string_vprintf.
2018
5178ed48
TT
20192017-10-03 Tom Tromey <tom@tromey.com>
2020
2021 * printcmd.c (info_symbol_command): Use std::string.
2022
8cff8730
TT
20232017-10-03 Tom Tromey <tom@tromey.com>
2024
2025 * top.c (gdb_safe_append_history): Use std::string.
2026
895b8f30
TT
20272017-10-03 Tom Tromey <tom@tromey.com>
2028
2029 * event-top.c (stdin_event_handler): Update.
2030 * main.c (captured_main_1): Update.
2031 * top.h (make_delete_ui_cleanup): Remove.
2032 (struct ui): Add constructor and destructor.
2033 (new_ui, delete_ui): Remove.
2034 * top.c (make_delete_ui_cleanup): Remove.
2035 (new_ui_command): Use std::unique_ptr.
2036 (delete_ui_cleanup): Remove.
2037 (ui::ui): Rename from new_ui. Update.
2038 (free_ui): Remove.
2039 (ui::~ui): Rename from delete_ui. Update.
2040
0efef640
TT
20412017-10-03 Tom Tromey <tom@tromey.com>
2042
2043 * symfile.c (load_progress): Use gdb::byte_vector.
2044
245ad7d3
TT
20452017-10-03 Tom Tromey <tom@tromey.com>
2046
2047 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2048 declaration.
2049 * printcmd.c (x_command): Remove unused declaration.
2050 * symfile.c (symbol_file_command): Remove unused declaration.
2051
e05550d7
TT
20522017-10-03 Tom Tromey <tom@tromey.com>
2053
2054 * utils.c (internal_vproblem): Use std::string.
2055 (defaulted_query): Likewise.
2056
b95de2b7
TT
20572017-10-03 Tom Tromey <tom@tromey.com>
2058
2059 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2060 * top.c (execute_command_to_string): Update.
2061 * utils.c (make_cleanup_restore_page_info): Remove.
2062 (do_restore_page_info_cleanup): Remove.
2063 (set_batch_flag_and_restore_page_info):
2064 New.
2065 (make_cleanup_restore_page_info): Remove.
2066 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2067 (~set_batch_flag_and_restore_page_info): New
2068 (make_cleanup_restore_uinteger): Remove.
2069 (make_cleanup_restore_integer): Remove.
2070 (struct restore_integer_closure): Remove.
2071 (restore_integer): Remove.
2072 * utils.h (struct set_batch_flag_and_restore_page_info): New
2073 class.
2074 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2075 (make_cleanup_restore_page_info): Remove.
2076 (make_cleanup_restore_uinteger) Remove.
2077 (make_cleanup_restore_integer) Remove.
2078
07036511
TT
20792017-10-03 Tom Tromey <tom@tromey.com>
2080
2081 * record-full.h (record_full_gdb_operation_disable_set): Return
2082 scoped_restore_tmpl<int>.
2083 * infrun.c (adjust_pc_after_break): Update.
2084 (handle_signal_stop): Update.
2085 * record-full.c (record_full_gdb_operation_disable_set): Return
2086 scoped_restore_tmpl<int>.
2087 (record_full_wait_1, record_full_insert_breakpoint)
2088 (record_full_remove_breakpoint, record_full_save)
2089 (record_full_goto_insn): Update.
2090
45320ffa
TT
20912017-10-02 Tom Tromey <tom@tromey.com>
2092
2093 PR rust/22236:
2094 * rust-lang.c (rust_val_print_str): New function.
2095 (val_print_struct): Call it.
2096 (rust_subscript): Preserve name of slice type.
2097
b3e3859b
TT
20982017-10-02 Tom Tromey <tom@tromey.com>
2099
2100 * rust-lang.c (rust_subscript): Handle slices in
2101 EVAL_AVOID_SIDE_EFFECTS case.
2102
01af5e0d
TT
21032017-10-02 Tom Tromey <tom@tromey.com>
2104
2105 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2106
888e3ddb
TT
21072017-10-02 Tom Tromey <tom@tromey.com>
2108
2109 * rust-lang.h (rust_slice_type): Add "extern".
2110
cc536b21
PA
21112017-10-02 Tom Tromey <tom@tromey.com>
2112 Pedro Alves <palves@redhat.com>
2113
2114 * ada-lang.h (ada_exc_info::operator<): Make const.
2115 (ada_exc_info::operator==): Make const.
2116 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2117 Make const.
2118
386c8614
TT
21192017-09-29 Tom Tromey <tom@tromey.com>
2120
2121 * target.c (read_whatever_is_readable): Change type of "result".
2122 Update.
2123 (free_memory_read_result_vector): Remove.
2124 (read_memory_robust): Change return type. Update.
2125 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2126 bin2hex, std::string.
2127 * target.h (memory_read_result_s): Remove typedef.
2128 (free_memory_read_result_vector): Remove.
2129 (read_memory_robust): Return std::vector.
2130
789c4b5e
TT
21312017-09-29 Tom Tromey <tom@tromey.com>
2132
2133 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2134
ab816a27
TT
21352017-09-29 Tom Tromey <tom@tromey.com>
2136
2137 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2138 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2139 operator< and operator==.
2140 (ada_exceptions_list): Return a std::vector.
2141 * ada-lang.c (ada_exc_info::operator<): Rename from
2142 compare_ada_exception_info.
2143 (ada_exc_info::operator==): New.
2144 (sort_remove_dups_ada_exceptions_list): Change type of
2145 "exceptions".
2146 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2147 (ada_add_global_exceptions): Likewise.
2148 (ada_exceptions_list_1): Return a std::vector.
2149 (ada_exceptions_list): Likewise.
2150
52f9abe4
TT
21512017-09-29 Tom Tromey <tom@tromey.com>
2152
2153 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2154 'std::set *'.
2155 (print_one_inferior): Update.
2156 (free_vector_of_ints): Remove.
2157 (list_available_thread_groups): Change "ids" to std::set.
2158 (mi_cmd_list_thread_groups): Update.
2159 (struct collect_cores_data) <core>: Now a std::set.
2160 (collect_cores): Update.
2161 (unique): Remove.
2162 (print_one_inferior): Update.
2163
dcd5ddcc
TT
21642017-09-29 Tom Tromey <tom@tromey.com>
2165
2166 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2167 (mi_execute_async_cli_command): Likewise.
2168 (mi_cmd_trace_frame_collected): Use field_fmt.
2169
45d288cc
TT
21702017-09-29 Tom Tromey <tom@tromey.com>
2171
2172 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2173 gdb::byte_vector.
2174
6afe2f4a
TT
21752017-09-29 Tom Tromey <tom@tromey.com>
2176
2177 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2178
9813429a
TT
21792017-09-29 Tom Tromey <tom@tromey.com>
2180
2181 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2182
2d6960b4
TT
21832017-09-29 Tom Tromey <tom@tromey.com>
2184
2185 * varobj.h (varobj_gen_name): Return std::string.
2186 * varobj.c (varobj_gen_name): Return std::string.
2187 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2188 (mi_cmd_var_delete): Don't copy "name".
2189
784c453a
TT
21902017-09-29 Tom Tromey <tom@tromey.com>
2191
2192 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2193 (mi_cmd_break_insert_1): Update.
2194
a9bc57b9
TT
21952017-09-29 Tom Tromey <tom@tromey.com>
2196
2197 * target.h (make_scoped_defer_target_commit_resume): Update.
2198 * target.c (make_scoped_defer_target_commit_resume): Rename from
2199 make_cleanup_defer_target_commit_resume. Return a
2200 scoped_restore.
2201 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2202
9754d8c4
TT
22032017-09-29 Tom Tromey <tom@tromey.com>
2204
2205 * main.c (captured_main_1): Remove unused declaration.
2206 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2207
99ef965c
TT
22082017-09-29 Tom Tromey <tom@tromey.com>
2209
2210 * symtab.c (search_symbols): Remove unused outer cleanup.
2211 (make_source_files_completion_list): Remove unused declaration.
2212
42518ba7
TT
22132017-09-29 Tom Tromey <tom@tromey.com>
2214
2215 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2216
726b2169
TT
22172017-09-29 Tom Tromey <tom@tromey.com>
2218
2219 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2220 gdb::byte_vector.
2221
55b06432
TT
22222017-09-29 Tom Tromey <tom@tromey.com>
2223
2224 * complaints.c (vcomplaint): Use std::string.
2225
8abcee91
TT
22262017-09-29 Tom Tromey <tom@tromey.com>
2227
2228 * tracepoint.c (trace_variable_command): Use std::string.
2229 (encode_actions_1): Remove unused declarations.
2230 (create_tsv_from_upload): Use std::string.
2231
6ad94bc7
TT
22322017-09-29 Tom Tromey <tom@tromey.com>
2233
2234 * cp-support.c (gdb_demangle): Use std::string.
2235
2003f3d8
TT
22362017-09-29 Tom Tromey <tom@tromey.com>
2237
2238 * stack.c (parse_frame_specification): Use std::string
2239 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2240
8f8accb5
TT
22412017-09-29 Tom Tromey <tom@tromey.com>
2242
2243 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2244
200aa7b1
TT
22452017-09-29 Tom Tromey <tom@tromey.com>
2246
2247 * utils.c (vfprintf_maybe_filtered): Use std::string.
2248 (vfprintf_unfiltered): Likewise.
2249
606aae8a
TT
22502017-09-29 Tom Tromey <tom@tromey.com>
2251
2252 * event-top.c (top_level_prompt): Return std::string.
2253 (display_gdb_prompt): Update.
2254
bd413795
TT
22552017-09-29 Tom Tromey <tom@tromey.com>
2256
2257 * unittests/common-utils-selftests.c (format): New function.
2258 (string_vprintf_tests): New function.
2259 (_initialize_common_utils_selftests): Register new tests.
2260 * common/common-utils.c (string_vprintf): New function.
2261 * common/common-utils.h (string_vprintf): Declare.
2262
256642e8
PA
22632017-09-29 Pedro Alves <palves@redhat.com>
2264
2265 * common/rsp-low.c (unpack_varlen_hex): Constify.
2266 * common/rsp-low.h (unpack_varlen_hex): Constify.
2267 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2268 Constify.
2269 * remote.c (remote_set_permissions, read_ptid)
2270 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2271 (remote_static_tracepoint_marker_at)
2272 (remote_static_tracepoint_markers_by_strid)
2273 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2274 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2275 (parse_tracepoint_definition, parse_tsv_definition)
2276 (parse_static_tracepoint_marker_definition): Constify.
2277 * tracepoint.h (parse_static_tracepoint_marker_definition)
2278 (parse_trace_status, parse_tracepoint_status)
2279 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2280
b6bb3468
PA
22812017-09-29 Pedro Alves <palves@redhat.com>
2282
2283 * remote.c (target_buf, target_buf_size): Delete.
2284 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2285 Use the connection's packet buffer instead.
2286 All callers adjusted.
2287 (_initialize_remote): Remove references to target_buf and
2288 target_buf_size.
2289
b2f8eb7a
PA
22902017-09-28 Pedro Alves <palves@redhat.com>
2291
2292 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2293 unittests/common-utils-selftests.c.
2294 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2295 (COMMON_OBS): Remove utils-selftests.o.
2296 * utils-selftests.c: Move to ...
2297 * unittests/common-utils-selftests.c: ... here and rename self
2298 test to "string_printf".
2299
08302ed2
DE
23002017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2301
2302 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2303 having NULL cus or tus.
2304
96a5a1d3
UW
23052017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2306
2307 * arm-tdep.c: (convert_from_extended): Remove.
2308 (convert_to_extended): Likewise.
2309 (arm_extract_return_value): Use convert_typed_floating.
2310 (arm_store_return_value): Likewise.
2311
2312 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2313 * sh-tdep.c: Do not include "floatformat.h".
2314 (sh_littlebyte_bigword_type): New function.
2315 (sh_register_convert_to_virtual): Use convert_typed_floating.
2316 (sh_register_convert_to_raw): Likewise.
2317 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2318 (sh64_littlebyte_bigword_type): New function.
2319 (sh64_extract_return_value): Use convert_typed_floating.
2320 (sh64_register_convert_to_virtual): Likewise.
2321 (sh64_register_convert_to_raw): Likewise.
2322
0db7851f
UW
23232017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2324
2325 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2326 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2327
2328 * gdbtypes.h (union type_specific): Make field floatformat hold
2329 just a single struct floatformat, not an array.
2330 (floatformat_from_type): Move here.
2331 * gdbtypes.c (floatformat_from_type): Move here. Update to
2332 changed TYPE_FLOATFORMAT definition.
2333 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2334 (recursive_dump_type): Likewise.
2335 (init_float_type): Install correct floatformat for byte order.
2336 (arch_float_type): Likewise.
2337
77b7c781
UW
23382017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2339
2340 * gdbtypes.c (init_type): Change incoming argument from
2341 length-in-bytes to length-in-bits. Assert length is a
2342 multiple of TARGET_CHAR_BITS.
2343 (arch_type, arch_flags_type): Likewise.
2344 (init_integer_type): Update call to init_type.
2345 (init_character_type): Likewise.
2346 (init_boolean_type): Likewise.
2347 (init_float_type): Likewise.
2348 (init_decfloat_type): Likewise.
2349 (init_complex_type): Likewise.
2350 (init_pointer_type): Likewise.
2351 (objfile_type): Likewise.
2352 (arch_integer_type): Update call to arch_type.
2353 (arch_character_type): Likewise.
2354 (arch_boolean_type): Likewise.
2355 (arch_float_type): Likewise.
2356 (arch_decfloat_type): Likewise.
2357 (arch_complex_type): Likewise.
2358 (arch_pointer_type): Likewise.
2359 (gdbtypes_post_init): Likewise.
2360
2361 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2362 (read_base_type): Likewise.
2363 * mdebugread.c (basic_type): Likewise.
2364 * stabsread.c (dbx_init_float_type): Likewise.
2365 (rs6000_builtin_type): Likewise.
2366 (read_range_type): Likewise. Also, fix call to init_integer_type
2367 with erroneous length argument.
2368
2369 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2370 * d-lang.c (build_d_types): Likewise.
2371 * f-lang.c (build_fortran_types): Likewise.
2372 * go-lang.c (build_go_types): Likewise.
2373 * opencl-lang.c (build_opencl_types): Likewise.
2374 * jit.c (finalize_symtab): Likewise.
2375 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2376 (build_std_type_info_type): Likewise.
2377 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2378 update call to arch_flags_type.
2379
2380 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2381 arch_type.
2382 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2383 * windows-tdep.c (windows_get_tlb_type): Likewise.
2384
2385 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2386 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2387 * m32c-tdep.c (make_types): Likewise.
2388 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2389 (rl78_psw_type): Update call to arch_flags_type.
2390 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2391 * rx-tdep.c (rx_psw_type): Likewise.
2392 (rx_fpsw_type): Likewise.
2393 * sparc-tdep.c (sparc_psr_type): Likewise.
2394 (sparc_fsr_type): Likewise.
2395 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2396 (sparc64_ccr_type): Likewise.
2397 (sparc64_fsr_type): Likewise.
2398 (sparc64_fprs_type): Likewise.
2399
f21b4d5c
TT
24002017-09-27 Tom Tromey <tom@tromey.com>
2401
2402 * findcmd.c (find_command): Constify.
2403
643c2ffa
TT
24042017-09-27 Tom Tromey <tom@tromey.com>
2405
2406 * ada-tasks.c (task_command_1, task_command): Constify.
2407
510e5e56
TT
24082017-09-27 Tom Tromey <tom@tromey.com>
2409
2410 * symtab.c (maintenance_print_symbol_cache)
2411 (maintenance_flush_symbol_cache)
2412 (maintenance_print_symbol_cache_statistics): Constify.
2413
e503b191
TT
24142017-09-27 Tom Tromey <tom@tromey.com>
2415
2416 * inferior.c (detach_inferior_command, kill_inferior_command)
2417 (inferior_command): Constify.
2418
4e001312
TT
24192017-09-27 Tom Tromey <tom@tromey.com>
2420
2421 * regcache.c (regcache_print, maintenance_print_registers)
2422 (maintenance_print_raw_registers)
2423 (maintenance_print_cooked_registers)
2424 (maintenance_print_register_groups)
2425 (maintenance_print_remote_registers): Constify.
2426
77763700
TT
24272017-09-27 Tom Tromey <tom@tromey.com>
2428
2429 * printcmd.c (map_display_numbers, undisplay_command)
2430 (enable_disable_display_command, enable_display_command)
2431 (disable_display_command): Constify.
2432
4495129a
TT
24332017-09-27 Tom Tromey <tom@tromey.com>
2434
2435 * breakpoint.h (delete_command): Don't declare.
2436 * breakpoint.c (delete_command, enable_once_command)
2437 (enable_count_command, enable_delete_command, breakpoint_1)
2438 (maintenance_info_breakpoints, stopin_command, stopat_command)
2439 (delete_command, delete_trace_command, save_breakpoints)
2440 (save_breakpoints_command, save_tracepoints_command): Constify.
2441
3088cf40
TT
24422017-09-27 Tom Tromey <tom@tromey.com>
2443
2444 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2445 (skip_ws, extract_identifier, macro_define_command)
2446 (macro_undef_command, macro_list_command): Constify.
2447
69f476a3
TT
24482017-09-27 Tom Tromey <tom@tromey.com>
2449
2450 * infcmd.c (environment_info, set_environment_command)
2451 (unset_environment_command, path_info, info_proc_cmd_1)
2452 (info_proc_cmd_mappings, info_proc_cmd_stat)
2453 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2454 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2455
c4a3e68e
TT
24562017-09-27 Tom Tromey <tom@tromey.com>
2457
2458 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2459 Constify.
2460
c9d31bd6
TT
24612017-09-27 Tom Tromey <tom@tromey.com>
2462
2463 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2464
1f3f85eb
TT
24652017-09-27 Tom Tromey <tom@tromey.com>
2466
2467 * demangle.c (demangle_command): Constify.
2468
9c504b5d
TT
24692017-09-27 Tom Tromey <tom@tromey.com>
2470
2471 * progspace.c (maintenance_info_program_spaces_command):
2472 Constify.
2473
6663cf91
TT
24742017-09-27 Tom Tromey <tom@tromey.com>
2475
2476 * compile/compile.c (check_raw_argument, compile_file_command)
2477 (compile_code_command, compile_print_command): Constify.
2478
34e5fa26
TT
24792017-09-27 Tom Tromey <tom@tromey.com>
2480
2481 * reggroups.c (maintenance_print_reggroups): Constify.
2482
8384c356
TT
24832017-09-27 Tom Tromey <tom@tromey.com>
2484
2485 * dwarf2read.c (save_gdb_index_command): Constify.
2486
884beb0c
TT
24872017-09-27 Tom Tromey <tom@tromey.com>
2488
2489 * stap-probe.c (info_probes_stap_command): Constify.
2490
e0b2930c
TT
24912017-09-27 Tom Tromey <tom@tromey.com>
2492
2493 * fork-child.c (unset_exec_wrapper_command): Constify.
2494
f938677d
TT
24952017-09-27 Tom Tromey <tom@tromey.com>
2496
2497 * btrace.c (get_uint, get_context_size, no_chunk)
2498 (maint_btrace_packet_history_cmd)
2499 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2500 (maint_info_btrace_cmd): Constify.
2501
8949cb87
TT
25022017-09-27 Tom Tromey <tom@tromey.com>
2503
2504 * reverse.c (delete_bookmark_command): Constify.
2505
ac88e2de
TT
25062017-09-27 Tom Tromey <tom@tromey.com>
2507
2508 * remote.c (set_memory_packet_size)
2509 (set_memory_write_packet_size, show_memory_write_packet_size)
2510 (set_memory_read_packet_size, show_memory_read_packet_size)
2511 (compare_sections_command, packet_command, remote_put_command)
2512 (remote_get_command, remote_delete_command): Constify.
2513
bd4c9dfe
TT
25142017-09-27 Tom Tromey <tom@tromey.com>
2515
2516 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2517 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2518 (set_mipsfpu_auto_command): Constify.
2519
5e93d4c6
TT
25202017-09-27 Tom Tromey <tom@tromey.com>
2521
2522 * cli/cli-cmds.h (cd_command): Constify.
2523 * cli/cli-cmds.c (cd_command): Constify.
2524
fc41a75b
TT
25252017-09-27 Tom Tromey <tom@tromey.com>
2526
2527 * thread.c (thread_name_command, thread_find_command): Constify.
2528
67810076
TT
25292017-09-27 Tom Tromey <tom@tromey.com>
2530
2531 * probe.c (enable_probes_command, disable_probes_command):
2532 Constify.
2533
1d8b34a7
TT
25342017-09-27 Tom Tromey <tom@tromey.com>
2535
2536 * symfile.c (symbol_file_command): Constify.
2537 * gdbcore.h (deprecated_file_changed_hook): Constify.
2538 * exec.c (deprecated_file_changed_hook, exec_file_command)
2539 (file_command): Constify.
2540 * defs.h (symbol_file_command): Constify.
2541
442019e1
TT
25422017-09-27 Tom Tromey <tom@tromey.com>
2543
2544 * remote-fileio.c (set_system_call_allowed)
2545 (show_system_call_allowed): Constify.
2546
2983f7cb
TT
25472017-09-27 Tom Tromey <tom@tromey.com>
2548
2549 * tracepoint.c (delete_trace_variable_command)
2550 (tfind_end_command, tfind_start_command, tfind_pc_command)
2551 (tfind_tracepoint_command, tfind_line_command)
2552 (tfind_range_command, tfind_outside_command): Constify.
2553
4fd41b24
TT
25542017-09-27 Tom Tromey <tom@tromey.com>
2555
2556 * ax-gdb.c (maint_agent_printf_command, agent_command)
2557 (agent_eval_command): Constify.
2558
f2fc3015
TT
25592017-09-27 Tom Tromey <tom@tromey.com>
2560
2561 * tracepoint.c (info_scope_command): Constify.
2562 * python/python.c (gdbpy_decode_line): Constify.
2563 * python/py-breakpoint.c (bppy_init): Constify.
2564 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2565 * location.h: (new_linespec_location)
2566 (string_to_event_location_basic, string_to_event_location):
2567 Constify.
2568 * location.c (new_linespec_location)
2569 (string_to_event_location_basic, string_to_event_location):
2570 Constify.
2571 * linespec.h (decode_line_with_current_source)
2572 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2573 * linespec.c (linespec_lex_to_end)
2574 (decode_line_with_current_source)
2575 (decode_line_with_last_displayed): Constify.
2576 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2577 Constify.
2578 * cli/cli-cmds.c (edit_command, list_command): Constify.
2579 * breakpoint.h (until_break_command, watch_command_wrapper)
2580 (awatch_command_wrapper, rwatch_command_wrapper)
2581 (init_ada_exception_breakpoint): Constify.
2582 * breakpoint.c (break_command_1, dprintf_command)
2583 (break_range_command, watch_command_wrapper)
2584 (rwatch_command_wrapper, awatch_command_wrapper)
2585 (until_break_command, init_ada_exception_breakpoint)
2586 (strace_marker_create_sals_from_location, trace_command)
2587 (ftrace_command, strace_command, struct tracepoint): Constify.
2588 * ax-gdb.c (agent_command_1): Constify.
2589 * ada-lang.c (ada_exception_sal): Constify.
2590
8c2f95f4
TT
25912017-09-27 Tom Tromey <tom@tromey.com>
2592
2593 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2594 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2595 (get_context_size, no_chunk, get_insn_history_modifiers)
2596 (cmd_record_insn_history, get_call_history_modifiers)
2597 (cmd_record_call_history): Constify.
2598
a0d65762
TT
25992017-09-27 Tom Tromey <tom@tromey.com>
2600
2601 * source.c (show_substitute_path_command)
2602 (unset_substitute_path_command, set_substitute_path_command):
2603 Constify.
2604
58971144
TT
26052017-09-27 Tom Tromey <tom@tromey.com>
2606
2607 * typeprint.c (maintenance_print_type): Constify.
2608 * maint.c (maintenance_dump_me, maintenance_demangle)
2609 (maintenance_time_display, maintenance_info_sections)
2610 (maintenance_print_statistics, maintenance_deprecate)
2611 (maintenance_undeprecate): Constify.
2612 (maintenance_do_deprecate): Constify. Use std::string.
2613 (maintenance_selftest): Constify.
2614 * gdbtypes.h (maintenance_print_type): Constify.
2615
c482f52c
TT
26162017-09-27 Tom Tromey <tom@tromey.com>
2617
2618 * hppa-tdep.c (unwind_command): Constify.
2619
e100df1a
TT
26202017-09-27 Tom Tromey <tom@tromey.com>
2621
2622 * target-descriptions.c (unset_tdesc_filename_cmd)
2623 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2624 Constify.
2625
31d56ade
TT
26262017-09-27 Tom Tromey <tom@tromey.com>
2627
2628 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2629
b961da0b
TT
26302017-09-27 Tom Tromey <tom@tromey.com>
2631
2632 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2633
e2d8ae16
TT
26342017-09-27 Tom Tromey <tom@tromey.com>
2635
2636 * tui/tui-regs.c (tui_reg_command): Constify.
2637
863779b0
TT
26382017-09-27 Tom Tromey <tom@tromey.com>
2639
2640 * skip.c (skip_file_command, skip_function_command)
2641 (skip_enable_command, skip_disable_command, skip_delete_command):
2642 Constify.
2643
cdb34d4a
TT
26442017-09-27 Tom Tromey <tom@tromey.com>
2645
2646 * record-btrace.c (cmd_record_btrace_bts_start)
2647 (cmd_record_btrace_pt_start): Constify.
2648
e99c83e7
TT
26492017-09-27 Tom Tromey <tom@tromey.com>
2650
2651 * symmisc.c (maintenance_print_symbols)
2652 (maintenance_print_msymbols, maintenance_print_objfiles)
2653 (maintenance_info_symtabs, maintenance_check_symtabs)
2654 (maintenance_expand_symtabs, maintenance_info_line_tables):
2655 Constify.
2656
32faf971
TT
26572017-09-27 Tom Tromey <tom@tromey.com>
2658
2659 * top.c (new_ui_command): Constify.
2660
2cf311eb
TT
26612017-09-27 Tom Tromey <tom@tromey.com>
2662
2663 * symfile.c (add_symbol_file_command)
2664 (remove_symbol_file_command, list_overlays_command)
2665 (map_overlay_command, unmap_overlay_command)
2666 (overlay_auto_command, overlay_manual_command)
2667 (overlay_off_command, overlay_load_command): Constify.
2668
e6738699
TT
26692017-09-27 Tom Tromey <tom@tromey.com>
2670
2671 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2672 (info_spu_mailbox_command, info_spu_dma_command)
2673 (info_spu_proxydma_command): Constify.
2674
aa360cd5
TT
26752017-09-27 Tom Tromey <tom@tromey.com>
2676
2677 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2678
898241a5
TT
26792017-09-27 Tom Tromey <tom@tromey.com>
2680
2681 * cli/cli-script.c (user_defined_command): Constify.
2682
2d0ac106
TT
26832017-09-27 Tom Tromey <tom@tromey.com>
2684
2685 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2686 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2687 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2688 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2689 (dump_binary_value, append_binary_memory, append_binary_value):
2690 Constify.
2691 (struct dump_context) <func>: Constify.
2692 (add_dump_command): Update.
2693
dede02ce
TT
26942017-09-27 Tom Tromey <tom@tromey.com>
2695
2696 * cli/cli-cmds.c (show_version, show_configuration)
2697 (source_command, show_user): Constify.
2698
d3cb6b99
TT
26992017-09-27 Tom Tromey <tom@tromey.com>
2700
2701 * target.c (maintenance_print_target_stack): Constify.
2702
1970a12f
TT
27032017-09-27 Tom Tromey <tom@tromey.com>
2704
2705 * interps.c (interpreter_exec_cmd): Constify.
2706
41243651
TT
27072017-09-27 Tom Tromey <tom@tromey.com>
2708
2709 * record-full.c (cmd_record_full_restore): Constify.
2710
4465d9db
TT
27112017-09-27 Tom Tromey <tom@tromey.com>
2712
2713 * memattr.c (enable_mem_command, disable_mem_command)
2714 (delete_mem_command): Constify.
2715
ad25e423
TT
27162017-09-27 Tom Tromey <tom@tromey.com>
2717
2718 * value.c (show_convenience): Constify.
2719
d64097b1
TT
27202017-09-27 Tom Tromey <tom@tromey.com>
2721
2722 * gdbcore.h (core_file_command): Update.
2723 * corefile.c (core_file_command): Constify.
2724
4d4589ef
TT
27252017-09-27 Tom Tromey <tom@tromey.com>
2726
2727 * user-regs.c (maintenance_print_user_registers): Constify.
2728
32a7bf17
TT
27292017-09-27 Tom Tromey <tom@tromey.com>
2730
2731 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2732
4a475551
TT
27332017-09-27 Tom Tromey <tom@tromey.com>
2734
2735 * cp-support.c (first_component_command): Constify.
2736
990b9f9f
TT
27372017-09-27 Tom Tromey <tom@tromey.com>
2738
2739 * psymtab.c (maintenance_print_psymbols)
2740 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2741 Constify.
2742
c281872e
TT
27432017-09-27 Tom Tromey <tom@tromey.com>
2744
2745 * windows-tdep.c (display_tib): Constify.
2746
5b64bf74
TT
27472017-09-27 Tom Tromey <tom@tromey.com>
2748
2749 * linux-fork.c (delete_checkpoint_command)
2750 (detach_checkpoint_command): Constify.
2751
4ada038f
TT
27522017-09-27 Tom Tromey <tom@tromey.com>
2753
2754 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2755
57f5a81b
TT
27562017-09-27 Tom Tromey <tom@tromey.com>
2757
2758 * arc-tdep.c (dump_arc_instruction_command): Constify.
2759
b0a8e6c4
TT
27602017-09-27 Tom Tromey <tom@tromey.com>
2761
2762 * valprint.c (set_radix, show_radix): Constify.
2763
8d97dc1c
TT
27642017-09-27 Tom Tromey <tom@tromey.com>
2765
2766 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2767
eb7c454d
TT
27682017-09-27 Tom Tromey <tom@tromey.com>
2769
2770 * command.h (not_just_help_class_command): Update.
2771 * cli/cli-decode.h (not_just_help_class_command): Update.
2772 * cli/cli-decode.c (not_just_help_class_command): Constify.
2773
e4e33335
TT
27742017-09-27 Tom Tromey <tom@tromey.com>
2775
2776 * gdb_bfd.c (maintenance_info_bfds): Constify.
2777
0450cc4c
TT
27782017-09-27 Tom Tromey <tom@tromey.com>
2779
2780 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2781 overloads.
2782 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2783 (do_const_cfunc): New function.
2784 (cmd_cfunc_eq): New overload.
2785 (cli_user_command_p): Check do_const_cfunc.
2786 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2787 const_cfunc.
2788 * command.h (add_cmd): Add const overload and no-function
2789 overload.
2790 (set_cmd_cfunc): Add const overload.
2791 (cmd_const_cfunc_ftype): Declare.
2792 (cmd_cfunc_eq): Add const overload.
2793 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2794 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2795 overload.
2796
a9bbfbd8
TT
27972017-09-27 Tom Tromey <tom@tromey.com>
2798
2799 * macroexp.c (get_next_token_for_substitution): New function.
2800 (substitute_args): Call it. Check for __VA_OPT__.
2801
5230b05a
WT
28022017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2803 Pedro Alves <palves@redhat.com>
2804
2805 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2806 producer_is_icc_lt_14.
2807 (producer_is_icc_lt_14): New function.
2808 (check_producer): Add code for checking version of ICC.
2809 (producer_is_icc): Move to producer.c.
2810 (read_structure_type): Restrict ICC workaround to ICC<14.
2811 * producer.c: Include selftest.h.
2812 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2813 New functions.
2814 * producer.h (producer_is_icc): New declaration.
2815
b32b108a
WT
28162017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2817
2818 * Makefile.in (SFILES): Add producer.c.
2819 (COMMON_OBS): Add producer.o
2820 * amd64-tdep.c (producer.h): Add new include.
2821 * dwarf2read.c (producer.h): Add new include.
2822 * producer.c: New file.
2823 * producer.h: New file.
2824 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2825 producer.c.
2826 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2827 producer.h.
2828
5007d765
MK
28292017-09-26 Matthias Klose <doko@ubuntu.com>
2830
2831 * configure.ac: Search ncursesw before ncurses.
2832 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2833 * gdb_curses.h: Include <ncursesw/ncurses.h>
2834 * config.in, configure: Regenerate.
2835
281c4447
RO
28362017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2837
2838 PR gdb/22185
2839 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2840 obsolete.
2841 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2842 Remove i386sol2 support.
2843 * configure.nat <i386sol2>: Remove.
2844 <sol2-64>: Fold into ...
2845 <sol2>: ... this.
2846 Move common settings to default section.
2847 Add sol-thread.o.
2848 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2849 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2850 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2851 <i[34567]86-*-solaris*>: Remove.
2852 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2853
2854 * configure.ac: Remove wctype in libw check.
2855 (_MSE_INT_H): Don't define on Solaris 7-9.
2856 <solaris*>: Remove libthread_db.so.1 check.
2857 * configure: Regenerate.
2858 * config.in: Regenerate.
2859
2860 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2861 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2862 (gdb_ps_size_t): Remove.
2863 Use base types in users.
2864 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2865
2866 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2867
39b06c20
RO
28682017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2869
2870 PR build/22206
2871 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2872 (adi_is_addr_mapped): Likewise.
2873 (PSR_ICC): Don't redefine.
2874 (PSR_IMPL): Likewise.
2875
6c3e20f1
TT
28762017-09-25 Tom Tromey <tom@tromey.com>
2877
2878 * regcache.c (regcache::dump): Use string_printf.
2879
b292235f
TT
28802017-09-25 Tom Tromey <tom@tromey.com>
2881
2882 * regcache.c (class regcache_invalidator): New.
2883 (struct register_to_invalidate): Remove.
2884 (make_cleanup_regcache_invalidate): Remove.
2885 (regcache::raw_write): Use regcache_invalidator.
2886
9ac86b52
TT
28872017-09-25 Tom Tromey <tom@tromey.com>
2888
2889 * spu-tdep.c (spu2ppu_sniffer): Update.
2890 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2891 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2892 Remove.
2893 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2894 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2895 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2896 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2897 (frame_pop): Update.
2898
c0e383c6
TT
28992017-09-25 Tom Tromey <tom@tromey.com>
2900
2901 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2902 * regcache.h (regcache_xfree): Don't declare.
2903 * regcache.c (regcache_xfree): Remove.
2904 (do_regcache_xfree): Use delete.
2905 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2906 * linux-fork.c (free_fork): Use delete.
2907 (fork_save_infrun_state): Likewise.
2908 * jit.c (jit_dealloc_cache): Use delete.
2909 * infrun.c (discard_infcall_suspend_state): Use delete.
2910
791199cc
TT
29112017-09-25 Tom Tromey <tom@tromey.com>
2912
2913 * regcache.h (regcache_xmalloc): Don't declare.
2914 (regcache_raw_set_cached_value): Update comment.
2915 * regcache.c (regcache_xmalloc): Remove.
2916 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2917 * jit.c (jit_frame_sniffer): Use new.
2918 * frame.c (frame_save_as_regcache): Use new.
2919
289e23aa
AA
29202017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2921
2922 * NEWS: Advertise support for guarded-storage registers on IBM z.
2923
1b63490c
AA
29242017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2925
2926 * s390-linux-nat.c (have_regset_gs): New static variable.
2927 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2928 control block and guarded-storage broadcast control regsets.
2929 (s390_read_description): Detect whether the target has
2930 guarded-storage support, return appropriate tdesc.
2931 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2932 (features/s390x-gs-linux64.c): Likewise.
2933 (struct gdbarch_tdep) <have_gs>: New field.
2934 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2935 (s390_gsbc_regset): New variables.
2936 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2937 and s390_gsbc_regset, if applicable.
2938 (s390_core_read_description): Check whether core file was from a
2939 target with guarded-storage support; include appropriate regsets.
2940 (s390_gdbarch_init): Add registers for guarded-storage support.
2941 (_initialize_s390_tdep): Initialize new target descriptions that
2942 include registers for guarded-storage support.
2943 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2944 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2945 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2946 (S390_NUM_REGS): Adjust macro definition.
2947 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2948 (tdesc_s390x_gs_linux64): New declarations.
2949
96235dc1
AA
29502017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2951
2952 * features/s390-gs-linux64.xml: New file.
2953 * features/s390-gs.xml: New file.
2954 * features/s390-gsbc.xml: New file.
2955 * features/s390x-gs-linux64.xml: New file.
2956 * features/Makefile (WHICH): Add s390-gs-linux64 and
2957 s390x-gs-linux64.
2958 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2959 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2960 * features/s390-gs-linux64.c: New generated file.
2961 * features/s390x-gs-linux64.c: New file.
2962 * regformats/s390-gs-linux64.dat: New file.
2963 * regformats/s390x-gs-linux64.dat: New file.
2964
b4a7c699
TT
29652017-09-23 Tom Tromey <tom@tromey.com>
2966
2967 * defs.h (make_cleanup_override_quit_handler): Don't declare.
2968
c2f97536
TT
29692017-09-22 Tom Tromey <tom@tromey.com>
2970
2971 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
2972 type to scoped_restore_tmpl.
2973 <scoped_input_handler>: Initialize m_quit_handler directly.
2974
43573013
SDJ
29752017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2976
2977 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
2978 (cd_command): Likewise. Free "current_directory" before
2979 assigning to it.
2980 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
2981 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
2982 * top.c (gdb_dirbuf): Remove global declaration.
2983 * top.h (gdb_dirbuf): Likewise.
2984
6ec2e0f5
SDJ
29852017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
2986
2987 * gnulib/aclocal.m4: Regenerate.
2988 * gnulib/config.in: Regenerate.
2989 * gnulib/configure: Regenerate.
2990 * gnulib/import/Makefile.am: Regenerate.
2991 * gnulib/import/Makefile.in: Regenerate.
2992 * gnulib/import/assure.h: New file.
2993 * gnulib/import/at-func.c: Likewise
2994 * gnulib/import/chdir-long.c: New file.
2995 * gnulib/import/chdir-long.h: New file.
2996 * gnulib/import/cloexec.c: New file.
2997 * gnulib/import/cloexec.h: New file.
2998 * gnulib/import/close.c: New file.
2999 * gnulib/import/closedir.c: New file.
3000 * gnulib/import/dirent-private.h: New file.
3001 * gnulib/import/dup-safer.c: New file.
3002 * gnulib/import/dup.c: New file.
3003 * gnulib/import/dup2.c: New file.
3004 * gnulib/import/error.c: New file.
3005 * gnulib/import/error.h: New file.
3006 * gnulib/import/exitfail.c: New file.
3007 * gnulib/import/exitfail.h: New file.
3008 * gnulib/import/fchdir.c: New file.
3009 * gnulib/import/fcntl.c: New file.
3010 * gnulib/import/fcntl.in.h: New file.
3011 * gnulib/import/fd-hook.c: New file.
3012 * gnulib/import/fd-hook.h: New file.
3013 * gnulib/import/fd-safer.c: New file.
3014 * gnulib/import/fdopendir.c: New file.
3015 * gnulib/import/filename.h: New file.
3016 * gnulib/import/filenamecat-lgpl.c: New file.
3017 * gnulib/import/filenamecat.h: New file.
3018 * gnulib/import/fstat.c: New file.
3019 * gnulib/import/fstatat.c: New file.
3020 * gnulib/import/getcwd-lgpl.c: New file.
3021 * gnulib/import/getcwd.c: New file.
3022 * gnulib/import/getdtablesize.c: New file.
3023 * gnulib/import/getlogin_r.c: New file.
3024 * gnulib/import/getprogname.c: New file.
3025 * gnulib/import/getprogname.h: New file.
3026 * gnulib/import/gettext.h: New file.
3027 * gnulib/import/glob-libc.h: New file.
3028 * gnulib/import/glob.c: New file.
3029 * gnulib/import/glob.in.h: New file.
3030 * gnulib/import/intprops.h: New file.
3031 * gnulib/import/m4/chdir-long.m4: New file.
3032 * gnulib/import/m4/close.m4: New file.
3033 * gnulib/import/m4/closedir.m4: New file.
3034 * gnulib/import/m4/d-ino.m4: New file.
3035 * gnulib/import/m4/d-type.m4: New file.
3036 * gnulib/import/m4/dup.m4: New file.
3037 * gnulib/import/m4/dup2.m4: New file.
3038 * gnulib/import/m4/error.m4: New file.
3039 * gnulib/import/m4/fchdir.m4: New file.
3040 * gnulib/import/m4/fcntl.m4: New file.
3041 * gnulib/import/m4/fcntl_h.m4: New file.
3042 * gnulib/import/m4/fdopendir.m4: New file.
3043 * gnulib/import/m4/filenamecat.m4: New file.
3044 * gnulib/import/m4/fstat.m4: New file.
3045 * gnulib/import/m4/fstatat.m4: New file.
3046 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3047 * gnulib/import/m4/getcwd-path-max.m4: New file.
3048 * gnulib/import/m4/getcwd.m4: New file.
3049 * gnulib/import/m4/getdtablesize.m4: New file.
3050 * gnulib/import/m4/getlogin_r.m4: New file.
3051 * gnulib/import/m4/getprogname.m4: New file.
3052 * gnulib/import/m4/glob.m4: New file.
3053 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3054 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3055 * gnulib/import/m4/mempcpy.m4: New file.
3056 * gnulib/import/m4/memrchr.m4: New file.
3057 * gnulib/import/m4/mode_t.m4: New file.
3058 * gnulib/import/m4/msvc-inval.m4: New file.
3059 * gnulib/import/m4/msvc-nothrow.m4: New file.
3060 * gnulib/import/m4/open.m4: New file.
3061 * gnulib/import/m4/openat.m4: New file.
3062 * gnulib/import/m4/opendir.m4: New file.
3063 * gnulib/import/m4/readdir.m4: New file.
3064 * gnulib/import/m4/realloc.m4: New file.
3065 * gnulib/import/m4/rewinddir.m4: New file.
3066 * gnulib/import/m4/save-cwd.m4: New file.
3067 * gnulib/import/m4/strdup.m4: New file.
3068 * gnulib/import/m4/strerror.m4: New file.
3069 * gnulib/import/m4/unistd-safer.m4: New file.
3070 * gnulib/import/mempcpy.c: New file.
3071 * gnulib/import/memrchr.c: New file.
3072 * gnulib/import/msvc-inval.c: New file.
3073 * gnulib/import/msvc-inval.h: New file.
3074 * gnulib/import/msvc-nothrow.c: New file.
3075 * gnulib/import/msvc-nothrow.h: New file.
3076 * gnulib/import/open.c: New file.
3077 * gnulib/import/openat-die.c: New file.
3078 * gnulib/import/openat-priv.h: New file.
3079 * gnulib/import/openat-proc.c: New file.
3080 * gnulib/import/openat.c: New file.
3081 * gnulib/import/openat.h: New file.
3082 * gnulib/import/opendir.c: New file.
3083 * gnulib/import/pipe-safer.c: New file.
3084 * gnulib/import/readdir.c: New file.
3085 * gnulib/import/realloc.c: New file.
3086 * gnulib/import/rewinddir.c: New file.
3087 * gnulib/import/save-cwd.c: New file.
3088 * gnulib/import/save-cwd.h: New file.
3089 * gnulib/import/strdup.c: New file.
3090 * gnulib/import/strerror-override.c: New file.
3091 * gnulib/import/strerror-override.h: New file.
3092 * gnulib/import/strerror.c: New file.
3093 * gnulib/import/unistd--.h: New file.
3094 * gnulib/import/unistd-safer.h: New file.
3095 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3096 "getcwd" and "glob".
3097 * ser-tcp.c: Undefine "close" before redefining it.
3098
432ae719
SM
30992017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3100
3101 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3102 get rid of res_val.
3103
4fa7574e
RO
31042017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3105
3106 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3107 <sol2,sparc>: Likewise.
3108 <sol2-64,i386>: Likewise.
3109
3110 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3111 -Wdeprecated-declarations on *-*-solaris*.
3112 * configure: Regenerate.
3113
3114 * procfs.c: Include "nat/inferior.h".
3115 (procfs_info_proc): Fix typo.
3116
f6327dcb
KB
31172017-09-21 Kevin Buettner <kevinb@redhat.com>
3118
3119 * remote.c (vector): Include.
3120 (struct private_thread_info): Add field, thread_handle.
3121 (free_private_thread_info): Deallocate storage associated with
3122 thread handle.
3123 (get_private_info_thread): Initialize `thread_handle' field.
3124 (struct thread_item): Add field, thread_handle.
3125 (clear_threads_listing_context): Deallocate storage associated
3126 with thread handle.
3127 (start_thread): Add support for "handle" attribute.
3128 (thread_attributes): Add "handle".
3129 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3130 field.
3131 (remote_update_thread_list): Update thread_handle.
3132 (remote_thread_handle_to_thread_info): New function.
3133 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3134
fbbe5337
KB
31352017-09-21 Kevin Buettner <kevinb@redhat.com>
3136
3137 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3138 function.
3139 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3140 * python/python-internal.h (thread_object_type): Declare.
3141
e04ee09e
KB
31422017-09-21 Kevin Buettner <kevinb@redhat.com>
3143
3144 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3145 (target_thread_handle_to_thread_info): Declare.
3146 * target.c (target_thread_handle_to_thread_info): New function.
3147 * target-delegates.c: Regenerate.
3148 * gdbthread.h (find_thread_by_handle): Declare.
3149 * thread.c (find_thread_by_handle): New function.
3150 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3151 function.
3152 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3153
1e5b66ed
SM
31542017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3155
3156 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3157
ebe48ba0
SM
31582017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3159
3160 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3161
0a0bf5dc
YQ
31622017-09-21 Yao Qi <yao.qi@linaro.org>
3163
3164 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3165 to gdb_target_obs.
3166
d1b0a7bf
TT
31672017-09-20 Tom Tromey <tom@tromey.com>
3168
3169 * breakpoint.c (struct counted_command_line): Remove.
3170 (breakpoint_commands): Update.
3171 (alloc_counted_command_line, incref_counted_command_line)
3172 (decref_counted_command_line, do_cleanup_counted_command_line)
3173 (make_cleanup_decref_counted_command_line): Remove.
3174 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3175 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3176 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3177 (save_breakpoints): Update.
3178 * breakpoint.h (counted_command_line): Now a typedef to
3179 shared_ptr.
3180 (struct breakpoint) <commands>: Now a counted_command_line.
3181 (struct bpstats) <command>: Likewise.
3182
48649e1b
TT
31832017-09-20 Tom Tromey <tom@tromey.com>
3184
3185 * breakpoint.c (struct commands_info, do_map_commands_command):
3186 Remove.
3187 (commands_command_1): Update.
3188 (iterate_over_related_breakpoints): Take a function_view.
3189 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3190 (delete_command): Update.
3191 (map_breakpoint_numbers): Take a function_view.
3192 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3193 (disable_command): Update.
3194 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3195 (enable_command): Update.
3196 (struct disp_data, do_enable_breakpoint_disp)
3197 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3198 (do_map_enable_delete_breakpoint): Remove.
3199 (enable_once_command, enable_count_command, enable_delete_command)
3200 (delete_trace_variable_command): Update.
3201
04afa70c
TT
32022017-09-20 Tom Tromey <tom@tromey.com>
3203
3204 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3205 (bpstat_clear): Use delete.
3206 (bpstats): New constructors.
3207 (bpstat_copy, bpstat_stop_status): Use new.
3208 (dprintf_after_condition_true): Update.
3209 * breakpoint.h (bpstats::bpstats): Add constructors.
3210 (bpstats::~bpstats): Add destructor.
3211
c83833f4
PA
32122017-09-20 Pedro Alves <palves@redhat.com>
3213
3214 * eval.c (make_params): Delete, refactored as ...
3215 (class fake_method): ... this new type's ctor.
3216 (fake_method::~fake_method): New.
3217 (evaluate_subexp_standard): Use 'fake_method'.
3218
223ffa71
TT
32192017-09-20 Tom Tromey <tom@tromey.com>
3220
3221 * windows-nat.c (get_windows_debug_event, windows_wait)
3222 (do_initial_windows_stuff, windows_attach): Update.
3223 * utils.c (vwarning, internal_vproblem): Update.
3224 (ui_unregister_input_event_handler_cleanup)
3225 (prepare_to_handle_input): Remove.
3226 (class scoped_input_handler): New.
3227 (defaulted_query, prompt_for_continue): Update.
3228 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3229 Update.
3230 * top.c (undo_terminal_modifications_before_exit): Update.
3231 * target/target.h (target_terminal_init, target_terminal_inferior)
3232 (target_terminal_ours): Don't declare.
3233 (class target_terminal): New.
3234 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3235 (target_terminal_ours_for_output)
3236 (make_cleanup_restore_target_terminal): Don't declare.
3237 (target_terminal_info): Remove.
3238 * target.c (enum terminal_state, terminal_state): Remove.
3239 (target_terminal::terminal_state): Define.
3240 (target_terminal::init): Rename from target_terminal_init.
3241 (target_terminal::inferior): Rename from
3242 target_terminal_inferior.
3243 (target_terminal::ours): Rename from target_terminal_ours.
3244 (target_terminal::ours_for_output): Rename from
3245 target_terminal_ours_for_output.
3246 (target_terminal::info): New method.
3247 (cleanup_restore_target_terminal)
3248 (make_cleanup_restore_target_terminal): Remove.
3249 * solib.c (handle_solib_event): Update.
3250 * remote.c (remote_serial_quit_handler): Update.
3251 (remote_terminal_inferior, remote_wait_as): Update.
3252 * record-full.c (record_full_wait_1): Update.
3253 * nto-procfs.c (procfs_create_inferior): Update.
3254 * nat/fork-inferior.c (startup_inferior): Update.
3255 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3256 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3257 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3258 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3259 (mi_breakpoint_created, mi_breakpoint_deleted)
3260 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3261 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3262 (mi_user_selected_context_changed, report_initial_inferior):
3263 Update.
3264 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3265 (linux_nat_terminal_inferior): Update.
3266 * infrun.c (follow_fork_inferior)
3267 (handle_vfork_child_exec_or_exit, do_target_resume)
3268 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3269 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3270 Update.
3271 * inflow.c (child_terminal_init, info_terminal_command): Update.
3272 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3273 (attach_command): Update.
3274 * infcall.c (call_thread_fsm_should_stop): Update.
3275 * gnu-nat.c (gnu_attach): Update.
3276 * extension.c (struct active_ext_lang_state)
3277 (restore_active_ext_lang): Update.
3278 * exceptions.c (print_flush): Update.
3279 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3280 (struct quit_handler_cleanup_data, restore_quit_handler)
3281 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3282 Remove.
3283 * cp-support.c (gdb_demangle): Update.
3284 * breakpoint.c (update_inserted_breakpoint_locations)
3285 (insert_breakpoint_locations, handle_jit_event)
3286 (disable_breakpoints_in_unloaded_shlib): Update.
3287 * annotate.c (annotate_breakpoints_invalid)
3288 (annotate_frames_invalid): Update.
3289
013af3fc
TT
32902017-09-20 Tom Tromey <tom@tromey.com>
3291
3292 * main.c (catch_command_errors): Rename from
3293 catch_command_errors_const.
3294 (captured_main_1): Update.
3295
06871ae8
PA
32962017-09-20 Pedro Alves <palves@redhat.com>
3297
3298 * cli/cli-cmds.c (list_command): Use print_sal_location.
3299 (print_sal_location): New function.
3300 (ambiguous_line_spec): Use print_sal_location.
3301 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3302 * symtab.c (find_function_start_sal): Likewise.
3303 * symtab.h (symtab_and_line::symbol): New field.
3304
e5f25bc5
PA
33052017-09-20 Pedro Alves <palves@redhat.com>
3306
3307 * linespec.c (minsym_found): Handle non-text minsyms.
3308 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3309
1b7fa39e
WT
33102017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3311
3312 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3313 backslash.
3314
37dd0825
WT
33152017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3316
3317 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3318 vmovups instead vmovaps.
3319 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3320
4e5a4f58
JB
33212017-09-19 John Baldwin <jhb@FreeBSD.org>
3322
3323 * NEWS (Changes since GDB 8.0): Add starti.
3324 * infcmd.c (enum run_break): New.
3325 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3326 case.
3327 (run_command): Use enum run_how.
3328 (start_command): Likewise.
3329 (starti_command): New function.
3330 (RUN_ARGS_HELP): New macro.
3331 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3332 commands. Add starti command.
3333
aa70c9f1
YQ
33342017-09-19 Yao Qi <yao.qi@linaro.org>
3335
3336 * Makefile.in (monitor.o): Remove the rule.
3337
d6541620
YQ
33382017-09-19 Yao Qi <yao.qi@linaro.org>
3339
3340 * annotate.h (struct annotate_arg_emitter): Use
3341 DISABLE_COPY_AND_ASSIGN.
3342 * common/refcounted-object.h (refcounted_object): Likewise.
3343 * completer.h (struct completion_result): Likewise.
3344 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3345 * filename-seen-cache.h (filename_seen_cache): Likewise.
3346 * gdbcore.h (thread_section_name): Likewise.
3347 * gdb_regex.h (compiled_regex): Likewise.
3348 * gdbthread.h (scoped_restore_current_thread): Likewise.
3349 * inferior.h (scoped_restore_current_inferior): Likewise.
3350 * jit.c (jit_reader): Likewise.
3351 * linespec.h (struct linespec_result): Likewise.
3352 * mi/mi-parse.h (struct mi_parse): Likewise.
3353 * nat/fork-inferior.c (execv_argv): Likewise.
3354 * progspace.h (scoped_restore_current_program_space): Likewise.
3355 * python/python-internal.h (class gdbpy_enter): Likewise.
3356 * regcache.h (regcache): Likewise.
3357 * target-descriptions.c (struct tdesc_reg): Likewise.
3358 (struct tdesc_type): Likewise.
3359 (struct tdesc_feature): Likewise.
3360 * ui-out.h (ui_out_emit_type): Likewise.
3361
0615127c
SM
33622017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3363
3364 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3365 label abort_expression.
3366
5e187554
SM
33672017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3368
3369 * common/buffer.c (buffer_xml_printf): Adjust.
3370 * common/xml-utils.c (xml_escape_text): Change return type to
3371 std::string, update code accordingly.
3372 * common/xml-utils.h (xml_escape_text): Change return type to
3373 std::string.
3374 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3375 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3376 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3377 Adjust.
3378
c3d7b541
SM
33792017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3380
3381 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3382 (SUBDIR_UNITTESTS_OBS): Add new object file.
3383 * unittests/xml-utils-selftests.c: New file.
3384
1526853e
SM
33852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3386
3387 * common/selftest.h (selftest): New struct/interface.
3388 (register_test): Add name parameter, add new overload.
3389 (run_tests): Add filter parameter.
3390 (for_each_selftest_ftype): New typedef.
3391 (for_each_selftest): New declaration.
3392 * common/selftest.c (tests): Change type to
3393 map<string, unique_ptr<selftest>>.
3394 (simple_selftest): New struct.
3395 (register_test): New function.
3396 (register_test): Add name parameter and use it.
3397 (run_tests): Add filter parameter and use it. Add prints.
3398 Adjust to vector -> map change.
3399 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3400 registering selftests.
3401 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3402 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3403 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3404 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3405 * findvar.c (_initialize_findvar): Likewise.
3406 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3407 * maint.c (maintenance_selftest): Update call to run_tests.
3408 (maintenance_info_selftests): New function.
3409 (_initialize_maint_cmds): Register "maintenance info selftests"
3410 command. Update "maintenance selftest" doc.
3411 * regcache.c (_initialize_regcache): Add names when registering
3412 selftests.
3413 * rust-exp.y (_initialize_rust_exp): Likewise.
3414 * selftest-arch.c (gdbarch_selftest): New struct.
3415 (gdbarch_tests): Remove.
3416 (register_test_foreach_arch): Add name parameter. Call
3417 register_test.
3418 (tests_with_arch): Remove, move most content to
3419 gdbarch_selftest::operator().
3420 (_initialize_selftests_foreach_arch): Remove.
3421 * selftest-arch.h (register_test_foreach_arch): Add name
3422 parameter.
3423 (run_tests_with_arch): New declaration.
3424 * utils-selftests.c (_initialize_utils_selftests): Add names
3425 when registering selftests.
3426 * utils.c (_initialize_utils): Likewise.
3427 * unittests/array-view-selftests.c
3428 (_initialize_array_view_selftests): Likewise.
3429 * unittests/environ-selftests.c (_initialize_environ_selftests):
3430 Likewise.
3431 * unittests/function-view-selftests.c
3432 (_initialize_function_view_selftests): Likewise.
3433 * unittests/offset-type-selftests.c
3434 (_initialize_offset_type_selftests): Likewise.
3435 * unittests/optional-selftests.c
3436 (_initialize_optional_selftests): Likewise.
3437 * unittests/scoped_restore-selftests.c
3438 (_initialize_scoped_restore_selftests): Likewise.
3439 * NEWS: Document "maintenance selftest" and "maint info
3440 selftests".
3441
5846367a
SM
34422017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3443
3444 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3445 scoped_restore.
3446
bd77e8ff
SM
34472017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3448
3449 * mi/mi-main.c (mi_load_progress): Make uiout variable
3450 a unique_ptr.
3451
26a67918
PA
34522017-09-15 Pedro Alves <palves@redhat.com>
3453
3454 * compile/compile-c-types.c (convert_enum, convert_int)
3455 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3456
3f8a7804
SM
34572017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3458
3459 * dwarf2read.c (copy_string): Remove.
3460 (parse_macro_definition): Replace copy_string with savestring.
3461
8d200706
YQ
34622017-09-15 Yao Qi <yao.qi@linaro.org>
3463
3464 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3465 gdb_target_obs.
3466 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3467 Likewise.
3468 (i[34567]86-*-linux*): Likewise.
3469
d185219d
SM
34702017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3471
3472 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3473 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3474 <stack>: Change type to std::vector.
3475 <stack_len, stack_allocated>: Remove.
3476 <grow_stack>: Remove.
3477 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3478 (dwarf_expr_context::~dwarf_expr_context): Remove.
3479 (dwarf_expr_context::grow_stack): Remove.
3480 (dwarf_expr_context::push): Adjust.
3481 (dwarf_expr_context::pop): Adjust.
3482 (dwarf_expr_context::fetch): Adjust.
3483 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3484 (dwarf_expr_context::stack_empty_p): Adjust.
3485 (dwarf_expr_context::execute_stack_op): Adjust.
3486
eccd80d6
SM
34872017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3488
3489 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3490 return type to bool.
3491 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3492
69009882
SM
34932017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3494
3495 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3496 Change type to bool.
3497 (dwarf_stack_value) <in_stack_memory>: Likewise.
3498 (dwarf_expr_context) <push_address>: Change parameter type to
3499 bool.
3500 <fetch_in_stack_memory>: Change return type to bool.
3501 <push>: Change parameter type to bool.
3502 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3503 to bool.
3504 (dwarf_expr_context::push_address): Likewise.
3505 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3506 to bool.
3507 (dwarf_expr_context::execute_stack_op): Adjust.
3508 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3509
1e467161
SM
35102017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3511
3512 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3513 (struct dwarf_expr_context) <n_pieces>: Remove.
3514 <pieces>: Change type to std::vector.
3515 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3516 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3517 pieces.
3518 (dwarf_expr_context::add_piece): Adjust.
3519 * dwarf2loc.c (struct piece_closure): Initialize fields.
3520 <n_pieces>: Remove.
3521 <pieces>: Change type to std::vector.
3522 (allocate_piece_closure): Adjust, change parameter to
3523 std::vector rvalue and std::move it to piece_closure.
3524 (rw_pieced_value): Adjust.
3525 (check_pieced_synthetic_pointer): Adjust.
3526 (indirect_synthetic_pointer): Adjust.
3527 (coerce_pieced_ref): Adjust.
3528 (free_pieced_value_closure): Adjust. Use delete to free
3529 piece_closure.
3530 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3531 to allocate_piece_closure.
3532 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3533
0782db84
SM
35342017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3535
3536 * probe.h (probe_ops_cp): Remove typedef.
3537 (DEF_VEC_P (probe_ops_cp)): Remove.
3538 (all_probe_ops): Change type to std::vector.
3539 * probe.c (info_probes_for_ops): Adjust to vector change.
3540 (probe_linespec_to_ops): Likewise.
3541 (all_probe_ops): Change type to std::vector.
3542 (_initialize_probe): Adjust to vector change.
3543 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3544 * elfread.c (elf_get_probes): Likewise.
3545 * stap-probe.c (_initialize_stap_probe): Likewise.
3546
1eac6bea
SM
35472017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3548
3549 * probe.h (struct bound_probe): Define constructors.
3550 * probe.c (bound_probe_s): Remove typedef.
3551 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3552 (collect_probes): Change return type to std::vector, remove
3553 cleanup.
3554 (compare_probes): Return bool, change parameter type. Change
3555 semantic to "less than".
3556 (gen_ui_out_table_header_info): Change parameter to std::vector
3557 and update.
3558 (exists_probe_with_pops): Likewise.
3559 (info_probes_for_ops): Update to std::vector change.
3560 (enable_probes_command): Likewise.
3561 (disable_probes_command): Likewise.
3562
aaa63a31
SM
35632017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3564
3565 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3566 vec to std::vector.
3567 * probe.c (parse_probes_in_pspace): Update.
3568 (find_probes_in_objfile): Update.
3569 (find_probe_by_pc): Update.
3570 (collect_probes): Update.
3571 (probe_any_get_probes): Update.
3572 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3573 return type to reference to std::vector.
3574 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3575 std::vector and update.
3576 (dtrace_process_dof): Likewise.
3577 (dtrace_get_probes): Likewise.
3578 * elfread.c (elf_get_probes): Change return type to std::vector,
3579 store an std::vector in bfd_data.
3580 (probe_key_free): Update to std::vector.
3581 * stap-probe.c (handle_stap_probe): Change parameter to
3582 std::vector and update.
3583 (stap_get_probes): Likewise.
3584 * symfile-debug.c (debug_sym_get_probes): Change return type to
3585 std::vector and update.
3586
cb85b21b
TT
35872017-09-11 Tom Tromey <tom@tromey.com>
3588
3589 * breakpoint.c (program_breakpoint_here_p): Update.
3590 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3591 from make_show_memory_breakpoints_cleanup. Return a
3592 scoped_restore_tmpl<int>.
3593 (restore_show_memory_breakpoints): Remove.
3594 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3595 * mem-break.c (memory_validate_breakpoint): Update.
3596 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3597 (ia64_memory_remove_breakpoint): Update.
3598 (ia64_breakpoint_from_pc): Update.
3599 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3600 from make_show_memory_breakpoints_cleanup.
3601
8fbc99ef
TT
36022017-09-11 Tom Tromey <tom@tromey.com>
3603
3604 * d-namespace.c (d_lookup_symbol): Use std::string.
3605 (find_symbol_in_baseclass): Likewise.
3606
50feb4bd
TT
36072017-09-11 Tom Tromey <tom@tromey.com>
3608
3609 * ctf.c (ctf_start): Use std::string.
3610
c6dc63a1
TT
36112017-09-11 Tom Tromey <tom@tromey.com>
3612
3613 * ada-lang.c (is_known_support_routine): Update.
3614 (ada_unhandled_exception_name_addr_from_raise): Update.
3615 * guile/scm-frame.c (gdbscm_frame_name): Update.
3616 * python/py-frame.c (frapy_name): Update.
3617 (frapy_function): Update.
3618 * stack.h (find_frame_funname): Update.
3619 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3620 (print_frame): Update.
3621
d6b9b80f
TT
36222017-09-11 Tom Tromey <tom@tromey.com>
3623
3624 * findcmd.c (put_bits): Take a gdb::byte_vector.
3625 (parse_find_args): Return gdb::byte_vector. "args" now const.
3626 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3627 cleanups.
3628 (find_command): Update.
3629
a9921622
TT
36302017-09-11 Tom Tromey <tom@tromey.com>
3631
3632 * cli/cli-script.c (class scoped_restore_hook_in): New.
3633 (clear_hook_in_cleanup): Remove.
3634 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3635 scoped_restore_hook_in.
3636
be0d7abb
TT
36372017-09-11 Tom Tromey <tom@tromey.com>
3638
3639 * cli/cli-script.c (restore_interp): Remove.
3640 (read_command_lines): Use scoped_restore_interp.
3641 * interps.c (scoped_restore_interp::set_temp): Rename from
3642 interp_set_temp.
3643 * interps.h (class scoped_restore_interp): New.
3644 (interp_set_temp): Remove.
3645
00f675ff
TT
36462017-09-11 Tom Tromey <tom@tromey.com>
3647
3648 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3649 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3650 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3651 scoped_restore.
3652 (mi_cmd_break_insert_1): Update.
3653 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3654 scoped_restore.
3655
cb791d59
TT
36562017-09-11 Tom Tromey <tom@tromey.com>
3657
3658 * demangle.c (demangle_command): Update.
3659 * breakpoint.c (disable_command): Update.
3660 (enable_command): Update.
3661 (find_location_by_number): Make "number" const. Use
3662 get_number_trailer.
3663 * cli/cli-utils.c (extract_arg): Return std::string.
3664 * probe.c (parse_probe_linespec): Update. Change types.
3665 (collect_probes): Take string arguments.
3666 (parse_probe_linespec): Likewise.
3667 (info_probes_for_ops): Update.
3668 (enable_probes_command): Update.
3669 (disable_probes_command): Update.
3670 * break-catch-sig.c (catch_signal_split_args): Update.
3671 * mi/mi-parse.c (mi_parse): Update.
3672
2039bd9f
TT
36732017-09-11 Tom Tromey <tom@tromey.com>
3674
3675 * language.h (language_enum): Make argument const.
3676 * language.c (language_enum): Make argument const.
3677
f1735a53
TT
36782017-09-11 Tom Tromey <tom@tromey.com>
3679
3680 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3681 as function.
3682 (skip_to_space): Rename from skip_to_space_const.
3683 * common/common-utils.c (skip_to_space): New function.
3684 (skip_to_space): Rename from skip_to_space_const.
3685 * cli/cli-utils.h (get_number): Rename from get_number_const.
3686 (extract_arg): Rename from extract_arg_const.
3687 * cli/cli-utils.c (get_number): Rename from get_number_const.
3688 (extract_arg): Rename from extract_arg_const.
3689 (number_or_range_parser::get_number): Use ::get_number.
3690 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3691 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3692 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3693 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3694 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3695 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3696 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3697 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3698
7d221d74
TT
36992017-09-11 Tom Tromey <tom@tromey.com>
3700
3701 * python/python.c (do_start_initialization): Use
3702 py-event-types.def to initialize types.
3703 Define all object type structures.
3704 * python/python-internal.h: Don't declare event initialization
3705 functions.
3706 * python/py-threadevent.c (thread_event_object_type): Don't
3707 define.
3708 * python/py-stopevent.c (stop_event_object_type): Don't define.
3709 * python/py-signalevent.c (signal_event_object_type): Don't
3710 declare or define.
3711 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3712 (clear_objfiles_event_object_type): Don't declare or define.
3713 * python/py-infevents.c (inferior_call_pre_event_object_type)
3714 (inferior_call_post_event_object_type)
3715 (register_changed_event_object_type)
3716 (memory_changed_event_object_type): Don't declare or define.
3717 * python/py-inferior.c (new_thread_event_object_type)
3718 (new_inferior_event_object_type)
3719 (inferior_deleted_event_object_type): Don't declare or define.
3720 * python/py-exitedevent.c (exited_event_object_type): Don't
3721 declare or define.
3722 * python/py-evts.c (gdbpy_initialize_py_events): Use
3723 py-all-events.def.
3724 * python/py-events.h (thread_event_object_type): Don't declare.
3725 (events_object): Use py-all-events.def.
3726 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3727 py-event-types.def.
3728 * python/py-event-types.def: New file.
3729 * python/py-continueevent.c (create_continue_event_object): Don't
3730 declare or define.
3731 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3732 declare or define.
3733 * python/py-all-events.def: New file.
3734
35c61a1d
TT
37352017-09-11 Tom Tromey <tom@tromey.com>
3736
3737 * python/py-threadevent.c (create_thread_event_object): Return
3738 gdbpy_ref.
3739 * python/py-stopevent.h (create_stop_event_object)
3740 (create_breakpoint_event_object, create_signal_event_object):
3741 Update.
3742 * python/py-stopevent.c (create_stop_event_object): Return
3743 gdbpy_ref.
3744 (emit_stop_event): Update.
3745 * python/py-signalevent.c (create_signal_event_object): Return
3746 gdbpy_ref.
3747 * python/py-infevents.c (create_inferior_call_event_object):
3748 Update.
3749 * python/py-event.h (create_event_object)
3750 (create_thread_event_object): Update.
3751 * python/py-event.c (create_event_object): Return gdbpy_ref.
3752 * python/py-continueevent.c: Return gdbpy_ref.
3753 * python/py-bpevent.c (create_breakpoint_event_object): Return
3754 gdbpy_ref.
3755
7c96f8c1
TT
37562017-09-11 Tom Tromey <tom@tromey.com>
3757
3758 PR python/15622:
3759 * NEWS: Add entry.
3760 * python/python.c (do_start_initialization): Initialize new event
3761 types.
3762 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3763 (gdbpy_initialize_inferior_deleted_event)
3764 (gdbpy_initialize_new_thread_event): Declare.
3765 * python/py-threadevent.c (create_thread_event_object): Add option
3766 "thread" parameter.
3767 * python/py-inferior.c (new_thread_event_object_type)
3768 (new_inferior_event_object_type)
3769 (inferior_deleted_event_object_type): Declare.
3770 (python_new_inferior, python_inferior_deleted): New functions.
3771 (add_thread_object): Emit new_thread event.
3772 (gdbpy_initialize_inferior): Attach new functions to corresponding
3773 observers.
3774 (new_thread, new_inferior, inferior_deleted): Define new event
3775 types.
3776 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3777 registries.
3778 * python/py-events.h (events_object) <new_inferior,
3779 inferior_deleted, new_thread>: New fields.
3780 * python/py-event.h (create_thread_event_breakpoint): Add optional
3781 "thread" parameter.
3782
72542b8e
AB
37832017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3784
3785 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3786 check current_ui instead.
3787 (internal_vproblem): Likewise.
3788
0d64823e
SM
37892017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3790
3791 * thread.c (print_thread_info_1): Remove unnecessary calls to
3792 uiout->is_mi_like_p.
3793
eb1e02fd
TT
37942017-09-09 Tom Tromey <tom@tromey.com>
3795
3796 * namespace.h (add_using_directive): Update.
3797 * namespace.c (add_using_directive): Change type of excludes to
3798 std::vector.
3799 * dwarf2read.c (read_import_statement): Use std::vector.
3800 (read_namespace): Update.
3801 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3802
0fc21fd8
TT
38032017-09-09 Tom Tromey <tom@tromey.com>
3804
3805 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3806
49663d05
TT
38072017-09-09 Tom Tromey <tom@tromey.com>
3808
3809 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3810
0b868b60
TT
38112017-09-09 Tom Tromey <tom@tromey.com>
3812
3813 * stack.c (func_command): Use gdb::def_vector.
3814
c0470d48
TT
38152017-09-09 Tom Tromey <tom@tromey.com>
3816
3817 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3818 ui_out_emit_list, ui_out_emit_tuple.
3819 (mi_cmd_var_update): Likewise.
3820
ca5909c7
TT
38212017-09-09 Tom Tromey <tom@tromey.com>
3822
3823 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3824 ui_out_redirect_pop.
3825 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3826 ui_out_redirect_pop.
3827 * utils.c (do_ui_out_redirect_pop)
3828 (make_cleanup_ui_out_redirect_pop): Remove.
3829 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3830 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3831 * ui-out.h (ui_out_redirect_pop): New class.
3832
e6a2252a
TT
38332017-09-09 Tom Tromey <tom@tromey.com>
3834
3835 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3836 (list_available_thread_groups, mi_cmd_list_thread_groups)
3837 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3838 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3839 Likewise.
3840
393702cd
TT
38412017-09-09 Tom Tromey <tom@tromey.com>
3842
3843 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3844 ui_out_emit_tuple.
3845
76f9c9cf
TT
38462017-09-09 Tom Tromey <tom@tromey.com>
3847
3848 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3849 * stack.c (print_frame): Use ui_out_emit_tuple.
3850 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3851 (info_spu_mailbox_command, info_spu_dma_command)
3852 (info_spu_proxydma_command): Likewise.
3853 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3854 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3855 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3856 ui_out_emit_tuple.
3857 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3858
dc9fe180
TT
38592017-09-09 Tom Tromey <tom@tromey.com>
3860
3861 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3862 (class ui_out_emit_table): Update comment.
3863 * ui-out.c (do_cleanup_table_end)
3864 (make_cleanup_ui_out_table_begin_end): Remove.
3865 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3866 (info_spu_dma_cmdlist): Likewise.
3867 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3868 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3869 ui_out_emit_table.
3870
f8cc3da6
TT
38712017-09-09 Tom Tromey <tom@tromey.com>
3872
3873 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3874 ui_out_emit_list, gdb::optional.
3875
481695ed
JB
38762017-09-09 John Baldwin <jhb@FreeBSD.org>
3877
3878 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3879 prototype.
3880 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3881 prototype.
3882 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3883 prototype.
3884 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3885 * ada-exp.y: Remove _initialize_ada_exp prototype.
3886 * ada-lang.c: Remove _initialize_ada_language prototype.
3887 * ada-tasks.c: Remove _initialize_tasks prototype.
3888 * addrmap.c: Remove _initialize_addrmap prototype.
3889 * agent.c: Remove _initialize_agent prototype.
3890 * aix-thread.c: Remove _initialize_aix_thread prototype.
3891 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3892 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3893 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3894 prototype.
3895 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3896 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3897 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3898 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3899 prototype.
3900 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3901 prototype.
3902 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3903 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3904 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3905 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3906 prototype.
3907 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3908 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3909 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3910 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3911 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3912 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3913 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3914 prototype.
3915 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3916 prototype.
3917 * annotate.c: Remove _initialize_annotate prototype.
3918 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3919 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3920 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3921 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3922 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3923 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3924 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3925 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3926 prototype.
3927 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3928 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3929 * auto-load.c: Remove _initialize_auto_load prototype.
3930 * auxv.c: Remove _initialize_auxv prototype.
3931 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3932 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3933 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3934 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3935 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3936 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3937 prototype.
3938 * break-catch-throw.c: Remove _initialize_break_catch_throw
3939 prototype.
3940 * breakpoint.c: Remove _initialize_breakpoint prototype.
3941 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3942 * btrace.c: Remove _initialize_btrace prototype.
3943 * charset.c: Remove _initialize_charset prototype.
3944 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3945 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3946 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3947 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3948 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3949 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3950 * coffread.c: Remove _initialize_coffread prototype.
3951 * compile/compile.c: Remove _initialize_compile prototype.
3952 * complaints.c: Remove _initialize_complaints prototype.
3953 * completer.c: Remove _initialize_completer prototype.
3954 * copying.awk: Remove _initialize_copying prototype.
3955 * copying.c: Regenerate.
3956 * core-regset.c: Remove _initialize_core_regset prototype.
3957 * corefile.c: Remove _initialize_core prototype.
3958 * corelow.c: Remove _initialize_corelow prototype.
3959 * cp-abi.c: Remove _initialize_cp_abi prototype.
3960 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3961 * cp-support.c: Remove _initialize_cp_support prototype.
3962 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3963 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3964 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3965 * ctf.c: Remove _initialize_ctf prototype.
3966 * d-lang.c: Remove _initialize_d_language prototype.
3967 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
3968 prototype.
3969 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
3970 * dbxread.c: Remove _initialize_dbxread prototype.
3971 * dcache.c: Remove _initialize_dcache prototype.
3972 * demangle.c: Remove _initialize_demangler prototype.
3973 * disasm-selftests.c: Remove _initialize_disasm_selftests
3974 prototype.
3975 * disasm.c: Remove _initialize_disasm prototype.
3976 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
3977 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
3978 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
3979 prototype.
3980 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
3981 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
3982 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
3983 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
3984 * elfread.c: Remove _initialize_elfread prototype.
3985 * exec.c: Remove _initialize_exec prototype.
3986 * extension.c: Remove _initialize_extension prototype.
3987 * f-lang.c: Remove _initialize_f_language prototype.
3988 * f-valprint.c: Remove _initialize_f_valprint prototype.
3989 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
3990 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
3991 * filesystem.c: Remove _initialize_filesystem prototype.
3992 * findcmd.c: Remove _initialize_mem_search prototype.
3993 * fork-child.c: Remove _initialize_fork_child prototype.
3994 * frame-base.c: Remove _initialize_frame_base prototype.
3995 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
3996 * frame.c: Remove _initialize_frame prototype.
3997 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
3998 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
3999 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4000 * gcore.c: Remove _initialize_gcore prototype.
4001 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4002 * gdbarch.c: Regenerate.
4003 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4004 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4005 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4006 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4007 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4008 * go-lang.c: Remove _initialize_go_language prototype.
4009 * go32-nat.c: Remove _initialize_go32_nat prototype.
4010 * guile/guile.c: Remove _initialize_guile prototype.
4011 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4012 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4013 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4014 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4015 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4016 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4017 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4018 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4019 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4020 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4021 prototype.
4022 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4023 prototype.
4024 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4025 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4026 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4027 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4028 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4029 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4030 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4031 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4032 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4033 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4034 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4035 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4036 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4037 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4038 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4039 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4040 prototype.
4041 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4042 prototype.
4043 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4044 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4045 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4046 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4047 * infcall.c: Remove _initialize_infcall prototype.
4048 * infcmd.c: Remove _initialize_infcmd prototype.
4049 * inferior.c: Remove _initialize_inferiors prototype.
4050 * inflow.c: Remove _initialize_inflow prototype.
4051 * infrun.c: Remove _initialize_infrun prototype.
4052 * interps.c: Remove _initialize_interpreter prototype.
4053 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4054 * jit.c: Remove _initialize_jit prototype.
4055 * language.c: Remove _initialize_language prototype.
4056 * linux-fork.c: Remove _initialize_linux_fork prototype.
4057 * linux-nat.c: Remove _initialize_linux_nat prototype.
4058 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4059 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4060 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4061 * m2-lang.c: Remove _initialize_m2_language prototype.
4062 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4063 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4064 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4065 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4066 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4067 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4068 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4069 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4070 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4071 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4072 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4073 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4074 * machoread.c: Remove _initialize_machoread prototype.
4075 * macrocmd.c: Remove _initialize_macrocmd prototype.
4076 * macroscope.c: Remove _initialize_macroscope prototype.
4077 * maint.c: Remove _initialize_maint_cmds prototype.
4078 * mdebugread.c: Remove _initialize_mdebugread prototype.
4079 * memattr.c: Remove _initialize_mem prototype.
4080 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4081 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4082 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4083 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4084 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4085 * microblaze-linux-tdep.c: Remove
4086 _initialize_microblaze_linux_tdep prototype.
4087 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4088 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4089 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4090 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4091 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4092 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4093 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4094 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4095 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4096 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4097 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4098 prototype.
4099 * mipsread.c: Remove _initialize_mipsread prototype.
4100 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4101 prototype.
4102 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4103 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4104 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4105 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4106 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4107 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4108 prototype.
4109 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4110 * nto-procfs.c: Remove _initialize_procfs prototype.
4111 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4112 * objc-lang.c: Remove _initialize_objc_language prototype.
4113 * objfiles.c: Remove _initialize_objfiles prototype.
4114 * observer.c: Remove observer_test_first_notification_function,
4115 observer_test_second_notification_function,
4116 observer_test_third_notification_function, and
4117 _initialize_observer prototypes.
4118 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4119 * osabi.c: Remove _initialize_gdb_osabi prototype.
4120 * osdata.c: Remove _initialize_osdata prototype.
4121 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4122 * parse.c: Remove _initialize_parse prototype.
4123 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4124 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4125 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4126 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4127 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4128 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4129 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4130 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4131 * printcmd.c: Remove _initialize_printcmd prototype.
4132 * probe.c: Remove _initialize_probe prototype.
4133 * proc-api.c: Remove _initialize_proc_api prototype.
4134 * proc-events.c: Remove _initialize_proc_events prototype.
4135 * proc-service.c: Remove _initialize_proc_service prototype.
4136 * procfs.c: Remove _initialize_procfs prototype.
4137 * psymtab.c: Remove _initialize_psymtab prototype.
4138 * python/python.c: Remove _initialize_python prototype.
4139 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4140 * record-btrace.c: Remove _initialize_record_btrace prototype.
4141 * record-full.c: Remove _initialize_record_full prototype.
4142 * record.c: Remove _initialize_record prototype.
4143 * regcache.c: Remove _initialize_regcache prototype.
4144 * reggroups.c: Remove _initialize_reggroup prototype.
4145 * remote-notif.c: Remove _initialize_notif prototype.
4146 * remote-sim.c: Remove _initialize_remote_sim prototype.
4147 * remote.c: Remove _initialize_remote prototype.
4148 * reverse.c: Remove _initialize_reverse prototype.
4149 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4150 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4151 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4152 prototype.
4153 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4154 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4155 * rust-exp.y: Remove _initialize_rust_exp prototype.
4156 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4157 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4158 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4159 * score-tdep.c: Remove _initialize_score_tdep prototype.
4160 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4161 prototype.
4162 * ser-go32.c: Remove _initialize_ser_dos prototype.
4163 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4164 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4165 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4166 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4167 * serial.c: Remove _initialize_serial prototype.
4168 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4169 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4170 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4171 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4172 * skip.c: Remove _initialize_step_skip prototype.
4173 * sol-thread.c: Remove _initialize_sol_thread prototype.
4174 * solib-aix.c: Remove _initialize_solib_aix prototype.
4175 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4176 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4177 * solib-frv.c: Remove _initialize_frv_solib prototype.
4178 * solib-spu.c: Remove _initialize_spu_solib prototype.
4179 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4180 * solib-target.c: Remove _initialize_solib_target prototype.
4181 * solib.c: Remove _initialize_solib prototype.
4182 * source.c: Remove _initialize_source prototype.
4183 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4184 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4185 prototype.
4186 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4187 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4188 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4189 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4190 prototype.
4191 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4192 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4193 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4194 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4195 prototype.
4196 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4197 prototype.
4198 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4199 prototype.
4200 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4201 prototype.
4202 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4203 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4204 prototype.
4205 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4206 prototype.
4207 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4208 prototype.
4209 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4210 prototype.
4211 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4212 prototype.
4213 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4214 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4215 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4216 * stabsread.c: Remove _initialize_stabsread prototype.
4217 * stack.c: Remove _initialize_stack prototype.
4218 * stap-probe.c: Remove _initialize_stap_probe prototype.
4219 * std-regs.c: Remove _initialize_frame_reg prototype.
4220 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4221 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4222 * symfile.c: Remove _initialize_symfile prototype.
4223 * symmisc.c: Remove _initialize_symmisc prototype.
4224 * symtab.c: Remove _initialize_symtab prototype.
4225 * target-dcache.c: Remove _initialize_target_dcache prototype.
4226 * target-descriptions.c: Remove _initialize_target_descriptions
4227 prototype.
4228 * thread.c: Remove _initialize_thread prototype.
4229 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4230 prototype.
4231 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4232 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4233 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4234 prototype.
4235 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4236 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4237 * tracefile.c: Remove _initialize_tracefile prototype.
4238 * tracepoint.c: Remove _initialize_tracepoint prototype.
4239 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4240 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4241 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4242 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4243 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4244 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4245 * tui/tui.c: Remove _initialize_tui prototype.
4246 * typeprint.c: Remove _initialize_typeprint prototype.
4247 * user-regs.c: Remove _initialize_user_regs prototype.
4248 * utils.c: Remove _initialize_utils prototype.
4249 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4250 * valarith.c: Remove _initialize_valarith prototype.
4251 * valops.c: Remove _initialize_valops prototype.
4252 * valprint.c: Remove _initialize_valprint prototype.
4253 * value.c: Remove _initialize_values prototype.
4254 * varobj.c: Remove _initialize_varobj prototype.
4255 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4256 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4257 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4258 * windows-nat.c: Remove _initialize_windows_nat,
4259 _initialize_check_for_gdb_ini, and _initialize_loadable
4260 prototypes.
4261 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4262 * xcoffread.c: Remove _initialize_xcoffread prototype.
4263 * xml-support.c: Remove _initialize_xml_support prototype.
4264 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4265 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4266 prototype.
4267 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4268 prototype.
4269 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4270
a611b5cb
KS
42712017-09-08 Keith Seitz <keiths@redhat.com>
4272
4273 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4274 field.
4275
469412dd
CW
42762017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4277
4278 * f-valprint.c (f_val_print): Remove check for one byte
4279 sized integers. Remove printing of character type.
4280
a5ad232b
FP
42812017-09-08 Frank Penczek <frank.penczek@intel.com>
4282 Christoph Weinmann <christoph.t.weinmann@intel.com>
4283 Bernhard Heckel <bernhard.heckel@intel.com>
4284
4285 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4286 to maintain proper indentation when printing pointers/refs.
4287
e5014227
JB
42882017-09-07 Joel Brobecker <brobecker@adacore.com>
4289
4290 GDB 8.0.1 released.
4291
63c99141
JB
42922017-09-07 Joel Brobecker <brobecker@adacore.com>
4293
4294 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4295
69c1e056
TT
42962017-09-05 Tom Tromey <tom@tromey.com>
4297
4298 * parse.c (funcall_chain): Now a std::vector.
4299 (start_arglist, end_arglist): Simplify.
4300 (free_funcalls): Remove.
4301 (parse_exp_in_context_1): Remove cleanup.
4302
fef704bf
TT
43032017-09-05 Tom Tromey <tom@tromey.com>
4304
4305 * go-exp.y (go_parse): Don't create a cleanup.
4306
5613c585
TT
43072017-09-05 Tom Tromey <tom@tromey.com>
4308
4309 * d-exp.y (PrimaryExpression): Use std::string.
4310 (d_parse): Don't create a cleanup.
4311
eae49211
TT
43122017-09-05 Tom Tromey <tom@tromey.com>
4313
4314 * utils.c (do_clear_parser_state): Remove.
4315 (make_cleanup_clear_parser_state): Remove.
4316 * p-exp.y (pascal_parse): Use scoped_restore.
4317 * m2-exp.y (m2_parse): Use scoped_restore.
4318 * f-exp.y (f_parse): Use scoped_restore.
4319 * d-exp.y (d_parse): Use scoped_restore.
4320 * c-exp.y (c_parse): Use scoped_restore.
4321 * ada-exp.y (ada_parse): Use scoped_restore.
4322 * utils.h (make_cleanup_clear_parser_state): Remove.
4323
73b9be8b
KS
43242017-09-06 Keith Seitz <keiths@redhat.com>
4325
4326 * dwarf2read.c (dw2_linkage_name_attr): New function.
4327 (dw2_linkage_name): New function.
4328 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4329 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4330 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4331
a102602b
KR
43322017-09-06 Kamil Rytarowski <n54@gmx.com>
4333
4334 * config/djgpp/djconfig.sh: Correct shell portability issue.
4335
28ad437d
KR
43362017-09-06 Kamil Rytarowski <n54@gmx.com>
4337
4338 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4339
351787dd
JB
43402017-09-06 John Baldwin <jhb@FreeBSD.org>
4341
4342 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4343 * NEWS: Mention new FreeBSD/mips native configuration.
4344 * configure.host: Add aarch64*-*-freebsd*.
4345 * configure.nat: Likewise.
4346 * aarch64-fbsd-nat.c: New file.
4347
c0f84956
JB
43482017-09-06 John Baldwin <jhb@FreeBSD.org>
4349
4350 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4351 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4352 * NEWS: Mention new FreeBSD/aarch64 target.
4353 * configure.tgt: Add aarch64*-*-freebsd*.
4354 * aarch64-fbsd-tdep.c: New file.
4355 * aarch64-fbsd-tdep.h: New file.
4356
7610297a
KR
43572017-09-06 Kamil Rytarowski <n54@gmx.com>
4358
4359 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4360
fbd1b771
JK
43612017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4362
4363 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4364 of TLS symbols.
4365
5ca79eae
PW
43662017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4367
4368 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4369 call.
4370
bf93d7ba
SM
43712017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4372
4373 * infrun.c (follow_exec): Call add_thread after
4374 target_find_description.
4375
1bb7c059
SM
43762017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4377
4378 * infrun.c (handle_inferior_event_1): When exec'ing, read
4379 stop_pc after follow_exec.
4380
fc809827
SM
43812017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4382
4383 * remote.c (process_g_packet): Update error message.
4384
d2fcdd85
YQ
43852017-09-05 Yao Qi <yao.qi@linaro.org>
4386
4387 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4388 targets.
4389
e69570ee
PA
43902017-09-05 Pedro Alves <palves@redhat.com>
4391
4392 * eval.c (eval_call, evaluate_funcall): New functions, factored
4393 out from ...
4394 (evaluate_subexp_standard): ... this.
4395
22916b07
YQ
43962017-09-05 Yao Qi <yao.qi@linaro.org>
4397
4398 * amd64-tdep.c (amd64_target_description): Create target
4399 descriptions.
4400 (_initialize_amd64_tdep): Don't call functions
4401 initialize_tdesc_amd64_*. Add self tests.
4402 * arch/amd64.c (amd64_create_target_description): Add parameter
4403 is_linux. Call set_tdesc_osabi if is_linux is true.
4404 * arch/amd64.h (amd64_create_target_description): Update the
4405 declaration.
4406 * arch/i386.c (i386_create_target_description): Add parameter
4407 is_linux. Call set_tdesc_osabi if is_linux is true.
4408 * arch/i386.h (i386_create_target_description): Update
4409 declaration.
4410 * configure.tgt: Add i386.o to gdb_target_obs.
4411 * features/Makefile (XMLTOC): Remove i386/*.xml.
4412 * features/i386/amd64-avx-avx512.c: Remove.
4413 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4414 * features/i386/amd64-avx-mpx.c: Remove.
4415 * features/i386/amd64-avx.c: Remove.
4416 * features/i386/amd64-mpx.c: Remove.
4417 * features/i386/amd64.c: Remove.
4418 * features/i386/i386-avx-avx512.c: Remove.
4419 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4420 * features/i386/i386-avx-mpx.c: Remove.
4421 * features/i386/i386-avx.c: Remove.
4422 * features/i386/i386-mmx.c: Remove.
4423 * features/i386/i386-mpx.c: Remove.
4424 * features/i386/i386.c: Remove.
4425 * i386-tdep.c: Don't include features/i386/i386*.c., include
4426 target-descriptions.h and arch/i386.h.
4427 (i386_target_description): Create target descriptions.
4428 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4429 functions. Do self tests.
4430
0854b7b1
YQ
44312017-09-05 Yao Qi <yao.qi@linaro.org>
4432
4433 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4434 * features/i386/amd64-avx-avx512-linux.c: Removed.
4435 * features/i386/amd64-avx-linux.c: Removed.
4436 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4437 * features/i386/amd64-avx-mpx-linux.c: Removed.
4438 * features/i386/amd64-linux.c: Removed.
4439 * features/i386/amd64-mpx-linux.c: Removed.
4440 * features/i386/x32-avx-avx512-linux.c: Removed.
4441 * features/i386/x32-avx-linux.c: Removed.
4442 * features/i386/x32-linux.c: Removed.
4443
b4570e4b
YQ
44442017-09-05 Yao Qi <yao.qi@linaro.org>
4445
4446 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4447 features/i386/*.c.
4448 (amd64_linux_read_description): Call
4449 amd64_create_target_description.
4450 * arch/amd64.c: New file.
4451 * arch/amd64.h: New file.
4452 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4453 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4454
6c73f67f
YQ
44552017-09-05 Yao Qi <yao.qi@linaro.org>
4456
4457 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4458 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4459 (amd64_linux_read_description): Create target descriptions.
4460 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4461 functions. Add unit tests.
4462 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4463 x32-core.xml.
4464 * features/i386/64bit-avx.c: Generated.
4465 * features/i386/64bit-avx512.c: Generated.
4466 * features/i386/64bit-core.c: Generated.
4467 * features/i386/64bit-linux.c: Generated.
4468 * features/i386/64bit-mpx.c: Generated.
4469 * features/i386/64bit-pkeys.c: Generated.
4470 * features/i386/64bit-segments.c: Generated.
4471 * features/i386/64bit-sse.c: Generated.
4472 * features/i386/x32-core.c: Generated.
4473 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4474 c files for amd64-linux and x32-linux.
4475
9d3d478b
YQ
44762017-09-05 Yao Qi <yao.qi@linaro.org>
4477
4478 * amd64-linux-tdep.c (amd64_linux_read_description): New
4479 function.
4480 (amd64_linux_core_read_description): Call
4481 amd64_linux_read_description.
4482 (amd64_linux_init_abi): Likewise.
4483 (amd64_x32_linux_init_abi): Likewise.
4484 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4485 * x86-linux-nat.c (x86_linux_read_description): Call
4486 amd64_linux_read_description.
4487
b9f1d50f
YQ
44882017-09-05 Yao Qi <yao.qi@linaro.org>
4489
4490 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4491 comments.
4492
188c9e6d
YQ
44932017-09-05 Yao Qi <yao.qi@linaro.org>
4494
4495 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4496 * features/i386/i386-avx-avx512-linux.c: Remove.
4497 * features/i386/i386-avx-linux.c: Remove.
4498 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4499 * features/i386/i386-avx-mpx-linux.c: Remove.
4500 * features/i386/i386-linux.c: Remove.
4501 * features/i386/i386-mmx-linux.c: Remove.
4502 * features/i386/i386-mpx-linux.c: Remove.
4503
5f035c07
YQ
45042017-09-05 Yao Qi <yao.qi@linaro.org>
4505
4506 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4507 (SFILES): Add arch/i386.c.
4508 (HFILES_NO_SRCDIR): Add arch/i386.h.
4509 * arch/i386.c: New file.
4510 * arch/i386.h: New file.
4511 * arch/tdesc.h (allocate_target_description): Declare.
4512 (set_tdesc_architecture): Declare.
4513 (set_tdesc_osabi): Declare.
4514 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4515 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4516 include arch/i386.h.
4517 (i386_linux_read_description): Remove code and call
4518 i386_create_target_description.
4519 (set_tdesc_architecture): New function.
4520 (set_tdesc_osabi): New function.
4521 * target-descriptions.h (allocate_target_description): Remove.
4522
0abe8a89
YQ
45232017-09-05 Yao Qi <yao.qi@linaro.org>
4524
4525 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4526 * target-descriptions.c (tdesc_create_feature): Likewise, and
4527 adjust code.
4528 * features/i386/32bit-avx.c: Re-generated.
4529 * features/i386/32bit-avx512.c: Re-generated.
4530 * features/i386/32bit-core.c: Re-generated.
4531 * features/i386/32bit-linux.c: Re-generated.
4532 * features/i386/32bit-mpx.c: Re-generated.
4533 * features/i386/32bit-pkeys.c: Re-generated.
4534 * features/i386/32bit-sse.c: Re-generated.
4535
0a188386
YQ
45362017-09-05 Yao Qi <yao.qi@linaro.org>
4537
4538 * regformats/regdef.h (struct reg): Override operator == and !=.
4539
f49ff000
YQ
45402017-09-05 Yao Qi <yao.qi@linaro.org>
4541
4542 * arch/tdesc.h: New file.
4543 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4544 * target-descriptions.c: Update comments.
4545 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4546 declarations.
4547 * features/i386/32bit-avx.c: Re-generated.
4548 * features/i386/32bit-avx512.c: Re-generated.
4549 * features/i386/32bit-core.c: Re-generated.
4550 * features/i386/32bit-linux.c: Re-generated.
4551 * features/i386/32bit-mpx.c: Re-generated.
4552 * features/i386/32bit-pkeys.c: Re-generated.
4553 * features/i386/32bit-sse.c: Re-generated.
4554
f7000548
YQ
45552017-09-05 Yao Qi <yao.qi@linaro.org>
4556
4557 * regformats/regdat.sh: Update generated code.
4558
c9a5e2a5
YQ
45592017-09-05 Yao Qi <yao.qi@linaro.org>
4560
4561 * regformats/regdat.sh: Adjust code order.
4562
d6b687ac
SM
45632017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4564
4565 * expprint.c (dump_subexp_body_standard): Use constant format
4566 string in fprintf_filtered call.
4567
a379bfd0
JB
45682017-09-04 John Baldwin <jhb@FreeBSD.org>
4569
4570 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4571 NetBSD/i386.
4572 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4573
f7efc967
JB
45742017-09-04 John Baldwin <jhb@FreeBSD.org>
4575
4576 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4577
c49fbc6c
JB
45782017-09-04 John Baldwin <jhb@FreeBSD.org>
4579
4580 * bsd-kvm.o: Define _KMEMUSER.
4581 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4582 * configure: Regenerate.
4583
26562e73
JB
45842017-09-04 John Baldwin <jhb@FreeBSD.org>
4585
4586 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4587 * i386-fbsd-nat.c: Likewise.
4588
31cf1487
JB
45892017-09-04 John Baldwin <jhb@FreeBSD.org>
4590
4591 * unittests/array-view-selftests.c: Add include of <array>.
4592
5b9f8a7c
JB
45932017-09-04 John Baldwin <jhb@FreeBSD.org>
4594
4595 * spu-tdep.c (flush_ea_cache): Add missing argument to
4596 call_function_by_hand.
4597
d69cf9b2
PA
45982017-09-04 Pedro Alves <palves@redhat.com>
4599
4600 * NEWS (Safer support for debugging with no debug info): New.
4601
3693fdb3
PA
46022017-09-04 Pedro Alves <palves@redhat.com>
4603
4604 * c-exp.y (function_method, function_method_void): Add current
4605 instance flags to TYPE_INSTANCE.
4606 * dwarf2read.c (check_modifier): New.
4607 (compute_delayed_physnames): Assert that only C++ adds delayed
4608 physnames. Mark fn_fields as const/volatile depending on
4609 physname.
4610 * eval.c (make_params): New type_instance_flags parameter. Use
4611 it as the new type's instance flags.
4612 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4613 flags element and pass it to make_params.
4614 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4615 instance flags element.
4616 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4617 * gdbtypes.h: Include "enum-flags.h".
4618 (type_instance_flags): New enum-flags type.
4619 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4620 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4621 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4622 (follow_type_instance_flags): New function.
4623 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4624 * parser-defs.h (follow_type_instance_flags): Declare.
4625 * valops.c (value_struct_elt_for_reference): const/volatile must
4626 match too.
4627
e68cb8e0
PA
46282017-09-04 Pedro Alves <palves@redhat.com>
4629
4630 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4631 function/method scopes; lookup the nested name as a function local
4632 static variable.
4633
858be34c
PA
46342017-09-04 Pedro Alves <palves@redhat.com>
4635
4636 (%type <voidval>): Add function_method.
4637 * c-exp.y (exp): New production for calls with no arguments.
4638 (function_method, function_method_void_or_typelist): New
4639 productions.
4640 (exp): New production for "method()::static_var".
4641 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4642 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4643 Handle OP_FUNC_STATIC_VAR.
4644 * parse.c (operator_length_standard):
4645 Handle OP_FUNC_STATIC_VAR.
4646
dd5901a6
PA
46472017-09-04 Pedro Alves <palves@redhat.com>
4648
4649 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4650 handling.
4651 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4652 Ditto.
4653 * parse.c (operator_length_standard, operator_check_standard):
4654 Ditto.
4655 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4656
46a4882b
PA
46572017-09-04 Pedro Alves <palves@redhat.com>
4658
4659 * ax-gdb.c: Include "typeprint.h".
4660 (gen_expr_for_cast): New function.
4661 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4662 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4663 type is unknown.
4664 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4665 nodebug_data_symbol.
4666 * eval.c: Include "typeprint.h".
4667 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4668 Error out if symbol has unknown type.
4669 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4670 evaluate_subexp_for_cast.
4671 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4672 OP_VAR_MSYM_VALUE.
4673 (evaluate_subexp_for_cast): New function.
4674 * gdbtypes.c (init_nodebug_var_type): New function.
4675 (objfile_type): Use it to initialize types of variables with no
4676 debug info.
4677 * typeprint.c (error_unknown_type): New.
4678 * typeprint.h (error_unknown_type): New declaration.
4679 * compile/compile-c-types.c (convert_type_basic): Handle
4680 TYPE_CODE_ERROR; warn and fallback to int for variables with
4681 unknown type.
4682
fe13dfec
PA
46832017-09-04 Pedro Alves <palves@redhat.com>
4684
4685 * eval.c (evaluate_var_value): New function, factored out from ...
4686 (evaluate_subexp_standard): ... here.
4687
d008ee21
PA
46882017-09-04 Pedro Alves <palves@redhat.com>
4689
4690 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4691 Remove useless assignments to 'op'.
4692
827d0c51
PA
46932017-09-04 Pedro Alves <palves@redhat.com>
4694
4695 * eval.c (eval_skip_value): New function.
4696 (evaluate_subexp_standard): Use it.
4697
2c5a2be1
PA
46982017-09-04 Pedro Alves <palves@redhat.com>
4699
4700 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4701 function name from symbol/minsym and pass it to
4702 error_call_unknown_return_type.
4703
74ea4be4
PA
47042017-09-04 Pedro Alves <palves@redhat.com>
4705
4706 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4707 * ax-gdb.c (gen_msym_var_ref): New function.
4708 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4709 * eval.c (evaluate_var_msym_value): New function.
4710 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4711 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4712 to call_function_by_hand.
4713 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4714 Handle OP_VAR_MSYM_VALUE.
4715 (union exp_element) <msymbol>: New field.
4716 * minsyms.h (struct type): Forward declare.
4717 (find_minsym_type_and_address): Declare.
4718 * parse.c (write_exp_elt_msym): New function.
4719 (write_exp_msymbol): Delete, refactored as ...
4720 (find_minsym_type_and_address): ... this new function.
4721 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4722 (operator_length_standard, operator_check_standard): Handle
4723 OP_VAR_MSYM_VALUE.
4724 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4725
7022349d
PA
47262017-09-04 Pedro Alves <palves@redhat.com>
4727
4728 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4729 TYPE_GNU_IFUNC specially here. Throw error if return type is
4730 unknown.
4731 * ada-typeprint.c (print_func_type): Handle functions with unknown
4732 return type.
4733 * c-typeprint.c (c_type_print_base): Handle functions and methods
4734 with unknown return type.
4735 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4736 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4737 * compile/compile-c-types.c: Include "objfiles.h".
4738 (convert_func): For functions with unknown return type, warn and
4739 default to int.
4740 * compile/compile-object-run.c (compile_object_run): Adjust call
4741 to call_function_by_hand_dummy.
4742 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4743 call_function_by_hand.
4744 * eval.c (evaluate_subexp_standard): Adjust calls to
4745 call_function_by_hand. Handle functions and methods with unknown
4746 return type. Pass expect_type to call_function_by_hand.
4747 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4748 return type.
4749 * gcore.c (call_target_sbrk): Adjust call to
4750 call_function_by_hand.
4751 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4752 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4753 an integer address type instead of nodebug.
4754 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4755 call_function_by_hand.
4756 * infcall.c (error_call_unknown_return_type): New function.
4757 (call_function_by_hand): New "default_return_type" parameter.
4758 Pass it down.
4759 (call_function_by_hand_dummy): New "default_return_type"
4760 parameter. Use it instead of defaulting to int. If there's no
4761 default and the return type is unknown, throw an error. If
4762 there's a default return type, and the called function has no
4763 debug info, then assume the function is prototyped.
4764 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4765 New "default_return_type" parameter.
4766 (error_call_unknown_return_type): New declaration.
4767 * linux-fork.c (call_lseek): Cast return type of lseek.
4768 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4769 call_function_by_hand.
4770 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4771 calls to call_function_by_hand.
4772 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4773 return type.
4774 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4775 (value_nsstring, print_object_command): Adjust calls to
4776 call_function_by_hand.
4777 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4778 functions with unknown return type.
4779 (pascal_type_print_func_varspec_suffix): New function.
4780 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4781 TYPE_CODE_METHOD>: Use it.
4782 * python/py-value.c (valpy_call): Adjust call to
4783 call_function_by_hand.
4784 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4785 call_function_by_hand.
4786 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4787 call_function_by_hand.
4788 * valops.c (value_allocate_space_in_inferior): Adjust call to
4789 call_function_by_hand.
4790 * typeprint.c (type_print_unknown_return_type): New function.
4791 * typeprint.h (type_print_unknown_return_type): New declaration.
4792
54990598
PA
47932017-09-04 Pedro Alves <palves@redhat.com>
4794
4795 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4796 types with more than one parameter as prototyped.
4797
9a24775b
PA
47982017-09-04 Pedro Alves <palves@redhat.com>
4799
4800 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4801 (disassemble_command): Use gdb_disassembly_flags instead of bare
4802 int.
4803 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4804 (dump_insns, do_mixed_source_and_assembly_deprecated)
4805 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4806 Use gdb_disassembly_flags instead of bare int.
4807 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4808 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4809 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4810 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4811 (enum gdb_disassembly_flag): ... values of this new enumeration.
4812 (gdb_disassembly_flags): Define.
4813 (gdb_disassembly)
4814 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4815 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4816 gdb_disassembly_flags instead of bare int.
4817 * record-btrace.c (btrace_insn_history)
4818 (record_btrace_insn_history, record_btrace_insn_history_range)
4819 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4820 instead of bare int.
4821 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4822 Use gdb_disassembly_flags instead of bare int.
4823 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4824 Define.
4825 * target-delegates.c: Regenerate.
4826 * target.c (target_insn_history, target_insn_history_from)
4827 (target_insn_history_range): Use gdb_disassembly_flags instead of
4828 bare int.
4829 * target.h: Include "disasm.h".
4830 (struct target_ops) <to_insn_history, to_insn_history_from,
4831 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4832 int.
4833 (target_insn_history, target_insn_history_from)
4834 (target_insn_history_range): Use gdb_disassembly_flags instead of
4835 bare int.
4836
80a65e9b
SM
48372017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4838
4839 * cli/cli-script.c (build_command_line): For if/while commands,
4840 check whether args is empty.
4841
6b66338c
SM
48422017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4843
4844 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4845 (enum command_control_type): Likewise.
4846 (struct command_line): Likewise.
4847 (free_command_lines): Likewise.
4848 (struct command_lines_deleter): Likewise.
4849 (command_line_up): Likewise.
4850 (read_command_lines): Likewise.
4851 (read_command_lines_1): Likewise.
4852 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4853 (enum command_control_type): Likewise.
4854 (struct command_line): Likewise.
4855 (free_command_lines): Likewise.
4856 (struct command_lines_deleter): Likewise.
4857 (command_line_up): Likewise.
4858 (read_command_lines): Likewise.
4859 (read_command_lines_1): Likewise.
4860 * breakpoint.h: Include cli/cli-script.h.
4861 * extension-priv.h: Likewise.
4862 * gdbcmd.h: Likewise.
4863
51abb421
PA
48642017-09-04 Pedro Alves <palves@redhat.com>
4865
4866 * ada-lang.c (is_known_support_routine): Move sal declaration to
4867 where it is initialized.
4868 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4869 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4870 (clear_command, update_static_tracepoint): Remove init_sal
4871 references. Move declarations closer to initializations.
4872 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4873 initializations.
4874 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4875 references. Move sal declarations closer to initializations.
4876 * frame.c (find_frame_sal): Return a symtab_and_line via function
4877 return instead of output parameter. Remove init_sal references.
4878 * frame.h (find_frame_sal): Return a symtab_and_line via function
4879 return instead of output parameter.
4880 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4881 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4882 instead of memset.
4883 (gdbscm_find_pc_line): Remove init_sal reference.
4884 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4885 references. Move declarations closer to initializations.
4886 * infcmd.c (set_step_frame): Update. Move declarations closer to
4887 initializations.
4888 (finish_backward): Remove init_sal references. Move declarations
4889 closer to initializations.
4890 * infrun.c (process_event_stop_test, handle_step_into_function)
4891 (insert_hp_step_resume_breakpoint_at_frame)
4892 (insert_step_resume_breakpoint_at_caller): Likewise.
4893 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4894 (symbol_to_sal): Likewise.
4895 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4896 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4897 to its initialization.
4898 * reverse.c (save_bookmark_command): Use new/delete. Remove
4899 init_sal references. Move declarations closer to initializations.
4900 * source.c (get_current_source_symtab_and_line): Remove brace
4901 initialization.
4902 (set_current_source_symtab_and_line): Now takes the sal by const
4903 reference. Remove brace initialization.
4904 (line_info): Remove init_sal reference.
4905 * source.h (set_current_source_symtab_and_line): Now takes a
4906 symtab_and_line via const reference.
4907 * stack.c (set_current_sal_from_frame): Adjust.
4908 (print_frame_info): Adjust.
4909 (get_last_displayed_sal): Return the sal via function return
4910 instead of via output parameter. Simplify.
4911 (frame_info): Adjust.
4912 * stack.h (get_last_displayed_sal): Return the sal via function
4913 return instead of via output parameter.
4914 * symtab.c (init_sal): Delete.
4915 (find_pc_sect_line): Remove init_sal references. Move
4916 declarations closer to initializations.
4917 (find_function_start_sal): Remove init_sal references. Move
4918 declarations closer to initializations.
4919 * symtab.h (struct symtab_and_line): In-class initialize all
4920 fields.
4921 * tracepoint.c (set_traceframe_context)
4922 (print_one_static_tracepoint_marker): Remove init_sal references.
4923 Move declarations closer to initializations.
4924 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4925 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4926 declarations closer to initializations.
4927 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4928 init_sal references. Adjust.
4929
6c5b2ebe
PA
49302017-09-04 Pedro Alves <palves@redhat.com>
4931
4932 * ax-gdb.c (agent_command_1): Use range-for.
4933 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4934 * breakpoint.c: Include "common/array-view.h".
4935 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4936 parameter from struct symtabs_and_lines to
4937 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4938 (breakpoint_sals_to_pc): Change sals parameter from struct
4939 symtabs_and_lines to std::vector reference.
4940 (check_fast_tracepoint_sals): Change sals parameter from struct
4941 symtabs_and_lines to std::array_view. Use range-for.
4942 (decode_static_tracepoint_spec): Return a std::vector instead of
4943 symtabs_and_lines. Update.
4944 (create_breakpoint): Update.
4945 (break_range_command, until_break_command, clear_command): Update.
4946 (base_breakpoint_decode_location, bkpt_decode_location)
4947 (bkpt_probe_create_sals_from_location)
4948 (bkpt_probe_decode_location, tracepoint_decode_location)
4949 (tracepoint_probe_decode_location)
4950 (strace_marker_create_sals_from_location): Return a std::vector
4951 instead of symtabs_and_lines.
4952 (strace_marker_create_breakpoints_sal): Update.
4953 (strace_marker_decode_location): Return a std::vector instead of
4954 symtabs_and_lines. Update.
4955 (update_breakpoint_locations): Change struct symtabs_and_lines
4956 parameters to gdb::array_view. Adjust.
4957 (location_to_sals): Return a std::vector instead of
4958 symtabs_and_lines. Update.
4959 (breakpoint_re_set_default): Use std::vector instead of struct
4960 symtabs_and_lines.
4961 (decode_location_default): Return a std::vector instead of
4962 symtabs_and_lines. Update.
4963 * breakpoint.h: Include "common/array-view.h".
4964 (struct breakpoint_ops) <decode_location>: Now returns a
4965 std::vector instead of returning a symtabs_and_lines via output
4966 parameter.
4967 (update_breakpoint_locations): Change sals parameters to use
4968 gdb::array_view.
4969 * cli/cli-cmds.c (edit_command, list_command): Update to use
4970 std::vector and gdb::array_view.
4971 (ambiguous_line_spec): Adjust to use gdb::array_view and
4972 range-for.
4973 (compare_symtabs): Rename to ...
4974 (cmp_symtabs): ... this. Change parameters to symtab_and_line
4975 const reference and adjust.
4976 (filter_sals): Rewrite using std::vector and standard algorithms.
4977 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
4978 (jump_command): Update to use std::vector.
4979 * linespec.c (struct linespec_state) <canonical_names>: Update
4980 comment.
4981 (add_sal_to_sals_basic): Delete.
4982 (add_sal_to_sals, filter_results, convert_results_to_lsals)
4983 (decode_line_2, create_sals_line_offset)
4984 (convert_address_location_to_sals, convert_linespec_to_sals)
4985 (convert_explicit_location_to_sals, parse_linespec)
4986 (event_location_to_sals, decode_line_full, decode_line_1)
4987 (decode_line_with_current_source)
4988 (decode_line_with_last_displayed, decode_objc)
4989 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
4990 (linespec_result::~linespec_result): Adjust to use std::vector
4991 instead of symtabs_and_lines.
4992 * linespec.h (linespec_sals::sals): Now a std::vector.
4993 (struct linespec_result): Use std::vector, bool, and in-class
4994 initialization.
4995 (decode_line_1, decode_line_with_current_source)
4996 (decode_line_with_last_displayed): Return std::vector.
4997 * macrocmd.c (info_macros_command): Use std::vector.
4998 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
4999 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5000 std::vector.
5001 * probe.h (parse_probes): Return a std::vector.
5002 * python/python.c (gdbpy_decode_line): Use std::vector and
5003 gdb::array_view.
5004 * source.c (select_source_symtab, line_info): Use std::vector.
5005 * stack.c (func_command): Use std::vector.
5006 * symtab.h (struct symtabs_and_lines): Delete.
5007 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5008
7c44b49c
PA
50092017-09-04 Pedro Alves <palves@redhat.com>
5010
5011 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5012 unittests/array-view-selftests.c.
5013 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5014 * common/array-view.h: New file.
5015 * unittests/array-view-selftests.c: New file.
5016
e439fa14
PA
50172017-09-04 Pedro Alves <palves@redhat.com>
5018
5019 * cli/cli-cmds.c (edit_command): Pass message to
5020 ambiguous_line_spec.
5021 (list_command): Pass message to ambiguous_line_spec. Say
5022 "first"/"last" instead of "start" and "end" to be consistent with
5023 the manual.
5024 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5025 them to print formatted message.
5026
7525b645
PA
50272017-09-04 Pedro Alves <palves@redhat.com>
5028
5029 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5030 ftrace_update_insns by reference instead of pointer.
5031
badc0020
YQ
50322017-09-04 Yao Qi <yao.qi@linaro.org>
5033
5034 * i386-go32-tdep.c: Include x86-xstate.h.
5035 (i386_go32_init_abi): Call i386_target_description.
5036 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5037 if xcr0 is X86_XSTATE_X87_MASK.
5038 * i386-tdep.h (tdesc_i386): Remove the declaration.
5039 (tdesc_i386_mmx): Likewise.
5040
d78bdb54
YQ
50412017-09-04 Yao Qi <yao.qi@linaro.org>
5042
5043 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5044 X86_XSTATE_SSE_MASK instead of 0.
5045
ca1fa5ee
YQ
50462017-09-04 Yao Qi <yao.qi@linaro.org>
5047
5048 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5049 i386_target_description.
5050 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5051 i386_target_description.
5052 * i386-tdep.c (i386_gdbarch_init): Likewise.
5053
2434b019
YQ
50542017-09-04 Yao Qi <yao.qi@linaro.org>
5055
5056 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5057 (x86_darwin_init_abi_64): Call amd64_target_description.
5058 * amd64-dicos-tdep.c: Likewise.
5059 * amd64-fbsd-nat.c: Likewise.
5060 * amd64-fbsd-tdep.c: Likewise.
5061 * amd64-nbsd-tdep.c: Likewise.
5062 * amd64-obsd-tdep.c: Likewise.
5063 * amd64-sol2-tdep.c: Likewise.
5064 * amd64-windows-tdep.c: Likewise.
5065 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5066
0860c437
SM
50672017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5068
5069 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5070 (btrace_function) <insn>: Change type to use std::vector.
5071 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5072 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5073 ftrace_update_insns, ftrace_compute_global_level_offset,
5074 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5075 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5076 change to std::vector.
5077 (ftrace_update_insns): Adjust to change to std::vector, change
5078 type of INSN parameter.
5079 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5080 * record-btrace.c (btrace_call_history_insn_range,
5081 btrace_compute_src_line_range,
5082 record_btrace_frame_prev_register): Adjust to change to
5083 std::vector.
5084 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5085 to change to std::vector.
5086
0638b7f9
TT
50872017-09-03 Tom Tromey <tom@tromey.com>
5088
5089 * corefile.c (reopen_exec_file): Use std::string.
5090
8f84fb0e
TT
50912017-09-03 Tom Tromey <tom@tromey.com>
5092
5093 * compile/compile.c (compile_register_name_mangled): Return
5094 std::string.
5095 * compile/compile-loc2c.c (pushf_register_address): Update.
5096 (pushf_register): Update.
5097 * compile/compile-c-types.c (convert_array): Update.
5098 * compile/compile-c-symbols.c (generate_vla_size): Update.
5099 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5100 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5101 (convert_one_symbol): Update.
5102 (generate_c_for_for_one_variable): Update.
5103 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5104 std::string.
5105 (generate_register_struct): Update.
5106 * compile/compile-internal.h (c_get_range_decl_name): Return a
5107 std::string.
5108 (compile_register_name_mangled): Return std::string.
5109
18e9961f
TT
51102017-09-03 Tom Tromey <tom@tromey.com>
5111
5112 * utils.c (perror_string): Return a std::string.
5113 (throw_perror_with_name, perror_warning_with_name): Update.
5114
45343786
TT
51152017-09-03 Tom Tromey <tom@tromey.com>
5116
5117 * demangle.c (demangle_command): Use std::string,
5118 unique_xmalloc_ptr.
5119
b57af503
TT
51202017-09-03 Tom Tromey <tom@tromey.com>
5121
5122 * cli/cli-setshow.c (do_set_command): Use std::string.
5123
6eecf35f
TT
51242017-09-03 Tom Tromey <tom@tromey.com>
5125
5126 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5127
56496dd4
TT
51282017-09-03 Tom Tromey <tom@tromey.com>
5129
5130 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5131
e91a1fa7
TT
51322017-09-03 Tom Tromey <tom@tromey.com>
5133
5134 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5135 gdb::unique_xmalloc_ptr.
5136
7ffd83d7
TT
51372017-09-03 Tom Tromey <tom@tromey.com>
5138
5139 * thread.c (print_thread_info_1): Use string_printf.
5140 (thread_apply_command, thread_apply_all_command): Use
5141 std::string.
5142
1ccbe998
TT
51432017-09-03 Tom Tromey <tom@tromey.com>
5144
5145 * valprint.c (val_print_string): Update.
5146 * gdbcore.h (memory_error_message): Return std::string.
5147 * corefile.c (memory_error_message): Return std::string.
5148 (memory_error): Update.
5149 * breakpoint.c (insert_bp_location): Update.
5150
23fdd69e
SM
51512017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5152
5153 * target/waitstatus.h (target_waitstatus_to_string): Change
5154 return type to std::string.
5155 * target/waitstatus.c (target_waitstatus_to_string): Return
5156 std::string.
5157 * target.h (target_waitstatus_to_string): Remove declaration.
5158 * infrun.c (resume, clear_proceed_status_thread,
5159 print_target_wait_results, do_target_wait, save_waitstatus,
5160 stop_all_threads): Adjust.
5161 * record-btrace.c (record_btrace_wait): Adjust.
5162 * target-debug.h
5163 (target_debug_print_struct_target_waitstatus_p): Adjust.
5164
5c811d30
JK
51652017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5166
5167 PR gdb/22046
5168 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5169 detection.
5170
0a2dde4a
SDJ
51712017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5172
5173 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5174 for setting/unsetting environment variables on the remote target.
5175 (New remote packets): Add entries for QEnvironmentHexEncoded,
5176 QEnvironmentUnset and QEnvironmentReset.
5177 * common/environ.c (gdb_environ::operator=): Extend method to
5178 handle m_user_set_env_list and m_user_unset_env_list.
5179 (gdb_environ::clear): Likewise.
5180 (match_var_in_string): Change type of first parameter from 'char
5181 *' to 'const char *'.
5182 (gdb_environ::set): Extend method to handle
5183 m_user_set_env_list and m_user_unset_env_list.
5184 (gdb_environ::unset): Likewise.
5185 (gdb_environ::clear_user_set_env): New method.
5186 (gdb_environ::user_set_envp): Likewise.
5187 (gdb_environ::user_unset_envp): Likewise.
5188 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5189 m_user_unset_env_list on move constructor/assignment.
5190 (unset): Add new default parameter 'update_unset_list = true'.
5191 (clear_user_set_env): New method.
5192 (user_set_envp): Likewise.
5193 (user_unset_envp): Likewise.
5194 (m_user_set_env_list): New std::set.
5195 (m_user_unset_env_list): Likewise.
5196 * common/rsp-low.c (hex2str): New function.
5197 (bin2hex): New overload for bin2hex function.
5198 * common/rsp-low.c (hex2str): New prototype.
5199 (str2hex): New overload prototype.
5200 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5201 QEnvironmentUnset and QEnvironmentReset.
5202 (remote_protocol_features): Add QEnvironmentHexEncoded,
5203 QEnvironmentUnset and QEnvironmentReset packets.
5204 (send_environment_packet): New function.
5205 (extended_remote_environment_support): Likewise.
5206 (extended_remote_create_inferior): Call
5207 extended_remote_environment_support.
5208 (_initialize_remote): Add QEnvironmentHexEncoded,
5209 QEnvironmentUnset and QEnvironmentReset packet configs.
5210 * unittests/environ-selftests.c (gdb_selftest_env_var):
5211 New variable.
5212 (test_vector_initialization): New function.
5213 (test_init_from_host_environ): Likewise.
5214 (test_reinit_from_host_environ): Likewise.
5215 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5216 Likewise.
5217 (test_unset_set_empty_vector): Likewise.
5218 (test_vector_clear): Likewise.
5219 (test_std_move): Likewise.
5220 (test_move_constructor):
5221 (test_self_move): Likewise.
5222 (test_set_unset_reset): Likewise.
5223 (run_tests): Rewrite in terms of the functions above.
5224
654670a4
WP
52252017-08-31 Weimin Pan <weimin.pan@oracle.com>
5226
5227 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5228 (adi_available): Use a temp variable of type CORE_ADDR as argument
5229 3 when calling target_auxv_search.
5230 (adi_normalize_address): Use masks and xor operators to calculate
5231 normalized address.
5232 (adi_read_versions, adi_write_versions, adi_print_versions)
5233 (do_examine, do_assign): Use paddress.
5234
7755ddb7
JB
52352017-08-29 John Baldwin <jhb@FreeBSD.org>
5236
5237 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5238 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5239 out of loop and add supply of FIR.
5240 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5241 add collect of FIR.
5242
fd437cbc
SM
52432017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5244
3804a343 5245 PR gdb/21827
fd437cbc
SM
5246 * cli/cli-script.c (define_command): Don't convert command name
5247 to lower case.
5248
988f6b3d
JB
52492017-08-25 Joel Brobecker <brobecker@adacore.com>
5250
5251 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5252 Update all callers accordingly. Remove all code blocks handling
5253 the case where DISPP is not NULL.
5254
663c44ac
JK
52552017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5256
5257 PR symtab/22003
5258 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5259 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5260 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5261
f1902523
JK
52622017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5263
5264 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5265 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5266 (read_comp_units_from_section): New parameter abbrev_section, use
5267 read_and_check_comp_unit_head, allocate signatured_type if needed.
5268 (create_all_comp_units): Update read_comp_units_from_section caller.
5269
87215ad1
SDJ
52702017-08-23 Pedro Alves <palves@redhat.com>
5271
5272 PR remote/21852
5273 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5274 to null_ptid and switch to thread without reading the registers
5275 after adding the inferior.
5276
6e41ddec
JK
52772017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5278
5279 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5280 compile-gcc.
5281 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5282 (compile_to_object): Implement compile_gcc.
5283 (_initialize_compile): Install "set compile-gcc". Initialize
5284 compile_gcc.
5285
e68c32d5
JK
52862017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5287
5288 * compile/compile.c (compile_to_object): Conditionally call
5289 set_verbose. Conditionally call compile or compile_v0.
5290
58afddc6
WP
52912017-08-07 Weimin Pan <weimin.pan@oracle.com>
5292
5293 * sparc64-tdep.h: (adi_normalize_address): New export.
5294 * sparc-nat.h: (open_adi_tag_fd): New export.
5295 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5296 * sparc64-linux-tdep.c:
5297 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5298 (sparc64_linux_handle_segmentation_fault): New function.
5299 (sparc64_linux_init_abi): Register
5300 sparc64_linux_handle_segmentation_fault
5301 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5302 (sparc64_addr_bits_remove): New function.
5303 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5304 (MAX_PROC_NAME_SIZE): New macro.
5305 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5306 (sparc64adilist): New variable.
5307 (adi_proc_list): New variable.
5308 (find_adi_info): New function.
5309 (add_adi_info): New function.
5310 (get_adi_info_proc): New function.
5311 (get_adi_info): New function.
5312 (info_adi_command): New function.
5313 (read_maps_entry): New function.
5314 (adi_available): New function.
5315 (adi_normalize_address): New function.
5316 (adi_align_address): New function.
5317 (adi_convert_byte_count): New function.
5318 (adi_tag_fd): New function.
5319 (adi_is_addr_mapped): New function.
5320 (adi_read_versions): New function.
5321 (adi_write_versions): New function.
5322 (adi_print_versions): New function.
5323 (do_examine): New function.
5324 (do_assign): New function.
5325 (adi_examine_command): New function.
5326 (adi_assign_command): New function.
5327 (_initialize_sparc64_adi_tdep): New function.
5328
11db9430
SM
53292017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5330
5331 * breakpoint.c (breakpoints_info): Rename to ...
5332 (info_breakpoints_command): ... this.
5333 (watchpoints_info): Rename to ...
5334 (info_watchpoints_command): ... this.
5335 (tracepoints_info): Rename to ...
5336 (info_tracepoints_command): ... this.
5337 (_initialize_breakpoint): Adjust.
5338 * dcache.c (dcache_info): Rename to ...
5339 (info_display_command): ... this.
5340 (_initialize_dcache): Adjust.
5341 * frame.h (args_info): Rename to ...
5342 (info_args_command): ... this.
5343 (locals_info): Rename to ...
5344 (info_locals_command): ... this.
5345 * infcmd.c (nofp_registers_info): Rename to ...
5346 (info_registers_command): ... this.
5347 (float_info): Rename to ...
5348 (info_float_command): ... this.
5349 (program_info): Rename to ...
5350 (info_program_command): ... this.
5351 (all_registers_info): Rename to ...
5352 (info_all_registers_command): ... this.
5353 (vector_info): Rename to ...
5354 (info_vector_command): ... this.
5355 (float_info): Rename to ...
5356 (info_float_command): ... this.
5357 (_initialize_infcmd): Adjust.
5358 * inferior.h (term_info): Rename to ...
5359 (info_terminal_command): ... this.
5360 * inflow.c (term_info): Rename to ...
5361 (info_terminal_command): ... this.
5362 (_initialize_inflow): Adjust.
5363 * infrun.c (signals_info): Rename to ...
5364 (info_signals_command): ... this.
5365 (_initialize_infrun): Adjust.
5366 * objc-lang.c (classes_info): Rename to ...
5367 (info_classes_command): ... this.
5368 (selectors_info): Rename to ...
5369 (info_selectors_command): ... this.
5370 (_initialize_objc_language): Adjust.
5371 * printcmd.c (sym_info): Rename to ...
5372 (info_symbol_command): ... this.
5373 (address_info): Rename to ...
5374 (info_address_command): ... this.
5375 (display_info): Rename to ...
5376 (info_display_command): ... this.
5377 (_initialize_printcmd): Adjust.
5378 * reverse.c (bookmarks_info): Rename to ...
5379 (info_breakpoints_command): ... this.
5380 (_initialize_reverse): Adjust.
5381 * ser-go32.c (dos_info): Rename to ...
5382 (info_serial_command): ... this.
5383 (_initialize_ser_dos): Adjust.
5384 * skip.c (skip_info): Rename to ...
5385 (info_skip_command): ... this.
5386 (_initialize_step_skip): Adjust.
5387 * source.c (line_info): Rename to ...
5388 (info_line_command): ... this.
5389 (source_info): Rename to ...
5390 (info_source_command)
5391 * stack.c (frame_info): Rename to ...
5392 (info_frame_command): ... this.
5393 (locals_info): Rename to ...
5394 (info_locals_command): ... this.
5395 (args_info): Rename to ...
5396 (info_args_command): ... this.
5397 (_initialize_stack): Adjust.
5398 * symtab.c (sources_info): Rename to ...
5399 (info_sources_command): ... this.
5400 (variables_info): Rename to ...
5401 (info_variables_command): ... this.
5402 (functions_info): Rename to ...
5403 (info_functions_command): ... this.
5404 (types_info): Rename to ...
5405 (info_types_command): ... this.
5406 (_initialize_symtab): Adjust.
5407 * target.c (target_info): Rename to ...
5408 (info_target_command): ... this.
5409 (initialize_targets): Adjust.
5410 * tracepoint.c (tvariables_info): Rename to ...
5411 (info_tvariables_command): ... this.
5412 (scope_info): Rename to ...
5413 (info_scope_command): ... this.
5414 (trace_dump_actions): Adjust.
5415 (_initialize_tracepoint): Adjust.
5416
b270e6f9
TT
54172017-08-22 Tom Tromey <tom@tromey.com>
5418
5419 * breakpoint.h (install_breakpoint): Update.
5420 * breakpoint.c (add_solib_catchpoint): Update.
5421 (install_breakpoint): Change argument to a std::unique_ptr.
5422 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5423 (create_breakpoint_sal, create_breakpoint): Update.
5424 (watch_command_1, catch_exec_command_1)
5425 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5426 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5427 Return the breakpoint.
5428 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5429 (new_single_step_breakpoint): Update.
5430 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5431 std::unique_ptr.
5432 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5433 std::unique_ptr.
5434 * break-catch-sig.c (create_signal_catchpoint): Use
5435 std::unique_ptr.
5436 * ada-lang.c (create_ada_exception_catchpoint): Use
5437 std::unique_ptr.
5438
36bd8eaa
TT
54392017-08-22 Tom Tromey <tom@tromey.com>
5440
5441 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5442
56f37645
TT
54432017-08-22 Tom Tromey <tom@tromey.com>
5444
5445 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5446 (lookup_partial_symbol): Update.
5447
0b581c69
TT
54482017-08-22 Tom Tromey <tom@tromey.com>
5449
5450 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5451 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5452 (find_and_open_source, symtab_to_fullname): Update.
5453 * psymtab.c (psymtab_to_fullname): Update.
5454
14278e1f
TT
54552017-08-22 Tom Tromey <tom@tromey.com>
5456
5457 * exec.c (exec_file_attach): Update.
5458 * linux-thread-db.c (try_thread_db_load): Update.
5459 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5460 * utils.c (gdb_realpath): Change return type.
5461 (gdb_realpath_keepfile): Update.
5462 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5463 (_initialize_utils): Register the new self test.
5464 * source.c (openp): Update.
5465 (find_and_open_source): Update.
5466 * nto-tdep.c (nto_find_and_open_solib): Update.
5467 * main.c (set_gdb_data_directory): Update.
5468 (captured_main_1): Update.
5469 * dwarf2read.c (dwarf2_get_dwz_file): Update
5470 (dw2_map_symbol_filenames): Update.
5471 * auto-load.c (auto_load_safe_path_vec_update): Update.
5472 (filename_is_in_auto_load_safe_path_vec): Change type of
5473 "filename_realp".
5474 (auto_load_objfile_script): Update.
5475 (file_is_auto_load_safe): Update. Use std::string.
5476 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5477
4971c9a7
TT
54782017-08-22 Tom Tromey <tom@tromey.com>
5479
5480 * utils.c (gdb_realpath_keepfile): Return a
5481 gdb::unique_xmalloc_ptr.
5482 * exec.c (exec_file_attach): Update.
5483 * utils.h (gdb_realpath_keepfile): Return a
5484 gdb::unique_xmalloc_ptr.
5485
e3e41d58
TT
54862017-08-22 Tom Tromey <tom@tromey.com>
5487
5488 * compile/compile.c (compile_file_command): Use
5489 gdb::unique_xmalloc_ptr, std::string.
5490 * utils.c (gdb_abspath): Change return type.
5491 * source.c (openp): Update.
5492 * objfiles.c (allocate_objfile): Update.
5493 * main.c (set_gdb_data_directory): Update.
5494 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5495
0d999a6e
ZZ
54962017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5497
5498 * cli-cmds.c (list_commands): List actual code around more than
5499 one location.
5500
329d5e7e
JB
55012017-08-21 John Baldwin <jhb@FreeBSD.org>
5502
5503 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5504
bf223d3e
PA
55052017-08-21 Pedro Alves <palves@redhat.com>
5506
5507 PR gdb/19487
5508 * c-exp.y (variable production): Handle function aliases.
5509 * minsyms.c (msymbol_is_text): New function.
5510 * minsyms.h (msymbol_is_text): Declare.
5511 * symtab.c (find_function_alias_target): New function.
5512 * symtab.h (find_function_alias_target): Declare.
5513
c973d0aa
PA
55142017-08-21 Pedro Alves <palves@redhat.com>
5515
5516 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5517 typedefs.
5518 * typeprint.c (whatis_exp): If handling "whatis", and expression
5519 is OP_TYPE, strip one typedef level. Otherwise don't strip
5520 typedefs here.
5521 * valops.c (value_cast): Save "to" type before resolving
5522 stubs/typedefs. Use that type as resulting value's type.
5523
2989a365
TT
55242017-08-18 Tom Tromey <tom@tromey.com>
5525 Pedro Alves <palves@redhat.com>
5526
5527 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5528 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5529 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5530 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5531 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5532 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5533 (linux_get_siginfo_data): Add "thread" argument. Use
5534 scoped_restore.
5535 * linux-nat.c (linux_child_follow_fork)
5536 (check_stopped_by_watchpoint): Use scoped_restore.
5537 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5538 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5539 (restore_inferior_ptid, save_inferior_ptid): Remove.
5540 * btrace.c (btrace_fetch): Use scoped_restore.
5541 * bsd-uthread.c (bsd_uthread_fetch_registers)
5542 (bsd_uthread_store_registers): Use scoped_restore.
5543 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5544 scoped_restore.
5545 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5546 (aix_thread_xfer_partial): Use scoped_restore.
5547 * inferior.h (save_inferior_ptid): Remove.
5548
e60eb288
YQ
55492017-08-18 Yao Qi <yao.qi@linaro.org>
5550
5551 PR tdep/21818
5552 * arm-tdep.c (gdb_print_insn_arm): Mark
5553 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5554
6d580b63
YQ
55552017-08-18 Yao Qi <yao.qi@linaro.org>
5556
5557 * NEWS: Mention GDBserver's new option "--selftest".
5558 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5559 * selftest.c: Move it to common/selftest.c.
5560 * selftest.h: Move it to common/selftest.h.
5561 * selftest-arch.c (reset): New function.
5562 (tests_with_arch): Call reset.
5563
86dcbf50
YQ
55642017-08-18 Yao Qi <yao.qi@linaro.org>
5565
5566 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5567 instead of exception_fprintf and printf_filtered.
5568
7649770c
YQ
55692017-08-18 Yao Qi <yao.qi@linaro.org>
5570
5571 * selftest.c (register_self_test): Rename it to
5572 selftests::register_test.
5573 (run_self_tests): selftest::run_tests.
5574 * selftest.h: Update declarations.
5575 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5576 selftests::register_test_foreach_arch.
5577 * selftest-arch.h: Update declaration.
5578 * aarch64-tdep.c: Update.
5579 * arm-tdep.c: Likewise.
5580 * disasm-selftests.c: Likewise.
5581 * dwarf2loc.c: Likewise.
5582 * dwarf2-frame.c: Likewise.
5583 * findvar.c: Likewise.
5584 * gdbarch-selftests.c: Likewise.
5585 * maint.c (maintenance_selftest): Likewise.
5586 * regcache.c: Likewise.
5587 * rust-exp.y: Likewise.
5588 * selftest-arch.c: Likewise.
5589 * unittests/environ-selftests.c: Likewise.
5590 * unittests/function-view-selftests.c: Likewise.
5591 * unittests/offset-type-selftests.c: Likewise.
5592 * unittests/optional-selftests.c: Likewise.
5593 * unittests/scoped_restore-selftests.c: Likewise.
5594 * utils-selftests.c: Likewise.
5595
b0cba12e
PA
55962017-08-17 Pedro Alves <palves@redhat.com>
5597
5598 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5599 local.
5600
4c8aa72d
PA
56012017-08-17 Pedro Alves <palves@redhat.com>
5602
5603 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5604 field.
5605 (reset_die_in_process): Delete, replaced by ...
5606 (process_die_scope): ... this new class. Make it responsible for
5607 freeing cu->line_header too.
5608 (process_die): Use process_die_scope.
5609 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5610 cu->line_header_die_owner. Don't release the line header if it's
5611 owned by the CU.
5612 (setup_type_unit_groups): Make the CU/DIE own the line header.
5613 Don't release the line header here.
5614
ba713918
AL
56152017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5616
5617 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5618
44d0fb3a
RK
56192017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5620
5621 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5622 Single-Key mode
5623
a5afdb16
RK
56242017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5625
5626 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5627 mode command list.
5628
47613aeb
SH
56292017-08-15 Stafford Horne <shorne@gmail.com>
5630
5631 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5632
9c3cc999
SH
56332017-08-15 Stafford Horne <shorne@gmail.com>
5634
5635 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5636
206726fb
SDJ
56372017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5638
5639 PR gdb/21954
5640 * infcmd.c (unset_environment_command): Use the 'clear' method on
5641 the environment instead of resetting it.
5642
0335ac6d
JB
56432017-08-15 John Baldwin <jhb@FreeBSD.org>
5644
5645 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5646 platforms.
5647
d3abe1c8
TT
56482017-08-14 Tom Tromey <tom@tromey.com>
5649
5650 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5651 (print_binary_chars): Likewise.
5652 (BITS_IN_BYTES): Remove.
5653
d6382fff
TT
56542017-08-14 Tom Tromey <tom@tromey.com>
5655
5656 PR gdb/21675
5657 * valprint.c (LOW_ZERO): Change value to 034.
5658 (print_octal_chars): Add static_asserts for octal constants.
5659 * printcmd.c (print_scalar_formatted): Add 'd' case.
5660
f978cb06
TT
56612017-08-11 Tom Tromey <tom@tromey.com>
5662
5663 * symfile.c (add_symbol_file_command): Use std::vector.
5664
2f5404b3
TT
56652017-08-14 Tom Tromey <tom@tromey.com>
5666
5667 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5668 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5669 std::move.
5670 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5671
de7985c3
PA
56722017-08-11 Pedro Alves <palves@redhat.com>
5673
5674 * infrun.c (process_event_stop_test): Adjust
5675 function_name_is_marked_for_skip call.
5676 * skip.c: Include <list>.
5677 (skiplist_entry): Make it a class with private fields, and
5678 getters/setters.
5679 (skiplist_entry_chain): Delete.
5680 (skiplist_entries): New.
5681 (skiplist_entry_count): Delete.
5682 (highest_skiplist_entry_num): New.
5683 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5684 (add_skiplist_entry): Delete.
5685 (skiplist_entry::skiplist_entry): New.
5686 (skiplist_entry::add_entry): New.
5687 (skip_file_command, skip_function): Adjust.
5688 (compile_skip_regexp): Delete.
5689 (skip_command): Don't compile regexp here. Adjust to use
5690 skiplist_entry::add_entry.
5691 (skip_info): Adjust to use range-for and getters.
5692 (skip_enable_command, skip_disable_command): Adjust to use
5693 range-for and setters.
5694 (skip_delete_command): Adjust to use std::list.
5695 (add_skiplist_entry): Delete.
5696 (skip_file_p): Delete, refactored as ...
5697 (skiplist_entry::do_skip_file_p): ... this new method.
5698 (skip_gfile_p): Delete, refactored as ...
5699 (skiplist_entry::do_gskip_file_p): ... this new method.
5700 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5701 (skiplist_entry::skip_function_p): ... this new method.
5702 (function_name_is_marked_for_skip): Now returns bool, and takes
5703 the function sal by const reference. Adjust to use range-for and
5704 skiplist_entry methods.
5705 (_initialize_step_skip): Remove references to
5706 skiplist_entry_chain, skiplist_entry_count.
5707 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5708 takes the function sal by const reference.
5709
be7d3cd5
YQ
57102017-08-11 Yao Qi <yao.qi@linaro.org>
5711
5712 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5713 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5714 (dwarf2_frame_cache):
5715 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5716 RETURN_MASK_ALL and set *this_case to NULL.
5717 * frame-unwind.h: Update comments.
5718
1c90d9f0
YQ
57192017-08-11 Yao Qi <yao.qi@linaro.org>
5720
5721 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5722 (dwarf2_frame_state_copy_regs): Remove.
5723 (dwarf2_frame_state_free_regs): Remove.
5724 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5725 (dwarf2_restore_rule): Call method .alloc_regs instead of
5726 dwarf2_frame_state_alloc_regs.
5727 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5728 constructor. Call std::move.
5729 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5730 (dwarf2_frame_cache): Likewise.
5731
5732 [GDB_SELF_TEST]: Include selftest.h and
5733 selftest-arch.h.
5734 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5735 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5736 execute_cfa_program_test.
5737
5738 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5739 copy ctor, assignment operator, move assignment.
5740 <alloc_regs>: New method.
5741 <swap>: New method.
5742 (struct dwarf2_frame_state): Delete dtor.
5743 (dwarf2_frame_state_alloc_regs): Remove declaration.
5744 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5745 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5746
afe37d6b
YQ
57472017-08-11 Yao Qi <yao.qi@linaro.org>
5748
5749 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5750 (dwarf2_frame_state::dwarf2_frame_state): New.
5751 (dwarf2_frame_state::~dwarf2_frame_state): New.
5752 (dwarf2_fetch_cfa_info): Update.
5753 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5754 rather than a pointer. Update code.
5755 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5756 dtor.
5757 <data_align, code_align, retaddr_column>: Change them to const.
5758 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5759 to bool.
5760
b348037f
YQ
57612017-08-11 Yao Qi <yao.qi@linaro.org>
5762
5763 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5764 <loc.exp>: New field.
5765 * dwarf2-frame.c (execute_cfa_program): Update.
5766 (dwarf2_frame_prev_register): Update.
5767
e7c9de26
PA
57682017-08-10 Pedro Alves <palves@redhat.com>
5769
5770 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5771
e8c6b620
JB
57722017-08-09 John Baldwin <jhb@FreeBSD.org>
5773
5774 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5775 (fbsd_pending_children): Use std::list.
5776 (fbsd_remember_child): Likewise.
5777 (fbsd_is_child_pending): Likewise.
5778 (fbsd_pending_vfork_done): Use std::forward_list.
5779 (fbsd_add_vfork_done): Likewise.
5780 (fbsd_is_vfork_done_pending): Likewise.
5781 (fbsd_next_vfork_done): Likewise.
5782
e4a26669
JB
57832017-08-09 John Baldwin <jhb@FreeBSD.org>
5784
5785 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5786 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5787 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5788 for `mapfilename'.
5789 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 5790 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 5791
142311d3
JB
57922017-08-09 John Baldwin <jhb@FreeBSD.org>
5793
5794 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5795 "filestuff.h".
5796 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5797
42fa2e0e
TT
57982017-08-09 Tom Tromey <tom@tromey.com>
5799
5800 * skip.c (skiplist_entry): New constructor.
5801 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5802 (skiplist_entry::file_is_glob): Now bool.
5803 (skiplist_entry::file, skiplist_entry::function): Now
5804 std::string.
5805 (make_skip_entry): Return a unique_ptr. Use new.
5806 (free_skiplist_entry, free_skiplist_entry_cleanup)
5807 (make_free_skiplist_entry_cleanup): Remove.
5808 (skip_command, skip_disable_command, add_skiplist_entry)
5809 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5810 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5811 (function_name_is_marked_for_skip): Update.
5812 (skip_delete_command): Update. Use delete.
5813
cd3af38d
JW
58142017-08-09 Jiong Wang <jiong.wang@arm.com>
5815
5816 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5817 (aarch64_linux_core_read_description): New function.
5818 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5819
29592bde
PA
58202017-08-09 Pedro Alves <palves@redhat.com>
5821
5822 * cp-name-parser.y (cp_comp_to_string): Return a
5823 gdb::unique_xmalloc_ptr<char>.
5824 * cp-support.c (replace_typedefs_qualified_name)
5825 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5826 (cp_canonicalize_string_full): Use op= instead of explicit
5827 convertion.
5828 (cp_class_name_from_physname, method_name_from_physname)
5829 (cp_func_name, cp_remove_params): Adjust to use
5830 gdb::unique_xmalloc_ptr<char>.
5831 * cp-support.h (cp_comp_to_string): Return a
5832 gdb::unique_xmalloc_ptr<char>.
5833 * python/py-type.c (typy_lookup_type): Adjust to use
5834 gdb::unique_xmalloc_ptr<char>.
5835
b3340438
L
58362017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5837
5838 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5839
e88e8651
YQ
58402017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5841 Yao Qi <yao.qi@linaro.org>
5842
5843 * cp-support.c (cp_canonicalize_string_full): Use
5844 gdb::unique_xmalloc_ptr<char>.
5845 (cp_canonicalize_string): Likewise.
5846
f5a29eb0
YQ
58472017-08-09 Yao Qi <yao.qi@linaro.org>
5848
5849 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5850 * regformats/i386/amd64-avx-avx512.dat: Remove.
5851 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5852 * regformats/i386/amd64-avx-mpx.dat:Remove.
5853 * regformats/i386/amd64-avx.dat: Remove.
5854 * regformats/i386/amd64-mpx.dat: Remove.
5855 * regformats/i386/i386-avx-avx512.dat: Remove.
5856 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5857 * regformats/i386/i386-avx-mpx.dat: Remove.
5858 * regformats/i386/i386-mmx.dat: Remove.
5859 * regformats/i386/i386-mpx.dat: Remove.
5860
57757c2f
YQ
58612017-08-09 Yao Qi <yao.qi@linaro.org>
5862
5863 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5864 * amd64-tdep.c: Don't include features/i386/x32*.c.
5865 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5866 functions.
5867 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5868 and i386/x32-avx-avx512.
5869 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5870 and i386/x32.xml.
5871 * features/i386/x32-avx-avx512.c: Removed.
5872 * features/i386/x32-avx-avx512.xml: Removed.
5873 * features/i386/x32-avx.c: Removed.
5874 * features/i386/x32-avx.xml: Removed.
5875 * features/i386/x32.c: Removed.
5876 * features/i386/x32.xml: Removed.
5877 * regformats/i386/x32-avx-avx512.dat: Removed.
5878 * regformats/i386/x32-avx.dat: Removed.
5879 * regformats/i386/x32.dat: Removed.
5880
ba7b109b
MR
58812017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5882
5883 PR breakpoints/21886
5884 * mem-break.c (default_memory_insert_breakpoint): Use
5885 `->placed_address' rather than `->reqstd_address' for the
5886 breakpoint location.
5887
e347efc3
MR
58882017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5889
5890 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5891 assertions.
5892
0dba2a6c
MR
58932017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5894
5895 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5896 a union of `tdep_info', `tdesc_data' and `id'.
5897 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5898 rather than `info.tdep_info'.
5899 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5900 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5901 * i386-tdep.c (i386_gdbarch_init): Likewise.
5902 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5903 * mips-tdep.c (mips_gdbarch_init): Likewise.
5904 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5905 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5906 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5907 `info.tdep_info'.
5908 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5909 `info.tdep_info'.
5910 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5911 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5912 `info.tdep_info'.
5913 * spu-tdep.c (spu_gdbarch_init): Likewise.
5914 * gdbarch.h: Regenerate.
5915
16eb6b2d
LS
59162017-08-07 Leszek Swirski <leszeks@google.com>
5917
7b005726 5918 PR symtab/20899
16eb6b2d
LS
5919 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5920
74cbb09e
SM
59212017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5922
5923 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5924 (gdbsim_open): Rename gdb_argv args object to argv.
5925
ee0c3293
TT
59262017-08-05 Tom Tromey <tom@tromey.com>
5927
5928 * compile/compile-object-load.c (compile_object_load): Use
5929 gdb::unique_xmalloc_ptr.
5930 * cli/cli-dump.c (scan_filename): Rename from
5931 scan_filename_with_cleanup. Change return type.
5932 (scan_expression): Rename from scan_expression_with_cleanup.
5933 Change return type.
5934 (dump_memory_to_file, dump_value_to_file, restore_command):
5935 Use gdb::unique_xmalloc_ptr. Update.
5936 * cli/cli-cmds.c (find_and_open_script): Use
5937 gdb::unique_xmalloc_ptr.
5938 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5939 * symmisc.c (maintenance_print_symbols)
5940 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5941 * symfile.c (symfile_bfd_open, generic_load)
5942 (add_symbol_file_command, remove_symbol_file_command): Use
5943 gdb::unique_xmalloc_ptr.
5944 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5945 * psymtab.c (maintenance_print_psymbols): Use
5946 gdb::unique_xmalloc_ptr.
5947 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5948 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5949 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5950 (reload_shared_libraries_1): Likewise.
5951
3232fabd
TT
59522017-08-05 Tom Tromey <tom@tromey.com>
5953
5954 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5955 (rust_op_vector, rust_set_vector): New typedefs.
5956 (current_parser): New global.
5957 (work_obstack): Change to pointer type. Update all users.
5958 (rust_ast, pstate): Remove globals.
5959 (struct rust_parser): New.
5960 (%union) <params, field_inits>: Change type.
5961 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5962 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5963 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5964 (convert_params_to_types, convert_params_to_expression): Change
5965 type of "params".
5966 (ast_string): Change type of "fields".
5967 (rust_parse): Make a rust_parser. Remove cleanups.
5968 (rust_lex_tests): Make and install an auto_obstack.
5969
f02fd774
YQ
59702017-08-04 Yao Qi <yao.qi@linaro.org>
5971
5972 * configure.srv (ipa_x32_linux_regobj): New.
5973 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
5974 instead of X86_TDESC_AVX512.
5975 (initialize_low_tracepoint): Call
5976 init_registers_x32_avx_avx512_linux.
5977
91975afd
YQ
59782017-08-04 Yao Qi <yao.qi@linaro.org>
5979
5980 * utils.h (gdb_argv): Add namespace std for nullptr_t.
5981
2331fa3a
RK
59822017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
5983
5984 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
5985
744e4fe1
TT
59862017-08-03 Tom Tromey <tom@tromey.com>
5987
5988 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
5989 Remove.
5990 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
5991
1c034b67
TT
59922017-08-03 Tom Tromey <tom@tromey.com>
5993
5994 * python/py-param.c (compute_enum_values): Use gdb_argv.
5995
773a1edc
TT
59962017-08-03 Tom Tromey <tom@tromey.com>
5997
5998 * utils.h (struct gdb_argv_deleter): New.
5999 (gdb_argv): New class.
6000 * utils.c (gdb_argv::reset): New method.
6001 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6002 * tracefile.c (tsave_command): Use gdb_argv.
6003 * top.c (new_ui_command): Use gdb_argv.
6004 * symmisc.c (maintenance_print_symbols)
6005 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6006 * symfile.c (symbol_file_command, generic_load)
6007 (remove_symbol_file_command): Use gdb_argv.
6008 * stack.c (backtrace_command): Use gdb_argv.
6009 * source.c (add_path, show_substitute_path_command)
6010 (unset_substitute_path_command, set_substitute_path_command):
6011 Use gdb_argv.
6012 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6013 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6014 * remote.c (extended_remote_run, remote_put_command)
6015 (remote_get_command, remote_delete_command): Use gdb_argv.
6016 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6017 (gdbsim_open): Use gdb_argv.
6018 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6019 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6020 * procfs.c (procfs_info_proc): Use gdb_argv.
6021 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6022 * infrun.c (handle_command): Use gdb_argv.
6023 * inferior.c (add_inferior_command, clone_inferior_command):
6024 Use gdb_argv.
6025 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6026 * exec.c (exec_file_command): Use gdb_argv.
6027 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6028 * compile/compile.c (build_argc_argv): Use gdb_argv.
6029
0d50bde3
TT
60302017-08-03 Tom Tromey <tom@tromey.com>
6031
6032 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6033
7f968c89
TT
60342017-08-03 Tom Tromey <tom@tromey.com>
6035
6036 * python/python.c (compute_python_string): Return std::string.
6037 (gdbpy_eval_from_control_command): Update.
6038 (do_start_initialization): Use std::string.
6039 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6040 xstrprintf.
6041 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6042 xstrprintf.
6043
3c9ebddd
TT
60442017-08-03 Tom Tromey <tom@tromey.com>
6045
6046 * top.h (do_restore_instream_cleanup): Remove.
6047 * top.c (do_restore_instream_cleanup): Remove.
6048 (read_command_file): Use scoped_restore.
6049 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6050
b51b225e
TT
60512017-08-03 Tom Tromey <tom@tromey.com>
6052
6053 * cli/cli-script.c (execute_user_command)
6054 (execute_control_command): Use scoped_restore.
6055
ac991630
TT
60562017-08-03 Tom Tromey <tom@tromey.com>
6057
6058 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6059 (execute_user_command): Remove user_call_depth; use
6060 user_args_stack's size instead.
6061
898e0c8e
TT
60622017-08-03 Tom Tromey <tom@tromey.com>
6063
6064 * top.h (in_user_command): Remove.
6065 * top.c (in_user_command): Remove.
6066 * cli/cli-script.c (do_restore_user_call_depth)
6067 (execute_user_command): Update.
6068
26fcd5d7
TT
60692017-08-03 Tom Tromey <tom@tromey.com>
6070
6071 * valops.c (search_struct_method): Use gdb::byte_vector.
6072 * valarith.c (value_concat): Use std::vector.
6073 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6074 (simple_search_memory): Likewise.
6075 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6076 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6077 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6078 * elfread.c (elf_rel_plt_read): Use std::string.
6079 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6080 * cli/cli-dump.c (restore_section_callback): Use
6081 gdb::byte_vector.
6082
7c218e6c
TT
60832017-08-03 Tom Tromey <tom@tromey.com>
6084
6085 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6086
31b68d4a
TT
60872017-08-03 Tom Tromey <tom@tromey.com>
6088
6089 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6090 (tui_register_format): Use scoped_restore.
6091
2ec845e7
TT
60922017-08-03 Tom Tromey <tom@tromey.com>
6093
6094 * reverse.c (exec_direction_default): Remove.
6095 (exec_reverse_once): Use scoped_restore.
6096 * remote.c (restore_remote_timeout): Remove.
6097 (remote_flash_erase, remote_flash_write, remote_flash_done)
6098 (readchar, remote_serial_write): Use scoped_restore.
6099 * cli/cli-script.c (struct source_cleanup_lines_args)
6100 (source_cleanup_lines): Remove.
6101 (script_from_file): Use scoped_restore.
6102 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6103 (source_command): Use scoped_restore.
6104
b3bc8453
TT
61052017-08-03 Tom Tromey <tom@tromey.com>
6106
6107 * utils.h (make_cleanup_free_so): Remove.
6108 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6109 * solist.h (struct so_deleter): New.
6110 (so_list_up): New typedef.
6111 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6112
e3ad2841
TT
61132017-08-03 Tom Tromey <tom@tromey.com>
6114
6115 * utils.h (make_cleanup_restore_current_language): Remove.
6116 * utils.c (do_restore_current_language)
6117 (make_cleanup_restore_current_language): Remove.
6118 * parse.c (parse_exp_in_context_1)
6119 (parse_expression_with_language): Use
6120 scoped_restore_current_language.
6121 * mi/mi-main.c (mi_cmd_execute): Use
6122 scoped_restore_current_language.
6123 * language.h (scoped_restore_current_language): New class.
6124
b80cf838
TT
61252017-08-03 Tom Tromey <tom@tromey.com>
6126
6127 * compile/compile.c (cleanup_unlink_file): Remove.
6128 (compile_to_object): Use gdb::unlinker.
6129 (eval_compile_command): Likewise.
6130
fad0444a
TT
61312017-08-03 Tom Tromey <tom@tromey.com>
6132
6133 * utils.h (make_cleanup_fclose): Remove.
6134 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6135
6e7bc05c
TT
61362017-08-03 Tom Tromey <tom@tromey.com>
6137
6138 * top.c (open_terminal_stream): Return gdb_file_up.
6139 (new_ui_command): Update.
6140
4a45905b
TT
61412017-08-03 Tom Tromey <tom@tromey.com>
6142
6143 * source.c (print_source_lines_base, forward_search_command)
6144 (reverse_search_command): Use gdb_file_up.
6145
7cd06d6e
TT
61462017-08-03 Tom Tromey <tom@tromey.com>
6147
6148 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6149
ed166945
TT
61502017-08-03 Tom Tromey <tom@tromey.com>
6151
6152 * cli/cli-cmds.c (find_and_open_script): Change return type.
6153 Remove "streamp" and "full_path" parameters.
6154 (source_script_with_search): Update.
6155 * auto-load.c (source_script_file): Update.
6156 * cli/cli-cmds.h (find_and_open_script): Change type.
6157 (open_script): New struct.
6158
d419f42d
TT
61592017-08-03 Tom Tromey <tom@tromey.com>
6160
6161 * xml-support.c (xml_fetch_content_from_file): Update.
6162 * ui-file.c (stdio_file::open): Update.
6163 * tracefile-tfile.c (tfile_start): Update.
6164 * remote.c (remote_file_put, remote_file_get): Update.
6165 * nat/linux-procfs.c (linux_proc_get_int)
6166 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6167 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6168 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6169 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6170 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6171 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6172 * linux-nat.c (linux_proc_pending_signals): Update.
6173 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6174 (file_closer): Remove.
6175 * compile/compile.c (compile_to_object): Update.
6176 * common/filestuff.h (struct gdb_file_deleter): New.
6177 (gdb_file_up): New typedef.
6178 (gdb_fopen_cloexec): Change return type.
6179 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6180 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6181 (dump_binary_file, restore_binary_file): Update.
6182 * auto-load.c (auto_load_objfile_script_1): Update.
6183
4a2b031d
TT
61842017-08-03 Tom Tromey <tom@tromey.com>
6185
6186 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6187 (info_static_tracepoint_markers_command): Likewise.
6188 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6189 * skip.c (skip_info): Use ui_out_emit_table.
6190 * progspace.c (print_program_space): Use ui_out_emit_table.
6191 * osdata.c (info_osdata): Use ui_out_emit_table.
6192 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6193 ui_out_emit_table.
6194 * linux-thread-db.c (info_auto_load_libthread_db): Use
6195 ui_out_emit_table.
6196 * inferior.c (print_inferior): Use ui_out_emit_table.
6197 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6198 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6199 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6200 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6201 * ui-out.h (class ui_out_emit_table): New.
6202
a4f320fd
MR
62032017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6204
6205 * mips-tdep.c (mips_fpu_type_str): New function.
6206 (mips_dump_tdep): Call it.
6207
a2f1f308
MR
62082017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6209
6210 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6211 `->mips_fpu_type'.
6212
7e5ed83b
XR
62132017-07-31 Xavier Roirand <roirand@adacore.com>
6214
6215 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6216
4c9dc811
XR
62172017-07-27 Xavier Roirand <roirand@adacore.com>
6218
6219 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6220
27d41eac
YQ
62212017-07-26 Yao Qi <yao.qi@linaro.org>
6222
6223 * cli/cli-cmds.c (maintenancechecklist): New variable.
6224 * gdbcmd.h (maintenancechecklist): Declare it.
6225 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6226 Call i386_linux_read_description with different masks.
6227 * maint.c (maintenance_check_command): New function.
6228 (_initialize_maint_cmds): Call add_prefix_cmd.
6229 * target-descriptions.c (tdesc_reg): override operator != and ==.
6230 (tdesc_type): Likewise.
6231 (tdesc_feature): Likewise.
6232 (target_desc): Likewise.
6233 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6234 (maintenance_check_xml_descriptions): New function.
6235 (_initialize_target_descriptions) Add command "xml-descriptions".
6236 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6237
ea03d0d3
YQ
62382017-07-26 Yao Qi <yao.qi@linaro.org>
6239
6240 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6241 Include features/i386/32bit-*.c.
6242 (i386_linux_read_description): Generate target description if it
6243 doesn't exist.
6244 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6245 functions.
6246 * features/i386/32bit-linux.c: Re-generated.
6247 * features/i386/32bit-sse.c: Likewise.
6248 * target-descriptions.c (print_c_feature::visit): Print code to
6249 set register number if needed.
6250 (print_c_feature) <m_next_regnum>: New field.
6251
25aa13e5
YQ
62522017-07-26 Yao Qi <yao.qi@linaro.org>
6253
6254 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6255 (FEATURE_XMLFILES): New.
6256 (FEATURE_CFILES): New.
6257 New rules.
6258 (clean-cfiles): Remove generated c files.
6259 * features/i386/32bit-avx.c: Generated.
6260 * features/i386/32bit-avx512.c: Generated.
6261 * features/i386/32bit-core.c: Generated.
6262 * features/i386/32bit-linux.c: Generated.
6263 * features/i386/32bit-mpx.c: Generated.
6264 * features/i386/32bit-pkeys.c: Generated.
6265 * features/i386/32bit-sse.c: Generated.
6266 * target-descriptions.c: Include algorithm.
6267 (tdesc_element_visitor): Add method visit_end.
6268 (print_c_tdesc): Implement visit_end.
6269 (print_c_tdesc:: m_filename_after_features): Move it to
6270 protected.
6271 (print_c_feature): New class.
6272 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6273 name starts with "i386/32bit-".
6274
6eb1e6a8
YQ
62752017-07-26 Yao Qi <yao.qi@linaro.org>
6276
6277 * target-descriptions.c (tdesc_element_visitor): New class.
6278 (tdesc_element): New class.
6279 (tdesc_reg): Inherit from tdesc_element.
6280 (tdesc_reg::accept): New function.
6281 (tdesc_type): Inherit from tdesc_element.
6282 (tdesc_type::accept): New function.
6283 (tdesc_feature): Inherit from tdesc_element.
6284 (tdesc_feature::accept): New function.
6285 (target_desc): Inherit from tdesc_element.
6286 (target_desc::target_desc): New.
6287 (target_desc::~target_desc): New.
6288 (target_desc::accept): New.
6289 (allocate_target_description): Use new.
6290 (free_target_description): Use delete.
6291 (print_c_tdesc): New class.
6292 (maint_print_c_tdesc_cmd): Adjust.
6293
6294 * features/aarch64.c: Re-generated.
6295 * features/arc-arcompact.c: Re-generated.
6296 * features/arc-v2.c: Re-generated.
6297 * features/arm/arm-with-iwmmxt.c: Re-generated.
6298 * features/arm/arm-with-m.c: Re-generated.
6299 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6300 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6301 * features/arm/arm-with-neon.c: Re-generated.
6302 * features/arm/arm-with-vfpv2.c: Re-generated.
6303 * features/arm/arm-with-vfpv3.c: Re-generated.
6304 * features/i386/amd64-avx-avx512.c: Re-generated.
6305 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6306 * features/i386/amd64-avx.c: Re-generated.
6307 * features/i386/amd64-avx-linux.c: Re-generated.
6308 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6309 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6310 * features/i386/amd64-avx-mpx.c: Re-generated.
6311 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6312 * features/i386/amd64.c: Re-generated.
6313 * features/i386/amd64-linux.c: Re-generated.
6314 * features/i386/amd64-mpx.c: Re-generated.
6315 * features/i386/amd64-mpx-linux.c: Re-generated.
6316 * features/i386/i386-avx-avx512.c: Re-generated.
6317 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6318 * features/i386/i386-avx.c: Re-generated.
6319 * features/i386/i386-avx-linux.c: Re-generated.
6320 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6321 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6322 * features/i386/i386-avx-mpx.c: Re-generated.
6323 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6324 * features/i386/i386.c: Re-generated.
6325 * features/i386/i386-linux.c: Re-generated.
6326 * features/i386/i386-mmx.c: Re-generated.
6327 * features/i386/i386-mmx-linux.c: Re-generated.
6328 * features/i386/i386-mpx.c: Re-generated.
6329 * features/i386/i386-mpx-linux.c: Re-generated.
6330 * features/i386/x32-avx-avx512.c: Re-generated.
6331 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6332 * features/i386/x32-avx.c: Re-generated.
6333 * features/i386/x32-avx-linux.c: Re-generated.
6334 * features/i386/x32.c: Re-generated.
6335 * features/i386/x32-linux.c: Re-generated.
6336 * features/microblaze.c: Re-generated.
6337 * features/microblaze-with-stack-protect.c: Re-generated.
6338 * features/mips64-dsp-linux.c: Re-generated.
6339 * features/mips64-linux.c: Re-generated.
6340 * features/mips-dsp-linux.c: Re-generated.
6341 * features/mips-linux.c: Re-generated.
6342 * features/nds32.c: Re-generated.
6343 * features/nios2.c: Re-generated.
6344 * features/nios2-linux.c: Re-generated.
6345 * features/rs6000/powerpc-32.c: Re-generated.
6346 * features/rs6000/powerpc-32l.c: Re-generated.
6347 * features/rs6000/powerpc-403.c: Re-generated.
6348 * features/rs6000/powerpc-403gc.c : Re-generated.
6349 * features/rs6000/powerpc-405.c: Re-generated.
6350 * features/rs6000/powerpc-505.c: Re-generated.
6351 * features/rs6000/powerpc-601.c: Re-generated.
6352 * features/rs6000/powerpc-602.c: Re-generated.
6353 * features/rs6000/powerpc-603.c: Re-generated.
6354 * features/rs6000/powerpc-604.c: Re-generated.
6355 * features/rs6000/powerpc-64.c: Re-generated.
6356 * features/rs6000/powerpc-64l.c: Re-generated.
6357 * features/rs6000/powerpc-7400.c: Re-generated.
6358 * features/rs6000/powerpc-750.c: Re-generated.
6359 * features/rs6000/powerpc-860.c: Re-generated.
6360 * features/rs6000/powerpc-altivec32.c: Re-generated.
6361 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6362 * features/rs6000/powerpc-altivec64.c: Re-generated.
6363 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6364 * features/rs6000/powerpc-cell32l.c: Re-generated.
6365 * features/rs6000/powerpc-cell64l.c: Re-generated.
6366 * features/rs6000/powerpc-e500.c: Re-generated.
6367 * features/rs6000/powerpc-e500l.c: Re-generated.
6368 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6369 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6370 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6371 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6372 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6373 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6374 * features/rs6000/powerpc-vsx32.c: Re-generated.
6375 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6376 * features/rs6000/powerpc-vsx64.c: Re-generated.
6377 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6378 * features/rs6000/rs6000.c: Re-generated.
6379 * features/s390-linux32.c: Re-generated.
6380 * features/s390-linux32v1.c: Re-generated.
6381 * features/s390-linux32v2.c: Re-generated.
6382 * features/s390-linux64.c: Re-generated.
6383 * features/s390-linux64v1.c: Re-generated.
6384 * features/s390-linux64v2.c: Re-generated.
6385 * features/s390-te-linux64.c: Re-generated.
6386 * features/s390-tevx-linux64.c: Re-generated.
6387 * features/s390-vx-linux64.c: Re-generated.
6388 * features/s390x-linux64.c: Re-generated.
6389 * features/s390x-linux64v1.c: Re-generated.
6390 * features/s390x-linux64v2.c: Re-generated.
6391 * features/s390x-te-linux64.c: Re-generated.
6392 * features/s390x-tevx-linux64.c: Re-generated.
6393 * features/s390x-vx-linux64.c: Re-generated.
6394 * features/sparc/sparc32-solaris.c: Re-generated.
6395 * features/sparc/sparc64-solaris.c: Re-generated.
6396 * features/tic6x-c62x.c: Re-generated.
6397 * features/tic6x-c62x-linux.c: Re-generated.
6398 * features/tic6x-c64x.c: Re-generated.
6399 * features/tic6x-c64x-linux.c: Re-generated.
6400 * features/tic6x-c64xp.c: Re-generated.
6401 * features/tic6x-c64xp-linux.c: Re-generated.
6402
35b4818d
YQ
64032017-07-26 Yao Qi <yao.qi@linaro.org>
6404
6405 * i386-linux-tdep.c (i386_linux_read_description): New function.
6406 (i386_linux_core_read_description): Call
6407 i386_linux_read_description.
6408 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6409 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6410 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6411 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6412 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6413 * x86-linux-nat.c (x86_linux_read_description): Call
6414 i386_linux_read_description.
6415
8e2141c6
YQ
64162017-07-26 Yao Qi <yao.qi@linaro.org>
6417
6418 * NEWS: Mention it.
6419 * features/Makefile (%.c: %.xml): Pass the xml file name to
6420 command "maint print c-tdesc".
6421 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6422 name from 'arg'.
6423
b468ff4c
YQ
64242017-07-26 Yao Qi <yao.qi@linaro.org>
6425
6426 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6427 in-class initialization.
6428 (tdesc_create_feature): Call new instead of XCNEW.
6429 (free_target_description): Ue delete.
6430
b9c0e1b4
JB
64312017-07-25 John Baldwin <jhb@FreeBSD.org>
6432
6433 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6434
a04b5337
YQ
64352017-07-25 Yao Qi <yao.qi@linaro.org>
6436
6437 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6438 constant.
6439 (amd64_x32_init_abi): Likewise.
6440 * amd64-tdep.h (amd64_init_abi): Update declaration.
6441 (amd64_x32_init_abi): Likewise.
6442
02ad7fc2
YQ
64432017-07-25 Yao Qi <yao.qi@linaro.org>
6444
6445 PR tdep/21717
6446 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6447 condition for FPSCR.
6448 (arm_linux_store_inferior_registers): Likewise.
6449
b6f48cb0
TT
64502017-07-22 Tom Tromey <tom@tromey.com>
6451
6452 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6453 <syscalls_counts>: Now a std::vector.
6454 (get_catch_syscall_inferior_data): Use "new".
6455 (catch_syscall_inferior_data_cleanup): Use "delete".
6456 (insert_catch_syscall, remove_catch_syscall)
6457 (clear_syscall_counts): Update.
6458
e12c9b7a
TT
64592017-07-22 Tom Tromey <tom@tromey.com>
6460
6461 * break-catch-syscall.c (syscall_catchpoint)
6462 <syscalls_to_be_caught>: Now a std::vector<int>
6463 (~syscall_catchpoint): Remove.
6464 (insert_catch_syscall, remove_catch_syscall)
6465 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6466 (print_mention_catch_syscall, print_recreate_catch_syscall):
6467 Update.
6468 (create_syscall_event_catchpoint): Change type of "filter"
6469 parameter.
6470 (catch_syscall_split_args): Return a std::vector.
6471 (catch_syscall_command_1, catching_syscall_number_1): Update.
6472
4fa8aeac
TT
64732017-07-22 Tom Tromey <tom@tromey.com>
6474
6475 * break-catch-throw.c (struct exception_catchpoint)
6476 <exception_rx>: Now a std::string.
6477 (~exception_catchpoint): Remove.
6478 (print_one_detail_exception_catchpoint): Update.
6479 (handle_gnu_v3_exceptions): Change type of except_rx.
6480 (extract_exception_regexp): Return a std::string.
6481 (catch_exception_command_1): Update.
6482
f746a154
TT
64832017-07-22 Tom Tromey <tom@tromey.com>
6484
6485 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6486 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6487 std::vector.
6488 <catch_all>: Now a bool.
6489 (~signal_catchpoint): Remove.
6490 (signal_catchpoint_insert_location)
6491 (signal_catchpoint_remove_location)
6492 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6493 (signal_catchpoint_print_mention)
6494 (signal_catchpoint_print_recreate)
6495 (signal_catchpoint_explains_signal): Update.
6496 (create_signal_catchpoint): Change type of "filter" and
6497 "catch_all".
6498 (catch_signal_split_args): Return a std::vector. Change type of
6499 "catch_all".
6500 (catch_signal_command): Update.
6501
47e77640
PA
65022017-07-20 Pedro Alves <palves@redhat.com>
6503
6504 * ada-lang.c (ada_language_defn): Make extern.
6505 (_initialize_ada_language): Remove add_language call.
6506 * c-lang.c (c_language_defn, cplus_language_defn)
6507 (asm_language_defn, minimal_language_defn): Make extern.
6508 (_initialize_c_language): Delete.
6509 * completer.c (compare_cstrings): Delete, moved to utils.h.
6510 * d-lang.c (d_language_defn): Make extern.
6511 (_initialize_d_language): Remove add_language calls.
6512 * defs.h (enum language): Add comment.
6513 * f-lang.c (f_language_defn): Make extern.
6514 (_initialize_f_language): Remove add_language call.
6515 * go-lang.c (go_language_defn): Make extern.
6516 (_initialize_go_language): Remove add_language call.
6517 * language.c: Include <algorithm>.
6518 (languages): Redefine as const array.
6519 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6520 (set_language_command): Handle "local". Use for-range loop.
6521 (set_language): Remove loop.
6522 (language_enum): Rewrite.
6523 (language_def, language_str): Remove loops.
6524 (add_language): Delete.
6525 (add_set_language_command): New, based on add_languages.
6526 (skip_language_trampoline): Adjust.
6527 (local_language_defn): Delete.
6528 (language_gdbarch_post_init): Adjust.
6529 (_initialize_language): Remove add_language calls. Call
6530 add_set_language_command.
6531 * language.h (add_language): Delete.
6532 (auto_language_defn)
6533 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6534 (asm_language_defn, c_language_defn, cplus_language_defn)
6535 (d_language_defn, f_language_defn, go_language_defn)
6536 (m2_language_defn, objc_language_defn, opencl_language_defn)
6537 (pascal_language_defn, rust_language_defn): Declare.
6538 * m2-lang.c (m2_language_defn): Make extern.
6539 (_initialize_m2_language): Remove add_language call.
6540 * objc-lang.c (objc_language_defn): Make extern.
6541 (_initialize_objc_language): Remove add_language call.
6542 * opencl-lang.c (opencl_language_defn): Make extern.
6543 (_initialize_opencl_language): Remove add_language call.
6544 * p-lang.c (pascal_language_defn): Make extern.
6545 (_initialize_pascal_language): Delete.
6546 * rust-lang.c (rust_language_defn): Make extern.
6547 (_initialize_rust_language): Delete.
6548 * utils.h (compare_cstrings): New static inline function.
6549
edb0c9cb
PA
65502017-07-20 Pedro Alves <palves@redhat.com>
6551
6552 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6553 (get_var_value): Constify parameters.
6554 (get_int_var_value): Change prototype.
6555 (to_fixed_range_type): Adjust.
6556 * ada-lang.h (get_int_var_value): Change prototype.
6557
a778f165
PA
65582017-07-20 Pedro Alves <palves@redhat.com>
6559
6560 * dwarf2read.c (dw2_lookup_symbol): Use
6561 SYMBOL_MATCHES_SEARCH_NAME.
6562 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6563
42edd901
PA
65642017-07-20 Pedro Alves <palves@redhat.com>
6565
6566 * block.c (block_iter_name_step, block_iter_name_first)
6567 (block_iter_name_next): Delete.
6568 (block_lookup_symbol_primary): Adjust to use
6569 dict_iter_match_first/dict_iter_match_next.
6570 * block.h (block_iter_name_first, block_iter_name_next): Delete
6571 declarations.
6572 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6573 dict_iter_match_first/dict_iter_match_next.
6574
cf325299
PA
65752017-07-20 Pedro Alves <palves@redhat.com>
6576
6577 * cp-support.c (cp_find_first_component_aux): Add missing case for
6578 end of string.
6579
c5ed0576
DB
65802017-07-18 David Blaikie <dblaikie@gmail.com>
6581
6582 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6583 of dwo_cu's dwo_file.
6584
27841e76
YQ
65852017-07-18 Yao Qi <yao.qi@linaro.org>
6586
6587 * remote.c (store_registers_using_G): Remove one line comment.
6588
cfb7e58b
YQ
65892017-07-18 Yao Qi <yao.qi@linaro.org>
6590
6591 * regcache.c (regcache_cpy): Simplify it.
6592 (regcache::cpy_no_passthrough): Remove it.
6593 * regcache.h (cpy_no_passthrough): Remove it.
6594 (regcache_dup, regcache_cpy): Update comments.
6595
386535dd
PA
65962017-07-18 Pedro Alves <palves@redhat.com>
6597
6598 * remote-sim.c (sim_command_completer): Adjust to work with a
6599 completion_tracker instead of a VEC.
6600
c45ec17c
PA
66012017-07-17 Pedro Alves <palves@redhat.com>
6602
6603 * completer.c (complete_source_filenames): New function.
6604 (complete_address_and_linespec_locations): New function.
6605 (location_completer): Use complete_address_and_linespec_locations.
6606 (completion_tracker::build_completion_result): Honor the tracker's
6607 request to suppress append.
6608 * completer.h (completion_tracker::suppress_append_ws)
6609 (completion_tracker::set_suppress_append_ws): New methods.
6610 (completion_tracker::m_suppress_append_ws): New field.
6611 (complete_source_filenames): New declaration.
6612 * linespec.c (linespec_complete_what): New.
6613 (struct ls_parser) <complete_what, completion_word,
6614 completion_quote_char, completion_quote_end, completion_tracker>:
6615 New fields.
6616 (string_find_incomplete_keyword_at_end): New.
6617 (linespec_lexer_lex_string): Record quote char. If in completion
6618 mode, don't throw.
6619 (linespec_lexer_consume_token): Advance the completion word point.
6620 (linespec_lexer_peek_token): Save/restore completion info.
6621 (save_stream_and_consume_token): New.
6622 (set_completion_after_number): New.
6623 (linespec_parse_basic): Set what to complete next depending on
6624 token. Handle function and label completions specially.
6625 (parse_linespec): Disable objc shortcut in completion mode. Set
6626 what to complete next depending on token type. Skip keyword if in
6627 completion mode.
6628 (complete_linespec_component, linespec_complete): New.
6629 * linespec.h (linespec_complete): Declare.
6630
be966d42
PA
66312017-07-17 Pedro Alves <palves@redhat.com>
6632
6633 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6634 Handle 'operator<' / 'operator<<'.
6635
a2459270
PA
66362017-07-17 Pedro Alves <palves@redhat.com>
6637
6638 * completer.c (collect_explicit_location_matches): Handle
6639 MATCH_LABEL.
6640 (convert_explicit_location_to_linespec): New, factored out from
6641 ...
6642 (convert_explicit_location_to_sals): ... this.
6643 (complete_label): New.
6644 (linespec_complete_label, find_label_symbols_in_block): New.
6645 (find_label_symbols): Add completion_mode parameter and adjust to
6646 call find_label_symbols_in_block.
6647 * linespec.h (linespec_complete_label): Declare.
6648
c6756f62
PA
66492017-07-17 Pedro Alves <palves@redhat.com>
6650
6651 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6652 complete_symbol_mode parameter.
6653 * cli/cli-cmds.c (complete_command): Get the completion result out
6654 of the handle_brkchars tracker if used a custom word point.
6655 * completer.c: Include "linespec.h".
6656 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6657 (advance_to_expression_complete_word_point): New.
6658 (completion_tracker::completes_to_completion_word): New.
6659 (complete_files_symbols): Pass down
6660 complete_symbol_mode::EXPRESSION.
6661 (explicit_options, probe_options): New.
6662 (collect_explicit_location_matches): Complete on the
6663 explictit_loc->foo instead of word. Use
6664 linespec_complete_function. Handle MATCH_LINE. Handle offering
6665 keyword and options completions.
6666 (backup_text_ptr): Delete.
6667 (skip_keyword): New.
6668 (complete_explicit_location): Remove 'word' parameter. Add
6669 language, quoted_arg_start and quoted_arg_end parameters.
6670 Rewrite, parsing left to right.
6671 (location_completer): Rewrite.
6672 (location_completer_handle_brkchars): New function.
6673 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6674 (enum complete_line_internal_reason): Adjust comments.
6675 (completion_tracker::discard_completions): New.
6676 (completer_handle_brkchars_func_for_completer): Handle
6677 location_completer.
6678 (gdb_custom_word_point_brkchars)
6679 (gdb_org_rl_basic_quote_characters): New.
6680 (gdb_completion_word_break_characters_throw)
6681 (completion_find_completion_word): Handle trackers that use a
6682 custom word point.
6683 (completion_tracker::advance_custom_word_point_by): New.
6684 (completion_tracker::build_completion_result): Don't rely on
6685 readline appending the quote char.
6686 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6687 use a custom word point.
6688 (gdb_rl_attempted_completion_function): Restore
6689 rl_basic_quote_characters.
6690 * completer.h (class completion_tracker): Extend intro comment.
6691 (completion_tracker::set_quote_char)
6692 (completion_tracker::quote_char)
6693 (completion_tracker::set_use_custom_word_point)
6694 (completion_tracker::use_custom_word_point)
6695 (completion_tracker::custom_word_point)
6696 (completion_tracker::set_custom_word_point)
6697 (completion_tracker::advance_custom_word_point_by)
6698 (completion_tracker::completes_to_completion_word)
6699 (completion_tracker::discard_completions): New methods.
6700 (completion_tracker::m_quote_char)
6701 (completion_tracker::m_use_custom_word_point)
6702 (completion_tracker::m_custom_word_point): New fields.
6703 (advance_to_expression_complete_word_point): Declare.
6704 * f-lang.c (f_collect_symbol_completion_matches): Add
6705 complete_symbol_mode parameter.
6706 * language.h (struct language_defn)
6707 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6708 parameter.
6709 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6710 (linespec_complete_function): New function.
6711 (linespec_lexer_lex_keyword): Adjust.
6712 * linespec.h (linespec_keywords, linespec_complete_function): New
6713 declarations.
6714 * location.c (find_end_quote): New function.
6715 (explicit_location_lex_one): Add explicit_completion_info
6716 parameter. Save quoting info. Don't throw if being called for
6717 completion. Don't handle Ada operators here.
6718 (is_cp_operator, skip_op_false_positives, first_of)
6719 (explicit_location_lex_one_function): New function.
6720 (string_to_explicit_location): Replace 'dont_throw' parameter with
6721 an explicit_completion_info pointer parameter. Handle it. Don't
6722 use explicit_location_lex_one to lex function names. Use
6723 explicit_location_lex_one_function instead.
6724 * location.h (struct explicit_completion_info): New.
6725 (string_to_explicit_location): Replace 'dont_throw' parameter with
6726 an explicit_completion_info pointer parameter.
6727 * symtab.c (default_collect_symbol_completion_matches_break_on):
6728 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6729 (default_collect_symbol_completion_matches)
6730 (collect_symbol_completion_matches): Add complete_symbol_mode
6731 parameter.
6732 (collect_symbol_completion_matches_type): Pass down
6733 complete_symbol_mode::EXPRESSION.
6734 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6735 parameter. Handle LINESPEC mode.
6736 * symtab.h (complete_symbol_mode): New.
6737 (default_collect_symbol_completion_matches_break_on)
6738 (default_collect_symbol_completion_matches)
6739 (collect_symbol_completion_matches)
6740 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6741 parameter.
6742
1d550c82
PA
67432017-07-17 Pedro Alves <palves@redhat.com>
6744
6745 * utils.c (enum class strncmp_iw_mode): New.
6746 (strcmp_iw): Rename to ...
6747 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6748 parameters. Handle them.
6749 (strncmp_iw): New.
6750 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6751 * utils.h (strncmp_iw): Declare.
6752 (strcmp_iw): Move describing comments here.
6753
8090b426
PA
67542017-07-17 Pedro Alves <palves@redhat.com>
6755
6756 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6757 CP_OPERATOR_STR.
6758 * c-typeprint.c (is_type_conversion_operator): Use
6759 CP_OPERATOR_STR.
6760 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6761 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6762 CP_OPERATOR_LEN.
6763 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6764 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6765 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6766 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6767 CP_OPERATOR_STR.
6768 * location.c: Include "cp-support.h".
6769 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6770 CP_OPERATOR_STR.
6771 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6772 CP_OPERATOR_LEN.
6773
6a2c1b87
PA
67742017-07-17 Pedro Alves <palves@redhat.com>
6775
6776 * cli/cli-cmds.c (complete_command): Use a completion tracker
6777 along with completion_find_completion_word for handle_brkchars
6778 phase.
6779 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6780 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6781 (struct gdb_rl_completion_word_info): New.
6782 (gdb_rl_find_completion_word): New.
6783 (completion_find_completion_word): New.
6784 * completer.h (completion_find_completion_word): Declare.
6785
eb3ff9a5
PA
67862017-07-17 Pedro Alves <palves@redhat.com>
6787
6788 * ada-lang.c (symbol_completion_match): Adjust comments.
6789 (symbol_completion_add): Replace vector parameter with
6790 completion_tracker parameter. Use it.
6791 (ada_make_symbol_completion_list): Rename to...
6792 (ada_collect_symbol_completion_matches): ... this. Add
6793 completion_tracker parameter and use it.
6794 (ada_language_defn): Adjust.
6795 * break-catch-syscall.c (catch_syscall_completer): Adjust
6796 prototype and work with completion_tracker instead of VEC.
6797 * breakpoint.c (condition_completer): Adjust prototype and work
6798 with completion_tracker instead of VEC.
6799 * c-lang.c (c_language_defn, cplus_language_defn)
6800 (asm_language_defn, minimal_language_defn): Adjust to renames.
6801 * cli/cli-cmds.c (complete_command): Rework using
6802 completion_tracker. Catch exceptions when completing.
6803 * cli/cli-decode.c (integer_unlimited_completer)
6804 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6805 with completion_tracker instead of VEC.
6806 * command.h (struct completion_tracker): Forward declare.
6807 (completer_ftype, completer_handle_brkchars_ftype): Change
6808 types.
6809 (complete_on_cmdlist, complete_on_enum): Adjust.
6810 * completer.c: Include <algorithm>.
6811 (struct gdb_completer_state): New.
6812 (current_completion): New global.
6813 (readline_line_completion_function): Delete.
6814 (noop_completer, filename_completer)
6815 (filename_completer_handle_brkchars, complete_files_symbols)
6816 (linespec_location_completer): Adjust to work with a
6817 completion_tracker instead of a VEC.
6818 (string_or_empty): New.
6819 (collect_explicit_location_matches): Adjust to work with a
6820 completion_tracker instead of a VEC.
6821 (explicit_location_completer): Rename to ...
6822 (complete_explicit_location): ... this and adjust to work with a
6823 completion_tracker instead of a VEC.
6824 (location_completer): Adjust to work with a completion_tracker
6825 instead of a VEC.
6826 (add_struct_fields): Adjust to work with a completion_list instead
6827 of VEC.
6828 (expression_completer): Rename to ...
6829 (complete_expression): ... this and adjust to work with a
6830 completion_tracker instead of a VEC. Use complete_files_symbols.
6831 (expression_completer): Reimplement on top of complete_expression.
6832 (symbol_completer): Adjust to work with a completion_tracker
6833 instead of a VEC.
6834 (enum complete_line_internal_reason): Add describing comments.
6835 (complete_line_internal_normal_command): Adjust to work with a
6836 completion_tracker instead of a VEC.
6837 (complete_line_internal): Rename to ...
6838 (complete_line_internal_1): ... this and adjust to work with a
6839 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6840 handle_brkchars phase.
6841 (new_completion_tracker): Delete.
6842 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6843 complete_line_internal_1.
6844 (free_completion_tracker): Delete.
6845 (INITIAL_COMPLETION_HTAB_SIZE): New.
6846 (completion_tracker::completion_tracker)
6847 (completion_tracker::~completion_tracker): New.
6848 (maybe_add_completion): Delete.
6849 (completion_tracker::maybe_add_completion)
6850 (completion_tracker::add_completion)
6851 (completion_tracker::add_completions): New.
6852 (throw_max_completions_reached_error): Delete.
6853 (complete_line): Adjust to work with a completion_tracker instead
6854 of a VEC. Don't create a completion_tracker_t or check for max
6855 completions here.
6856 (command_completer, command_completer_handle_brkchars)
6857 (signal_completer, reg_or_group_completer_1)
6858 (reg_or_group_completer, default_completer_handle_brkchars):
6859 Adjust to work with a completion_tracker.
6860 (gdb_completion_word_break_characters_throw): New.
6861 (gdb_completion_word_break_characters): Reimplement.
6862 (line_completion_function): Delete.
6863 (completion_tracker::recompute_lowest_common_denominator)
6864 (expand_preserving_ws)
6865 (completion_tracker::build_completion_result)
6866 (completion_result::completion_result)
6867 (completion_result::completion_result)
6868 (completion_result::~completion_result)
6869 (completion_result::completion_result)
6870 (completion_result::release_match_list, compare_cstrings)
6871 (completion_result::sort_match_list)
6872 (completion_result::reset_match_list)
6873 (gdb_rl_attempted_completion_function_throw)
6874 (gdb_rl_attempted_completion_function): New.
6875 * completer.h (completion_list, struct completion_result)
6876 (class completion_tracker): New.
6877 (complete_line): Add completion_tracker parameter.
6878 (readline_line_completion_function): Delete.
6879 (gdb_rl_attempted_completion_function): New.
6880 (noop_completer, filename_completer, expression_completer)
6881 (location_completer, symbol_completer, command_completer)
6882 (signal_completer, reg_or_group_completer): Update prototypes.
6883 (completion_tracker_t, new_completion_tracker)
6884 (make_cleanup_free_completion_tracker): Delete.
6885 (enum maybe_add_completion_enum): Delete.
6886 (maybe_add_completion): Delete.
6887 (throw_max_completions_reached_error): Delete.
6888 * corefile.c (complete_set_gnutarget): Adjust to work with a
6889 completion_tracker instead of a VEC.
6890 * cp-abi.c (cp_abi_completer): Adjust to work with a
6891 completion_tracker instead of a VEC.
6892 * d-lang.c (d_language_defn): Adjust.
6893 * disasm.c (disassembler_options_completer): Adjust to work with a
6894 completion_tracker instead of a VEC.
6895 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6896 (f_collect_symbol_completion_matches): ... this. Adjust to work
6897 with a completion_tracker instead of a VEC.
6898 (f_language_defn): Adjust.
6899 * go-lang.c (go_language_defn): Adjust.
6900 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6901 Adjust to work with a completion_tracker instead of a VEC.
6902 * infrun.c (handle_completer): Likewise.
6903 * interps.c (interpreter_completer): Likewise.
6904 * interps.h (interpreter_completer): Likewise.
6905 * language.c (unknown_language_defn, auto_language_defn)
6906 (local_language_defn): Adjust.
6907 * language.h (language_defn::la_make_symbol_completion_list):
6908 Rename to ...
6909 (language_defn::la_collect_symbol_completion_matches): ... this
6910 and adjust to work with a completion_tracker instead of a VEC.
6911 * m2-lang.c (m2_language_defn): Adjust.
6912 * objc-lang.c (objc_language_defn): Adjust.
6913 * opencl-lang.c (opencl_language_defn): Adjust.
6914 * p-lang.c (pascal_language_defn): Adjust.
6915 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6916 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6917 with a completion_tracker.
6918 * rust-lang.c (rust_language_defn): Adjust.
6919 * symtab.c (free_completion_list, do_free_completion_list)
6920 (return_val, completion_tracker): Delete.
6921 (completion_list_add_name, completion_list_add_symbol)
6922 (completion_list_add_msymbol, completion_list_objc_symbol)
6923 (completion_list_add_fields, add_symtab_completions): Add
6924 completion_tracker parameter and use it.
6925 (default_make_symbol_completion_list_break_on_1): Rename to...
6926 (default_collect_symbol_completion_matches_break_on): ... this.
6927 Add completion_tracker parameter and use it instead of allocating
6928 a completion tracker here.
6929 (default_make_symbol_completion_list_break_on): Delete old
6930 implementation.
6931 (default_make_symbol_completion_list): Delete.
6932 (default_collect_symbol_completion_matches): New.
6933 (make_symbol_completion_list): Delete.
6934 (collect_symbol_completion_matches): New.
6935 (make_symbol_completion_type): Rename to ...
6936 (collect_symbol_completion_matches_type): ... this. Add
6937 completion_tracker parameter and use it instead of VEC.
6938 (make_file_symbol_completion_list_1): Rename to...
6939 (collect_file_symbol_completion_matches): ... this. Add
6940 completion_tracker parameter and use it instead of VEC.
6941 (make_file_symbol_completion_list): Delete.
6942 (add_filename_to_list): Use completion_list instead of a VEC.
6943 (add_partial_filename_data::list): Now a completion_list.
6944 (make_source_files_completion_list): Work with a completion_list
6945 instead of a VEC.
6946 * symtab.h: Include "completer.h".
6947 (default_make_symbol_completion_list_break_on)
6948 (default_make_symbol_completion_list, make_symbol_completion_list)
6949 (make_symbol_completion_type, make_file_symbol_completion_list)
6950 (make_source_files_completion_list): Delete.
6951 (default_collect_symbol_completion_matches_break_on)
6952 (default_collect_symbol_completion_matches)
6953 (collect_symbol_completion_matches)
6954 (collect_symbol_completion_matches_type)
6955 (collect_file_symbol_completion_matches)
6956 (make_source_files_completion_list): New.
6957 * top.c (init_main): Don't install a rl_completion_entry_function
6958 hook. Install a rl_attempted_completion_function hook instead.
6959 * tui/tui-layout.c (layout_completer): Adjust to work with a
6960 completion_tracker.
6961 * tui/tui-regs.c (tui_reggroup_completer):
6962 * tui/tui-win.c (window_name_completer, focus_completer)
6963 (winheight_completer): Adjust to work with a completion_tracker.
6964 * value.c: Include "completer.h".
6965 (complete_internalvar): Adjust to work with a completion_tracker.
6966 * value.h (complete_internalvar): Likewise.
6967
6e1dbf8c
PA
69682017-07-17 Pedro Alves <palves@redhat.com>
6969
6970 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
6971 renames.
6972 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
6973 comments to completer_ftype's declaration.
6974 <completer_handle_brkchars>: Change type to
6975 completer_handle_brkchars_ftype.
6976 * command.h (completer_ftype): Add describing comment and give
6977 names to parameters.
6978 (completer_ftype_void): Rename to ...
6979 (completer_handle_brkchars_ftype) ... this. Add describing comment.
6980 (set_cmd_completer_handle_brkchars): Adjust.
6981 * completer.c (filename_completer_handle_brkchars): New function.
6982 (complete_line_internal_normal_command): New function, factored
6983 out from ...
6984 (complete_line_internal): ... here.
6985 (command_completer_handle_brkchars)
6986 (default_completer_handle_brkchars)
6987 (completer_handle_brkchars_func_for_completer): New functions.
6988 * completer.h (set_gdb_completion_word_break_characters): Delete
6989 declaration.
6990 (completer_handle_brkchars_func_for_completer): New declaration.
6991 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
6992 completer_handle_brkchars_func_for_completer.
6993
78b13106
PA
69942017-07-17 Pedro Alves <palves@redhat.com>
6995
6996 * completer.c (symbol_completer): New function, based on
6997 make_symbol_completion_list_fn.
6998 * completer.h (symbol_completer): New declaration.
6999 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7000 * python/py-cmd.c (completers): Adjust.
7001 * symtab.c (make_symbol_completion_list_fn): Delete.
7002 * symtab.h (make_symbol_completion_list_fn): Delete.
7003 * cli/cli-decode.c (add_cmd): Adjust.
7004
bbf2f4df
PA
70052017-07-17 Pedro Alves <palves@redhat.com>
7006
7007 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7008 * dwarf2read.c: Include "filename-seen-cache.h".
7009 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7010 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7011 * filename-seen-cache.c: New file.
7012 * filename-seen-cache.h: New file.
7013 * symtab.c: Include "filename-seen-cache.h".
7014 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7015 (create_filename_seen_cache, clear_filename_seen_cache)
7016 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7017 to filename-seen-cache.h/filename-seen-cache.c.
7018 (output_source_filename, sources_info)
7019 (maybe_add_partial_symtab_filename)
7020 (make_source_files_completion_list): Adjust to use
7021 filename_seen_cache.
7022
330cdd98
PA
70232017-07-17 Pedro Alves <palves@redhat.com>
7024
7025 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7026 fields.
7027 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7028 dwarf2_debug_sections*)): New.
7029 (dwarf2_per_objfile::dwarf2_per_objfile(const
7030 dwarf2_per_objfile&)): Declare as deleted.
7031 (dwarf2_per_objfile::operator=): Declare as deleted.
7032 (dwarf2_per_objfile::dwarf2_per_objfile)
7033 (dwarf2_per_objfile::~dwarf2_per_objfile)
7034 (dwarf2_per_objfile::free_cached_comp_units): New.
7035 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7036 ctor. Call dwarf2_per_objfile's ctor manually.
7037 (dwarf2_locate_sections): Deleted/refactored as ...
7038 (dwarf2_per_objfile::locate_sections): ... this new method.
7039 (free_cached_comp_units): Defer to
7040 dwarf2_per_objfile::free_cached_comp_units.
7041 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7042
8880f2a9
TT
70432017-07-14 Tom Tromey <tom@tromey.com>
7044
7045 PR rust/21764:
7046 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7047 parameter.
7048 <UNOP_SIZEOF>: Split into separate case.
7049 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7050
65547233
TT
70512017-07-14 Tom Tromey <tom@tromey.com>
7052
7053 PR rust/21763:
7054 * symtab.c (symbol_matches_domain): Add language_rust to special
7055 case.
7056 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7057 treat LOC_TYPEDEF symbols as variables.
7058
8f14146e
PA
70592017-07-14 Pedro Alves <palves@redhat.com>
7060
7061 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7062 symtabs matching all symtabs with SRCFILE as file name instead of
7063 only considering the first hit, with lookup_symtab.
7064
2347965c
SM
70652017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7066
7067 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7068 operator_name parameters.
7069 (gen_expr): Update function call.
7070
40f4af28
SM
70712017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7072
7073 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7074 parameter.
7075 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7076 Likewise.
7077 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7078 parameter, use agent_expr::gdbarch instead, update function
7079 calls.
7080 (locexpr_tracepoint_var_ref): Likewise.
7081 (loclist_tracepoint_var_ref): Likewise.
7082 * ax-gdb.c (gen_trace_static_fields): Likewise.
7083 (gen_traced_pop): Likewise.
7084 (gen_frame_args_address): Likewise.
7085 (gen_frame_locals_address): Likewise.
7086 (gen_var_ref): Likewise.
7087 (gen_struct_ref_recursive): Likewise.
7088 (gen_static_field): Likewise.
7089 (gen_maybe_namespace_elt): Likewise.
7090 (gen_expr): Likewise.
7091 (gen_trace_for_var): Likewise.
7092 (gen_trace_for_expr): Likewise.
7093 (gen_trace_for_return_address): Likewise.
7094
053f8057
SM
70952017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7096
7097 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7098 parameter.
7099 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7100
6661ad48
SM
71012017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7102
7103 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7104 from ax, update calls.
7105 (gen_usual_arithmetic): Likewise.
7106 (gen_integral_promotions): Likewise.
7107 (gen_bitfield_ref): Likewise.
7108 (gen_primitive_field): Likewise.
7109 (gen_struct_ref_recursive): Likewise.
7110 (gen_struct_ref): Likewise.
7111 (gen_maybe_namespace_elt): Likewise.
7112 (gen_struct_elt_for_reference): Likewise.
7113 (gen_namespace_elt): Likewise.
7114 (gen_aggregate_elt_ref): Likewise.
7115 (gen_expr): Get gdbarch from ax, update calls.
7116 (gen_expr_binop_rest): Likewise.
7117
c55a47e7
PA
71182017-07-13 Pedro Alves <palves@redhat.com>
7119
7120 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7121 as default tdesc.
7122 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7123 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7124 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7125 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7126 tdep.
7127 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7128 Get final tdesc from the tdep.
7129 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7130 default tdesc.
7131 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7132 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7133 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7134 Use it as default tdesc.
7135 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7136 down to amd_init_abi. No longer handle fallback tdesc here.
7137 * amd64-tdep.h (tdesc_x32): Declare.
7138 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7139 parameter.
7140 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7141 as default tdesc.
7142
55efceab
AA
71432017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7144
7145 * s390-linux-tdep.c (s390_process_record): Add support for
7146 instructions new in arch12.
7147
0aa37b65
JB
71482017-07-11 John Baldwin <jhb@FreeBSD.org>
7149
7150 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7151 PT_GETFSBASE and PT_GETGSBASE.
7152 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7153 PT_SETGSBASE.
7154
48aeef91
JB
71552017-07-11 John Baldwin <jhb@FreeBSD.org>
7156
7157 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7158 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7159 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7160 those rules.
7161 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7162 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7163 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7164 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7165 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7166 * features/i386/amd64.xml: Add 64bit-segments.xml.
7167 * features/i386/amd64-avx-avx512.c: Regenerated.
7168 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7169 * features/i386/amd64-avx-mpx.c: Regenerated.
7170 * features/i386/amd64-avx.c: Regenerated.
7171 * features/i386/amd64-mpx.c: Regenerated.
7172 * features/i386/amd64.c: Regenerated.
7173 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7174 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7175 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7176 * regformats/i386/amd64-avx.dat: Regenerated.
7177 * regformats/i386/amd64-mpx.dat: Regenerated.
7178 * regformats/i386/amd64.dat: Regenerated.
7179
77c501bc
YQ
71802017-07-10 Yao Qi <yao.qi@linaro.org>
7181
7182 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7183 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7184
6dc8d757
AK
71852017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7186
7187 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7188 unsetenv.
7189 * gnulib/aclocal.m4: Regenerate.
7190 * gnulib/config.in: Regenerate.
7191 * gnulib/configure: Regenerate.
7192 * gnulib/import/Makefile.am: Regenerate.
7193 * gnulib/import/Makefile.in: Regenerate.
7194 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7195 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7196 * gnulib/import/m4/environ.m4: New file.
7197 * gnulib/import/m4/setenv.m4: New file.
7198 * gnulib/import/setenv.c: New file.
7199 * gnulib/import/unsetenv.c: New file.
7200
266934d1
SM
72012017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7202
7203 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7204 address when op is DW_OP_addr.
7205
03278692
TT
72062017-07-09 Tom Tromey <tom@tromey.com>
7207
7208 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7209 check and apply to outer type.
7210
4b654465
JB
72112017-07-07 John Baldwin <jhb@FreeBSD.org>
7212
7213 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7214 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7215 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7216 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7217
2af9fc44
JB
72182017-07-07 John Baldwin <jhb@FreeBSD.org>
7219
7220 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7221
382b69bb
JB
72222017-07-07 John Baldwin <jhb@FreeBSD.org>
7223
7224 * corelow.c (get_core_siginfo): Remove.
7225 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7226 instead of get_core_siginfo.
7227 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7228 * gdbarch.h: Re-generate.
7229 * gdbarch.c: Re-generate.
7230 * linux-tdep.c (linux_core_xfer_siginfo): New.
7231 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7232
6e5eab33
JB
72332017-07-07 John Baldwin <jhb@FreeBSD.org>
7234
7235 * corelow.c (thread_section_name): Move to ...
7236 * gdbcore.h (thread_section_name): ... here.
7237
929edea9
JB
72382017-07-07 John Baldwin <jhb@FreeBSD.org>
7239
7240 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7241 (struct siginfo32): New.
7242 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7243 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7244 via ptrace(PT_LWPINFO).
7245
762c974a
JB
72462017-07-07 John Baldwin <jhb@FreeBSD.org>
7247
7248 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7249 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7250 (fbsd_get_siginfo_type): New.
7251 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7252 (_initialize_fbsd_tdep): New.
7253
33c5cd75
DB
72542017-07-06 David Blaikie <dblaikie@gmail.com>
7255
7256 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7257 a singular dwo_unit*) to support multiple CUs in the same way that
7258 multiple TUs are supported.
7259 (create_cus_hash_table): Replace create_dwo_cu with a function for
7260 parsing multiple CUs from a DWO file.
7261 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7262 create_dwo_cu.
7263 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7264 htab_find, rather than comparing the signature to a singleton CU in
7265 the dwo_file.
7266
8455d262
PA
72672017-07-06 Pedro Alves <palves@redhat.com>
7268
7269 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7270
4da3eb35
PA
72712017-07-04 Pedro Alves <palves@redhat.com>
7272
7273 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7274 * gdbtypes.h (TYPE_STATIC): Delete.
7275 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7276 is_synchronized, is_native>: Delete.
7277 <dummy>: Bump.
7278 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7279 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7280 (TYPE_FN_FIELD_ABSTRACT): Delete.
7281
5bfd255c
SM
72822017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7283
7284 * buffer.h (buffer_finish): Fix spelling mistakes.
7285
25c54127
EZ
72862017-07-01 Eli Zaretskii <eliz@gnu.org>
7287
7288 * .dir-locals.el: Automatically switch to C-style comments in
7289 versions of Emacs that support the feature.
7290
dc4bde35
SDJ
72912017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7292 Pedro Alves <palves@redhat.com>
7293
7294 PR cli/21688
7295 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7296 (process_next_line): New variable 'inline_cmd'.
7297 Adjust 'if' clauses for "python", "compile" and "guile" to use
7298 'command_name_equals' and check for '!inline_cmd'.
7299
51ed89aa
SDJ
73002017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7301
7302 PR cli/21688
7303 * cli/cli-script.c (command_name_equals_not_inline): New function.
7304 (process_next_line): Adjust 'if' clauses for "python", "compile"
7305 and "guile" to use command_name_equals_not_inline.
7306
eb17d413
PA
73072017-06-29 Pedro Alves <palves@redhat.com>
7308
7309 * completer.c (expression_completer): Call
7310 linespec_location_completer instead of location_completer.
7311
195bcdd5
PA
73122017-06-29 Pedro Alves <palves@redhat.com>
7313
7314 * completer.c (expression_completer): Remove code that recomputes
7315 'text' from 'word'.
7316
adc764e7
YQ
73172017-06-29 Yao Qi <yao.qi@linaro.org>
7318
7319 * regformats/regdat.sh: Generate code with
7320 "ifndef IN_PROCESS_AGENT".
7321
6e75794e
PA
73222017-06-28 Pedro Alves <palves@redhat.com>
7323
7324 * command.h: Include "common/scoped_restore.h".
7325
bc491f2e
YQ
73262017-06-28 Yao Qi <yao.qi@linaro.org>
7327
7328 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7329 instead of obstack_grow.
7330
41664b45
DG
73312017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7332
7333 PR gdb/21337
7334 * symfile.c (reread_symbols): Call objfiles_changed just before
7335 read_symbols.
7336
6da67eb1
PA
73372017-06-27 Pedro Alves <palves@redhat.com>
7338
7339 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7340 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7341 (completion_list_add_symbol, completion_list_add_msymbol):
7342 ... these new functions.
7343 (add_symtab_completions)
7344 (default_make_symbol_completion_list_break_on_1): Adjust.
7345
23732b1e
PA
73462017-06-27 Pedro Alves <palves@redhat.com>
7347
7348 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7349 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7350 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7351 dtor.
7352 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7353 'storage_obstack' field an auto_obstack. In-class initialize all
7354 non-bitfield fields. Make minsyms_read bool.
7355 * symfile.c (read_symbols): Adjust.
7356
a4d1e79a
AH
73572017-06-27 Alan Hayward <alan.hayward@arm.com>
7358
7359 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7360 (gdbsim_store_register): Likewise.
7361
8268c778
PA
73622017-06-27 Pedro Alves <palves@redhat.com>
7363
7364 * c-exp.y (name_obstack): Now an auto_obstack.
7365 (yylex): Use auto_obstack::clear.
7366 (c_parse): Use auto_obstack::clear instead of reinitializing and
7367 freeing the obstack.
7368 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7369 * d-exp.y (name_obstack): Now an auto_obstack.
7370 (yylex): Use auto_obstack::clear.
7371 (d_parse): Use auto_obstack::clear instead of reinitializing and
7372 freeing the obstack.
7373 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7374 auto_obstack.
7375 * dwarf2read.c (create_addrmap_from_index)
7376 (dwarf2_build_psymtabs_hard)
7377 (update_enumeration_type_from_children): Likewise.
7378 * gdb_obstack.h (auto_obstack): New type.
7379 * go-exp.y (name_obstack): Now an auto_obstack.
7380 (build_packaged_name): Use auto_obstack::clear.
7381 (go_parse): Use auto_obstack::clear instead of reinitializing and
7382 freeing the obstack.
7383 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7384 auto_obstack.
7385 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7386 * rust-exp.y (work_obstack): Now an auto_obstack.
7387 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7388 reinitializing and freeing the obstack.
7389 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7390 (host_char_to_target): Use auto_obstack.
7391 * utils.h (make_cleanup_obstack_free): Delete declaration.
7392 * valprint.c (generic_emit_char, generic_printstr): Use
7393 auto_obstack.
7394
db665f42
SM
73952017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7396
7397 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7398 thread.
7399 (darwin_init_thread_list): Don't update dummy thread.
7400 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7401
873c0814
SM
74022017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7403
7404 * record-full.c (netorder16): Remove.
7405
8b5a7a6e
SM
74062017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7407
7408 * common/diagnostics.h: Define macros for GCC.
7409 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7410 * common/vec.h: Include diagnostics.h.
7411 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7412 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7413 warning.
7414
d1435379
SM
74152017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7416
7417 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7418 New macro.
7419 * ada-lex.l: Ignore deprecated register warnings.
7420
cc75e0fd
SM
74212017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7422
7423 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7424 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7425
07809eaf
SM
74262017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7427
7428 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7429 its own line.
7430
f076f034
SM
74312017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7432
7433 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7434
0dd5cbc5
AH
74352017-06-23 Alan Hayward <alan.hayward@arm.com>
7436
7437 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7438 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7439 (xtensa_register_read_masked): Likewise.
7440
d4c6ce5b
SDJ
74412017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7442
7443 * common/environ.c (gdb_environ::unset): Update comment.
7444
16892a03
AH
74452017-06-22 Alan Hayward <alan.hayward@arm.com>
7446
7447 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7448 registers.
7449
d7dcbefc
AH
74502017-06-22 Alan Hayward <alan.hayward@arm.com>
7451
7452 * record-full.c (record_full_exec_insn): Use byte_vector.
7453
b30ff123
YQ
74542017-06-22 Yao Qi <yao.qi@linaro.org>
7455
7456 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7457 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7458
4fa847d7
AH
74592017-06-22 Alan Hayward <alan.hayward@arm.com>
7460
7461 * remote.c (cached_reg): Move from here...
7462 * regcache.h (cached_reg): ...to here.
7463 * python/py-unwind.c (struct reg_info): Remove.
7464 (cached_frame_info): Use cached_reg_t.
7465 (pyuw_prev_register): Likewise.
7466 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7467 (pyuw_dealloc_cache): Free all registers.
7468
f4906a9a
PA
74692017-06-22 Pedro Alves <palves@redhat.com>
7470 Simon Marchi <simon.marchi@ericsson.com>
7471
7472 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7473 warning.
7474 * common/diagnostics.h: New file.
7475
b45a1208
PA
74762017-06-22 Pedro Alves <palves@redhat.com>
7477
7478 * common/agent.h: Add include guards.
7479
e4da2c61
SM
74802017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7481
7482 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7483 talk about addressable units instead of bytes.
7484
96160d60
SDJ
74852017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7486
7487 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7488 of '::const_iterator'.
7489
9a6c7d9c
SDJ
74902017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7491
7492 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7493 'unittests/environ-selftests.c'.
7494 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7495 * charset.c (find_charset_names): Declare object 'iconv_env'.
7496 Update code to use 'iconv_env' object. Remove call to
7497 'free_environ'.
7498 * common/environ.c: Include <utility>.
7499 (make_environ): Delete function.
7500 (free_environ): Delete function.
7501 (gdb_environ::clear): New function.
7502 (gdb_environ::operator=): New function.
7503 (gdb_environ::get): Likewise.
7504 (environ_vector): Delete function.
7505 (set_in_environ): Delete function.
7506 (gdb_environ::set): New function.
7507 (unset_in_environ): Delete function.
7508 (gdb_environ::unset): New function.
7509 (gdb_environ::envp): Likewise.
7510 * common/environ.h: Include <vector>.
7511 (struct gdb_environ): Delete; transform into...
7512 (class gdb_environ): ... this class.
7513 (free_environ): Delete prototype.
7514 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7515 environ_vector): Likewise.
7516 * infcmd.c (run_command_1): Update code to call
7517 'envp' from 'gdb_environ' class.
7518 (environment_info): Update code to call methods from 'gdb_environ'
7519 class.
7520 (unset_environment_command): Likewise.
7521 (path_info): Likewise.
7522 (path_command): Likewise.
7523 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7524 (inferior::inferior): Initialize 'environment' using the host's
7525 information.
7526 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7527 Include "environ.h".
7528 (class inferior) <environment>: Change type from 'struct
7529 gdb_environ' to 'gdb_environ'.
7530 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7531 methods from 'gdb_environ' class.
7532 * solib.c (solib_find_1): Likewise
7533 * unittests/environ-selftests.c: New file.
7534
75c554cf
YQ
75352017-06-20 Yao Qi <yao.qi@linaro.org>
7536
7537 * features/i386/i386-linux.xml: Exchange the order of including
7538 32bit-linux.xml and 32bit-sse.xml.
7539 * features/i386/i386-linux.c: Regenerated.
7540
72ddacb7
YQ
75412017-06-20 Yao Qi <yao.qi@linaro.org>
7542
7543 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7544 Delete copy ctor and assignment operator.
7545 (tdesc_type): Likewise.
7546 (tdesc_feature): Likewise.
7547 (tdesc_free_reg): Remove.
7548 (tdesc_create_reg): Use new.
7549 (tdesc_free_type): Remove.
7550 (tdesc_create_vector): Use new.
7551 (tdesc_create_union): Likewise.
7552 (tdesc_create_flags): Likewise.
7553 (tdesc_create_enum): Likewise.
7554 (tdesc_free_feature): Delete.
7555 (free_target_description): Use delete.
7556
325c9fd4
JB
75572017-06-19 John Baldwin <jhb@FreeBSD.org>
7558
7559 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7560 registers.
7561
16b7a719
PA
75622017-06-19 Pedro Alves <palves@redhat.com>
7563
7564 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7565 after gdb::unlinker.
7566
1c8e01c9
SDJ
75672017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7568
7569 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7570 gdb_environ to access an environment variable.
7571
ffce45d2
TP
75722017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7573
7574 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7575 gdb_byte*.
7576
1d4fbac9
SM
75772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7578
7579 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7580
8465943a
SM
75812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7582
7583 * configure: Re-generate.
7584 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7585
3e019bdc
SM
75862017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7587
7588 * configure: Re-generate.
7589 * warning.m4: Pass -Werror to compiler when checking for
7590 supported warning flags.
7591
cf0dd6f0
SM
75922017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7593
7594 * Makefile.in (COMPILE.pre): Add "-x c++".
7595
6f98355c
YQ
75962017-06-16 Alan Hayward <alan.hayward@arm.com>
7597 Pedro Alves <palves@redhat.com>
7598 Yao Qi <yao.qi@linaro.org>
7599
7600 * defs.h (RequireLongest): New.
7601 (extract_integer): Declare function template.
7602 (extract_signed_integer): Remove the declaration, but define it
7603 static inline.
7604 (extract_unsigned_integer): Likewise.
7605 (store_integer): Declare function template.
7606 (store_signed_integer): Remove the declaration, but define it
7607 static inline.
7608 (store_unsigned_integer): Likewise.
7609 * findvar.c (extract_integer): New function template.
7610 (extract_signed_integer): Remove.
7611 (extract_unsigned_integer): Remove.
7612 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7613 instantiations.
7614 (store_integer): New function template.
7615 (store_signed_integer): Remove.
7616 (store_unsigned_integer): Remove.
7617 (store_integer): Explicit instantiations.
7618 * regcache.c (regcache_raw_read_signed): Update.
7619 (regcache::raw_read): New function.
7620 (regcache::raw_read_signed): Remove.
7621 (regcache::raw_read_unsigned): Remove.
7622 (regcache_raw_read_unsigned): Update.
7623 (regcache_raw_write_unsigned): Update.
7624 (regcache::raw_write_signed): Remove.
7625 (regcache::raw_write): New function.
7626 (regcache_cooked_read_signed): Update.
7627 (regcache::raw_write_unsigned): Remove.
7628 (regcache::cooked_read_signed): Remove.
7629 (regcache_cooked_read_unsigned): Update.
7630 (regcache::cooked_read_unsigned): Remove.
7631 (regcache_cooked_write_signed): Update.
7632 (regcache_cooked_write_unsigned): Update.
7633 * regcache.h (regcache) <raw_read_signed>: Remove.
7634 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7635 <raw_read, raw_write>: New.
7636 <cooked_read_signed, cooked_write_signed>: Remove.
7637 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7638 <cooked_read, cooked_write>: New.
7639 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7640 (sh64_pseudo_register_write): Update.
7641
a87dc45a
AK
76422017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7643
7644 * arc-tdep.c (arc_disassembler_options): New variable.
7645 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7646 of default_print_insn.
7647 (arc_delayed_print_insn): Set info->section when needed,
7648 use default_print_insn to retrieve a disassembler.
7649
45159d6a
SDJ
76502017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7651
7652 PR gdb/21574
7653 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7654 to mention $SHELL and startup-with-shell.
7655
b46c4cf0
MF
76562017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7657
7658 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7659
6394c606
YQ
76602017-06-14 Yao Qi <yao.qi@linaro.org>
7661
7662 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7663 default_print_insn instead of print_insn_aarch64.
7664 * arm-tdep.c (gdb_print_insn_arm): Call
7665 default_print_insn instead of print_insn_big_arm
7666 and print_insn_little_arm.
7667 * i386-tdep.c (i386_print_insn): Call default_print_insn
7668 instead of print_insn_i386.
7669 * ia64-tdep.c (ia64_print_insn): Call
7670 default_print_insn instead of print_insn_ia64.
7671 * mips-tdep.c (gdb_print_insn_mips): Call
7672 default_print_insn instead of print_insn_big_mips
7673 and print_insn_little_mips.
7674 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7675 instead of print_insn_spu.
7676
d5722aa2
PA
76772017-06-14 Pedro Alves <palves@redhat.com>
7678
7679 * ada-lang.c: Include "common/byte-vector.h".
7680 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7681 * charset.c (wchar_iterator::iterate): Resize the vector instead
7682 of reserving it.
7683 * common/byte-vector.h: Include "common/def-vector.h".
7684 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7685 * cli/cli-dump.c: Include "common/byte-vector.h".
7686 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7687 * common/byte-vector.h: New file.
7688 * common/def-vector.h: New file.
7689 * common/default-init-alloc.h: New file.
7690 * dwarf2loc.c: Include "common/byte-vector.h".
7691 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7692 instead of reserving it.
7693 * dwarf2read.c: Include "common/byte-vector.h".
7694 (data_buf::m_vec): Now a gdb::byte_vector.
7695 * gdb_regex.c: Include "common/def-vector.h".
7696 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7697 * mi/mi-main.c: Include "common/byte-vector.h".
7698 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7699 * printcmd.c: Include "common/byte-vector.h".
7700 (print_scalar_formatted): Use gdb::byte_vector.
7701 * valprint.c: Include "common/byte-vector.h".
7702 (maybe_negate_by_bytes, print_decimal_chars): Use
7703 gdb::byte_vector.
7704
01ec7a27
SM
77052017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7706
7707 * darwin-nat.c: Include "nat/fork-inferior.h".
7708
848d9074
SM
77092017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7710
7711 * configure.nat: Factor out Darwin bits that are not
7712 architecture-specific. Add fork-inferior.o.
7713
3b912944
SM
77142017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7715
7716 * configure.nat: Factor out AIX bits that are not
7717 architecture-specific. Add fork-inferior.o.
7718
55acdf22
AA
77192017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7720
7721 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7722 (read_pieced_value, write_pieced_value): ...here. Reduce to
7723 wrappers that just call rw_pieced_value.
7724
f65e2044
AA
77252017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7726
7727 * dwarf2loc.c (write_pieced_value): When writing the data for a
7728 memory piece, use write_memory_with_notification instead of
7729 write_memory.
7730
23f945bf
AA
77312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7732
7733 * valops.c (read_value_memory): Change embedded_offset to
7734 represent a bit offset instead of a byte offset.
7735 * value.h (read_value_memory): Adjust comment.
7736
f236533e
AA
77372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7738
7739 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7740 dest_offset_bits and source_offset_bits.
7741 (write_pieced_value): Likewise.
7742
65d84b76
AA
77432017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7744
7745 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7746 given by DW_OP_bit_piece.
7747 (write_pieced_value): Likewise.
7748
242d31ab
AA
77492017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7750
7751 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7752 some other preparations to the places where sufficient information
7753 is available.
7754 (write_pieced_value): Likewise.
7755
03c8af18
AA
77562017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7757
7758 * dwarf2loc.c (bits_to_bytes): New function.
7759 (read_pieced_value): Fix offset calculations for register pieces
7760 on big-endian targets.
7761 (write_pieced_value): Likewise.
7762
840989c1
AA
77632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7764
7765 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7766 (write_pieced_value): Likewise.
7767
359b19bb
AA
77682017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7769
7770 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7771 transfer the source value's least significant bits, instead of its
7772 lowest-addressed ones. Rename type_len to max_offset.
7773 (read_pieced_value): Mirror above changes to write_pieced_value as
7774 applicable.
7775
07c9ca3b
AA
77762017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7777
7778 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7779 truncate full bytes from dest_offset_bits before using it as an
7780 offset into the buffer.
7781
f1cc9874
AA
77822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7783
7784 * dwarf2loc.c (write_pieced_value): Include transfer size in
7785 byte-wise check.
7786
cdaac320
AA
77872017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7788
7789 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7790 calculation of this_size.
7791
af547a96
AA
77922017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7793
7794 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7795 when targeting a bit-field.
7796 (write_pieced_value): Likewise.
7797
ddd7882a
AA
77982017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7799
7800 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7801 (allocate_piece_closure): Drop addr_size parameter.
7802 (dwarf2_evaluate_loc_desc_full): Adjust call to
7803 allocate_piece_closure.
7804
e9352324
AA
78052017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7806
7807 PR gdb/21226
7808 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7809 the LSB end, independent of endianness.
7810
d5d1163e
AA
78112017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7812
7813 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7814 size capping.
7815
032bb6ea
YQ
78162017-06-13 Yao Qi <yao.qi@linaro.org>
7817
7818 * mips-linux-nat.c: Move include features/mips*-linux.c to
7819 mips-linux-tdep.c.
7820 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7821 to mips-linux-tdep.c.
7822 * mips-linux-tdep.c: Include features/mips*-linux.c
7823 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7824 functions.
7825 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7826 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7827 (tdesc_mips64_dsp_linux): Declare.
7828
f12f6bad
TT
78292017-06-12 Tom Tromey <tom@tromey.com>
7830
7831 * valprint.h (val_print_type_code_int): Remove.
7832 * valprint.c (generic_val_print_int): Always call
7833 val_print_scalar_formatted.
7834 (val_print_type_code_int): Remove.
7835 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7836 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7837 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7838 * ada-valprint.c (ada_val_print_num): Use
7839 val_print_scalar_formatted.
7840
d9109c80
TT
78412017-06-12 Tom Tromey <tom@tromey.com>
7842
7843 * printcmd.c (print_scalar_formatted): Unify the two switches.
7844 Don't convert scalars to LONGEST.
7845
4ac0cb1c
TT
78462017-06-12 Tom Tromey <tom@tromey.com>
7847
7848 PR exp/16225:
7849 * valprint.h (print_decimal_chars): Update.
7850 * valprint.c (maybe_negate_by_bytes): New function.
7851 (print_decimal_chars): Add "is_signed" argument.
7852 * printcmd.c (print_scalar_formatted): Update.
7853
30a25466
TT
78542017-06-12 Tom Tromey <tom@tromey.com>
7855
7856 PR exp/16225:
7857 * valprint.h (print_binary_chars, print_hex_chars): Update.
7858 * valprint.c (val_print_type_code_int): Update.
7859 (print_binary_chars): Add "zero_pad" argument.
7860 (emit_octal_digit): New function.
7861 (print_octal_chars): Don't zero-pad.
7862 (print_decimal_chars): Likewise.
7863 (print_hex_chars): Add "zero_pad" argument.
7864 * sh64-tdep.c (sh64_do_fp_register): Update.
7865 * regcache.c (regcache::dump): Update.
7866 * printcmd.c (print_scalar_formatted): Update.
7867 * infcmd.c (default_print_one_register_info): Update.
7868
b3464d03
PA
78692017-06-12 Pedro Alves <palves@redhat.com>
7870 Alan Hayward <alan.hayward@arm.com>
7871
7872 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7873 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7874 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7875 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7876 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7877
4b76cda9
PA
78782017-06-12 Pedro Alves <palves@redhat.com>
7879
7880 * dwarf2read.c (mapped_symtab::data): Now a vector of
7881 symtab_index_entry instead of vector of
7882 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7883 whether an element's name is NULL instead of checking whether the
7884 element itself is NULL.
7885 (find_slot): Change return type. Adjust.
7886 (hash_expand, , add_index_entry, uniquify_cu_indices)
7887 (write_hash_table): Adjust.
7888
e8f8bcb3
PA
78892017-06-12 Pedro Alves <palves@redhat.com>
7890
7891 * dwarf2read.c (recursively_count_psymbols): New function.
7892 (write_psymtabs_to_index): Call it to compute number of psyms and
7893 pass estimate size of psyms_seen to unordered_set's ctor.
7894
70a1152b
PA
78952017-06-12 Pedro Alves <palves@redhat.com>
7896
7897 * dwarf2read.c (write_hash_table): Check if key already exists
7898 before emplacing.
7899
c2f134ac
PA
79002017-06-12 Pedro Alves <palves@redhat.com>
7901
7902 * dwarf2read.c (data_buf::append_space): Rename to...
7903 (data_buf::grow): ... this, and make private. Adjust all callers.
7904 (data_buf::append_uint): New method.
7905 (add_address_entry, write_one_signatured_type)
7906 (write_psymtabs_to_index): Use it.
7907
a81e6d4d
PA
79082017-06-12 Pedro Alves <palves@redhat.com>
7909
7910 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7911 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7912 (data_buf::file_write): Call ::fwrite directly.
7913
6fd931f2
PA
79142017-06-12 Pedro Alves <palves@redhat.com>
7915
7916 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7917 std::vector::erase.
7918
bc8f2430
JK
79192017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7920
7921 Code cleanup: C++ify .gdb_index producer.
7922 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7923 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7924 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7925 (create_strtab, add_string): Remove.
7926 (file_write, data_buf): New.
7927 (struct symtab_index_entry): Use std::vector for cu_indices.
7928 (struct mapped_symtab): Use std::vector for data.
7929 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7930 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7931 Remove.
7932 (find_slot): Change return type. Update it to the new data structures.
7933 (hash_expand, add_index_entry): Update it to the new data structures.
7934 (offset_type_compare): Remove.
7935 (uniquify_cu_indices): Update it to the new data structures.
7936 (c_str_view, c_str_view_hasher, vector_hasher): New.
7937 (add_indices_to_cpool): Remove.
7938 (write_hash_table): Update it to the new data structures.
7939 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7940 (eq_psymtab_cu_index): Remove.
7941 (psym_index_map): New typedef.
7942 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7943 reference and std::unordered_map for cu_index_htab.
7944 (add_address_entry, add_address_entry_worker, write_address_map)
7945 (write_psymbols): Update it to the new data structures.
7946 (write_obstack): Remove.
7947 (struct signatured_type_index_data): Change types_list to a data_buf
7948 reference and psyms_seen to a std::unordered_set reference.
7949 (write_one_signatured_type, recursively_write_psymbols)
7950 (write_psymtabs_to_index): Update it to the new data structures.
7951
c4dcb155
SM
79522017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7953
7954 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7955 separate-debug-file commands.
7956 * symfile.h (separate_debug_file_debug): New global.
7957 * symfile.c (separate_debug_file_debug): New global.
7958 (separate_debug_file_exists, find_separate_debug_file): Add
7959 debug output.
7960 (_initialize_symfile): Add "set debug separate-debug-file"
7961 command.
7962 * build-id.c (build_id_to_debug_bfd,
7963 find_separate_debug_file_by_buildid): Add debug output.
7964
6d45d4b4
SM
79652017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
7966
7967 * gdbarch.sh (displaced_step_free_closure): Remove.
7968 * gdbarch.h, gdbarch.c: Re-generate.
7969 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
7970 displaced_step_free_closure.
7971 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
7972 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
7973 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7974 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
7975 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7976 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
7977 * arch-utils.h (simple_displaced_step_free_closure): Remove.
7978 * arch-utils.c (simple_displaced_step_free_closure): Remove.
7979 * infrun.c (displaced_step_clear): Call xfree instead of
7980 gdbarch_displaced_step_free_closure.
7981
2f91880f
SDJ
79822017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
7983
7984 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
7985 NULL".
7986
b8b6e72f
AH
79872017-06-08 Alan Hayward <alan.hayward@arm.com>
7988
7989 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
7990 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
7991 (mn10300_push_dummy_call): Likewise.
7992
5369082e
AH
79932017-06-08 Alan Hayward <alan.hayward@arm.com>
7994
7995 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
7996
ff4ca5ac
AH
79972017-06-08 Alan Hayward <alan.hayward@arm.com>
7998
7999 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8000
aefd8b33
SDJ
80012017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8002
8003 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8004 able to start inferiors using a shell.
8005 (New remote packets): Announce new packet "QStartupWithShell".
8006 * remote.c: Add PACKET_QStartupWithShell.
8007 (extended_remote_create_inferior): Handle new
8008 PACKET_QStartupWithShell.
8009 (remote_protocol_features) <QStartupWithShell>: New entry for
8010 PACKET_QStartupWithShell.
8011 (_initialize_remote): Call "add_packet_config_cmd" for
8012 QStartupShell.
8013
2090129c
SDJ
80142017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8015 Pedro Alves <palves@redhat.com>
8016
8017 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8018 and "nat/fork-inferior.h".
8019 * common/common-inferior.h: New file, with contents from
8020 "gdb/inferior.h".
8021 * commom/common-utils.c: Include "common-utils.h".
8022 (stringify_argv): New function.
8023 * common/common-utils.h (stringify_argv): New prototype.
8024 * configure.nat: Add "fork-inferior.o" as a dependency for
8025 "*linux*", "fbsd*" and "nbsd*" hosts.
8026 * corefile.c (get_exec_file): Update comment.
8027 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8028 instead of "startup_inferior".
8029 (darwin_create_inferior): Call "add_thread_silent" after
8030 "fork_inferior".
8031 * fork-child.c: Cleanup unnecessary includes.
8032 (SHELL_FILE): Move to "common/common-fork-child.c".
8033 (environ): Likewise.
8034 (exec_wrapper): Initialize.
8035 (get_exec_wrapper): New function.
8036 (breakup_args): Move to "common/common-fork-child.c"; rename to
8037 "breakup_args_for_exec".
8038 (escape_bang_in_quoted_argument): Move to
8039 "common/common-fork-child.c".
8040 (saved_ui): New variable.
8041 (prefork_hook): New function.
8042 (postfork_hook): Likewise.
8043 (postfork_child_hook): Likewise.
8044 (gdb_startup_inferior): Likewise.
8045 (fork_inferior): Move to "common/common-fork-child.c". Update
8046 function to support gdbserver.
8047 (startup_inferior): Likewise.
8048 * gdbcore.h (get_exec_file): Remove declaration.
8049 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8050 instead of "startup_inferior". Call "add_thread_silent" after
8051 "fork_inferior".
8052 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8053 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8054 instead of "startup_inferior". Call "add_thread_silent" after
8055 "fork_inferior".
8056 * inferior.h: Include "common-inferior.h".
8057 (trace_start_error): Move to "common/common-utils.h".
8058 (trace_start_error_with_name): Likewise.
8059 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8060 (startup_inferior): Likewise.
8061 (gdb_startup_inferior): New prototype.
8062 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8063 * nat/fork-inferior.h: New file.
8064 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8065 instead of "startup_inferior". Call "add_thread_silent" after
8066 "fork_inferior".
8067 * target.h (target_terminal_init): Move prototype to
8068 "target/target.h".
8069 (target_terminal_inferior): Likewise.
8070 (target_terminal_ours): Likewise.
8071 * target/target.h (target_terminal_init): New prototype, moved
8072 from "target.h".
8073 (target_terminal_inferior): Likewise.
8074 (target_terminal_ours): Likewise.
8075 * utils.c (gdb_flush_out_err): New function.
8076
043a4934
SDJ
80772017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8078
8079 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8080 * common/common-gdbthread.h: New file, with parts from
8081 "gdb/gdbthread.h".
8082 * gdbthread.h: Include "common-gdbthread.h".
8083 (switch_to_thread): Moved to "common/common-gdbthread.h".
8084
15652511
SDJ
80852017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8086
8087 * Makefile.in (SFILES): Add "common/job-control.c".
8088 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8089 (COMMON_OBS): Add "job-control.o".
8090 * common/job-control.c: New file, with contents from
8091 "gdb/inflow.c".
8092 * common/job-control.h: New file, with contents from "terminal.h".
8093 * fork-child.c: Include "job-control.h".
8094 * inflow.c: Include "job-control.h".
8095 (gdb_setpgid): Move to "common/common-inflow.c".
8096 (_initialize_inflow): Move setting of "job_control" to
8097 "handle_job_control".
8098 * terminal.h (job_control): Moved to "common/common-terminal.h".
8099 (gdb_setpgid): Likewise.
8100 * top.c: Include "job_control.h".
8101 * utils.c: Likewise.
8102 (job_control): Moved to "job-control.c".
8103
2d7cc5c7
PA
81042017-06-07 Pedro Alves <palves@redhat.com>
8105
8106 * Makefile.in (SFILES): Add gdb_regex.c.
8107 (COMMON_OBS): Add gdb_regex.o.
8108 * ada-lang.c (ada_add_standard_exceptions)
8109 (ada_add_exceptions_from_frame, name_matches_regex)
8110 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8111 parameter type to compiled_regex. Adjust.
8112 (ada_exceptions_list): Use compiled_regex.
8113 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8114 std::unique_ptr<compiled_regex>.
8115 (exception_catchpoint::~exception_catchpoint): Remove regfree
8116 call.
8117 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8118 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8119 * breakpoint.c (solib_catchpoint::compiled): Now a
8120 std::unique_ptr<compiled_regex>.
8121 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8122 (check_status_catch_solib): Adjust to use compiled_regex.
8123 (add_solib_catchpoint): Adjust to use compiled_regex.
8124 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8125 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8126 compiled_regex reference. Adjust to use it.
8127 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8128 declaration. Include "gdb_regex.h".
8129 (apropos_cmd): Change regex parameter to compiled_regex reference.
8130 * gdb_regex.c: New file.
8131 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8132 declarations.
8133 (class compiled_regex): New.
8134 * linux-tdep.c: Include "common/gdb_optional.h".
8135 (struct mapping_regexes): New, factored out from
8136 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8137 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8138 gdb::optional and remove cleanups. Adjust to compiled_regex.
8139 * probe.c: Include "common/gdb_optional.h".
8140 (collect_probes): Use compiled_regex and gdb::optional and remove
8141 cleanups.
8142 * skip.c: Include "common/gdb_optional.h".
8143 (skiplist_entry::compiled_function_regexp): Now a
8144 gdb::optional<compiled_regex>.
8145 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8146 (free_skiplist_entry): Remove regfree call.
8147 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8148 compiled_regex and gdb::optional.
8149 * symtab.c: Include "common/gdb_optional.h".
8150 (search_symbols): Use compiled_regex and gdb::optional.
8151 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8152 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8153 to gdb_regex.c.
8154
50d6adef
AH
81552017-06-07 Alan Hayward <alan.hayward@arm.com>
8156
8157 * regcache.c (regcache::save): Avoid buffer use.
8158 (regcache::dump): Likewise.
8159
4a8a33c8
AH
81602017-06-07 Alan Hayward <alan.hayward@arm.com>
8161
8162 * sh-tdep.c (sh_pseudo_register_read): Remove
8163 MAX_REGISTER_SIZE.
8164 (sh_pseudo_register_write): Likewise.
8165 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8166 (sh64_pseudo_register_write): Likewise
8167
d1be909e
AH
81682017-06-07 Alan Hayward <alan.hayward@arm.com>
8169
8170 * aarch64-tdep.c (aarch64_store_return_value): Use
8171 V_REGISTER_SIZE.
8172 (aarch64_pseudo_read_value): Likewise.
8173 (aarch64_pseudo_write): Likewise.
8174
f4a65042
YQ
81752017-06-06 Yao Qi <yao.qi@linaro.org>
8176
8177 * regformats/regdef.h (set_register_cache): Remove the
8178 declaration.
8179
9f7fb0aa
AH
81802017-06-06 Alan Hayward <alan.hayward@arm.com>
8181
8182 * frame.c (frame_unwind_register_signed): Use
8183 frame_unwind_register_value.
8184
e1e01040
PA
81852017-06-06 Pedro Alves <palves@redhat.com>
8186
8187 PR breakpoints/21553
8188 * breakpoint.c (create_breakpoints_sal_default)
8189 (init_breakpoint_sal, create_breakpoint_sal): Use
8190 gdb::unique_xmalloc_ptr for string parameters.
8191 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8192 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8193 (base_breakpoint_create_breakpoints_sal)
8194 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8195 (strace_marker_create_breakpoints_sal)
8196 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8197 string parameters.
8198 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8199 gdb::unique_xmalloc_ptr for string parameters.
8200 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8201 parameters.
8202
fbe654c8
AH
82032017-06-06 Alan Hayward <alan.hayward@arm.com>
8204
8205 * alpha-tdep.c (alpha_register_to_value): Use
8206 get_frame_register_value.
8207 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8208
ae0d01d6
AH
82092017-06-06 Alan Hayward <alan.hayward@arm.com>
8210
8211 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8212 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8213 (ia64_value_to_register): Likewise.
8214 (ia64_extract_return_value): Likewise.
8215 (ia64_store_return_value): Likewise.
8216 (ia64_push_dummy_call): Likewise.
8217
49cf576c
JB
82182017-06-04 Joel Brobecker <brobecker@adacore.com>
8219
8220 GDB 8.0 released.
8221
26b6a6ab
SM
82222017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8223
8224 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8225
22827c51
SM
82262017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8227
8228 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8229 parameter.
8230 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8231
0e05cf3a
SM
82322017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8233
8234 * event-loop.c (poll_timers): Unallocate timer using delete
8235 instead of xfree.
8236
c1fc2657
SM
82372017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8238
8239 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8240 (struct breakpoint) <~breakpoint>: New.
8241 (struct watchpoint): Inherit from breakpoint.
8242 <~watchpoint>: New.
8243 <base>: Remove.
8244 (struct tracepoint): Inherit from breakpoint.
8245 <base>: Remove.
8246 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8247 (struct longjmp_breakpoint): Inherit from breakpoint.
8248 <~longjmp_breakpoint>: New.
8249 <base>: Remove.
8250 (new_breakpoint_from_type): Remove casts.
8251 (watchpoint_in_thread_scope): Remove reference to base field.
8252 (watchpoint_del_at_next_stop): Likewise.
8253 (update_watchpoint): Likewise.
8254 (watchpoint_check): Likewise.
8255 (bpstat_check_watchpoint): Likewise.
8256 (set_longjmp_breakpoint): Likewise.
8257 (struct fork_catchpoint): Inherit from breakpoint.
8258 <base>: Remove.
8259 (struct solib_catchpoint): Inherit from breakpoint.
8260 <~solib_catchpoint>: New.
8261 <base>: Remove.
8262 (dtor_catch_solib): Change to ...
8263 (solib_catchpoint::~solib_catchpoint): ... this.
8264 (breakpoint_hit_catch_solib): Remove reference to base field.
8265 (add_solib_catchpoint): Likewise.
8266 (create_fork_vfork_event_catchpoint): Likewise.
8267 (struct exec_catchpoint): Inherit from breakpoint.
8268 <~exec_catchpoint>: New.
8269 <base>: Remove.
8270 (dtor_catch_exec): Change to ...
8271 (exec_catchpoint::~exec_catchpoint): ... this.
8272 (dtor_watchpoint): Change to ...
8273 (watchpoint::~watchpoint): ... this.
8274 (watch_command_1): Remove reference to base field.
8275 (catch_exec_command_1): Likewise.
8276 (base_breakpoint_dtor): Change to ...
8277 (breakpoint::~breakpoint): ... this.
8278 (base_breakpoint_ops): Remove dtor field value.
8279 (longjmp_bkpt_dtor): Change to ...
8280 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8281 (strace_marker_create_breakpoints_sal): Remove reference to base
8282 field.
8283 (delete_breakpoint): Don't manually call breakpoint destructor.
8284 (create_tracepoint_from_upload): Remove reference to base field.
8285 (trace_pass_set_count): Likewise.
8286 (initialize_breakpoint_ops): Don't initialize
8287 momentary_breakpoint_ops, don't set dtors.
8288 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8289 <~ada_catchpoint>: New.
8290 <base>: Remove.
8291 (create_excep_cond_exprs): Remove reference to base field.
8292 (dtor_exception): Change to ...
8293 (ada_catchpoint::~ada_catchpoint): ... this.
8294 (dtor_catch_exception): Remove.
8295 (dtor_catch_exception_unhandled): Remove.
8296 (dtor_catch_assert): Remove.
8297 (create_ada_exception_catchpoint): Remove reference to base
8298 field.
8299 (initialize_ada_catchpoint_ops): Don't set dtors.
8300 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8301 breakpoint.
8302 <~signal_catchpoint>: New.
8303 <base>: Remove.
8304 (signal_catchpoint_dtor): Change to ...
8305 (signal_catchpoint::~signal_catchpoint): ... this.
8306 (create_signal_catchpoint): Remove reference to base field.
8307 (initialize_signal_catchpoint_ops): Don't set dtor.
8308 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8309 from breakpoint.
8310 <~syscall_catchpoint>: New.
8311 <base>: Remove.
8312 (dtor_catch_syscall): Change to ...
8313 (syscall_catchpoint::~syscall_catchpoint): ... this.
8314 (create_syscall_event_catchpoint): Remove reference to base
8315 field.
8316 (initialize_syscall_catchpoint_ops): Don't set dtor.
8317 * break-catch-throw.c (struct exception_catchpoint): Inherit
8318 from breakpoint.
8319 <~exception_catchpoint>: New.
8320 <base>: Remove.
8321 (dtor_exception_catchpoint): Change to ...
8322 (exception_catchpoint::~exception_catchpoint): ... this.
8323 (handle_gnu_v3_exceptions): Remove reference to base field.
8324 (initialize_throw_catchpoint_ops): Don't set dtor.
8325 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8326 field.
8327 * remote.c (remote_get_tracepoint_status): Likewise.
8328 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8329 * tracefile.c (tracefile_fetch_registers): Likewise.
8330 * tracepoint.c (actions_command): Likewise.
8331 (validate_actionline): Likewise.
8332 (tfind_1): Likewise.
8333 (get_traceframe_location): Likewise.
8334 (find_matching_tracepoint_location): Likewise.
8335 (parse_tracepoint_status): Likewise.
8336 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8337
3b0871f4
SM
83382017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8339
8340 * breakpoint.c (struct longjmp_breakpoint): New struct.
8341 (is_tracepoint_type): Change return type to bool.
8342 (is_longjmp_type): New function.
8343 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8344 (set_raw_breakpoint_without_location): Use
8345 new_breakpoint_from_type.
8346 (set_raw_breakpoint): Likewise.
8347
a5e364af
SM
83482017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8349
8350 * breakpoint.c (new_breakpoint_from_type): New function.
8351 (create_breakpoint_sal): Use new_breakpoint_from_type and
8352 unique_ptr.
8353 (create_breakpoint): Likewise.
8354
ae3b3f34
SM
83552017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8356
8357 * memattr.c (mem_info_command): Rename to ...
8358 (info_mem_command): ... this.
8359 (mem_enable_command): Rename to ...
8360 (enable_mem_command): ... this.
8361 (mem_disable_command): Rename to ...
8362 (disable_mem_command): ... this.
8363 (mem_delete_command): Rename to ...
8364 (delete_mem_command): ... this.
8365 (_initialize_mem): Adjust function names.
8366
13ace077
MM
83672017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8368
8369 * btrace.c (handle_pt_insn_events): New.
8370 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8371 STATUS. Split into this and ...
8372 (handle_pt_insn_event_flags): ... this.
8373
c56ccc05
MM
83742017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8375
8376 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8377 and struct pt_insn.resynced.
8378 * configure: Regenerated.
8379 * config.in: Regenerated.
8380
08c3f6d2
TW
83812017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8382
8383 * btrace.c (ftrace_find_call_by_number): New function.
8384 (ftrace_new_function): Store objects, not pointers.
8385 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8386 ftrace_new_gap, ftrace_update_function,
8387 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8388 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8389 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8390 btrace_ends_with_single_insn, btrace_call_get): Account for
8391 btrace_thread_info::functions now storing objects.
8392 * btrace.h (struct btrace_thread_info): Add constructor.
8393 (struct btrace_thread_info) <functions>: Make std::vector.
8394 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8395 Initialize with default values.
8396 * record-btrace.c (record_btrace_frame_sniffer): Account for
8397 btrace_thread_info::functions now storing objects.
8398
8ffd39f2
TW
83992017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8400
8401 * btrace.c: Remove typedef bfun_s.
8402 (ftrace_new_gap): Directly add gaps to the list of gaps.
8403 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8404 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8405 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8406 instead of gdb VEC.
8407
4aeb0dfc
TW
84082017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8409
8410 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8411 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8412 with btrace_thread_info::next_segment and
8413 btrace_thread_info::prev_segment.
8414 * btrace.h: Remove struct btrace_func_link.
8415 (struct btrace_function): Replace pair of function segment pointers
8416 with pair of indices.
8417 * python/py-record-btrace.c (btpy_call_prev_sibling,
8418 btpy_call_next_sibling): Replace references to
8419 btrace_thread_info::segment with btrace_thread_info::next_segment and
8420 btrace_thread_info::prev_segment.
8421 * record-btrace.c (record_btrace_frame_this_id): Use
8422 btrace_find_call_by_number.
8423
eb8f2b9c
TW
84242017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8425
8426 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8427 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8428 btrace_insn_next, btrace_insn_prev): Remove references to
8429 btrace_thread_info::flow.
8430 * btrace.h (struct btrace_function): Remove FLOW.
8431
42bfe59e
TW
84322017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8433
8434 * btrace.c (ftrace_find_call_by_number): New function.
8435 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8436 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8437 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8438 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8439 index.
8440 * btrace.h (struct btrace_function): Turn UP into an index.
8441 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8442 as an index.
8443 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8444 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8445 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8446
b54b03bd
TW
84472017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8448
8449 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8450 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8451 ftrace_update_function, ftrace_compute_global_level_offset,
8452 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8453 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8454 btrace_insn_end, btrace_is_empty): Remove references to
8455 btrace_thread_info::begin and btrace_thread_info::end.
8456 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8457 (struct btrace_thread_info) <functions>: Adjust comment.
8458 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8459 btrace_thread_info::begin.
8460
8286623c
TW
84612017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8462
8463 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8464 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8465 ftrace_update_function): Remove arguments that implicitly were always
8466 BTINFO->END.
8467 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8468 Don't pass BTINFO->END.
8469
a0f1b963
TW
84702017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8471
8472 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8473 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8474 btrace_find_insn_by_number): Replace function segment pointer with
8475 index.
8476 (btrace_insn_cmp): Simplify.
8477 * btrace.h: (struct btrace_insn_iterator) Rename index to
8478 insn_index. Replace function segment pointer with index into function
8479 segment vector.
8480 * record-btrace.c (record_btrace_call_history): Replace function
8481 segment pointer use with index.
8482 (record_btrace_frame_sniffer): Retrieve function call segment through
8483 vector.
8484 (record_btrace_set_replay): Remove defunc't safety check.
8485
f158f208
TW
84862017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8487
8488 * btrace.c (btrace_ends_with_single_insn): New function.
8489 (btrace_call_get, btrace_call_number, btrace_call_begin,
8490 btrace_call_end, btrace_call_next, btrace_call_prev,
8491 btrace_find_call_by_number): Use index into call segment vector
8492 instead of pointer.
8493 (btrace_call_cmp): Simplify.
8494 * btrace.h (struct btrace_call_iterator): Replace function call segment
8495 pointer with index into vector.
8496 * record-btrace.c (record_btrace_call_history): Use index instead of
8497 pointer.
8498
521103fd
TW
84992017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8500
8501 * btrace.c (btrace_insn_begin, btrace_insn_end,
8502 btrace_find_insn_by_number): Add btinfo to iterator.
8503 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8504
17b89b34
TW
85052017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8506
8507 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8508 and save pointers directly.
8509 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8510 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8511 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8512 changed signature of functions.
8513 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8514 (btrace_fetch): Remove code that adds btrace_function pointers to
8515 vector of btrace_functions.
8516 (btrace_clear): Simplify freeing vector of btrace_functions.
8517
2b51eddc
TW
85182017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8519
8520 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8521 Replace VEC_* with std::vector functions.
8522 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8523 (struct btrace_thread_info)<functions>: Change type to std::vector.
8524
db6be0d5
SM
85252017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8526
8527 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8528 "Removed targets and native configurations" up. Merge duplicate
8529 "New commands" sub-sections. Add "New options" sub-sections.
8530
b057297a
AH
85312017-05-26 Alan Hayward <alan.hayward@arm.com>
8532
8533 * defs.h (copy_integer_to_size): New declaration.
8534 * findvar.c (copy_integer_to_size): New function.
8535 (do_cint_test): New selftest function.
8536 (copy_integer_to_size_test): Likewise.
8537 (_initialize_findvar): Likewise.
8538 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8539 (mips_fbsd_collect_reg): Use raw_collect_integer.
8540 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8541 (mips64_fill_gregset): Use raw_collect_integer
8542 (mips64_fill_fpregset): Use raw_supply_integer.
8543 * regcache.c (regcache::raw_supply_integer): New function.
8544 (regcache::raw_collect_integer): Likewise.
8545 * regcache.h: (regcache::raw_supply_integer): New declaration.
8546 (regcache::raw_collect_integer): Likewise.
8547
b77b02a5
YQ
85482017-05-24 Yao Qi <yao.qi@linaro.org>
8549
8550 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8551 (COMMON_OBS): Add gdbarch-selftests.o.
8552 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8553 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8554 * gdbarch-selftests.c: New file.
8555 * regcache.h (regcache) <~regcache>: Mark it virtual if
8556 GDB_SELF_TEST.
8557 <raw_write>: Likewise.
8558
e521e87e
YQ
85592017-05-24 Yao Qi <yao.qi@linaro.org>
8560
8561 * regcache.c (current_regcache): Change it to
8562 regcache::current_regcache.
8563 (regcache_observer_target_changed): Update.
8564 (regcache_thread_ptid_changed): Make it a regcache static
8565 method.
8566 (regcache_thread_ptid_changed): Update.
8567 (class regcache_access): New.
8568 (current_regcache_test): Update.
8569 (_initialize_regcache): Update.
8570 * regcache.h: Include forward_list.
8571 (regcache): Declare regcache_thread_ptid_changed and declare
8572 registers_changed_ptid as friend.
8573
d8e07dda
YQ
85742017-05-24 Yao Qi <yao.qi@linaro.org>
8575
8576 * i387-tdep.c (i387_register_to_value): Use register_size
8577 instead of TYPE_LENGTH.
8578 * m68k-tdep.c (m68k_register_to_value): Likewise.
8579
8c8f9122
YQ
85802017-05-24 Yao Qi <yao.qi@linaro.org>
8581
8582 * i387-tdep.c (i387_convert_register_p): Return false if type
8583 code isn't TYPE_CODE_FLT.
8584
68fce50f
YQ
85852017-05-24 Yao Qi <yao.qi@linaro.org>
8586
8587 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8588 length is 4.
8589 (alpha_register_to_value): Remove type length check.
8590 (alpha_value_to_register): Likewise.
8591
88954b49
YQ
85922017-05-24 Yao Qi <yao.qi@linaro.org>
8593
8594 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8595 TYPE_CODE_FLT.
8596
e3ec9b69
YQ
85972017-05-24 Yao Qi <yao.qi@linaro.org>
8598
8599 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8600 TYPE_CODE_FLT or not.
8601
cdd238da
YQ
86022017-05-24 Yao Qi <yao.qi@linaro.org>
8603
8604 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8605 * avr-tdep.c (avr_gdbarch_init): Likewise.
8606 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8607 * cris-tdep.c (cris_gdbarch_init): Likewise.
8608 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8609 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8610 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8611 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8612 * mep-tdep.c (mep_gdbarch_init): Likewise.
8613 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8614 * mips-tdep.c (mips_gdbarch_init): Likewise.
8615 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8616 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8617 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8618 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8619 * v850-tdep.c (v850_gdbarch_init): Likewise.
8620
7a3929c4
YQ
86212017-05-24 Yao Qi <yao.qi@linaro.org>
8622
8623 * selftest-arch.c (tests_with_arch): Call registers_changed
8624 and reinit_frame_cache.
8625 * selftest.c (run_self_tests): Likewise.
8626
f4985dba
YQ
86272017-05-24 Yao Qi <yao.qi@linaro.org>
8628
8629 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8630 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8631
ab20fa4a
YQ
86322017-05-24 Yao Qi <yao.qi@linaro.org>
8633
8634 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8635 set_gdbarch_print_insn.
8636
f532ab94
YQ
86372017-05-24 Yao Qi <yao.qi@linaro.org>
8638
8639 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8640 set_gdbarch_print_insn.
8641
39503f82
YQ
86422017-05-24 Yao Qi <yao.qi@linaro.org>
8643
8644 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8645 set_gdbarch_print_insn.
8646 * arc-tdep.c (arc_gdbarch_init): Likewise.
8647 * arch-utils.c: include dis-asm.h.
8648 (default_print_insn): New function.
8649 * arch-utils.h (default_print_insn): Declare.
8650 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8651 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8652 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8653 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8654 * frv-tdep.c (frv_gdbarch_init): Likewise.
8655 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8656 * gdbarch.sh (print_insn): Use default_print_insn.
8657 * gdbarch.c: Regenerated.
8658 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8659 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8660 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8661 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8662 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8663 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8664 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8665 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8666 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8667 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8668 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8669 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8670 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8671 * mt-tdep.c (mt_gdbarch_init): Likewise.
8672 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8673 * nios2-tdep.c (nios2_print_insn): Remove.
8674 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8675 * rx-tdep.c (rx_gdbarch_init): Likewise.
8676 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8677 * score-tdep.c (score_print_insn): Remove.
8678 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8679 * sh-tdep.c (sh_gdbarch_init): Likewise.
8680 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8681 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8682 * tic6x-tdep.c (tic6x_print_insn): Remove.
8683 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8684 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8685 * v850-tdep.c (v850_gdbarch_init): Likewise.
8686 * vax-tdep.c (vax_gdbarch_init): Likewise.
8687 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8688 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8689
f7241d4f
JB
86902017-05-23 John Baldwin <jhb@FreeBSD.org>
8691
8692 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8693 (MIPS_FP0_REGNUM): Remove.
8694 (MIPS_FSR_REGNUM): Remove.
8695 (mips_fbsd_supply_fpregs): Use mips_regnum.
8696 (mips_fbsd_supply_gregs): Likewise.
8697 (mips_fbsd_collect_fpregs): Likewise.
8698 (mips_fbsd_collect_gregs): Likewise.
8699
d489d81d
JB
87002017-05-23 John Baldwin <jhb@FreeBSD.org>
8701
8702 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8703 (getpfpregs_supplies): New function.
8704 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8705 getfpregs_supplies.
8706 (mips_fbsd_store_inferior_registers): Likewise.
8707
e11b3cdc
PA
87082017-05-22 Pedro Alves <palves@redhat.com>
8709
8710 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8711 maintainer.
8712
0f068fb5
AH
87132017-05-22 Alan Hayward <alan.hayward@arm.com>
8714
8715 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8716 (store_register): Likewise.
8717 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8718 (get_decimal_float_return_value): Likewise.
8719 (do_ppc_sysv_return_value): Likewise.
8720 (ppc64_sysv_abi_push_integer): Likewise.
8721 (ppc64_sysv_abi_push_freg): Likewise.
8722 (ppc64_sysv_abi_return_value_base): Likewise.
8723 (ppc64_sysv_abi_return_value): Likewise.
8724 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8725 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8726 * rs6000-nat.c: Likewise.
8727 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8728 (rs6000_value_to_register): Likewise.
8729 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8730
e6cf65f2
TT
87312017-05-21 Tom Tromey <tom@tromey.com>
8732
8733 PR rust/21466:
8734 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8735 arrays as "[T]", not "[T; ]".
8736
43cc5389
TT
87372017-05-19 Tom Tromey <tom@tromey.com>
8738
8739 PR rust/21484:
8740 * rust-lang.c (exp_descriptor_rust): New function.
8741 (rust_language_defn): Use it.
8742 * p-lang.c (pascal_language_defn): Update.
8743 * opencl-lang.c (opencl_language_defn): Update.
8744 * objc-lang.c (objc_language_defn): Update.
8745 * m2-lang.c (m2_language_defn): Update.
8746 * language.h (struct language_defn)
8747 <la_watch_location_expression>: New member.
8748 * language.c (unknown_language_defn, auto_language_defn)
8749 (local_language_defn): Update.
8750 * go-lang.c (go_language_defn): Update.
8751 * f-lang.c (f_language_defn): Update.
8752 * d-lang.c (d_language_defn): Update.
8753 * c-lang.h (c_watch_location_expression): Declare.
8754 * c-lang.c (c_watch_location_expression): New function.
8755 (c_language_defn, cplus_language_defn, asm_language_defn)
8756 (minimal_language_defn): Use it.
8757 * breakpoint.c (watch_command_1): Call
8758 la_watch_location_expression.
8759 * ada-lang.c (ada_language_defn): Update.
8760
7a6e7fcc
RO
87612017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8762
6e7e1744
RO
8763 PR tui/21482
8764 * gdb_curses.h (NOMACROS): Define.
8765 (NCURSES_NOMACROS): Define.
8766
87672017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8768
8769 PR tui/21482
7a6e7fcc
RO
8770 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8771 arg to char *.
8772 * tui/tui-wingeneral.c (box_win): Likewise.
8773 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8774 (tui_show_source_line): Likewise.
8775 (tui_show_exec_info_content): Likewise.
8776
1933fd8e
VM
87772017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8778
8779 * sparc-tdep.c (sparc_structure_return_p)
8780 (sparc_arg_on_registers_p): New functions.
8781 (sparc32_store_arguments): Use them.
8782 * sparc64-tdep.c (sparc64_16_byte_align_p)
8783 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8784 Handle TYPE_CODE_ARRAY.
8785
21873064
YQ
87862017-05-17 Yao Qi <yao.qi@linaro.org>
8787
8788 * cli/cli-decode.c (add_alias_cmd): New function.
8789 * command.h (add_alias_cmd): Declare.
8790 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8791 instead call add_alias_cmd.
8792
2b351b19
PA
87932017-05-17 Pedro Alves <palves@redhat.com>
8794
8795 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8796 (nat_makefile_frag): ... this. All references updated.
8797 * configure.ac: Likewise.
8798 * configure.nat: Likewise. Enhance comments.
8799 * configure: Regenerate.
8800
5f2ad7a3
RO
88012017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8802
8803 * procfs.c (procfs_create_inferior): Change prototype to match
8804 definition.
8805
adf3dde5
EZ
88062017-05-13 Eli Zaretskii <eliz@gnu.org>
8807
8808 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8809 C++ compiler warning.
8810
6830f270
TT
88112017-05-12 Tom Tromey <tom@tromey.com>
8812
8813 PR rust/21483:
8814 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8815 recurse, just call value_struct_elt directly.
8816
68f2f2e3
TT
88172017-05-12 Tom Tromey <tom@tromey.com>
8818
8819 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8820 OP_RUST_ARRAY>: Fix.
8821
256afbc2
TT
88222017-05-12 Tom Tromey <tom@tromey.com>
8823
8824 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8825
94bb8dfe
YQ
88262017-05-09 Yao Qi <yao.qi@linaro.org>
8827
8828 * regcache.c: Include <forward_list>.
8829 (struct regcache_list): Remove.
8830 (current_regcache): Update.
8831 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8832 (regcache_thread_ptid_changed): Likewise.
8833 (registers_changed_ptid): Likewise.
8834 (current_regcache_size): Likewise.
8835
8248946c
YQ
88362017-05-09 Yao Qi <yao.qi@linaro.org>
8837
8838 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8839 (current_regcache_size): New function.
8840 (current_regcache_test): New function.
8841 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8842
313c5961
AH
88432017-05-08 Alan Hayward <alan.hayward@arm.com>
8844
8845 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8846 (print_gp_register_row): Use get_frame_register_value.
8847
27bfc1d1
AH
88482017-05-08 Alan Hayward <alan.hayward@arm.com>
8849
8850 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8851 (mips_supply_fpregset): Likewise.
8852 (mips64_supply_gregset): Likewise.
8853
146e6c5c
AH
88542017-05-08 Alan Hayward <alan.hayward@arm.com>
8855
8856 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8857 regcache->raw_supply_zeroed.
8858
e50f25ec
SDJ
88592017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8860
8861 * configure.nat: Rearrange 'case' statements to match
8862 host before cpu.
8863
21ea5acd
SDJ
88642017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8865
8866 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8867 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8868 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8869 "@nat_extra_makefile_frag@".
8870 (Makefile): Remove dependency on "@frags@".
8871 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8872 (data-directory/Makefile): Likewise.
8873 * config/aarch64/linux.mh: Deleted; moved contents to
8874 "gdb/configure.nat".
8875 * config/alpha/alpha-linux.mh: Likewise.
8876 * config/alpha/nbsd.mh: Likewise.
8877 * config/arm/linux.mh: Likewise.
8878 * config/arm/nbsdelf.mh: Likewise.
8879 * config/i386/cygwin.mh: Likewise.
8880 * config/i386/cygwin64.mh: Likewise.
8881 * config/i386/darwin.mh: Likewise.
8882 * config/i386/fbsd.mh: Likewise.
8883 * config/i386/fbsd64.mh: Likewise.
8884 * config/i386/go32.mh: Likewise.
8885 * config/i386/i386gnu.mh: Likewise.
8886 * config/i386/i386sol2.mh: Likewise.
8887 * config/i386/linux.mh: Likewise.
8888 * config/i386/linux64.mh: Likewise.
8889 * config/i386/mingw.mh: Likewise.
8890 * config/i386/mingw64.mh: Likewise.
8891 * config/i386/nbsd64.mh: Likewise.
8892 * config/i386/nbsdelf.mh: Likewise.
8893 * config/i386/nto.mh: Likewise.
8894 * config/i386/obsd.mh: Likewise.
8895 * config/i386/obsd64.mh: Likewise.
8896 * config/i386/sol2-64.mh: Likewise.
8897 * config/ia64/linux.mh: Likewise.
8898 * config/m32r/linux.mh: Likewise.
8899 * config/m68k/linux.mh: Likewise.
8900 * config/m68k/nbsdelf.mh: Likewise.
8901 * config/m68k/obsd.mh: Likewise.
8902 * config/m88k/obsd.mh: Likewise.
8903 * config/mips/fbsd.mh: Likewise.
8904 * config/mips/linux.mh: Likewise.
8905 * config/mips/nbsd.mh: Likewise.
8906 * config/mips/obsd64.mh: Likewise.
8907 * config/pa/linux.mh: Likewise.
8908 * config/pa/nbsd.mh: Likewise.
8909 * config/pa/obsd.mh: Likewise.
8910 * config/powerpc/aix.mh: Likewise.
8911 * config/powerpc/fbsd.mh: Likewise.
8912 * config/powerpc/linux.mh: Likewise.
8913 * config/powerpc/nbsd.mh: Likewise.
8914 * config/powerpc/obsd.mh: Likewise.
8915 * config/powerpc/ppc64-linux.mh: Likewise.
8916 * config/powerpc/spu-linux.mh: Likewise.
8917 * config/s390/linux.mh: Likewise.
8918 * config/sh/nbsd.mh: Likewise.
8919 * config/sparc/fbsd.mh: Likewise.
8920 * config/sparc/linux.mh: Likewise.
8921 * config/sparc/linux64.mh: Likewise.
8922 * config/sparc/nbsd64.mh: Likewise.
8923 * config/sparc/nbsdelf.mh: Likewise.
8924 * config/sparc/obsd64.mh: Likewise.
8925 * config/sparc/sol2.mh: Likewise.
8926 * config/tilegx/linux.mh: Likewise.
8927 * config/vax/nbsdelf.mh: Likewise.
8928 * config/vax/obsd.mh: Likewise.
8929 * config/xtensa/linux.mh: Likewise.
8930 * config/i386/i386gnu.mn: New file, with excerpts from
8931 "config/i386/i386gnu.mh".
8932 * configure: Regenerate.
8933 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8934 *.mh files under "gdb/config".
8935 * configure.nat: New file, with contents from the
8936 "gdb/config/*/*.mh" files.
8937
7ed1acaf
TW
89382017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8939
8940 * btrace.c (btrace_clear): Free insn vector.
8941
e13cb306
PA
89422017-05-05 Pedro Alves <palves@redhat.com>
8943
8944 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8945 * configure: Regenerate.
8946
5ed8105e
PA
89472017-05-04 Pedro Alves <palves@redhat.com>
8948
8949 * Makefile.in (SFILES): Add progspace-and-thread.c.
8950 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8951 (COMMON_OBS): Add progspace-and-thread.o.
8952 * breakpoint.c: Include "progspace-and-thread.h".
8953 (update_inserted_breakpoint_locations)
8954 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8955 Use scoped_restore_current_pspace_and_thread.
8956 (create_std_terminate_master_breakpoint): Use
8957 scoped_restore_current_program_space.
8958 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8959 (print_breakpoint_location): Use
8960 scoped_restore_current_program_space.
8961 (bp_loc_is_permanent): Use
8962 scoped_restore_current_pspace_and_thread.
8963 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8964 (download_tracepoint_locations): Use
8965 scoped_restore_current_pspace_and_thread.
8966 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
8967 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
8968 (enum step_over_calls_kind): Moved from inferior.h.
8969 (class scoped_restore_current_thread): New class.
8970 * gdbthread.h (make_cleanup_restore_current_thread): Delete
8971 declaration.
8972 (scoped_restore_current_thread): New class.
8973 * infcmd.c: Include "common/gdb_optional.h".
8974 (continue_1, proceed_after_attach): Use
8975 scoped_restore_current_thread.
8976 (notice_new_inferior): Use scoped_restore_current_thread.
8977 * inferior.c: Include "progspace-and-thread.h".
8978 (restore_inferior, save_current_inferior): Delete.
8979 (add_inferior_command, clone_inferior_command): Use
8980 scoped_restore_current_pspace_and_thread.
8981 * inferior.h (scoped_restore_current_inferior): New class.
8982 * infrun.c: Include "progspace-and-thread.h" and
8983 "common/gdb_optional.h".
8984 (follow_fork_inferior): Use
8985 scoped_restore_current_pspace_and_thread.
8986 (scoped_restore_exited_inferior): New class.
8987 (handle_vfork_child_exec_or_exit): Use
8988 scoped_restore_exited_inferior,
8989 scoped_restore_current_pspace_and_thread,
8990 scoped_restore_current_thread and scoped_restore.
8991 (fetch_inferior_event): Use scoped_restore_current_thread.
8992 * linespec.c (decode_line_full, decode_line_1): Use
8993 scoped_restore_current_program_space.
8994 * mi/mi-main.c: Include "progspace-and-thread.h".
8995 (exec_continue): Use scoped_restore_current_thread.
8996 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
8997 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
8998 * proc-service.c (ps_pglobal_lookup): Use
8999 scoped_restore_current_program_space.
9000 * progspace-and-thread.c: New file.
9001 * progspace-and-thread.h: New file.
9002 * progspace.c (release_program_space, clone_program_space): Use
9003 scoped_restore_current_program_space.
9004 (restore_program_space, save_current_program_space)
9005 (save_current_space_and_thread): Delete.
9006 (switch_to_program_space_and_thread): Moved to
9007 progspace-and-thread.c.
9008 * progspace.h (save_current_program_space)
9009 (save_current_space_and_thread): Delete declarations.
9010 (scoped_restore_current_program_space): New class.
9011 * remote.c (remote_btrace_maybe_reopen): Use
9012 scoped_restore_current_thread.
9013 * symtab.c: Include "progspace-and-thread.h".
9014 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9015 * thread.c (print_thread_info_1): Use
9016 scoped_restore_current_thread.
9017 (struct current_thread_cleanup): Delete.
9018 (do_restore_current_thread_cleanup)
9019 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9020 (scoped_restore_current_thread::~scoped_restore_current_thread):
9021 ... this new dtor.
9022 (make_cleanup_restore_current_thread): Rename/convert to ...
9023 (scoped_restore_current_thread::scoped_restore_current_thread):
9024 ... this new ctor.
9025 (thread_apply_all_command): Use scoped_restore_current_thread.
9026 (thread_apply_command): Use scoped_restore_current_thread.
9027 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9028 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9029
f6223dbb
PA
90302017-05-04 Pedro Alves <palves@redhat.com>
9031
9032 * thread.c (make_cleanup_restore_current_thread): Move
9033 find_thread_ptid call before the is_stopped call. Assert that the
9034 thread is found. Replace is_stopped call by checking the thread's
9035 state directly. Remove unnecessary NULL-thread check.
9036
3c3ae77e
PA
90372017-05-04 Pedro Alves <palves@redhat.com>
9038
9039 * corelow.c (thread_section_name): New class.
9040 (get_core_register_section, get_core_siginfo): Use it.
9041
45eba0ab
AA
90422017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9043
9044 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9045 (get_core_register_section): Remove xfree of NULL pointer.
9046
f81fdd35
AH
90472017-05-03 Alan Hayward <alan.hayward@arm.com>
9048
9049 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9050 * regcache.c (regcache::raw_supply_zeroed): New function.
9051 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9052
35837774
SM
90532017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9054
9055 * gdbarch.sh: Remove commented out definition of
9056 TARGET_CHAR_BIT.
9057 * gdbarch.h: Re-generate.
9058
c94fee56
SDJ
90592017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9060
9061 * configure: Regenerate.
9062
d17f7b36
SM
90632017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9064
9065 * solib-target.c (solib_target_relocate_section_addresses):
9066 Remove num_section_bases, num_bases, segment_bases variables.
9067
b560ebd6
SM
90682017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9069
9070 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9071
f2f46dfc
SM
90722017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9073
9074 * solib-target.c: Include <vector>
9075 (struct lm_info_target) <~lm_info_target>: Remove.
9076 <segment_bases, section_bases>: Change type to
9077 std::vector<CORE_ADDR>.
9078 (library_list_start_segment, library_list_start_section,
9079 library_list_end_library,
9080 solib_target_relocate_section_addresses): Adjust.
9081
a0ff9e1a
SM
90822017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9083
9084 * gdbarch.sh (software_single_step): Change return type to
9085 std::vector<CORE_ADDR>.
9086 * gdbarch.c, gdbarch.h: Re-generate.
9087 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9088 Adjust.
9089 (arm_deal_with_atomic_sequence_raw): Adjust.
9090 (thumb_get_next_pcs_raw): Adjust.
9091 (arm_get_next_pcs_raw): Adjust.
9092 (arm_get_next_pcs): Adjust.
9093 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9094 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9095 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9096 (alpha_software_single_step): Adjust.
9097 * alpha-tdep.h (alpha_software_single_step): Adjust.
9098 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9099 * arm-tdep.c (arm_software_single_step): Adjust.
9100 (arm_breakpoint_kind_from_current_state): Adjust.
9101 * arm-tdep.h (arm_software_single_step): Adjust.
9102 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9103 * cris-tdep.c (cris_software_single_step): Adjust.
9104 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9105 (micromips_deal_with_atomic_sequence): Adjust.
9106 (deal_with_atomic_sequence): Adjust.
9107 (mips_software_single_step): Adjust.
9108 * mips-tdep.h (mips_software_single_step): Adjust.
9109 * moxie-tdep.c (moxie_software_single_step): Adjust.
9110 * nios2-tdep.c (nios2_software_single_step): Adjust.
9111 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9112 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9113 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9114 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9115 * sparc-tdep.c (sparc_software_single_step): Adjust.
9116 * spu-tdep.c (spu_software_single_step): Adjust.
9117 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9118
ea480a30
SM
91192017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9120
9121 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9122 * gdbarch.h: Re-generate.
9123
d050f7d7
TW
91242017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9125
9126 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9127 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9128 * python/py-instruction.c, python/py-instruction.h: New file.
9129 * python/py-record.c: Add py-instruction.h include.
9130 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9131 gdb.RecordInstruction.
9132 * python/python-internal.h: Add gdbpy_initialize_instruction
9133 declaration.
9134 * python/python.c (do_start_initialization): Add
9135 gdbpy_initialize_instruction.
9136
14f819c8
TW
91372017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9138
9139 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9140 Remove.
9141 (btrace_func_from_recpy_func): New function.
9142 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9143 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9144 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9145 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9146 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9147 Also, use new helper functions.
9148 (btpy_list_item): Use new helper functions.
9149 (recpy_bt_function_call_history): Use new type name.
9150 (btpy_call_getset): Remove.
9151 (gdbpy_initialize_btrace): Remove code to initialize
9152 gdb.BtraceFunctionCall.
9153 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9154 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9155 recpy_bt_func_prev, recpy_bt_func_next): New export.
9156 * python/py-record.c (recpy_func_type): New static object.
9157 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9158 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9159 recpy_func_next): New function.
9160 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9161 (recpy_func_getset): New static object.
9162 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9163 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9164
0ed5da75
TW
91652017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9166
9167 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9168 (btpy_object, btpy_insn_type, btpy_new): Remove.
9169 (btpy_list_object): Use gdb.RecordInstruction type instead of
9170 gdb.BtraceInstruction type.
9171 (btrace_insn_from_recpy_insn): New function.
9172 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9173 btpy_new.
9174 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9175 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9176 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9177 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9178 instead of btpy_object.
9179 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9180 btpy_insn_data, btpy_insn_decode): Rename to ...
9181 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9182 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9183 recpy_bt_insn_decode): This. Also, use new helper functions.
9184 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9185 recpy_insn_type.
9186 (btpy_insn_getset): Remove.
9187 (gdbpy_initialize_btrace): Remove code to initialize
9188 gdb.BtraceInstruction. Use recpy_element_object.
9189 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9190 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9191 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9192 * python/py-record.c (recpy_insn_type): New static object.
9193 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9194 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9195 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9196 New function.
9197 (recpy_insn_getset): New static object.
9198 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9199 * python/py-record.h (recpy_element_object): New typedef.
9200 (recpy_insn_type, recpy_insn_new): New export.
9201
913aeadd
TW
92022017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9203
9204 * py-record-btrace.c (btpy_insn_new): Removed.
9205 (btpy_insn_or_gap_new): New function.
9206 (btpy_insn_error): Removed.
9207 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9208 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9209 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9210 btpy_insn_or_gap_new instead of btpy_insn_new.
9211 (btpy_insn_getset): Remove btpy_insn_error.
9212 * py-record.c (recpy_gap_type): New static object.
9213 (recpy_gap_object): New typedef.
9214 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9215 recpy_gap_reason_string): New function.
9216 (recpy_gap_getset): New static object.
9217 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9218 * py-record.h (recpy_gap_new): New export.
9219
a3be24ad
TW
92202017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9221
9222 * python/py-record.c (recpy_ptid): Remove.
9223 (recpy_record_getset): Remove recpy_ptid.
9224
ae20e79a
TW
92252017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9226
9227 * btrace.c (btrace_fetch): Set inferior_ptid.
9228 * python/py-record-btrace.c: Add "py-record.h" include.
9229 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9230 recpy_bt_end, recpy_bt_instruction_history,
9231 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9232 in gdb.Record object instead of current ptid.
9233 * python/py-record.c: Include new "py-record.h" file.
9234 (recpy_record_object): Moved to py-record.h.
9235 * python/py-record.h: New file.
9236
8d0050ea
TW
92372017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9238
9239 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9240 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9241 indentation.
9242
3f380b50
JB
92432017-05-01 Joel Brobecker <brobecker@adacore.com>
9244
9245 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9246 the past maintainers section.
9247
07495424
YQ
92482017-04-28 Yao Qi <yao.qi@linaro.org>
9249
9250 * infcmd.c (get_return_value): Use regcache ctor, and remove
9251 cleanup.
9252
deb1fa3e
YQ
92532017-04-28 Yao Qi <yao.qi@linaro.org>
9254 Pedro Alves <palves@redhat.com>
9255
9256 * regcache.c (regcache::regcache): New tag dispatch ctor.
9257 (do_cooked_read): Moved above.
9258 (regcache_dup): Use the tag dispatch ctor..
9259 * regcache.h (regcache): Declare ctor, delete copy ctor and
9260 assignment operator, remove friend regcache_dup.
9261
b421c83c
YQ
92622017-04-28 Yao Qi <yao.qi@linaro.org>
9263
9264 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9265 call method save instead of regcache_cpy.
9266 * regcache.h (struct regcache): Make regcache_dup a friend.
9267
ef79d9a3
YQ
92682017-04-28 Yao Qi <yao.qi@linaro.org>
9269
9270 * regcache.c (struct regcache): Move to regcache.h
9271 (regcache::arch): New method.
9272 (regcache_get_ptid): Update.
9273 (get_regcache_arch): Call arch method.
9274 (get_regcache_aspace): Call method aspace.
9275 (register_buffer): Change it to method.
9276 (regcache_save): Change it to regcache::save.
9277 (regcache_restore): Likewise.
9278 (regcache_cpy_no_passthrough): Remove the declaration.
9279 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9280 (regcache_cpy_no_passthrough): Change it to method
9281 cpy_no_passthrough.
9282 (regcache_register_status): Change it to method
9283 get_register_status.
9284 (regcache_invalidate): Change it to method invalidate.
9285 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9286 (regcache_raw_update): Change it to method raw_update.
9287 (regcache_raw_read): Likewise.
9288 (regcache_raw_read_signed): Likewise.
9289 (regcache_raw_read_unsigned): Likewise.
9290 (regcache_raw_write_signed): Likewise.
9291 (regcache_raw_write_unsigned): Likewise.
9292 (regcache_cooked_read): Likewise.
9293 (regcache_cooked_read_value): Likewise.
9294 (regcache_cooked_read_signed): Likewise.
9295 (regcache_cooked_read_unsigned): Likewise.
9296 (regcache_cooked_write_signed): Likewise.
9297 (regcache_cooked_write_unsigned): Likewise.
9298 (regcache_raw_set_cached_value): Likewise.
9299 (regcache_raw_write): Likewise.
9300 (regcache_cooked_write): Likewise.
9301 (regcache_xfer_part): Likewise.
9302 (regcache_raw_read_part): Likewise.
9303 (regcache_raw_write_part): Likewise.
9304 (regcache_cooked_read_part): Likewise.
9305 (regcache_cooked_write_part): Likewise.
9306 (regcache_raw_supply): Likewise.
9307 (regcache_raw_collect): Likewise.
9308 (regcache_transfer_regset): Likewise.
9309 (regcache_supply_regset): Likewise.
9310 (regcache_collect_regset): Likewise.
9311 (regcache_debug_print_register): Likewise.
9312 (enum regcache_dump_what): Move it to regcache.h.
9313 (regcache_dump): Change it to method dump.
9314 * regcache.h (enum regcache_dump_what): New.
9315 (class regcache): New.
9316 * target.c (target_fetch_registers): Call method
9317 debug_print_register.
9318 (target_store_registers): Likewise.
9319
f8fdb78e
SM
93202017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9321
9322 * windows-nat.c (struct lm_info_windows): Initialize field.
9323 (windows_make_so): Allocate lm_info_windows with new.
9324 (windows_free_so): Free lm_info_windows with delete.
9325
9ccbfd7b
SM
93262017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9327
9328 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9329 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9330 cleanup.
9331 (darwin_free_so): Free lm_info_darwin with delete.
9332
76e75227
SM
93332017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9334
9335 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9336 <l_addr_p>: Change type to bool.
9337 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9338 (svr4_free_so): Free lm_info_svr4 with delete.
9339 (svr4_copy_library_list): Replace memcpy with call to copy
9340 constructor.
9341 (library_list_start_library, svr4_default_sos): Allocate
9342 lm_info_svr4 with new.
9343
51046d9e
SM
93442017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9345
9346 * solib-target.c (struct lm_info_target): Add destructor,
9347 initialize fields.
9348 <name>: Change type to std::string.
9349 (library_list_start_library): Allocate lm_info_target with new.
9350 (solib_target_free_library_list): Free lm_info_target with
9351 delete.
9352 (solib_target_current_sos): Adapt to std::string.
9353 (solib_target_free_so): Free lm_info_target with delete.
9354
4023ae76
SM
93552017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9356
9357 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9358 fields.
9359 (frv_current_sos): Allocate lm_info_frv with new.
9360 (frv_relocate_main_executable): Free lm_info_frv with delete,
9361 allocate with new.
9362 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9363
af43057b
SM
93642017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9365
9366 * solib-frv.c (struct lm_info_frv): Fix indentation.
9367
b0911207
SM
93682017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9369
9370 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9371 map field.
9372 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9373 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9374 and allocate with new.
9375 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9376
6c401f72
SM
93772017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9378
9379 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9380 <filename, member_name>: Change type to std::string.
9381 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9382 (library_list_start_library): Allocate lm_info_aix with new.
9383 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9384 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9385 with copy constructor.
9386
d0e449a1
SM
93872017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9388
9389 * solist.h (struct lm_info): Remove.
9390 (struct lm_info_base): New class.
9391 (struct so_list) <lm_info>: Change type to lm_info_base *.
9392 * nto-tdep.c (struct lm_info): Remove.
9393 (lm_addr): Adjust.
9394 * solib-aix.c (struct lm_info): Rename to ...
9395 (struct lm_info_aix): ... this. Extend lm_info_base.
9396 (lm_info_p): Rename to ...
9397 (lm_info_aix_p): ... this, and adjust.
9398 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9399 solib_aix_parse_libraries, library_list_start_library,
9400 solib_aix_free_library_list, solib_aix_parse_libraries,
9401 solib_aix_get_library_list,
9402 solib_aix_relocate_section_addresses, solib_aix_free_so,
9403 solib_aix_get_section_offsets,
9404 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9405 Adjust.
9406 (struct solib_aix_inferior_data) <library_list>: Adjust.
9407 * solib-darwin.c (struct lm_info): Rename to ...
9408 (struct lm_info_darwin): ... this. Extend lm_info_base.
9409 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9410 * solib-dsbt.c (struct lm_info): Rename to ...
9411 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9412 (struct dsbt_info) <main_executable_lm_info): Adjust.
9413 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9414 dsbt_relocate_section_addresses): Adjust.
9415 * solib-frv.c (struct lm_info): Rename to ...
9416 (struct lm_info_frv): ... this. Extend lm_info_base.
9417 (main_executable_lm_info): Adjust.
9418 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9419 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9420 find_canonical_descriptor_in_load_object,
9421 frv_fdpic_find_canonical_descriptor): Adjust.
9422 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9423 to lm_info_svr4.
9424 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9425 svr4_clear_so, svr4_copy_library_list,
9426 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9427 svr4_current_sos, svr4_fetch_objfile_link_map,
9428 solist_update_incremental): Adjust.
9429 * solib-svr4.h (struct lm_info_svr4): Move here from
9430 solib-svr4.c.
9431 * solib-target.c (struct lm_info): Rename to ...
9432 (struct lm_info_target): ... this. Extend lm_info_base.
9433 (lm_info_p): Rename to ...
9434 (lm_info_target_p): ... this.
9435 (solib_target_parse_libraries, library_list_start_segment,
9436 library_list_start_section, library_list_start_library,
9437 library_list_end_library, solib_target_free_library_list,
9438 solib_target_current_sos, solib_target_free_so,
9439 solib_target_relocate_section_addresses): Adjust.
9440 * windows-nat.c (struct lm_info): Rename to ...
9441 (struct lm_info_windows): ... this. Extend lm_info_base.
9442 (windows_make_so, handle_load_dll, handle_unload_dll,
9443 windows_xfer_shared_libraries): Adjust.
9444
434a4023
SM
94452017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9446
9447 * solib-darwin.c (struct darwin_so_list): Remove.
9448 (darwin_current_sos): Allocate an so_list object instead of a
9449 darwin_so_list, separately allocate an lm_info object.
9450 (darwin_free_so): Free lm_info.
9451
428544e8
JB
94522017-04-28 John Baldwin <jhb@FreeBSD.org>
9453
9454 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9455 with fprintf_filtered.
9456
4621115f
YQ
94572017-04-28 Yao Qi <yao.qi@linaro.org>
9458
9459 * regcache.c (regcache::regcache): New function.
9460 (regcache::~regcache): New function.
9461 (regcache_xmalloc_1): Remove.
9462 (regcache_xmalloc): Call new regcache.
9463 (regcache_xfree): Call delete regcache.
9464 (get_thread_arch_aspace_regcache): Call new regcache.
9465
339053c2
YQ
94662017-04-28 Yao Qi <yao.qi@linaro.org>
9467
9468 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9469 lwp instead of ptid_get_lwp.
9470
7974a605
YQ
94712017-04-28 Yao Qi <yao.qi@linaro.org>
9472
9473 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9474 lwp_info instead of getting from inferior_ptid.
9475
e15c3eb4
KS
94762017-04-27 Keith Seitz <keiths@redhat.com>
9477
9478 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9479 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9480 (CV_CONVERSION_BADNESS): Define.
9481 (rank_one_type): Remove overly restrictive rvalue reference
9482 rank checks.
9483 Add cv-qualifier checks and subranks for type equality.
9484 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9485 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9486 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9487
72bc1d24
SM
94882017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9489
9490 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9491 count when creating the object.
9492
55bcecda
UW
94932017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9494 Ulrich Weigand <uweigand@de.ibm.com>
9495
9496 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9497 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9498 is used in AIX.
9499 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9500 (process_xcoff_symbol): Likewise.
9501 (scan_xcoff_symtab): Likewise.
9502
5c99fcf8
AH
95032017-04-26 Alan Hayward <alan.hayward@arm.com>
9504
9505 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9506 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9507 (ia64_access_reg): Use get_frame_register_unsigned.
9508 (ia64_access_rse_reg): Likewise.
9509 (ia64_libunwind_frame_prev_register): Likewise.
9510
b41c5a85
JW
95112017-04-26 Jiong Wang <jiong.wang@arm.com>
9512
9513 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9514 * gdbarch.c: Regenerated.
9515 * gdbarch.h: Regenerated.
9516 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9517 visibility external.
9518 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9519 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9520 (enum cfa_how_kind): Move to ...
9521 (struct dwarf2_frame_state_reg_info): Likewise.
9522 (struct dwarf2_frame_state): Likewise.
9523 * dwarf2-frame.h: ... here.
9524 (dwarf2_frame_state_alloc_regs): New declaration.
9525 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9526 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9527
c185f580
AH
95282017-04-26 Alan Hayward <alan.hayward@arm.com>
9529
9530 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9531 regcache_raw_read_unsigned.
9532 (xtensa_pseudo_register_write): Likewise.
9533
19c45594
AH
95342017-04-26 Alan Hayward <alan.hayward@arm.com>
9535
9536 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9537 (nds32_pseudo_register_write): Likewise.
9538
4658f12e
YQ
95392017-04-25 Yao Qi <yao.qi@linaro.org>
9540
9541 * regcache.c (struct regcache) <readonly_p>: Change its type
9542 to bool.
9543 (regcache_xmalloc_1): Update parameter type and callers update.
9544
d581dda8
YQ
95452017-04-25 Yao Qi <yao.qi@linaro.org>
9546
9547 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9548 set_gdbarch_wchar_bit.
9549 * arm-tdep.c (arm_gdbarch_init): Likewise.
9550
debed3db
PA
95512017-04-25 Pedro Alves <palves@redhat.com>
9552
9553 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9554 (BothAreRelocatable, memcopy, memmove): Don't define.
9555 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9556 macros.
9557
b0b92aeb
PA
95582017-04-25 Pedro Alves <palves@redhat.com>
9559
9560 * common/common-defs.h: Include "common/poison.h".
9561 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9562 and adjust.
9563 * common/poison.h: New file.
9564 * common/traits.h: Include <type_traits>.
9565 (Not, Or, Requires): New, moved from common/function-view.h.
9566
16c4d54a
PA
95672017-04-25 Pedro Alves <palves@redhat.com>
9568
9569 * breakpoint.h (struct breakpoint): In-class initialize all
9570 fields. Make boolean fields "bool".
9571 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9572 memset call and initializations no longer necessary.
9573
b5c36682
PA
95742017-04-25 Pedro Alves <palves@redhat.com>
9575
9576 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9577 reference.
9578 (pt_btrace_insn): New function.
9579 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9580
5625a286
PA
95812017-04-25 Pedro Alves <palves@redhat.com>
9582
9583 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9584 "base" field and inherit from "bp_location" instead. Add
9585 non-default ctor.
9586 (allocate_location_exception): Use new non-default ctor.
9587 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9588 (init_bp_location): Convert to ...
9589 (bp_location::bp_location): ... this new ctor, and remove memset
9590 call.
9591 (base_breakpoint_allocate_location): Use the new non-default ctor.
9592 * breakpoint.h (bp_location): Now a class. Declare default and
9593 non-default ctors. In-class initialize all members.
9594 (init_bp_location): Remove declaration.
9595
23bcc18f
PA
95962017-04-25 Pedro Alves <palves@redhat.com>
9597
9598 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9599 assignment operator.
9600
e1ba3053
YQ
96012017-04-24 Yao Qi <yao.qi@linaro.org>
9602
9603 * doublest.c (convert_doublest_to_floatformat): Call
9604 floatformat_totalsize_bytes.
9605
10f489e5
TT
96062017-04-22 Tom Tromey <tom@tromey.com>
9607
9608 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9609 ui_out_emit_list.
9610 * stack.c (print_frame): Use ui_out_emit_list.
9611 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9612 ui_out_emit_list.
9613 * mi/mi-main.c (print_one_inferior)
9614 (mi_cmd_data_list_register_names)
9615 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9616 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9617 ui_out_emit_list.
9618 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9619 (mi_output_solib_attribs): Use ui_out_emit_list,
9620 ui_out_emit_tuple.
9621 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9622 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9623 (mi_cmd_stack_list_args, list_args_or_locals): Use
9624 ui_out_emit_list.
9625 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9626 * breakpoint.c (print_solib_event, output_thread_groups): Use
9627 ui_out_emit_list.
9628
0092b74d
TT
96292017-04-22 Tom Tromey <tom@tromey.com>
9630
9631 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9632 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9633 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9634
a14a62dd
TT
96352017-04-22 Tom Tromey <tom@tromey.com>
9636
9637 * tracepoint.c (tvariables_info_1)
9638 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9639
46b9c129
TT
96402017-04-22 Tom Tromey <tom@tromey.com>
9641
9642 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9643 annotate_arg_emitter.
9644 * breakpoint.c (print_mention_watchpoint)
9645 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9646 * annotate.h (struct annotate_arg_emitter): New.
9647
2e783024
TT
96482017-04-22 Tom Tromey <tom@tromey.com>
9649
9650 * record-btrace.c (record_btrace_insn_history)
9651 (record_btrace_insn_history_range, record_btrace_call_history)
9652 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9653 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9654 ui_out_emit_tuple.
9655 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9656 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9657 * skip.c (skip_info): Use ui_out_emit_tuple.
9658 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9659 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9660 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9661 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9662 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9663 ui_out_emit_tuple.
9664 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9665 (output_register, mi_cmd_data_read_memory)
9666 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9667 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9668 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9669 Use ui_out_emit_tuple.
9670 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9671 ui_out_emit_tuple.
9672 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9673 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9674 * linux-thread-db.c (info_auto_load_libthread_db): Use
9675 ui_out_emit_tuple.
9676 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9677 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9678 * disasm.c (do_mixed_source_and_assembly_deprecated)
9679 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9680 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9681 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9682 * breakpoint.c (print_one_breakpoint_location)
9683 (print_one_breakpoint): Use ui_out_emit_tuple.
9684 * auto-load.c (print_script, info_auto_load_cmd): Use
9685 ui_out_emit_tuple.
9686 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9687
9be21bb4
SM
96882017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9689
9690 * thread.c (print_thread_info_1): Remove dead code.
9691
0d4c07af
JK
96922017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9693
9694 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9695 GDB_SELF_TEST.
9696 * arm-tdep.c (selftests::arm_record_test): Likewise.
9697
4daf993d
YQ
96982017-04-21 Yao Qi <yao.qi@linaro.org>
9699
9700 * regcache.c (regcache_restore): Remove argument 2. Replace
9701 argument 3 with regcache. Get register status from
9702 src->register_status and get register contents from
9703 register_buffer (src, regnum).
9704 (regcache_cpy): Update.
9705
a6c21d4a
PA
97062017-04-19 Pedro Alves <palves@redhat.com>
9707
9708 * gdbthread.h (thread): Add missing closing parenthesis in
9709 comment.
9710
3a3fd0fd
PA
97112017-04-19 Pedro Alves <palves@redhat.com>
9712
9713 * common/refcounted-object.h: New file.
9714 * gdbthread.h: Include "common/refcounted-object.h".
9715 (thread_info): Inherit from refcounted_object and add comments.
9716 (thread_info::incref, thread_info::decref)
9717 (thread_info::m_refcount): Delete.
9718 (thread_info::deletable): Use the refcounted_object::refcount()
9719 method.
9720 * inferior.c (current_inferior_): Add comment.
9721 (set_current_inferior): Increment/decrement refcounts.
9722 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9723 not-deletable instead of comparing with the current inferior.
9724 (initialize_inferiors): Increment the initial inferior's refcount.
9725 * inferior.h (struct inferior): Forward declare.
9726 Include "common/refcounted-object.h".
9727 (current_inferior, set_current_inferior): Move declaration to
9728 before struct inferior's definition, and fix comment.
9729 (inferior): Inherit from refcounted_object. Add comments.
9730 * thread.c (switch_to_thread_no_regs): Reference the thread's
9731 inferior pointer directly instead of doing a ptid lookup.
9732 (switch_to_no_thread): New function.
9733 (switch_to_thread(thread_info *)): New function, factored out
9734 from ...
9735 (switch_to_thread(ptid_t)): ... this.
9736 (restore_current_thread): Delete.
9737 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9738 fields, and add 'inf' field.
9739 (do_restore_current_thread_cleanup): Check whether old->inf is
9740 alive instead of looking up an inferior by ptid. Use
9741 switch_to_thread and switch_to_no_thread.
9742 (restore_current_thread_cleanup_dtor): Use old->inf directly
9743 instead of lookup up an inferior by id. Decref the inferior.
9744 Don't restore 'removable'.
9745 (make_cleanup_restore_current_thread): Same the inferior pointer
9746 in old, instead of the inferior number. Incref the inferior.
9747 Don't save/clear 'removable'.
9748
9bcb1f16
PA
97492017-04-19 Pedro Alves <palves@redhat.com>
9750
9751 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9752 unittests/scoped_restore-selftests.c.
9753 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9754 * common/scoped_restore.h (scoped_restore_base): Make "class".
9755 (scoped_restore_base::release): New public method.
9756 (scoped_restore_base::scoped_restore_base): New protected ctor.
9757 (scoped_restore_base::m_saved_var): New protected field.
9758 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9759 scoped_restore_base base class instead of m_saved_var directly.
9760 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9761 (scoped_restore_tmpl::scoped_restore_tmpl(const
9762 scoped_restore_tmpl<T>&)): Likewise.
9763 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9764 method.
9765 (scoped_restore_tmpl::saved_var): New method.
9766 (scoped_restore_tmpl::m_saved_var): Delete.
9767 * inferior.h (inferior::detaching): Now a bool.
9768 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9769 cleanup.
9770 * unittests/scoped_restore-selftests.c: New file.
9771
26fcd539
PA
97722017-04-19 Pedro Alves <palves@redhat.com>
9773
9774 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9775 Re-sort in alphabetic order.
9776
fdd243b0
PA
97772017-04-18 Pedro Alves <palves@redhat.com>
9778
9779 * xml-support.c (obstack_xml_printf): Delete.
9780 * xml-support.h (obstack_xml_printf): Delete.
9781
4895cde2
PA
97822017-04-18 Pedro Alves <palves@redhat.com>
9783
9784 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9785 vdebug, verror, body_text, start_element, end_element, name,
9786 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9787 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9788 is_xinclude>: Make private and add m_ prefix.
9789 (gdb_xml_parser::body_text): New method, based on ...
9790 (gdb_xml_body_text): ... this. Adjust.
9791 (gdb_xml_parser::vdebug): New method, based on ...
9792 (gdb_xml_debug): ... this. Adjust.
9793 (gdb_xml_parser::verror): New method, based on ...
9794 (gdb_xml_error): ... this. Adjust.
9795 (gdb_xml_parser::start_element): New method, based on ...
9796 (gdb_xml_start_element): ... this. Adjust.
9797 (gdb_xml_start_element_wrapper): Defer to
9798 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9799 (gdb_xml_parser::end_element): New method, based on ...
9800 (gdb_xml_end_element_wrapper): ... this. Adjust.
9801 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9802 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9803 (gdb_xml_parser::use_dtd): New method, based on ...
9804 (gdb_xml_use_dtd): ... this. Adjust.
9805 (gdb_xml_parser::parse): New method, based on ...
9806 (gdb_xml_parse): ... this. Adjust.
9807 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9808 (xinclude_start_include): Adjust to call the parser's name method.
9809 (xml_xinclude_default, xml_xinclude_start_doctype)
9810 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9811 method.
9812 (xml_process_xincludes): Adjust to call parser methods.
9813 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9814 declarations.
9815
bd8a901f
PA
98162017-04-18 Pedro Alves <palves@redhat.com>
9817
9818 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9819 gdb::optional<std::string>.
9820 * xml-support.c: Include <string>.
9821 (scope_level::scope_level(scope_level &&))
9822 (scope_level::~scope_level): Delete.
9823 (scope_level::body): Now a std::string.
9824 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9825 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9826 parameter.
9827 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9828 (xinclude_parsing_data::output): Now a std::string reference.
9829 (xinclude_start_include): Adjust.
9830 (xml_xinclude_default): Adjust.
9831 (xml_process_xincludes): Add 'output' parameter, and return bool.
9832 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9833 and return bool.
9834 * xml-tdesc.c: Include <unordered_map> and <string>.
9835 (tdesc_xml_cache): Delete.
9836 (tdesc_xml_cache_s): Delete.
9837 (xml_cache): Now an std::unordered_map.
9838 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9839 (target_fetch_description_xml): Change return type to
9840 gdb::optional<std::string>, and adjust.
9841 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9842 (target_fetch_description_xml): Change return type to
9843 gdb::optional<std::string>.
9844
d35d1958
PA
98452017-04-18 Pedro Alves <palves@redhat.com>
9846
9847 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9848 unittests/optional-selftests.c.
9849 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9850 * unittests/optional-selftests.c: New file.
9851 * unittests/optional/assignment/1.cc: New file.
9852 * unittests/optional/assignment/2.cc: New file.
9853 * unittests/optional/assignment/3.cc: New file.
9854 * unittests/optional/assignment/4.cc: New file.
9855 * unittests/optional/assignment/5.cc: New file.
9856 * unittests/optional/assignment/6.cc: New file.
9857 * unittests/optional/assignment/7.cc: New file.
9858 * unittests/optional/cons/copy.cc: New file.
9859 * unittests/optional/cons/default.cc: New file.
9860 * unittests/optional/cons/move.cc: New file.
9861 * unittests/optional/cons/value.cc: New file.
9862 * unittests/optional/in_place.cc: New file.
9863 * unittests/optional/observers/1.cc: New file.
9864 * unittests/optional/observers/2.cc: New file.
9865
22796e97
PA
98662017-04-18 Pedro Alves <palves@redhat.com>
9867
9868 * common/gdb_optional.h: Include common/traits.h.
9869 (in_place_t): New type.
9870 (in_place): New constexpr variable.
9871 (optional::optional): Remove member initialization of
9872 m_instantiated.
9873 (optional::optional(in_place_t...)): New constructor.
9874 (optional::~optional): Use reset.
9875 (optional::optional(const optional&)): New.
9876 (optional::optional(const optional&&)): New.
9877 (optional::optional(T &)): New.
9878 (optional::optional(T &&)): New.
9879 (operator::operator=(const optional &)): New.
9880 (operator::operator=(optional &&)): New.
9881 (operator::operator= (const T &))
9882 (operator::operator= (T &&))
9883 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9884 (operator::reset): New.
9885 (operator::m_instantiated):: Add in-class initializer.
9886 * common/traits.h: Include <type_traits>.
9887 (struct And): New types.
9888
a7fc9b61
PA
98892017-04-18 Pedro Alves <palves@redhat.com>
9890
9891 * xml-support.c: Include <vector>.
9892 (scope_level::scope_level(const gdb_xml_element *))
9893 (scope_level::scope_level(scope_level&&)): New.
9894 (scope_level::~scope_level): New.
9895 (scope_level_s): Delete.
9896 (gdb_xml_parser::scopes): Now a std::vector.
9897 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9898 Use std::vector.
9899 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9900 scope cleanup code.
9901 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9902 of the scopes member. Use std::vector::emplace_back.
9903
010151c9
PA
99042017-04-18 Pedro Alves <palves@redhat.com>
9905
9906 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9907 a bool.
9908 (gdb_xml_end_element): Change type of first parameter.
9909 (gdb_xml_cleanup): Rename to ...
9910 (gdb_xml_parser::~gdb_xml_parser): ... this.
9911 (gdb_xml_create_parser_and_cleanup): Delete with ...
9912 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9913 to this new ctor.
9914 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9915 using gdb_xml_create_parser_and_cleanup.
9916 (xinclude_parsing_data): Add ctor/dtor.
9917 (xml_xinclude_cleanup): Delete.
9918 (xml_process_xincludes): Create a local xinclude_parsing_data
9919 instead of heap-allocating one. Create a local gdb_xml_parser
9920 instead of heap-allocating one with
9921 gdb_xml_create_parser_and_cleanup.
9922
d56060f0
JB
99232017-04-18 John Baldwin <jhb@FreeBSD.org>
9924
9925 PR threads/20743
9926 * fbsd-nat.c (resume_one_thread_cb): Remove.
9927 (resume_all_threads_cb): Remove.
9928 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9929 iterate_over_threads.
9930
305d16a9
JB
99312017-04-17 Joel Brobecker <brobecker@adacore.com>
9932
9933 * NEWS: Create a new section for the next release branch.
9934 Rename the section of the current branch, now that it has
9935 been cut.
9936
8bb57231
JB
99372017-04-17 Joel Brobecker <brobecker@adacore.com>
9938
9939 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9940 * version.in: Bump version to 8.0.50.DATE-git.
9941
096c92dd
SDJ
99422017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9943
9944 PR gdb/21385
9945 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9946 independently of the host, and fix build breakage on Cygwin.
9947
0550c955
PA
99482017-04-13 Pedro Alves <palves@redhat.com>
9949
9950 * inferior.c (free_inferior): Convert to ...
9951 (inferior::~inferior): ... this dtor.
9952 (inferior::inferior): New ctor, factored out from ...
9953 (add_inferior_silent): ... here. Allocate the inferior with a new
9954 expression.
9955 (delete_inferior): Call delete instead of free_inferior.
9956 * inferior.h (gdb_environ, continuation): Forward declare.
9957 (inferior): Now a class. Add in-class initialization to all
9958 members. Make boolean fields bool, except 'detaching'.
9959 (inferior::inferior): New explicit ctor.
9960 (inferior::~inferior): New.
9961
e3d60dfc
PA
99622017-04-13 Pedro Alves <palves@redhat.com>
9963
9964 * inferior.c (init_inferior_list): Delete.
9965 * inferior.h (init_inferior_list): Delete.
9966
5fd69d0a
PA
99672017-04-13 Pedro Alves <palves@redhat.com>
9968
9969 PR threads/13217
9970 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
9971 (top level): Call it twice, with different thread sets.
9972
c6609450
PA
99732017-04-13 Pedro Alves <palves@redhat.com>
9974
9975 * thread.c: Include <algorithm>.
9976 (thread_array_cleanup): Delete.
9977 (scoped_inc_dec_ref): New class.
9978 (live_threads_count): New function.
9979 (set_thread_refcount): Delete.
9980 (tp_array_compar_ascending): Now a bool.
9981 (tp_array_compar): Convert to a std::sort comparison function.
9982 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
9983 and live_threads_count.
9984
2a00d7ce
PA
99852017-04-13 Pedro Alves <palves@redhat.com>
9986
9987 * infrun.c (follow_fork_inferior): Also switch the current
9988 inferior.
9989
441d7c93
PA
99902017-04-13 Pedro Alves <palves@redhat.com>
9991
9992 * breakpoint.c (watch_command_1): Save watchpoint-frame info
9993 before calling create_internal_breakpoint.
9994
808480f6
PA
99952017-04-13 Pedro Alves <palves@redhat.com>
9996
9997 * fork-child.c (execv_argv): New class.
9998 (breakup_args): Refactored as ...
9999 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10000 Copy arguments to storage and replace separators with NULL
10001 terminators in place.
10002 (escape_bang_in_quoted_argument): Adjust to return bool.
10003 (execv_argv::execv_argv): New ctor.
10004 (execv_argv::init_for_shell): New method, factored out from
10005 fork_inferior. Don't strdup strings into the vector.
10006 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10007 Remove free_vector_argv call.
10008
ad3d022a
YQ
100092017-04-13 Yao Qi <yao.qi@linaro.org>
10010
10011 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10012 tdep->rx_psw_type.
10013
e6ddc3bf
YQ
100142017-04-13 Yao Qi <yao.qi@linaro.org>
10015
10016 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10017 * rx-tdep.c (rx_gdbarch_init): Likewise.
10018
bfb8cf90
PA
100192017-04-13 Pedro Alves <palves@redhat.com>
10020
10021 * breakpoint.h (struct breakpoint): Reindent.
10022
f5336ca5
PA
100232017-04-13 Pedro Alves <palves@redhat.com>
10024
10025 * breakpoint.c (bp_location): Rename to ...
10026 (bp_locations): ... this. All references updated.
10027 (bp_location_count): Rename to ...
10028 (bp_locations_count): ... this. All references updated.
10029 (bp_location_placed_address_before_address_max): Rename to ...
10030 (bp_locations_placed_address_before_address_max): ... this. All
10031 references updated.
10032 (bp_location_shadow_len_after_address_max): Rename to ...
10033 (bp_locations_shadow_len_after_address_max): ... this. All
10034 references updated.
10035 (bp_location_compare_addrs): Rename to ...
10036 (bp_locations_compare_addrs): ... this. All references updated.
10037 (bp_location_compare):Rename to ...
10038 (bp_locations_compare): ... this. All references updated.
10039 (bp_location_target_extensions_update): Rename to ...
10040 (bp_locations_target_extensions_update): ... this. All references
10041 updated.
10042
be628ab8
SDJ
100432017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10044
10045 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10046 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10047 'sgtty.h'.
10048 * common/gdb_termios.h: New file, with parts of "terminal.h".
10049 * inflow.c: Include "gdb_termios.h".
10050 * ser-unix.c: Include "gdb_termios.h".
10051 * terminal.h: Move terminal-related defines to
10052 "common/gdb_termios.h".
10053
8e9e35b1
TT
100542017-04-12 Tom Tromey <tom@tromey.com>
10055
10056 * probe.c (parse_probes): Update.
10057 * location.h (delete_event_location): Don't declare.
10058 (event_location_deleter::operator()): Update.
10059 * location.c (event_location_deleter::operator()): Rename from
10060 delete_event_location.
10061 * linespec.h (linespec_result) <location>: Change type to
10062 event_location_up.
10063 * linespec.c (canonicalize_linespec, event_location_to_sals)
10064 (decode_objc): Update.
10065 (linespec_result): Don't call delete_event_location.
10066 * breakpoint.c (create_breakpoints_sal)
10067 (bkpt_probe_create_sals_from_location)
10068 (strace_marker_create_sals_from_location): Update.
10069
16e802b9
TT
100702017-04-12 Tom Tromey <tom@tromey.com>
10071
10072 * linespec.h (struct linespec_result): Add constructor and
10073 destructor.
10074 (init_linespec_result, destroy_linespec_result)
10075 (make_cleanup_destroy_linespec_result): Don't declare.
10076 * linespec.c (init_linespec_result): Remove.
10077 (linespec_result::~linespec_result): Rename from
10078 destroy_linespec_result. Update.
10079 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10080 Remove.
10081 * breakpoint.c (create_breakpoint, break_range_command)
10082 (decode_location_default): Update.
10083 * ax-gdb.c (agent_command_1): Update.
10084
d28cd78a
TT
100852017-04-12 Tom Tromey <tom@tromey.com>
10086
10087 * remote.c (remote_download_tracepoint): Update.
10088 * python/py-breakpoint.c (bppy_get_location): Update.
10089 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10090 (gdbscm_breakpoint_location): Update.
10091 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10092 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10093 Change type to event_location_up.
10094 * breakpoint.c (create_overlay_event_breakpoint)
10095 (create_longjmp_master_breakpoint)
10096 (create_std_terminate_master_breakpoint)
10097 (create_exception_master_breakpoint)
10098 (breakpoint_event_location_empty_p, print_breakpoint_location)
10099 (print_one_breakpoint_location, create_thread_event_breakpoint)
10100 (init_breakpoint_sal, create_breakpoint)
10101 (print_recreate_ranged_breakpoint, break_range_command)
10102 (init_ada_exception_breakpoint, say_where): Update.
10103 (base_breakpoint_dtor): Don't call delete_event_location.
10104 (bkpt_print_recreate, tracepoint_print_recreate)
10105 (dprintf_print_recreate, update_static_tracepoint)
10106 (breakpoint_re_set_default): Update.
10107
711799d5
TT
101082017-04-12 Tom Tromey <tom@tromey.com>
10109
10110 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10111 type of "to_do". Update.
10112 (compute_stack_depth): Use std::vector.
10113
52d214d3
TT
101142017-04-12 Tom Tromey <tom@tromey.com>
10115
10116 * printcmd.c (find_instruction_backward): Use std::vector.
10117
4c404b8b
TT
101182017-04-12 Tom Tromey <tom@tromey.com>
10119
10120 * symfile.c (objfilep): Remove typedef.
10121 (reread_symbols): Use a std::vector.
10122
156d9eab
TT
101232017-04-12 Tom Tromey <tom@tromey.com>
10124
10125 * mi/mi-main.c (exec_direction_forward): Remove.
10126 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10127 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10128 scoped_restore.
10129 * guile/guile.c (guile_repl_command, guile_command)
10130 (gdbscm_execute_gdb_command): Use scoped_restore.
10131 * go-exp.y (go_parse): Use scoped_restore.
10132 * d-exp.y (d_parse): Use scoped_restore.
10133 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10134 * c-exp.y (c_parse): Use scoped_restore.
10135
4d89769a
TT
101362017-04-12 Tom Tromey <tom@tromey.com>
10137
10138 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10139 (mi_parse): Update return type.
10140 (mi_parse_free): Remove.
10141 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10142 (mi_parse::~mi_parse): Rename from mi_parse_free.
10143 (mi_parse_cleanup): Remove.
10144 (mi_parse): Return a unique_ptr. Use new.
10145 * mi/mi-main.c (mi_execute_command): Update.
10146
4b217cc7
TT
101472017-04-12 Tom Tromey <tom@tromey.com>
10148
10149 * location.c (explicit_location_lex_one): Return a
10150 unique_xmalloc_ptr.
10151 (string_to_explicit_location): Update. Remove cleanups.
10152
59d3651b
TT
101532017-04-12 Tom Tromey <tom@tromey.com>
10154
10155 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10156 (compare_value_and_voffset): Change type. Update.
10157 (compute_vtable_size): Change type of "offset_vec".
10158 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10159 (gnuv3_get_typeid): Remove extraneous declaration.
10160
b24b0d6c
TT
101612017-04-12 Tom Tromey <tom@tromey.com>
10162
10163 * charset.h (wchar_iterator): Fix comment.
10164
80a3b8c5
TT
101652017-04-12 Tom Tromey <tom@tromey.com>
10166
10167 * charset.c (iconv_wrapper): New class.
10168 (cleanup_iconv): Remove.
10169 (convert_between_encodings): Use it.
10170
c83dd867
TT
101712017-04-12 Tom Tromey <tom@tromey.com>
10172
10173 * symfile.h (increment_reading_symtab): Update type.
10174 * symfile.c (decrement_reading_symtab): Remove.
10175 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10176 * psymtab.c (psymtab_to_symtab): Update.
10177 * dwarf2read.c (dw2_instantiate_symtab): Update.
10178
0e8621a0
TT
101792017-04-12 Tom Tromey <tom@tromey.com>
10180
10181 * jit.c (struct jit_reader): Declare separately. Add constructor
10182 and destructor. Change type of "handle".
10183 (loaded_jit_reader): Define separately.
10184 (jit_reader_load): Update. New "new".
10185 (jit_reader_unload_command): Use "delete".
10186 * gdb-dlfcn.h (struct dlclose_deleter): New.
10187 (gdb_dlhandle_up): New typedef.
10188 (gdb_dlopen, gdb_dlsym): Update types.
10189 (gdb_dlclose): Remove.
10190 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10191 (gdb_dlsym): Change type of "handle".
10192 (make_cleanup_dlclose): Remove.
10193 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10194 * compile/compile-c-support.c (load_libcc): Update.
10195
67d89901
TT
101962017-04-12 Tom Tromey <tom@tromey.com>
10197
10198 * symtab.h (find_pcs_for_symtab_line): Change return type.
10199 * symtab.c (find_pcs_for_symtab_line): Change return type.
10200 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10201 type of "vec". Update.
10202 (ltpy_get_pcs_for_line): Update.
10203 * linespec.c (decode_digits_ordinary): Update.
10204
93921405
TT
102052017-04-12 Tom Tromey <tom@tromey.com>
10206
10207 * tracepoint.c (actions_command): Update.
10208 * python/python.c (python_command, python_interactive_command):
10209 Update.
10210 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10211 * guile/guile.c (guile_command): Update.
10212 * defs.h (read_command_lines, read_command_lines_1): Return
10213 command_line_up.
10214 (command_lines_deleter): New struct.
10215 (command_line_up): New typedef.
10216 * compile/compile.c (compile_code_command)
10217 (compile_print_command): Update.
10218 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10219 command_line_up.
10220 (make_cleanup_free_command_lines): Remove.
10221 * cli/cli-script.c (get_command_line, read_command_lines_1)
10222 (copy_command_lines): Return command_line_up.
10223 (while_command, if_command, read_command_lines, define_command)
10224 (document_command): Update.
10225 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10226 Remove.
10227 * breakpoint.h (breakpoint_set_commands): Change type of
10228 "commands".
10229 * breakpoint.c (breakpoint_set_commands): Change type of
10230 "commands". Update.
10231 (do_map_commands_command, update_dprintf_command_list)
10232 (create_tracepoint_from_upload): Update.
10233
ffc2605c
TT
102342017-04-12 Tom Tromey <tom@tromey.com>
10235
10236 * tracepoint.c (scope_info): Update.
10237 * spu-tdep.c (spu_catch_start): Update.
10238 * python/python.c (gdbpy_decode_line): Update.
10239 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10240 * python/py-breakpoint.c (bppy_init): Update.
10241 * probe.c (parse_probes): Update.
10242 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10243 * location.h (event_location_deleter): New struct.
10244 (event_location_up): New typedef.
10245 (new_linespec_location, new_address_location, new_probe_location)
10246 (new_explicit_location, copy_event_location)
10247 (string_to_event_location, string_to_event_location_basic)
10248 (string_to_explicit_location): Update return type.
10249 (make_cleanup_delete_event_location): Remove.
10250 * location.c (new_linespec_location, new_address_location)
10251 (new_probe_location, new_explicit_location, copy_event_location):
10252 Return event_location_up.
10253 (delete_event_location_cleanup)
10254 (make_cleanup_delete_event_location): Remove.
10255 (string_to_explicit_location, string_to_event_location_basic)
10256 (string_to_event_location): Return event_location_up.
10257 * linespec.c (canonicalize_linespec, event_location_to_sals)
10258 (decode_line_with_current_source)
10259 (decode_line_with_last_displayed, decode_objc): Update.
10260 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10261 * completer.c (location_completer): Update.
10262 * cli/cli-cmds.c (edit_command, list_command): Update.
10263 * breakpoint.c (create_overlay_event_breakpoint)
10264 (create_longjmp_master_breakpoint)
10265 (create_std_terminate_master_breakpoint)
10266 (create_exception_master_breakpoint)
10267 (create_thread_event_breakpoint): Update.
10268 (init_breakpoint_sal): Update. Remove some dead code.
10269 (create_breakpoint_sal): Change type of "location". Update.
10270 (create_breakpoints_sal, create_breakpoint, break_command_1)
10271 (dprintf_command, break_range_command, until_break_command)
10272 (init_ada_exception_breakpoint)
10273 (strace_marker_create_sals_from_location)
10274 (update_static_tracepoint, trace_command, ftrace_command)
10275 (strace_command, create_tracepoint_from_upload): Update.
10276 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10277 * ax-gdb.c (agent_command_1): Update.
10278
8f10c932
PA
102792017-04-12 Pedro Alves <palves@redhat.com>
10280
10281 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10282 * configure.tgt: Handle i[34567]86-*-go32* and
10283 i[34567]86-*-msdosdjgpp*.
10284 * i386-tdep.c (i386_svr4_reg_to_regnum):
10285 Make extern.
10286 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10287 i386-go32-tdep.c.
10288 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10289 * i386-go32-tdep.c: New file.
10290 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10291 declarations.
10292
0a31ccfb
SM
102932017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10294
10295 * aix-thread.c (pd_status2str): Change return type to const char *.
10296
e9bb3fbb
PA
102972017-04-12 Pedro Alves <palves@redhat.com>
10298
10299 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10300 calls to set_gdbarch_gnu_triplet_regexp.
10301
53375380
PA
103022017-04-12 Pedro Alves <palves@redhat.com>
10303
10304 PR gdb/21323
10305 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10306 New enum value.
10307 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10308 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10309 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10310 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10311 * gdbarch.h, gdbarch.c: Regenerate.
10312 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10313 gdbarch_wchar_bit and gdbarch_wchar_signed.
10314 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10315 * arm-tdep.c (arm_gdbarch_init): Likewise.
10316 * avr-tdep.c (avr_gdbarch_init): Likewise.
10317 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10318 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10319 * i386-tdep.c (i386_go32_init_abi): Likewise.
10320 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10321 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10322 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10323 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10324 * sh-tdep.c (sh_gdbarch_init): Likewise.
10325 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10326 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10327 * windows-tdep.c (windows_init_abi): Likewise.
10328 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10329
53e710ac
PA
103302017-04-12 Pedro Alves <palves@redhat.com>
10331
10332 PR c++/21323
10333 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10334 cplus_primitive_type_char32_t>: New enum values.
10335 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10336 and cplus_primitive_type_char32_t.
10337 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10338 32, use the archtecture's built-in type for char16_t and char32_t,
10339 respectively. Otherwise, fallback to init_integer_type as before,
10340 but make the type unsigned, and issue a complaint.
10341 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10342
ab0538b8
AH
103432017-04-12 Alan Hayward <alan.hayward@arm.com>
10344
5e0e0422 10345 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
10346 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10347
5430098f
SDJ
103482017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10349
10350 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10351 'const char *'.
10352
7c5ded6a
SDJ
103532017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10354
10355 * common/common-utils.c (free_vector_argv): New function.
10356 * common/common-utils.h: Include <vector>.
10357 (free_vector_argv): New prototype.
10358 * darwin-nat.c (darwin_create_inferior): Rewrite function
10359 prototype in order to constify "exec_file" and accept a
10360 "std::string" for "allargs".
10361 * fork-child.c: Include <vector>.
10362 (breakup_args): Rewrite function, using C++.
10363 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10364 and accept "std::string" for "allargs". Update the code to
10365 calculate "argv" based on "allargs". Update calls to "exec_fun"
10366 and "execvp".
10367 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10368 order to constify "exec_file" and accept a "std::string" for
10369 "allargs".
10370 * go32-nat.c (go32_create_inferior): Likewise.
10371 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10372 * infcmd.c (run_command_1): Constify "exec_file". Use
10373 "std::string" for inferior arguments.
10374 * inferior.h (fork_inferior): Update prototype.
10375 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10376 prototype in order to constify "exec_file" and accept a
10377 "std::string" for "allargs".
10378 * nto-procfs.c (procfs_create_inferior): Likewise.
10379 * procfs.c (procfs_create_inferior): Likewise.
10380 * remote-sim.c (gdbsim_create_inferior): Likewise.
10381 * remote.c (extended_remote_run): Update code to accept
10382 "std::string" as argument.
10383 (extended_remote_create_inferior): Rewrite function prototype in
10384 order to constify "exec_file" and accept a "std::string" for
10385 "allargs".
10386 * rs6000-nat.c (super_create_inferior): Likewise.
10387 (rs6000_create_inferior): Likewise.
10388 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10389 * windows-nat.c (windows_create_inferior): Likewise.
10390
ae0eee42
PA
103912017-04-11 Pedro Alves <palves@redhat.com>
10392
10393 * thread.c: Fix whitespace throughout.
10394
a6acac06
PR
103952017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10396
10397 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10398
64403bd1
AH
103992017-04-11 Alan Hayward <alan.hayward@arm.com>
10400
10401 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10402
a5bef50f
SDJ
104032017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10404
10405 PR gdb/21364
10406 * osdata.c (info_osdata): Check if 'type' is an empty string
10407 instead of NULL.
10408
9295a5a9
PA
104092017-04-10 Pedro Alves <palves@redhat.com>
10410
10411 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10412 (ptid_to_global_thread_id, in_thread_list)
10413 (do_captured_list_thread_ids, set_resumed, set_running)
10414 (set_executing, set_stop_requested, finish_thread_state)
10415 (validate_registers_access, can_access_registers_ptid)
10416 (print_thread_info_1, switch_to_thread)
10417 (do_restore_current_thread_cleanup)
10418 (make_cleanup_restore_current_thread, thread_command)
10419 (thread_name_command): Use operator== instead of ptid_equal.
10420
996812e3
PA
104212017-04-10 Pedro Alves <palves@redhat.com>
10422
10423 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10424 (current_thread_cleanup_chain): Delete.
10425 (restore_current_thread_cleanup_dtor)
10426 (make_cleanup_restore_current_thread): Remove references to
10427 current_thread_cleanup_chain.
10428
845b344f
AH
104292017-04-10 Alan Hayward <alan.hayward@arm.com>
10430
10431 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10432 REG_UNKNOWN.
10433
803bdfe4
YQ
104342017-04-10 Yao Qi <yao.qi@linaro.org>
10435
10436 PR gdb/19942
10437 * gdbthread.h (thread_info::deletable): New method.
10438 (thread_info::incref): New method.
10439 (thread_info::decref): New method.
10440 (thread_info::refcount): Move it to private.
10441 * infrun.c (save_stop_context): Call inc_refcount.
10442 (release_stop_context_cleanup): Likewise.
10443 * thread.c (set_thread_exited): New function.
10444 (init_thread_list): Delete "tp" only it is deletable, otherwise
10445 call set_thread_exited.
10446 (delete_thread_1): Call set_thread_exited.
10447 (current_thread_cleanup) <inferior_pid>: Remove.
10448 <thread>: New field.
10449 (restore_current_thread_ptid_changed): Removed.
10450 (do_restore_current_thread_cleanup): Adjust.
10451 (restore_current_thread_cleanup_dtor): Don't call
10452 find_thread_ptid.
10453 (set_thread_refcount): Use dec_refcount.
10454 (make_cleanup_restore_current_thread): Adjust.
10455 (thread_apply_all_command): Call inc_refcount.
10456 (_initialize_thread): Don't call
10457 observer_attach_thread_ptid_changed.
10458
8c25b497
YQ
104592017-04-10 Yao Qi <yao.qi@linaro.org>
10460
10461 * thread.c (delete_thread_1): Hoist code on marking thread as
10462 exited.
10463
8473b447
SM
104642017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10465
10466 * windows-nat.c (windows_detach): Initialize ptid with
10467 minus_one_ptid.
10468
6670ec13
SM
104692017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10470
10471 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10472
ba2f91bb
AH
104732017-04-07 Alan Hayward <alan.hayward@arm.com>
10474
10475 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10476 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10477 (bfin_pseudo_register_write): Likewise
10478
436252de
SM
104792017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10480
10481 * common/ptid.h (struct ptid): Change to...
10482 (class ptid_t): ... this.
10483 <ptid_t>: New constructors.
10484 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10485 matches>: New methods.
10486 <make_null, make_minus_one>: New static methods.
10487 <pid>: Rename to...
10488 <m_pid>: ...this.
10489 <lwp>: Rename to...
10490 <m_lwp>: ...this.
10491 <tid>: Rename to...
10492 <m_tid>: ...this.
10493 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10494 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10495 as references, move comment to class ptid_t.
10496 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10497 ptid_t static methods.
10498 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10499 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10500 Take ptid arguments as references, implement using ptid_t methods.
10501 * unittests/ptid-selftests.c: New file.
10502 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10503 unittests/ptid-selftests.c.
10504 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10505
0dedf377
TP
105062017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10507
10508 * python/python.c (python_run_simple_file): Cast mode literal to
10509 non-const char pointer as expected by PyFile_FromString.
10510
4e9868d4
SM
105112017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10512
10513 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10514 minus_one_ptid and null_ptid.
10515
9bf2a700
PA
105162017-04-05 Pedro Alves <palves@redhat.com>
10517
10518 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10519 * configure: Regenerate.
10520
a121b7c1
PA
105212017-04-05 Pedro Alves <palves@redhat.com>
10522
10523 * ada-exp.y (yyerror): Constify.
10524 * ada-lang.c (bound_name, get_selections)
10525 (ada_variant_discrim_type)
10526 (ada_variant_discrim_name, ada_value_struct_elt)
10527 (ada_lookup_struct_elt_type, is_unchecked_variant)
10528 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10529 (catch_ada_exception_command_split)
10530 (catch_ada_assert_command_split, catch_assert_command)
10531 (ada_op_name): Constify.
10532 * ada-lang.h (ada_yyerror, get_selections)
10533 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10534 * arc-tdep.c (arc_print_frame_cache): Constify.
10535 * arm-tdep.c (arm_skip_stub): Constify.
10536 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10537 (gen_aggregate_elt_ref): Constify.
10538 * bcache.c (print_bcache_statistics): Constify.
10539 * bcache.h (print_bcache_statistics): Constify.
10540 * break-catch-throw.c (catch_exception_command_1):
10541 * breakpoint.c (struct ep_type_description::description):
10542 Constify.
10543 (add_solib_catchpoint): Constify.
10544 (catch_fork_command_1): Add cast.
10545 (add_catch_command): Constify.
10546 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10547 Constify.
10548 * bsd-uthread.c (bsd_uthread_state): Constify.
10549 * buildsym.c (patch_subfile_names): Constify.
10550 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10551 Constify.
10552 * c-exp.y (yyerror): Constify.
10553 (token::oper): Constify.
10554 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10555 * c-varobj.c (cplus_describe_child): Constify.
10556 * charset.c (find_charset_names): Add cast.
10557 (find_charset_names): Constify array and add const_cast.
10558 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10559 (edit_command): Constify.
10560 * cli/cli-decode.c (lookup_cmd): Constify.
10561 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10562 Constify.
10563 (struct dump_context): Constify.
10564 (add_dump_command, restore_command): Constify.
10565 * cli/cli-script.c (get_command_line): Constify.
10566 * cli/cli-script.h (get_command_line): Constify.
10567 * cli/cli-utils.c (check_for_argument): Constify.
10568 * cli/cli-utils.h (check_for_argument): Constify.
10569 * coff-pe-read.c (struct read_pe_section_data): Constify.
10570 * command.h (lookup_cmd): Constify.
10571 * common/print-utils.c (decimal2str): Constify.
10572 * completer.c (gdb_print_filename): Constify.
10573 * corefile.c (set_gnutarget): Constify.
10574 * cp-name-parser.y (yyerror): Constify.
10575 * cp-valprint.c (cp_print_class_member): Constify.
10576 * cris-tdep.c (cris_register_name, crisv32_register_name):
10577 Constify.
10578 * d-exp.y (yyerror): Constify.
10579 (struct token::oper): Constify.
10580 * d-lang.h (d_yyerror): Constify.
10581 * dbxread.c (struct header_file_location::name): Constify.
10582 (add_old_header_file, add_new_header_file, last_function_name)
10583 (dbx_next_symbol_text, add_bincl_to_list)
10584 (find_corresponding_bincl_psymtab, set_namestring)
10585 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10586 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10587 * defs.h (command_line_input, print_address_symbolic)
10588 (deprecated_readline_begin_hook): Constify.
10589 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10590 Constify.
10591 * event-top.c (handle_line_of_input): Constify and add cast.
10592 * exceptions.c (catch_errors): Constify.
10593 * exceptions.h (catch_errors): Constify.
10594 * expprint.c (print_subexp_standard, op_string, op_name)
10595 (op_name_standard, dump_raw_expression, dump_raw_expression):
10596 * expression.h (op_name, op_string, dump_raw_expression):
10597 Constify.
10598 * f-exp.y (yyerror): Constify.
10599 (struct token::oper): Constify.
10600 (struct f77_boolean_val::name): Constify.
10601 * f-lang.c (f_word_break_characters): Constify.
10602 * f-lang.h (f_yyerror): Constify.
10603 * fork-child.c (fork_inferior): Add cast.
10604 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10605 (new_variant): Constify.
10606 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10607 * gdbarch.c: Regenerate.
10608 * gdbcore.h (set_gnutarget): Constify.
10609 * go-exp.y (yyerror): Constify.
10610 (token::oper): Constify.
10611 * go-lang.h (go_yyerror): Constify.
10612 * go32-nat.c (go32_sysinfo): Constify.
10613 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10614 * guile/scm-cmd.c (cmdscm_function): Constify.
10615 * guile/scm-param.c (pascm_param_value): Constify.
10616 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10617 (h8300sx_register_name): Constify.
10618 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10619 Constify.
10620 * ia64-tdep.c (ia64_register_names): Constify.
10621 * infcmd.c (construct_inferior_arguments): Constify.
10622 (path_command, attach_post_wait): Constify.
10623 * language.c (show_range_command, show_case_command)
10624 (unk_lang_error): Constify.
10625 * language.h (language_defn::la_error)
10626 (language_defn::la_name_of_this): Constify.
10627 * linespec.c (decode_line_2): Constify.
10628 * linux-thread-db.c (thread_db_err_str): Constify.
10629 * lm32-tdep.c (lm32_register_name): Constify.
10630 * m2-exp.y (yyerror): Constify.
10631 * m2-lang.h (m2_yyerror): Constify.
10632 * m32r-tdep.c (m32r_register_names): Constify and make static.
10633 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10634 * m88k-tdep.c (m88k_register_name): Constify.
10635 * macroexp.c (appendmem): Constify.
10636 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10637 (upgrade_type, parse_external, parse_partial_symbols)
10638 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10639 (new_symbol): Constify.
10640 * memattr.c (mem_info_command): Constify.
10641 * mep-tdep.c (register_name_from_keyword): Constify.
10642 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10643 Constify.
10644 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10645 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10646 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10647 cast.
10648 (mi_execute_async_cli_command): Constify.
10649 * mips-tdep.c (mips_register_name): Constify.
10650 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10651 (am33_register_name, am33_2_register_name)
10652 * moxie-tdep.c (moxie_register_names): Constify.
10653 * nat/linux-osdata.c (osdata_type): Constify fields.
10654 * nto-tdep.c (nto_parse_redirection): Constify.
10655 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10656 (lookup_child_selector): Constify.
10657 (objc_methcall::name): Constify.
10658 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10659 (lookup_struct_typedef): Constify.
10660 * objfiles.c (pc_in_section): Constify.
10661 * objfiles.h (pc_in_section): Constify.
10662 * p-exp.y (struct token::oper): Constify.
10663 (yyerror): Constify.
10664 * p-lang.h (pascal_yyerror): Constify.
10665 * parser-defs.h (op_name_standard): Constify.
10666 (op_print::string): Constify.
10667 (exp_descriptor::op_name): Constify.
10668 * printcmd.c (print_address_symbolic): Constify.
10669 * psymtab.c (print_partial_symbols): Constify.
10670 * python/py-breakpoint.c (stop_func): Constify.
10671 (bppy_get_expression): Constify.
10672 * python/py-cmd.c (cmdpy_completer::name): Constify.
10673 (cmdpy_function): Constify.
10674 * python/py-event.c (evpy_add_attribute)
10675 (gdbpy_initialize_event_generic): Constify.
10676 * python/py-event.h (evpy_add_attribute)
10677 (gdbpy_initialize_event_generic): Constify.
10678 * python/py-evts.c (add_new_registry): Constify.
10679 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10680 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10681 * python/py-inferior.c (get_buffer): Add cast.
10682 * python/py-param.c (parm_constant::name): Constify.
10683 * python/py-unwind.c (fprint_frame_id): Constify.
10684 * python/python.c (gdbpy_parameter_value): Constify.
10685 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10686 * remote.c (memory_packet_config::name): Constify.
10687 (show_packet_config_cmd, remote_write_bytes)
10688 (remote_buffer_add_string):
10689 * reverse.c (exec_reverse_once): Constify.
10690 * rs6000-tdep.c (variant::name, variant::description): Constify.
10691 * rust-exp.y (rustyyerror): Constify.
10692 * rust-lang.c (rust_op_name): Constify.
10693 * rust-lang.h (rustyyerror): Constify.
10694 * serial.h (serial_ops::name): Constify.
10695 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10696 (sh_sh3e_register_name, sh_sh2e_register_name)
10697 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10698 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10699 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10700 (sh_sh4al_dsp_register_name): Constify.
10701 * sh64-tdep.c (sh64_register_name): Constify.
10702 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10703 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10704 * stabsread.c (patch_block_stabs, read_type_number)
10705 (ref_map::stabs, ref_add, process_reference)
10706 (symbol_reference_defined, define_symbol, define_symbol)
10707 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10708 (read_one_struct_field, read_struct_fields, read_baseclasses)
10709 (read_tilde_fields, read_struct_type, read_array_type)
10710 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10711 (read_huge_number, read_range_type, read_args, common_block_start)
10712 (find_name_end): Constify.
10713 * stabsread.h (common_block_start, define_symbol)
10714 (process_one_symbol, symbol_reference_defined, ref_add):
10715 * symfile.c (get_section_index, add_symbol_file_command):
10716 * symfile.h (get_section_index): Constify.
10717 * target-descriptions.c (tdesc_type::name): Constify.
10718 (tdesc_free_type): Add cast.
10719 * target.c (find_default_run_target):
10720 (add_deprecated_target_alias, find_default_run_target)
10721 (target_announce_detach): Constify.
10722 (do_option): Constify.
10723 * target.h (add_deprecated_target_alias): Constify.
10724 * thread.c (print_thread_info_1): Constify.
10725 * top.c (deprecated_readline_begin_hook, command_line_input):
10726 Constify.
10727 (init_main): Add casts.
10728 * top.h (handle_line_of_input): Constify.
10729 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10730 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10731 (tfind_command): Rename to ...
10732 (tfind_command_1): ... this and constify.
10733 (tfind_command): New function.
10734 (tfind_end_command, tfind_start_command): Adjust.
10735 (encode_source_string): Constify.
10736 * tracepoint.h (encode_source_string): Constify.
10737 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10738 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10739 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10740 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10741 * tui/tui-win.c (parse_scrolling_args): Constify.
10742 * tui/tui-windata.c (tui_erase_data_content): Constify.
10743 * tui/tui-windata.h (tui_erase_data_content): Constify.
10744 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10745 * tui/tui.c (tui_enable): Add cast.
10746 * utils.c (defaulted_query): Constify.
10747 (init_page_info): Add cast.
10748 (puts_debug, subset_compare): Constify.
10749 * utils.h (subset_compare): Constify.
10750 * varobj.c (varobj_format_string): Constify.
10751 * varobj.h (varobj_format_string): Constify.
10752 * vax-tdep.c (vax_register_name): Constify.
10753 * windows-nat.c (windows_detach): Constify.
10754 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10755 * xml-support.c (gdb_xml_end_element): Constify.
10756 * xml-tdesc.c (tdesc_start_reg): Constify.
10757 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10758 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10759 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10760
995816ba
PA
107612017-04-05 Pedro Alves <palves@redhat.com>
10762
10763 * proc-api.c (struct trans): Constify.
10764 (procfs_note): Constify.
10765 * proc-events.c (struct trans, syscall_table):
10766 * proc-flags.c (struct trans): Constify.
10767 * proc-utils.h (procfs_note): Constify.
10768 * proc-why.c (struct trans): Constify.
10769 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10770 (procfs_detach): Constify.
10771 * sol-thread.c (struct string_map): Constify.
10772 (td_err_string, td_state_string): Constify.
10773
3e83a920
PA
107742017-04-05 Pedro Alves <palves@redhat.com>
10775
10776 * proc-api.c (procfs_filename): Don't initialize
10777 procfs_filename.
10778 (prepare_to_trace): Assume procfs_filename is non-NULL.
10779 (_initialize_proc_api): Give procfs_filename a default value here.
10780
63160a43
PA
107812017-04-05 Pedro Alves <palves@redhat.com>
10782
10783 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10784 'cond_string' parameter.
10785 (extract_exception_regexp): Constify 'string' parameter.
10786 (catch_exception_command_1): Constify.
10787 * breakpoint.c (init_catchpoint)
10788 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10789 parameter.
10790 (ep_parse_optional_if_clause, catch_fork_command_1)
10791 (catch_exec_command_1): Constify.
10792 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10793 parameter.
10794 (ep_parse_optional_if_clause): Constify.
10795 * cli/cli-utils.c (remove_trailing_whitespace)
10796 (check_for_argument): Constify.
10797 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10798 non-const overload.
10799 (check_for_argument): Likewise.
10800
9b2eba3d
PA
108012017-04-05 Pedro Alves <palves@redhat.com>
10802
10803 * event-top.c (command_line_handler): Add cast to execute_command
10804 call.
10805 * record-btrace.c (cmd_record_btrace_bts_start)
10806 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10807 (cmd_record_btrace_start): Add cast to execute_command call.
10808 * record-full.c (record_full_goto_insn):
10809 * record.c (record_start, record_stop): Add cast to
10810 execute_command_to_string calls.
10811 (cmd_record_start): Add cast to execute_command calls.
10812
2adadf51
PA
108132017-04-05 Pedro Alves <palves@redhat.com>
10814
10815 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10816 static inline function.
10817 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10818 array and use gdb_PyArg_ParseTupleAndKeywords.
10819 * python/py-cmd.c (cmdpy_init): Likewise.
10820 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10821 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10822 (infpy_search_memory): Likewise.
10823 * python/py-objfile.c (objfpy_add_separate_debug_file)
10824 (gdbpy_lookup_objfile): Likewise.
10825 * python/py-symbol.c (gdbpy_lookup_symbol)
10826 (gdbpy_lookup_global_symbol): Likewise.
10827 * python/py-type.c (gdbpy_lookup_type): Likewise.
10828 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10829 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10830 Likewise.
10831
0d1f4ceb
PA
108322017-04-05 Pedro Alves <palves@redhat.com>
10833
10834 * python/python-internal.h (gdb_PyGetSetDef): New type.
10835 * python/py-block.c (block_object_getset)
10836 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10837 * python/py-event.c (event_object_getset)
10838 (finish_breakpoint_object_getset): Likewise.
10839 * python/py-inferior.c (inferior_object_getset): Likewise.
10840 * python/py-infthread.c (thread_object_getset): Likewise.
10841 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10842 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10843 * python/py-objfile.c (objfile_getset): Likewise.
10844 * python/py-progspace.c (pspace_getset): Likewise.
10845 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10846 Likewise.
10847 * python/py-record.c (recpy_record_getset): Likewise.
10848 * python/py-symbol.c (symbol_object_getset): Likewise.
10849 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10850 Likewise.
10851 * python/py-type.c (type_object_getset, field_object_getset):
10852 Likewise.
10853 * python/py-value.c (value_object_getset): Likewise.
10854
4d759979
PA
108552017-04-05 Pedro Alves <palves@redhat.com>
10856
10857 * python/python-internal.h (gdb_PyObject_CallMethod)
10858 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10859 New functions.
10860 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10861 (PySys_GetObject, PySys_SetPath): New macros.
10862
fdf9e36f
PA
108632017-04-05 Pedro Alves <palves@redhat.com>
10864
10865 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10866 info_osdata_command.
10867 * osdata.c (info_osdata_command): Rename to ...
10868 (info_osdata): ... this. Constify 'type' parameter, and remove
10869 the 'from_tty' parameter. Accept NULL TYPE.
10870 (info_osdata_command): New function.
10871 * osdata.h (info_osdata_command): Remove declaration.
10872 (info_osdata): New declaration.
10873
9f33b8b7
PA
108742017-04-05 Pedro Alves <palves@redhat.com>
10875
10876 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10877 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10878 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10879 parameter.
10880 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10881 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10882 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10883 parameter.
10884 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10885 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10886 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10887 (mi_cmd_file_list_exec_source_files)
10888 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10889 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10890 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10891 parameter.
10892 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10893 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10894 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10895 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10896 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10897 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10898 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10899 'command' parameter.
10900 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10901 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10902 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10903 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10904 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10905 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10906 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10907 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10908 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10909 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10910 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10911 parameter.
10912 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10913 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10914 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10915 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10916 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10917 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10918 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10919 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10920 (mi_cmd_data_list_changed_registers)
10921 (mi_cmd_data_write_register_values)
10922 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10923 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10924 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10925 (mi_cmd_list_features, mi_cmd_list_target_features)
10926 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10927 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10928 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10929 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10930 (mi_cmd_trace_frame_collected): Constify 'command'
10931 parameter.
10932 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10933 'command' parameter.
10934
67cb5b2d
PA
109352017-04-05 Pedro Alves <palves@redhat.com>
10936
10937 * ada-lang.c (ada_completer_word_break_characters): Now a const
10938 array.
10939 (ada_get_gdb_completer_word_break_characters): Constify.
10940 * completer.c (gdb_completer_command_word_break_characters)
10941 (gdb_completer_file_name_break_characters)
10942 (gdb_completer_quote_characters): Now const arrays.
10943 (get_gdb_completer_quote_characters): Constify.
10944 (set_rl_completer_word_break_characters): New function.
10945 (set_gdb_completion_word_break_characters)
10946 (complete_line_internal): Use it.
10947 * completer.h (get_gdb_completer_quote_characters): Constify.
10948 (set_rl_completer_word_break_characters): Declare.
10949 * f-lang.c (f_word_break_characters): Constify.
10950 * language.c (default_word_break_characters): Constify.
10951 * language.h (language_defn::la_word_break_characters): Constify.
10952 (default_word_break_characters): Constify.
10953 * top.c (init_main): Use set_rl_completer_word_break_characters.
10954
7a114964
PA
109552017-04-05 Pedro Alves <palves@redhat.com>
10956
10957 * aix-thread.c (aix_thread_pid_to_str)
10958 (aix_thread_extra_thread_info): Constify.
10959 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10960 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10961 (bsd_uthread_pid_to_str): Constify.
10962 * corelow.c (core_pid_to_str): Constify.
10963 * darwin-nat.c (darwin_pid_to_str): Constify.
10964 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10965 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
10966 Constify.
10967 * gnu-nat.c (gnu_pid_to_str): Constify.
10968 * go32-nat.c (go32_pid_to_str): Constify.
10969 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
10970 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
10971 * inferior.c (inferior_pid_to_str): Constify.
10972 * linux-nat.c (linux_nat_pid_to_str): Constify.
10973 * linux-tdep.c (linux_core_pid_to_str): Constify.
10974 * linux-thread-db.c (thread_db_pid_to_str)
10975 (thread_db_extra_thread_info): Constify.
10976 * nto-tdep.c (nto_extra_thread_info): Constify.
10977 * nto-tdep.h (nto_extra_thread_info): Constify.
10978 * obsd-nat.c (obsd_pid_to_str): Constify.
10979 * procfs.c (procfs_pid_to_str): Constify.
10980 * ravenscar-thread.c (ravenscar_extra_thread_info)
10981 (ravenscar_pid_to_str): Constify.
10982 * remote-sim.c (gdbsim_pid_to_str): Constify.
10983 * remote.c (remote_threads_extra_info, remote_pid_to_str):
10984 Constify.
10985 * sol-thread.c (solaris_pid_to_str): Constify.
10986 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
10987 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
10988 * target.c (default_pid_to_str, target_pid_to_str)
10989 (normal_pid_to_str, default_pid_to_str): Constify.
10990 * target.h (target_ops::to_pid_to_str)
10991 (target_ops::to_extra_thread_info): Constify.
10992 (target_pid_to_str, normal_pid_to_str): Constify.
10993 * windows-nat.c (windows_pid_to_str): Constify.
10994 * gdbarch.sh (core_pid_to_str): Constify.
10995 * target-delegates.c: Regenerate.
10996 * gdbarch.h, gdbarch.c: Regenerate.
10997
69bbf465
PA
109982017-04-05 Pedro Alves <palves@redhat.com>
10999
11000 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11001 the memory of the temporary warning_pre_print override.
11002 * utils.c (warning_pre_print): Constify.
11003 * utils.h (warning_pre_print): Constify.
11004
be47f9e8
PA
110052017-04-05 Pedro Alves <palves@redhat.com>
11006
11007 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11008 (shell_command): New function.
11009 (make_command): Use std::string.
11010 (init_cli_cmds): Register shell_command instead of shell_escape.
11011
bde6261a
PA
110122017-04-05 Pedro Alves <palves@redhat.com>
11013
11014 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11015 * tracepoint.c (default_collect): Don't initialize.
11016
b38ef47f
PA
110172017-04-05 Pedro Alves <palves@redhat.com>
11018
11019 * macroexp.c (macro_buffer::shared): Now a bool.
11020 (init_buffer): Update.
11021 (init_shared_buffer): Constify 'addr' parameter.
11022 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11023 casts.
11024
f995bbe8
PA
110252017-04-05 Pedro Alves <palves@redhat.com>
11026
11027 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11028 * disasm.c (set_disassembler_options): Constify local.
11029 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11030
4a596fe2
SDJ
110312017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11032
11033 PR gdb/21352
11034 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11035 option.
11036
2cad08ea
YQ
110372017-04-05 Yao Qi <yao.qi@linaro.org>
11038
11039 * frame.c (frame_unwind_register_unsigned): Call
11040 frame_unwind_register_value.
11041
55a98976
YQ
110422017-04-05 Yao Qi <yao.qi@linaro.org>
11043
11044 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11045 Use gdb_test_multiple, and don't match anchor.
11046
4ac40124
PA
110472017-04-05 Pedro Alves <palves@redhat.com>
11048
11049 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11050 (Write After Approval): Remove Simon Marchi.
11051
c053b654
PA
110522017-04-05 Pedro Alves <palves@redhat.com>
11053
11054 * common/gdb_optional.h (optional::optional): Make constexpr and
11055 initialize m_dummy.
11056
4c7bf4f9
JB
110572017-04-04 John Baldwin <jhb@FreeBSD.org>
11058
11059 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11060 (amd64fbsd_jmp_buf_reg_offset): Remove.
11061 (amd64fbsd_supply_uthread): Remove function.
11062 (amd64fbsd_collect_uthread): Remove function.
11063 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11064 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11065 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11066 (fbsd-nat.c): Update comment.
11067 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11068 (i386fbsd_jmp_buf_reg_offset): Remove.
11069 (i386fbsd_supply_uthread): Remove function.
11070 (i386fbsd_collect_uthread): Remove function.
11071 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11072
1e1a8bef
JB
110732017-04-04 John Baldwin <jhb@FreeBSD.org>
11074
11075 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11076 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11077 * NEWS: Mention that support for FreeBSD/alpha was removed.
11078 * alpha-fbsd-tdep.c: Delete file.
11079 * config/alpha/fbsd.mh: Delete file.
11080 * configure.host: Delete alpha*-*-freebsd* and
11081 alpha*-*-kfreebsd*-gnu.
11082 * configure.tgt: Delete alpha*-*-freebsd* and
11083 alpha*-*-kfreebsd*-gnu.
11084
49907934
JB
110852017-04-04 John Baldwin <jhb@FreeBSD.org>
11086
11087 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11088 amd64bsd_store_inferior_registers): Use ptid from regcache.
11089
6f77053d
PA
110902017-04-04 Pedro Alves <palves@redhat.com>
11091
11092 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11093 data fields, make them private and add "m_" prefixes.
11094 (lnp_state_machine::lnp_state_machine): New ctor.
11095 (record_line, check_line_address, handle_set_discriminator)
11096 (handle_set_address, handle_advance_pc, handle_special_opcode)
11097 (handle_advance_line, handle_set_file, handle_negate_stmt)
11098 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11099 (end_sequence, advance_line): New methods.
11100 (m_gdbarch, m_record_lines_p): New fields.
11101 (lnp_reader_state): Delete.
11102 (dwarf_record_line): Rename to ...
11103 (lnp_state_machine::record_line): ... adjust.
11104 (init_lnp_state_machine): Delete.
11105 (lnp_state_machine::lnp_state_machine): New.
11106 (check_line_address): Rename to ...
11107 (lnp_state_machine::check_line_address): This.
11108 (dwarf_decode_lines_1): Remove reference to "reader_state".
11109 Adjust lnp_state_machine having a non-default ctor. Use bool.
11110 State machine internal state manipulation moved to
11111 lnp_state_machine methods.
11112
9c541725
PA
111132017-04-04 Pedro Alves <palves@redhat.com>
11114
11115 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11116 unittests/offset-type-selftests.c.
11117 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11118 * common/offset-type.h: New file.
11119 * common/preprocessor.h: New file.
11120 * common/traits.h: New file.
11121 * common/valid-expr.h: New file.
11122 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11123 sect_offset and cu_offset strong typedefs throughout.
11124 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11125 typedefs throughout.
11126 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11127 sect_offset and cu_offset strong typedefs throughout.
11128 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11129 typedefs throughout.
11130 * gdbtypes.h: Include "common/offset-type.h".
11131 (cu_offset): Now an offset type (strong typedef) instead of a
11132 struct.
11133 (sect_offset): Likewise.
11134 (union call_site_parameter_u): Rename "param_offset" field to
11135 "param_cu_off".
11136 * unittests/offset-type-selftests.c: New file.
11137
ecfb656c
PA
111382017-04-04 Pedro Alves <palves@redhat.com>
11139
11140 * common/underlying.h: New file.
11141 * dwarf2read.c: Include "common/gdb_optional.h" and
11142 "common/underlying.h".
11143 (dir_index, file_name_index): New types.
11144 (file_entry): Use them.
11145 (file_entry::include): Use to_underlying.
11146 (line_header::add_file_name): Use dir_index.
11147 (read_formatted_entries): Use gdb::optional. Read form before
11148 writting to file_entry.
11149 (dwarf_decode_line_header): Use dir_index.
11150 (lnp_state_machine::current_file): Use to_underlying.
11151 (lnp_state_machine::file): Change type to file_name_index.
11152 (dwarf_record_line): Use to_underlying.
11153 (init_lnp_state_machine): Use file_name_index.
11154 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11155
d194f1fe
PA
111562017-04-04 Pedro Alves <palves@redhat.com>
11157
11158 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11159 operator bool, has_value and get methods.
11160
fff8551c
PA
111612017-04-04 Pedro Alves <palves@redhat.com>
11162
11163 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11164 fields.
11165 (line_header): Initialize all data fields. Change type of
11166 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11167 Change type of include_dirs to std::vector<const char *>. Remove
11168 num_include_dirs, include_dirs_size. Change type of file_names to
11169 std::vector<file_entry>. Remove num_file_names, file_names_size.
11170 (line_header::line_header): New.
11171 (line_header::add_include_dir, line_header::add_file_name): New
11172 methods.
11173 (line_header::include_dir_at): Remove NULL check.
11174 (line_header::file_name_at): Add const overload.
11175 (line_header_up): New unique_ptr typedef.
11176 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11177 std::vector. Remove free_line_header call.
11178 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11179 free_line_header call.
11180 (free_cu_line_header): Delete.
11181 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11182 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11183 Adjust to use std::vector.
11184 (free_line_header): Delete.
11185 (free_line_header_voidp): Use delete.
11186 (add_include_dir): Replace with ...
11187 (line_header::add_include_dir): ... this method. Use std::vector.
11188 (add_file_name): Replace with ...
11189 (line_header::add_file_name): ... this method. Use std::vector.
11190 (add_include_dir_stub): Delete.
11191 (read_formatted_entries): Remove memset.
11192 (dwarf_decode_line_header): Return a line_header_up instead of a
11193 raw pointer. Remove cleanup handling. Pass lambdas to
11194 read_formatted_entries. Adjust to use line_header methods.
11195 (dwarf_decode_lines_1): Adjust to use line_header methods.
11196 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11197 use std::vector.
11198
d62a8ae2
SM
111992017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11200
11201 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11202 instead of struct ptid.
11203
db3a1dc7
AH
112042017-05-04 Alan Hayward <alan.hayward@arm.com>
11205
11206 * frame.c (get_frame_register_bytes): Unwind using value.
11207 (put_frame_register_bytes): Likewise.
11208
b1b45502
IB
112092017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11210
11211 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11212 aggregate-like.
11213
ec13808e
JK
112142017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11215
11216 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11217
12316564
YQ
112182017-03-29 Yao Qi <yao.qi@linaro.org>
11219
11220 * gdbthread.h (struct thread_info): Declare constructor and
11221 destructor. Add some in-class member initializers.
11222 * thread.c (free_thread): Remove.
11223 (init_thread_list): Call delete instead of free_thread.
11224 (new_thread): Call thread_info constructor.
11225 (thread_info::thread_info): New function.
11226 (thread_info::~thread_info): New function.
11227 (delete_thread_1): Call delete instead of free_thread.
11228 (make_cleanup_restore_current_thread): Move tp and frame to
11229 inner block.
11230
fe5f7374
AK
112312017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11232
11233 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11234 (arc_skip_prologue): Likewise.
11235 (arc_make_frame_cache): Likewise.
11236 (arc_pv_get_operand): New function.
11237 (arc_is_in_prologue): Likewise.
11238 (arc_analyze_prologue): Likewise.
11239 (arc_print_frame_cache): Likewise.
11240 (MAX_PROLOGUE_LENGTH): New constant.
11241
eea78757
AK
112422017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11243
11244 * configure.tgt: Add arc-insn.o.
11245 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11246 (dump_arc_instruction_command): New function.
11247 (arc_fprintf_disasm): Likewise.
11248 (arc_disassemble_info): Likewise.
11249 (arc_insn_get_operand_value): Likewise.
11250 (arc_insn_get_operand_value_signed): Likewise.
11251 (arc_insn_get_memory_base_reg): Likewise.
11252 (arc_insn_get_memory_offset): Likewise.
11253 (arc_insn_get_branch_target): Likewise.
11254 (arc_insn_dump): Likewise.
11255 (arc_insn_get_linear_next_pc): Likewise.
11256 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11257 (arc_disassemble_info): Likewise.
11258 (arc_insn_get_branch_target): Likewise.
11259 (arc_insn_get_linear_next_pc): Likewise.
11260 * NEWS: Mention new "maint print arc arc-instruction".
11261
3be78afd
AK
112622017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11263
11264 * arc-tdep (maintenance_print_arc_list): New variable.
11265 (maintenance_print_arc_command): New function.
11266
296ec4fa
AK
112672017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11268
11269 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11270 Add "limm" and "reserved".
11271 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11272 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11273 * arc-tdep.h (arc_regnum): Likewise.
11274
f74f865e
MF
112752017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11276
11277 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11278 for THREADPTR register.
11279 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11280 register.
11281 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11282 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11283 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11284
0d0bf81a
MF
112852017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11286
11287 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11288 registers above gdbarch_num_regs (gdbarch) as privileged in
11289 call0 ABI.
11290
0ce4291e
MF
112912017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11292
11293 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11294 for a single specified register or for all registers in
11295 a0_base..a0_base + C0_NREGS range.
11296 (supply_gregset_reg): Call regcache_raw_supply for a single
11297 specified register or for all registers in a0_base..a0_base +
11298 C0_NREGS range.
11299
c56054f9
MF
113002017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11301
11302 * arch/xtensa.h (C0_NREGS): Add definition.
11303 * xtensa-tdep.c (C0_NREGS): Remove definition.
11304
a4398628
MF
113052017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11306
11307 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11308 Drop xtensa_default_isa initialization.
11309 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11310
8c43009f
PA
113112017-03-27 Pedro Alves <palves@redhat.com>
11312
11313 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11314 (file_entry::include_dir): New method.
11315 (line_header::include_dir_at, line_header::file_name_at): New
11316 methods.
11317 (setup_type_unit_groups, setup_type_unit_groups)
11318 (psymtab_include_file_name): Simplify using the new methods.
11319 (lnp_state_machine) <the_line_header>: New field.
11320 <file>: Add comment.
11321 (lnp_state_machine::current_file): New method.
11322 (dwarf_record_line): Simplify using the new methods.
11323 (init_lnp_state_machine): Initialize the "the_line_header" field.
11324 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11325 Simplify using the new methods.
11326
a7e80b9e
PA
113272017-03-27 Pedro Alves <palves@redhat.com>
11328
11329 * cp-name-parser.y (make_empty): Delete.
11330 (demangler_special, nested_name, ptr_operator, array_indicator)
11331 (direct_declarator, declarator_1): Use fill_comp instead of
11332 make_empty.
11333
21047726
PA
113342017-03-27 Pedro Alves <palves@redhat.com>
11335
11336 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11337 to ATTRIBUTE_PRINTF.
11338 * solib-target.c (library_list_start_list): Print "string" not
11339 "version".
11340 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11341 gdb_xml_error call.
11342
d721ba37
PA
113432017-03-27 Pedro Alves <palves@redhat.com>
11344
11345 * dwarf2read.c (struct file_and_directory): New.
11346 (dwarf2_get_dwz_file): Adjust to use std::string.
11347 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11348 (find_file_and_directory): Adjust to return a file_and_directory
11349 object.
11350 (read_file_scope): Adjust to use file_and_directory. Remove
11351 make_cleanup/do_cleanups calls.
11352 (open_and_init_dwp_file): Adjust to use std::string. Remove
11353 make_cleanup/do_cleanups calls.
11354 * python/python.c (do_start_initialization): Adjust to ldirname
11355 returning a std::string.
11356 * utils.c (ldirname): Now returns a std::string.
11357 * utils.h (ldirname): Change return type to std::string.
11358 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11359 returning a std::string.
11360 * xml-tdesc.c (file_read_description_xml): Likewise.
11361
ed771251
AH
113622017-03-24 Alan Hayward <alan.hayward@arm.com>
11363
11364 * regcache.c (regcache_debug_print_register): New function.
11365 * regcache.h (regcache_debug_print_register): New declaration.
11366 * target.c (debug_print_register): Remove.
11367 (target_fetch_registers): Call regcache_debug_print_register.
11368 (target_store_registers): Likewise.
11369
568c1b9f
PB
113702017-03-24 Pádraig Brady <pbrady@fb.com>
11371
11372 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11373 reference beyond the 'lh->include_dirs' array before accessing to
11374 it.
11375 (psymtab_include_file_name): Likewise.
11376 (dwarf_decode_lines_1): Likewise.
11377 (dwarf_decode_lines): Likewise.
11378 (file_file_name): Likewise.
11379
3e00d44f
SM
113802017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11381
11382 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11383 inferior_ptid.
11384 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11385 ps_lsetfpregs): Likewise.
11386 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11387 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11388 ps_lsetfpregs): Likewise.
11389 * target.c (target_fetch_registers, target_store_registers):
11390 Remove asserts.
11391
077ae656
AH
113922017-03-23 Alan Hayward <alan.hayward@arm.com>
11393
11394 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11395
1e2b521d
YQ
113962017-03-23 Yao Qi <yao.qi@linaro.org>
11397
11398 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11399 (_initialize_aarch64_tdep): Register it.
11400 (aarch64_record_load_store): Handle PRFM instruction.
11401 (aarch64_process_record_test): New function.
11402
33877125
YQ
114032017-03-23 Yao Qi <yao.qi@linaro.org>
11404
11405 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11406 indentation.
11407
a0eef940
YQ
114082017-03-23 Yao Qi <yao.qi@linaro.org>
11409
11410 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11411
3f2a3564
PR
114122017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11413
11414 python/python.c (do_start_initialization): Fix memory leak.
11415
b67aeab0
SM
114162017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11417
11418 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11419 using get_ptrace_pid.
11420 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11421 inferior_ptid.
11422 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11423 inferior_ptid instead of pid.
11424
ffdbe864
YQ
114252017-03-22 Yao Qi <yao.qi@linaro.org>
11426
11427 * aarch64-tdep.c: Wrap locally used classes in anonymous
11428 namespace.
11429 * arm-tdep.c: Likewise.
11430 * linespec.c: Likewise.
11431 * ui-out.c: Likewise.
11432
9d736fbf
JG
114332017-03-22 Jonah Graham <jonah@kichwacoders.com>
11434
11435 PR gdb/19637
11436 * python/lib/gdb/printer/bound_registers.py: Import sys.
11437
3de88e9a
SM
114382017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11439
11440 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11441 windows_thread_info parameter and use it instead of
11442 current_thread.
11443 (windows_fetch_inferior_registers): Don't set current_thread,
11444 pass the thread to do_windows_fetch_inferior_registers. Use
11445 ptid from regcache instead of inferior_ptid.
11446 (do_windows_store_inferior_registers): Add windows_thread_info
11447 parameter and use it instead of current_thread.
11448 (windows_store_inferior_registers): Don't set current_thread,
11449 pass the thread to do_windows_store_inferior_registers. Use
11450 ptid from regcache instead of inferior_ptid.
11451
0e7b8f61
SM
114522017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11453
11454 * ser-mingw.c (ser_windows_raw): Remove reference to
11455 struct serial::current_timeout.
11456
5badf10a
IR
114572017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11458
11459 PR tdep/20928
11460 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11461 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11462 (sparc64_fsr_type): Fix %fsr decoding.
11463
cee59b3f
TW
114642017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11465
11466 * python/py-record-btrace.c (btpy_insn_data): Change return type
11467 for Python 2.
11468
639a9038
SM
114692017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11470
11471 * spu-linux-nat.c (spu_fetch_inferior_registers,
11472 spu_store_inferior_registers): Use ptid from regcache, set and
11473 restore inferior_ptid.
11474 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11475 Likewise.
11476
bcc0c096
SM
114772017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11478
11479 * i386-linux-nat.c (fetch_register, store_register,
11480 i386_linux_fetch_inferior_registers,
11481 i386_linux_store_inferior_registers): Use ptid from regcache.
11482 * ia64-linux-nat.c (ia64_linux_fetch_register,
11483 ia64_linux_store_register): Likewise.
11484 * inf-ptrace.c (inf_ptrace_fetch_register,
11485 inf_ptrace_store_register): Likewise.
11486 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11487 m32r_linux_store_inferior_registers): Likewise.
11488 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11489 m68kbsd_store_inferior_registers): Likewise.
11490 * m68k-linux-nat.c (fetch_register, store_register,
11491 m68k_linux_fetch_inferior_registers,
11492 m68k_linux_store_inferior_registers): Likewise.
11493 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11494 m88kbsd_store_inferior_registers): Likewise.
11495 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11496 mips_fbsd_store_inferior_registers): Likewise.
11497 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11498 mips64_linux_regsets_store_registers): Likewise.
11499 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11500 mipsnbsd_store_inferior_registers): Likewise.
11501 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11502 mips64obsd_store_inferior_registers): Likewise.
11503 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11504 Likewise.
11505 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11506 ppcfbsd_store_inferior_registers): Likewise.
11507 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11508 ppc_linux_store_inferior_registers): Likewise.
11509 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11510 ppcnbsd_store_inferior_registers): Likewise.
11511 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11512 ppcobsd_store_registers): Likewise.
11513 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11514 Likewise.
11515 * ravenscar-thread.c (ravenscar_fetch_registers,
11516 ravenscar_store_registers, ravenscar_prepare_to_store):
11517 Likewise.
11518 * record-btrace.c (record_btrace_fetch_registers,
11519 record_btrace_store_registers, record_btrace_prepare_to_store):
11520 Likewise.
11521 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11522 Lookup inferior using ptid from regcache, instead of
11523 current_inferior.
11524 * remote.c (remote_fetch_registers, remote_store_registers): Use
11525 ptid from regcache.
11526 * rs6000-nat.c (fetch_register, store_register): Likewise.
11527 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11528 s390_linux_store_inferior_registers): Likewise.
11529 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11530 shnbsd_store_inferior_registers): Likewise.
11531 * sol-thread.c (sol_thread_fetch_registers,
11532 sol_thread_store_registers): Likewise.
11533 * sparc-nat.c (sparc_fetch_inferior_registers,
11534 sparc_store_inferior_registers): Likewise.
11535 * tilegx-linux-nat.c (fetch_inferior_registers,
11536 store_inferior_registers): Likewise.
11537 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11538 vaxbsd_store_inferior_registers): Likewise.
11539 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11540 store_xtregs): Likewise.
11541
c0f55cc6
AV
115422017-03-20 Artemiy Volkov <artemiyv@acm.org>
11543
11544 PR gdb/14441
11545 * NEWS: Mention support for rvalue references in GDB and python.
11546 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11547 supports both lvalue and rvalue references.
11548
15c0a2a9
AV
115492017-03-20 Artemiy Volkov <artemiyv@acm.org>
11550
11551 PR gdb/14441
11552 * gdbtypes.c (rank_one_type): Implement overloading
11553 resolution rules regarding rvalue references.
11554
aa006118
AV
115552017-03-20 Artemiy Volkov <artemiyv@acm.org>
11556
11557 PR gdb/14441
11558 * aarch64-tdep.c (aarch64_type_align)
11559 (aarch64_extract_return_value, aarch64_store_return_value): Change
11560 lvalue reference type checks to general reference type checks.
11561 * amd64-tdep.c (amd64_classify): Likewise.
11562 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11563 Likewise.
11564 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11565 (arm_store_return_value): Likewise.
11566 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11567 * c-typeprint.c (c_print_type): Likewise.
11568 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11569 (cplus_number_of_children, cplus_describe_child): Likewise.
11570 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11571 * completer.c (expression_completer): Likewise.
11572 * cp-support.c (make_symbol_overload_list_adl_namespace):
11573 Likewise.
11574 * darwin-nat-info.c (info_mach_region_command): Likewise.
11575 * dwarf2loc.c (entry_data_value_coerce_ref)
11576 (value_of_dwarf_reg_entry): Likewise.
11577 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11578 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11579 Likewise.
11580 * findvar.c (extract_typed_address, store_typed_address):
11581 Likewise.
11582 * gdbtypes.c (rank_one_type): Likewise.
11583 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11584 * infcall.c (value_arg_coerce): Likewise.
11585 * language.c (pointer_type): Likewise.
11586 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11587 Likewise.
11588 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11589 * mn10300-tdep.c (mn10300_type_align): Likewise.
11590 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11591 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11592 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11593 Likewise.
11594 * printcmd.c (print_formatted, x_command): Likewise.
11595 * python/py-type.c (typy_get_composite, typy_template_argument):
11596 Likewise.
11597 * python/py-value.c (valpy_referenced_value)
11598 (valpy_get_dynamic_type, value_has_field): Likewise.
11599 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11600 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11601 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11602 * spu-tdep.c (spu_scalar_value_p): Likewise.
11603 * symtab.c (lookup_symbol_aux): Likewise.
11604 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11605 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11606 Likewise.
11607 * valops.c (value_cast_pointers, value_cast)
11608 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11609 (value_struct_elt, value_struct_elt_bitpos)
11610 (value_find_oload_method_list, find_overload_match)
11611 (value_rtti_indirect_type): Likewise.
11612 * valprint.c (val_print_scalar_type_p, generic_val_print):
11613 Likewise.
11614 * value.c (value_actual_type, value_as_address, unpack_long)
11615 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11616 (coerce_ref): Likewise.
11617 * varobj.c (varobj_get_value_type): Likewise.
11618
3fcf899d
AV
116192017-03-20 Artemiy Volkov <artemiyv@acm.org>
11620
11621 PR gdb/14441
11622 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11623 table of constants.
11624 * python/lib/gdb/command/explore.py: Support exploring values
11625 of rvalue reference types.
11626 * python/lib/gdb/types.py: Implement get_basic_type() for
11627 rvalue reference types.
11628 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11629 constant.
11630 * python/py-value.c (valpy_getitem): Add an rvalue reference
11631 check.
11632 (valpy_reference_value): Add new parameter "refcode".
11633 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11634 New wrappers for valpy_reference_value().
11635 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11636 (gdbpy_invoke_xmethod): Likewise.
11637
4297a3f0
AV
116382017-03-20 Artemiy Volkov <artemiyv@acm.org>
11639
11640 PR gdb/14441
11641 * dwarf2read.c (process_die, read_type_die_1): Handle the
11642 DW_TAG_rvalue_reference_type DIE.
11643 (read_tag_reference_type): Add new parameter "refcode".
11644
e1cb3213
AV
116452017-03-20 Artemiy Volkov <artemiyv@acm.org>
11646
11647 PR gdb/14441
11648 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11649 (c_type_print_modifier, c_type_print_varspec_suffix)
11650 (c_type_print_base): Support printing rvalue reference types.
11651 * c-valprint.c (c_val_print, c_value_print): Support printing
11652 rvalue reference values.
11653
e4347c89
AV
116542017-03-20 Artemiy Volkov <artemiyv@acm.org>
11655
11656 PR gdb/14441
11657 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11658 typename.
11659 * cp-support.c (replace_typedefs): Handle
11660 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11661 * python/py-type.c (typy_lookup_type): Likewise.
11662
53cc15f5
AV
116632017-03-20 Artemiy Volkov <artemiyv@acm.org>
11664
11665 PR gdb/14441
11666 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11667 * parse.c (insert_type): Change assert statement.
11668 (follow_types): Handle rvalue reference types.
11669 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11670 constant.
11671
a65cfae5
AV
116722017-03-20 Artemiy Volkov <artemiyv@acm.org>
11673
11674 PR gdb/14441
11675 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11676 value_ref() interface.
11677 * c-valprint.c (c_value_print): Likewise.
11678 * infcall.c (value_arg_coerce): Likewise.
11679 * python/py-value.c (valpy_reference_value): Likewise.
11680 * valops.c (value_cast, value_reinterpret_cast)
11681 (value_dynamic_cast, typecmp): Likewise.
11682 (value_ref): Parameterize by kind of return value reference type.
11683 * value.h (value_ref): Add new parameter "refcode".
11684
3b224330
AV
116852017-03-20 Artemiy Volkov <artemiyv@acm.org>
11686
11687 PR gdb/14441
11688 * dwarf2read.c (read_tag_reference_type): Use
11689 lookup_lvalue_reference_type() instead of lookup_reference_type().
11690 * eval.c (evaluate_subexp_standard): Likewise.
11691 * f-exp.y: Likewise.
11692 * gdbtypes.c (make_reference_type, lookup_reference_type):
11693 Generalize with rvalue reference types.
11694 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11695 convenience wrappers for lookup_reference_type().
11696 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11697 reference kind parameter.
11698 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11699 wrappers for lookup_reference_type().
11700 * guile/scm-type.c (gdbscm_type_reference): Use
11701 lookup_lvalue_reference_type() instead of lookup_reference_type().
11702 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11703 * parse.c (follow_types): Likewise.
11704 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11705 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11706 Likewise.
11707 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11708 (gdbpy_invoke_xmethod): Likewise.
11709 * stabsread.c: Provide extra argument to make_reference_type()
11710 call.
11711 * valops.c (value_ref, value_rtti_indirect_type): Use
11712 lookup_lvalue_reference_type() instead of lookup_reference_type().
11713
f9aeb8d4
AV
117142017-03-20 Artemiy Volkov <artemiyv@acm.org>
11715
11716 PR gdb/14441
11717 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11718 (TYPE_IS_REFERENCE): New macro.
11719 (struct type): Add rvalue_reference_type field.
11720 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11721
51457a05
MAL
117222017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11723
11724 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11725 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11726 New function definition.
11727 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11728 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11729 New function declaration.
11730 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11731 * mi/mi-interp.h: New file.
11732 * solib.c (info_sharedlibrary_command): Replace for loop with
11733 ALL_SO_LIBS macro
11734 * solib.h (update_solib_list): New function declaration.
11735 (so_list_head): Move macro.
11736 * solist.h (ALL_SO_LIBS): New macro.
11737
e696b3ad
MAL
117382017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11739
11740 * infcmd.c (post_create_inferior): Remove unused argument in
11741 call to solib_add.
11742 * remote.c (remote_start_remote): Likewise.
11743 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11744 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11745 (enable_break): Likewise.
11746 * solib.c (update_solib_list): Remove unused target argument
11747 and its documentation.
11748 (solib_add): Remove unused target argument. Remove unused
11749 argument in call to update_solib_list.
11750 (info_sharedlibrary_command): Remove unused argument in call
11751 to update_solib_list.
11752 (sharedlibrary_command): Remove unused argument in call to
11753 solib_add.
11754 (handle_solib_event): Likewise.
11755 (reload_shared_libraries): Likewise.
11756 * solib.h (solib_add): Remove unused target argument.
11757
dcb84eda
AA
117582017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11759
11760 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11761 (s390_displaced_step_fixup): Cover relative branches with the
11762 default fixup handling. This fixes lack of support for some
11763 relative branch instructions.
11764
d9cb6cdc
SM
117652017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11766
11767 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11768 ptid from regcache.
11769
1afaf9f4
SM
117702017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11771
11772 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11773 i386_darwin_store_inferior_registers): Use ptid from regcache.
11774
aac12e24
SM
117752017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11776
11777 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11778 i386bsd_store_inferior_registers): Use ptid from regcache.
11779
bbe1eef1
SM
117802017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11781
11782 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11783 hppaobsd_store_registers): Use ptid from regcache.
11784
10799020
SM
117852017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11786
11787 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11788 hppanbsd_store_registers): Use ptid from regcache.
11789
00204cf7
SM
117902017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11791
11792 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11793 from regcache. Use get_ptrace_pid.
11794
11a33714
SM
117952017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11796
11797 * corelow.c (get_core_register_section): Use ptid from regcache,
11798 update doc.
11799
317cd492
SM
118002017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11801
11802 * bsd-uthread.c (bsd_uthread_fetch_registers,
11803 bsd_uthread_store_registers): Use ptid from regcache, set and
11804 restore inferior_ptid.
11805
9ac8a7c2
SM
118062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11807
11808 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11809 fetch_fp_regs, store_register, store_regs, store_fp_register,
11810 store_fp_regs): Use ptid from regcache.
11811
4ac4bb6a
SM
118122017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11813
11814 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11815 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11816 store_vfp_regs): Use ptid from regcache.
11817
9bcbdca8
PA
118182017-03-17 Pedro Alves <palves@redhat.com>
11819
11820 PR remote/21188
11821 * ser-base.c (ser_base_wait_for): Add comment.
11822 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11823 version.
11824 * ser-unix.c (hardwire_raw): Remove reference to
11825 scb->current_timeout.
11826 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11827 (hardwire_ops): Install ser_base_readchar instead of
11828 hardwire_readchar.
11829 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11830 Remove fields.
11831
7503099f
JG
118322017-03-17 Jonah Graham <jonah@kichwacoders.com>
11833
11834 PR gdb/19637
11835 * python/lib/gdb/printer/bound_registers.py: Add support for
11836 Python 3.
11837
7942e96e
AA
118382017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11839
11840 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11841 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11842 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11843 byte_offset to subobj_byte_offset. Fix the handling of
11844 DWARF_VALUE_STACK on big-endian targets when coming via an
11845 implicit pointer.
11846 (dwarf2_evaluate_loc_desc): Adjust call to
11847 dwarf2_evaluate_loc_desc_full.
11848 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11849 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11850
ba14f379
YQ
118512017-03-16 Yao Qi <yao.qi@linaro.org>
11852
11853 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11854 and REVSH instructions.
11855
b121eeb9
YQ
118562017-03-16 Yao Qi <yao.qi@linaro.org>
11857
11858 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11859 (arm_record_test): Declare.
11860 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11861 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11862 align with the manual.
11863 (thumb_record_misc): Adjust the code order to align with the
11864 manual.
11865 (thumb2_record_decode_insn_handler): Fix instruction matching.
11866 (instruction_reader_thumb): New class.
11867 (arm_record_test): New function.
11868
728a7913
YQ
118692017-03-16 Yao Qi <yao.qi@linaro.org>
11870
11871 * arm-tdep.c (abstract_memory_reader): New class.
11872 (instruction_reader): New class.
11873 (extract_arm_insn): Add argument 'reader'. Callers updated.
11874 (decode_insn): Likewise.
11875
34b43320
DE
118762017-03-16 Doug Evans <dje@google.com>
11877
a7c0469f
DE
11878 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11879 member. Change type of TYPE member to SCM. All uses updated.
11880 (lsscm_make_lazy_string_smob): Add assert.
11881 (lsscm_make_lazy_string): Flag bad length values.
11882 (lsscm_elt_type): New function.
11883 (gdbscm_lazy_string_to_value): Rewrite to use
11884 lsscm_safe_lazy_string_to_value.
11885 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11886 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11887 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11888 in incoming type.
11889 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11890 * guile/scm-type.c (tyscm_scm_to_type): New function.
11891
118922017-03-15 Doug Evans <dje@google.com>
11893
34b43320
DE
11894 PR python/17728, python/18439, python/18779
11895 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11896 member. Change type of TYPE member to PyObject *. All uses updated.
11897 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11898 (gdbpy_create_lazy_string_object): Flag bad length values.
11899 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11900 Handle typedefs in incoming type.
11901 (stpy_lazy_string_elt_type): New function.
11902 (gdbpy_extract_lazy_string): Call it.
11903 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11904 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11905 typedefs in incoming type.
11906
a3a5fecc
DE
119072017-03-16 Doug Evans <dje@google.com>
11908
11909 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11910 * guile/scm-type.c (tyscm_scm_to_type): New function.
11911
28f1c605
JW
119122017-03-16 Jiong Wang <jiong.wang@arm.com>
11913
11914 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11915 "ULONGEST" for "skip".
11916
87c336f6
AA
119172017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11918
11919 PR gdb/21220
11920 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11921 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11922 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11923 over ptrace peek/poke until end of buffer or error.
11924
cf81cf60
SM
119252017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11926
11927 * parse.c (length_of_subexp): Make static.
11928 * parser-defs.h (length_of_subexp): Remove.
11929
a379284a
AA
119302017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11931
11932 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11933 as well.
11934
8a6200ba
PA
119352017-03-14 Pedro Alves <palves@redhat.com>
11936
11937 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11938 (main): Use std::unique_ptr. Remove calls to
11939 cp_demangled_name_parse_free.
11940
f79ec206
SM
119412017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11942
11943 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11944 alphabsd_store_inferior_registers): Use regcache->ptid instead
11945 of inferior_ptid.
11946
edb5fb00
SM
119472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11948
11949 * aix-thread.c (aix_thread_fetch_registers,
11950 aix_thread_store_registers): Use regcache->ptid instead of
11951 inferior_ptid.
11952
55119686
SM
119532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11954
11955 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11956 store_gregs_to_thread, fetch_fpregs_from_thread,
11957 store_fpregs_to_thread): Use regcache->ptid instead of
11958 inferior_ptid.
11959
6a06fbb7
SM
119602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11961
11962 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11963 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11964 instead of inferior_ptid.
11965
c6386875
SM
119662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11967
11968 * target.c (target_fetch_registers, target_store_registers): Add
11969 assert.
11970
ddaaf0fb
SM
119712017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11972
11973 * regcache.h (regcache_get_ptid): New function.
11974 * regcache.c (regcache_get_ptid): New function.
11975
b9da89d1 119762017-03-13 Mark Wielaard <mark@klomp.org>
11977
11978 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
11979
5f4d1085
KS
119802017-03-10 Keith Seitz <keiths@redhat.com>
11981
11982 PR c++/8218
11983 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
11984
c65d6b55
PA
119852017-03-08 Pedro Alves <palves@redhat.com>
11986
11987 PR gdb/18360
11988 * infrun.c (start_step_over, do_target_resume, resume)
11989 (restart_threads): Assert we're not resuming a thread that is
11990 meant to be stopped.
11991 (infrun_thread_stop_requested_callback): Delete.
11992 (infrun_thread_stop_requested): If the thread is internally
11993 stopped, queue a pending stop event and clear the thread's
11994 inline-frame state.
11995 (handle_stop_requested): New function.
11996 (handle_syscall_event, handle_inferior_event_1): Use
11997 handle_stop_requested.
11998 (handle_stop_requested): New function.
11999 (handle_signal_stop): Set the thread's stop_signal here instead of
12000 at caller.
12001 (finish_step_over): Clear step over info unconditionally.
12002 (handle_signal_stop): If the user had interrupted the event
12003 thread, consider the stop a random signal.
12004 (handle_signal_stop) <signal arrived while stepping over
12005 breakpoint>: Don't restart threads here.
12006 (stop_waiting): Don't clear step-over info here.
12007
15c22686
PA
120082017-03-08 Pedro Alves <palves@redhat.com>
12009
12010 PR 21206
12011 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12012 goes to argument 2, not 1.
12013
6e5d74e7
PA
120142017-03-08 Pedro Alves <palves@redhat.com>
12015
12016 PR cli/21218
12017 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12018 display_gdb_prompt.
12019 (command_line_input): Add comment.
12020
9753a2f6
PA
120212017-03-08 Pedro Alves <palves@redhat.com>
12022
12023 PR tui/21216
12024 * tui/tui-file.c (tui_file::write): New.
12025 * tui/tui-file.h (tui_file): Override "write".
12026 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12027 factored out from ...
12028 (tui_puts): ... here.
12029 (tui_putc): Use them.
12030 (tui_write): New function.
12031 * tui/tui-io.h (tui_write): Declare.
12032
1672e0d9
SDJ
120332017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12034
12035 * Makefile.in (SFILES): Replace "environ.c" with
12036 "common/environ.c".
12037 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12038 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12039 to...
12040 * common/environ.c: ... here.
12041 * environ.h: Moved to...
12042 * common/environ.h: ... here.
12043
f7bb4e3a
PB
120442017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12045
12046 * gdbarch.sh (pstring_ptr): New static function.
12047 (gdbarch_disassembler_options): Use it.
12048 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12049 not valid_disassembler_option->name.
12050 * gdbarch.c: Regenerate.
12051
e45ced6c
PB
120522017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12053
12054 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12055
5f6fd321
PA
120562017-03-07 Pedro Alves <palves@redhat.com>
12057
12058 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12059
6dbb839a 120602017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
12061
12062 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12063 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12064 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 12065 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 12066
d274ecf4
SM
120672017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12068
12069 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12070
df97be55
SM
120712017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12072
12073 * remote.c (remote_add_target_side_commands): Use range-based
12074 for loop.
12075
7d45f3df
YQ
120762017-03-03 Yao Qi <yao.qi@linaro.org>
12077
12078 PR gdb/21165
12079 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12080 value is lazy.
12081 * valprint.c (common_val_print): Likewise.
12082
65b48a81
PB
120832017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12084
12085 * NEWS: Mention new set/show disassembler-options commands.
12086 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12087 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12088 (prospective_options): New static variable.
12089 (gdb_disassembler::gdb_disassembler): Initialize
12090 m_di.disassembler_options.
12091 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12092 (get_disassembler_options): New function.
12093 (set_disassembler_options): Likewise.
12094 (set_disassembler_options_sfunc): Likewise.
12095 (show_disassembler_options_sfunc): Likewise.
12096 (disassembler_options_completer): Likewise.
12097 (_initialize_disasm): Likewise.
12098 * disasm.h (get_disassembler_options): New prototype.
12099 (set_disassembler_options): Likewise.
12100 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12101 (gdbarch_verify_disassembler_options): Likewise.
12102 * gdbarch.c: Regenerate.
12103 * gdbarch.h: Likewise.
12104 * arm-tdep.c (num_disassembly_options): Delete.
12105 (set_disassembly_style): Likewise.
12106 (arm_disassembler_options): New static variable.
12107 (set_disassembly_style_sfunc): Convert short style name into long
12108 option name. Call set_disassembler_options.
12109 (show_disassembly_style_sfunc): New function.
12110 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12111 set_gdbarch_verify_disassembler_options.
12112 (_initialize_arm_tdep): Delete regnames variable and update callers.
12113 (arm_disassembler_options): Initialize.
12114 (disasm_options): New variable.
12115 (num_disassembly_options): Rename from this...
12116 (num_disassembly_styles): ...to this. Compute by scanning through
12117 disasm_options.
12118 (valid_disassembly_styles): Initialize using disasm_options.
12119 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12120 set_arm_regname_option.
12121 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12122 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12123 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12124 set_gdbarch_verify_disassembler_options.
12125 * s390-tdep.c (s390_disassembler_options): New static variable.
12126 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12127 set_gdbarch_verify_disassembler_options.
12128
d538e36d
SM
121292017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12130
12131 * remote.c (remote_add_target_side_condition): Remove "struct"
12132 keyword from range-based for loop.
12133
83621223
SM
121342017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12135
12136 * remote.c (remote_add_target_side_condition): Use range-based
12137 for loop. Update comment.
12138
2123df0e
YQ
121392017-02-27 Yao Qi <yao.qi@linaro.org>
12140
12141 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12142
8e368124
AH
121432017-02-26 Alan Hayward <alan.hayward@arm.com>
12144
12145 * regcache.c (regcache_raw_update): New function.
12146 (regcache_raw_read): Move code to regcache_raw_update.
12147 * regcache.h (regcache_raw_update): New declaration.
12148 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12149
a49dd8dd
JK
121502017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12151
12152 * dwarf2read.c (create_debug_type_hash_table): Initialize
12153 header.signature and header.type_offset_in_tu.
12154
34e4bae9
PA
121552017-02-24 Pedro Alves <palves@redhat.com>
12156
12157 * symtab.c (make_file_symbol_completion_list_1): Use
12158 add_symtab_completions.
12159
b0e4b369
AH
121602017-02-24 Alan Hayward <alan.hayward@arm.com>
12161
12162 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12163
975c21ab
AH
121642017-02-24 Alan Hayward <alan.hayward@arm.com>
12165
12166 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12167 I386_MAX_REGISTER_SIZE.
12168 (i386_pseudo_register_write): Likewise.
12169 (i386_process_record): Likewise.
12170 * i387-tdep.c (i387_supply_xsave): Likewise.
12171 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12172 (store_register): Likewise.
12173
14bc53a8
PA
121742017-02-23 Pedro Alves <palves@redhat.com>
12175
12176 * ada-lang.c: Include "common/function-view.h".
12177 (ada_iterate_over_symbols): Adjust to use function_view as
12178 callback type.
12179 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12180 (ada_make_symbol_completion_list): Use a lambda.
12181 (ada_exc_search_name_matches): Delete.
12182 (name_matches_regex): New.
12183 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12184 * compile/compile-c-support.c: Include "common/function-view.h".
12185 (print_one_macro): Change prototype to accept a ui_file pointer.
12186 (write_macro_definitions): Use a lambda.
12187 * dwarf2read.c: Include "common/function-view.h".
12188 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12189 (dw2_expand_symtabs_matching): Adjust to use function_view as
12190 callback type.
12191 * language.h: Include "common/function-view.h".
12192 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12193 function_view as callback type.
12194 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12195 * linespec.c: Include "common/function-view.h".
12196 (collect_info::add_symbol): New method.
12197 (struct symbol_and_data_callback, iterate_inline_only, struct
12198 symbol_matcher_data, iterate_name_matcher): Delete.
12199 (iterate_over_all_matching_symtabs): Adjust to use function_view
12200 as callback type and lambdas.
12201 (iterate_over_file_blocks): Adjust to use function_view as
12202 callback type.
12203 (decode_compound_collector): Now a class with private fields.
12204 (decode_compound_collector::release_symbols): New method.
12205 (collect_one_symbol): Rename to...
12206 (decode_compound_collector::operator()): ... this and adjust.
12207 (lookup_prefix_sym): decode_compound_collector construction bits
12208 move to decode_compound_collector ctor. Pass the
12209 decode_compound_collector object directly as callback. Remove
12210 cleanups and use decode_compound_collector::release_symbols
12211 instead.
12212 (symtab_collector): Now a class with private fields.
12213 (symtab_collector::release_symtabs): New method.
12214 (add_symtabs_to_list): Rename to...
12215 (symtab_collector::operator()): ... this and adjust.
12216 (collect_symtabs_from_filename): symtab_collector construction
12217 bits move to symtab_collector ctor. Pass the symtab_collector
12218 object directly as callback. Remove cleanups and use
12219 symtab_collector::release_symtabs instead.
12220 (collect_symbols): Delete.
12221 (add_matching_symbols_to_info): Use lambdas.
12222 * macrocmd.c (print_macro_callback): Delete.
12223 (info_macro_command): Use a lambda.
12224 (info_macros_command): Pass print_macro_definition as callable
12225 directly.
12226 (print_one_macro): Remove 'ignore' parameter.
12227 (macro_list_command): Adjust.
12228 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12229 (macro_for_each_data::user_data): Delete field.
12230 (foreach_macro): Adjust to call the function_view.
12231 (macro_for_each): Adjust to use function_view as callback type.
12232 (foreach_macro_in_scope): Adjust to call the function_view.
12233 (macro_for_each_in_scope): Adjust to use function_view as callback
12234 type.
12235 * macrotab.h: Include "common/function-view.h".
12236 (macro_callback_fn): Declare a prototype instead of a pointer.
12237 Remove "user_data" parameter.
12238 (macro_for_each, macro_for_each_in_scope): Adjust to use
12239 function_view as callback type.
12240 * psymtab.c (partial_map_expand_apply)
12241 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12242 Adjust to use function_view as callback type and to return bool.
12243 (psym_expand_symtabs_matching): Adjust to use function_view as
12244 callback types.
12245 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12246 to use function_view as callback type and to return bool.
12247 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12248 callback types.
12249 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12250 as callback types.
12251 * symfile.h: Include "common/function-view.h".
12252 (expand_symtabs_file_matcher_ftype)
12253 (expand_symtabs_symbol_matcher_ftype)
12254 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12255 return bool.
12256 (quick_symbol_functions::map_symtabs_matching_filename)
12257 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12258 function_view as callback type and return bool.
12259 (expand_symtabs_matching): Adjust to use function_view as callback
12260 type.
12261 (maintenance_expand_name_matcher)
12262 (maintenance_expand_file_matcher): Delete.
12263 (maintenance_expand_symtabs): Use lambdas.
12264 * symtab.c (iterate_over_some_symtabs): Adjust to use
12265 function_view as callback types and return bool.
12266 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12267 of a cleanup.
12268 (lookup_symtab_callback): Delete.
12269 (lookup_symtab): Use a lambda.
12270 (iterate_over_symbols): Adjust to use function_view as callback
12271 type.
12272 (struct search_symbols_data, search_symbols_file_matches)
12273 (search_symbols_name_matches): Delete.
12274 (search_symbols): Use a pair of lambdas.
12275 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12276 (symtab_expansion_callback): Delete.
12277 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12278 * symtab.h: Include "common/function-view.h".
12279 (iterate_over_some_symtabs): Adjust to use function_view as
12280 callback type and return bool.
12281 (iterate_over_symtabs): Adjust to use function_view as callback
12282 type.
12283 (symbol_found_callback_ftype): Remove 'data' parameter and return
12284 bool.
12285 (iterate_over_symbols): Adjust to use function_view as callback
12286 type.
12287
07e253aa
PA
122882017-02-23 Pedro Alves <palves@redhat.com>
12289
12290 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12291 (%.o) <unittests/%.c>: New pattern.
12292 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12293 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12294 * common/function-view.h: New file.
12295 * unittests/function-view-selftests.c: New file.
12296 * configure: Regenerate.
12297
8eaf5320
SM
122982017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12299
12300 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12301 inferior_ptid.
12302 * go32-nat.c (go32_thread_alive): Likewise.
12303
38768751
YQ
123042017-02-23 Yao Qi <yao.qi@linaro.org>
12305
12306 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12307 delete.
12308
0a8beaba
YQ
123092017-02-23 Yao Qi <yao.qi@linaro.org>
12310
12311 * varobj.c (varobj_clear_saved_item): Use delete instead of
12312 xfree.
12313 (update_dynamic_varobj_children): Likewise.
12314
58fdfd2c
JK
123152017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12316
12317 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12318
1b90b139
SM
123192017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12320
12321 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12322 m_enum_value to 0 in default constructor.
12323
2039d74e
EBM
123242017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12325
12326 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12327 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12328 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12329 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12330 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12331 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12332 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12333 IS_STORE_CONDITIONAL_INSN.
12334
7814882a
JK
123352017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12336
12337 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12338
0ae60b63
JK
123392017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12340
12341 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12342
0224619f
JK
123432017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12344
12345 * dwarf2read.c (skip_one_die, read_attribute_value)
12346 (dwarf2_const_value_attr, dump_die_shallow)
12347 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12348 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12349
0af92d60
JK
123502017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12351
12352 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12353 (dwarf_parse_macro_header): Accept DWARF version 5.
12354 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12355
216f72a1
JK
123562017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12357
12358 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12359 DW_AT_GNU_*.
12360 * common/common-exceptions.h (enum errors): Likewise.
12361 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12362 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12363 (dwarf_expr_context::execute_stack_op): Likewise.
12364 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12365 Likewise.
12366 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12367 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12368 (show_entry_values_debug, call_site_to_target_addr)
12369 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12370 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12371 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12372 (value_of_dwarf_block_entry, indirect_pieced_value)
12373 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12374 (disassemble_dwarf_expression): Likewise.
12375 * dwarf2read.c (process_die, inherit_abstract_dies)
12376 (read_call_site_scope): Likewise.
12377 * gdbtypes.h (struct func_type, struct call_site_parameter)
12378 (struct call_site): Likewise.
12379 * stack.c (read_frame_arg): Likewise.
12380 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12381
43988095
JK
123822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12383
12384 * defs.h (read_unsigned_leb128): New declaration.
12385 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12386 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12387 (dwarf2_find_location_expression): Call also
12388 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12389 * dwarf2loc.h (dwarf2_version): New declaration.
12390 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12391 rnglists.
12392 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12393 .debug_rnglists.
12394 (struct dwop_section_names): Add loclists_dwo.
12395 (dwop_section_names): Add .debug_loclists.dwo.
12396 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12397 (struct dwarf2_per_cu_data): Add dwarf_version.
12398 (struct dwo_sections): Add loclists.
12399 (struct attr_abbrev): Add implicit_const.
12400 (read_indirect_line_string): New declaration.
12401 (read_unsigned_leb128): Delete declaration.
12402 (rcuh_kind): New definition.
12403 (read_and_check_comp_unit_head): Change parameter
12404 is_debug_types_section to section_kind.
12405 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12406 (read_comp_unit_head): Change parameter abfd to section, add parameter
12407 section_kind. Handle DWARF-5.
12408 (error_check_comp_unit_head): Accept also DWARF version 5.
12409 (read_and_check_comp_unit_head): Change parameter
12410 is_debug_types_section to section_kind.
12411 (read_and_check_type_unit_head): Delete function.
12412 (read_abbrev_offset): Handle DWARF-5.
12413 (create_debug_type_hash_table): Add parameter section_kind. Process
12414 only DW_UT_type. Use signature and type_offset_in_tu from struct
12415 comp_unit_head.
12416 (create_debug_types_hash_table): Update create_debug_type_hash_table
12417 caller.
12418 (create_all_type_units): Call create_debug_type_hash_table.
12419 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12420 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12421 caller.
12422 (skip_one_die): Handle DW_FORM_implicit_const.
12423 (dwarf2_rnglists_process): New function.
12424 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12425 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12426 (read_attribute_value): Handle DW_FORM_implicit_const,
12427 DW_FORM_line_strp.
12428 (read_attribute): Handle DW_FORM_implicit_const.
12429 (read_indirect_string_at_offset_from): New function from
12430 read_indirect_string_at_offset.
12431 (read_indirect_string_at_offset): Call
12432 read_indirect_string_at_offset_from.
12433 (read_indirect_line_string_at_offset): New function.
12434 (read_indirect_string): New function comment.
12435 (read_indirect_line_string): New function.
12436 (read_unsigned_leb128): Make it global.
12437 (dwarf2_string_attr): Handle DWARF-5.
12438 (add_include_dir_stub, read_formatted_entries): New functions.
12439 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12440 Handle DWARF-5.
12441 (per_cu_header_read_in): Update read_comp_unit_head caller.
12442 (dwarf2_version): New function.
12443 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12444 rnglists.
12445 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12446 fields.
12447
22d2f3ab
JK
124482017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12449
12450 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12451
5f46c5a5
JK
124522017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12453
12454 * dwarf2read.c (dwarf2_ranges_process): New function from
12455 dwarf2_ranges_read.
12456 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12457 dwarf2_ranges_process.
12458
78d4d2c5
JK
124592017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12460
12461 * dwarf2read.c (create_debug_type_hash_table): New function from
12462 create_debug_types_hash_table.
12463 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12464 (create_all_type_units, open_and_init_dwo_file): Update
12465 create_debug_types_hash_table callers.
12466
1b076f25
SDJ
124672017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12468
12469 PR gdb/16188
12470 * fork-child.c (trace_start_error): Fix thinko. va_end should
12471 refer to 'ap', not 'args'.
12472
0db8980c
SDJ
124732017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12474 Pedro Alves <palves@redhat.com>
12475
12476 PR gdb/16188
12477 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12478 calls succeeded.
12479 * fork-child.c (trace_start_error): New function.
12480 (trace_start_error_with_name): Likewise.
12481 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12482 * inf-ptrace.c (inf_ptrace_me): Likewise.
12483 * inferior.h (trace_start_error): New prototype.
12484 (trace_start_error_with_name): Likewise.
12485
99e8a4f9
SDJ
124862017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12487
12488 PR gdb/21164
12489 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12490 NULL before using it.
12491 * symmisc.c (maintenance_print_symbols): Likewise.
12492 (maintenance_print_msymbols): Likewise.
12493
4e746bb6
TW
124942017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12495
12496 * NEWS: Add record Python bindings entry.
12497
124982017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12499
12500 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12501 py-record-full.o.
12502 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12503 * python/py-record-btrace.c, python/py-record-btrace.h,
12504 python/py-record-full.c, python/py-record-full.h: New file.
12505 * python/py-record.c: Add include for py-record-btrace.h and
12506 py-record-full.h.
12507 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12508 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12509 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12510 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12511 New definition.
12512 (gdbpy_initialize_btrace): New export.
12513 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12514
125152017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12516
12517 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12518 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12519 * python/py-record.c: New file.
12520 * python/python-internal.h (gdbpy_start_recording,
12521 gdbpy_current_recording, gdpy_stop_recording,
12522 gdbpy_initialize_record): New export.
12523 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12524 (python_GdbMethods): Add gdbpy_start_recording,
12525 gdbpy_current_recording and gdbpy_stop_recording.
12526
125272017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12528
12529 * record-btrace.c (record_btrace_record_method): New function.
12530 (init_record_btrace_ops): Initialize to_record_method.
12531 * record-full.c (record_full_record_method): New function.
12532 (init_record_full_ops, init_record_full_core_ops): Add
12533 record_full_record_method.
12534 * record.h (enum record_method): New enum.
12535 * target-debug.h (target_debug_print_enum_record_method: New define.
12536 * target-delegates.c: Regenerate.
12537 * target.c (target_record_method): New function.
12538 * target.h: Include record.h.
12539 (struct target_ops) <to_record_method>: New field.
12540 (target_record_method): New export.
12541
125422017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12543
12544 * record.h (record_start, record_stop): New export.
12545 * record.c (record_start, record_stop): New function.
12546
125472017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12548
12549 * btrace.c (btrace_fetch): Copy function call segments pointer
12550 into a vector.
12551 (btrace_clear): Clear the vector.
12552 (btrace_find_insn_by_number): Use binary search to find the correct
12553 function call segment.
12554 * btrace.h (brace_fun_p): New typedef.
12555 (struct btrace_thread_info) <functions>: New field.
12556
125572017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12558
12559 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12560 * btrace.c (btrace_decode_error): ... here. New function.
12561 * btrace.h (btrace_decode_error): New export.
12562
125632017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12564
12565 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12566 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12567 btrace_find_insn_by_number): Remove special case for gaps.
12568 * btrace.h (btrace_insn_get_error): New export.
12569 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12570 * record-btrace.c (btrace_insn_history): Print number for gaps.
12571 (record_btrace_info, record_btrace_goto): Handle gaps.
12572
3f77c769
TT
125732017-02-14 Tom Tromey <tom@tromey.com>
12574
12575 PR python/13598:
12576 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12577 event.
12578 * python/py-evts.c (gdbpy_initialize_py_events): Add
12579 before_prompt registry.
12580 * python/py-events.h (events_object) <before_prompt>: New field.
12581
4c2c7ac6
MM
125822017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12583
12584 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12585
5cf30ebf
LM
125862017-02-13 Luis Machado <lgustavo@codesourcery.com>
12587
12588 * symfile (_initialize_symfile): Add usage text to the load command's
12589 help text.
12590
26a06916
SM
125912017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12592
12593 * utils.c (defaulted_query): Don't query on secondary UIs.
12594
0b145e37
TT
125952017-02-10 Tom Tromey <tom@tromey.com>
12596
12597 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12598
2d8365c4
TT
125992017-02-10 Tom Tromey <tom@tromey.com>
12600
12601 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12602 "cleanup" local.
12603 * python/py-type.c (typy_legacy_template_argument): Remove
12604 unnecessary "cleanup" local.
12605
2bb8f231
TT
126062017-02-10 Tom Tromey <tom@tromey.com>
12607
12608 * python/python.c (do_start_initialization): New function, from
12609 _initialize_python.
12610 (_initialize_python): Call do_start_initialization.
12611 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12612 goto.
12613
1bdfaf42
TT
126142017-02-10 Tom Tromey <tom@tromey.com>
12615
12616 * python/py-prettyprint.c (pretty_print_one_value): Use
12617 gdbpy_ref.
12618
88b6faea
TT
126192017-02-10 Tom Tromey <tom@tromey.com>
12620
12621 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12622 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12623 gdbpy_ref.
12624 * python/py-type.c (field_new): Use gdbpy_ref.
12625 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12626 gdbpy_ref.
12627 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12628 (py_free_pspace): Likewise.
12629 (pspace_to_pspace_object): Likewise.
12630 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12631 (py_free_objfile): Likewise.
12632 (objfile_to_objfile_object): Likewise.
12633 * python/py-inferior.c (delete_thread_object): Use
12634 gdbpy_ref.
12635 (infpy_read_memory): Likewise.
12636 (py_free_inferior): Likewise.
12637 * python/py-evtregistry.c (create_eventregistry_object): Use
12638 gdbpy_ref.
12639 * python/py-event.c (create_event_object): Use gdbpy_ref.
12640
7780f186
TT
126412017-02-10 Tom Tromey <tom@tromey.com>
12642
12643 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12644 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12645 used.
12646 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12647 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12648 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12649 python/py-framefilter.c, python/py-function.c,
12650 python/py-inferior.c, python/py-infevents.c,
12651 python/py-linetable.c, python/py-newobjfileevent.c,
12652 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12653 python/py-signalevent.c, python/py-stopevent.c,
12654 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12655 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12656 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12657 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12658
d4b0bb18
TT
126592017-02-10 Tom Tromey <tom@tromey.com>
12660
12661 * ui-out.h (ui_out_emit_type): New class.
12662 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12663 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12664 and ui_out_emit_tuple.
12665 (enumerate_locals): Likewise.
12666 (py_mi_print_variables, py_print_locals, py_print_args): Use
12667 ui_out_emit_list.
12668 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12669 ui_out_emit_list.
12670 * common/gdb_optional.h: New file.
12671
f67f945c
MG
126722017-02-10 Martin Galvan <martingalvan@sourceware.org>
12673
12674 * MAINTAINERS (Write After Approval): Update my e-mail address.
12675
18da0c51
MG
126762017-02-10 Martin Galvan <martingalvan@sourceware.org>
12677
12678 PR gdb/21122
12679 * breakpoint.c (_initialize_breakpoint): Update the help description
12680 of the 'commands' command to indicate that it takes a list argument.
12681
62c14536
SM
126822017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12683
12684 * interps.c (current_interp_set_logging): Remove "return".
12685
ff6fa247
GB
126862017-02-09 Gary Benson <gbenson@redhat.com>
12687
12688 * symtab.c (add_symtab_completions): Prevent NULL pointer
12689 dereference.
12690
a474bd8e
PA
126912017-02-08 Pedro Alves <palves@redhat.com>
12692
12693 * interps.c (interp::interp): Remove reference to quiet_p.
12694 (interp_set): Make static. Remove dead "Switching to" output
12695 code.
12696 (interp_quiet_p, interp_set_quiet): Delete.
12697 (interpreter_exec_cmd): Don't set the interpreter quiet.
12698 * interps.h (interp_quiet_p): Make static.
12699 (class interp) <quiet_p>: Remove field
12700
3d7b173c
JG
127012017-02-08 Jerome Guitton <guitton@adacore.com>
12702
604c4576
JG
12703 * cli/cli-decode.c (find_command_name_length): Make it extern.
12704 * cli/cli-decode.h (find_command_name_length): Declare.
12705 * cli/cli-script.c (command_name_equals, line_first_arg):
12706 New functions.
12707 (process_next_line): Use cli-decode to parse command names.
12708 (build_command_line): Make args a constant pointer.
12709
127102017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 12711
3d7b173c
JG
12712 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12713 Remove case-insensitive search.
12714
1291063d
JM
127152017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12716
12717 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12718 at the end of the line. Avoids an ARI warning.
12719
20b477a7
LM
127202017-02-06 Luis Machado <lgustavo@codesourcery.com>
12721
12722 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12723 rdseed instructions.
12724 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12725
3f7b46f2
IR
127262017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12727
12728 PR tdep/20936
12729 Provide and use sparc32 and sparc64 target description XML files.
12730 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12731 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12732 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12733 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12734 * features/sparc/sparc32-solaris.xml: New file.
12735 * features/sparc/sparc64-solaris.xml: New file.
12736 * features/sparc/sparc32-solaris.c: Generated.
12737 * features/sparc/sparc64-solaris.c: Generated.
12738 * sparc-tdep.h: Account for differences in target descriptions.
12739 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12740 (sparc32_register_type): Use target provided registers.
12741 (validate_tdesc_registers): New function.
12742 (sparc32_gdbarch_init): Use tdesc_has_registers.
12743 Set pseudoregister functions.
12744 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12745 (sparc64_register_type): Use target provided registers.
12746 (sparc64_init_abi): Set pseudoregister functions.
12747
f0fd41c1
TT
127482017-02-03 Tom Tromey <tom@tromey.com>
12749
12750 PR rust/21097:
12751 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12752 with a single member.
12753
d6f9b0fb
PA
127542017-02-03 Pedro Alves <palves@redhat.com>
12755
12756 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12757 (cli_interp_base::~cli_interp_base): New.
12758 (cli_interp): New struct.
12759 (as_cli_interp): Cast the interp itself to cli_interp.
12760 (cli_interpreter_pre_command_loop): Rename to ...
12761 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12762 parameter.
12763 (cli_interpreter_init): Rename to ...
12764 (cli_interp::init): ... this. Remove 'self' parameter. Use
12765 boolean. Make extern.
12766 (cli_interpreter_resume): Rename to ...
12767 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12768 extern.
12769 (cli_interpreter_suspend): Rename to ...
12770 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12771 extern.
12772 (cli_interpreter_exec): Rename to ...
12773 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12774 extern.
12775 (cli_interpreter_supports_command_editing): Rename to ...
12776 (cli_interp_base::supports_command_editing): ... this. Remove
12777 'interp' parameter. Make extern.
12778 (cli_ui_out): Rename to ...
12779 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12780 Make extern.
12781 (cli_set_logging): Rename to ...
12782 (cli_interp_base::set_logging): ... this. Remove 'interp'
12783 parameter. Make extern.
12784 (cli_interp_procs): Delete.
12785 (cli_interp_factory): Adjust to use "new".
12786 * cli/cli-interp.h: Include "interps.h".
12787 (struct cli_interp_base): New struct.
12788 * interps.c (struct interp): Delete. Fields moved to interps.h.
12789 (interp_new): Delete.
12790 (interp::interp, interp::~interp): New.
12791 (interp_set): Use bool, and return void. Assume the interpreter
12792 has suspend, init and resume methods, and that the all return
12793 void.
12794 (set_top_level_interpreter): interp_set returns void.
12795 (interp_ui_out): Adapt.
12796 (current_interp_set_logging): Adapt.
12797 (interp_data): Delete.
12798 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12799 (interp_exec): Adapt.
12800 (top_level_interpreter_data): Delete.
12801 * interps.h (interp_init_ftype, interp_resume_ftype)
12802 (interp_suspend_ftype, interp_exec_ftype)
12803 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12804 (class interp): New.
12805 (interp_new): Delete.
12806 (interp_set): Now returns void. Use bool.
12807 (interp_data, top_level_interpreter_data): Delete.
12808 * mi/mi-common.h: Include interps.h.
12809 (class mi_interp): Inherit from interp. Define a ctor. Declare
12810 init, resume, suspect, exec, interp_ui_out, set_logging and
12811 pre_command_loop methods.
12812 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12813 (mi_interpreter_init): Rename to ...
12814 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12815 bool, return void and make extern. Adjust.
12816 (mi_interpreter_resume): ... Rename to ...
12817 (mi_interp::resume): ... this. Remove the 'data' parameter,
12818 return void and make extern. Adjust.
12819 (mi_interpreter_suspend): ... Rename to ...
12820 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12821 return void and make extern. Adjust.
12822 (mi_interpreter_exec): ... Rename to ...
12823 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12824 extern. Adjust.
12825 (mi_interpreter_pre_command_loop): ... Rename to ...
12826 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12827 parameter and make extern.
12828 (mi_on_normal_stop_1): Adjust.
12829 (mi_ui_out): Rename to ...
12830 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12831 parameter and make extern. Adjust.
12832 (mi_set_logging): Rename to ...
12833 (mi_interp::set_logging): ... this. Remove the 'interp'
12834 parameter and make extern. Adjust.
12835 (mi_interp_procs): Delete.
12836 (mi_interp_factory): Adjust to use 'new'.
12837 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12838 (mi_print_exception, mi_execute_command, mi_load_progress):
12839 Adjust.
12840 * tui/tui-interp.c (tui_interp): New class.
12841 (as_tui_interp): Return a tui_interp pointer.
12842 (tui_on_normal_stop, tui_on_signal_received)
12843 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12844 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12845 to use interp::interp_ui_out.
12846 (tui_init): Rename to ...
12847 (tui_interp::init): ... this. Remove the 'self' parameter, use
12848 bool, return void and make extern. Adjust.
12849 (tui_resume): Rename to ...
12850 (tui_interp::resume): ... this. Remove the 'data' parameter,
12851 return void and make extern. Adjust.
12852 (tui_suspend): Rename to ...
12853 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12854 return void and make extern. Adjust.
12855 (tui_ui_out): Rename to ...
12856 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12857 parameter, and make extern. Adjust.
12858 (tui_exec): Rename to ...
12859 (tui_interp::exec): ... this. Remove the 'data' parameter and
12860 make extern.
12861 (tui_interp_procs): Delete.
12862 (tui_interp_factory): Use "new".
12863
65c40c95
TT
128642017-02-02 Tom Tromey <tom@tromey.com>
12865
12866 * rust-exp.y (ends_raw_string, space_then_number)
12867 (rust_identifier_start_p): Return bool.
12868 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12869 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12870 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12871 (rust_chartype_p): Return bool.
12872 (val_print_struct, rust_print_struct_def, rust_print_type):
12873 Update.
12874 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12875 Return bool.
12876
b50f188d
TT
128772017-02-02 Tom Tromey <tom@tromey.com>
12878
12879 * rust-lang.c: Reindent.
12880
03c85b11
TT
128812017-02-02 Tom Tromey <tom@tromey.com>
12882
12883 * rust-lang.h (rust_crate_for_block): Update.
12884 * rust-lang.c (rust_crate_for_block): Return std::string.
12885 (rust_get_disr_info): Use std:;string, not
12886 gdb::unique_xmalloc_ptr.
12887 * rust-exp.y (crate_name): Update.
12888
9b6da501
PA
128892017-02-02 Pedro Alves <palves@redhat.com>
12890
12891 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12892 field out of gdb_disassembler_test and make it static.
12893
ec4cb20b
PA
128942017-02-02 Pedro Alves <palves@redhat.com>
12895
12896 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12897 mi1_interp and mi_interp fields.
12898
5be5dbf0
PA
128992017-02-02 Pedro Alves <palves@redhat.com>
12900
616268b6
PA
12901 * cli/cli-interp.c (struct saved_output_files, saved_output):
12902 Moved from cli/cli-logging.c.
12903 (cli_set_logging): New function.
12904 (cli_interp_procs): Install cli_set_logging.
12905 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12906 Declare.
12907 * cli/cli-logging.c (struct saved_output_files, saved_output):
12908 Moved to cli/cli-interp.c.
12909 (pop_output_files): Don't save outputs here.
12910 (make_logging_output): New function.
12911 (handle_redirections): Don't build tee nor save previous outputs
12912 here.
12913 * interps.c (current_interp_set_logging): Change prototype.
12914 Assume there's always a set_logging_proc method installed.
12915 * interps.h (interp_set_logging_ftype): Change prototype.
12916 (current_interp_set_logging): Change prototype and adjust comment.
12917 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12918 use make_logging_output.
12919 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
129202017-02-02 Pedro Alves <palves@redhat.com>
12921
5be5dbf0
PA
12922 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12923 from ...
12924 (set_logging_overwrite): ... here.
12925 (logging_no_redirect_file): Delete.
12926 (set_logging_redirect): Don't handle redirection on the fly.
12927 Instead warn that "logging off" / "logging on" is necessary.
12928 (pop_output_files): Delete references to logging_no_redirect_file.
12929 (show_logging_command): Always speak in terms of what will happen
12930 once logging is reenabled.
12931
c99cc448
PA
129322017-02-02 Pedro Alves <palves@redhat.com>
12933
12934 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12935
8b172ce7
PA
129362017-02-02 Pedro Alves <palves@redhat.com>
12937
12938 * disasm.c (gdb_pretty_print_insn): Rename to ...
12939 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12940 Remove gdbarch parameter. Adapt to clear the object's buffers
12941 instead of allocating new buffers, and to print using the object's
12942 gdb_disassembler instead of calling gdb_print_insn.
12943 (dump_insns): Use gdb_pretty_print_disassembler.
12944 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12945 (gdb_pretty_print_disassembler): New class.
12946 * record-btrace.c (btrace_insn_history): Use
12947 gdb_pretty_print_disassembler.
12948
d7e74731
PA
129492017-02-02 Pedro Alves <palves@redhat.com>
12950
12951 * ada-lang.c (type_as_string): Use string_file.
12952 * ada-valprint.c (ada_print_floating): Use string_file.
12953 * ada-varobj.c (ada_varobj_scalar_image)
12954 (ada_varobj_get_value_image): Use string_file.
12955 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12956 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12957 * breakpoint.c (update_inserted_breakpoint_locations)
12958 (insert_breakpoint_locations, reattach_breakpoints)
12959 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12960 (print_it_watchpoint): Use string_file.
12961 (save_breakpoints): Use stdio_file.
12962 * c-exp.y (oper): Use string_file.
12963 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12964 tee_file.
12965 (pop_output_files): Use delete.
12966 (handle_redirections): Use stdio_file and tee_file.
12967 * cli/cli-setshow.c (do_show_command): Use string_file.
12968 * compile/compile-c-support.c (c_compute_program): Use
12969 string_file.
12970 * compile/compile-c-symbols.c (generate_vla_size): Take a
12971 'string_file &' instead of a 'ui_file *'.
12972 (generate_c_for_for_one_variable): Take a 'string_file &' instead
12973 of a 'ui_file *'. Use string_file.
12974 (generate_c_for_variable_locations): Take a 'string_file &'
12975 instead of a 'ui_file *'.
12976 * compile/compile-internal.h (generate_c_for_for_one_variable):
12977 Take a 'string_file &' instead of a 'ui_file *'.
12978 * compile/compile-loc2c.c (push, pushf, unary, binary)
12979 (print_label, pushf_register_address, pushf_register)
12980 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
12981 'ui_file *'. Adjust.
12982 * compile/compile.c (compile_to_object): Use string_file.
12983 * compile/compile.h (compile_dwarf_expr_to_c)
12984 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
12985 'ui_file *'.
12986 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
12987 (replace_typedefs_qualified_name): Use string_file and
12988 obstack_copy0.
12989 * disasm.c (gdb_pretty_print_insn): Use string_file.
12990 (gdb_disassembly): Adjust reference the null_stream global.
12991 (do_ui_file_delete): Delete.
12992 (gdb_insn_length): Use null_stream.
12993 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
12994 * dwarf2loc.c (dwarf2_compile_property_to_c)
12995 (locexpr_generate_c_location, loclist_generate_c_location): Take a
12996 'string_file &' instead of a 'ui_file *'.
12997 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
12998 * dwarf2read.c (do_ui_file_peek_last): Delete.
12999 (dwarf2_compute_name): Use string_file.
13000 * event-top.c (gdb_setup_readline): Use stdio_file.
13001 * gdbarch.sh (verify_gdbarch): Use string_file.
13002 * gdbtypes.c (safe_parse_type): Use null_stream.
13003 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13004 string_file.
13005 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13006 'string_file *' instead of a 'ui_file *'.
13007 (gdbscm_arch_disassemble): Use string_file.
13008 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13009 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13010 inherits from ui_file.
13011 (ioscm_file_port_delete, ioscm_file_port_rewind)
13012 (ioscm_file_port_put): Delete.
13013 (ioscm_file_port_write): Rename to ...
13014 (ioscm_file_port::write): ... this. Remove file_port_magic
13015 checks.
13016 (ioscm_file_port_new): Delete.
13017 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13018 ui_file_up.
13019 * guile/scm-type.c (tyscm_type_name): Use string_file.
13020 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13021 Use string_file.
13022 * infcmd.c (print_return_value_1): Use string_file.
13023 * infrun.c (print_target_wait_results): Use string_file.
13024 * language.c (add_language): Use string_file.
13025 * location.c (explicit_to_string_internal): Use string_file.
13026 * main.c (captured_main_1): Use null_file.
13027 * maint.c (maintenance_print_architecture): Use stdio_file.
13028 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13029 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13030 event_channel>: Change type to mi_console_file pointer.
13031 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13032 (mi_console_file_delete): Delete.
13033 (struct mi_console_file): Delete.
13034 (mi_console_file_magic): Delete.
13035 (mi_console_file_new): Delete.
13036 (mi_console_file::mi_console_file): New.
13037 (mi_console_file_delete): Delete.
13038 (mi_console_file_fputs): Delete.
13039 (mi_console_file::write): New.
13040 (mi_console_raw_packet): Delete.
13041 (mi_console_file::flush): New.
13042 (mi_console_file_flush): Delete.
13043 (mi_console_set_raw): Rename to ...
13044 (mi_console_file::set_raw): ... this.
13045 * mi/mi-console.h (class mi_console_file): New class.
13046 (mi_console_file_new, mi_console_set_raw): Delete.
13047 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13048 (mi_set_logging): Use delete and tee_file. Adjust.
13049 * mi/mi-main.c (output_register): Use string_file.
13050 (mi_cmd_data_evaluate_expression): Use string_file.
13051 (mi_cmd_data_read_memory): Use string_file.
13052 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13053 * mi/mi-out.c (mi_ui_out::main_stream): New.
13054 (mi_ui_out::rewind): Use main_stream and
13055 string_file.
13056 (mi_ui_out::put): Use main_stream and string_file.
13057 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13058 Allocate a 'string_file' instead.
13059 (mi_out_new): Don't allocate a mem_fileopen stream here.
13060 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13061 (mi_ui_out::main_stream): Declare method.
13062 * printcmd.c (eval_command): Use string_file.
13063 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13064 * python/py-arch.c (archpy_disassemble): Use string_file.
13065 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13066 * python/py-frame.c (frapy_str): Use string_file.
13067 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13068 Use string_file.
13069 * python/py-type.c (typy_str): Use string_file.
13070 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13071 * python/py-value.c (valpy_str): Use string_file.
13072 * record-btrace.c (btrace_insn_history): Use string_file.
13073 * regcache.c (regcache_print): Use stdio_file.
13074 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13075 * remote.c (escape_buffer): Use string_file.
13076 * rust-lang.c (rust_get_disr_info): Use string_file.
13077 * serial.c (serial_open_ops_1): Use stdio_file.
13078 (do_serial_close): Use delete.
13079 * stack.c (print_frame_arg): Use string_file.
13080 (print_frame_args): Remove local mem_fileopen stream, not used.
13081 (print_frame): Use string_file.
13082 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13083 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13084 Take a 'string_file *' instead of a 'ui_file *'.
13085 * top.c (new_ui): Use stdio_file and stderr_file.
13086 (free_ui): Use delete.
13087 (execute_command_to_string): Use string_file.
13088 (quit_confirm): Use string_file.
13089 * tracepoint.c (collection_list::append_exp): Use string_file.
13090 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13091 * tui/tui-file.c: Don't include "ui-file.h".
13092 (enum streamtype, struct tui_stream): Delete.
13093 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13094 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13095 (tui_file::tui_file): New method.
13096 (tui_file_fputs): Delete.
13097 (tui_file_get_strbuf): Delete.
13098 (tui_file::puts): New method.
13099 (tui_file_adjust_strbuf): Delete.
13100 (tui_file_flush): Delete.
13101 (tui_file::flush): New method.
13102 * tui/tui-file.h: Tweak intro comment.
13103 Include ui-file.h.
13104 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13105 (tui_file_adjust_strbuf): Delete declarations.
13106 (class tui_file): New class.
13107 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13108 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13109 (tui_register_format): Use string_stream.
13110 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13111 (tui_get_function_from_frame): Use string_file.
13112 * typeprint.c (type_to_string): Use string_file.
13113 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13114 (null_stream): New global.
13115 (ui_file_delete): Delete.
13116 (ui_file::ui_file): New.
13117 (null_file_isatty): Delete.
13118 (ui_file::~ui_file): New.
13119 (null_file_rewind): Delete.
13120 (ui_file::printf): New.
13121 (null_file_put): Delete.
13122 (null_file_flush): Delete.
13123 (ui_file::putstr): New.
13124 (null_file_write): Delete.
13125 (ui_file::putstrn): New.
13126 (null_file_read): Delete.
13127 (ui_file::putc): New.
13128 (null_file_fputs): Delete.
13129 (null_file_write_async_safe): Delete.
13130 (ui_file::vprintf): New.
13131 (null_file_delete): Delete.
13132 (null_file::write): New.
13133 (null_file_fseek): Delete.
13134 (null_file::puts): New.
13135 (ui_file_data): Delete.
13136 (null_file::write_async_safe): New.
13137 (gdb_flush, ui_file_isatty): Adjust.
13138 (ui_file_put, ui_file_rewind): Delete.
13139 (ui_file_write): Adjust.
13140 (ui_file_write_for_put): Delete.
13141 (ui_file_write_async_safe, ui_file_read): Adjust.
13142 (ui_file_fseek): Delete.
13143 (fputs_unfiltered): Adjust.
13144 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13145 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13146 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13147 (set_ui_file_data): Delete.
13148 (string_file::~string_file, string_file::write)
13149 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13150 (do_ui_file_as_string, ui_file_as_string): Delete.
13151 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13152 (struct mem_file): Delete.
13153 (mem_file_new): Delete.
13154 (stdio_file::stdio_file): New.
13155 (mem_file_delete): Delete.
13156 (stdio_file::stdio_file): New.
13157 (mem_fileopen): Delete.
13158 (stdio_file::~stdio_file): New.
13159 (mem_file_rewind): Delete.
13160 (stdio_file::set_stream): New.
13161 (mem_file_put): Delete.
13162 (stdio_file::open): New.
13163 (mem_file_write): Delete.
13164 (stdio_file_magic, struct stdio_file): Delete.
13165 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13166 (stdio_file::flush): New.
13167 (stdio_file_read): Rename to ...
13168 (stdio_file::read): ... this. Adjust.
13169 (stdio_file_write): Rename to ...
13170 (stdio_file::write): ... this. Adjust.
13171 (stdio_file_write_async_safe): Rename to ...
13172 (stdio_file::write_async_safe) ... this. Adjust.
13173 (stdio_file_fputs): Rename to ...
13174 (stdio_file::puts) ... this. Adjust.
13175 (stdio_file_isatty): Delete.
13176 (stdio_file_fseek): Delete.
13177 (stdio_file::isatty): New.
13178 (stderr_file_write): Rename to ...
13179 (stderr_file::write) ... this. Adjust.
13180 (stderr_file_fputs): Rename to ...
13181 (stderr_file::puts) ... this. Adjust.
13182 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13183 (stderr_file::stderr_file): New.
13184 (tee_file_magic): Delete.
13185 (struct tee_file): Delete.
13186 (tee_file::tee_file): New.
13187 (tee_file_new): Delete.
13188 (tee_file::~tee_file): New.
13189 (tee_file_delete): Delete.
13190 (tee_file_flush): Rename to ...
13191 (tee_file::flush): ... this. Adjust.
13192 (tee_file_write): Rename to ...
13193 (tee_file::write): ... this. Adjust.
13194 (tee_file::write_async_safe): New.
13195 (tee_file_fputs): Rename to ...
13196 (tee_file::puts): ... this. Adjust.
13197 (tee_file_isatty): Rename to ...
13198 (tee_file::isatty): ... this. Adjust.
13199 * ui-file.h (struct obstack, struct ui_file): Don't
13200 forward-declare.
13201 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13202 (ui_file_write_ftype)
13203 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13204 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13205 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13206 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13207 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13208 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13209 (set_ui_file_fseek): Delete.
13210 (ui_file_data, ui_file_delete, ui_file_rewind)
13211 (struct ui_file): New.
13212 (ui_file_up): New.
13213 (class null_file): New.
13214 (null_stream): Declare.
13215 (ui_file_write_for_put, ui_file_put): Delete.
13216 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13217 Delete.
13218 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13219 (gdb_fopen, tee_file_new): Delete.
13220 (struct string_file): New.
13221 (struct stdio_file): New.
13222 (stdio_file_up): New.
13223 (struct stderr_file): New.
13224 (class tee_file): New.
13225 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13226 of a 'ui_file *'. Adjust.
13227 * ui-out.h (class ui_out) <field_stream>: Likewise.
13228 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13229 (null_stream): Delete.
13230 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13231 Adjust.
13232 * utils.h (struct ui_file): Delete forward declaration..
13233 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13234 (error_stream): Take a 'string_file &' instead of a
13235 'ui_file *'.
13236 * varobj.c (varobj_value_get_print_value): Use string_file.
13237 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13238 * gdbarch.c: Regenerate.
13239
187808b0
PA
132402017-02-02 Pedro Alves <palves@redhat.com>
13241
13242 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13243 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13244 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13245 Adjust to call gdb_print_insn instead of
13246 gdb_disassembler::print_insn.
13247 (dump_insns, do_mixed_source_and_assembly_deprecated)
13248 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13249 'gdbarch' parameter. Remove gdb_disassembler parameter.
13250 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13251 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13252 declaration.
13253 (gdb_pretty_print_insn): Re-add declaration.
13254 * record-btrace.c (btrace_insn_history): Don't allocate a
13255 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13256
7a8eb317
SM
132572017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13258
13259 * disasm.h (gdb_disassembly): Remove file_string parameter.
13260 * disasm.c (gdb_disassembly): Likewise.
13261 * cli/cli-cmds.c (print_disassembly): Adapt.
13262 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13263 * stack.c (do_gdb_disassembly): Likewise.
13264
7346ef59
AA
132652017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13266
13267 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13268 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13269 targets. And if the implicit value is longer than needed, extract
13270 the first bytes instead of the "least significant" ones.
13271
cd4007e4
MM
132722017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13273
13274 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13275 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13276 (btrace_fetch): Assert can_access_registers_ptid.
13277 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13278 validate_registers_access.
13279
cf77c34e
MM
132802017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13281
13282 * gdbthread.h (can_access_registers_ptid): New.
13283 * thread.c (can_access_registers_ptid): New.
13284
be85ce7d
PA
132852017-02-01 Pedro Alves <palves@redhat.com>
13286
13287 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13288
29b0b251
PA
132892017-01-31 Pedro Alves <palves@redhat.com>
13290
13291 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13292 Fix typos.
13293
289b5b24
PA
132942017-01-31 Pedro Alves <palves@redhat.com>
13295
13296 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13297 not used.
13298
b47413b4
PA
132992017-01-31 Pedro Alves <palves@redhat.com>
13300
13301 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13302
60adb36c
PA
133032017-01-31 Pedro Alves <palves@redhat.com>
13304
13305 * common/scoped_restore.h
13306 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13307 change the value's parameter type to T2.
13308 (make_scoped_restore): Likewise.
13309
2735833d
WT
133102017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13311 Richard Henderson <rth@redhat.com>
13312
13313 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13314 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13315 GS_BASE for older kernels.
13316 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13317 GS_BASE for older kernels.
13318 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13319 and GS_BASE to the offset table.
13320 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13321 system register group.
13322 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13323 for older kernels.
13324 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13325 amd64 ABI.
13326 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13327 AMD64_GSBASE_REGNUM.
13328 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13329 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13330 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13331 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13332 i386/64bit-segments.xml in those rules.
13333 * features/i386/64bit-segments.xml: New file.
13334 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13335 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13336 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13337 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13338 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13339 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13340 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13341 * features/i386/amd64-avx-linux.c: Regenerated.
13342 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13343 * features/i386/amd64-avx-mpx.c: Regenerated.
13344 * features/i386/amd64-avx512-linux.c: Regenerated.
13345 * features/i386/amd64-linux.c: Regenerated.
13346 * features/i386/amd64-mpx-linux.c: Regenerated.
13347 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13348 * features/i386/i386-avx-mpx.c: Regenerated.
13349 * features/i386/x32-avx-linux.c: Regenerated.
13350 * features/i386/x32-avx512-linux.c: Regenerated.
13351 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13352 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13353 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13354 * regformats/i386/amd64-linux.dat: Regenerated.
13355 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13356 * regformats/i386/x32-avx-linux.dat: Regenerated.
13357 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13358 * regformats/i386/x32-linux.dat: Regenerated.
13359
8884e97e
WT
133602017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13361
13362 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13363 Set to AMD64_NUM_REGS.
13364
7005d26a
WT
133652017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13366
13367 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13368 that checks validity of a register number.
13369
4bd2e1b2
KC
133702017-01-27 Kees Cook <keescook@google.com>
13371
13372 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13373 fetch_fpregs if target has fpa registers.
13374 (arm_linux_store_inferior_registers): Call store_fpregs if target
13375 has fpa registers.
13376
7cf1de6c
AA
133772017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13378
13379 * cris-tdep.c (cris_gdbarch_init): Remove check for
13380 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13381
874a1c8c
AT
133822017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13383
13384 * corelow.c (get_core_register_section): Check for regset
13385 existence before checking for REGSET_VARIABLE_SIZE.
13386
d8b49cf0
YQ
133872017-01-26 Yao Qi <yao.qi@linaro.org>
13388 Pedro Alves <palves@redhat.com>
13389
13390 PR gdb/20939
13391 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13392 call memory_error, save memaddr instead.
13393 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13394 negative, cal memory_error.
13395 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13396
658ca58c
YQ
133972017-01-26 Yao Qi <yao.qi@linaro.org>
13398
13399 * disasm-selftests.c (memory_error_test): New function.
13400 (_initialize_disasm_selftests): Register memory_error_test.
13401
79843d45
YQ
134022017-01-26 Yao Qi <yao.qi@linaro.org>
13403
13404 * Makefile.in (SFILES): Add disasm-selftests.c and
13405 selftest-arch.c.
13406 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13407 * disasm-selftests.c: New file.
13408 * selftest-arch.c: New file.
13409 * selftest-arch.h: New file.
13410
8cafda32
YQ
134112017-01-26 Yao Qi <yao.qi@linaro.org>
13412
13413 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13414 to bfd_arch_mep. Don't return 0 if section is not
13415 found. Call print_insn_mep.
13416
e47ad6c0
YQ
134172017-01-26 Pedro Alves <palves@redhat.com>
13418 Yao Qi <yao.qi@linaro.org>
13419
13420 * arm-tdep.c: Include "disasm.h".
13421 (gdb_print_insn_arm): Update code to get gdbarch.
13422 * disasm.c (dis_asm_read_memory): Change it to
13423 gdb_disassembler::dis_asm_read_memory.
13424 (dis_asm_memory_error): Likewise.
13425 (dis_asm_print_address): Likewise.
13426 (gdb_pretty_print_insn): Change it to
13427 gdb_disassembler::pretty_print_insn.
13428 (dump_insns): Add one argument gdb_disassemlber. All
13429 callers updated.
13430 (do_mixed_source_and_assembly_deprecated): Likewise.
13431 (do_mixed_source_and_assembly): Likewise.
13432 (do_assembly_only): Likewise.
13433 (gdb_disassembler::gdb_disassembler): New.
13434 (gdb_disassembler::print_insn): New.
13435 * disasm.h (class gdb_disassembler): New.
13436 (gdb_pretty_print_insn): Remove declaration.
13437 (gdb_disassemble_info): Likewise.
13438 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13439 (gdbscm_disasm_read_memory_worker): Update.
13440 (gdbscm_disasm_read_memory): Update.
13441 (gdbscm_disasm_memory_error): Remove.
13442 (gdbscm_disasm_print_address): Remove.
13443 (gdbscm_disassembler::gdbscm_disassembler): New.
13444 (gdbscm_print_insn_from_port): Update.
13445 * mips-tdep.c: Include disasm.h.
13446 (gdb_print_insn_mips): Update code to get gdbarch.
13447 * record-btrace.c (btrace_insn_history): Update.
13448 * spu-tdep.c: Include disasm.h.
13449 (struct spu_dis_asm_data): Remove.
13450 (struct spu_dis_asm_info): New.
13451 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13452 SPU id.
13453 (gdb_print_insn_spu): Cast disassemble_info to
13454 spu_dis_asm_info.
13455
80d75874
YQ
134562017-01-26 Yao Qi <yao.qi@linaro.org>
13457
13458 * disasm.c (do_ui_file_delete): Delete.
13459 (gdb_insn_length): Move code creating stream to ...
13460 * utils.c (null_stream): ... here. New function.
13461 * utils.h (null_stream): Declare.
13462
60685cd0
SM
134632017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13464
13465 * python/py-inferior.c (find_thread_object): Return directly
13466 from the loop. Remove "found" variable.
13467
eb1cdb62
JB
134682017-01-21 Joel Brobecker <brobecker@adacore.com>
13469
13470 GDB 7.12.1 released.
13471
b1ce6568
SM
134722017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13473
13474 * python/py-function.c (fnpy_call): Reorder declarations to have
13475 the gdbpy_enter object declared first.
13476 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13477
6f8b0407
SM
134782017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13479
fec93fb1 13480 PR python/21068
6f8b0407
SM
13481 * python/python-internal.h (PyMem_RawMalloc): Define for
13482 Python < 3.4.
13483 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13484 PyMem_RawMalloc instead of PyMem_Malloc.
13485
78cbbba8
LM
134862017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13487 Luis Machado <lgustavo@codesourcery.com>
13488
13489 * NEWS (New commands): Mention flash-erase.
13490 (New MI commands): Mention target-flash-erase.
13491 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13492 command.
13493 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13494 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13495 * target.c (flash_erase_command): New function.
13496 (initialize_targets): Add new flash-erase command.
13497 * target.h (flash_erase_command): New declaration.
13498
2132fe85
JB
134992017-01-20 Joel Brobecker <brobecker@adacore.com>
13500
13501 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13502 HAVE_SYS_PROCFS_H is defined.
13503
d1dff226
AH
135042017-01-18 Alan Hayward <alan.hayward@arm.com>
13505
13506 * remote.c (struct cached_reg): Change data into a pointer.
13507 * (stop_reply_dtr): Free data pointers before deleting vector.
13508 (process_stop_reply): Likewise.
13509 (remote_parse_stop_reply): Allocate space for data
13510
9890e433
AH
135112017-01-18 Alan Hayward <alan.hayward@arm.com>
13512
13513 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13514 MAX_REGISTER_SIZE.
13515 (amd64_pseudo_register_read_value): Likewise.
13516 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13517 (store_register_using_P): Likewise.
13518 * regcache.c (regcache_xfer_part): Likewise.
13519
7a36499a
IR
135202017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13521
13522 Split real and pseudo registers.
13523 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13524 (sparc32_pseudo_regnum): New enum.
13525 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13526 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13527 (SPARC32_CP0_REGISTERS): New macro.
13528 (sparc32_pseudo_register_name): New function.
13529 (sparc32_register_name): Use sparc32_pseudo_register_name.
13530 (sparc32_pseudo_register_type): New function.
13531 (sparc32_register_type): Use sparc32_pseudo_register_type.
13532 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13533 pseudo register numbers.
13534 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13535 (SPARC64_CP0_REGISTERS): New macro.
13536 (sparc64_pseudo_register_name): New function.
13537 (sparc64_register_name): Use sparc64_pseudo_register_name.
13538 (sparc64_pseudo_register_type): New function.
13539 (sparc64_register_type): Use sparc64_pseudo_register_type.
13540 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13541 pseudo register numbers.
13542 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13543 sparc64_store_arguments): Handle pseudo register numbers.
13544
6f8976bf
YQ
135452017-01-13 Yao Qi <yao.qi@linaro.org>
13546
13547 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13548 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13549 output.
13550 (getpkt_or_notif_sane_1): Likewise.
13551
e4241ace
YQ
135522017-01-13 Yao Qi <yao.qi@linaro.org>
13553
13554 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13555 of CC. Pass "-x c++-header" instead of "-x c".
13556
3015c064
SM
135572017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13558
13559 * remote.c (remote_can_async_p): Update comment.
13560
fde1b17d
SM
135612017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13562
13563 * linux-nat.c (linux_nat_can_async_p): Update comment.
13564
ca1ca08b
SM
135652017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13566
13567 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13568
4ad2da73
SM
135692017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13570
13571 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13572
c8b23b3f
TT
135732017-01-10 Tom Tromey <tom@tromey.com>
13574
13575 * python/py-type.c (typy_legacy_template_argument): Update.
13576 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13577 ~demangle_parse_info): Declare new members.
13578 (cp_demangled_name_to_comp): Return unique_ptr.
13579 (cp_demangled_name_parse_free)
13580 (make_cleanup_cp_demangled_name_parse_free)
13581 (cp_new_demangle_parse_info): Remove.
13582 * cp-support.c (do_demangled_name_parse_free_cleanup)
13583 (make_cleanup_cp_demangled_name_parse_free): Remove.
13584 (inspect_type, cp_canonicalize_string_full)
13585 (cp_canonicalize_string): Update.
13586 (mangled_name_to_comp): Change return type.
13587 (cp_class_name_from_physname, method_name_from_physname)
13588 (cp_func_name, cp_remove_params): Update.
13589 * cp-name-parser.y (demangle_parse_info): New constructor, from
13590 cp_new_demangle_parse_info.
13591 (~demangle_parse_info): New destructor, from
13592 cp_demangled_name_parse_free.
13593 (cp_merge_demangle_parse_infos): Update.
13594 (cp_demangled_name_to_comp): Change return type.
13595
1ac32117
TT
135962017-01-10 Tom Tromey <tom@tromey.com>
13597
13598 * top.c (prevent_dont_repeat): Change return type.
13599 * python/python.c (execute_gdb_command): Use std::string.
13600 Update.
13601 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13602 * command.h (prevent_dont_repeat): Change return type.
13603 * breakpoint.c (bpstat_do_actions_1): Update.
13604
0cf08227
TT
136052017-01-10 Tom Tromey <tom@tromey.com>
13606
13607 * value.h (scoped_value_mark::~scoped_value_mark): Call
13608 free_to_mark.
13609 (scoped_value_mark::free_to_mark): New method.
13610 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13611 scoped_value_mark.
13612
eb115069
TT
136132017-01-10 Tom Tromey <tom@tromey.com>
13614
13615 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13616 (valpy_reference_value, valpy_const_value, valpy_get_address)
13617 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13618 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13619 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13620 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13621 scoped_value_mark.
13622 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13623 * value.h (scoped_value_mark): New class.
13624
906768f9
TT
136252017-01-10 Tom Tromey <tom@tromey.com>
13626
13627 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13628 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13629 * psymtab.c (discard_psymtabs_upto): Remove.
13630 (make_cleanup_discard_psymtabs): Remove.
13631 (struct psymtab_state): Remove.
13632
bef155c3
TT
136332017-01-10 Tom Tromey <tom@tromey.com>
13634
13635 * record-full.c (record_full_save_cleanups): Remove.
13636 (record_full_save): Use gdb::unlinker.
13637 * gcore.c (do_bfd_delete_cleanup): Remove.
13638 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13639 cleanups.
13640 * dwarf2read.c (unlink_if_set): Remove.
13641 (write_psymtabs_to_index): Use gdb::unlinker.
13642 * common/gdb_unlinker.h: New file.
13643
192b62ce
TT
136442017-01-10 Tom Tromey <tom@tromey.com>
13645
13646 * windows-tdep.c (windows_xfer_shared_library): Update.
13647 * windows-nat.c (windows_make_so): Update.
13648 * utils.h (make_cleanup_bfd_unref): Remove.
13649 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13650 * symfile.h (symfile_bfd_open)
13651 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13652 * symfile.c (read_symbols, symbol_file_add)
13653 (separate_debug_file_exists): Update.
13654 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13655 (generic_load, reread_symbols): Update.
13656 * symfile-mem.c (symbol_file_add_from_memory): Update.
13657 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13658 (spu_symbol_file_add_from_memory): Update.
13659 * solist.h (struct target_so_ops) <bfd_open>: Return
13660 gdb_bfd_ref_ptr.
13661 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13662 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13663 gdb_bfd_ref_ptr.
13664 (solib_map_sections, reload_shared_libraries_1): Update.
13665 * solib-svr4.c (enable_break): Update.
13666 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13667 * solib-frv.c (enable_break2): Update.
13668 * solib-dsbt.c (enable_break): Update.
13669 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13670 gdb_bfd_ref_ptr.
13671 (darwin_solib_get_all_image_info_addr_at_init): Update.
13672 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13673 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13674 * record-full.c (record_full_save): Update.
13675 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13676 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13677 * minidebug.c (find_separate_debug_file_in_section): Return
13678 gdb_bfd_ref_ptr.
13679 * machoread.c (macho_add_oso_symfile): Change abfd to
13680 gdb_bfd_ref_ptr.
13681 (macho_symfile_read_all_oso): Update.
13682 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13683 (macho_symfile_read): Update.
13684 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13685 (jit_bfd_try_read_symtab): Update.
13686 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13687 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13688 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13689 gdb_bfd_ref_ptr.
13690 (gdb_bfd_ref_policy): New struct.
13691 (gdb_bfd_ref_ptr): New typedef.
13692 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13693 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13694 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13695 gdb_bfd_ref_ptr.
13696 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13697 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13698 (gcore_command): Update.
13699 * exec.c (exec_file_attach): Update.
13700 * elfread.c (elf_symfile_read): Update.
13701 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13702 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13703 (open_and_init_dwo_file): Update.
13704 (open_dwp_file): Return gdb_bfd_ref_ptr.
13705 (open_and_init_dwp_file): Update.
13706 * corelow.c (core_open): Update.
13707 * compile/compile-object-load.c (compile_object_load): Update.
13708 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13709 * coffread.c (coff_symfile_read): Update.
13710 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13711 gdb_bfd_ref_ptr. Rename.
13712 (dump_bfd_file, restore_command): Update.
13713 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13714 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13715 (find_separate_debug_file_by_buildid): Update.
13716
50315b21
TT
137172017-01-10 Tom Tromey <tom@tromey.com>
13718
13719 * common/gdb_ref_ptr.h: New file.
13720 * python/py-ref.h (struct gdbpy_ref_policy): New.
13721 (gdbpy_ref): Now a typedef.
13722
fc4007c9
TT
137232017-01-10 Tom Tromey <tom@tromey.com>
13724
13725 * utils.h (make_cleanup_htab_delete): Don't declare.
13726 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13727 Remove.
13728 * linespec.c (decode_compound_collector): Add constructor,
13729 destructor.
13730 (lookup_prefix_sym): Remove cleanup.
13731 (symtab_collector): Add constructor, destructor.
13732 (collect_symtabs_from_filename): Remove cleanup.
13733 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13734 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13735 Use htab_up.
13736 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13737 * dwarf2read.c (dw2_expand_symtabs_matching)
13738 (dw2_map_symbol_filenames, dwarf_decode_macros)
13739 (write_psymtabs_to_index): Use htab_up.
13740 * dwarf2loc.c (func_verify_no_selftailcall)
13741 (call_site_find_chain_1, func_verify_no_selftailcall)
13742 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13743 std::vector, gdb::unique_xmalloc_ptr.
13744 (call_sitep): Remove typedef.
13745 (dwarf2_locexpr_baton_eval): Remove unused variable.
13746
8dbcee67
TT
137472017-01-10 Tom Tromey <tom@tromey.com>
13748
13749 * python/python-internal.h (make_cleanup_py_decref)
13750 (make_cleanup_py_xdecref): Don't declare.
13751 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13752 (py_xdecref, make_cleanup_py_xdecref): Remove.
13753
13df46cc
TT
137542017-01-10 Tom Tromey <tom@tromey.com>
13755
13756 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13757 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13758
06fc9bf7
TT
137592017-01-10 Tom Tromey <tom@tromey.com>
13760
13761 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13762
830a4934
TT
137632017-01-10 Tom Tromey <tom@tromey.com>
13764
13765 * python/py-utils.c (unicode_to_encoded_string)
13766 (python_string_to_target_string)
13767 (python_string_to_target_python_string)
13768 (python_string_to_host_string, gdbpy_obj_to_string)
13769 (get_addr_from_python): Use gdbpy_ref.
13770
4586d543
TT
137712017-01-10 Tom Tromey <tom@tromey.com>
13772
13773 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13774 gdbpy_ref.
13775
59876f8f
TT
137762017-01-10 Tom Tromey <tom@tromey.com>
13777
13778 * python/python.c (eval_python_command, gdbpy_decode_line)
13779 (gdbpy_run_events, gdbpy_start_type_printers)
13780 (gdbpy_apply_type_printers): Use gdbpy_ref.
13781
97d83487
TT
137822017-01-10 Tom Tromey <tom@tromey.com>
13783
13784 * python/py-param.c (get_doc_string, compute_enum_values): Use
13785 gdbpy_ref.
13786
9205649a
TT
137872017-01-10 Tom Tromey <tom@tromey.com>
13788
13789 * python/py-inferior.c (find_thread_object, build_inferior_list):
13790 Use gdbpy_ref.
13791
74c49d45
TT
137922017-01-10 Tom Tromey <tom@tromey.com>
13793
13794 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13795
16361ffb
TT
137962017-01-10 Tom Tromey <tom@tromey.com>
13797
13798 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13799 gdbpy_ref.
13800
905f2cca
TT
138012017-01-10 Tom Tromey <tom@tromey.com>
13802
13803 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13804 extra incref.
13805 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13806 Use gdbpy_ref.
13807
64081434
TT
138082017-01-10 Tom Tromey <tom@tromey.com>
13809
13810 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13811 gdbpy_ref.
13812
59e9e831
TT
138132017-01-10 Tom Tromey <tom@tromey.com>
13814
13815 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13816 decref results of PyArg_ParseTupleAndKeywords.
13817
9de10f6d
TT
138182017-01-10 Tom Tromey <tom@tromey.com>
13819
13820 * python/python.c (python_run_simple_file): Use
13821 unique_xmalloc_ptr, gdbpy_ref.
13822
2bd5759d
TT
138232017-01-10 Tom Tromey <tom@tromey.com>
13824
13825 * python/py-prettyprint.c (print_stack_unless_memory_error)
13826 (print_string_repr, print_children): Use gdbpy_ref.
13827 (dummy_python_frame): New class.
13828 (dummy_python_frame::dummy_python_frame): Rename from
13829 push_dummy_python_frame.
13830 (py_restore_tstate): Remove.
13831
3b4e0e01
TT
138322017-01-10 Tom Tromey <tom@tromey.com>
13833
13834 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13835
17a22718
TT
138362017-01-10 Tom Tromey <tom@tromey.com>
13837
13838 * python/python.c (ensure_python_env, restore_python_env):
13839 Remove.
13840 * python/python-internal.h (ensure_python_env): Don't declare.
13841 * varobj.h (varobj_ensure_python_env): Don't declare.
13842 * varobj.c (varobj_ensure_python_env): Remove.
13843
68cdc557
TT
138442017-01-10 Tom Tromey <tom@tromey.com>
13845
13846 * varobj.c (varobj_value_get_print_value): Use
13847 gdbpy_enter_varobj.
13848
1eba6383
TT
138492017-01-10 Tom Tromey <tom@tromey.com>
13850
13851 * python/py-prettyprint.c (print_string_repr, print_children):
13852 Update.
13853 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13854 of "encoding".
13855 * varobj.c (varobj_value_get_print_value): Update.
13856 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13857
bde7b3e3
TT
138582017-01-10 Tom Tromey <tom@tromey.com>
13859
13860 * varobj.c (varobj_get_display_hint)
13861 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13862 (varobj_set_visualizer, free_variable): Use
13863 gdbpy_enter_varobj.
13864
a7785f8c
TT
138652017-01-10 Tom Tromey <tom@tromey.com>
13866
13867 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13868 (do_finish_initialization): New function. Use gdbpy_ref.
13869 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13870 do_finish_initialization.
13871
2865bfce
TT
138722017-01-10 Tom Tromey <tom@tromey.com>
13873
13874 * python/py-param.c (get_set_value, get_show_value): Use
13875 gdbpy_enter, gdbpy_ref.
13876
0e9dcc75
TT
138772017-01-10 Tom Tromey <tom@tromey.com>
13878
13879 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13880
12a5cedd
TT
138812017-01-10 Tom Tromey <tom@tromey.com>
13882
13883 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13884
788f2586
TT
138852017-01-10 Tom Tromey <tom@tromey.com>
13886
13887 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13888 Use gdbpy_enter_varobj.
13889
6cd67bea
TT
138902017-01-10 Tom Tromey <tom@tromey.com>
13891
13892 * varobj.c (gdbpy_enter_varobj): New constructor.
13893 * python/python-internal.h (gdbpy_enter_varobj): New class.
13894 * python/py-varobj.c (py_varobj_get_iterator): Use
13895 gdbpy_enter_varobj.
13896
14b122bf
TT
138972017-01-10 Tom Tromey <tom@tromey.com>
13898
13899 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13900 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13901 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13902 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13903 unique_xmalloc_ptr.
13904 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13905
bf1ca3b9
TT
139062017-01-10 Tom Tromey <tom@tromey.com>
13907
13908 * python/py-xmethods.c (invoke_match_method): Use
13909 gdbpy_ref.
13910
572a5524
TT
139112017-01-10 Tom Tromey <tom@tromey.com>
13912
13913 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13914 gdbpy_enter, gdbpy_ref.
13915
396a78b6
TT
139162017-01-10 Tom Tromey <tom@tromey.com>
13917
13918 * python/python.c (python_interactive_command): Use gdbpy_enter.
13919
a88b13c7
TT
139202017-01-10 Tom Tromey <tom@tromey.com>
13921
13922 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13923 gdbpy_ref.
13924
e9f0c363
TT
139252017-01-10 Tom Tromey <tom@tromey.com>
13926
13927 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13928 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13929
6349f452
TT
139302017-01-10 Tom Tromey <tom@tromey.com>
13931
13932 * utils.h (htab_deleter): New struct.
13933 (htab_up): New typedef.
13934 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13935 gdbpy_enter, gdbpy_ref, htab_up.
13936
c0171de6
TT
139372017-01-10 Tom Tromey <tom@tromey.com>
13938
13939 * python/py-unwind.c (pending_frame_invalidate): Remove.
13940 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13941
f18e226f
TT
139422017-01-10 Tom Tromey <tom@tromey.com>
13943
13944 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13945 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13946
c57af3f1
TT
139472017-01-10 Tom Tromey <tom@tromey.com>
13948
13949 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13950
60e600ec
TT
139512017-01-10 Tom Tromey <tom@tromey.com>
13952
13953 * python/python.c (gdbpy_eval_from_control_command)
13954 (gdbpy_source_script, gdbpy_run_events)
13955 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13956 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13957 gdbpy_enter.
13958
bf7da5b0
TT
139592017-01-10 Tom Tromey <tom@tromey.com>
13960
13961 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13962
2d38bced
TT
139632017-01-10 Tom Tromey <tom@tromey.com>
13964
13965 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
13966
07bc7329
TT
139672017-01-10 Tom Tromey <tom@tromey.com>
13968
13969 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
13970 (python_on_inferior_call_pre, python_on_inferior_call_post)
13971 (python_on_memory_change, python_on_register_change)
13972 (python_inferior_exit, python_new_objfile, add_thread_object)
13973 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
13974
6e7c365e
TT
139752017-01-10 Tom Tromey <tom@tromey.com>
13976
13977 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
13978 (bpfinishpy_handle_exit): Use gdbpy_enter.
13979
6ba0cd40
TT
139802017-01-10 Tom Tromey <tom@tromey.com>
13981
13982 * python/py-cmd.c (cmdpy_destroyer)
13983 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
13984 gdbpy_enter.
13985
de2dc875
TT
139862017-01-10 Tom Tromey <tom@tromey.com>
13987
13988 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13989 gdbpy_enter.
13990 (gdbpy_breakpoint_has_cond): Likewise.
13991
4ecee2c4
TT
139922017-01-10 Tom Tromey <tom@tromey.com>
13993
13994 * python/python.c (gdbpy_enter): New constructor.
13995 (~gdbpy_enter): New destructor.
13996 (restore_python_env, ensure_python_env): Rewrite.
13997 * python/python-internal.h (gdbpy_enter): New class.
13998
37fce74f
TT
139992017-01-10 Tom Tromey <tom@tromey.com>
14000
14001 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14002
53a0cca3
TT
140032017-01-10 Tom Tromey <tom@tromey.com>
14004
14005 * python/py-value.c (value_has_field, get_field_flag)
14006 (get_field_type, valpy_getitem, convert_value_from_python): Use
14007 gdbpy_ref.
14008
ff3724f5
TT
140092017-01-10 Tom Tromey <tom@tromey.com>
14010
14011 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14012 gdbpy_ref.
14013
0700aea5
TT
140142017-01-10 Tom Tromey <tom@tromey.com>
14015
14016 * python/py-prettyprint.c (search_pp_list)
14017 (find_pretty_printer_from_objfiles)
14018 (find_pretty_printer_from_progspace)
14019 (find_pretty_printer_from_gdb, find_pretty_printer)
14020 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14021 gdbpy_ref.
14022
1bb44c9f
TT
140232017-01-10 Tom Tromey <tom@tromey.com>
14024
14025 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14026
87ce03fd
TT
140272017-01-10 Tom Tromey <tom@tromey.com>
14028
14029 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14030 (ltpy_get_all_source_lines): Use gdbpy_ref.
14031
ee0a3fb8
TT
140322017-01-10 Tom Tromey <tom@tromey.com>
14033
14034 * python/py-framefilter.c (extract_sym, extract_value)
14035 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14036 gdbpy_ref.
14037
bf2a52fa
TT
140382017-01-10 Tom Tromey <tom@tromey.com>
14039
14040 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14041
f59fe7f8
TT
140422017-01-10 Tom Tromey <tom@tromey.com>
14043
14044 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14045
80bd970a
TT
140462017-01-10 Tom Tromey <tom@tromey.com>
14047
14048 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14049 gdbpy_ref.
14050
d1b3de2e
TT
140512017-01-10 Tom Tromey <tom@tromey.com>
14052
14053 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14054
3bb43384
TT
140552017-01-10 Tom Tromey <tom@tromey.com>
14056
14057 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14058 (typy_range): Use gdbpy_ref.
14059
abf5651e
TT
140602017-01-10 Tom Tromey <tom@tromey.com>
14061
14062 * python/py-threadevent.c (create_thread_event_object): Use
14063 gdbpy_ref.
14064 * python/py-stopevent.c (create_stop_event_object): Simplify.
14065 (emit_stop_event): Use gdbpy_ref.
14066 * python/py-signalevent.c (create_signal_event_object): Use
14067 gdbpy_ref.
14068 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14069 (emit_new_objfile_event, create_clear_objfiles_event_object)
14070 (emit_clear_objfiles_event): Use gdbpy_ref.
14071 * python/py-infevents.c (create_inferior_call_event_object)
14072 (create_register_changed_event_object)
14073 (create_memory_changed_event_object, emit_inferior_call_event)
14074 (emit_memory_changed_event, emit_register_changed_event): Use
14075 gdbpy_ref.
14076 * python/py-exitedevent.c (create_exited_event_object)
14077 (emit_exited_event): Use gdbpy_ref.
14078 * python/py-event.h (evpy_emit_event): Remove
14079 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14080 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14081 * python/py-continueevent.c (emit_continue_event): Use
14082 gdbpy_ref.
14083 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14084 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14085 gdbpy_ref.
14086 * python/py-bpevent.c (create_breakpoint_event_object): Use
14087 gdbpy_ref.
14088
a68ff33e
TT
140892017-01-10 Tom Tromey <tom@tromey.com>
14090
14091 * python/py-ref.h: New file.
14092
7becfd03
SM
140932017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14094
14095 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14096 void.
14097 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14098 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14099 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14100 * ui-out.c (ui_out::redirect): Likewise.
14101 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14102 * cli/cli-logging.c (set_logging_redirect): Update call site of
14103 ui_out::redirect.
14104 (handle_redirections): Likewise.
14105 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14106 * top.c (execute_command_to_string): Likewise.
14107 * utils.c (do_ui_out_redirect_pop): Likewise.
14108
df294654
SM
141092017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14110
14111 * stack.c (_initialize_stack): Update "frame" command help message.
14112
f5e6296e
IB
141132017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14114
14115 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14116
0e2d6fa6
YQ
141172017-01-06 Yao Qi <yao.qi@linaro.org>
14118
14119 * x86-linux-nat.h: Include gdb_proc_service.h.
14120
44d6d3f9
YQ
141212017-01-06 Yao Qi <yao.qi@linaro.org>
14122
14123 * ser-base.h: Include serial.h.
14124
656731fe
YQ
141252017-01-06 Yao Qi <yao.qi@linaro.org>
14126
14127 * ppc-linux-tdep.h: Include ppc-tdep.h.
14128
1ca8f924
YQ
141292017-01-06 Yao Qi <yao.qi@linaro.org>
14130
14131 * nat/amd64-linux-siginfo.h: Include signal.h.
14132
bc3008c4
YQ
141332017-01-06 Yao Qi <yao.qi@linaro.org>
14134
14135 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14136
66c80d03
YQ
141372017-01-06 Yao Qi <yao.qi@linaro.org>
14138
14139 * mi/mi-parse.h: Include mi-cmds.h.
14140
051d2dda
YQ
141412017-01-06 Yao Qi <yao.qi@linaro.org>
14142
14143 * inf-loop.c: Don't include "target.h".
14144 * inf-loop.h: Include it here.
14145
8018d34f
YQ
141462017-01-06 Yao Qi <yao.qi@linaro.org>
14147
14148 * dfp.h: Include "dboulest.h" and "expression.h".
14149
c0b8369c
YQ
141502017-01-06 Yao Qi <yao.qi@linaro.org>
14151
14152 * ax-gdb.h: Include "ax.h".
14153
ad5cba2a
YQ
141542017-01-06 Yao Qi <yao.qi@linaro.org>
14155
14156 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14157 with nat/gdb_ptrace.h.
14158
1c33cd7f
YQ
141592017-01-05 Yao Qi <yao.qi@linaro.org>
14160
14161 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14162 new line.
14163 (mips64_fbsd_sigframe_init): Likewise.
14164
c988ac1d
JB
141652017-01-04 John Baldwin <jhb@FreeBSD.org>
14166
14167 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14168 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14169
b268007c
JB
141702017-01-04 John Baldwin <jhb@FreeBSD.org>
14171
14172 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14173 * NEWS: Mention new FreeBSD/mips native configuration.
14174 * config/mips/fbsd.mh: New file.
14175 * configure.host: Add mips*-*-freebsd*.
14176 * mips-fbsd-nat.c: New file.
14177
387360da
JB
141782017-01-04 John Baldwin <jhb@FreeBSD.org>
14179
14180 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14181 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14182 * NEWS: Mention new FreeBSD/mips target.
14183 * configure.tgt: Add mips*-*-freebsd*.
14184 * mips-fbsd-tdep.c: New file.
14185 * mips-fbsd-tdep.h: New file.
14186
2aaaf250
YQ
141872017-01-04 Yao Qi <yao.qi@linaro.org>
14188
14189 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14190 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14191
61baf725
JB
141922017-01-01 Joel Brobecker <brobecker@adacore.com>
14193
6dbb839a 14194 Update copyright year range in all GDB files.
61baf725 14195
c113e7ff 141962017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 14197
c113e7ff 14198 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 14199
c113e7ff 14200For older changes see ChangeLog-2016.
c906108c
SS
14201\f
14202Local Variables:
14203mode: change-log
14204left-margin: 8
14205fill-column: 74
14206version-control: never
57da7796 14207coding: utf-8
c906108c 14208End: