]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
FT32: support for FT32B processor - part 2/2
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-01 James Bowman <james.bowman@ftdichip.com>
2
3 * ft32-tdep.c (ft32_fetch_instruction): New function.
4 (ft32_analyze_prologue): Use ft32_fetch_instruction().
5
6 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * cli/cli-script.c (execute_control_command): Rename to ...
9 (execute_control_command_1): ... this.
10 (execute_control_command): New function.
11
12 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
13
14 * tracepoint.c (tfind_command): Remove const_cast.
15
16 2017-10-30 Mike Gulick <mgulick@mathworks.com>
17
18 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
19
20 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
21
22 * common/common-utils.h (in_inclusive_range): New function.
23 * arm-tdep.c (arm_record_extension_space): Use
24 in_inclusive_range.
25 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
26 * cris-tdep.c (cris_spec_reg_applicable): Use
27 in_inclusive_range.
28
29 2017-10-30 Pedro Alves <palves@redhat.com>
30 Simon Marchi <simon.marchi@ericsson.com>
31
32 * remote.c (remote_set_syscall_catchpoint): Build a std::string
33 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
34
35 2017-10-30 Pedro Alves <palves@redhat.com>
36
37 * common/common-utils.c (string_appendf, string_vappendf): New
38 functions.
39 * common/common-utils.h (string_appendf, string_vappendf): New
40 declarations.
41 * unittests/common-utils-selftests.c (string_appendf_func)
42 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
43 (string_vappendf_tests): New functions.
44 (_initialize_common_utils_selftests): Register "string_appendf" and
45 "string_vappendf tests".
46
47 2017-10-30 Pedro Alves <palves@redhat.com>
48
49 * unittests/common-utils-selftests.c (format_func): New typedef.
50 (string_printf_tests, string_vprintf_tests): Tests factored out
51 and merged to ...
52 (test_format_func): ... this new function.
53 (string_printf_tests, string_vprintf_tests): Reimplement on top of
54 test_format_func.
55
56 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
57
58 * darwin-nat.c: Remove include of gdb.h.
59
60 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
61
62 * xtensa-xtregs.c: Fix formatting issues.
63
64 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
65
66 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
67
68 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
69
70 PR python/21213
71 * python/py-infthread.c (thpy_get_inferior): Increment reference
72 of inferior before returning it.
73
74 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
75
76 * unittests/common-utils-selftests.c (format): Add
77 ATTRIBUTE_PRINTF.
78
79 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
80
81 * xml-syscall.c (struct syscall_desc): Add constructor.
82 <name>: Change type to std::string.
83 (syscall_desc_up): New typedef.
84 (syscall_desc_p): Remove typeder.
85 (DEF_VEC_P(syscall_desc_p)): Remove.
86 (struct syscall_group_desc): Add constructor.
87 <name>: Change type to std::string.
88 <syscalls>: Change type to std::vector.
89 (syscall_group_desc_up): New typedef.
90 (syscall_group_desc_p): Remove typedef.
91 (DEF_VEC_P(syscall_group_desc_p)): Remove.
92 (struct syscalls_info) <syscalls>: Change type to std::vector of
93 unique_ptr.
94 <groups>: Likewise.
95 <my_gdb_datadir>: Change type to std::string.
96 (syscalls_info_up): New typedef.
97 (allocate_syscalls_info): Remove.
98 (syscalls_info_free_syscalls_desc): Remove.
99 (syscalls_info_free_syscall_group_desc): Remove.
100 (free_syscalls_info): Remove.
101 (make_cleanup_free_syscalls_info): Remove.
102 (syscall_group_create_syscall_group_desc): Adjust.
103 (syscall_group_add_syscall): Adjust.
104 (syscall_create_syscall_desc): Adjust.
105 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
106 (init_syscalls_info): Adjust.
107 (syscall_group_get_group_by_name): Adjust.
108 (xml_get_syscall_number): Adjust.
109 (xml_get_syscall_name): Adjust.
110 (xml_list_of_syscalls): Adjust.
111 (xml_list_syscalls_by_group): Adjust.
112 (xml_list_of_groups): Adjust.
113
114 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
115
116 * probe.h: Don't include gdb_vecs.h.
117 (DEF_VEC_P (probe_p)): Remove.
118 (find_probes_in_objfile): Return an std::vector.
119 * probe.c (find_probes_in_objfile): Likewise.
120 * breakpoint.c (breakpoint_objfile_data)
121 <longjmp_probes>: Change type to std::vector.
122 <exception_probes>: Likewise.
123 (free_breakpoint_probes): Don't manually free vectors.
124 (create_longjmp_master_breakpoint): Adjust.
125 (create_exception_master_breakpoint): Adjust.
126 * solib-svr4.c (svr4_create_probe_breakpoints): Change
127 parameter type, adjust.
128 (svr4_create_solib_event_breakpoints): Adjust.
129
130 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
131
132 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
133 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
134 with new.
135 (free_breakpoint_probes): Rename to ...
136 (free_breakpoint_objfile_data): ... this, and call delete on
137 bp_objfile_data..
138
139 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
140
141 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
142 (loaded_script_ptr): Remove typedef.
143 (DEF_VEC_P (loaded_script_ptr)): Remove.
144 (struct collect_matching_scripts_data): Add constructor.
145 <scripts_p>: Change type to (pointer to) std::vector.
146 (collect_matching_scripts_data): Adjust.
147 (sort_scripts_by_name): Make suitable for std::sort.
148 (print_scripts): Don't sort vector, adjust to std::vector.
149 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
150
151 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
152
153 * symfile.c (filename_language): Make struct, not typedef. Add
154 constructor.
155 <ext>: Change type to std::string.
156 (DEF_VEC_O (filename_language)): Remove.
157 (filename_language_table): Change type to std::vector.
158 (add_filename_language): Adjust.
159 (set_ext_lang_command): Adjust.
160 (info_ext_lang_command): Adjust.
161 (deduce_language_from_filename): Adjust.
162 (class scoped_restore_filename_language_table): Remove.
163 (test_filename_language): Use scoped_restore.
164 (test_set_ext_lang_command): Use scoped_restore, adjust to
165 std::vector change.
166
167 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
168
169 * symfile.c: Include selftest.h.
170 (class scoped_restore_filename_language_table): New.
171 (test_filename_language): New test.
172 (test_set_ext_lang_command): New test.
173 (_initialize_symfile): Register tests.
174
175 2017-10-27 Keith Seitz <keiths@redhat.com>
176
177 * breakpoint.c (print_breakpoint_location): Use the symbol saved
178 in the bp_location, falling back to find_pc_sect_function when
179 needed.
180 (add_location_to_breakpoint): Save sal->symbol.
181 * breakpoint.h (struct bp_location) <symbol>: New field.
182 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
183 * symtab.h (struct symtab_and_line) <symbol>: New field.
184
185 2017-10-26 Patrick Frants <osscontribute@gmail.com>
186
187 PR gdb/13669
188 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
189 to rewind obstack.
190
191 2017-10-26 Pedro Alves <palves@redhat.com>
192
193 * remote.c (remote_async_terminal_ours_p): Delete.
194 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
195 Remove references to 'remote_async_terminal_ours_p'.
196
197 2017-10-26 Yao Qi <yao.qi@linaro.org>
198
199 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
200
201 2017-10-26 Yao Qi <yao.qi@linaro.org>
202
203 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
204 aspace const.
205 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
206 Likewise.
207 * breakpoint.c (bpstat_check_location): Remove cast.
208 (breakpoint_hit_catch_fork): Make aspce const.
209 (breakpoint_hit_catch_solib): Likewise.
210 (breakpoint_hit_catch_exec): Likewise.
211 (breakpoint_hit_ranged_breakpoint): Likewise.
212 (breakpoint_hit_watchpoint): Likewise.
213 (base_breakpoint_breakpoint_hit): Likewise.
214 (bkpt_breakpoint_hit): Likewise.
215 (dprintf_breakpoint_hit): Likewise.
216 (tracepoint_breakpoint_hit): Likewise.
217 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
218
219 2017-10-26 Yao Qi <yao.qi@linaro.org>
220
221 * breakpoint.c (breakpoint_location_address_match): Change
222 "struct address_space *" to "const address_space".
223 (breakpoint_location_address_range_overlap): Likewise.
224 (breakpoint_here_p): Likewise.
225 (breakpoint_in_range_p): Likewise.
226 (moribund_breakpoint_here_p): Likewise.
227 (bp_location_inserted_here_p): Likewise.
228 (software_breakpoint_inserted_here_p): Likewise.
229 (hardware_breakpoint_inserted_here_p): Likewise.
230 (hardware_watchpoint_inserted_in_range): Likewise.
231 (bpstat_check_location): Likewise.
232 (bpstat_stop_status): Likewise.
233 (breakpoint_address_match): Likewise.
234 (breakpoint_address_match_range): Likewise.
235 (breakpoint_location_address_match): Likewise.
236 (breakpoint_location_address_range_overlap): Likewise.
237 (insert_single_step_breakpoint): Likewise.
238 (breakpoint_has_location_inserted_here): Likewise.
239 (single_step_breakpoint_inserted_here_p): Likewise.
240 (pc_at_non_inline_function): Likewise.
241 * breakpoint.h (bpstat_stop_status): Update declaration.
242 (breakpoint_here_p): Likewise.
243 (breakpoint_in_range_p): Likewise.
244 (moribund_breakpoint_here_p): Likewise.
245 (breakpoint_inserted_here_p): Likewise.
246 (software_breakpoint_inserted_here_p): Likewise.
247 (hardware_breakpoint_inserted_here_p): Likewise.
248 (breakpoint_has_location_inserted_here): Likewise.
249 (single_step_breakpoint_inserted_here_p): Likewise.
250 (hardware_watchpoint_inserted_in_range): Likewise.
251 (breakpoint_address_match): Likewise.
252 (insert_single_step_breakpoint): Likewise.
253 (pc_at_non_inline_function): Likewise.
254 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
255 * record.c (record_check_stopped_by_breakpoint): Likewise.
256 * record.h (record_check_stopped_by_breakpoint): Likewise.
257 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
258
259 2017-10-25 Yao Qi <yao.qi@linaro.org>
260
261 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
262 regcache->arch () instead get_regcache_arch.
263 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
264 Likewise.
265 (aarch64_fbsd_store_inferior_registers): Likewise.
266 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
267 (store_gregs_to_thread): Likewise.
268 (fetch_fpregs_from_thread): Likewise.
269 (store_fpregs_to_thread): Likewise.
270 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
271 (aarch64_store_return_value): Likewise.
272 (aarch64_software_single_step): Likewise.
273 * aix-thread.c (aix_thread_wait): Likewise.
274 (supply_reg32): Likewise.
275 (supply_sprs64): Likewise.
276 (supply_sprs32): Likewise.
277 (fill_gprs64): Likewise.
278 (fill_gprs32): Likewise.
279 (fill_sprs64): Likewise.
280 (fill_sprs32): Likewise.
281 (store_regs_user_thread): Likewise.
282 (store_regs_kernel_thread): Likewise.
283 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
284 (alphabsd_store_inferior_registers): Likewise.
285 * alpha-tdep.c (alpha_extract_return_value): Likewise.
286 (alpha_store_return_value): Likewise.
287 (alpha_deal_with_atomic_sequence): Likewise.
288 (alpha_next_pc): Likewise.
289 (alpha_software_single_step): Likewise.
290 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
291 (amd64bsd_store_inferior_registers): Likewise.
292 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
293 Likewise.
294 (amd64_linux_store_inferior_registers): Likewise.
295 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
296 (amd64_collect_native_gregset): Likewise.
297 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
298 (amd64obsd_collect_uthread): Likewise.
299 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
300 (amd64_collect_fpregset): Likewise.
301 (amd64_supply_fxsave): Likewise.
302 (amd64_supply_xsave): Likewise.
303 (amd64_collect_fxsave): Likewise.
304 (amd64_collect_xsave): Likewise.
305 * arc-tdep.c (arc_write_pc): Likewise.
306 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
307 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
308 (arm_fbsd_store_inferior_registers): Likewise.
309 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
310 (store_vfp_regs): Likewise.
311 (arm_linux_fetch_inferior_registers): Likewise.
312 (arm_linux_store_inferior_registers): Likewise.
313 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
314 (arm_linux_sigreturn_next_pc): Likewise.
315 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
316 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
317 (fetch_register): Likewise.
318 (store_register): Likewise.
319 * arm-tdep.c (arm_is_thumb): Likewise.
320 (displaced_in_arm_mode): Likewise.
321 (bx_write_pc): Likewise.
322 (arm_get_next_pcs_addr_bits_remove): Likewise.
323 (arm_software_single_step): Likewise.
324 (arm_extract_return_value): Likewise.
325 (arm_store_return_value): Likewise.
326 (arm_write_pc): Likewise.
327 * bfin-tdep.c (bfin_extract_return_value): Likewise.
328 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
329 (bsd_uthread_store_registers): Likewise.
330 * core-regset.c (fetch_core_registers): Likewise.
331 * corelow.c (get_core_registers): Likewise.
332 * cris-tdep.c (cris_store_return_value): Likewise.
333 (cris_extract_return_value): Likewise.
334 (find_step_target): Likewise.
335 (find_step_target): Likewise.
336 (cris_software_single_step): Likewise.
337 * ctf.c (ctf_fetch_registers): Likewise.
338 * darwin-nat.c (cancel_breakpoint): Likewise.
339 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
340 * frv-tdep.c (frv_extract_return_value): Likewise.
341 * ft32-tdep.c (ft32_store_return_value): Likewise.
342 (ft32_extract_return_value): Likewise.
343 * go32-nat.c (fetch_register): Likewise.
344 (go32_fetch_registers): Likewise.
345 (go32_store_registers): Likewise.
346 (store_register): Likewise.
347 * h8300-tdep.c (h8300_extract_return_value): Likewise.
348 (h8300_store_return_value): Likewise.
349 * hppa-linux-nat.c (fetch_register): Likewise.
350 (store_register): Likewise.
351 (hppa_linux_fetch_inferior_registers): Likewise.
352 (hppa_linux_store_inferior_registers): Likewise.
353 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
354 (i386_darwin_store_inferior_registers): Likewise.
355 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
356 (gnu_store_registers): Likewise.
357 * i386-linux-nat.c (fetch_register): Likewise.
358 (store_register): Likewise.
359 (supply_gregset): Likewise.
360 (fill_gregset): Likewise.
361 (i386_linux_fetch_inferior_registers): Likewise.
362 (i386_linux_store_inferior_registers): Likewise.
363 (i386_linux_resume): Likewise.
364 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
365 Likewise.
366 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
367 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
368 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
369 (i386obsd_collect_uthread): Likewise.
370 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
371 (i386_supply_gregset): Likewise.
372 (i386_collect_gregset): Likewise.
373 (i386_supply_fpregset): Likewise.
374 (i386_collect_fpregset): Likewise.
375 (i386_mpx_bd_base): Likewise.
376 * i386-v4-nat.c (supply_fpregset): Likewise.
377 (fill_fpregset): Likewise.
378 * i387-tdep.c (i387_supply_fsave): Likewise.
379 (i387_collect_fsave): Likewise.
380 (i387_supply_fxsave): Likewise.
381 (i387_collect_fxsave): Likewise.
382 (i387_supply_xsave): Likewise.
383 (i387_collect_xsave): Likewise.
384 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
385 (ia64_linux_store_registers): Likewise.
386 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
387 (ia64_extract_return_value): Likewise.
388 (ia64_store_return_value): Likewise.
389 (find_func_descr): Likewise.
390 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
391 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
392 (inf_ptrace_store_registers): Likewise.
393 * infrun.c (use_displaced_stepping): Likewise.
394 (displaced_step_prepare_throw): Likewise.
395 (resume): Likewise.
396 (proceed): Likewise.
397 (do_target_wait): Likewise.
398 (adjust_pc_after_break): Likewise.
399 (handle_inferior_event_1): Likewise.
400 (handle_signal_stop): Likewise.
401 (save_infcall_suspend_state): Likewise.
402 (restore_infcall_suspend_state): Likewise.
403 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
404 * jit.c (jit_frame_prev_register): Likewise.
405 * linux-nat.c (save_stop_reason): Likewise.
406 (linux_nat_wait_1): Likewise.
407 (resume_stopped_resumed_lwps): Likewise.
408 * linux-record.c (record_linux_sockaddr): Likewise.
409 (record_linux_msghdr): Likewise.
410 (record_linux_system_call): Likewise.
411 * linux-tdep.c (linux_collect_thread_registers): Likewise.
412 * lm32-tdep.c (lm32_extract_return_value): Likewise.
413 (lm32_store_return_value): Likewise.
414 * m32c-tdep.c (m32c_read_flg): Likewise.
415 (m32c_pseudo_register_read): Likewise.
416 (m32c_pseudo_register_write): Likewise.
417 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
418 (m32r_linux_collect_gregset): Likewise.
419 * m32r-tdep.c (m32r_store_return_value): Likewise.
420 (m32r_extract_return_value): Likewise.
421 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
422 (m68kbsd_collect_fpregset): Likewise.
423 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
424 * m68k-linux-nat.c (fetch_register): Likewise.
425 (old_fetch_inferior_registers): Likewise.
426 (old_store_inferior_registers): Likewise.
427 (store_regs): Likewise.
428 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
429 (m68k_svr4_store_return_value): Likewise.
430 * m88k-tdep.c (m88k_store_arguments): Likewise.
431 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
432 (mi_cmd_data_write_register_values): Likewise.
433 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
434 (mips_fbsd_store_inferior_registers): Likewise.
435 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
436 (mips_fbsd_supply_gregs): Likewise.
437 (mips_fbsd_collect_fpregs): Likewise.
438 (mips_fbsd_collect_gregs): Likewise.
439 (mips_fbsd_supply_fpregset): Likewise.
440 (mips_fbsd_collect_fpregset): Likewise.
441 (mips_fbsd_supply_gregset): Likewise.
442 (mips_fbsd_collect_gregset): Likewise.
443 * mips-linux-nat.c (supply_gregset): Likewise.
444 (fill_gregset): Likewise.
445 (supply_fpregset): Likewise.
446 (fill_fpregset): Likewise.
447 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
448 (mips_fill_gregset): Likewise.
449 (mips_supply_fpregset): Likewise.
450 (mips_fill_fpregset): Likewise.
451 (mips64_supply_gregset): Likewise.
452 (micromips_linux_sigframe_validate): Likewise.
453 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
454 (mipsnbsd_fetch_inferior_registers): Likewise.
455 (mipsnbsd_store_inferior_registers): Likewise.
456 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
457 (mipsnbsd_supply_gregset): Likewise.
458 (mipsnbsd_iterate_over_regset_sections): Likewise.
459 (mipsnbsd_supply_reg): Likewise.
460 (mipsnbsd_supply_fpreg): Likewise.
461 * mips-tdep.c (mips_in_frame_stub): Likewise.
462 (mips_dummy_id): Likewise.
463 (is_octeon_bbit_op): Likewise.
464 (micromips_bc1_pc): Likewise.
465 (extended_mips16_next_pc): Likewise.
466 (mips16_next_pc): Likewise.
467 (deal_with_atomic_sequence): Likewise.
468 * moxie-tdep.c (moxie_process_readu): Likewise.
469 * nios2-tdep.c (nios2_get_next_pc): Likewise.
470 * nto-procfs.c (procfs_store_registers): Likewise.
471 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
472 (ppcfbsd_store_inferior_registers): Likewise.
473 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
474 (fetch_altivec_register): Likewise.
475 (get_spe_registers): Likewise.
476 (fetch_spe_register): Likewise.
477 (fetch_altivec_registers): Likewise.
478 (fetch_all_gp_regs): Likewise.
479 (fetch_all_fp_regs): Likewise.
480 (store_vsx_register): Likewise.
481 (store_altivec_register): Likewise.
482 (set_spe_registers): Likewise.
483 (store_spe_register): Likewise.
484 (store_altivec_registers): Likewise.
485 (store_all_gp_regs): Likewise.
486 (store_all_fp_regs): Likewise.
487 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
488 (ppc_linux_collect_gregset): Likewise.
489 (ppc_canonicalize_syscall): Likewise.
490 (ppc_linux_record_signal): Likewise.
491 (ppu2spu_prev_register): Likewise.
492 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
493 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
494 (ppcobsd_store_registers): Likewise.
495 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
496 Likewise.
497 (ppc_ravenscar_generic_store_registers): Likewise.
498 * procfs.c (procfs_fetch_registers): Likewise.
499 (procfs_store_registers): Likewise.
500 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
501 (ravenscar_store_registers): Likewise.
502 (ravenscar_prepare_to_store): Likewise.
503 * record-btrace.c (record_btrace_fetch_registers): Likewise.
504 * record-full.c (record_full_wait_1): Likewise.
505 (record_full_registers_change): Likewise.
506 (record_full_store_registers): Likewise.
507 (record_full_core_fetch_registers): Likewise.
508 (record_full_save): Likewise.
509 (record_full_goto_insn): Likewise.
510 * regcache.c (regcache_register_size): Likewise.
511 (get_regcache_arch): Remove.
512 (regcache_read_pc): Likewise.
513 * regcache.h (get_regcache_arch): Remove.
514 * remote-sim.c (gdbsim_fetch_register): Likewise.
515 (gdbsim_store_register): Likewise.
516 * remote.c (fetch_register_using_p): Likewise.
517 (send_g_packet): Likewise.
518 (remote_prepare_to_store): Likewise.
519 (store_registers_using_G): Likewise.
520 * reverse.c (save_bookmark_command): Likewise.
521 (goto_bookmark_command): Likewise.
522 * rs6000-aix-tdep.c (branch_dest): Likewise.
523 * rs6000-nat.c (rs6000_ptrace64): Likewise.
524 (fetch_register): Likewise.
525 * rs6000-tdep.c (ppc_supply_reg): Likewise.
526 (ppc_collect_reg): Likewise.
527 (ppc_collect_gregset): Likewise.
528 (ppc_collect_fpregset): Likewise.
529 (ppc_collect_vsxregset): Likewise.
530 (ppc_collect_vrregset): Likewise.
531 (ppc_displaced_step_hw_singlestep): Likewise.
532 (rs6000_pseudo_register_read): Likewise.
533 (rs6000_pseudo_register_write): Likewise.
534 * s390-linux-nat.c (supply_gregset): Likewise.
535 (fill_gregset): Likewise.
536 (s390_linux_fetch_inferior_registers): Likewise.
537 * s390-linux-tdep.c (s390_write_pc): Likewise.
538 (s390_software_single_step): Likewise.
539 (s390_all_but_pc_registers_record): Likewise.
540 (s390_linux_syscall_record): Likewise.
541 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
542 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
543 (shnbsd_store_inferior_registers): Likewise.
544 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
545 (sh_extract_return_value_fpu): Likewise.
546 (sh_store_return_value_nofpu): Likewise.
547 (sh_corefile_supply_regset): Likewise.
548 (sh_corefile_collect_regset): Likewise.
549 * sh64-tdep.c (sh64_extract_return_value): Likewise.
550 (sh64_store_return_value): Likewise.
551 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
552 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
553 (sparc_store_inferior_registers): Likewise.
554 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
555 (sparc_ravenscar_prepare_to_store): Likewise.
556 * sparc-tdep.c (sparc32_store_arguments): Likewise.
557 (sparc_analyze_control_transfer): Likewise.
558 (sparc_step_trap): Likewise.
559 (sparc_software_single_step): Likewise.
560 (sparc32_gdbarch_init): Likewise.
561 (sparc_supply_rwindow): Likewise.
562 (sparc_collect_rwindow): Likewise.
563 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
564 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
565 (sparc64nbsd_collect_gregset): Likewise.
566 (sparc64nbsd_supply_fpregset): Likewise.
567 (sparc64nbsd_collect_fpregset): Likewise.
568 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
569 (sparc64_supply_gregset): Likewise.
570 (sparc64_collect_gregset): Likewise.
571 (sparc64_supply_fpregset): Likewise.
572 (sparc64_collect_fpregset): Likewise.
573 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
574 * spu-tdep.c (spu_unwind_sp): Likewise.
575 (spu2ppu_prev_register): Likewise.
576 (spu_memory_remove_breakpoint): Likewise.
577 * stack.c (return_command): Likewise.
578 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
579 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
580 * tracefile.c (trace_save_ctf): Likewise.
581 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
582 (do_windows_store_inferior_registers): Likewise.
583 (windows_resume): Likewise.
584 * xtensa-linux-nat.c (fill_gregset): Likewise.
585 (supply_gregset_reg): Likewise.
586 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
587 (xtensa_register_read_masked): Likewise.
588 (xtensa_supply_gregset): Likewise.
589 (xtensa_extract_return_value): Likewise.
590 (xtensa_store_return_value): Likewise.
591
592 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
593
594 * doublest.c (floatformat_from_string): New function.
595 * doublest.h (floatformat_from_string): Add prototype.
596
597 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
598 (OP_FLOAT): ... this.
599 * expression.h: Do not include "doublest.h".
600 (union exp_element): Replace doubleconst and decfloatconst by
601 new element floatconst.
602 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
603 (ada_evaluate_subexp): Likewise.
604 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
605 OP_DOUBLE and OP_DECFLOAT.
606 * expprint.c (print_subexp_standard): Likewise.
607 (dump_subexp_body_standard): Likewise.
608 * breakpoint.c (watchpoint_exp_is_const): Likewise.
609
610 * parse.c: Include "dfp.h".
611 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
612 (write_exp_elt_floatcst): New function.
613 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
614 and OP_DECFLOAT.
615 (operator_check_standard): Likewise.
616 (parse_float): Do not accept suffix. Take type as input. Return bool.
617 Return target format buffer instead of host DOUBLEST.
618 Use floatformat_from_string and decimal_from_string to parse
619 either binary or decimal floating-point types.
620 (parse_c_float): Remove.
621 * parser-defs.h: Do not include "doublest.h".
622 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
623 (write_exp_elt_floatcst): Add prototype.
624 (parse_float): Update prototype.
625 (parse_c_float): Remove.
626
627 * c-exp.y: Do not include "dfp.h".
628 (typed_val_float): Use byte buffer instead of DOUBLEST.
629 (typed_val_decfloat): Remove.
630 (DECFLOAT): Remove.
631 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
632 (parse_number): Update to new parse_float interface.
633 Parse suffixes and determine type before calling parse_float.
634 Handle decimal and binary FP types the same way.
635
636 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
637 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
638 (parse_number): Update to new parse_float interface.
639 Parse suffixes and determine type before calling parse_float.
640
641 * f-exp.y: Replace dval by typed_val_float.
642 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
643 (parse_number): Use parse_float instead of atof.
644
645 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
646 (parse_go_float): Remove.
647 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
648 (parse_number): Call parse_float instead of parse_go_float.
649 Parse suffixes and determine type before calling parse_float.
650
651 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
652 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
653 (parse_number): Update to new parse_float interface.
654 Parse suffixes and determine type before calling parse_float.
655
656 * m2-exp.y: Replace dval by byte buffer val.
657 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
658 (parse_number): Call parse_float instead of atof.
659
660 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
661 (lex_number): Call parse_float instead of strtod.
662 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
663 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
664 Use write_exp_elt_floatcst.
665 (unit_testing): Remove static variable.
666 (rust_type): Do not check unit_testing.
667 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
668
669 * ada-exp.y (type_float, type_double): Remove.
670 (typed_val_float): Use byte buffer instead of DOUBLEST.
671 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
672 * ada-lex.l (processReal): Use parse_float instead of sscanf.
673
674 2017-10-25 Alan Hayward <alan.hayward@arm.com>
675
676 * aarch64-tdep.h (enum aarch64_regnum): Remove.
677 * arch/aarch64.h: New file.
678
679 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
680
681 * dfp.h (decimal_from_string): Use const reference for argument.
682 * dfp.c (decimal_from_string): Likewise.
683
684 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
685
686 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
687 * sh64-tdep.c (sh64_do_fp_register): Likewise.
688 * mips-tdep.c (mips_print_fp_register): Likewise.
689
690 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
691
692 * common/format.h (enum argclass): Replace decfloat_arg by
693 dec32float_arg, dec64float_arg, and dec128float_arg.
694 * common/format.c (parse_format_string): Update to return
695 new decimal float argument classes.
696
697 * printcmd.c (printf_decfloat): Rename to ...
698 (printf_floating): ... this. Add argclass argument, and use it
699 instead of parsing the format string again. Add support for
700 binary floating-point values, using floatformat_to_string.
701 Convert value to the target format if it doesn't already match.
702 (ui_printf): Call printf_floating instead of printf_decfloat,
703 also for double_arg / long_double_arg. Pass argclass.
704
705 * dfp.c (decimal_to_string): Add format string argument.
706 * dfp.h (decimal_to_string): Likewise.
707
708 * doublest.c (floatformat_to_string): Add format string argument.
709 * doublest.h (floatformat_to_string): Likewise.
710
711 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
712
713 * doublest.c (floatformat_precision): New routine.
714 (floatformat_to_string): Likewise.
715 * doublest.c (floatformat_to_string): Add prototype.
716
717 * printcmd.c (print_scalar_formatted): Only call print_floating
718 on floating-point types.
719 * valprint.c: Do not include "floatformat.h".
720 (generic_val_print_decfloat): Remove.
721 (generic_val_print): Call generic_val_print_float for both
722 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
723 (print_floating): Use floatformat_to_string. Handle decimal float.
724 (print_decimal_floating): Remove, merge into floatformat_to_string.
725 * value.h (print_decimal_floating): Remove.
726
727 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
728
729 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
730
731 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
732
733 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
734
735 * memattr.h: Don't include vec.h.
736 (struct mem_attrib): Initialize fields.
737 <unknown>: New static method.
738 (struct mem_region): Add constructors, operator<, initialize
739 fields.
740 * memattr.c: Include algorithm.
741 (default_mem_attrib, unknown_mem_attrib): Remove.
742 (user_mem_region_list): New global.
743 (target_mem_region_list, mem_region_list): Change type to
744 std::vector<mem_region>.
745 (mem_use_target): Now a function.
746 (target_mem_regions_valid): Change type to bool.
747 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
748 (require_user_regions): Adjust.
749 (require_target_regions): Adjust.
750 (create_mem_region): Adjust.
751 (lookup_mem_region): Adjust.
752 (invalidate_target_mem_regions): Adjust.
753 (mem_clear): Rename to...
754 (user_mem_clear): ... this, and adjust.
755 (mem_command): Adjust.
756 (info_mem_command): Adjust.
757 (mem_enable, enable_mem_command, mem_disable,
758 disable_mem_command): Adjust.
759 (mem_delete): Adjust.
760 (delete_mem_command): Adjust.
761 * memory-map.h (parse_memory_map): Return an std::vector.
762 * memory-map.c (parse_memory_map): Likewise.
763 (struct memory_map_parsing_data): Add constructor.
764 <memory_map>: Point to std::vector.
765 (memory_map_start_memory): Adjust.
766 (memory_map_end_memory): Adjust.
767 (memory_map_end_property): Adjust.
768 (clear_result): Remove.
769 * remote.c (remote_memory_map): Return an std::vector.
770 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
771 Remove.
772 (target_debug_print_mem_region_vector): New.
773 * target-delegates.c: Regenerate.
774 * target.h (mem_region_vector): New typedef.
775 (to_memory_map): Return mem_region_vector.
776 (target_memory_map): Return an std::vector.
777 * target.c (target_memory_map): Return an std::vector.
778 (flash_erase_command): Adjust.
779
780 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
781
782 * memory-map.c (struct memory_map_parsing_data) <property_name>:
783 Change type to std::string.
784 (memory_map_start_property): Adjust.
785 (memory_map_end_property): Adjust.
786
787 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
788
789 * infrun.h: Include common/byte-vector.h.
790 (struct displaced_step_closure): New struct.
791 (struct buf_displaced_step_closure): New struct.
792 * infrun.c (displaced_step_closure::~displaced_step_closure):
793 Provide default implementation.
794 (displaced_step_clear): Deallocate step closure with delete.
795 * aarch64-tdep.c (displaced_step_closure): Rename to ...
796 (aarch64_displaced_step_closure): ... this, extend
797 displaced_step_closure.
798 (aarch64_displaced_step_data) <dsc>: Change type to
799 aarch64_displaced_step_closure.
800 (aarch64_displaced_step_copy_insn): Adjust to type change, use
801 unique_ptr.
802 (aarch64_displaced_step_fixup): Add cast for displaced step
803 closure.
804 * amd64-tdep.c (displaced_step_closure): Rename to ...
805 (amd64_displaced_step_closure): ... this, extend
806 displaced_step_closure.
807 <insn_buf>: Change type to std::vector<gdb_byte>.
808 <max_len>: Remove.
809 (fixup_riprel): Change type of DSC parameter, adjust to type
810 change of insn_buf.
811 (fixup_displaced_copy): Change type of DSC parameter.
812 (amd64_displaced_step_copy_insn): Instantiate
813 amd64_displaced_step_closure.
814 (amd64_displaced_step_fixup): Add cast for closure type, adjust
815 to type change of insn_buf.
816 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
817 parameter DSC.
818 (arm_linux_copy_svc): Likewise.
819 (cleanup_kernel_helper_return): Likewise.
820 (arm_catch_kernel_helper_return): Likewise.
821 (arm_linux_displaced_step_copy_insn): Instantiate
822 arm_displaced_step_closure.
823 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
824 (displaced_read_reg): Change type of parameter DSC.
825 (branch_write_pc): Likewise.
826 (load_write_pc): Likewise.
827 (alu_write_pc): Likewise.
828 (displaced_write_reg): Likewise.
829 (arm_copy_unmodified): Likewise.
830 (thumb_copy_unmodified_32bit): Likewise.
831 (thumb_copy_unmodified_16bit): Likewise.
832 (cleanup_preload): Likewise.
833 (install_preload): Likewise.
834 (arm_copy_preload): Likewise.
835 (thumb2_copy_preload): Likewise.
836 (install_preload_reg): Likewise.
837 (arm_copy_preload_reg): Likewise.
838 (cleanup_copro_load_store): Likewise.
839 (install_copro_load_store): Likewise.
840 (arm_copy_copro_load_store) Likewise.
841 (thumb2_copy_copro_load_store): Likewise.
842 (cleanup_branch): Likewise.
843 (install_b_bl_blx): Likewise.
844 (arm_copy_b_bl_blx): Likewise.
845 (thumb2_copy_b_bl_blx): Likewise.
846 (thumb_copy_b): Likewise.
847 (install_bx_blx_reg): Likewise.
848 (arm_copy_bx_blx_reg): Likewise.
849 (thumb_copy_bx_blx_reg): Likewise.
850 (cleanup_alu_imm): Likewise.
851 (arm_copy_alu_imm): Likewise.
852 (thumb2_copy_alu_imm): Likewise.
853 (cleanup_alu_reg): Likewise.
854 (install_alu_reg): Likewise.
855 (arm_copy_alu_reg): Likewise.
856 (thumb_copy_alu_reg): Likewise.
857 (cleanup_alu_shifted_reg): Likewise.
858 (install_alu_shifted_reg): Likewise.
859 (arm_copy_alu_shifted_reg): Likewise.
860 (cleanup_load): Likewise.
861 (cleanup_store): Likewise.
862 (arm_copy_extra_ld_st): Likewise.
863 (install_load_store): Likewise.
864 (thumb2_copy_load_literal): Likewise.
865 (thumb2_copy_load_reg_imm): Likewise.
866 (arm_copy_ldr_str_ldrb_strb): Likewise.
867 (cleanup_block_load_all): Likewise.
868 (cleanup_block_store_pc): Likewise.
869 (cleanup_block_load_pc): Likewise.
870 (arm_copy_block_xfer): Likewise.
871 (thumb2_copy_block_xfer): Likewise.
872 (cleanup_svc): Likewise.
873 (install_svc): Likewise.
874 (arm_copy_svc): Likewise.
875 (thumb_copy_svc): Likewise.
876 (arm_copy_undef): Likewise.
877 (thumb_32bit_copy_undef): Likewise.
878 (arm_copy_unpred): Likewise.
879 (arm_decode_misc_memhint_neon): Likewise.
880 (arm_decode_unconditional): Likewise.
881 (arm_decode_miscellaneous): Likewise.
882 (arm_decode_dp_misc): Likewise.
883 (arm_decode_ld_st_word_ubyte): Likewise.
884 (arm_decode_media): Likewise.
885 (arm_decode_b_bl_ldmstm): Likewise.
886 (arm_decode_ext_reg_ld_st): Likewise.
887 (thumb2_decode_dp_shift_reg): Likewise.
888 (thumb2_decode_ext_reg_ld_st): Likewise.
889 (arm_decode_svc_copro): Likewise.
890 (thumb2_decode_svc_copro): Likewise.
891 (install_pc_relative): Likewise.
892 (thumb_copy_pc_relative_16bit): Likewise.
893 (thumb_decode_pc_relative_16bit): Likewise.
894 (thumb_copy_pc_relative_32bit): Likewise.
895 (thumb_copy_16bit_ldr_literal): Likewise.
896 (thumb_copy_cbnz_cbz): Likewise.
897 (thumb2_copy_table_branch): Likewise.
898 (cleanup_pop_pc_16bit_all): Likewise.
899 (thumb_copy_pop_pc_16bit): Likewise.
900 (thumb_process_displaced_16bit_insn): Likewise.
901 (decode_thumb_32bit_ld_mem_hints): Likewise.
902 (thumb_process_displaced_32bit_insn): Likewise.
903 (thumb_process_displaced_insn): Likewise.
904 (arm_process_displaced_insn): Likewise.
905 (arm_displaced_init_closure): Likewise.
906 (arm_displaced_step_fixup): Add cast for closure.
907 * arm-tdep.h: Include infrun.h.
908 (displaced_step_closure): Rename to ...
909 (arm_displaced_step_closure): ... this, extend
910 displaced_step_closure.
911 <u::svc::copy_svc_os>: Change type of parameter DSC.
912 <cleanup>: Likewise.
913 (arm_process_displaced_insn): Likewise.
914 (arm_displaced_init_closure): Likewise.
915 (displaced_read_reg): Likewise.
916 (displaced_write_reg): Likewise.
917 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
918 Adjust.
919 * i386-tdep.h: Include infrun.h.
920 (i386_displaced_step_closure): New typedef.
921 * i386-tdep.c (i386_displaced_step_copy_insn): Use
922 i386_displaced_step_closure.
923 (i386_displaced_step_fixup): Adjust.
924 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
925 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
926 and unique_ptr.
927 (ppc_displaced_step_fixup): Adjust.
928 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
929 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
930 and unique_ptr.
931 (s390_displaced_step_fixup): Adjust.
932
933 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
934
935 * interps.h (interp_resume, interp_suspend, interp_set_temp):
936 Remove declarations.
937
938 2017-10-20 Tom Tromey <tom@tromey.com>
939
940 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
941 std::vector.
942 (gdb_bfd_record_inclusion): Update.
943 (bfdp): Remove typedef.
944
945 2017-10-20 Tom Tromey <tom@tromey.com>
946
947 * gdb_bfd.c (gdb_bfd_ref): Use new.
948 (struct gdb_bfd_data): Add constructor, destructor, and member
949 initializers.
950 (gdb_bfd_unref): Use delete.
951
952 2017-10-20 Tom Tromey <tom@tromey.com>
953
954 * exec.c (exec_file_attach): Use new_bfd_ref.
955 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
956 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
957 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
958 new_bfd_ref.
959 * gdb_bfd.h (new_bfd_ref): New function.
960
961 2017-10-20 Pedro Alves <palves@redhat.com>
962
963 * main.c (captured_command_loop): Add attribute noinline.
964
965 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
966
967 * interps.c (struct interp_factory): Add constructor.
968 (interp_factory_p): Remove typedef.
969 (DEF_VEC_P(interp_factory_p)): Remove.
970 (interpreter_factories): Change type to std::vector.
971 (interp_factory_register): Adjust.
972 (interp_lookup): Adjust.
973 (interpreter_completer): Adjust.
974
975 2017-10-19 Tom Tromey <tom@tromey.com>
976
977 * break-catch-syscall.c (catch_syscall_completer): Use
978 std::string, gdb::unique_xmalloc_ptr.
979
980 2017-10-19 Tom Tromey <tom@tromey.com>
981
982 * infcall.c (call_function_by_hand_dummy): Use std::string.
983
984 2017-10-19 Tom Tromey <tom@tromey.com>
985
986 * mi/mi-main.c (mi_cmd_execute): Update.
987 * top.h (prepare_execute_command): Return scoped_value_mark.
988 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
989 Add move constructor.
990 * top.c (prepare_execute_command): Return scoped_value_mark.
991 (execute_command): Update.
992
993 2017-10-19 Pedro Alves <palves@redhat.com>
994
995 * xml-support.c (xml_fetch_content_from_file): Check fread's
996 return.
997
998 2017-10-19 Pedro Alves <palves@redhat.com>
999
1000 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1001 async.
1002 (handle_error_fd): New function.
1003 (ser_base_async): Add/delete an event loop file handler for
1004 error_fd.
1005
1006 2017-10-19 Pedro Alves <palves@redhat.com>
1007
1008 * xml-support.c (xml_fetch_content_from_file): Don't read in
1009 chunks. Instead use fseek to determine the file's size, and read
1010 it in one go.
1011
1012 2017-11-18 Keith Seitz <keiths@redhat.com>
1013
1014 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1015 types.
1016 Add whitespace to front of type name.
1017
1018 2017-10-18 Keith Seitz <keiths@redhat.com>
1019
1020 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1021 DW_AT_accessibility.
1022
1023 2017-10-18 Yao Qi <yao.qi@linaro.org>
1024
1025 * features/tic6x-c62x-linux.c: Remove.
1026
1027 2017-10-17 Tom Tromey <tom@tromey.com>
1028
1029 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1030 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1031 (do_mixed_source_and_assembly): Likewise.
1032
1033 2017-10-17 Tom Tromey <tom@tromey.com>
1034
1035 * regcache.c (regcache::xfer_part): Remove assertion.
1036
1037 2017-10-17 Pedro Alves <palves@redhat.com>
1038
1039 * xml-support.c (xml_fetch_content_from_file): Call
1040 unique_ptr::release() instead unique_ptr::get() when passing
1041 through xrealloc.
1042
1043 2017-10-17 Yao Qi <yao.qi@linaro.org>
1044
1045 * regcache.c (regcache::xfer_part): Remove parameters read and
1046 write, add parameter is_raw. All callers are updated.
1047
1048 2017-10-16 Keith Seitz <keiths@redhat.com>
1049
1050 * c-typeprint.c (enum access_specifier): Moved here from
1051 c_type_print_base.
1052 (output_access_specifier): New function.
1053 (c_type_print_base): Consider typedefs when assessing
1054 whether access labels are needed.
1055 Use output_access_specifier as needed.
1056 Output access specifier for typedefs, if needed.
1057 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1058 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1059 fields.
1060 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1061 accessor macros.
1062
1063 2017-10-16 Tom Tromey <tom@tromey.com>
1064
1065 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1066 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1067 * target.c (target_fileio_read_stralloc): Update.
1068 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1069 * target.h (target_fileio_read_stralloc): Return
1070 unique_xmalloc_ptr.
1071
1072 2017-10-16 Tom Tromey <tom@tromey.com>
1073
1074 * xml-syscall.c (xml_init_syscalls_info): Update.
1075 * xml-support.c (xinclude_start_include): Update.
1076 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1077 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1078 (xml_fetch_content_from_file): Likewise.
1079 * osdata.c (get_osdata): Update.
1080 * target.h (target_read_stralloc, target_get_osdata): Return
1081 unique_xmalloc_ptr.
1082 * solib-aix.c (solib_aix_get_library_list): Update.
1083 * solib-target.c (solib_target_current_sos): Update.
1084 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1085 * xml-tdesc.c (fetch_available_features_from_target): Update.
1086 (target_fetch_description_xml): Update.
1087 (file_read_description_xml): Update.
1088 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1089 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1090 (remote_pid_to_exec_file): Update.
1091 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1092 (target_get_osdata): Likewise.
1093
1094 2017-10-16 Tom Tromey <tom@tromey.com>
1095
1096 * remote.c (remote_register_number_and_offset): Use std::vector.
1097 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1098 (putpkt_binary): Use gdb::def_vector.
1099 (compare_sections_command): Use gdb::byte_vector.
1100
1101 2017-10-16 Tom Tromey <tom@tromey.com>
1102
1103 * ppc-linux-nat.c (hwdebug_insert_point): Use
1104 gdb::unique_xmalloc_ptr, XDUP.
1105
1106 2017-10-16 Tom Tromey <tom@tromey.com>
1107
1108 * probe.c (parse_probes): Use std::string.
1109 (info_probes_for_ops, enable_probes_command)
1110 (disable_probes_command): Remove cleanups.
1111
1112 2017-10-16 Tom Tromey <tom@tromey.com>
1113
1114 * buildsym.c (block_compar): Remove.
1115 (end_symtab_get_static_block): Use std::vector.
1116
1117 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1118
1119 * memrange.h (struct mem_range): Define operator< and operator==.
1120 (mem_range_s): Remove.
1121 (DEF_VEC_O (mem_range_s)): Remove.
1122 (normalize_mem_ranges): Change parameter type to std::vector.
1123 * memrange.c (compare_mem_ranges): Remove.
1124 (normalize_mem_ranges): Change parameter type to std::vector,
1125 adjust to vector change.
1126 * exec.c (section_table_available_memory): Return vector, remove
1127 parameter.
1128 (section_table_read_available_memory): Adjust to std::vector
1129 change.
1130 * remote.c (remote_read_bytes): Adjust to std::vector
1131 change.
1132 * tracepoint.h (traceframe_available_memory): Change parameter
1133 type to std::vector.
1134 * tracepoint.c (traceframe_available_memory): Change parameter
1135 type to std::vector, adjust.
1136 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1137 std::vector change.
1138 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1139 unittests/memrange-selftests.c.
1140 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1141 * gdb/unittests/memrange-selftests.c: New file.
1142
1143 2017-10-16 Pedro Alves <palves@redhat.com>
1144
1145 * elfread.c (probe_key_free): Rename range-for variable.
1146 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1147 (find_probe_by_pc, collect_probes): Rename range-for variable.
1148
1149 2017-10-16 Yao Qi <yao.qi@linaro.org>
1150
1151 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1152 * features/tic6x-c62x.c: Remove.
1153 * features/tic6x-c64x-linux.c: Remove.
1154 * features/tic6x-c64x.c: Remove.
1155 * features/tic6x-c64xp-linux.c: Remove.
1156 * features/tic6x-c64xp.c: Remove.
1157 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1158 initialize_tdesc_tic6x_*_linux functions.
1159 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1160 initialize_tdesc_tic6x_* functions.
1161
1162 2017-10-16 Yao Qi <yao.qi@linaro.org>
1163
1164 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1165 tic6x-c62x.
1166 * regformats/tic6x-c62x.dat: Remove.
1167 * regformats/tic6x-c64x.dat: Remove.
1168 * regformats/tic6x-c64xp.dat: Remove.
1169
1170 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1171
1172 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1173 (the !HAVE_LIBEXPAT version).
1174
1175 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1176
1177 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1178 const.
1179
1180 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1181
1182 * target.h: Include tracepoint.h.
1183 (enum trace_find_type): Move to tracepoint.h.
1184 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1185 * tracepoint.h: Don't include target.h
1186 (enum trace_find_type): Move from target.h.
1187 (parse_traceframe_info): Return a unique ptr.
1188 * tracepoint.c (current_traceframe_info): Change type to unique
1189 ptr.
1190 (free_traceframe_info): Remove.
1191 (clear_traceframe_info): Don't manually free
1192 current_traceframe_info.
1193 (free_result): Remove.
1194 (parse_traceframe_info): Return a unique ptr.
1195 (get_traceframe_info): Adjust to unique ptr.
1196 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1197 * remote.c (remote_traceframe_info): Return a unique ptr.
1198 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1199 ptr.
1200 * target-debug.h (target_debug_print_traceframe_info_up): New
1201 macro.
1202 * target-delegates.c: Regenerate.
1203
1204 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1205
1206 * memrange.h (struct mem_range): Add constructors.
1207 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1208 std::vector<mem_range>.
1209 * tracepoint.c (free_traceframe_info): Don't manually free
1210 vector.
1211 (traceframe_info_start_memory): Adjust to vector change.
1212 (traceframe_available_memory): Likewise.
1213 * tracefile-tfile.c (build_traceframe_info): Likewise.
1214 * ctf.c (ctf_traceframe_info): Likewise.
1215
1216 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1217
1218 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1219 std::vector<int>.
1220 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1221 (traceframe_info_start_tvar): Adjust to vector change.
1222 (parse_traceframe_info): Allocate with new.
1223 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1224 vector change.
1225 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1226 change.
1227 tfile_traceframe_info): Allocate with new.
1228 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1229 change.
1230
1231 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1232
1233 * tracepoint.c (traceframe_info): Rename to...
1234 (current_traceframe_info): ...this.
1235 (clear_traceframe_info): Adjust.
1236 (get_traceframe_info): Adjust.
1237
1238 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1239
1240 * nat/linux-osdata.c: Include algorithm.
1241 (compare_processes): Remove.
1242 (struct pid_pgid_entry): New struct.
1243 (linux_xfer_osdata_processgroups): Use std::vector instead of
1244 XNEWVEC.
1245
1246 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1247
1248 * objfiles.h: Don't include symfile.h.
1249 (struct partial_symbol): Remove forward-declaration.
1250 (struct objfile) <global_psymbols, static_psymbols>: Change type
1251 to std::vector<partial_symbol *>.
1252 * objfiles.c (objfile::objfile): Don't memset those fields.
1253 (objfile::~objfile): Don't free those fields.
1254 * psympriv.h (struct psymbol_allocation_list): Remove
1255 forward-declaration.
1256 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1257 to std::vector.
1258 (start_psymtab_common): Change parameters to std::vector.
1259 * psymtab.c: Include algorithm.
1260 (require_partial_symbols): Call shrink_to_fit.
1261 (find_pc_sect_psymbol): Adjust to vector change.
1262 (match_partial_symbol): Likewise.
1263 (lookup_partial_symbol): Likewise.
1264 (psym_relocate): Likewise.
1265 (dump_psymtab): Likewise.
1266 (recursively_search_psymtabs): Likewise.
1267 (compare_psymbols): Remove.
1268 (sort_pst_symbols): Adjust to vector change.
1269 (start_psymtab_common): Likewise.
1270 (end_psymtab_common): Likewise.
1271 (psymbol_bcache_full): De-constify return value.
1272 (add_psymbol_to_bcache): Likewise.
1273 (extend_psymbol_list): Remove.
1274 (append_psymbol_to_list): Adjust to vector change.
1275 (add_psymbol_to_list): Likewise.
1276 (init_psymbol_list): Likewise.
1277 (maintenance_info_psymtabs): Likewise.
1278 (maintenance_check_psymtabs): Likewise.
1279 * symfile.h (struct psymbol_allocation_list): Remove.
1280 * symfile.c (reread_symbols): Adjust to vector change.
1281 * dbxread.c (start_psymtab): Change type of parameters.
1282 (dbx_symfile_read): Adjust to vector change.
1283 (read_dbx_symtab): Likewise.
1284 (start_psymtab): Change type of parameters.
1285 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1286 (create_partial_symtab): Likewise.
1287 (add_partial_symbol): Likewise.
1288 (write_one_signatured_type): Likewise.
1289 (recursively_write_psymbols): Likewise.
1290 * mdebugread.c (parse_partial_symbols): Likewise.
1291 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1292 (scan_xcoff_symtab): Adjust to vector change.
1293 (xcoff_initial_scan): Likewise.
1294
1295 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1296
1297 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1298
1299 2017-10-13 Yao Qi <yao.qi@linaro.org>
1300
1301 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1302 Remove s390x-*-expedite, add s390x-expedite.
1303
1304 2017-10-13 Yao Qi <yao.qi@linaro.org>
1305
1306 * features/s390-gs-linux64.c: Regenerated.
1307 * features/s390x-gs-linux64.c: Regenerated.
1308
1309 2017-10-13 Tom Tromey <tom@tromey.com>
1310
1311 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1312 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1313 delete.
1314 * symfile.c (symbol_file_add_with_addrs): Use new.
1315 (symbol_file_add_separate): Update comment.
1316 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1317 * jit.c (jit_object_close_impl): Use new.
1318 (jit_unregister_code): Use delete.
1319 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1320 (~objfile): Rename from free_objfile.
1321 (free_objfile_separate_debug, do_free_objfile_cleanup)
1322 (free_all_objfiles, objfile_purge_solibs): Use delete.
1323 * objfiles.h (struct objfile): Add constructor and destructor.
1324 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1325 (allocate_objfile, free_objfile): Don't declare.
1326 (struct objstats): Add initializers.
1327
1328 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1331 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1332 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1333 * gdbarch.h: Regenerate.
1334 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1335 Adjust comment.
1336 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1337 (i386_displaced_step_fixup): Adjust comment.
1338 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1339
1340 2017-10-12 Tom Tromey <tom@tromey.com>
1341
1342 * prologue-value.h (pv_area::store_would_trash): Return bool.
1343 (pv_area::find_reg): Likewise.
1344 * prologue-value.c (pv_area::store_would_trash): Return bool.
1345 (pv_area::find_reg): Likewise.
1346
1347 2017-10-12 Tom Tromey <tom@tromey.com>
1348
1349 * s390-linux-tdep.c (s390_store, s390_load)
1350 (s390_check_for_saved, s390_analyze_prologue): Update.
1351 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1352 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1353 * prologue-value.h (class pv_area): Move from prologue-value.c.
1354 Change names of members. Add constructor, destructor, member
1355 functions.
1356 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1357 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1358 (pv_area_fetch, pv_area_scan): Don't declare.
1359 * prologue-value.c (struct pv_area::area_entry): Now member of
1360 pv_area.
1361 (struct pv_area): Move to prologue-value.h.
1362 (pv_area::pv_area): Rename from make_pv_area.
1363 (pv_area::~pv_area): Rename from free_pv_area.
1364 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1365 (clear_entries, find_entry, overlaps, store_would_trash, store)
1366 (fetch, find_reg, scan): Now member of pv_area.
1367 Remove "area" argument. Update.
1368 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1369 Update.
1370 * mn10300-tdep.c (push_reg, check_for_saved)
1371 (mn10300_analyze_prologue): Update.
1372 * mep-tdep.c (is_arg_spill, check_for_saved)
1373 (mep_analyze_prologue): Update.
1374 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1375 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1376 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1377 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1378 Update.
1379 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1380 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1381
1382 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1383
1384 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1385 * linux-nat.c (linux_nat_delete_thread): New variable.
1386 (lwp_free): Invoke linux_nat_delete_thread if set.
1387 (linux_nat_set_delete_thread): New function.
1388 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1389 thread delete callback.
1390 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1391 (_initialize_arm_linux_nat): Assign thread delete callback.
1392 * s390-linux-nat.c (s390_delete_thread): New function.
1393 (_initialize_s390_nat): Assign thread delete callback.
1394 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1395 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1396 function.
1397 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1398 declaration.
1399 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1400 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1401
1402 2017-10-09 Tom Tromey <tom@tromey.com>
1403
1404 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1405 std::string.
1406 * tui/tui-layout.c (enum tui_status): Use std::string.
1407
1408 2017-10-11 Tom Tromey <tom@tromey.com>
1409
1410 * gdbthread.h (thread_command): Constify.
1411 * inferior.h (detach_command): Constify.
1412 * top.h (set_history, show_history): Constify.
1413 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1414 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1415 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1416 * printcmd.c (set_command): Constify.
1417 (non_const_set_command): New function.
1418 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1419 * breakpoint.c (enable_command, disable_command, delete_command)
1420 (catch_command, tcatch_command, set_breakpoint_cmd)
1421 (show_breakpoint_cmd): Constify.
1422 * macrocmd.c (macro_command): Constify.
1423 * infcmd.c (unset_command, kill_command, detach_command)
1424 (info_proc_cmd): Constify.
1425 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1426 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1427 (info_auto_load_cmd): Constify.
1428 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1429 (unset_tdesc_cmd): Constify.
1430 * ada-lang.c (set_ada_command, show_ada_command)
1431 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1432 * guile/guile.c (set_guile_command, show_guile_command)
1433 (info_guile_command): Constify.
1434 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1435 Constify.
1436 * skip.c (skip_command): Constify.
1437 * compile/compile.c (_initialize_compile): Constify.
1438 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1439 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1440 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1441 (maint_btrace_pt_show_cmd): Constify.
1442 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1443 Constify.
1444 * python/python.c (user_show_python, user_set_python): Constify.
1445 * mips-tdep.c (set_mips_command, show_mips_command)
1446 (set_mipsfpu_command): Constify.
1447 * record-btrace.c (cmd_record_btrace_start)
1448 (cmd_set_record_btrace, cmd_show_record_btrace)
1449 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1450 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1451 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1452 Constify.
1453 * symfile.c (overlay_command): Constify.
1454 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1455 * cli/cli-logging.c (set_logging_command, show_logging_command):
1456 Constify.
1457 * cli/cli-dump.c (dump_command, append_command)
1458 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1459 (tekhex_dump_command, binary_dump_command)
1460 (binary_append_command): Constify.
1461 * cli/cli-decode.c (struct cmd_list_element): Change type of
1462 "fun".
1463 * cli/cli-cmds.c (info_command, show_command, set_debug)
1464 (show_debug): Constify.
1465 (show_command): Add non-const overload.
1466 * top.c (set_history, show_history): Constify.
1467 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1468 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1469 * target.c (target_command): Constify.
1470 * sparc64-tdep.c (info_adi_command): Constify.
1471 * record-full.c (cmd_record_full_start): Constify.
1472 (set_record_full_command): Constify. Fix typo.
1473 (show_record_full_command): Constify.
1474 * thread.c (thread_command, thread_apply_command): Constify.
1475 * memattr.c (dummy_cmd): Constify.
1476 * value.c (function_command): Constify.
1477 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1478 * probe.c (info_probes_command): Constify.
1479 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1480 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1481 (show_thread_cmd, set_thread_default_cmd)
1482 (show_thread_default_cmd): Constify.
1483 (check_empty): Constify.
1484 * tracepoint.c (tfind_command): Constify.
1485 * cp-support.c (maint_cplus_command): Constify.
1486 * windows-tdep.c (info_w32_command): Constify.
1487 * record.c (cmd_record_start, set_record_command)
1488 (show_record_command, info_record_command, cmd_record_goto):
1489 Constify.
1490 * ravenscar-thread.c (set_ravenscar_command)
1491 (show_ravenscar_command): Constify.
1492 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1493 Constify.
1494 (add_internal_problem_command): Remove casts.
1495 * arc-tdep.c (maintenance_print_arc_command): Constify.
1496 * valprint.c (set_print, show_print, set_print_raw)
1497 (show_print_raw): Constify.
1498 * maint.c (maintenance_command, maintenance_info_command)
1499 (maintenance_print_command, maintenance_set_cmd)
1500 (maintenance_show_cmd, set_per_command_cmd)
1501 (show_per_command_cmd, maintenance_check_command): Constify.
1502 * language.c (set_check, show_check): Constify.
1503 * typeprint.c (show_print_type, set_print_type): Constify.
1504 * go32-nat.c (go32_info_dos_command): Constify.
1505
1506 2017-10-11 Tom Tromey <tom@tromey.com>
1507
1508 * breakpoint.c (prepare_re_set_context): Remove.
1509 (breakpoint_re_set_one): Update. Don't use cleanups.
1510 (breakpoint_re_set): Use scoped_restore, std::string, and
1511 scoped_restore_current_language.
1512
1513 2017-10-11 Tom Tromey <tom@tromey.com>
1514
1515 * breakpoint.c (commands_command_1): Use std::string.
1516 (cleanup_executing_breakpoints): Remove.
1517 (bpstat_do_actions_1): Use scoped_restore.
1518 (bpstat_check_watchpoint): Use std::string.
1519 (decode_static_tracepoint_spec): Likewise.
1520 (break_range_command): Likewise.
1521 (watch_command_1): Likewise.
1522 (compare_breakpoints): Change argument types.
1523 (clear_command): Use std::vector.
1524 (cleanup_executing_breakpoints): Remove.
1525 (update_global_location_list): Use unique_xmalloc_ptr.
1526 (strace_command): Remove unused declaration.
1527
1528 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1529
1530 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1531 * NEWS: Mention new FreeBSD/arm native configuration.
1532 * configure.host: Add arm*-*-freebsd*.
1533 * configure.nat: Likewise.
1534 * arm-fbsd-nat.c: New file.
1535
1536 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1537
1538 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1539 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1540 * NEWS: Mention new FreeBSD/arm target.
1541 * configure.tgt: Add arm*-*-freebsd*.
1542 * arm-fbsd-tdep.c: New file.
1543 * arm-fbsd-tdep.h: New file.
1544
1545 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1546
1547 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1548 `gdbarch_elfcore_write_linux_prpsinfo'.
1549 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1550 method.
1551 (elf_internal_linux_prpsinfo): Remove declaration.
1552 * gdbarch.h: Regenerate.
1553 * gdbarch.c: Regenerate.
1554
1555 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1556
1557 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1558 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1559
1560 2017-10-11 Pedro Alves <palves@redhat.com>
1561
1562 * breakpoint.c (reattach_breakpoints): Delete.
1563 * breakpoint.h (reattach_breakpoints): Delete.
1564
1565 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1566
1567 * symfile.c (registered_sym_fns): Make struct, not typedef.
1568 (DEF_VEC_O (registered_sym_fns)): Remove.
1569 (symtab_fns): Change type to std::vector.
1570 (add_symtab_fns): Adjust.
1571 (find_sym_fns): Adjust.
1572
1573 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1574
1575 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1576 * arc-tdep.h (arc_arch_is_em): New function.
1577 (arc_arch_is_hs): Likewise.
1578
1579 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1580
1581 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1582 parentheses in the declaration.
1583 (macro_lookup_inclusion): Likewise.
1584 (macro_lookup_definition): Likewise.
1585 * p-lang.h (pascal_builtin_types): Likewise.
1586 * tui/tui-data.c (tui_win_list): Likewise.
1587 * tui/tui-data.h (tui_win_list): Likewise.
1588 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1589
1590 2017-10-11 Mark Rages <markrages@gmail.com>
1591
1592 * target-memory.c (block_boundaries): Fix for block address not
1593 aligned on block size.
1594
1595 2017-10-10 Pedro Alves <palves@redhat.com>
1596 Tom Tromey <tom@tromey.com>
1597
1598 * breakpoint.c (struct captured_breakpoint_query_args)
1599 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1600 (print_breakpoint): New.
1601 * breakpoint.h (print_breakpoint): Declare.
1602 * common/common-exceptions.h (enum return_reason): Remove
1603 references to catch_exceptions.
1604 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1605 Delete.
1606 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1607 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1608 * gdb.h: Delete.
1609 * gdbthread.h (thread_select): Declare.
1610 * mi/mi-cmd-break.c: Don't include gdb.h.
1611 (breakpoint_notify): Use print_breakpoint.
1612 * mi/mi-cmd-catch.c: Don't include gdb.h.
1613 * mi/mi-interp.c: Don't include gdb.h.
1614 (mi_print_breakpoint_for_event): New.
1615 (mi_breakpoint_created, mi_breakpoint_modified): Use
1616 mi_print_breakpoint_for_event.
1617 * mi/mi-main.c: Don't include gdb.h.
1618 (mi_cmd_thread_select): Parse the global thread ID here. Use
1619 thread_select instead of gdb_thread_select.
1620 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1621 of using gdb_list_thread_ids.
1622 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1623 FILEIO_ENOSYS here.
1624 (remote_fileio_request): Use TRY/CATCH instead of
1625 catch_exceptions.
1626 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1627 (symbol_file_add_from_memory_wrapper): Delete.
1628 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1629 * thread.c: Don't include gdb.h.
1630 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1631 (thread_alive): Use thread_select.
1632 (do_captured_thread_select): Delete, parts salvaged as ...
1633 (thread_select): ... this new function.
1634 (gdb_thread_select): Delete.
1635
1636 2017-10-10 Pedro Alves <palves@redhat.com>
1637 Tom Tromey <tom@tromey.com>
1638
1639 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1640 and reverse logic.
1641 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1642 No longer macros. Instead ...
1643 (enum wp_check_result): They're now values of this new
1644 enumeration.
1645 (watchpoint_check): Change return type to wp_check_result and
1646 parameter type to bpstat.
1647 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1648 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1649 catch_errors. Reverse logic of watchpoint_check call.
1650 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1651 pointer as parameter.
1652 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1653 * common/common-exceptions.c (throw_exception_sjlj): Update
1654 comments to avoid mentioning catch_errors.
1655 * exceptions.c (catch_errors): Delete.
1656 * exceptions.h: Update comments to avoid mentioning catch_errors.
1657 (catch_errors_ftype, catch_errors): Delete.
1658 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1659 (hook_stop_stub): Delete.
1660 (restore_selected_frame): Change return type to void, and
1661 parameter type to const frame_id &.
1662 (restore_infcall_control_state): Use TRY/CATCH instead of
1663 catch_errors.
1664 * main.c (captured_command_loop): Return void and remove
1665 parameter. Remove references to catch_errors.
1666 (captured_main): Use TRY/CATCH instead of catch_errors.
1667 * objc-lang.c (objc_submethod_helper_data)
1668 (find_objc_msgcall_submethod_helper): Delete.
1669 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1670 catch_errors.
1671 * record-full.c (record_full_message): Return void.
1672 (record_full_message_args, record_full_message_wrapper): Delete.
1673 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1674 instead of catch_errors.
1675 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1676 parameter type to int.
1677 * solib-darwin.c (open_symbol_file_object): Ditto.
1678 * solib-dsbt.c (open_symbol_file_object): Ditto.
1679 * solib-frv.c (open_symbol_file_object): Ditto.
1680 * solib-svr4.c (open_symbol_file_object): Ditto.
1681 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1682 * solib.c (update_solib_list): Use TRY/CATCH instead of
1683 catch_errors.
1684 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1685 Change type.
1686 * symmisc.c (struct print_symbol_args): Remove.
1687 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1688 (print_symbol): Change type.
1689 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1690 and remove parameters.
1691 (catch_errors): New.
1692 (get_windows_debug_event): Adjust.
1693
1694 2017-10-09 Tom Tromey <tom@tromey.com>
1695
1696 * mi/mi-main.c (free_splay_tree): Remove.
1697 (list_available_thread_groups): Use splay_tree_up.
1698 * common/gdb_splay_tree.h: New file.
1699
1700 2017-10-09 Tom Tromey <tom@tromey.com>
1701
1702 * mi/mi-main.c (do_nothing): Remove.
1703 (list_available_thread_groups): Update.
1704
1705 2017-10-09 Pedro Alves <palves@redhat.com>
1706
1707 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1708 reading registers when switching context.
1709
1710 2017-10-09 John Baldwin <jhb@FreeBSD.org>
1711
1712 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1713 (fbsd_convert_siginfo): Likewise.
1714 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1715
1716 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1717
1718 * configure.ac (try_guile_versions): Remove guile-2.2.
1719 * configure: Regenerate.
1720
1721 2017-10-09 Tom Tromey <tom@tromey.com>
1722
1723 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1724 (COMPILE.pre): Use $(CXX).
1725
1726 2017-10-09 Pedro Alves <palves@redhat.com>
1727
1728 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1729 Use bool.
1730 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1731 * cp-support.h (cp_remove_params): Now returns a
1732 gdb::unique_xmalloc_ptr.
1733 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1734 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1735 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1736 returning a gdb::unique_xmalloc_ptr.
1737 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1738 * stack.c (find_frame_funname): Adjust to cp_remove_params
1739 returning a gdb::unique_xmalloc_ptr.
1740
1741 2017-10-08 Tom Tromey <tom@tromey.com>
1742
1743 * dwarf2read.c (dwarf2_get_dwz_file): Use
1744 gdb::unique_xmalloc_ptr.
1745 (find_slot_in_mapped_hash): Likewise.
1746 (dwarf2_physname): Likewise.
1747 (create_dwo_unit_in_dwp_v1): Use std::string.
1748 (create_dwo_unit_in_dwp_v2): Likewise.
1749 (lookup_dwo_cutu): Likewise.
1750 (inherit_abstract_dies): Use std::vector.
1751 (read_array_type): Likewise.
1752 (dwarf_decode_macros): Remove unused declaration.
1753 (unsigned_int_compar): Remove.
1754 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1755 (psymtabs_addrmap_cleanup): Remove.
1756
1757 2017-10-08 Tom Tromey <tom@tromey.com>
1758
1759 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1760 * frame.h (frame_cleanup_after_sniffer): Declare.
1761 (frame_prepare_for_sniffer): Return void.
1762 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1763 type of argument.
1764 (frame_prepare_for_sniffer): Return void.
1765
1766 2017-10-08 Tom Tromey <tom@tromey.com>
1767
1768 * utils.h (make_cleanup_value_free): Remove.
1769 * utils.c (do_value_free, struct cleanup): Remove.
1770 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1771 Use gdb_value_up.
1772 * value.h (struct value_deleter): New.
1773 (gdb_value_up): New typedef.
1774
1775 2017-10-08 Tom Tromey <tom@tromey.com>
1776
1777 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1778 (make_cleanup_free_search_symbols): Remove.
1779 (search_symbols): Return std::vector.
1780 (symbol_search::compare_search_syms): Now member of
1781 symbol_search. Change arguments.
1782 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1783 (symtab_symbol_info, rbreak_command): Update.
1784 * symtab.h (struct symbol_search) <next>: Remove.
1785 Add constructors.
1786 (symbol_search::operator<): New function.
1787 (symbol_search::operator==): New function.
1788 (search_symbols): Remove std::vector.
1789 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1790 (symbol_search::compare_search_syms): Declare.
1791
1792 2017-10-06 Yao Qi <yao.qi@linaro.org>
1793
1794 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1795 arch/aarch64-insn.o.
1796 Remove one rule.
1797 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1798
1799 2017-10-06 Yao Qi <yao.qi@linaro.org>
1800
1801 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1802 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1803 arch/arm-linux.o respectively.
1804 * configure.tgt: Likewise.
1805
1806 2017-10-06 Yao Qi <yao.qi@linaro.org>
1807
1808 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
1809 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
1810
1811 2017-10-06 Pedro Alves <palves@redhat.com>
1812
1813 * windows-nat.c: Include <algorithm>.
1814
1815 2017-10-06 Yao Qi <yao.qi@linaro.org>
1816
1817 * configure.tgt (i386_tobjs): New variable.
1818 (amd64_tobjs): New variable.
1819 Set $cpu_obs and $os_obs.
1820
1821 2017-10-06 Yao Qi <yao.qi@linaro.org>
1822
1823 * Makefile.in (CONFIG_SRC_SUBDIR): New.
1824 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
1825 (clean): Remove object files and dependency files.
1826 (distclean): Remove the directory.
1827 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1828 * configure: Re-generated.
1829 * configure.tgt: Replace amd64.o with arch/amd64.o.
1830
1831 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
1832
1833 PR build/22188
1834 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
1835 and SETEND.
1836
1837 2017-10-05 Pedro Alves <palves@redhat.com>
1838
1839 * linux-nat.c (linux_child_follow_fork): When following the parent
1840 and detaching the child, consult the parent thread's architecture
1841 instead of the child's.
1842
1843 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1844
1845 * ax.h: Do not include "doublest.h".
1846 (union agent_val): Remove.
1847
1848 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1849
1850 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
1851 (decimal_to_string): Return std::string object.
1852 (decimal_from_string): Accept std::string object. Return bool.
1853 (decimal_from_integral, decimal_from_doublest): Remove.
1854 (decimal_from_longest): Add prototype.
1855 (decimal_from_ulongest): Likewise.
1856 (decimal_to_longest): Likewise.
1857 (decimal_from_doublest): Likewise.
1858 * dfp.c: Do not include "gdbtypes.h" or "value.h".
1859 (MAX_DECIMAL_STRING): Move here.
1860 (decimal_to_string): Return std::string object.
1861 (decimal_from_string): Accept std::string object. Return bool.
1862 (decimal_from_integral): Remove, replace by ...
1863 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
1864 (decimal_to_longest): New function.
1865 (decimal_from_floating): Remove, replace by ...
1866 (decimal_from_doublest): ... this new function.
1867 (decimal_to_doublest): Update to new decimal_to_string interface.
1868
1869 * value.c (unpack_long): Use decimal_to_longest.
1870 * valops.c (value_cast): Use decimal_from_doublest instead of
1871 decimal_from_floating. Use decimal_from_[u]longest isntead of
1872 decimal_from_integral.
1873 * valarith.c (value_args_as_decimal): Likewise.
1874 * valprint.c (print_decimal_floating): Update to new
1875 decimal_to_string interface.
1876 * printcmd.c (printf_decfloat): Likewise.
1877 * c-exp.y (parse_number): Update to new decimal_from_string interface.
1878
1879 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
1880
1881 * doublest.h: Do not include "floatformat.h". Remove stale comments.
1882 * gdbtypes.c: Include "floatformat.h".
1883 * value.c: Likewise.
1884 * m68k-tdep.c: Likewise.
1885
1886 * findvar.c: Do not include "floatformat.h".
1887 * amd64-darwin-tdep.c: Likewise.
1888 * arm-linux-tdep.c: Likewise.
1889 * i386-darwin-tdep.c: Likewise.
1890 * i387-tdep.c: Likewise.
1891 * m68k-linux-tdep.c: Likewise.
1892 * mep-tdep.c: Likewise.
1893 * mips-tdep.c: Likewise.
1894 * nios2-tdep.c: Likewise.
1895 * s390-linux-tdep.c: Likewise.
1896 * sparc-obsd-tdep.c: Likewise.
1897 * sparc-tdep.c: Likewise.
1898 * sparc64-tdep.c: Likewise.
1899 * spu-tdep.c: Likewise.
1900 * tic6x-tdep.c: Likewise.
1901 * tilegx-tdep.c: Likewise.
1902 * vax-tdep.c: Likewise.
1903 * xstormy16-tdep.c: Likewise.
1904 * xtensa-tdep.c: Likewise.
1905
1906 * top.c: Do not include "doublest.h".
1907 * aarch64-tdep.c: Likewise.
1908 * alpha-tdep.c: Likewise.
1909 * arm-linux-tdep.c: Likewise.
1910 * m68k-linux-tdep.c: Likewise.
1911 * tilegx-tdep.c: Likewise.
1912 * xstormy16-tdep.c: Likewise.
1913
1914 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1915
1916 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
1917 (mipsn32_fbsd_sigframe): Define.
1918 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
1919 for FreeBSD/mipsn32.
1920
1921 2017-10-05 John Baldwin <jhb@FreeBSD.org>
1922
1923 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
1924 AT_HWCAP.
1925
1926 2017-10-05 Tristan Gingold <tgingold@free.fr>
1927
1928 * MAINTAINERS (Misc): Update my email address.
1929
1930 2017-10-04 Pedro Alves <palves@redhat.com>
1931
1932 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
1933 it instead of target_gdbarch.
1934 (get_remote_state, get_remote_packet_size): Adjust
1935 get_remote_arch_state calls, passing down target_gdbarch
1936 explicitly.
1937 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
1938 'gdbarch' and use it instead of target_gdbarch.
1939 (get_memory_packet_size): Adjust get_remote_arch_state calls,
1940 passing down target_gdbarch explicitly.
1941 (struct stop_reply) <arch>: New field.
1942 (remote_parse_stop_reply): Use the stopped thread's architecture,
1943 not the current inferior's. Save the architecture in the
1944 stop_reply.
1945 (process_stop_reply): Use the stop reply's architecture.
1946 (process_g_packet, remote_fetch_registers)
1947 (remote_prepare_to_store, store_registers_using_G)
1948 (remote_store_registers): Adjust get_remote_arch_state calls,
1949 using the regcache's architecture.
1950 (remote_get_trace_status): Adjust get_remote_arch_state calls,
1951 passing down target_gdbarch explicitly.
1952 * spu-multiarch.c (spu_thread_architecture): Defer to the target
1953 beneath instead of calling target_gdbarch.
1954 * target.c (default_thread_architecture): Use the specified
1955 inferior's architecture, instead of the current inferior's
1956 architecture (via target_gdbarch).
1957
1958 2017-10-04 Pedro Alves <palves@redhat.com>
1959
1960 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
1961 case.
1962 (regcache_print): Handle !target_has_registers here instead.
1963
1964 2017-10-04 Pedro Alves <palves@redhat.com>
1965
1966 * frame.c (create_test_frame): Delete.
1967 * frame.h (create_test_frame): Delete.
1968 * gdbarch-selftests.c: Include gdbthread.h and target.h.
1969 (class regcache_test): Delete.
1970 (test_target_has_registers, test_target_has_stack)
1971 (test_target_has_memory, test_target_prepare_to_store)
1972 (test_target_store_registers): New functions.
1973 (test_target_ops): New class.
1974 (register_to_value_test): Error out if there's already a
1975 process_stratum (or higher) target pushed. Create a fuller mock
1976 environment, with mock target_ops, inferior, address space, thread
1977 and inferior_ptid.
1978 * progspace.c (struct address_space): Move to ...
1979 * progspace.h (struct address_space): ... here.
1980 * regcache.h (regcache::~regcache, regcache::raw_write)
1981 [GDB_SELF_TEST]: No longer virtual.
1982
1983 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
1984
1985 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
1986
1987 2017-10-04 Pedro Alves <palves@redhat.com>
1988
1989 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
1990 out of 'between TRY and CATCH'.
1991
1992 2017-10-04 Pedro Alves <palves@redhat.com>
1993
1994 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
1995 * common/common-exceptions.h (TRY): Open an outermost scope.
1996 Expand intro comment.
1997 (CATCH): Reindent.
1998 (END_CATCH): Close the outermost scope.
1999 * completer.c (complete_line_internal): Add missing END_CATCH.
2000
2001 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2002
2003 * NEWS (Changes since GDB 8.0): Add entry about new
2004 'set-cwd-on-gdbserver' feature.
2005 (New remote packets): Add entry for QSetWorkingDir.
2006 * common/common-inferior.h (set_inferior_cwd): New prototype.
2007 * infcmd.c (set_inferior_cwd): Remove "static".
2008 (show_cwd_command): Expand text to include remote debugging.
2009 * remote.c: Add PACKET_QSetWorkingDir.
2010 (remote_protocol_features) <QSetWorkingDir>: New entry for
2011 PACKET_QSetWorkingDir.
2012 (extended_remote_set_inferior_cwd): New function.
2013 (extended_remote_create_inferior): Call
2014 "extended_remote_set_inferior_cwd".
2015 (_initialize_remote): Call "add_packet_config_cmd" for
2016 QSetWorkingDir.
2017
2018 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2019
2020 * NEWS (New commands): Mention "set/show cwd".
2021 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2022 "cd" command's help text.
2023 * common/common-inferior.h (get_inferior_cwd): New prototype.
2024 * infcmd.c (inferior_cwd_scratch): New global variable.
2025 (set_inferior_cwd): New function.
2026 (get_inferior_cwd): Likewise.
2027 (set_cwd_command): Likewise.
2028 (show_cwd_command): Likewise.
2029 (_initialize_infcmd): Add "set/show cwd" commands.
2030 * inferior.h (class inferior) <cwd>: New field.
2031 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2032 (fork_inferior): Change inferior's cwd before its execution.
2033 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2034 to CreateProcess.
2035
2036 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2037
2038 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2039 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2040 (COMMON_OBS): Add gdb_tilde_expand.o.
2041 * common/gdb_tilde_expand.c: New file.
2042 * common/gdb_tilde_expand.h: Likewise.
2043
2044 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2045
2046 * gdbarch.sh (objfile): Remove duplicate declaration.
2047 * gdbarch.h: Regenerate.
2048
2049 2017-10-03 Tom Tromey <tom@tromey.com>
2050
2051 * utils.c (internal_vproblem): Use string_vprintf.
2052
2053 2017-10-03 Tom Tromey <tom@tromey.com>
2054
2055 * printcmd.c (info_symbol_command): Use std::string.
2056
2057 2017-10-03 Tom Tromey <tom@tromey.com>
2058
2059 * top.c (gdb_safe_append_history): Use std::string.
2060
2061 2017-10-03 Tom Tromey <tom@tromey.com>
2062
2063 * event-top.c (stdin_event_handler): Update.
2064 * main.c (captured_main_1): Update.
2065 * top.h (make_delete_ui_cleanup): Remove.
2066 (struct ui): Add constructor and destructor.
2067 (new_ui, delete_ui): Remove.
2068 * top.c (make_delete_ui_cleanup): Remove.
2069 (new_ui_command): Use std::unique_ptr.
2070 (delete_ui_cleanup): Remove.
2071 (ui::ui): Rename from new_ui. Update.
2072 (free_ui): Remove.
2073 (ui::~ui): Rename from delete_ui. Update.
2074
2075 2017-10-03 Tom Tromey <tom@tromey.com>
2076
2077 * symfile.c (load_progress): Use gdb::byte_vector.
2078
2079 2017-10-03 Tom Tromey <tom@tromey.com>
2080
2081 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2082 declaration.
2083 * printcmd.c (x_command): Remove unused declaration.
2084 * symfile.c (symbol_file_command): Remove unused declaration.
2085
2086 2017-10-03 Tom Tromey <tom@tromey.com>
2087
2088 * utils.c (internal_vproblem): Use std::string.
2089 (defaulted_query): Likewise.
2090
2091 2017-10-03 Tom Tromey <tom@tromey.com>
2092
2093 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2094 * top.c (execute_command_to_string): Update.
2095 * utils.c (make_cleanup_restore_page_info): Remove.
2096 (do_restore_page_info_cleanup): Remove.
2097 (set_batch_flag_and_restore_page_info):
2098 New.
2099 (make_cleanup_restore_page_info): Remove.
2100 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2101 (~set_batch_flag_and_restore_page_info): New
2102 (make_cleanup_restore_uinteger): Remove.
2103 (make_cleanup_restore_integer): Remove.
2104 (struct restore_integer_closure): Remove.
2105 (restore_integer): Remove.
2106 * utils.h (struct set_batch_flag_and_restore_page_info): New
2107 class.
2108 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2109 (make_cleanup_restore_page_info): Remove.
2110 (make_cleanup_restore_uinteger) Remove.
2111 (make_cleanup_restore_integer) Remove.
2112
2113 2017-10-03 Tom Tromey <tom@tromey.com>
2114
2115 * record-full.h (record_full_gdb_operation_disable_set): Return
2116 scoped_restore_tmpl<int>.
2117 * infrun.c (adjust_pc_after_break): Update.
2118 (handle_signal_stop): Update.
2119 * record-full.c (record_full_gdb_operation_disable_set): Return
2120 scoped_restore_tmpl<int>.
2121 (record_full_wait_1, record_full_insert_breakpoint)
2122 (record_full_remove_breakpoint, record_full_save)
2123 (record_full_goto_insn): Update.
2124
2125 2017-10-02 Tom Tromey <tom@tromey.com>
2126
2127 PR rust/22236:
2128 * rust-lang.c (rust_val_print_str): New function.
2129 (val_print_struct): Call it.
2130 (rust_subscript): Preserve name of slice type.
2131
2132 2017-10-02 Tom Tromey <tom@tromey.com>
2133
2134 * rust-lang.c (rust_subscript): Handle slices in
2135 EVAL_AVOID_SIDE_EFFECTS case.
2136
2137 2017-10-02 Tom Tromey <tom@tromey.com>
2138
2139 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2140
2141 2017-10-02 Tom Tromey <tom@tromey.com>
2142
2143 * rust-lang.h (rust_slice_type): Add "extern".
2144
2145 2017-10-02 Tom Tromey <tom@tromey.com>
2146 Pedro Alves <palves@redhat.com>
2147
2148 * ada-lang.h (ada_exc_info::operator<): Make const.
2149 (ada_exc_info::operator==): Make const.
2150 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2151 Make const.
2152
2153 2017-09-29 Tom Tromey <tom@tromey.com>
2154
2155 * target.c (read_whatever_is_readable): Change type of "result".
2156 Update.
2157 (free_memory_read_result_vector): Remove.
2158 (read_memory_robust): Change return type. Update.
2159 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2160 bin2hex, std::string.
2161 * target.h (memory_read_result_s): Remove typedef.
2162 (free_memory_read_result_vector): Remove.
2163 (read_memory_robust): Return std::vector.
2164
2165 2017-09-29 Tom Tromey <tom@tromey.com>
2166
2167 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2168
2169 2017-09-29 Tom Tromey <tom@tromey.com>
2170
2171 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2172 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2173 operator< and operator==.
2174 (ada_exceptions_list): Return a std::vector.
2175 * ada-lang.c (ada_exc_info::operator<): Rename from
2176 compare_ada_exception_info.
2177 (ada_exc_info::operator==): New.
2178 (sort_remove_dups_ada_exceptions_list): Change type of
2179 "exceptions".
2180 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2181 (ada_add_global_exceptions): Likewise.
2182 (ada_exceptions_list_1): Return a std::vector.
2183 (ada_exceptions_list): Likewise.
2184
2185 2017-09-29 Tom Tromey <tom@tromey.com>
2186
2187 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2188 'std::set *'.
2189 (print_one_inferior): Update.
2190 (free_vector_of_ints): Remove.
2191 (list_available_thread_groups): Change "ids" to std::set.
2192 (mi_cmd_list_thread_groups): Update.
2193 (struct collect_cores_data) <core>: Now a std::set.
2194 (collect_cores): Update.
2195 (unique): Remove.
2196 (print_one_inferior): Update.
2197
2198 2017-09-29 Tom Tromey <tom@tromey.com>
2199
2200 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2201 (mi_execute_async_cli_command): Likewise.
2202 (mi_cmd_trace_frame_collected): Use field_fmt.
2203
2204 2017-09-29 Tom Tromey <tom@tromey.com>
2205
2206 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2207 gdb::byte_vector.
2208
2209 2017-09-29 Tom Tromey <tom@tromey.com>
2210
2211 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2212
2213 2017-09-29 Tom Tromey <tom@tromey.com>
2214
2215 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2216
2217 2017-09-29 Tom Tromey <tom@tromey.com>
2218
2219 * varobj.h (varobj_gen_name): Return std::string.
2220 * varobj.c (varobj_gen_name): Return std::string.
2221 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2222 (mi_cmd_var_delete): Don't copy "name".
2223
2224 2017-09-29 Tom Tromey <tom@tromey.com>
2225
2226 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2227 (mi_cmd_break_insert_1): Update.
2228
2229 2017-09-29 Tom Tromey <tom@tromey.com>
2230
2231 * target.h (make_scoped_defer_target_commit_resume): Update.
2232 * target.c (make_scoped_defer_target_commit_resume): Rename from
2233 make_cleanup_defer_target_commit_resume. Return a
2234 scoped_restore.
2235 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2236
2237 2017-09-29 Tom Tromey <tom@tromey.com>
2238
2239 * main.c (captured_main_1): Remove unused declaration.
2240 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2241
2242 2017-09-29 Tom Tromey <tom@tromey.com>
2243
2244 * symtab.c (search_symbols): Remove unused outer cleanup.
2245 (make_source_files_completion_list): Remove unused declaration.
2246
2247 2017-09-29 Tom Tromey <tom@tromey.com>
2248
2249 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2250
2251 2017-09-29 Tom Tromey <tom@tromey.com>
2252
2253 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2254 gdb::byte_vector.
2255
2256 2017-09-29 Tom Tromey <tom@tromey.com>
2257
2258 * complaints.c (vcomplaint): Use std::string.
2259
2260 2017-09-29 Tom Tromey <tom@tromey.com>
2261
2262 * tracepoint.c (trace_variable_command): Use std::string.
2263 (encode_actions_1): Remove unused declarations.
2264 (create_tsv_from_upload): Use std::string.
2265
2266 2017-09-29 Tom Tromey <tom@tromey.com>
2267
2268 * cp-support.c (gdb_demangle): Use std::string.
2269
2270 2017-09-29 Tom Tromey <tom@tromey.com>
2271
2272 * stack.c (parse_frame_specification): Use std::string
2273 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2274
2275 2017-09-29 Tom Tromey <tom@tromey.com>
2276
2277 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2278
2279 2017-09-29 Tom Tromey <tom@tromey.com>
2280
2281 * utils.c (vfprintf_maybe_filtered): Use std::string.
2282 (vfprintf_unfiltered): Likewise.
2283
2284 2017-09-29 Tom Tromey <tom@tromey.com>
2285
2286 * event-top.c (top_level_prompt): Return std::string.
2287 (display_gdb_prompt): Update.
2288
2289 2017-09-29 Tom Tromey <tom@tromey.com>
2290
2291 * unittests/common-utils-selftests.c (format): New function.
2292 (string_vprintf_tests): New function.
2293 (_initialize_common_utils_selftests): Register new tests.
2294 * common/common-utils.c (string_vprintf): New function.
2295 * common/common-utils.h (string_vprintf): Declare.
2296
2297 2017-09-29 Pedro Alves <palves@redhat.com>
2298
2299 * common/rsp-low.c (unpack_varlen_hex): Constify.
2300 * common/rsp-low.h (unpack_varlen_hex): Constify.
2301 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2302 Constify.
2303 * remote.c (remote_set_permissions, read_ptid)
2304 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2305 (remote_static_tracepoint_marker_at)
2306 (remote_static_tracepoint_markers_by_strid)
2307 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2308 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2309 (parse_tracepoint_definition, parse_tsv_definition)
2310 (parse_static_tracepoint_marker_definition): Constify.
2311 * tracepoint.h (parse_static_tracepoint_marker_definition)
2312 (parse_trace_status, parse_tracepoint_status)
2313 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2314
2315 2017-09-29 Pedro Alves <palves@redhat.com>
2316
2317 * remote.c (target_buf, target_buf_size): Delete.
2318 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2319 Use the connection's packet buffer instead.
2320 All callers adjusted.
2321 (_initialize_remote): Remove references to target_buf and
2322 target_buf_size.
2323
2324 2017-09-28 Pedro Alves <palves@redhat.com>
2325
2326 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2327 unittests/common-utils-selftests.c.
2328 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2329 (COMMON_OBS): Remove utils-selftests.o.
2330 * utils-selftests.c: Move to ...
2331 * unittests/common-utils-selftests.c: ... here and rename self
2332 test to "string_printf".
2333
2334 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2335
2336 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2337 having NULL cus or tus.
2338
2339 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2340
2341 * arm-tdep.c: (convert_from_extended): Remove.
2342 (convert_to_extended): Likewise.
2343 (arm_extract_return_value): Use convert_typed_floating.
2344 (arm_store_return_value): Likewise.
2345
2346 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2347 * sh-tdep.c: Do not include "floatformat.h".
2348 (sh_littlebyte_bigword_type): New function.
2349 (sh_register_convert_to_virtual): Use convert_typed_floating.
2350 (sh_register_convert_to_raw): Likewise.
2351 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2352 (sh64_littlebyte_bigword_type): New function.
2353 (sh64_extract_return_value): Use convert_typed_floating.
2354 (sh64_register_convert_to_virtual): Likewise.
2355 (sh64_register_convert_to_raw): Likewise.
2356
2357 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2358
2359 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2360 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2361
2362 * gdbtypes.h (union type_specific): Make field floatformat hold
2363 just a single struct floatformat, not an array.
2364 (floatformat_from_type): Move here.
2365 * gdbtypes.c (floatformat_from_type): Move here. Update to
2366 changed TYPE_FLOATFORMAT definition.
2367 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2368 (recursive_dump_type): Likewise.
2369 (init_float_type): Install correct floatformat for byte order.
2370 (arch_float_type): Likewise.
2371
2372 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2373
2374 * gdbtypes.c (init_type): Change incoming argument from
2375 length-in-bytes to length-in-bits. Assert length is a
2376 multiple of TARGET_CHAR_BITS.
2377 (arch_type, arch_flags_type): Likewise.
2378 (init_integer_type): Update call to init_type.
2379 (init_character_type): Likewise.
2380 (init_boolean_type): Likewise.
2381 (init_float_type): Likewise.
2382 (init_decfloat_type): Likewise.
2383 (init_complex_type): Likewise.
2384 (init_pointer_type): Likewise.
2385 (objfile_type): Likewise.
2386 (arch_integer_type): Update call to arch_type.
2387 (arch_character_type): Likewise.
2388 (arch_boolean_type): Likewise.
2389 (arch_float_type): Likewise.
2390 (arch_decfloat_type): Likewise.
2391 (arch_complex_type): Likewise.
2392 (arch_pointer_type): Likewise.
2393 (gdbtypes_post_init): Likewise.
2394
2395 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2396 (read_base_type): Likewise.
2397 * mdebugread.c (basic_type): Likewise.
2398 * stabsread.c (dbx_init_float_type): Likewise.
2399 (rs6000_builtin_type): Likewise.
2400 (read_range_type): Likewise. Also, fix call to init_integer_type
2401 with erroneous length argument.
2402
2403 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2404 * d-lang.c (build_d_types): Likewise.
2405 * f-lang.c (build_fortran_types): Likewise.
2406 * go-lang.c (build_go_types): Likewise.
2407 * opencl-lang.c (build_opencl_types): Likewise.
2408 * jit.c (finalize_symtab): Likewise.
2409 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2410 (build_std_type_info_type): Likewise.
2411 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2412 update call to arch_flags_type.
2413
2414 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2415 arch_type.
2416 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2417 * windows-tdep.c (windows_get_tlb_type): Likewise.
2418
2419 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2420 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2421 * m32c-tdep.c (make_types): Likewise.
2422 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2423 (rl78_psw_type): Update call to arch_flags_type.
2424 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2425 * rx-tdep.c (rx_psw_type): Likewise.
2426 (rx_fpsw_type): Likewise.
2427 * sparc-tdep.c (sparc_psr_type): Likewise.
2428 (sparc_fsr_type): Likewise.
2429 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2430 (sparc64_ccr_type): Likewise.
2431 (sparc64_fsr_type): Likewise.
2432 (sparc64_fprs_type): Likewise.
2433
2434 2017-09-27 Tom Tromey <tom@tromey.com>
2435
2436 * findcmd.c (find_command): Constify.
2437
2438 2017-09-27 Tom Tromey <tom@tromey.com>
2439
2440 * ada-tasks.c (task_command_1, task_command): Constify.
2441
2442 2017-09-27 Tom Tromey <tom@tromey.com>
2443
2444 * symtab.c (maintenance_print_symbol_cache)
2445 (maintenance_flush_symbol_cache)
2446 (maintenance_print_symbol_cache_statistics): Constify.
2447
2448 2017-09-27 Tom Tromey <tom@tromey.com>
2449
2450 * inferior.c (detach_inferior_command, kill_inferior_command)
2451 (inferior_command): Constify.
2452
2453 2017-09-27 Tom Tromey <tom@tromey.com>
2454
2455 * regcache.c (regcache_print, maintenance_print_registers)
2456 (maintenance_print_raw_registers)
2457 (maintenance_print_cooked_registers)
2458 (maintenance_print_register_groups)
2459 (maintenance_print_remote_registers): Constify.
2460
2461 2017-09-27 Tom Tromey <tom@tromey.com>
2462
2463 * printcmd.c (map_display_numbers, undisplay_command)
2464 (enable_disable_display_command, enable_display_command)
2465 (disable_display_command): Constify.
2466
2467 2017-09-27 Tom Tromey <tom@tromey.com>
2468
2469 * breakpoint.h (delete_command): Don't declare.
2470 * breakpoint.c (delete_command, enable_once_command)
2471 (enable_count_command, enable_delete_command, breakpoint_1)
2472 (maintenance_info_breakpoints, stopin_command, stopat_command)
2473 (delete_command, delete_trace_command, save_breakpoints)
2474 (save_breakpoints_command, save_tracepoints_command): Constify.
2475
2476 2017-09-27 Tom Tromey <tom@tromey.com>
2477
2478 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2479 (skip_ws, extract_identifier, macro_define_command)
2480 (macro_undef_command, macro_list_command): Constify.
2481
2482 2017-09-27 Tom Tromey <tom@tromey.com>
2483
2484 * infcmd.c (environment_info, set_environment_command)
2485 (unset_environment_command, path_info, info_proc_cmd_1)
2486 (info_proc_cmd_mappings, info_proc_cmd_stat)
2487 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2488 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2489
2490 2017-09-27 Tom Tromey <tom@tromey.com>
2491
2492 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2493 Constify.
2494
2495 2017-09-27 Tom Tromey <tom@tromey.com>
2496
2497 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2498
2499 2017-09-27 Tom Tromey <tom@tromey.com>
2500
2501 * demangle.c (demangle_command): Constify.
2502
2503 2017-09-27 Tom Tromey <tom@tromey.com>
2504
2505 * progspace.c (maintenance_info_program_spaces_command):
2506 Constify.
2507
2508 2017-09-27 Tom Tromey <tom@tromey.com>
2509
2510 * compile/compile.c (check_raw_argument, compile_file_command)
2511 (compile_code_command, compile_print_command): Constify.
2512
2513 2017-09-27 Tom Tromey <tom@tromey.com>
2514
2515 * reggroups.c (maintenance_print_reggroups): Constify.
2516
2517 2017-09-27 Tom Tromey <tom@tromey.com>
2518
2519 * dwarf2read.c (save_gdb_index_command): Constify.
2520
2521 2017-09-27 Tom Tromey <tom@tromey.com>
2522
2523 * stap-probe.c (info_probes_stap_command): Constify.
2524
2525 2017-09-27 Tom Tromey <tom@tromey.com>
2526
2527 * fork-child.c (unset_exec_wrapper_command): Constify.
2528
2529 2017-09-27 Tom Tromey <tom@tromey.com>
2530
2531 * btrace.c (get_uint, get_context_size, no_chunk)
2532 (maint_btrace_packet_history_cmd)
2533 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2534 (maint_info_btrace_cmd): Constify.
2535
2536 2017-09-27 Tom Tromey <tom@tromey.com>
2537
2538 * reverse.c (delete_bookmark_command): Constify.
2539
2540 2017-09-27 Tom Tromey <tom@tromey.com>
2541
2542 * remote.c (set_memory_packet_size)
2543 (set_memory_write_packet_size, show_memory_write_packet_size)
2544 (set_memory_read_packet_size, show_memory_read_packet_size)
2545 (compare_sections_command, packet_command, remote_put_command)
2546 (remote_get_command, remote_delete_command): Constify.
2547
2548 2017-09-27 Tom Tromey <tom@tromey.com>
2549
2550 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2551 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2552 (set_mipsfpu_auto_command): Constify.
2553
2554 2017-09-27 Tom Tromey <tom@tromey.com>
2555
2556 * cli/cli-cmds.h (cd_command): Constify.
2557 * cli/cli-cmds.c (cd_command): Constify.
2558
2559 2017-09-27 Tom Tromey <tom@tromey.com>
2560
2561 * thread.c (thread_name_command, thread_find_command): Constify.
2562
2563 2017-09-27 Tom Tromey <tom@tromey.com>
2564
2565 * probe.c (enable_probes_command, disable_probes_command):
2566 Constify.
2567
2568 2017-09-27 Tom Tromey <tom@tromey.com>
2569
2570 * symfile.c (symbol_file_command): Constify.
2571 * gdbcore.h (deprecated_file_changed_hook): Constify.
2572 * exec.c (deprecated_file_changed_hook, exec_file_command)
2573 (file_command): Constify.
2574 * defs.h (symbol_file_command): Constify.
2575
2576 2017-09-27 Tom Tromey <tom@tromey.com>
2577
2578 * remote-fileio.c (set_system_call_allowed)
2579 (show_system_call_allowed): Constify.
2580
2581 2017-09-27 Tom Tromey <tom@tromey.com>
2582
2583 * tracepoint.c (delete_trace_variable_command)
2584 (tfind_end_command, tfind_start_command, tfind_pc_command)
2585 (tfind_tracepoint_command, tfind_line_command)
2586 (tfind_range_command, tfind_outside_command): Constify.
2587
2588 2017-09-27 Tom Tromey <tom@tromey.com>
2589
2590 * ax-gdb.c (maint_agent_printf_command, agent_command)
2591 (agent_eval_command): Constify.
2592
2593 2017-09-27 Tom Tromey <tom@tromey.com>
2594
2595 * tracepoint.c (info_scope_command): Constify.
2596 * python/python.c (gdbpy_decode_line): Constify.
2597 * python/py-breakpoint.c (bppy_init): Constify.
2598 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2599 * location.h: (new_linespec_location)
2600 (string_to_event_location_basic, string_to_event_location):
2601 Constify.
2602 * location.c (new_linespec_location)
2603 (string_to_event_location_basic, string_to_event_location):
2604 Constify.
2605 * linespec.h (decode_line_with_current_source)
2606 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2607 * linespec.c (linespec_lex_to_end)
2608 (decode_line_with_current_source)
2609 (decode_line_with_last_displayed): Constify.
2610 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2611 Constify.
2612 * cli/cli-cmds.c (edit_command, list_command): Constify.
2613 * breakpoint.h (until_break_command, watch_command_wrapper)
2614 (awatch_command_wrapper, rwatch_command_wrapper)
2615 (init_ada_exception_breakpoint): Constify.
2616 * breakpoint.c (break_command_1, dprintf_command)
2617 (break_range_command, watch_command_wrapper)
2618 (rwatch_command_wrapper, awatch_command_wrapper)
2619 (until_break_command, init_ada_exception_breakpoint)
2620 (strace_marker_create_sals_from_location, trace_command)
2621 (ftrace_command, strace_command, struct tracepoint): Constify.
2622 * ax-gdb.c (agent_command_1): Constify.
2623 * ada-lang.c (ada_exception_sal): Constify.
2624
2625 2017-09-27 Tom Tromey <tom@tromey.com>
2626
2627 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2628 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2629 (get_context_size, no_chunk, get_insn_history_modifiers)
2630 (cmd_record_insn_history, get_call_history_modifiers)
2631 (cmd_record_call_history): Constify.
2632
2633 2017-09-27 Tom Tromey <tom@tromey.com>
2634
2635 * source.c (show_substitute_path_command)
2636 (unset_substitute_path_command, set_substitute_path_command):
2637 Constify.
2638
2639 2017-09-27 Tom Tromey <tom@tromey.com>
2640
2641 * typeprint.c (maintenance_print_type): Constify.
2642 * maint.c (maintenance_dump_me, maintenance_demangle)
2643 (maintenance_time_display, maintenance_info_sections)
2644 (maintenance_print_statistics, maintenance_deprecate)
2645 (maintenance_undeprecate): Constify.
2646 (maintenance_do_deprecate): Constify. Use std::string.
2647 (maintenance_selftest): Constify.
2648 * gdbtypes.h (maintenance_print_type): Constify.
2649
2650 2017-09-27 Tom Tromey <tom@tromey.com>
2651
2652 * hppa-tdep.c (unwind_command): Constify.
2653
2654 2017-09-27 Tom Tromey <tom@tromey.com>
2655
2656 * target-descriptions.c (unset_tdesc_filename_cmd)
2657 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2658 Constify.
2659
2660 2017-09-27 Tom Tromey <tom@tromey.com>
2661
2662 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2663
2664 2017-09-27 Tom Tromey <tom@tromey.com>
2665
2666 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2667
2668 2017-09-27 Tom Tromey <tom@tromey.com>
2669
2670 * tui/tui-regs.c (tui_reg_command): Constify.
2671
2672 2017-09-27 Tom Tromey <tom@tromey.com>
2673
2674 * skip.c (skip_file_command, skip_function_command)
2675 (skip_enable_command, skip_disable_command, skip_delete_command):
2676 Constify.
2677
2678 2017-09-27 Tom Tromey <tom@tromey.com>
2679
2680 * record-btrace.c (cmd_record_btrace_bts_start)
2681 (cmd_record_btrace_pt_start): Constify.
2682
2683 2017-09-27 Tom Tromey <tom@tromey.com>
2684
2685 * symmisc.c (maintenance_print_symbols)
2686 (maintenance_print_msymbols, maintenance_print_objfiles)
2687 (maintenance_info_symtabs, maintenance_check_symtabs)
2688 (maintenance_expand_symtabs, maintenance_info_line_tables):
2689 Constify.
2690
2691 2017-09-27 Tom Tromey <tom@tromey.com>
2692
2693 * top.c (new_ui_command): Constify.
2694
2695 2017-09-27 Tom Tromey <tom@tromey.com>
2696
2697 * symfile.c (add_symbol_file_command)
2698 (remove_symbol_file_command, list_overlays_command)
2699 (map_overlay_command, unmap_overlay_command)
2700 (overlay_auto_command, overlay_manual_command)
2701 (overlay_off_command, overlay_load_command): Constify.
2702
2703 2017-09-27 Tom Tromey <tom@tromey.com>
2704
2705 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2706 (info_spu_mailbox_command, info_spu_dma_command)
2707 (info_spu_proxydma_command): Constify.
2708
2709 2017-09-27 Tom Tromey <tom@tromey.com>
2710
2711 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2712
2713 2017-09-27 Tom Tromey <tom@tromey.com>
2714
2715 * cli/cli-script.c (user_defined_command): Constify.
2716
2717 2017-09-27 Tom Tromey <tom@tromey.com>
2718
2719 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2720 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2721 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2722 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2723 (dump_binary_value, append_binary_memory, append_binary_value):
2724 Constify.
2725 (struct dump_context) <func>: Constify.
2726 (add_dump_command): Update.
2727
2728 2017-09-27 Tom Tromey <tom@tromey.com>
2729
2730 * cli/cli-cmds.c (show_version, show_configuration)
2731 (source_command, show_user): Constify.
2732
2733 2017-09-27 Tom Tromey <tom@tromey.com>
2734
2735 * target.c (maintenance_print_target_stack): Constify.
2736
2737 2017-09-27 Tom Tromey <tom@tromey.com>
2738
2739 * interps.c (interpreter_exec_cmd): Constify.
2740
2741 2017-09-27 Tom Tromey <tom@tromey.com>
2742
2743 * record-full.c (cmd_record_full_restore): Constify.
2744
2745 2017-09-27 Tom Tromey <tom@tromey.com>
2746
2747 * memattr.c (enable_mem_command, disable_mem_command)
2748 (delete_mem_command): Constify.
2749
2750 2017-09-27 Tom Tromey <tom@tromey.com>
2751
2752 * value.c (show_convenience): Constify.
2753
2754 2017-09-27 Tom Tromey <tom@tromey.com>
2755
2756 * gdbcore.h (core_file_command): Update.
2757 * corefile.c (core_file_command): Constify.
2758
2759 2017-09-27 Tom Tromey <tom@tromey.com>
2760
2761 * user-regs.c (maintenance_print_user_registers): Constify.
2762
2763 2017-09-27 Tom Tromey <tom@tromey.com>
2764
2765 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2766
2767 2017-09-27 Tom Tromey <tom@tromey.com>
2768
2769 * cp-support.c (first_component_command): Constify.
2770
2771 2017-09-27 Tom Tromey <tom@tromey.com>
2772
2773 * psymtab.c (maintenance_print_psymbols)
2774 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2775 Constify.
2776
2777 2017-09-27 Tom Tromey <tom@tromey.com>
2778
2779 * windows-tdep.c (display_tib): Constify.
2780
2781 2017-09-27 Tom Tromey <tom@tromey.com>
2782
2783 * linux-fork.c (delete_checkpoint_command)
2784 (detach_checkpoint_command): Constify.
2785
2786 2017-09-27 Tom Tromey <tom@tromey.com>
2787
2788 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2789
2790 2017-09-27 Tom Tromey <tom@tromey.com>
2791
2792 * arc-tdep.c (dump_arc_instruction_command): Constify.
2793
2794 2017-09-27 Tom Tromey <tom@tromey.com>
2795
2796 * valprint.c (set_radix, show_radix): Constify.
2797
2798 2017-09-27 Tom Tromey <tom@tromey.com>
2799
2800 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2801
2802 2017-09-27 Tom Tromey <tom@tromey.com>
2803
2804 * command.h (not_just_help_class_command): Update.
2805 * cli/cli-decode.h (not_just_help_class_command): Update.
2806 * cli/cli-decode.c (not_just_help_class_command): Constify.
2807
2808 2017-09-27 Tom Tromey <tom@tromey.com>
2809
2810 * gdb_bfd.c (maintenance_info_bfds): Constify.
2811
2812 2017-09-27 Tom Tromey <tom@tromey.com>
2813
2814 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
2815 overloads.
2816 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
2817 (do_const_cfunc): New function.
2818 (cmd_cfunc_eq): New overload.
2819 (cli_user_command_p): Check do_const_cfunc.
2820 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
2821 const_cfunc.
2822 * command.h (add_cmd): Add const overload and no-function
2823 overload.
2824 (set_cmd_cfunc): Add const overload.
2825 (cmd_const_cfunc_ftype): Declare.
2826 (cmd_cfunc_eq): Add const overload.
2827 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
2828 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
2829 overload.
2830
2831 2017-09-27 Tom Tromey <tom@tromey.com>
2832
2833 * macroexp.c (get_next_token_for_substitution): New function.
2834 (substitute_args): Call it. Check for __VA_OPT__.
2835
2836 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2837 Pedro Alves <palves@redhat.com>
2838
2839 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
2840 producer_is_icc_lt_14.
2841 (producer_is_icc_lt_14): New function.
2842 (check_producer): Add code for checking version of ICC.
2843 (producer_is_icc): Move to producer.c.
2844 (read_structure_type): Restrict ICC workaround to ICC<14.
2845 * producer.c: Include selftest.h.
2846 (producer_is_icc, producer_parsing_tests, _initialize_producer):
2847 New functions.
2848 * producer.h (producer_is_icc): New declaration.
2849
2850 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
2851
2852 * Makefile.in (SFILES): Add producer.c.
2853 (COMMON_OBS): Add producer.o
2854 * amd64-tdep.c (producer.h): Add new include.
2855 * dwarf2read.c (producer.h): Add new include.
2856 * producer.c: New file.
2857 * producer.h: New file.
2858 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
2859 producer.c.
2860 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
2861 producer.h.
2862
2863 2017-09-26 Matthias Klose <doko@ubuntu.com>
2864
2865 * configure.ac: Search ncursesw before ncurses.
2866 Check ncursesw/ncurses.h before ncurses/ncurses.h.
2867 * gdb_curses.h: Include <ncursesw/ncurses.h>
2868 * config.in, configure: Regenerate.
2869
2870 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2871
2872 PR gdb/22185
2873 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
2874 obsolete.
2875 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
2876 Remove i386sol2 support.
2877 * configure.nat <i386sol2>: Remove.
2878 <sol2-64>: Fold into ...
2879 <sol2>: ... this.
2880 Move common settings to default section.
2881 Add sol-thread.o.
2882 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
2883 x86_64-*-solaris2.1[0-9]*>: Rename to ...
2884 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
2885 <i[34567]86-*-solaris*>: Remove.
2886 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
2887
2888 * configure.ac: Remove wctype in libw check.
2889 (_MSE_INT_H): Don't define on Solaris 7-9.
2890 <solaris*>: Remove libthread_db.so.1 check.
2891 * configure: Regenerate.
2892 * config.in: Regenerate.
2893
2894 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
2895 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
2896 (gdb_ps_size_t): Remove.
2897 Use base types in users.
2898 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
2899
2900 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
2901
2902 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2903
2904 PR build/22206
2905 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
2906 (adi_is_addr_mapped): Likewise.
2907 (PSR_ICC): Don't redefine.
2908 (PSR_IMPL): Likewise.
2909
2910 2017-09-25 Tom Tromey <tom@tromey.com>
2911
2912 * regcache.c (regcache::dump): Use string_printf.
2913
2914 2017-09-25 Tom Tromey <tom@tromey.com>
2915
2916 * regcache.c (class regcache_invalidator): New.
2917 (struct register_to_invalidate): Remove.
2918 (make_cleanup_regcache_invalidate): Remove.
2919 (regcache::raw_write): Use regcache_invalidator.
2920
2921 2017-09-25 Tom Tromey <tom@tromey.com>
2922
2923 * spu-tdep.c (spu2ppu_sniffer): Update.
2924 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
2925 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
2926 Remove.
2927 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
2928 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
2929 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
2930 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
2931 (frame_pop): Update.
2932
2933 2017-09-25 Tom Tromey <tom@tromey.com>
2934
2935 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
2936 * regcache.h (regcache_xfree): Don't declare.
2937 * regcache.c (regcache_xfree): Remove.
2938 (do_regcache_xfree): Use delete.
2939 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
2940 * linux-fork.c (free_fork): Use delete.
2941 (fork_save_infrun_state): Likewise.
2942 * jit.c (jit_dealloc_cache): Use delete.
2943 * infrun.c (discard_infcall_suspend_state): Use delete.
2944
2945 2017-09-25 Tom Tromey <tom@tromey.com>
2946
2947 * regcache.h (regcache_xmalloc): Don't declare.
2948 (regcache_raw_set_cached_value): Update comment.
2949 * regcache.c (regcache_xmalloc): Remove.
2950 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
2951 * jit.c (jit_frame_sniffer): Use new.
2952 * frame.c (frame_save_as_regcache): Use new.
2953
2954 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2955
2956 * NEWS: Advertise support for guarded-storage registers on IBM z.
2957
2958 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2959
2960 * s390-linux-nat.c (have_regset_gs): New static variable.
2961 (s390_linux_fetch_inferior_registers): Handle guarded-storage
2962 control block and guarded-storage broadcast control regsets.
2963 (s390_read_description): Detect whether the target has
2964 guarded-storage support, return appropriate tdesc.
2965 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
2966 (features/s390x-gs-linux64.c): Likewise.
2967 (struct gdbarch_tdep) <have_gs>: New field.
2968 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
2969 (s390_gsbc_regset): New variables.
2970 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
2971 and s390_gsbc_regset, if applicable.
2972 (s390_core_read_description): Check whether core file was from a
2973 target with guarded-storage support; include appropriate regsets.
2974 (s390_gdbarch_init): Add registers for guarded-storage support.
2975 (_initialize_s390_tdep): Initialize new target descriptions that
2976 include registers for guarded-storage support.
2977 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
2978 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
2979 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
2980 (S390_NUM_REGS): Adjust macro definition.
2981 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
2982 (tdesc_s390x_gs_linux64): New declarations.
2983
2984 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
2985
2986 * features/s390-gs-linux64.xml: New file.
2987 * features/s390-gs.xml: New file.
2988 * features/s390-gsbc.xml: New file.
2989 * features/s390x-gs-linux64.xml: New file.
2990 * features/Makefile (WHICH): Add s390-gs-linux64 and
2991 s390x-gs-linux64.
2992 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
2993 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
2994 * features/s390-gs-linux64.c: New generated file.
2995 * features/s390x-gs-linux64.c: New file.
2996 * regformats/s390-gs-linux64.dat: New file.
2997 * regformats/s390x-gs-linux64.dat: New file.
2998
2999 2017-09-23 Tom Tromey <tom@tromey.com>
3000
3001 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3002
3003 2017-09-22 Tom Tromey <tom@tromey.com>
3004
3005 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3006 type to scoped_restore_tmpl.
3007 <scoped_input_handler>: Initialize m_quit_handler directly.
3008
3009 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3010
3011 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3012 (cd_command): Likewise. Free "current_directory" before
3013 assigning to it.
3014 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3015 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3016 * top.c (gdb_dirbuf): Remove global declaration.
3017 * top.h (gdb_dirbuf): Likewise.
3018
3019 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3020
3021 * gnulib/aclocal.m4: Regenerate.
3022 * gnulib/config.in: Regenerate.
3023 * gnulib/configure: Regenerate.
3024 * gnulib/import/Makefile.am: Regenerate.
3025 * gnulib/import/Makefile.in: Regenerate.
3026 * gnulib/import/assure.h: New file.
3027 * gnulib/import/at-func.c: Likewise
3028 * gnulib/import/chdir-long.c: New file.
3029 * gnulib/import/chdir-long.h: New file.
3030 * gnulib/import/cloexec.c: New file.
3031 * gnulib/import/cloexec.h: New file.
3032 * gnulib/import/close.c: New file.
3033 * gnulib/import/closedir.c: New file.
3034 * gnulib/import/dirent-private.h: New file.
3035 * gnulib/import/dup-safer.c: New file.
3036 * gnulib/import/dup.c: New file.
3037 * gnulib/import/dup2.c: New file.
3038 * gnulib/import/error.c: New file.
3039 * gnulib/import/error.h: New file.
3040 * gnulib/import/exitfail.c: New file.
3041 * gnulib/import/exitfail.h: New file.
3042 * gnulib/import/fchdir.c: New file.
3043 * gnulib/import/fcntl.c: New file.
3044 * gnulib/import/fcntl.in.h: New file.
3045 * gnulib/import/fd-hook.c: New file.
3046 * gnulib/import/fd-hook.h: New file.
3047 * gnulib/import/fd-safer.c: New file.
3048 * gnulib/import/fdopendir.c: New file.
3049 * gnulib/import/filename.h: New file.
3050 * gnulib/import/filenamecat-lgpl.c: New file.
3051 * gnulib/import/filenamecat.h: New file.
3052 * gnulib/import/fstat.c: New file.
3053 * gnulib/import/fstatat.c: New file.
3054 * gnulib/import/getcwd-lgpl.c: New file.
3055 * gnulib/import/getcwd.c: New file.
3056 * gnulib/import/getdtablesize.c: New file.
3057 * gnulib/import/getlogin_r.c: New file.
3058 * gnulib/import/getprogname.c: New file.
3059 * gnulib/import/getprogname.h: New file.
3060 * gnulib/import/gettext.h: New file.
3061 * gnulib/import/glob-libc.h: New file.
3062 * gnulib/import/glob.c: New file.
3063 * gnulib/import/glob.in.h: New file.
3064 * gnulib/import/intprops.h: New file.
3065 * gnulib/import/m4/chdir-long.m4: New file.
3066 * gnulib/import/m4/close.m4: New file.
3067 * gnulib/import/m4/closedir.m4: New file.
3068 * gnulib/import/m4/d-ino.m4: New file.
3069 * gnulib/import/m4/d-type.m4: New file.
3070 * gnulib/import/m4/dup.m4: New file.
3071 * gnulib/import/m4/dup2.m4: New file.
3072 * gnulib/import/m4/error.m4: New file.
3073 * gnulib/import/m4/fchdir.m4: New file.
3074 * gnulib/import/m4/fcntl.m4: New file.
3075 * gnulib/import/m4/fcntl_h.m4: New file.
3076 * gnulib/import/m4/fdopendir.m4: New file.
3077 * gnulib/import/m4/filenamecat.m4: New file.
3078 * gnulib/import/m4/fstat.m4: New file.
3079 * gnulib/import/m4/fstatat.m4: New file.
3080 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3081 * gnulib/import/m4/getcwd-path-max.m4: New file.
3082 * gnulib/import/m4/getcwd.m4: New file.
3083 * gnulib/import/m4/getdtablesize.m4: New file.
3084 * gnulib/import/m4/getlogin_r.m4: New file.
3085 * gnulib/import/m4/getprogname.m4: New file.
3086 * gnulib/import/m4/glob.m4: New file.
3087 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3088 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3089 * gnulib/import/m4/mempcpy.m4: New file.
3090 * gnulib/import/m4/memrchr.m4: New file.
3091 * gnulib/import/m4/mode_t.m4: New file.
3092 * gnulib/import/m4/msvc-inval.m4: New file.
3093 * gnulib/import/m4/msvc-nothrow.m4: New file.
3094 * gnulib/import/m4/open.m4: New file.
3095 * gnulib/import/m4/openat.m4: New file.
3096 * gnulib/import/m4/opendir.m4: New file.
3097 * gnulib/import/m4/readdir.m4: New file.
3098 * gnulib/import/m4/realloc.m4: New file.
3099 * gnulib/import/m4/rewinddir.m4: New file.
3100 * gnulib/import/m4/save-cwd.m4: New file.
3101 * gnulib/import/m4/strdup.m4: New file.
3102 * gnulib/import/m4/strerror.m4: New file.
3103 * gnulib/import/m4/unistd-safer.m4: New file.
3104 * gnulib/import/mempcpy.c: New file.
3105 * gnulib/import/memrchr.c: New file.
3106 * gnulib/import/msvc-inval.c: New file.
3107 * gnulib/import/msvc-inval.h: New file.
3108 * gnulib/import/msvc-nothrow.c: New file.
3109 * gnulib/import/msvc-nothrow.h: New file.
3110 * gnulib/import/open.c: New file.
3111 * gnulib/import/openat-die.c: New file.
3112 * gnulib/import/openat-priv.h: New file.
3113 * gnulib/import/openat-proc.c: New file.
3114 * gnulib/import/openat.c: New file.
3115 * gnulib/import/openat.h: New file.
3116 * gnulib/import/opendir.c: New file.
3117 * gnulib/import/pipe-safer.c: New file.
3118 * gnulib/import/readdir.c: New file.
3119 * gnulib/import/realloc.c: New file.
3120 * gnulib/import/rewinddir.c: New file.
3121 * gnulib/import/save-cwd.c: New file.
3122 * gnulib/import/save-cwd.h: New file.
3123 * gnulib/import/strdup.c: New file.
3124 * gnulib/import/strerror-override.c: New file.
3125 * gnulib/import/strerror-override.h: New file.
3126 * gnulib/import/strerror.c: New file.
3127 * gnulib/import/unistd--.h: New file.
3128 * gnulib/import/unistd-safer.h: New file.
3129 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3130 "getcwd" and "glob".
3131 * ser-tcp.c: Undefine "close" before redefining it.
3132
3133 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3134
3135 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3136 get rid of res_val.
3137
3138 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3139
3140 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3141 <sol2,sparc>: Likewise.
3142 <sol2-64,i386>: Likewise.
3143
3144 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3145 -Wdeprecated-declarations on *-*-solaris*.
3146 * configure: Regenerate.
3147
3148 * procfs.c: Include "nat/inferior.h".
3149 (procfs_info_proc): Fix typo.
3150
3151 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3152
3153 * remote.c (vector): Include.
3154 (struct private_thread_info): Add field, thread_handle.
3155 (free_private_thread_info): Deallocate storage associated with
3156 thread handle.
3157 (get_private_info_thread): Initialize `thread_handle' field.
3158 (struct thread_item): Add field, thread_handle.
3159 (clear_threads_listing_context): Deallocate storage associated
3160 with thread handle.
3161 (start_thread): Add support for "handle" attribute.
3162 (thread_attributes): Add "handle".
3163 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3164 field.
3165 (remote_update_thread_list): Update thread_handle.
3166 (remote_thread_handle_to_thread_info): New function.
3167 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3168
3169 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3170
3171 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3172 function.
3173 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3174 * python/python-internal.h (thread_object_type): Declare.
3175
3176 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3177
3178 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3179 (target_thread_handle_to_thread_info): Declare.
3180 * target.c (target_thread_handle_to_thread_info): New function.
3181 * target-delegates.c: Regenerate.
3182 * gdbthread.h (find_thread_by_handle): Declare.
3183 * thread.c (find_thread_by_handle): New function.
3184 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3185 function.
3186 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3187
3188 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3189
3190 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3191
3192 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3193
3194 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3195
3196 2017-09-21 Yao Qi <yao.qi@linaro.org>
3197
3198 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3199 to gdb_target_obs.
3200
3201 2017-09-20 Tom Tromey <tom@tromey.com>
3202
3203 * breakpoint.c (struct counted_command_line): Remove.
3204 (breakpoint_commands): Update.
3205 (alloc_counted_command_line, incref_counted_command_line)
3206 (decref_counted_command_line, do_cleanup_counted_command_line)
3207 (make_cleanup_decref_counted_command_line): Remove.
3208 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3209 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3210 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3211 (save_breakpoints): Update.
3212 * breakpoint.h (counted_command_line): Now a typedef to
3213 shared_ptr.
3214 (struct breakpoint) <commands>: Now a counted_command_line.
3215 (struct bpstats) <command>: Likewise.
3216
3217 2017-09-20 Tom Tromey <tom@tromey.com>
3218
3219 * breakpoint.c (struct commands_info, do_map_commands_command):
3220 Remove.
3221 (commands_command_1): Update.
3222 (iterate_over_related_breakpoints): Take a function_view.
3223 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3224 (delete_command): Update.
3225 (map_breakpoint_numbers): Take a function_view.
3226 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3227 (disable_command): Update.
3228 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3229 (enable_command): Update.
3230 (struct disp_data, do_enable_breakpoint_disp)
3231 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3232 (do_map_enable_delete_breakpoint): Remove.
3233 (enable_once_command, enable_count_command, enable_delete_command)
3234 (delete_trace_variable_command): Update.
3235
3236 2017-09-20 Tom Tromey <tom@tromey.com>
3237
3238 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3239 (bpstat_clear): Use delete.
3240 (bpstats): New constructors.
3241 (bpstat_copy, bpstat_stop_status): Use new.
3242 (dprintf_after_condition_true): Update.
3243 * breakpoint.h (bpstats::bpstats): Add constructors.
3244 (bpstats::~bpstats): Add destructor.
3245
3246 2017-09-20 Pedro Alves <palves@redhat.com>
3247
3248 * eval.c (make_params): Delete, refactored as ...
3249 (class fake_method): ... this new type's ctor.
3250 (fake_method::~fake_method): New.
3251 (evaluate_subexp_standard): Use 'fake_method'.
3252
3253 2017-09-20 Tom Tromey <tom@tromey.com>
3254
3255 * windows-nat.c (get_windows_debug_event, windows_wait)
3256 (do_initial_windows_stuff, windows_attach): Update.
3257 * utils.c (vwarning, internal_vproblem): Update.
3258 (ui_unregister_input_event_handler_cleanup)
3259 (prepare_to_handle_input): Remove.
3260 (class scoped_input_handler): New.
3261 (defaulted_query, prompt_for_continue): Update.
3262 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3263 Update.
3264 * top.c (undo_terminal_modifications_before_exit): Update.
3265 * target/target.h (target_terminal_init, target_terminal_inferior)
3266 (target_terminal_ours): Don't declare.
3267 (class target_terminal): New.
3268 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3269 (target_terminal_ours_for_output)
3270 (make_cleanup_restore_target_terminal): Don't declare.
3271 (target_terminal_info): Remove.
3272 * target.c (enum terminal_state, terminal_state): Remove.
3273 (target_terminal::terminal_state): Define.
3274 (target_terminal::init): Rename from target_terminal_init.
3275 (target_terminal::inferior): Rename from
3276 target_terminal_inferior.
3277 (target_terminal::ours): Rename from target_terminal_ours.
3278 (target_terminal::ours_for_output): Rename from
3279 target_terminal_ours_for_output.
3280 (target_terminal::info): New method.
3281 (cleanup_restore_target_terminal)
3282 (make_cleanup_restore_target_terminal): Remove.
3283 * solib.c (handle_solib_event): Update.
3284 * remote.c (remote_serial_quit_handler): Update.
3285 (remote_terminal_inferior, remote_wait_as): Update.
3286 * record-full.c (record_full_wait_1): Update.
3287 * nto-procfs.c (procfs_create_inferior): Update.
3288 * nat/fork-inferior.c (startup_inferior): Update.
3289 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3290 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3291 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3292 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3293 (mi_breakpoint_created, mi_breakpoint_deleted)
3294 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3295 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3296 (mi_user_selected_context_changed, report_initial_inferior):
3297 Update.
3298 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3299 (linux_nat_terminal_inferior): Update.
3300 * infrun.c (follow_fork_inferior)
3301 (handle_vfork_child_exec_or_exit, do_target_resume)
3302 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3303 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3304 Update.
3305 * inflow.c (child_terminal_init, info_terminal_command): Update.
3306 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3307 (attach_command): Update.
3308 * infcall.c (call_thread_fsm_should_stop): Update.
3309 * gnu-nat.c (gnu_attach): Update.
3310 * extension.c (struct active_ext_lang_state)
3311 (restore_active_ext_lang): Update.
3312 * exceptions.c (print_flush): Update.
3313 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3314 (struct quit_handler_cleanup_data, restore_quit_handler)
3315 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3316 Remove.
3317 * cp-support.c (gdb_demangle): Update.
3318 * breakpoint.c (update_inserted_breakpoint_locations)
3319 (insert_breakpoint_locations, handle_jit_event)
3320 (disable_breakpoints_in_unloaded_shlib): Update.
3321 * annotate.c (annotate_breakpoints_invalid)
3322 (annotate_frames_invalid): Update.
3323
3324 2017-09-20 Tom Tromey <tom@tromey.com>
3325
3326 * main.c (catch_command_errors): Rename from
3327 catch_command_errors_const.
3328 (captured_main_1): Update.
3329
3330 2017-09-20 Pedro Alves <palves@redhat.com>
3331
3332 * cli/cli-cmds.c (list_command): Use print_sal_location.
3333 (print_sal_location): New function.
3334 (ambiguous_line_spec): Use print_sal_location.
3335 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3336 * symtab.c (find_function_start_sal): Likewise.
3337 * symtab.h (symtab_and_line::symbol): New field.
3338
3339 2017-09-20 Pedro Alves <palves@redhat.com>
3340
3341 * linespec.c (minsym_found): Handle non-text minsyms.
3342 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3343
3344 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3345
3346 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3347 backslash.
3348
3349 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3350
3351 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3352 vmovups instead vmovaps.
3353 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3354
3355 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3356
3357 * NEWS (Changes since GDB 8.0): Add starti.
3358 * infcmd.c (enum run_break): New.
3359 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3360 case.
3361 (run_command): Use enum run_how.
3362 (start_command): Likewise.
3363 (starti_command): New function.
3364 (RUN_ARGS_HELP): New macro.
3365 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3366 commands. Add starti command.
3367
3368 2017-09-19 Yao Qi <yao.qi@linaro.org>
3369
3370 * Makefile.in (monitor.o): Remove the rule.
3371
3372 2017-09-19 Yao Qi <yao.qi@linaro.org>
3373
3374 * annotate.h (struct annotate_arg_emitter): Use
3375 DISABLE_COPY_AND_ASSIGN.
3376 * common/refcounted-object.h (refcounted_object): Likewise.
3377 * completer.h (struct completion_result): Likewise.
3378 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3379 * filename-seen-cache.h (filename_seen_cache): Likewise.
3380 * gdbcore.h (thread_section_name): Likewise.
3381 * gdb_regex.h (compiled_regex): Likewise.
3382 * gdbthread.h (scoped_restore_current_thread): Likewise.
3383 * inferior.h (scoped_restore_current_inferior): Likewise.
3384 * jit.c (jit_reader): Likewise.
3385 * linespec.h (struct linespec_result): Likewise.
3386 * mi/mi-parse.h (struct mi_parse): Likewise.
3387 * nat/fork-inferior.c (execv_argv): Likewise.
3388 * progspace.h (scoped_restore_current_program_space): Likewise.
3389 * python/python-internal.h (class gdbpy_enter): Likewise.
3390 * regcache.h (regcache): Likewise.
3391 * target-descriptions.c (struct tdesc_reg): Likewise.
3392 (struct tdesc_type): Likewise.
3393 (struct tdesc_feature): Likewise.
3394 * ui-out.h (ui_out_emit_type): Likewise.
3395
3396 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3397
3398 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3399 label abort_expression.
3400
3401 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3402
3403 * common/buffer.c (buffer_xml_printf): Adjust.
3404 * common/xml-utils.c (xml_escape_text): Change return type to
3405 std::string, update code accordingly.
3406 * common/xml-utils.h (xml_escape_text): Change return type to
3407 std::string.
3408 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3409 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3410 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3411 Adjust.
3412
3413 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3414
3415 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3416 (SUBDIR_UNITTESTS_OBS): Add new object file.
3417 * unittests/xml-utils-selftests.c: New file.
3418
3419 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3420
3421 * common/selftest.h (selftest): New struct/interface.
3422 (register_test): Add name parameter, add new overload.
3423 (run_tests): Add filter parameter.
3424 (for_each_selftest_ftype): New typedef.
3425 (for_each_selftest): New declaration.
3426 * common/selftest.c (tests): Change type to
3427 map<string, unique_ptr<selftest>>.
3428 (simple_selftest): New struct.
3429 (register_test): New function.
3430 (register_test): Add name parameter and use it.
3431 (run_tests): Add filter parameter and use it. Add prints.
3432 Adjust to vector -> map change.
3433 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3434 registering selftests.
3435 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3436 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3437 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3438 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3439 * findvar.c (_initialize_findvar): Likewise.
3440 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3441 * maint.c (maintenance_selftest): Update call to run_tests.
3442 (maintenance_info_selftests): New function.
3443 (_initialize_maint_cmds): Register "maintenance info selftests"
3444 command. Update "maintenance selftest" doc.
3445 * regcache.c (_initialize_regcache): Add names when registering
3446 selftests.
3447 * rust-exp.y (_initialize_rust_exp): Likewise.
3448 * selftest-arch.c (gdbarch_selftest): New struct.
3449 (gdbarch_tests): Remove.
3450 (register_test_foreach_arch): Add name parameter. Call
3451 register_test.
3452 (tests_with_arch): Remove, move most content to
3453 gdbarch_selftest::operator().
3454 (_initialize_selftests_foreach_arch): Remove.
3455 * selftest-arch.h (register_test_foreach_arch): Add name
3456 parameter.
3457 (run_tests_with_arch): New declaration.
3458 * utils-selftests.c (_initialize_utils_selftests): Add names
3459 when registering selftests.
3460 * utils.c (_initialize_utils): Likewise.
3461 * unittests/array-view-selftests.c
3462 (_initialize_array_view_selftests): Likewise.
3463 * unittests/environ-selftests.c (_initialize_environ_selftests):
3464 Likewise.
3465 * unittests/function-view-selftests.c
3466 (_initialize_function_view_selftests): Likewise.
3467 * unittests/offset-type-selftests.c
3468 (_initialize_offset_type_selftests): Likewise.
3469 * unittests/optional-selftests.c
3470 (_initialize_optional_selftests): Likewise.
3471 * unittests/scoped_restore-selftests.c
3472 (_initialize_scoped_restore_selftests): Likewise.
3473 * NEWS: Document "maintenance selftest" and "maint info
3474 selftests".
3475
3476 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3477
3478 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3479 scoped_restore.
3480
3481 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3482
3483 * mi/mi-main.c (mi_load_progress): Make uiout variable
3484 a unique_ptr.
3485
3486 2017-09-15 Pedro Alves <palves@redhat.com>
3487
3488 * compile/compile-c-types.c (convert_enum, convert_int)
3489 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3490
3491 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * dwarf2read.c (copy_string): Remove.
3494 (parse_macro_definition): Replace copy_string with savestring.
3495
3496 2017-09-15 Yao Qi <yao.qi@linaro.org>
3497
3498 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3499 gdb_target_obs.
3500 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3501 Likewise.
3502 (i[34567]86-*-linux*): Likewise.
3503
3504 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3505
3506 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3507 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3508 <stack>: Change type to std::vector.
3509 <stack_len, stack_allocated>: Remove.
3510 <grow_stack>: Remove.
3511 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3512 (dwarf_expr_context::~dwarf_expr_context): Remove.
3513 (dwarf_expr_context::grow_stack): Remove.
3514 (dwarf_expr_context::push): Adjust.
3515 (dwarf_expr_context::pop): Adjust.
3516 (dwarf_expr_context::fetch): Adjust.
3517 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3518 (dwarf_expr_context::stack_empty_p): Adjust.
3519 (dwarf_expr_context::execute_stack_op): Adjust.
3520
3521 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3522
3523 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3524 return type to bool.
3525 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3526
3527 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3528
3529 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3530 Change type to bool.
3531 (dwarf_stack_value) <in_stack_memory>: Likewise.
3532 (dwarf_expr_context) <push_address>: Change parameter type to
3533 bool.
3534 <fetch_in_stack_memory>: Change return type to bool.
3535 <push>: Change parameter type to bool.
3536 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3537 to bool.
3538 (dwarf_expr_context::push_address): Likewise.
3539 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3540 to bool.
3541 (dwarf_expr_context::execute_stack_op): Adjust.
3542 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3543
3544 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3545
3546 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3547 (struct dwarf_expr_context) <n_pieces>: Remove.
3548 <pieces>: Change type to std::vector.
3549 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3550 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3551 pieces.
3552 (dwarf_expr_context::add_piece): Adjust.
3553 * dwarf2loc.c (struct piece_closure): Initialize fields.
3554 <n_pieces>: Remove.
3555 <pieces>: Change type to std::vector.
3556 (allocate_piece_closure): Adjust, change parameter to
3557 std::vector rvalue and std::move it to piece_closure.
3558 (rw_pieced_value): Adjust.
3559 (check_pieced_synthetic_pointer): Adjust.
3560 (indirect_synthetic_pointer): Adjust.
3561 (coerce_pieced_ref): Adjust.
3562 (free_pieced_value_closure): Adjust. Use delete to free
3563 piece_closure.
3564 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3565 to allocate_piece_closure.
3566 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3567
3568 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3569
3570 * probe.h (probe_ops_cp): Remove typedef.
3571 (DEF_VEC_P (probe_ops_cp)): Remove.
3572 (all_probe_ops): Change type to std::vector.
3573 * probe.c (info_probes_for_ops): Adjust to vector change.
3574 (probe_linespec_to_ops): Likewise.
3575 (all_probe_ops): Change type to std::vector.
3576 (_initialize_probe): Adjust to vector change.
3577 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3578 * elfread.c (elf_get_probes): Likewise.
3579 * stap-probe.c (_initialize_stap_probe): Likewise.
3580
3581 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3582
3583 * probe.h (struct bound_probe): Define constructors.
3584 * probe.c (bound_probe_s): Remove typedef.
3585 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3586 (collect_probes): Change return type to std::vector, remove
3587 cleanup.
3588 (compare_probes): Return bool, change parameter type. Change
3589 semantic to "less than".
3590 (gen_ui_out_table_header_info): Change parameter to std::vector
3591 and update.
3592 (exists_probe_with_pops): Likewise.
3593 (info_probes_for_ops): Update to std::vector change.
3594 (enable_probes_command): Likewise.
3595 (disable_probes_command): Likewise.
3596
3597 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3598
3599 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3600 vec to std::vector.
3601 * probe.c (parse_probes_in_pspace): Update.
3602 (find_probes_in_objfile): Update.
3603 (find_probe_by_pc): Update.
3604 (collect_probes): Update.
3605 (probe_any_get_probes): Update.
3606 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3607 return type to reference to std::vector.
3608 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3609 std::vector and update.
3610 (dtrace_process_dof): Likewise.
3611 (dtrace_get_probes): Likewise.
3612 * elfread.c (elf_get_probes): Change return type to std::vector,
3613 store an std::vector in bfd_data.
3614 (probe_key_free): Update to std::vector.
3615 * stap-probe.c (handle_stap_probe): Change parameter to
3616 std::vector and update.
3617 (stap_get_probes): Likewise.
3618 * symfile-debug.c (debug_sym_get_probes): Change return type to
3619 std::vector and update.
3620
3621 2017-09-11 Tom Tromey <tom@tromey.com>
3622
3623 * breakpoint.c (program_breakpoint_here_p): Update.
3624 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3625 from make_show_memory_breakpoints_cleanup. Return a
3626 scoped_restore_tmpl<int>.
3627 (restore_show_memory_breakpoints): Remove.
3628 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3629 * mem-break.c (memory_validate_breakpoint): Update.
3630 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3631 (ia64_memory_remove_breakpoint): Update.
3632 (ia64_breakpoint_from_pc): Update.
3633 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3634 from make_show_memory_breakpoints_cleanup.
3635
3636 2017-09-11 Tom Tromey <tom@tromey.com>
3637
3638 * d-namespace.c (d_lookup_symbol): Use std::string.
3639 (find_symbol_in_baseclass): Likewise.
3640
3641 2017-09-11 Tom Tromey <tom@tromey.com>
3642
3643 * ctf.c (ctf_start): Use std::string.
3644
3645 2017-09-11 Tom Tromey <tom@tromey.com>
3646
3647 * ada-lang.c (is_known_support_routine): Update.
3648 (ada_unhandled_exception_name_addr_from_raise): Update.
3649 * guile/scm-frame.c (gdbscm_frame_name): Update.
3650 * python/py-frame.c (frapy_name): Update.
3651 (frapy_function): Update.
3652 * stack.h (find_frame_funname): Update.
3653 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3654 (print_frame): Update.
3655
3656 2017-09-11 Tom Tromey <tom@tromey.com>
3657
3658 * findcmd.c (put_bits): Take a gdb::byte_vector.
3659 (parse_find_args): Return gdb::byte_vector. "args" now const.
3660 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3661 cleanups.
3662 (find_command): Update.
3663
3664 2017-09-11 Tom Tromey <tom@tromey.com>
3665
3666 * cli/cli-script.c (class scoped_restore_hook_in): New.
3667 (clear_hook_in_cleanup): Remove.
3668 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3669 scoped_restore_hook_in.
3670
3671 2017-09-11 Tom Tromey <tom@tromey.com>
3672
3673 * cli/cli-script.c (restore_interp): Remove.
3674 (read_command_lines): Use scoped_restore_interp.
3675 * interps.c (scoped_restore_interp::set_temp): Rename from
3676 interp_set_temp.
3677 * interps.h (class scoped_restore_interp): New.
3678 (interp_set_temp): Remove.
3679
3680 2017-09-11 Tom Tromey <tom@tromey.com>
3681
3682 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3683 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3684 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3685 scoped_restore.
3686 (mi_cmd_break_insert_1): Update.
3687 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3688 scoped_restore.
3689
3690 2017-09-11 Tom Tromey <tom@tromey.com>
3691
3692 * demangle.c (demangle_command): Update.
3693 * breakpoint.c (disable_command): Update.
3694 (enable_command): Update.
3695 (find_location_by_number): Make "number" const. Use
3696 get_number_trailer.
3697 * cli/cli-utils.c (extract_arg): Return std::string.
3698 * probe.c (parse_probe_linespec): Update. Change types.
3699 (collect_probes): Take string arguments.
3700 (parse_probe_linespec): Likewise.
3701 (info_probes_for_ops): Update.
3702 (enable_probes_command): Update.
3703 (disable_probes_command): Update.
3704 * break-catch-sig.c (catch_signal_split_args): Update.
3705 * mi/mi-parse.c (mi_parse): Update.
3706
3707 2017-09-11 Tom Tromey <tom@tromey.com>
3708
3709 * language.h (language_enum): Make argument const.
3710 * language.c (language_enum): Make argument const.
3711
3712 2017-09-11 Tom Tromey <tom@tromey.com>
3713
3714 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3715 as function.
3716 (skip_to_space): Rename from skip_to_space_const.
3717 * common/common-utils.c (skip_to_space): New function.
3718 (skip_to_space): Rename from skip_to_space_const.
3719 * cli/cli-utils.h (get_number): Rename from get_number_const.
3720 (extract_arg): Rename from extract_arg_const.
3721 * cli/cli-utils.c (get_number): Rename from get_number_const.
3722 (extract_arg): Rename from extract_arg_const.
3723 (number_or_range_parser::get_number): Use ::get_number.
3724 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3725 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3726 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3727 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3728 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3729 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3730 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3731 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3732
3733 2017-09-11 Tom Tromey <tom@tromey.com>
3734
3735 * python/python.c (do_start_initialization): Use
3736 py-event-types.def to initialize types.
3737 Define all object type structures.
3738 * python/python-internal.h: Don't declare event initialization
3739 functions.
3740 * python/py-threadevent.c (thread_event_object_type): Don't
3741 define.
3742 * python/py-stopevent.c (stop_event_object_type): Don't define.
3743 * python/py-signalevent.c (signal_event_object_type): Don't
3744 declare or define.
3745 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3746 (clear_objfiles_event_object_type): Don't declare or define.
3747 * python/py-infevents.c (inferior_call_pre_event_object_type)
3748 (inferior_call_post_event_object_type)
3749 (register_changed_event_object_type)
3750 (memory_changed_event_object_type): Don't declare or define.
3751 * python/py-inferior.c (new_thread_event_object_type)
3752 (new_inferior_event_object_type)
3753 (inferior_deleted_event_object_type): Don't declare or define.
3754 * python/py-exitedevent.c (exited_event_object_type): Don't
3755 declare or define.
3756 * python/py-evts.c (gdbpy_initialize_py_events): Use
3757 py-all-events.def.
3758 * python/py-events.h (thread_event_object_type): Don't declare.
3759 (events_object): Use py-all-events.def.
3760 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3761 py-event-types.def.
3762 * python/py-event-types.def: New file.
3763 * python/py-continueevent.c (create_continue_event_object): Don't
3764 declare or define.
3765 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3766 declare or define.
3767 * python/py-all-events.def: New file.
3768
3769 2017-09-11 Tom Tromey <tom@tromey.com>
3770
3771 * python/py-threadevent.c (create_thread_event_object): Return
3772 gdbpy_ref.
3773 * python/py-stopevent.h (create_stop_event_object)
3774 (create_breakpoint_event_object, create_signal_event_object):
3775 Update.
3776 * python/py-stopevent.c (create_stop_event_object): Return
3777 gdbpy_ref.
3778 (emit_stop_event): Update.
3779 * python/py-signalevent.c (create_signal_event_object): Return
3780 gdbpy_ref.
3781 * python/py-infevents.c (create_inferior_call_event_object):
3782 Update.
3783 * python/py-event.h (create_event_object)
3784 (create_thread_event_object): Update.
3785 * python/py-event.c (create_event_object): Return gdbpy_ref.
3786 * python/py-continueevent.c: Return gdbpy_ref.
3787 * python/py-bpevent.c (create_breakpoint_event_object): Return
3788 gdbpy_ref.
3789
3790 2017-09-11 Tom Tromey <tom@tromey.com>
3791
3792 PR python/15622:
3793 * NEWS: Add entry.
3794 * python/python.c (do_start_initialization): Initialize new event
3795 types.
3796 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3797 (gdbpy_initialize_inferior_deleted_event)
3798 (gdbpy_initialize_new_thread_event): Declare.
3799 * python/py-threadevent.c (create_thread_event_object): Add option
3800 "thread" parameter.
3801 * python/py-inferior.c (new_thread_event_object_type)
3802 (new_inferior_event_object_type)
3803 (inferior_deleted_event_object_type): Declare.
3804 (python_new_inferior, python_inferior_deleted): New functions.
3805 (add_thread_object): Emit new_thread event.
3806 (gdbpy_initialize_inferior): Attach new functions to corresponding
3807 observers.
3808 (new_thread, new_inferior, inferior_deleted): Define new event
3809 types.
3810 * python/py-evts.c (gdbpy_initialize_py_events): Add new
3811 registries.
3812 * python/py-events.h (events_object) <new_inferior,
3813 inferior_deleted, new_thread>: New fields.
3814 * python/py-event.h (create_thread_event_breakpoint): Add optional
3815 "thread" parameter.
3816
3817 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
3818
3819 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
3820 check current_ui instead.
3821 (internal_vproblem): Likewise.
3822
3823 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
3824
3825 * thread.c (print_thread_info_1): Remove unnecessary calls to
3826 uiout->is_mi_like_p.
3827
3828 2017-09-09 Tom Tromey <tom@tromey.com>
3829
3830 * namespace.h (add_using_directive): Update.
3831 * namespace.c (add_using_directive): Change type of excludes to
3832 std::vector.
3833 * dwarf2read.c (read_import_statement): Use std::vector.
3834 (read_namespace): Update.
3835 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3836
3837 2017-09-09 Tom Tromey <tom@tromey.com>
3838
3839 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
3840
3841 2017-09-09 Tom Tromey <tom@tromey.com>
3842
3843 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
3844
3845 2017-09-09 Tom Tromey <tom@tromey.com>
3846
3847 * stack.c (func_command): Use gdb::def_vector.
3848
3849 2017-09-09 Tom Tromey <tom@tromey.com>
3850
3851 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
3852 ui_out_emit_list, ui_out_emit_tuple.
3853 (mi_cmd_var_update): Likewise.
3854
3855 2017-09-09 Tom Tromey <tom@tromey.com>
3856
3857 * mi/mi-interp.c (mi_user_selected_context_changed): Use
3858 ui_out_redirect_pop.
3859 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
3860 ui_out_redirect_pop.
3861 * utils.c (do_ui_out_redirect_pop)
3862 (make_cleanup_ui_out_redirect_pop): Remove.
3863 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
3864 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
3865 * ui-out.h (ui_out_redirect_pop): New class.
3866
3867 2017-09-09 Tom Tromey <tom@tromey.com>
3868
3869 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
3870 (list_available_thread_groups, mi_cmd_list_thread_groups)
3871 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
3872 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
3873 Likewise.
3874
3875 2017-09-09 Tom Tromey <tom@tromey.com>
3876
3877 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
3878 ui_out_emit_tuple.
3879
3880 2017-09-09 Tom Tromey <tom@tromey.com>
3881
3882 * target.c (flash_erase_command): Use ui_out_emit_tuple.
3883 * stack.c (print_frame): Use ui_out_emit_tuple.
3884 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
3885 (info_spu_mailbox_command, info_spu_dma_command)
3886 (info_spu_proxydma_command): Likewise.
3887 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
3888 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
3889 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3890 ui_out_emit_tuple.
3891 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
3892
3893 2017-09-09 Tom Tromey <tom@tromey.com>
3894
3895 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
3896 (class ui_out_emit_table): Update comment.
3897 * ui-out.c (do_cleanup_table_end)
3898 (make_cleanup_ui_out_table_begin_end): Remove.
3899 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
3900 (info_spu_dma_cmdlist): Likewise.
3901 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
3902 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
3903 ui_out_emit_table.
3904
3905 2017-09-09 Tom Tromey <tom@tromey.com>
3906
3907 * thread.c (print_thread_info_1): Use ui_out_emit_table,
3908 ui_out_emit_list, gdb::optional.
3909
3910 2017-09-09 John Baldwin <jhb@FreeBSD.org>
3911
3912 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
3913 prototype.
3914 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
3915 prototype.
3916 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
3917 prototype.
3918 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
3919 * ada-exp.y: Remove _initialize_ada_exp prototype.
3920 * ada-lang.c: Remove _initialize_ada_language prototype.
3921 * ada-tasks.c: Remove _initialize_tasks prototype.
3922 * addrmap.c: Remove _initialize_addrmap prototype.
3923 * agent.c: Remove _initialize_agent prototype.
3924 * aix-thread.c: Remove _initialize_aix_thread prototype.
3925 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
3926 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
3927 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
3928 prototype.
3929 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
3930 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
3931 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
3932 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
3933 prototype.
3934 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
3935 prototype.
3936 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
3937 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
3938 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
3939 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
3940 prototype.
3941 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
3942 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
3943 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
3944 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
3945 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
3946 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
3947 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
3948 prototype.
3949 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
3950 prototype.
3951 * annotate.c: Remove _initialize_annotate prototype.
3952 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
3953 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
3954 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
3955 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
3956 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
3957 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
3958 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
3959 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
3960 prototype.
3961 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
3962 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
3963 * auto-load.c: Remove _initialize_auto_load prototype.
3964 * auxv.c: Remove _initialize_auxv prototype.
3965 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
3966 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
3967 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
3968 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
3969 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
3970 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
3971 prototype.
3972 * break-catch-throw.c: Remove _initialize_break_catch_throw
3973 prototype.
3974 * breakpoint.c: Remove _initialize_breakpoint prototype.
3975 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
3976 * btrace.c: Remove _initialize_btrace prototype.
3977 * charset.c: Remove _initialize_charset prototype.
3978 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
3979 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
3980 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
3981 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
3982 * cli/cli-script.c: Remove _initialize_cli_script prototype.
3983 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
3984 * coffread.c: Remove _initialize_coffread prototype.
3985 * compile/compile.c: Remove _initialize_compile prototype.
3986 * complaints.c: Remove _initialize_complaints prototype.
3987 * completer.c: Remove _initialize_completer prototype.
3988 * copying.awk: Remove _initialize_copying prototype.
3989 * copying.c: Regenerate.
3990 * core-regset.c: Remove _initialize_core_regset prototype.
3991 * corefile.c: Remove _initialize_core prototype.
3992 * corelow.c: Remove _initialize_corelow prototype.
3993 * cp-abi.c: Remove _initialize_cp_abi prototype.
3994 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
3995 * cp-support.c: Remove _initialize_cp_support prototype.
3996 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
3997 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
3998 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
3999 * ctf.c: Remove _initialize_ctf prototype.
4000 * d-lang.c: Remove _initialize_d_language prototype.
4001 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4002 prototype.
4003 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4004 * dbxread.c: Remove _initialize_dbxread prototype.
4005 * dcache.c: Remove _initialize_dcache prototype.
4006 * demangle.c: Remove _initialize_demangler prototype.
4007 * disasm-selftests.c: Remove _initialize_disasm_selftests
4008 prototype.
4009 * disasm.c: Remove _initialize_disasm prototype.
4010 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4011 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4012 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4013 prototype.
4014 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4015 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4016 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4017 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4018 * elfread.c: Remove _initialize_elfread prototype.
4019 * exec.c: Remove _initialize_exec prototype.
4020 * extension.c: Remove _initialize_extension prototype.
4021 * f-lang.c: Remove _initialize_f_language prototype.
4022 * f-valprint.c: Remove _initialize_f_valprint prototype.
4023 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4024 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4025 * filesystem.c: Remove _initialize_filesystem prototype.
4026 * findcmd.c: Remove _initialize_mem_search prototype.
4027 * fork-child.c: Remove _initialize_fork_child prototype.
4028 * frame-base.c: Remove _initialize_frame_base prototype.
4029 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4030 * frame.c: Remove _initialize_frame prototype.
4031 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4032 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4033 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4034 * gcore.c: Remove _initialize_gcore prototype.
4035 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4036 * gdbarch.c: Regenerate.
4037 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4038 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4039 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4040 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4041 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4042 * go-lang.c: Remove _initialize_go_language prototype.
4043 * go32-nat.c: Remove _initialize_go32_nat prototype.
4044 * guile/guile.c: Remove _initialize_guile prototype.
4045 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4046 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4047 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4048 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4049 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4050 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4051 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4052 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4053 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4054 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4055 prototype.
4056 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4057 prototype.
4058 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4059 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4060 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4061 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4062 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4063 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4064 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4065 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4066 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4067 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4068 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4069 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4070 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4071 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4072 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4073 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4074 prototype.
4075 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4076 prototype.
4077 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4078 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4079 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4080 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4081 * infcall.c: Remove _initialize_infcall prototype.
4082 * infcmd.c: Remove _initialize_infcmd prototype.
4083 * inferior.c: Remove _initialize_inferiors prototype.
4084 * inflow.c: Remove _initialize_inflow prototype.
4085 * infrun.c: Remove _initialize_infrun prototype.
4086 * interps.c: Remove _initialize_interpreter prototype.
4087 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4088 * jit.c: Remove _initialize_jit prototype.
4089 * language.c: Remove _initialize_language prototype.
4090 * linux-fork.c: Remove _initialize_linux_fork prototype.
4091 * linux-nat.c: Remove _initialize_linux_nat prototype.
4092 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4093 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4094 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4095 * m2-lang.c: Remove _initialize_m2_language prototype.
4096 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4097 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4098 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4099 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4100 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4101 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4102 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4103 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4104 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4105 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4106 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4107 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4108 * machoread.c: Remove _initialize_machoread prototype.
4109 * macrocmd.c: Remove _initialize_macrocmd prototype.
4110 * macroscope.c: Remove _initialize_macroscope prototype.
4111 * maint.c: Remove _initialize_maint_cmds prototype.
4112 * mdebugread.c: Remove _initialize_mdebugread prototype.
4113 * memattr.c: Remove _initialize_mem prototype.
4114 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4115 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4116 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4117 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4118 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4119 * microblaze-linux-tdep.c: Remove
4120 _initialize_microblaze_linux_tdep prototype.
4121 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4122 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4123 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4124 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4125 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4126 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4127 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4128 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4129 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4130 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4131 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4132 prototype.
4133 * mipsread.c: Remove _initialize_mipsread prototype.
4134 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4135 prototype.
4136 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4137 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4138 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4139 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4140 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4141 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4142 prototype.
4143 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4144 * nto-procfs.c: Remove _initialize_procfs prototype.
4145 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4146 * objc-lang.c: Remove _initialize_objc_language prototype.
4147 * objfiles.c: Remove _initialize_objfiles prototype.
4148 * observer.c: Remove observer_test_first_notification_function,
4149 observer_test_second_notification_function,
4150 observer_test_third_notification_function, and
4151 _initialize_observer prototypes.
4152 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4153 * osabi.c: Remove _initialize_gdb_osabi prototype.
4154 * osdata.c: Remove _initialize_osdata prototype.
4155 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4156 * parse.c: Remove _initialize_parse prototype.
4157 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4158 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4159 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4160 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4161 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4162 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4163 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4164 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4165 * printcmd.c: Remove _initialize_printcmd prototype.
4166 * probe.c: Remove _initialize_probe prototype.
4167 * proc-api.c: Remove _initialize_proc_api prototype.
4168 * proc-events.c: Remove _initialize_proc_events prototype.
4169 * proc-service.c: Remove _initialize_proc_service prototype.
4170 * procfs.c: Remove _initialize_procfs prototype.
4171 * psymtab.c: Remove _initialize_psymtab prototype.
4172 * python/python.c: Remove _initialize_python prototype.
4173 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4174 * record-btrace.c: Remove _initialize_record_btrace prototype.
4175 * record-full.c: Remove _initialize_record_full prototype.
4176 * record.c: Remove _initialize_record prototype.
4177 * regcache.c: Remove _initialize_regcache prototype.
4178 * reggroups.c: Remove _initialize_reggroup prototype.
4179 * remote-notif.c: Remove _initialize_notif prototype.
4180 * remote-sim.c: Remove _initialize_remote_sim prototype.
4181 * remote.c: Remove _initialize_remote prototype.
4182 * reverse.c: Remove _initialize_reverse prototype.
4183 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4184 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4185 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4186 prototype.
4187 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4188 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4189 * rust-exp.y: Remove _initialize_rust_exp prototype.
4190 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4191 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4192 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4193 * score-tdep.c: Remove _initialize_score_tdep prototype.
4194 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4195 prototype.
4196 * ser-go32.c: Remove _initialize_ser_dos prototype.
4197 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4198 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4199 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4200 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4201 * serial.c: Remove _initialize_serial prototype.
4202 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4203 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4204 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4205 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4206 * skip.c: Remove _initialize_step_skip prototype.
4207 * sol-thread.c: Remove _initialize_sol_thread prototype.
4208 * solib-aix.c: Remove _initialize_solib_aix prototype.
4209 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4210 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4211 * solib-frv.c: Remove _initialize_frv_solib prototype.
4212 * solib-spu.c: Remove _initialize_spu_solib prototype.
4213 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4214 * solib-target.c: Remove _initialize_solib_target prototype.
4215 * solib.c: Remove _initialize_solib prototype.
4216 * source.c: Remove _initialize_source prototype.
4217 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4218 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4219 prototype.
4220 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4221 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4222 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4223 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4224 prototype.
4225 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4226 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4227 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4228 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4229 prototype.
4230 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4231 prototype.
4232 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4233 prototype.
4234 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4235 prototype.
4236 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4237 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4238 prototype.
4239 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4240 prototype.
4241 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4242 prototype.
4243 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4244 prototype.
4245 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4246 prototype.
4247 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4248 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4249 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4250 * stabsread.c: Remove _initialize_stabsread prototype.
4251 * stack.c: Remove _initialize_stack prototype.
4252 * stap-probe.c: Remove _initialize_stap_probe prototype.
4253 * std-regs.c: Remove _initialize_frame_reg prototype.
4254 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4255 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4256 * symfile.c: Remove _initialize_symfile prototype.
4257 * symmisc.c: Remove _initialize_symmisc prototype.
4258 * symtab.c: Remove _initialize_symtab prototype.
4259 * target-dcache.c: Remove _initialize_target_dcache prototype.
4260 * target-descriptions.c: Remove _initialize_target_descriptions
4261 prototype.
4262 * thread.c: Remove _initialize_thread prototype.
4263 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4264 prototype.
4265 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4266 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4267 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4268 prototype.
4269 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4270 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4271 * tracefile.c: Remove _initialize_tracefile prototype.
4272 * tracepoint.c: Remove _initialize_tracepoint prototype.
4273 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4274 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4275 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4276 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4277 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4278 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4279 * tui/tui.c: Remove _initialize_tui prototype.
4280 * typeprint.c: Remove _initialize_typeprint prototype.
4281 * user-regs.c: Remove _initialize_user_regs prototype.
4282 * utils.c: Remove _initialize_utils prototype.
4283 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4284 * valarith.c: Remove _initialize_valarith prototype.
4285 * valops.c: Remove _initialize_valops prototype.
4286 * valprint.c: Remove _initialize_valprint prototype.
4287 * value.c: Remove _initialize_values prototype.
4288 * varobj.c: Remove _initialize_varobj prototype.
4289 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4290 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4291 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4292 * windows-nat.c: Remove _initialize_windows_nat,
4293 _initialize_check_for_gdb_ini, and _initialize_loadable
4294 prototypes.
4295 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4296 * xcoffread.c: Remove _initialize_xcoffread prototype.
4297 * xml-support.c: Remove _initialize_xml_support prototype.
4298 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4299 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4300 prototype.
4301 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4302 prototype.
4303 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4304
4305 2017-09-08 Keith Seitz <keiths@redhat.com>
4306
4307 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4308 field.
4309
4310 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4311
4312 * f-valprint.c (f_val_print): Remove check for one byte
4313 sized integers. Remove printing of character type.
4314
4315 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4316 Christoph Weinmann <christoph.t.weinmann@intel.com>
4317 Bernhard Heckel <bernhard.heckel@intel.com>
4318
4319 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4320 to maintain proper indentation when printing pointers/refs.
4321
4322 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4323
4324 GDB 8.0.1 released.
4325
4326 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4327
4328 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4329
4330 2017-09-05 Tom Tromey <tom@tromey.com>
4331
4332 * parse.c (funcall_chain): Now a std::vector.
4333 (start_arglist, end_arglist): Simplify.
4334 (free_funcalls): Remove.
4335 (parse_exp_in_context_1): Remove cleanup.
4336
4337 2017-09-05 Tom Tromey <tom@tromey.com>
4338
4339 * go-exp.y (go_parse): Don't create a cleanup.
4340
4341 2017-09-05 Tom Tromey <tom@tromey.com>
4342
4343 * d-exp.y (PrimaryExpression): Use std::string.
4344 (d_parse): Don't create a cleanup.
4345
4346 2017-09-05 Tom Tromey <tom@tromey.com>
4347
4348 * utils.c (do_clear_parser_state): Remove.
4349 (make_cleanup_clear_parser_state): Remove.
4350 * p-exp.y (pascal_parse): Use scoped_restore.
4351 * m2-exp.y (m2_parse): Use scoped_restore.
4352 * f-exp.y (f_parse): Use scoped_restore.
4353 * d-exp.y (d_parse): Use scoped_restore.
4354 * c-exp.y (c_parse): Use scoped_restore.
4355 * ada-exp.y (ada_parse): Use scoped_restore.
4356 * utils.h (make_cleanup_clear_parser_state): Remove.
4357
4358 2017-09-06 Keith Seitz <keiths@redhat.com>
4359
4360 * dwarf2read.c (dw2_linkage_name_attr): New function.
4361 (dw2_linkage_name): New function.
4362 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4363 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4364 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4365
4366 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4367
4368 * config/djgpp/djconfig.sh: Correct shell portability issue.
4369
4370 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4371
4372 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4373
4374 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4375
4376 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4377 * NEWS: Mention new FreeBSD/mips native configuration.
4378 * configure.host: Add aarch64*-*-freebsd*.
4379 * configure.nat: Likewise.
4380 * aarch64-fbsd-nat.c: New file.
4381
4382 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4383
4384 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4385 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4386 * NEWS: Mention new FreeBSD/aarch64 target.
4387 * configure.tgt: Add aarch64*-*-freebsd*.
4388 * aarch64-fbsd-tdep.c: New file.
4389 * aarch64-fbsd-tdep.h: New file.
4390
4391 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4392
4393 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4394
4395 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4396
4397 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4398 of TLS symbols.
4399
4400 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4401
4402 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4403 call.
4404
4405 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4406
4407 * infrun.c (follow_exec): Call add_thread after
4408 target_find_description.
4409
4410 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4411
4412 * infrun.c (handle_inferior_event_1): When exec'ing, read
4413 stop_pc after follow_exec.
4414
4415 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4416
4417 * remote.c (process_g_packet): Update error message.
4418
4419 2017-09-05 Yao Qi <yao.qi@linaro.org>
4420
4421 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4422 targets.
4423
4424 2017-09-05 Pedro Alves <palves@redhat.com>
4425
4426 * eval.c (eval_call, evaluate_funcall): New functions, factored
4427 out from ...
4428 (evaluate_subexp_standard): ... this.
4429
4430 2017-09-05 Yao Qi <yao.qi@linaro.org>
4431
4432 * amd64-tdep.c (amd64_target_description): Create target
4433 descriptions.
4434 (_initialize_amd64_tdep): Don't call functions
4435 initialize_tdesc_amd64_*. Add self tests.
4436 * arch/amd64.c (amd64_create_target_description): Add parameter
4437 is_linux. Call set_tdesc_osabi if is_linux is true.
4438 * arch/amd64.h (amd64_create_target_description): Update the
4439 declaration.
4440 * arch/i386.c (i386_create_target_description): Add parameter
4441 is_linux. Call set_tdesc_osabi if is_linux is true.
4442 * arch/i386.h (i386_create_target_description): Update
4443 declaration.
4444 * configure.tgt: Add i386.o to gdb_target_obs.
4445 * features/Makefile (XMLTOC): Remove i386/*.xml.
4446 * features/i386/amd64-avx-avx512.c: Remove.
4447 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4448 * features/i386/amd64-avx-mpx.c: Remove.
4449 * features/i386/amd64-avx.c: Remove.
4450 * features/i386/amd64-mpx.c: Remove.
4451 * features/i386/amd64.c: Remove.
4452 * features/i386/i386-avx-avx512.c: Remove.
4453 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4454 * features/i386/i386-avx-mpx.c: Remove.
4455 * features/i386/i386-avx.c: Remove.
4456 * features/i386/i386-mmx.c: Remove.
4457 * features/i386/i386-mpx.c: Remove.
4458 * features/i386/i386.c: Remove.
4459 * i386-tdep.c: Don't include features/i386/i386*.c., include
4460 target-descriptions.h and arch/i386.h.
4461 (i386_target_description): Create target descriptions.
4462 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4463 functions. Do self tests.
4464
4465 2017-09-05 Yao Qi <yao.qi@linaro.org>
4466
4467 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4468 * features/i386/amd64-avx-avx512-linux.c: Removed.
4469 * features/i386/amd64-avx-linux.c: Removed.
4470 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4471 * features/i386/amd64-avx-mpx-linux.c: Removed.
4472 * features/i386/amd64-linux.c: Removed.
4473 * features/i386/amd64-mpx-linux.c: Removed.
4474 * features/i386/x32-avx-avx512-linux.c: Removed.
4475 * features/i386/x32-avx-linux.c: Removed.
4476 * features/i386/x32-linux.c: Removed.
4477
4478 2017-09-05 Yao Qi <yao.qi@linaro.org>
4479
4480 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4481 features/i386/*.c.
4482 (amd64_linux_read_description): Call
4483 amd64_create_target_description.
4484 * arch/amd64.c: New file.
4485 * arch/amd64.h: New file.
4486 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4487 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4488
4489 2017-09-05 Yao Qi <yao.qi@linaro.org>
4490
4491 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4492 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4493 (amd64_linux_read_description): Create target descriptions.
4494 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4495 functions. Add unit tests.
4496 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4497 x32-core.xml.
4498 * features/i386/64bit-avx.c: Generated.
4499 * features/i386/64bit-avx512.c: Generated.
4500 * features/i386/64bit-core.c: Generated.
4501 * features/i386/64bit-linux.c: Generated.
4502 * features/i386/64bit-mpx.c: Generated.
4503 * features/i386/64bit-pkeys.c: Generated.
4504 * features/i386/64bit-segments.c: Generated.
4505 * features/i386/64bit-sse.c: Generated.
4506 * features/i386/x32-core.c: Generated.
4507 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4508 c files for amd64-linux and x32-linux.
4509
4510 2017-09-05 Yao Qi <yao.qi@linaro.org>
4511
4512 * amd64-linux-tdep.c (amd64_linux_read_description): New
4513 function.
4514 (amd64_linux_core_read_description): Call
4515 amd64_linux_read_description.
4516 (amd64_linux_init_abi): Likewise.
4517 (amd64_x32_linux_init_abi): Likewise.
4518 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4519 * x86-linux-nat.c (x86_linux_read_description): Call
4520 amd64_linux_read_description.
4521
4522 2017-09-05 Yao Qi <yao.qi@linaro.org>
4523
4524 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4525 comments.
4526
4527 2017-09-05 Yao Qi <yao.qi@linaro.org>
4528
4529 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4530 * features/i386/i386-avx-avx512-linux.c: Remove.
4531 * features/i386/i386-avx-linux.c: Remove.
4532 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4533 * features/i386/i386-avx-mpx-linux.c: Remove.
4534 * features/i386/i386-linux.c: Remove.
4535 * features/i386/i386-mmx-linux.c: Remove.
4536 * features/i386/i386-mpx-linux.c: Remove.
4537
4538 2017-09-05 Yao Qi <yao.qi@linaro.org>
4539
4540 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4541 (SFILES): Add arch/i386.c.
4542 (HFILES_NO_SRCDIR): Add arch/i386.h.
4543 * arch/i386.c: New file.
4544 * arch/i386.h: New file.
4545 * arch/tdesc.h (allocate_target_description): Declare.
4546 (set_tdesc_architecture): Declare.
4547 (set_tdesc_osabi): Declare.
4548 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4549 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4550 include arch/i386.h.
4551 (i386_linux_read_description): Remove code and call
4552 i386_create_target_description.
4553 (set_tdesc_architecture): New function.
4554 (set_tdesc_osabi): New function.
4555 * target-descriptions.h (allocate_target_description): Remove.
4556
4557 2017-09-05 Yao Qi <yao.qi@linaro.org>
4558
4559 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4560 * target-descriptions.c (tdesc_create_feature): Likewise, and
4561 adjust code.
4562 * features/i386/32bit-avx.c: Re-generated.
4563 * features/i386/32bit-avx512.c: Re-generated.
4564 * features/i386/32bit-core.c: Re-generated.
4565 * features/i386/32bit-linux.c: Re-generated.
4566 * features/i386/32bit-mpx.c: Re-generated.
4567 * features/i386/32bit-pkeys.c: Re-generated.
4568 * features/i386/32bit-sse.c: Re-generated.
4569
4570 2017-09-05 Yao Qi <yao.qi@linaro.org>
4571
4572 * regformats/regdef.h (struct reg): Override operator == and !=.
4573
4574 2017-09-05 Yao Qi <yao.qi@linaro.org>
4575
4576 * arch/tdesc.h: New file.
4577 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4578 * target-descriptions.c: Update comments.
4579 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4580 declarations.
4581 * features/i386/32bit-avx.c: Re-generated.
4582 * features/i386/32bit-avx512.c: Re-generated.
4583 * features/i386/32bit-core.c: Re-generated.
4584 * features/i386/32bit-linux.c: Re-generated.
4585 * features/i386/32bit-mpx.c: Re-generated.
4586 * features/i386/32bit-pkeys.c: Re-generated.
4587 * features/i386/32bit-sse.c: Re-generated.
4588
4589 2017-09-05 Yao Qi <yao.qi@linaro.org>
4590
4591 * regformats/regdat.sh: Update generated code.
4592
4593 2017-09-05 Yao Qi <yao.qi@linaro.org>
4594
4595 * regformats/regdat.sh: Adjust code order.
4596
4597 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4598
4599 * expprint.c (dump_subexp_body_standard): Use constant format
4600 string in fprintf_filtered call.
4601
4602 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4603
4604 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4605 NetBSD/i386.
4606 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4607
4608 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4609
4610 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4611
4612 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4613
4614 * bsd-kvm.o: Define _KMEMUSER.
4615 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4616 * configure: Regenerate.
4617
4618 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4619
4620 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4621 * i386-fbsd-nat.c: Likewise.
4622
4623 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4624
4625 * unittests/array-view-selftests.c: Add include of <array>.
4626
4627 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4628
4629 * spu-tdep.c (flush_ea_cache): Add missing argument to
4630 call_function_by_hand.
4631
4632 2017-09-04 Pedro Alves <palves@redhat.com>
4633
4634 * NEWS (Safer support for debugging with no debug info): New.
4635
4636 2017-09-04 Pedro Alves <palves@redhat.com>
4637
4638 * c-exp.y (function_method, function_method_void): Add current
4639 instance flags to TYPE_INSTANCE.
4640 * dwarf2read.c (check_modifier): New.
4641 (compute_delayed_physnames): Assert that only C++ adds delayed
4642 physnames. Mark fn_fields as const/volatile depending on
4643 physname.
4644 * eval.c (make_params): New type_instance_flags parameter. Use
4645 it as the new type's instance flags.
4646 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4647 flags element and pass it to make_params.
4648 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4649 instance flags element.
4650 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4651 * gdbtypes.h: Include "enum-flags.h".
4652 (type_instance_flags): New enum-flags type.
4653 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4654 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4655 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4656 (follow_type_instance_flags): New function.
4657 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4658 * parser-defs.h (follow_type_instance_flags): Declare.
4659 * valops.c (value_struct_elt_for_reference): const/volatile must
4660 match too.
4661
4662 2017-09-04 Pedro Alves <palves@redhat.com>
4663
4664 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4665 function/method scopes; lookup the nested name as a function local
4666 static variable.
4667
4668 2017-09-04 Pedro Alves <palves@redhat.com>
4669
4670 (%type <voidval>): Add function_method.
4671 * c-exp.y (exp): New production for calls with no arguments.
4672 (function_method, function_method_void_or_typelist): New
4673 productions.
4674 (exp): New production for "method()::static_var".
4675 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4676 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4677 Handle OP_FUNC_STATIC_VAR.
4678 * parse.c (operator_length_standard):
4679 Handle OP_FUNC_STATIC_VAR.
4680
4681 2017-09-04 Pedro Alves <palves@redhat.com>
4682
4683 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4684 handling.
4685 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4686 Ditto.
4687 * parse.c (operator_length_standard, operator_check_standard):
4688 Ditto.
4689 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4690
4691 2017-09-04 Pedro Alves <palves@redhat.com>
4692
4693 * ax-gdb.c: Include "typeprint.h".
4694 (gen_expr_for_cast): New function.
4695 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4696 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4697 type is unknown.
4698 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4699 nodebug_data_symbol.
4700 * eval.c: Include "typeprint.h".
4701 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4702 Error out if symbol has unknown type.
4703 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4704 evaluate_subexp_for_cast.
4705 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4706 OP_VAR_MSYM_VALUE.
4707 (evaluate_subexp_for_cast): New function.
4708 * gdbtypes.c (init_nodebug_var_type): New function.
4709 (objfile_type): Use it to initialize types of variables with no
4710 debug info.
4711 * typeprint.c (error_unknown_type): New.
4712 * typeprint.h (error_unknown_type): New declaration.
4713 * compile/compile-c-types.c (convert_type_basic): Handle
4714 TYPE_CODE_ERROR; warn and fallback to int for variables with
4715 unknown type.
4716
4717 2017-09-04 Pedro Alves <palves@redhat.com>
4718
4719 * eval.c (evaluate_var_value): New function, factored out from ...
4720 (evaluate_subexp_standard): ... here.
4721
4722 2017-09-04 Pedro Alves <palves@redhat.com>
4723
4724 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4725 Remove useless assignments to 'op'.
4726
4727 2017-09-04 Pedro Alves <palves@redhat.com>
4728
4729 * eval.c (eval_skip_value): New function.
4730 (evaluate_subexp_standard): Use it.
4731
4732 2017-09-04 Pedro Alves <palves@redhat.com>
4733
4734 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4735 function name from symbol/minsym and pass it to
4736 error_call_unknown_return_type.
4737
4738 2017-09-04 Pedro Alves <palves@redhat.com>
4739
4740 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4741 * ax-gdb.c (gen_msym_var_ref): New function.
4742 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4743 * eval.c (evaluate_var_msym_value): New function.
4744 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4745 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4746 to call_function_by_hand.
4747 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4748 Handle OP_VAR_MSYM_VALUE.
4749 (union exp_element) <msymbol>: New field.
4750 * minsyms.h (struct type): Forward declare.
4751 (find_minsym_type_and_address): Declare.
4752 * parse.c (write_exp_elt_msym): New function.
4753 (write_exp_msymbol): Delete, refactored as ...
4754 (find_minsym_type_and_address): ... this new function.
4755 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4756 (operator_length_standard, operator_check_standard): Handle
4757 OP_VAR_MSYM_VALUE.
4758 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4759
4760 2017-09-04 Pedro Alves <palves@redhat.com>
4761
4762 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4763 TYPE_GNU_IFUNC specially here. Throw error if return type is
4764 unknown.
4765 * ada-typeprint.c (print_func_type): Handle functions with unknown
4766 return type.
4767 * c-typeprint.c (c_type_print_base): Handle functions and methods
4768 with unknown return type.
4769 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4770 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4771 * compile/compile-c-types.c: Include "objfiles.h".
4772 (convert_func): For functions with unknown return type, warn and
4773 default to int.
4774 * compile/compile-object-run.c (compile_object_run): Adjust call
4775 to call_function_by_hand_dummy.
4776 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4777 call_function_by_hand.
4778 * eval.c (evaluate_subexp_standard): Adjust calls to
4779 call_function_by_hand. Handle functions and methods with unknown
4780 return type. Pass expect_type to call_function_by_hand.
4781 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4782 return type.
4783 * gcore.c (call_target_sbrk): Adjust call to
4784 call_function_by_hand.
4785 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4786 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4787 an integer address type instead of nodebug.
4788 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4789 call_function_by_hand.
4790 * infcall.c (error_call_unknown_return_type): New function.
4791 (call_function_by_hand): New "default_return_type" parameter.
4792 Pass it down.
4793 (call_function_by_hand_dummy): New "default_return_type"
4794 parameter. Use it instead of defaulting to int. If there's no
4795 default and the return type is unknown, throw an error. If
4796 there's a default return type, and the called function has no
4797 debug info, then assume the function is prototyped.
4798 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4799 New "default_return_type" parameter.
4800 (error_call_unknown_return_type): New declaration.
4801 * linux-fork.c (call_lseek): Cast return type of lseek.
4802 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4803 call_function_by_hand.
4804 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4805 calls to call_function_by_hand.
4806 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4807 return type.
4808 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4809 (value_nsstring, print_object_command): Adjust calls to
4810 call_function_by_hand.
4811 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
4812 functions with unknown return type.
4813 (pascal_type_print_func_varspec_suffix): New function.
4814 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
4815 TYPE_CODE_METHOD>: Use it.
4816 * python/py-value.c (valpy_call): Adjust call to
4817 call_function_by_hand.
4818 * rust-lang.c (rust_evaluate_funcall): Adjust call to
4819 call_function_by_hand.
4820 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
4821 call_function_by_hand.
4822 * valops.c (value_allocate_space_in_inferior): Adjust call to
4823 call_function_by_hand.
4824 * typeprint.c (type_print_unknown_return_type): New function.
4825 * typeprint.h (type_print_unknown_return_type): New declaration.
4826
4827 2017-09-04 Pedro Alves <palves@redhat.com>
4828
4829 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
4830 types with more than one parameter as prototyped.
4831
4832 2017-09-04 Pedro Alves <palves@redhat.com>
4833
4834 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
4835 (disassemble_command): Use gdb_disassembly_flags instead of bare
4836 int.
4837 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
4838 (dump_insns, do_mixed_source_and_assembly_deprecated)
4839 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
4840 Use gdb_disassembly_flags instead of bare int.
4841 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
4842 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
4843 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
4844 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
4845 (enum gdb_disassembly_flag): ... values of this new enumeration.
4846 (gdb_disassembly_flags): Define.
4847 (gdb_disassembly)
4848 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
4849 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
4850 gdb_disassembly_flags instead of bare int.
4851 * record-btrace.c (btrace_insn_history)
4852 (record_btrace_insn_history, record_btrace_insn_history_range)
4853 (record_btrace_insn_history_from): Use gdb_disassembly_flags
4854 instead of bare int.
4855 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
4856 Use gdb_disassembly_flags instead of bare int.
4857 * target-debug.h (target_debug_print_gdb_disassembly_flags):
4858 Define.
4859 * target-delegates.c: Regenerate.
4860 * target.c (target_insn_history, target_insn_history_from)
4861 (target_insn_history_range): Use gdb_disassembly_flags instead of
4862 bare int.
4863 * target.h: Include "disasm.h".
4864 (struct target_ops) <to_insn_history, to_insn_history_from,
4865 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
4866 int.
4867 (target_insn_history, target_insn_history_from)
4868 (target_insn_history_range): Use gdb_disassembly_flags instead of
4869 bare int.
4870
4871 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4872
4873 * cli/cli-script.c (build_command_line): For if/while commands,
4874 check whether args is empty.
4875
4876 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4877
4878 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
4879 (enum command_control_type): Likewise.
4880 (struct command_line): Likewise.
4881 (free_command_lines): Likewise.
4882 (struct command_lines_deleter): Likewise.
4883 (command_line_up): Likewise.
4884 (read_command_lines): Likewise.
4885 (read_command_lines_1): Likewise.
4886 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
4887 (enum command_control_type): Likewise.
4888 (struct command_line): Likewise.
4889 (free_command_lines): Likewise.
4890 (struct command_lines_deleter): Likewise.
4891 (command_line_up): Likewise.
4892 (read_command_lines): Likewise.
4893 (read_command_lines_1): Likewise.
4894 * breakpoint.h: Include cli/cli-script.h.
4895 * extension-priv.h: Likewise.
4896 * gdbcmd.h: Likewise.
4897
4898 2017-09-04 Pedro Alves <palves@redhat.com>
4899
4900 * ada-lang.c (is_known_support_routine): Move sal declaration to
4901 where it is initialized.
4902 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
4903 (parse_breakpoint_sals, decode_static_tracepoint_spec)
4904 (clear_command, update_static_tracepoint): Remove init_sal
4905 references. Move declarations closer to initializations.
4906 * cli/cli-cmds.c (list_command): Move sal declarations closer to
4907 initializations.
4908 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
4909 references. Move sal declarations closer to initializations.
4910 * frame.c (find_frame_sal): Return a symtab_and_line via function
4911 return instead of output parameter. Remove init_sal references.
4912 * frame.h (find_frame_sal): Return a symtab_and_line via function
4913 return instead of output parameter.
4914 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
4915 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
4916 instead of memset.
4917 (gdbscm_find_pc_line): Remove init_sal reference.
4918 * infcall.c (call_function_by_hand_dummy): Remove init_sal
4919 references. Move declarations closer to initializations.
4920 * infcmd.c (set_step_frame): Update. Move declarations closer to
4921 initializations.
4922 (finish_backward): Remove init_sal references. Move declarations
4923 closer to initializations.
4924 * infrun.c (process_event_stop_test, handle_step_into_function)
4925 (insert_hp_step_resume_breakpoint_at_frame)
4926 (insert_step_resume_breakpoint_at_caller): Likewise.
4927 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
4928 (symbol_to_sal): Likewise.
4929 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
4930 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
4931 to its initialization.
4932 * reverse.c (save_bookmark_command): Use new/delete. Remove
4933 init_sal references. Move declarations closer to initializations.
4934 * source.c (get_current_source_symtab_and_line): Remove brace
4935 initialization.
4936 (set_current_source_symtab_and_line): Now takes the sal by const
4937 reference. Remove brace initialization.
4938 (line_info): Remove init_sal reference.
4939 * source.h (set_current_source_symtab_and_line): Now takes a
4940 symtab_and_line via const reference.
4941 * stack.c (set_current_sal_from_frame): Adjust.
4942 (print_frame_info): Adjust.
4943 (get_last_displayed_sal): Return the sal via function return
4944 instead of via output parameter. Simplify.
4945 (frame_info): Adjust.
4946 * stack.h (get_last_displayed_sal): Return the sal via function
4947 return instead of via output parameter.
4948 * symtab.c (init_sal): Delete.
4949 (find_pc_sect_line): Remove init_sal references. Move
4950 declarations closer to initializations.
4951 (find_function_start_sal): Remove init_sal references. Move
4952 declarations closer to initializations.
4953 * symtab.h (struct symtab_and_line): In-class initialize all
4954 fields.
4955 * tracepoint.c (set_traceframe_context)
4956 (print_one_static_tracepoint_marker): Remove init_sal references.
4957 Move declarations closer to initializations.
4958 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
4959 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
4960 declarations closer to initializations.
4961 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
4962 init_sal references. Adjust.
4963
4964 2017-09-04 Pedro Alves <palves@redhat.com>
4965
4966 * ax-gdb.c (agent_command_1): Use range-for.
4967 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4968 * breakpoint.c: Include "common/array-view.h".
4969 (init_breakpoint_sal, create_breakpoint_sal): Change sals
4970 parameter from struct symtabs_and_lines to
4971 array_view<symtab_and_line>. Adjust. Use range-for. Update.
4972 (breakpoint_sals_to_pc): Change sals parameter from struct
4973 symtabs_and_lines to std::vector reference.
4974 (check_fast_tracepoint_sals): Change sals parameter from struct
4975 symtabs_and_lines to std::array_view. Use range-for.
4976 (decode_static_tracepoint_spec): Return a std::vector instead of
4977 symtabs_and_lines. Update.
4978 (create_breakpoint): Update.
4979 (break_range_command, until_break_command, clear_command): Update.
4980 (base_breakpoint_decode_location, bkpt_decode_location)
4981 (bkpt_probe_create_sals_from_location)
4982 (bkpt_probe_decode_location, tracepoint_decode_location)
4983 (tracepoint_probe_decode_location)
4984 (strace_marker_create_sals_from_location): Return a std::vector
4985 instead of symtabs_and_lines.
4986 (strace_marker_create_breakpoints_sal): Update.
4987 (strace_marker_decode_location): Return a std::vector instead of
4988 symtabs_and_lines. Update.
4989 (update_breakpoint_locations): Change struct symtabs_and_lines
4990 parameters to gdb::array_view. Adjust.
4991 (location_to_sals): Return a std::vector instead of
4992 symtabs_and_lines. Update.
4993 (breakpoint_re_set_default): Use std::vector instead of struct
4994 symtabs_and_lines.
4995 (decode_location_default): Return a std::vector instead of
4996 symtabs_and_lines. Update.
4997 * breakpoint.h: Include "common/array-view.h".
4998 (struct breakpoint_ops) <decode_location>: Now returns a
4999 std::vector instead of returning a symtabs_and_lines via output
5000 parameter.
5001 (update_breakpoint_locations): Change sals parameters to use
5002 gdb::array_view.
5003 * cli/cli-cmds.c (edit_command, list_command): Update to use
5004 std::vector and gdb::array_view.
5005 (ambiguous_line_spec): Adjust to use gdb::array_view and
5006 range-for.
5007 (compare_symtabs): Rename to ...
5008 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5009 const reference and adjust.
5010 (filter_sals): Rewrite using std::vector and standard algorithms.
5011 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5012 (jump_command): Update to use std::vector.
5013 * linespec.c (struct linespec_state) <canonical_names>: Update
5014 comment.
5015 (add_sal_to_sals_basic): Delete.
5016 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5017 (decode_line_2, create_sals_line_offset)
5018 (convert_address_location_to_sals, convert_linespec_to_sals)
5019 (convert_explicit_location_to_sals, parse_linespec)
5020 (event_location_to_sals, decode_line_full, decode_line_1)
5021 (decode_line_with_current_source)
5022 (decode_line_with_last_displayed, decode_objc)
5023 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5024 (linespec_result::~linespec_result): Adjust to use std::vector
5025 instead of symtabs_and_lines.
5026 * linespec.h (linespec_sals::sals): Now a std::vector.
5027 (struct linespec_result): Use std::vector, bool, and in-class
5028 initialization.
5029 (decode_line_1, decode_line_with_current_source)
5030 (decode_line_with_last_displayed): Return std::vector.
5031 * macrocmd.c (info_macros_command): Use std::vector.
5032 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5033 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5034 std::vector.
5035 * probe.h (parse_probes): Return a std::vector.
5036 * python/python.c (gdbpy_decode_line): Use std::vector and
5037 gdb::array_view.
5038 * source.c (select_source_symtab, line_info): Use std::vector.
5039 * stack.c (func_command): Use std::vector.
5040 * symtab.h (struct symtabs_and_lines): Delete.
5041 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5042
5043 2017-09-04 Pedro Alves <palves@redhat.com>
5044
5045 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5046 unittests/array-view-selftests.c.
5047 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5048 * common/array-view.h: New file.
5049 * unittests/array-view-selftests.c: New file.
5050
5051 2017-09-04 Pedro Alves <palves@redhat.com>
5052
5053 * cli/cli-cmds.c (edit_command): Pass message to
5054 ambiguous_line_spec.
5055 (list_command): Pass message to ambiguous_line_spec. Say
5056 "first"/"last" instead of "start" and "end" to be consistent with
5057 the manual.
5058 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5059 them to print formatted message.
5060
5061 2017-09-04 Pedro Alves <palves@redhat.com>
5062
5063 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5064 ftrace_update_insns by reference instead of pointer.
5065
5066 2017-09-04 Yao Qi <yao.qi@linaro.org>
5067
5068 * i386-go32-tdep.c: Include x86-xstate.h.
5069 (i386_go32_init_abi): Call i386_target_description.
5070 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5071 if xcr0 is X86_XSTATE_X87_MASK.
5072 * i386-tdep.h (tdesc_i386): Remove the declaration.
5073 (tdesc_i386_mmx): Likewise.
5074
5075 2017-09-04 Yao Qi <yao.qi@linaro.org>
5076
5077 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5078 X86_XSTATE_SSE_MASK instead of 0.
5079
5080 2017-09-04 Yao Qi <yao.qi@linaro.org>
5081
5082 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5083 i386_target_description.
5084 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5085 i386_target_description.
5086 * i386-tdep.c (i386_gdbarch_init): Likewise.
5087
5088 2017-09-04 Yao Qi <yao.qi@linaro.org>
5089
5090 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5091 (x86_darwin_init_abi_64): Call amd64_target_description.
5092 * amd64-dicos-tdep.c: Likewise.
5093 * amd64-fbsd-nat.c: Likewise.
5094 * amd64-fbsd-tdep.c: Likewise.
5095 * amd64-nbsd-tdep.c: Likewise.
5096 * amd64-obsd-tdep.c: Likewise.
5097 * amd64-sol2-tdep.c: Likewise.
5098 * amd64-windows-tdep.c: Likewise.
5099 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5100
5101 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5102
5103 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5104 (btrace_function) <insn>: Change type to use std::vector.
5105 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5106 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5107 ftrace_update_insns, ftrace_compute_global_level_offset,
5108 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5109 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5110 change to std::vector.
5111 (ftrace_update_insns): Adjust to change to std::vector, change
5112 type of INSN parameter.
5113 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5114 * record-btrace.c (btrace_call_history_insn_range,
5115 btrace_compute_src_line_range,
5116 record_btrace_frame_prev_register): Adjust to change to
5117 std::vector.
5118 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5119 to change to std::vector.
5120
5121 2017-09-03 Tom Tromey <tom@tromey.com>
5122
5123 * corefile.c (reopen_exec_file): Use std::string.
5124
5125 2017-09-03 Tom Tromey <tom@tromey.com>
5126
5127 * compile/compile.c (compile_register_name_mangled): Return
5128 std::string.
5129 * compile/compile-loc2c.c (pushf_register_address): Update.
5130 (pushf_register): Update.
5131 * compile/compile-c-types.c (convert_array): Update.
5132 * compile/compile-c-symbols.c (generate_vla_size): Update.
5133 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5134 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5135 (convert_one_symbol): Update.
5136 (generate_c_for_for_one_variable): Update.
5137 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5138 std::string.
5139 (generate_register_struct): Update.
5140 * compile/compile-internal.h (c_get_range_decl_name): Return a
5141 std::string.
5142 (compile_register_name_mangled): Return std::string.
5143
5144 2017-09-03 Tom Tromey <tom@tromey.com>
5145
5146 * utils.c (perror_string): Return a std::string.
5147 (throw_perror_with_name, perror_warning_with_name): Update.
5148
5149 2017-09-03 Tom Tromey <tom@tromey.com>
5150
5151 * demangle.c (demangle_command): Use std::string,
5152 unique_xmalloc_ptr.
5153
5154 2017-09-03 Tom Tromey <tom@tromey.com>
5155
5156 * cli/cli-setshow.c (do_set_command): Use std::string.
5157
5158 2017-09-03 Tom Tromey <tom@tromey.com>
5159
5160 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5161
5162 2017-09-03 Tom Tromey <tom@tromey.com>
5163
5164 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5165
5166 2017-09-03 Tom Tromey <tom@tromey.com>
5167
5168 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5169 gdb::unique_xmalloc_ptr.
5170
5171 2017-09-03 Tom Tromey <tom@tromey.com>
5172
5173 * thread.c (print_thread_info_1): Use string_printf.
5174 (thread_apply_command, thread_apply_all_command): Use
5175 std::string.
5176
5177 2017-09-03 Tom Tromey <tom@tromey.com>
5178
5179 * valprint.c (val_print_string): Update.
5180 * gdbcore.h (memory_error_message): Return std::string.
5181 * corefile.c (memory_error_message): Return std::string.
5182 (memory_error): Update.
5183 * breakpoint.c (insert_bp_location): Update.
5184
5185 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5186
5187 * target/waitstatus.h (target_waitstatus_to_string): Change
5188 return type to std::string.
5189 * target/waitstatus.c (target_waitstatus_to_string): Return
5190 std::string.
5191 * target.h (target_waitstatus_to_string): Remove declaration.
5192 * infrun.c (resume, clear_proceed_status_thread,
5193 print_target_wait_results, do_target_wait, save_waitstatus,
5194 stop_all_threads): Adjust.
5195 * record-btrace.c (record_btrace_wait): Adjust.
5196 * target-debug.h
5197 (target_debug_print_struct_target_waitstatus_p): Adjust.
5198
5199 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5200
5201 PR gdb/22046
5202 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5203 detection.
5204
5205 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5206
5207 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5208 for setting/unsetting environment variables on the remote target.
5209 (New remote packets): Add entries for QEnvironmentHexEncoded,
5210 QEnvironmentUnset and QEnvironmentReset.
5211 * common/environ.c (gdb_environ::operator=): Extend method to
5212 handle m_user_set_env_list and m_user_unset_env_list.
5213 (gdb_environ::clear): Likewise.
5214 (match_var_in_string): Change type of first parameter from 'char
5215 *' to 'const char *'.
5216 (gdb_environ::set): Extend method to handle
5217 m_user_set_env_list and m_user_unset_env_list.
5218 (gdb_environ::unset): Likewise.
5219 (gdb_environ::clear_user_set_env): New method.
5220 (gdb_environ::user_set_envp): Likewise.
5221 (gdb_environ::user_unset_envp): Likewise.
5222 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5223 m_user_unset_env_list on move constructor/assignment.
5224 (unset): Add new default parameter 'update_unset_list = true'.
5225 (clear_user_set_env): New method.
5226 (user_set_envp): Likewise.
5227 (user_unset_envp): Likewise.
5228 (m_user_set_env_list): New std::set.
5229 (m_user_unset_env_list): Likewise.
5230 * common/rsp-low.c (hex2str): New function.
5231 (bin2hex): New overload for bin2hex function.
5232 * common/rsp-low.c (hex2str): New prototype.
5233 (str2hex): New overload prototype.
5234 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5235 QEnvironmentUnset and QEnvironmentReset.
5236 (remote_protocol_features): Add QEnvironmentHexEncoded,
5237 QEnvironmentUnset and QEnvironmentReset packets.
5238 (send_environment_packet): New function.
5239 (extended_remote_environment_support): Likewise.
5240 (extended_remote_create_inferior): Call
5241 extended_remote_environment_support.
5242 (_initialize_remote): Add QEnvironmentHexEncoded,
5243 QEnvironmentUnset and QEnvironmentReset packet configs.
5244 * unittests/environ-selftests.c (gdb_selftest_env_var):
5245 New variable.
5246 (test_vector_initialization): New function.
5247 (test_init_from_host_environ): Likewise.
5248 (test_reinit_from_host_environ): Likewise.
5249 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5250 Likewise.
5251 (test_unset_set_empty_vector): Likewise.
5252 (test_vector_clear): Likewise.
5253 (test_std_move): Likewise.
5254 (test_move_constructor):
5255 (test_self_move): Likewise.
5256 (test_set_unset_reset): Likewise.
5257 (run_tests): Rewrite in terms of the functions above.
5258
5259 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5260
5261 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5262 (adi_available): Use a temp variable of type CORE_ADDR as argument
5263 3 when calling target_auxv_search.
5264 (adi_normalize_address): Use masks and xor operators to calculate
5265 normalized address.
5266 (adi_read_versions, adi_write_versions, adi_print_versions)
5267 (do_examine, do_assign): Use paddress.
5268
5269 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5270
5271 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5272 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5273 out of loop and add supply of FIR.
5274 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5275 add collect of FIR.
5276
5277 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5278
5279 PR gdb/21827
5280 * cli/cli-script.c (define_command): Don't convert command name
5281 to lower case.
5282
5283 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5284
5285 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5286 Update all callers accordingly. Remove all code blocks handling
5287 the case where DISPP is not NULL.
5288
5289 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5290
5291 PR symtab/22003
5292 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5293 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5294 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5295
5296 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5297
5298 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5299 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5300 (read_comp_units_from_section): New parameter abbrev_section, use
5301 read_and_check_comp_unit_head, allocate signatured_type if needed.
5302 (create_all_comp_units): Update read_comp_units_from_section caller.
5303
5304 2017-08-23 Pedro Alves <palves@redhat.com>
5305
5306 PR remote/21852
5307 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5308 to null_ptid and switch to thread without reading the registers
5309 after adding the inferior.
5310
5311 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5312
5313 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5314 compile-gcc.
5315 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5316 (compile_to_object): Implement compile_gcc.
5317 (_initialize_compile): Install "set compile-gcc". Initialize
5318 compile_gcc.
5319
5320 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5321
5322 * compile/compile.c (compile_to_object): Conditionally call
5323 set_verbose. Conditionally call compile or compile_v0.
5324
5325 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5326
5327 * sparc64-tdep.h: (adi_normalize_address): New export.
5328 * sparc-nat.h: (open_adi_tag_fd): New export.
5329 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5330 * sparc64-linux-tdep.c:
5331 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5332 (sparc64_linux_handle_segmentation_fault): New function.
5333 (sparc64_linux_init_abi): Register
5334 sparc64_linux_handle_segmentation_fault
5335 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5336 (sparc64_addr_bits_remove): New function.
5337 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5338 (MAX_PROC_NAME_SIZE): New macro.
5339 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5340 (sparc64adilist): New variable.
5341 (adi_proc_list): New variable.
5342 (find_adi_info): New function.
5343 (add_adi_info): New function.
5344 (get_adi_info_proc): New function.
5345 (get_adi_info): New function.
5346 (info_adi_command): New function.
5347 (read_maps_entry): New function.
5348 (adi_available): New function.
5349 (adi_normalize_address): New function.
5350 (adi_align_address): New function.
5351 (adi_convert_byte_count): New function.
5352 (adi_tag_fd): New function.
5353 (adi_is_addr_mapped): New function.
5354 (adi_read_versions): New function.
5355 (adi_write_versions): New function.
5356 (adi_print_versions): New function.
5357 (do_examine): New function.
5358 (do_assign): New function.
5359 (adi_examine_command): New function.
5360 (adi_assign_command): New function.
5361 (_initialize_sparc64_adi_tdep): New function.
5362
5363 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5364
5365 * breakpoint.c (breakpoints_info): Rename to ...
5366 (info_breakpoints_command): ... this.
5367 (watchpoints_info): Rename to ...
5368 (info_watchpoints_command): ... this.
5369 (tracepoints_info): Rename to ...
5370 (info_tracepoints_command): ... this.
5371 (_initialize_breakpoint): Adjust.
5372 * dcache.c (dcache_info): Rename to ...
5373 (info_display_command): ... this.
5374 (_initialize_dcache): Adjust.
5375 * frame.h (args_info): Rename to ...
5376 (info_args_command): ... this.
5377 (locals_info): Rename to ...
5378 (info_locals_command): ... this.
5379 * infcmd.c (nofp_registers_info): Rename to ...
5380 (info_registers_command): ... this.
5381 (float_info): Rename to ...
5382 (info_float_command): ... this.
5383 (program_info): Rename to ...
5384 (info_program_command): ... this.
5385 (all_registers_info): Rename to ...
5386 (info_all_registers_command): ... this.
5387 (vector_info): Rename to ...
5388 (info_vector_command): ... this.
5389 (float_info): Rename to ...
5390 (info_float_command): ... this.
5391 (_initialize_infcmd): Adjust.
5392 * inferior.h (term_info): Rename to ...
5393 (info_terminal_command): ... this.
5394 * inflow.c (term_info): Rename to ...
5395 (info_terminal_command): ... this.
5396 (_initialize_inflow): Adjust.
5397 * infrun.c (signals_info): Rename to ...
5398 (info_signals_command): ... this.
5399 (_initialize_infrun): Adjust.
5400 * objc-lang.c (classes_info): Rename to ...
5401 (info_classes_command): ... this.
5402 (selectors_info): Rename to ...
5403 (info_selectors_command): ... this.
5404 (_initialize_objc_language): Adjust.
5405 * printcmd.c (sym_info): Rename to ...
5406 (info_symbol_command): ... this.
5407 (address_info): Rename to ...
5408 (info_address_command): ... this.
5409 (display_info): Rename to ...
5410 (info_display_command): ... this.
5411 (_initialize_printcmd): Adjust.
5412 * reverse.c (bookmarks_info): Rename to ...
5413 (info_breakpoints_command): ... this.
5414 (_initialize_reverse): Adjust.
5415 * ser-go32.c (dos_info): Rename to ...
5416 (info_serial_command): ... this.
5417 (_initialize_ser_dos): Adjust.
5418 * skip.c (skip_info): Rename to ...
5419 (info_skip_command): ... this.
5420 (_initialize_step_skip): Adjust.
5421 * source.c (line_info): Rename to ...
5422 (info_line_command): ... this.
5423 (source_info): Rename to ...
5424 (info_source_command)
5425 * stack.c (frame_info): Rename to ...
5426 (info_frame_command): ... this.
5427 (locals_info): Rename to ...
5428 (info_locals_command): ... this.
5429 (args_info): Rename to ...
5430 (info_args_command): ... this.
5431 (_initialize_stack): Adjust.
5432 * symtab.c (sources_info): Rename to ...
5433 (info_sources_command): ... this.
5434 (variables_info): Rename to ...
5435 (info_variables_command): ... this.
5436 (functions_info): Rename to ...
5437 (info_functions_command): ... this.
5438 (types_info): Rename to ...
5439 (info_types_command): ... this.
5440 (_initialize_symtab): Adjust.
5441 * target.c (target_info): Rename to ...
5442 (info_target_command): ... this.
5443 (initialize_targets): Adjust.
5444 * tracepoint.c (tvariables_info): Rename to ...
5445 (info_tvariables_command): ... this.
5446 (scope_info): Rename to ...
5447 (info_scope_command): ... this.
5448 (trace_dump_actions): Adjust.
5449 (_initialize_tracepoint): Adjust.
5450
5451 2017-08-22 Tom Tromey <tom@tromey.com>
5452
5453 * breakpoint.h (install_breakpoint): Update.
5454 * breakpoint.c (add_solib_catchpoint): Update.
5455 (install_breakpoint): Change argument to a std::unique_ptr.
5456 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5457 (create_breakpoint_sal, create_breakpoint): Update.
5458 (watch_command_1, catch_exec_command_1)
5459 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5460 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5461 Return the breakpoint.
5462 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5463 (new_single_step_breakpoint): Update.
5464 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5465 std::unique_ptr.
5466 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5467 std::unique_ptr.
5468 * break-catch-sig.c (create_signal_catchpoint): Use
5469 std::unique_ptr.
5470 * ada-lang.c (create_ada_exception_catchpoint): Use
5471 std::unique_ptr.
5472
5473 2017-08-22 Tom Tromey <tom@tromey.com>
5474
5475 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5476
5477 2017-08-22 Tom Tromey <tom@tromey.com>
5478
5479 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5480 (lookup_partial_symbol): Update.
5481
5482 2017-08-22 Tom Tromey <tom@tromey.com>
5483
5484 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5485 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5486 (find_and_open_source, symtab_to_fullname): Update.
5487 * psymtab.c (psymtab_to_fullname): Update.
5488
5489 2017-08-22 Tom Tromey <tom@tromey.com>
5490
5491 * exec.c (exec_file_attach): Update.
5492 * linux-thread-db.c (try_thread_db_load): Update.
5493 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5494 * utils.c (gdb_realpath): Change return type.
5495 (gdb_realpath_keepfile): Update.
5496 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5497 (_initialize_utils): Register the new self test.
5498 * source.c (openp): Update.
5499 (find_and_open_source): Update.
5500 * nto-tdep.c (nto_find_and_open_solib): Update.
5501 * main.c (set_gdb_data_directory): Update.
5502 (captured_main_1): Update.
5503 * dwarf2read.c (dwarf2_get_dwz_file): Update
5504 (dw2_map_symbol_filenames): Update.
5505 * auto-load.c (auto_load_safe_path_vec_update): Update.
5506 (filename_is_in_auto_load_safe_path_vec): Change type of
5507 "filename_realp".
5508 (auto_load_objfile_script): Update.
5509 (file_is_auto_load_safe): Update. Use std::string.
5510 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5511
5512 2017-08-22 Tom Tromey <tom@tromey.com>
5513
5514 * utils.c (gdb_realpath_keepfile): Return a
5515 gdb::unique_xmalloc_ptr.
5516 * exec.c (exec_file_attach): Update.
5517 * utils.h (gdb_realpath_keepfile): Return a
5518 gdb::unique_xmalloc_ptr.
5519
5520 2017-08-22 Tom Tromey <tom@tromey.com>
5521
5522 * compile/compile.c (compile_file_command): Use
5523 gdb::unique_xmalloc_ptr, std::string.
5524 * utils.c (gdb_abspath): Change return type.
5525 * source.c (openp): Update.
5526 * objfiles.c (allocate_objfile): Update.
5527 * main.c (set_gdb_data_directory): Update.
5528 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5529
5530 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5531
5532 * cli-cmds.c (list_commands): List actual code around more than
5533 one location.
5534
5535 2017-08-21 John Baldwin <jhb@FreeBSD.org>
5536
5537 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5538
5539 2017-08-21 Pedro Alves <palves@redhat.com>
5540
5541 PR gdb/19487
5542 * c-exp.y (variable production): Handle function aliases.
5543 * minsyms.c (msymbol_is_text): New function.
5544 * minsyms.h (msymbol_is_text): Declare.
5545 * symtab.c (find_function_alias_target): New function.
5546 * symtab.h (find_function_alias_target): Declare.
5547
5548 2017-08-21 Pedro Alves <palves@redhat.com>
5549
5550 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5551 typedefs.
5552 * typeprint.c (whatis_exp): If handling "whatis", and expression
5553 is OP_TYPE, strip one typedef level. Otherwise don't strip
5554 typedefs here.
5555 * valops.c (value_cast): Save "to" type before resolving
5556 stubs/typedefs. Use that type as resulting value's type.
5557
5558 2017-08-18 Tom Tromey <tom@tromey.com>
5559 Pedro Alves <palves@redhat.com>
5560
5561 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5562 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5563 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5564 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5565 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5566 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5567 (linux_get_siginfo_data): Add "thread" argument. Use
5568 scoped_restore.
5569 * linux-nat.c (linux_child_follow_fork)
5570 (check_stopped_by_watchpoint): Use scoped_restore.
5571 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5572 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5573 (restore_inferior_ptid, save_inferior_ptid): Remove.
5574 * btrace.c (btrace_fetch): Use scoped_restore.
5575 * bsd-uthread.c (bsd_uthread_fetch_registers)
5576 (bsd_uthread_store_registers): Use scoped_restore.
5577 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5578 scoped_restore.
5579 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5580 (aix_thread_xfer_partial): Use scoped_restore.
5581 * inferior.h (save_inferior_ptid): Remove.
5582
5583 2017-08-18 Yao Qi <yao.qi@linaro.org>
5584
5585 PR tdep/21818
5586 * arm-tdep.c (gdb_print_insn_arm): Mark
5587 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5588
5589 2017-08-18 Yao Qi <yao.qi@linaro.org>
5590
5591 * NEWS: Mention GDBserver's new option "--selftest".
5592 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5593 * selftest.c: Move it to common/selftest.c.
5594 * selftest.h: Move it to common/selftest.h.
5595 * selftest-arch.c (reset): New function.
5596 (tests_with_arch): Call reset.
5597
5598 2017-08-18 Yao Qi <yao.qi@linaro.org>
5599
5600 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5601 instead of exception_fprintf and printf_filtered.
5602
5603 2017-08-18 Yao Qi <yao.qi@linaro.org>
5604
5605 * selftest.c (register_self_test): Rename it to
5606 selftests::register_test.
5607 (run_self_tests): selftest::run_tests.
5608 * selftest.h: Update declarations.
5609 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5610 selftests::register_test_foreach_arch.
5611 * selftest-arch.h: Update declaration.
5612 * aarch64-tdep.c: Update.
5613 * arm-tdep.c: Likewise.
5614 * disasm-selftests.c: Likewise.
5615 * dwarf2loc.c: Likewise.
5616 * dwarf2-frame.c: Likewise.
5617 * findvar.c: Likewise.
5618 * gdbarch-selftests.c: Likewise.
5619 * maint.c (maintenance_selftest): Likewise.
5620 * regcache.c: Likewise.
5621 * rust-exp.y: Likewise.
5622 * selftest-arch.c: Likewise.
5623 * unittests/environ-selftests.c: Likewise.
5624 * unittests/function-view-selftests.c: Likewise.
5625 * unittests/offset-type-selftests.c: Likewise.
5626 * unittests/optional-selftests.c: Likewise.
5627 * unittests/scoped_restore-selftests.c: Likewise.
5628 * utils-selftests.c: Likewise.
5629
5630 2017-08-17 Pedro Alves <palves@redhat.com>
5631
5632 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5633 local.
5634
5635 2017-08-17 Pedro Alves <palves@redhat.com>
5636
5637 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5638 field.
5639 (reset_die_in_process): Delete, replaced by ...
5640 (process_die_scope): ... this new class. Make it responsible for
5641 freeing cu->line_header too.
5642 (process_die): Use process_die_scope.
5643 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5644 cu->line_header_die_owner. Don't release the line header if it's
5645 owned by the CU.
5646 (setup_type_unit_groups): Make the CU/DIE own the line header.
5647 Don't release the line header here.
5648
5649 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5650
5651 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5652
5653 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5654
5655 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5656 Single-Key mode
5657
5658 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5659
5660 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5661 mode command list.
5662
5663 2017-08-15 Stafford Horne <shorne@gmail.com>
5664
5665 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5666
5667 2017-08-15 Stafford Horne <shorne@gmail.com>
5668
5669 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5670
5671 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5672
5673 PR gdb/21954
5674 * infcmd.c (unset_environment_command): Use the 'clear' method on
5675 the environment instead of resetting it.
5676
5677 2017-08-15 John Baldwin <jhb@FreeBSD.org>
5678
5679 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5680 platforms.
5681
5682 2017-08-14 Tom Tromey <tom@tromey.com>
5683
5684 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5685 (print_binary_chars): Likewise.
5686 (BITS_IN_BYTES): Remove.
5687
5688 2017-08-14 Tom Tromey <tom@tromey.com>
5689
5690 PR gdb/21675
5691 * valprint.c (LOW_ZERO): Change value to 034.
5692 (print_octal_chars): Add static_asserts for octal constants.
5693 * printcmd.c (print_scalar_formatted): Add 'd' case.
5694
5695 2017-08-11 Tom Tromey <tom@tromey.com>
5696
5697 * symfile.c (add_symbol_file_command): Use std::vector.
5698
5699 2017-08-14 Tom Tromey <tom@tromey.com>
5700
5701 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5702 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5703 std::move.
5704 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5705
5706 2017-08-11 Pedro Alves <palves@redhat.com>
5707
5708 * infrun.c (process_event_stop_test): Adjust
5709 function_name_is_marked_for_skip call.
5710 * skip.c: Include <list>.
5711 (skiplist_entry): Make it a class with private fields, and
5712 getters/setters.
5713 (skiplist_entry_chain): Delete.
5714 (skiplist_entries): New.
5715 (skiplist_entry_count): Delete.
5716 (highest_skiplist_entry_num): New.
5717 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5718 (add_skiplist_entry): Delete.
5719 (skiplist_entry::skiplist_entry): New.
5720 (skiplist_entry::add_entry): New.
5721 (skip_file_command, skip_function): Adjust.
5722 (compile_skip_regexp): Delete.
5723 (skip_command): Don't compile regexp here. Adjust to use
5724 skiplist_entry::add_entry.
5725 (skip_info): Adjust to use range-for and getters.
5726 (skip_enable_command, skip_disable_command): Adjust to use
5727 range-for and setters.
5728 (skip_delete_command): Adjust to use std::list.
5729 (add_skiplist_entry): Delete.
5730 (skip_file_p): Delete, refactored as ...
5731 (skiplist_entry::do_skip_file_p): ... this new method.
5732 (skip_gfile_p): Delete, refactored as ...
5733 (skiplist_entry::do_gskip_file_p): ... this new method.
5734 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5735 (skiplist_entry::skip_function_p): ... this new method.
5736 (function_name_is_marked_for_skip): Now returns bool, and takes
5737 the function sal by const reference. Adjust to use range-for and
5738 skiplist_entry methods.
5739 (_initialize_step_skip): Remove references to
5740 skiplist_entry_chain, skiplist_entry_count.
5741 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5742 takes the function sal by const reference.
5743
5744 2017-08-11 Yao Qi <yao.qi@linaro.org>
5745
5746 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5747 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5748 (dwarf2_frame_cache):
5749 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5750 RETURN_MASK_ALL and set *this_case to NULL.
5751 * frame-unwind.h: Update comments.
5752
5753 2017-08-11 Yao Qi <yao.qi@linaro.org>
5754
5755 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5756 (dwarf2_frame_state_copy_regs): Remove.
5757 (dwarf2_frame_state_free_regs): Remove.
5758 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5759 (dwarf2_restore_rule): Call method .alloc_regs instead of
5760 dwarf2_frame_state_alloc_regs.
5761 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5762 constructor. Call std::move.
5763 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5764 (dwarf2_frame_cache): Likewise.
5765
5766 [GDB_SELF_TEST]: Include selftest.h and
5767 selftest-arch.h.
5768 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5769 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5770 execute_cfa_program_test.
5771
5772 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5773 copy ctor, assignment operator, move assignment.
5774 <alloc_regs>: New method.
5775 <swap>: New method.
5776 (struct dwarf2_frame_state): Delete dtor.
5777 (dwarf2_frame_state_alloc_regs): Remove declaration.
5778 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5779 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5780
5781 2017-08-11 Yao Qi <yao.qi@linaro.org>
5782
5783 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5784 (dwarf2_frame_state::dwarf2_frame_state): New.
5785 (dwarf2_frame_state::~dwarf2_frame_state): New.
5786 (dwarf2_fetch_cfa_info): Update.
5787 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5788 rather than a pointer. Update code.
5789 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5790 dtor.
5791 <data_align, code_align, retaddr_column>: Change them to const.
5792 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5793 to bool.
5794
5795 2017-08-11 Yao Qi <yao.qi@linaro.org>
5796
5797 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5798 <loc.exp>: New field.
5799 * dwarf2-frame.c (execute_cfa_program): Update.
5800 (dwarf2_frame_prev_register): Update.
5801
5802 2017-08-10 Pedro Alves <palves@redhat.com>
5803
5804 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5805
5806 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5807
5808 * fbsd-nat.c (struct fbsd_fork_info): Remove.
5809 (fbsd_pending_children): Use std::list.
5810 (fbsd_remember_child): Likewise.
5811 (fbsd_is_child_pending): Likewise.
5812 (fbsd_pending_vfork_done): Use std::forward_list.
5813 (fbsd_add_vfork_done): Likewise.
5814 (fbsd_is_vfork_done_pending): Likewise.
5815 (fbsd_next_vfork_done): Likewise.
5816
5817 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5818
5819 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
5820 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
5821 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
5822 for `mapfilename'.
5823 (fbsd_xfer_partial): Use gdb::byte_vector.
5824 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
5825
5826 2017-08-09 John Baldwin <jhb@FreeBSD.org>
5827
5828 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
5829 "filestuff.h".
5830 (fbsd_find_memory_regions): Fix `mapfile' initialization.
5831
5832 2017-08-09 Tom Tromey <tom@tromey.com>
5833
5834 * skip.c (skiplist_entry): New constructor.
5835 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
5836 (skiplist_entry::file_is_glob): Now bool.
5837 (skiplist_entry::file, skiplist_entry::function): Now
5838 std::string.
5839 (make_skip_entry): Return a unique_ptr. Use new.
5840 (free_skiplist_entry, free_skiplist_entry_cleanup)
5841 (make_free_skiplist_entry_cleanup): Remove.
5842 (skip_command, skip_disable_command, add_skiplist_entry)
5843 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
5844 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
5845 (function_name_is_marked_for_skip): Update.
5846 (skip_delete_command): Update. Use delete.
5847
5848 2017-08-09 Jiong Wang <jiong.wang@arm.com>
5849
5850 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
5851 (aarch64_linux_core_read_description): New function.
5852 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
5853
5854 2017-08-09 Pedro Alves <palves@redhat.com>
5855
5856 * cp-name-parser.y (cp_comp_to_string): Return a
5857 gdb::unique_xmalloc_ptr<char>.
5858 * cp-support.c (replace_typedefs_qualified_name)
5859 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
5860 (cp_canonicalize_string_full): Use op= instead of explicit
5861 convertion.
5862 (cp_class_name_from_physname, method_name_from_physname)
5863 (cp_func_name, cp_remove_params): Adjust to use
5864 gdb::unique_xmalloc_ptr<char>.
5865 * cp-support.h (cp_comp_to_string): Return a
5866 gdb::unique_xmalloc_ptr<char>.
5867 * python/py-type.c (typy_lookup_type): Adjust to use
5868 gdb::unique_xmalloc_ptr<char>.
5869
5870 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
5871
5872 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
5873
5874 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
5875 Yao Qi <yao.qi@linaro.org>
5876
5877 * cp-support.c (cp_canonicalize_string_full): Use
5878 gdb::unique_xmalloc_ptr<char>.
5879 (cp_canonicalize_string): Likewise.
5880
5881 2017-08-09 Yao Qi <yao.qi@linaro.org>
5882
5883 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
5884 * regformats/i386/amd64-avx-avx512.dat: Remove.
5885 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
5886 * regformats/i386/amd64-avx-mpx.dat:Remove.
5887 * regformats/i386/amd64-avx.dat: Remove.
5888 * regformats/i386/amd64-mpx.dat: Remove.
5889 * regformats/i386/i386-avx-avx512.dat: Remove.
5890 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
5891 * regformats/i386/i386-avx-mpx.dat: Remove.
5892 * regformats/i386/i386-mmx.dat: Remove.
5893 * regformats/i386/i386-mpx.dat: Remove.
5894
5895 2017-08-09 Yao Qi <yao.qi@linaro.org>
5896
5897 * amd64-tdep.h (tdesc_x32): Remove the declaration.
5898 * amd64-tdep.c: Don't include features/i386/x32*.c.
5899 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
5900 functions.
5901 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
5902 and i386/x32-avx-avx512.
5903 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
5904 and i386/x32.xml.
5905 * features/i386/x32-avx-avx512.c: Removed.
5906 * features/i386/x32-avx-avx512.xml: Removed.
5907 * features/i386/x32-avx.c: Removed.
5908 * features/i386/x32-avx.xml: Removed.
5909 * features/i386/x32.c: Removed.
5910 * features/i386/x32.xml: Removed.
5911 * regformats/i386/x32-avx-avx512.dat: Removed.
5912 * regformats/i386/x32-avx.dat: Removed.
5913 * regformats/i386/x32.dat: Removed.
5914
5915 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5916
5917 PR breakpoints/21886
5918 * mem-break.c (default_memory_insert_breakpoint): Use
5919 `->placed_address' rather than `->reqstd_address' for the
5920 breakpoint location.
5921
5922 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5923
5924 * arch-utils.c (default_print_insn): Remove arch/mach/endian
5925 assertions.
5926
5927 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
5928
5929 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
5930 a union of `tdep_info', `tdesc_data' and `id'.
5931 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
5932 rather than `info.tdep_info'.
5933 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
5934 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
5935 * i386-tdep.c (i386_gdbarch_init): Likewise.
5936 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
5937 * mips-tdep.c (mips_gdbarch_init): Likewise.
5938 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
5939 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
5940 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
5941 `info.tdep_info'.
5942 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
5943 `info.tdep_info'.
5944 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
5945 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
5946 `info.tdep_info'.
5947 * spu-tdep.c (spu_gdbarch_init): Likewise.
5948 * gdbarch.h: Regenerate.
5949
5950 2017-08-07 Leszek Swirski <leszeks@google.com>
5951
5952 PR symtab/20899
5953 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
5954
5955 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
5956
5957 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
5958 (gdbsim_open): Rename gdb_argv args object to argv.
5959
5960 2017-08-05 Tom Tromey <tom@tromey.com>
5961
5962 * compile/compile-object-load.c (compile_object_load): Use
5963 gdb::unique_xmalloc_ptr.
5964 * cli/cli-dump.c (scan_filename): Rename from
5965 scan_filename_with_cleanup. Change return type.
5966 (scan_expression): Rename from scan_expression_with_cleanup.
5967 Change return type.
5968 (dump_memory_to_file, dump_value_to_file, restore_command):
5969 Use gdb::unique_xmalloc_ptr. Update.
5970 * cli/cli-cmds.c (find_and_open_script): Use
5971 gdb::unique_xmalloc_ptr.
5972 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
5973 * symmisc.c (maintenance_print_symbols)
5974 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
5975 * symfile.c (symfile_bfd_open, generic_load)
5976 (add_symbol_file_command, remove_symbol_file_command): Use
5977 gdb::unique_xmalloc_ptr.
5978 * source.c (openp): Use gdb::unique_xmalloc_ptr.
5979 * psymtab.c (maintenance_print_psymbols): Use
5980 gdb::unique_xmalloc_ptr.
5981 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
5982 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
5983 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
5984 (reload_shared_libraries_1): Likewise.
5985
5986 2017-08-05 Tom Tromey <tom@tromey.com>
5987
5988 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
5989 (rust_op_vector, rust_set_vector): New typedefs.
5990 (current_parser): New global.
5991 (work_obstack): Change to pointer type. Update all users.
5992 (rust_ast, pstate): Remove globals.
5993 (struct rust_parser): New.
5994 (%union) <params, field_inits>: Change type.
5995 (start, tuple_expr, unit_expr, struct_expr_list, literal)
5996 (field_expr, expr_list, maybe_expr_list, type_list): Update.
5997 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
5998 (convert_params_to_types, convert_params_to_expression): Change
5999 type of "params".
6000 (ast_string): Change type of "fields".
6001 (rust_parse): Make a rust_parser. Remove cleanups.
6002 (rust_lex_tests): Make and install an auto_obstack.
6003
6004 2017-08-04 Yao Qi <yao.qi@linaro.org>
6005
6006 * configure.srv (ipa_x32_linux_regobj): New.
6007 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6008 instead of X86_TDESC_AVX512.
6009 (initialize_low_tracepoint): Call
6010 init_registers_x32_avx_avx512_linux.
6011
6012 2017-08-04 Yao Qi <yao.qi@linaro.org>
6013
6014 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6015
6016 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6017
6018 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6019
6020 2017-08-03 Tom Tromey <tom@tromey.com>
6021
6022 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6023 Remove.
6024 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6025
6026 2017-08-03 Tom Tromey <tom@tromey.com>
6027
6028 * python/py-param.c (compute_enum_values): Use gdb_argv.
6029
6030 2017-08-03 Tom Tromey <tom@tromey.com>
6031
6032 * utils.h (struct gdb_argv_deleter): New.
6033 (gdb_argv): New class.
6034 * utils.c (gdb_argv::reset): New method.
6035 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6036 * tracefile.c (tsave_command): Use gdb_argv.
6037 * top.c (new_ui_command): Use gdb_argv.
6038 * symmisc.c (maintenance_print_symbols)
6039 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6040 * symfile.c (symbol_file_command, generic_load)
6041 (remove_symbol_file_command): Use gdb_argv.
6042 * stack.c (backtrace_command): Use gdb_argv.
6043 * source.c (add_path, show_substitute_path_command)
6044 (unset_substitute_path_command, set_substitute_path_command):
6045 Use gdb_argv.
6046 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6047 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6048 * remote.c (extended_remote_run, remote_put_command)
6049 (remote_get_command, remote_delete_command): Use gdb_argv.
6050 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6051 (gdbsim_open): Use gdb_argv.
6052 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6053 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6054 * procfs.c (procfs_info_proc): Use gdb_argv.
6055 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6056 * infrun.c (handle_command): Use gdb_argv.
6057 * inferior.c (add_inferior_command, clone_inferior_command):
6058 Use gdb_argv.
6059 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6060 * exec.c (exec_file_command): Use gdb_argv.
6061 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6062 * compile/compile.c (build_argc_argv): Use gdb_argv.
6063
6064 2017-08-03 Tom Tromey <tom@tromey.com>
6065
6066 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6067
6068 2017-08-03 Tom Tromey <tom@tromey.com>
6069
6070 * python/python.c (compute_python_string): Return std::string.
6071 (gdbpy_eval_from_control_command): Update.
6072 (do_start_initialization): Use std::string.
6073 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6074 xstrprintf.
6075 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6076 xstrprintf.
6077
6078 2017-08-03 Tom Tromey <tom@tromey.com>
6079
6080 * top.h (do_restore_instream_cleanup): Remove.
6081 * top.c (do_restore_instream_cleanup): Remove.
6082 (read_command_file): Use scoped_restore.
6083 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6084
6085 2017-08-03 Tom Tromey <tom@tromey.com>
6086
6087 * cli/cli-script.c (execute_user_command)
6088 (execute_control_command): Use scoped_restore.
6089
6090 2017-08-03 Tom Tromey <tom@tromey.com>
6091
6092 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6093 (execute_user_command): Remove user_call_depth; use
6094 user_args_stack's size instead.
6095
6096 2017-08-03 Tom Tromey <tom@tromey.com>
6097
6098 * top.h (in_user_command): Remove.
6099 * top.c (in_user_command): Remove.
6100 * cli/cli-script.c (do_restore_user_call_depth)
6101 (execute_user_command): Update.
6102
6103 2017-08-03 Tom Tromey <tom@tromey.com>
6104
6105 * valops.c (search_struct_method): Use gdb::byte_vector.
6106 * valarith.c (value_concat): Use std::vector.
6107 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6108 (simple_search_memory): Likewise.
6109 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6110 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6111 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6112 * elfread.c (elf_rel_plt_read): Use std::string.
6113 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6114 * cli/cli-dump.c (restore_section_callback): Use
6115 gdb::byte_vector.
6116
6117 2017-08-03 Tom Tromey <tom@tromey.com>
6118
6119 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6120
6121 2017-08-03 Tom Tromey <tom@tromey.com>
6122
6123 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6124 (tui_register_format): Use scoped_restore.
6125
6126 2017-08-03 Tom Tromey <tom@tromey.com>
6127
6128 * reverse.c (exec_direction_default): Remove.
6129 (exec_reverse_once): Use scoped_restore.
6130 * remote.c (restore_remote_timeout): Remove.
6131 (remote_flash_erase, remote_flash_write, remote_flash_done)
6132 (readchar, remote_serial_write): Use scoped_restore.
6133 * cli/cli-script.c (struct source_cleanup_lines_args)
6134 (source_cleanup_lines): Remove.
6135 (script_from_file): Use scoped_restore.
6136 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6137 (source_command): Use scoped_restore.
6138
6139 2017-08-03 Tom Tromey <tom@tromey.com>
6140
6141 * utils.h (make_cleanup_free_so): Remove.
6142 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6143 * solist.h (struct so_deleter): New.
6144 (so_list_up): New typedef.
6145 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6146
6147 2017-08-03 Tom Tromey <tom@tromey.com>
6148
6149 * utils.h (make_cleanup_restore_current_language): Remove.
6150 * utils.c (do_restore_current_language)
6151 (make_cleanup_restore_current_language): Remove.
6152 * parse.c (parse_exp_in_context_1)
6153 (parse_expression_with_language): Use
6154 scoped_restore_current_language.
6155 * mi/mi-main.c (mi_cmd_execute): Use
6156 scoped_restore_current_language.
6157 * language.h (scoped_restore_current_language): New class.
6158
6159 2017-08-03 Tom Tromey <tom@tromey.com>
6160
6161 * compile/compile.c (cleanup_unlink_file): Remove.
6162 (compile_to_object): Use gdb::unlinker.
6163 (eval_compile_command): Likewise.
6164
6165 2017-08-03 Tom Tromey <tom@tromey.com>
6166
6167 * utils.h (make_cleanup_fclose): Remove.
6168 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6169
6170 2017-08-03 Tom Tromey <tom@tromey.com>
6171
6172 * top.c (open_terminal_stream): Return gdb_file_up.
6173 (new_ui_command): Update.
6174
6175 2017-08-03 Tom Tromey <tom@tromey.com>
6176
6177 * source.c (print_source_lines_base, forward_search_command)
6178 (reverse_search_command): Use gdb_file_up.
6179
6180 2017-08-03 Tom Tromey <tom@tromey.com>
6181
6182 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6183
6184 2017-08-03 Tom Tromey <tom@tromey.com>
6185
6186 * cli/cli-cmds.c (find_and_open_script): Change return type.
6187 Remove "streamp" and "full_path" parameters.
6188 (source_script_with_search): Update.
6189 * auto-load.c (source_script_file): Update.
6190 * cli/cli-cmds.h (find_and_open_script): Change type.
6191 (open_script): New struct.
6192
6193 2017-08-03 Tom Tromey <tom@tromey.com>
6194
6195 * xml-support.c (xml_fetch_content_from_file): Update.
6196 * ui-file.c (stdio_file::open): Update.
6197 * tracefile-tfile.c (tfile_start): Update.
6198 * remote.c (remote_file_put, remote_file_get): Update.
6199 * nat/linux-procfs.c (linux_proc_get_int)
6200 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6201 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6202 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6203 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6204 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6205 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6206 * linux-nat.c (linux_proc_pending_signals): Update.
6207 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6208 (file_closer): Remove.
6209 * compile/compile.c (compile_to_object): Update.
6210 * common/filestuff.h (struct gdb_file_deleter): New.
6211 (gdb_file_up): New typedef.
6212 (gdb_fopen_cloexec): Change return type.
6213 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6214 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6215 (dump_binary_file, restore_binary_file): Update.
6216 * auto-load.c (auto_load_objfile_script_1): Update.
6217
6218 2017-08-03 Tom Tromey <tom@tromey.com>
6219
6220 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6221 (info_static_tracepoint_markers_command): Likewise.
6222 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6223 * skip.c (skip_info): Use ui_out_emit_table.
6224 * progspace.c (print_program_space): Use ui_out_emit_table.
6225 * osdata.c (info_osdata): Use ui_out_emit_table.
6226 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6227 ui_out_emit_table.
6228 * linux-thread-db.c (info_auto_load_libthread_db): Use
6229 ui_out_emit_table.
6230 * inferior.c (print_inferior): Use ui_out_emit_table.
6231 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6232 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6233 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6234 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6235 * ui-out.h (class ui_out_emit_table): New.
6236
6237 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6238
6239 * mips-tdep.c (mips_fpu_type_str): New function.
6240 (mips_dump_tdep): Call it.
6241
6242 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6243
6244 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6245 `->mips_fpu_type'.
6246
6247 2017-07-31 Xavier Roirand <roirand@adacore.com>
6248
6249 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6250
6251 2017-07-27 Xavier Roirand <roirand@adacore.com>
6252
6253 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6254
6255 2017-07-26 Yao Qi <yao.qi@linaro.org>
6256
6257 * cli/cli-cmds.c (maintenancechecklist): New variable.
6258 * gdbcmd.h (maintenancechecklist): Declare it.
6259 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6260 Call i386_linux_read_description with different masks.
6261 * maint.c (maintenance_check_command): New function.
6262 (_initialize_maint_cmds): Call add_prefix_cmd.
6263 * target-descriptions.c (tdesc_reg): override operator != and ==.
6264 (tdesc_type): Likewise.
6265 (tdesc_feature): Likewise.
6266 (target_desc): Likewise.
6267 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6268 (maintenance_check_xml_descriptions): New function.
6269 (_initialize_target_descriptions) Add command "xml-descriptions".
6270 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6271
6272 2017-07-26 Yao Qi <yao.qi@linaro.org>
6273
6274 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6275 Include features/i386/32bit-*.c.
6276 (i386_linux_read_description): Generate target description if it
6277 doesn't exist.
6278 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6279 functions.
6280 * features/i386/32bit-linux.c: Re-generated.
6281 * features/i386/32bit-sse.c: Likewise.
6282 * target-descriptions.c (print_c_feature::visit): Print code to
6283 set register number if needed.
6284 (print_c_feature) <m_next_regnum>: New field.
6285
6286 2017-07-26 Yao Qi <yao.qi@linaro.org>
6287
6288 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6289 (FEATURE_XMLFILES): New.
6290 (FEATURE_CFILES): New.
6291 New rules.
6292 (clean-cfiles): Remove generated c files.
6293 * features/i386/32bit-avx.c: Generated.
6294 * features/i386/32bit-avx512.c: Generated.
6295 * features/i386/32bit-core.c: Generated.
6296 * features/i386/32bit-linux.c: Generated.
6297 * features/i386/32bit-mpx.c: Generated.
6298 * features/i386/32bit-pkeys.c: Generated.
6299 * features/i386/32bit-sse.c: Generated.
6300 * target-descriptions.c: Include algorithm.
6301 (tdesc_element_visitor): Add method visit_end.
6302 (print_c_tdesc): Implement visit_end.
6303 (print_c_tdesc:: m_filename_after_features): Move it to
6304 protected.
6305 (print_c_feature): New class.
6306 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6307 name starts with "i386/32bit-".
6308
6309 2017-07-26 Yao Qi <yao.qi@linaro.org>
6310
6311 * target-descriptions.c (tdesc_element_visitor): New class.
6312 (tdesc_element): New class.
6313 (tdesc_reg): Inherit from tdesc_element.
6314 (tdesc_reg::accept): New function.
6315 (tdesc_type): Inherit from tdesc_element.
6316 (tdesc_type::accept): New function.
6317 (tdesc_feature): Inherit from tdesc_element.
6318 (tdesc_feature::accept): New function.
6319 (target_desc): Inherit from tdesc_element.
6320 (target_desc::target_desc): New.
6321 (target_desc::~target_desc): New.
6322 (target_desc::accept): New.
6323 (allocate_target_description): Use new.
6324 (free_target_description): Use delete.
6325 (print_c_tdesc): New class.
6326 (maint_print_c_tdesc_cmd): Adjust.
6327
6328 * features/aarch64.c: Re-generated.
6329 * features/arc-arcompact.c: Re-generated.
6330 * features/arc-v2.c: Re-generated.
6331 * features/arm/arm-with-iwmmxt.c: Re-generated.
6332 * features/arm/arm-with-m.c: Re-generated.
6333 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6334 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6335 * features/arm/arm-with-neon.c: Re-generated.
6336 * features/arm/arm-with-vfpv2.c: Re-generated.
6337 * features/arm/arm-with-vfpv3.c: Re-generated.
6338 * features/i386/amd64-avx-avx512.c: Re-generated.
6339 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6340 * features/i386/amd64-avx.c: Re-generated.
6341 * features/i386/amd64-avx-linux.c: Re-generated.
6342 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6343 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6344 * features/i386/amd64-avx-mpx.c: Re-generated.
6345 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6346 * features/i386/amd64.c: Re-generated.
6347 * features/i386/amd64-linux.c: Re-generated.
6348 * features/i386/amd64-mpx.c: Re-generated.
6349 * features/i386/amd64-mpx-linux.c: Re-generated.
6350 * features/i386/i386-avx-avx512.c: Re-generated.
6351 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6352 * features/i386/i386-avx.c: Re-generated.
6353 * features/i386/i386-avx-linux.c: Re-generated.
6354 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6355 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6356 * features/i386/i386-avx-mpx.c: Re-generated.
6357 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6358 * features/i386/i386.c: Re-generated.
6359 * features/i386/i386-linux.c: Re-generated.
6360 * features/i386/i386-mmx.c: Re-generated.
6361 * features/i386/i386-mmx-linux.c: Re-generated.
6362 * features/i386/i386-mpx.c: Re-generated.
6363 * features/i386/i386-mpx-linux.c: Re-generated.
6364 * features/i386/x32-avx-avx512.c: Re-generated.
6365 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6366 * features/i386/x32-avx.c: Re-generated.
6367 * features/i386/x32-avx-linux.c: Re-generated.
6368 * features/i386/x32.c: Re-generated.
6369 * features/i386/x32-linux.c: Re-generated.
6370 * features/microblaze.c: Re-generated.
6371 * features/microblaze-with-stack-protect.c: Re-generated.
6372 * features/mips64-dsp-linux.c: Re-generated.
6373 * features/mips64-linux.c: Re-generated.
6374 * features/mips-dsp-linux.c: Re-generated.
6375 * features/mips-linux.c: Re-generated.
6376 * features/nds32.c: Re-generated.
6377 * features/nios2.c: Re-generated.
6378 * features/nios2-linux.c: Re-generated.
6379 * features/rs6000/powerpc-32.c: Re-generated.
6380 * features/rs6000/powerpc-32l.c: Re-generated.
6381 * features/rs6000/powerpc-403.c: Re-generated.
6382 * features/rs6000/powerpc-403gc.c : Re-generated.
6383 * features/rs6000/powerpc-405.c: Re-generated.
6384 * features/rs6000/powerpc-505.c: Re-generated.
6385 * features/rs6000/powerpc-601.c: Re-generated.
6386 * features/rs6000/powerpc-602.c: Re-generated.
6387 * features/rs6000/powerpc-603.c: Re-generated.
6388 * features/rs6000/powerpc-604.c: Re-generated.
6389 * features/rs6000/powerpc-64.c: Re-generated.
6390 * features/rs6000/powerpc-64l.c: Re-generated.
6391 * features/rs6000/powerpc-7400.c: Re-generated.
6392 * features/rs6000/powerpc-750.c: Re-generated.
6393 * features/rs6000/powerpc-860.c: Re-generated.
6394 * features/rs6000/powerpc-altivec32.c: Re-generated.
6395 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6396 * features/rs6000/powerpc-altivec64.c: Re-generated.
6397 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6398 * features/rs6000/powerpc-cell32l.c: Re-generated.
6399 * features/rs6000/powerpc-cell64l.c: Re-generated.
6400 * features/rs6000/powerpc-e500.c: Re-generated.
6401 * features/rs6000/powerpc-e500l.c: Re-generated.
6402 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6403 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6404 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6405 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6406 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6407 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6408 * features/rs6000/powerpc-vsx32.c: Re-generated.
6409 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6410 * features/rs6000/powerpc-vsx64.c: Re-generated.
6411 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6412 * features/rs6000/rs6000.c: Re-generated.
6413 * features/s390-linux32.c: Re-generated.
6414 * features/s390-linux32v1.c: Re-generated.
6415 * features/s390-linux32v2.c: Re-generated.
6416 * features/s390-linux64.c: Re-generated.
6417 * features/s390-linux64v1.c: Re-generated.
6418 * features/s390-linux64v2.c: Re-generated.
6419 * features/s390-te-linux64.c: Re-generated.
6420 * features/s390-tevx-linux64.c: Re-generated.
6421 * features/s390-vx-linux64.c: Re-generated.
6422 * features/s390x-linux64.c: Re-generated.
6423 * features/s390x-linux64v1.c: Re-generated.
6424 * features/s390x-linux64v2.c: Re-generated.
6425 * features/s390x-te-linux64.c: Re-generated.
6426 * features/s390x-tevx-linux64.c: Re-generated.
6427 * features/s390x-vx-linux64.c: Re-generated.
6428 * features/sparc/sparc32-solaris.c: Re-generated.
6429 * features/sparc/sparc64-solaris.c: Re-generated.
6430 * features/tic6x-c62x.c: Re-generated.
6431 * features/tic6x-c62x-linux.c: Re-generated.
6432 * features/tic6x-c64x.c: Re-generated.
6433 * features/tic6x-c64x-linux.c: Re-generated.
6434 * features/tic6x-c64xp.c: Re-generated.
6435 * features/tic6x-c64xp-linux.c: Re-generated.
6436
6437 2017-07-26 Yao Qi <yao.qi@linaro.org>
6438
6439 * i386-linux-tdep.c (i386_linux_read_description): New function.
6440 (i386_linux_core_read_description): Call
6441 i386_linux_read_description.
6442 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6443 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6444 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6445 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6446 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6447 * x86-linux-nat.c (x86_linux_read_description): Call
6448 i386_linux_read_description.
6449
6450 2017-07-26 Yao Qi <yao.qi@linaro.org>
6451
6452 * NEWS: Mention it.
6453 * features/Makefile (%.c: %.xml): Pass the xml file name to
6454 command "maint print c-tdesc".
6455 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6456 name from 'arg'.
6457
6458 2017-07-26 Yao Qi <yao.qi@linaro.org>
6459
6460 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6461 in-class initialization.
6462 (tdesc_create_feature): Call new instead of XCNEW.
6463 (free_target_description): Ue delete.
6464
6465 2017-07-25 John Baldwin <jhb@FreeBSD.org>
6466
6467 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6468
6469 2017-07-25 Yao Qi <yao.qi@linaro.org>
6470
6471 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6472 constant.
6473 (amd64_x32_init_abi): Likewise.
6474 * amd64-tdep.h (amd64_init_abi): Update declaration.
6475 (amd64_x32_init_abi): Likewise.
6476
6477 2017-07-25 Yao Qi <yao.qi@linaro.org>
6478
6479 PR tdep/21717
6480 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6481 condition for FPSCR.
6482 (arm_linux_store_inferior_registers): Likewise.
6483
6484 2017-07-22 Tom Tromey <tom@tromey.com>
6485
6486 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6487 <syscalls_counts>: Now a std::vector.
6488 (get_catch_syscall_inferior_data): Use "new".
6489 (catch_syscall_inferior_data_cleanup): Use "delete".
6490 (insert_catch_syscall, remove_catch_syscall)
6491 (clear_syscall_counts): Update.
6492
6493 2017-07-22 Tom Tromey <tom@tromey.com>
6494
6495 * break-catch-syscall.c (syscall_catchpoint)
6496 <syscalls_to_be_caught>: Now a std::vector<int>
6497 (~syscall_catchpoint): Remove.
6498 (insert_catch_syscall, remove_catch_syscall)
6499 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6500 (print_mention_catch_syscall, print_recreate_catch_syscall):
6501 Update.
6502 (create_syscall_event_catchpoint): Change type of "filter"
6503 parameter.
6504 (catch_syscall_split_args): Return a std::vector.
6505 (catch_syscall_command_1, catching_syscall_number_1): Update.
6506
6507 2017-07-22 Tom Tromey <tom@tromey.com>
6508
6509 * break-catch-throw.c (struct exception_catchpoint)
6510 <exception_rx>: Now a std::string.
6511 (~exception_catchpoint): Remove.
6512 (print_one_detail_exception_catchpoint): Update.
6513 (handle_gnu_v3_exceptions): Change type of except_rx.
6514 (extract_exception_regexp): Return a std::string.
6515 (catch_exception_command_1): Update.
6516
6517 2017-07-22 Tom Tromey <tom@tromey.com>
6518
6519 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6520 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6521 std::vector.
6522 <catch_all>: Now a bool.
6523 (~signal_catchpoint): Remove.
6524 (signal_catchpoint_insert_location)
6525 (signal_catchpoint_remove_location)
6526 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6527 (signal_catchpoint_print_mention)
6528 (signal_catchpoint_print_recreate)
6529 (signal_catchpoint_explains_signal): Update.
6530 (create_signal_catchpoint): Change type of "filter" and
6531 "catch_all".
6532 (catch_signal_split_args): Return a std::vector. Change type of
6533 "catch_all".
6534 (catch_signal_command): Update.
6535
6536 2017-07-20 Pedro Alves <palves@redhat.com>
6537
6538 * ada-lang.c (ada_language_defn): Make extern.
6539 (_initialize_ada_language): Remove add_language call.
6540 * c-lang.c (c_language_defn, cplus_language_defn)
6541 (asm_language_defn, minimal_language_defn): Make extern.
6542 (_initialize_c_language): Delete.
6543 * completer.c (compare_cstrings): Delete, moved to utils.h.
6544 * d-lang.c (d_language_defn): Make extern.
6545 (_initialize_d_language): Remove add_language calls.
6546 * defs.h (enum language): Add comment.
6547 * f-lang.c (f_language_defn): Make extern.
6548 (_initialize_f_language): Remove add_language call.
6549 * go-lang.c (go_language_defn): Make extern.
6550 (_initialize_go_language): Remove add_language call.
6551 * language.c: Include <algorithm>.
6552 (languages): Redefine as const array.
6553 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6554 (set_language_command): Handle "local". Use for-range loop.
6555 (set_language): Remove loop.
6556 (language_enum): Rewrite.
6557 (language_def, language_str): Remove loops.
6558 (add_language): Delete.
6559 (add_set_language_command): New, based on add_languages.
6560 (skip_language_trampoline): Adjust.
6561 (local_language_defn): Delete.
6562 (language_gdbarch_post_init): Adjust.
6563 (_initialize_language): Remove add_language calls. Call
6564 add_set_language_command.
6565 * language.h (add_language): Delete.
6566 (auto_language_defn)
6567 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6568 (asm_language_defn, c_language_defn, cplus_language_defn)
6569 (d_language_defn, f_language_defn, go_language_defn)
6570 (m2_language_defn, objc_language_defn, opencl_language_defn)
6571 (pascal_language_defn, rust_language_defn): Declare.
6572 * m2-lang.c (m2_language_defn): Make extern.
6573 (_initialize_m2_language): Remove add_language call.
6574 * objc-lang.c (objc_language_defn): Make extern.
6575 (_initialize_objc_language): Remove add_language call.
6576 * opencl-lang.c (opencl_language_defn): Make extern.
6577 (_initialize_opencl_language): Remove add_language call.
6578 * p-lang.c (pascal_language_defn): Make extern.
6579 (_initialize_pascal_language): Delete.
6580 * rust-lang.c (rust_language_defn): Make extern.
6581 (_initialize_rust_language): Delete.
6582 * utils.h (compare_cstrings): New static inline function.
6583
6584 2017-07-20 Pedro Alves <palves@redhat.com>
6585
6586 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6587 (get_var_value): Constify parameters.
6588 (get_int_var_value): Change prototype.
6589 (to_fixed_range_type): Adjust.
6590 * ada-lang.h (get_int_var_value): Change prototype.
6591
6592 2017-07-20 Pedro Alves <palves@redhat.com>
6593
6594 * dwarf2read.c (dw2_lookup_symbol): Use
6595 SYMBOL_MATCHES_SEARCH_NAME.
6596 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6597
6598 2017-07-20 Pedro Alves <palves@redhat.com>
6599
6600 * block.c (block_iter_name_step, block_iter_name_first)
6601 (block_iter_name_next): Delete.
6602 (block_lookup_symbol_primary): Adjust to use
6603 dict_iter_match_first/dict_iter_match_next.
6604 * block.h (block_iter_name_first, block_iter_name_next): Delete
6605 declarations.
6606 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6607 dict_iter_match_first/dict_iter_match_next.
6608
6609 2017-07-20 Pedro Alves <palves@redhat.com>
6610
6611 * cp-support.c (cp_find_first_component_aux): Add missing case for
6612 end of string.
6613
6614 2017-07-18 David Blaikie <dblaikie@gmail.com>
6615
6616 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6617 of dwo_cu's dwo_file.
6618
6619 2017-07-18 Yao Qi <yao.qi@linaro.org>
6620
6621 * remote.c (store_registers_using_G): Remove one line comment.
6622
6623 2017-07-18 Yao Qi <yao.qi@linaro.org>
6624
6625 * regcache.c (regcache_cpy): Simplify it.
6626 (regcache::cpy_no_passthrough): Remove it.
6627 * regcache.h (cpy_no_passthrough): Remove it.
6628 (regcache_dup, regcache_cpy): Update comments.
6629
6630 2017-07-18 Pedro Alves <palves@redhat.com>
6631
6632 * remote-sim.c (sim_command_completer): Adjust to work with a
6633 completion_tracker instead of a VEC.
6634
6635 2017-07-17 Pedro Alves <palves@redhat.com>
6636
6637 * completer.c (complete_source_filenames): New function.
6638 (complete_address_and_linespec_locations): New function.
6639 (location_completer): Use complete_address_and_linespec_locations.
6640 (completion_tracker::build_completion_result): Honor the tracker's
6641 request to suppress append.
6642 * completer.h (completion_tracker::suppress_append_ws)
6643 (completion_tracker::set_suppress_append_ws): New methods.
6644 (completion_tracker::m_suppress_append_ws): New field.
6645 (complete_source_filenames): New declaration.
6646 * linespec.c (linespec_complete_what): New.
6647 (struct ls_parser) <complete_what, completion_word,
6648 completion_quote_char, completion_quote_end, completion_tracker>:
6649 New fields.
6650 (string_find_incomplete_keyword_at_end): New.
6651 (linespec_lexer_lex_string): Record quote char. If in completion
6652 mode, don't throw.
6653 (linespec_lexer_consume_token): Advance the completion word point.
6654 (linespec_lexer_peek_token): Save/restore completion info.
6655 (save_stream_and_consume_token): New.
6656 (set_completion_after_number): New.
6657 (linespec_parse_basic): Set what to complete next depending on
6658 token. Handle function and label completions specially.
6659 (parse_linespec): Disable objc shortcut in completion mode. Set
6660 what to complete next depending on token type. Skip keyword if in
6661 completion mode.
6662 (complete_linespec_component, linespec_complete): New.
6663 * linespec.h (linespec_complete): Declare.
6664
6665 2017-07-17 Pedro Alves <palves@redhat.com>
6666
6667 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6668 Handle 'operator<' / 'operator<<'.
6669
6670 2017-07-17 Pedro Alves <palves@redhat.com>
6671
6672 * completer.c (collect_explicit_location_matches): Handle
6673 MATCH_LABEL.
6674 (convert_explicit_location_to_linespec): New, factored out from
6675 ...
6676 (convert_explicit_location_to_sals): ... this.
6677 (complete_label): New.
6678 (linespec_complete_label, find_label_symbols_in_block): New.
6679 (find_label_symbols): Add completion_mode parameter and adjust to
6680 call find_label_symbols_in_block.
6681 * linespec.h (linespec_complete_label): Declare.
6682
6683 2017-07-17 Pedro Alves <palves@redhat.com>
6684
6685 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6686 complete_symbol_mode parameter.
6687 * cli/cli-cmds.c (complete_command): Get the completion result out
6688 of the handle_brkchars tracker if used a custom word point.
6689 * completer.c: Include "linespec.h".
6690 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6691 (advance_to_expression_complete_word_point): New.
6692 (completion_tracker::completes_to_completion_word): New.
6693 (complete_files_symbols): Pass down
6694 complete_symbol_mode::EXPRESSION.
6695 (explicit_options, probe_options): New.
6696 (collect_explicit_location_matches): Complete on the
6697 explictit_loc->foo instead of word. Use
6698 linespec_complete_function. Handle MATCH_LINE. Handle offering
6699 keyword and options completions.
6700 (backup_text_ptr): Delete.
6701 (skip_keyword): New.
6702 (complete_explicit_location): Remove 'word' parameter. Add
6703 language, quoted_arg_start and quoted_arg_end parameters.
6704 Rewrite, parsing left to right.
6705 (location_completer): Rewrite.
6706 (location_completer_handle_brkchars): New function.
6707 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6708 (enum complete_line_internal_reason): Adjust comments.
6709 (completion_tracker::discard_completions): New.
6710 (completer_handle_brkchars_func_for_completer): Handle
6711 location_completer.
6712 (gdb_custom_word_point_brkchars)
6713 (gdb_org_rl_basic_quote_characters): New.
6714 (gdb_completion_word_break_characters_throw)
6715 (completion_find_completion_word): Handle trackers that use a
6716 custom word point.
6717 (completion_tracker::advance_custom_word_point_by): New.
6718 (completion_tracker::build_completion_result): Don't rely on
6719 readline appending the quote char.
6720 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6721 use a custom word point.
6722 (gdb_rl_attempted_completion_function): Restore
6723 rl_basic_quote_characters.
6724 * completer.h (class completion_tracker): Extend intro comment.
6725 (completion_tracker::set_quote_char)
6726 (completion_tracker::quote_char)
6727 (completion_tracker::set_use_custom_word_point)
6728 (completion_tracker::use_custom_word_point)
6729 (completion_tracker::custom_word_point)
6730 (completion_tracker::set_custom_word_point)
6731 (completion_tracker::advance_custom_word_point_by)
6732 (completion_tracker::completes_to_completion_word)
6733 (completion_tracker::discard_completions): New methods.
6734 (completion_tracker::m_quote_char)
6735 (completion_tracker::m_use_custom_word_point)
6736 (completion_tracker::m_custom_word_point): New fields.
6737 (advance_to_expression_complete_word_point): Declare.
6738 * f-lang.c (f_collect_symbol_completion_matches): Add
6739 complete_symbol_mode parameter.
6740 * language.h (struct language_defn)
6741 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6742 parameter.
6743 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6744 (linespec_complete_function): New function.
6745 (linespec_lexer_lex_keyword): Adjust.
6746 * linespec.h (linespec_keywords, linespec_complete_function): New
6747 declarations.
6748 * location.c (find_end_quote): New function.
6749 (explicit_location_lex_one): Add explicit_completion_info
6750 parameter. Save quoting info. Don't throw if being called for
6751 completion. Don't handle Ada operators here.
6752 (is_cp_operator, skip_op_false_positives, first_of)
6753 (explicit_location_lex_one_function): New function.
6754 (string_to_explicit_location): Replace 'dont_throw' parameter with
6755 an explicit_completion_info pointer parameter. Handle it. Don't
6756 use explicit_location_lex_one to lex function names. Use
6757 explicit_location_lex_one_function instead.
6758 * location.h (struct explicit_completion_info): New.
6759 (string_to_explicit_location): Replace 'dont_throw' parameter with
6760 an explicit_completion_info pointer parameter.
6761 * symtab.c (default_collect_symbol_completion_matches_break_on):
6762 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6763 (default_collect_symbol_completion_matches)
6764 (collect_symbol_completion_matches): Add complete_symbol_mode
6765 parameter.
6766 (collect_symbol_completion_matches_type): Pass down
6767 complete_symbol_mode::EXPRESSION.
6768 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6769 parameter. Handle LINESPEC mode.
6770 * symtab.h (complete_symbol_mode): New.
6771 (default_collect_symbol_completion_matches_break_on)
6772 (default_collect_symbol_completion_matches)
6773 (collect_symbol_completion_matches)
6774 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6775 parameter.
6776
6777 2017-07-17 Pedro Alves <palves@redhat.com>
6778
6779 * utils.c (enum class strncmp_iw_mode): New.
6780 (strcmp_iw): Rename to ...
6781 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6782 parameters. Handle them.
6783 (strncmp_iw): New.
6784 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6785 * utils.h (strncmp_iw): Declare.
6786 (strcmp_iw): Move describing comments here.
6787
6788 2017-07-17 Pedro Alves <palves@redhat.com>
6789
6790 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6791 CP_OPERATOR_STR.
6792 * c-typeprint.c (is_type_conversion_operator): Use
6793 CP_OPERATOR_STR.
6794 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6795 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6796 CP_OPERATOR_LEN.
6797 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6798 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6799 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6800 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6801 CP_OPERATOR_STR.
6802 * location.c: Include "cp-support.h".
6803 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6804 CP_OPERATOR_STR.
6805 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6806 CP_OPERATOR_LEN.
6807
6808 2017-07-17 Pedro Alves <palves@redhat.com>
6809
6810 * cli/cli-cmds.c (complete_command): Use a completion tracker
6811 along with completion_find_completion_word for handle_brkchars
6812 phase.
6813 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
6814 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
6815 (struct gdb_rl_completion_word_info): New.
6816 (gdb_rl_find_completion_word): New.
6817 (completion_find_completion_word): New.
6818 * completer.h (completion_find_completion_word): Declare.
6819
6820 2017-07-17 Pedro Alves <palves@redhat.com>
6821
6822 * ada-lang.c (symbol_completion_match): Adjust comments.
6823 (symbol_completion_add): Replace vector parameter with
6824 completion_tracker parameter. Use it.
6825 (ada_make_symbol_completion_list): Rename to...
6826 (ada_collect_symbol_completion_matches): ... this. Add
6827 completion_tracker parameter and use it.
6828 (ada_language_defn): Adjust.
6829 * break-catch-syscall.c (catch_syscall_completer): Adjust
6830 prototype and work with completion_tracker instead of VEC.
6831 * breakpoint.c (condition_completer): Adjust prototype and work
6832 with completion_tracker instead of VEC.
6833 * c-lang.c (c_language_defn, cplus_language_defn)
6834 (asm_language_defn, minimal_language_defn): Adjust to renames.
6835 * cli/cli-cmds.c (complete_command): Rework using
6836 completion_tracker. Catch exceptions when completing.
6837 * cli/cli-decode.c (integer_unlimited_completer)
6838 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
6839 with completion_tracker instead of VEC.
6840 * command.h (struct completion_tracker): Forward declare.
6841 (completer_ftype, completer_handle_brkchars_ftype): Change
6842 types.
6843 (complete_on_cmdlist, complete_on_enum): Adjust.
6844 * completer.c: Include <algorithm>.
6845 (struct gdb_completer_state): New.
6846 (current_completion): New global.
6847 (readline_line_completion_function): Delete.
6848 (noop_completer, filename_completer)
6849 (filename_completer_handle_brkchars, complete_files_symbols)
6850 (linespec_location_completer): Adjust to work with a
6851 completion_tracker instead of a VEC.
6852 (string_or_empty): New.
6853 (collect_explicit_location_matches): Adjust to work with a
6854 completion_tracker instead of a VEC.
6855 (explicit_location_completer): Rename to ...
6856 (complete_explicit_location): ... this and adjust to work with a
6857 completion_tracker instead of a VEC.
6858 (location_completer): Adjust to work with a completion_tracker
6859 instead of a VEC.
6860 (add_struct_fields): Adjust to work with a completion_list instead
6861 of VEC.
6862 (expression_completer): Rename to ...
6863 (complete_expression): ... this and adjust to work with a
6864 completion_tracker instead of a VEC. Use complete_files_symbols.
6865 (expression_completer): Reimplement on top of complete_expression.
6866 (symbol_completer): Adjust to work with a completion_tracker
6867 instead of a VEC.
6868 (enum complete_line_internal_reason): Add describing comments.
6869 (complete_line_internal_normal_command): Adjust to work with a
6870 completion_tracker instead of a VEC.
6871 (complete_line_internal): Rename to ...
6872 (complete_line_internal_1): ... this and adjust to work with a
6873 completion_tracker instead of a VEC. Assert TEXT is NULL in the
6874 handle_brkchars phase.
6875 (new_completion_tracker): Delete.
6876 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
6877 complete_line_internal_1.
6878 (free_completion_tracker): Delete.
6879 (INITIAL_COMPLETION_HTAB_SIZE): New.
6880 (completion_tracker::completion_tracker)
6881 (completion_tracker::~completion_tracker): New.
6882 (maybe_add_completion): Delete.
6883 (completion_tracker::maybe_add_completion)
6884 (completion_tracker::add_completion)
6885 (completion_tracker::add_completions): New.
6886 (throw_max_completions_reached_error): Delete.
6887 (complete_line): Adjust to work with a completion_tracker instead
6888 of a VEC. Don't create a completion_tracker_t or check for max
6889 completions here.
6890 (command_completer, command_completer_handle_brkchars)
6891 (signal_completer, reg_or_group_completer_1)
6892 (reg_or_group_completer, default_completer_handle_brkchars):
6893 Adjust to work with a completion_tracker.
6894 (gdb_completion_word_break_characters_throw): New.
6895 (gdb_completion_word_break_characters): Reimplement.
6896 (line_completion_function): Delete.
6897 (completion_tracker::recompute_lowest_common_denominator)
6898 (expand_preserving_ws)
6899 (completion_tracker::build_completion_result)
6900 (completion_result::completion_result)
6901 (completion_result::completion_result)
6902 (completion_result::~completion_result)
6903 (completion_result::completion_result)
6904 (completion_result::release_match_list, compare_cstrings)
6905 (completion_result::sort_match_list)
6906 (completion_result::reset_match_list)
6907 (gdb_rl_attempted_completion_function_throw)
6908 (gdb_rl_attempted_completion_function): New.
6909 * completer.h (completion_list, struct completion_result)
6910 (class completion_tracker): New.
6911 (complete_line): Add completion_tracker parameter.
6912 (readline_line_completion_function): Delete.
6913 (gdb_rl_attempted_completion_function): New.
6914 (noop_completer, filename_completer, expression_completer)
6915 (location_completer, symbol_completer, command_completer)
6916 (signal_completer, reg_or_group_completer): Update prototypes.
6917 (completion_tracker_t, new_completion_tracker)
6918 (make_cleanup_free_completion_tracker): Delete.
6919 (enum maybe_add_completion_enum): Delete.
6920 (maybe_add_completion): Delete.
6921 (throw_max_completions_reached_error): Delete.
6922 * corefile.c (complete_set_gnutarget): Adjust to work with a
6923 completion_tracker instead of a VEC.
6924 * cp-abi.c (cp_abi_completer): Adjust to work with a
6925 completion_tracker instead of a VEC.
6926 * d-lang.c (d_language_defn): Adjust.
6927 * disasm.c (disassembler_options_completer): Adjust to work with a
6928 completion_tracker instead of a VEC.
6929 * f-lang.c (f_make_symbol_completion_list): Rename to ...
6930 (f_collect_symbol_completion_matches): ... this. Adjust to work
6931 with a completion_tracker instead of a VEC.
6932 (f_language_defn): Adjust.
6933 * go-lang.c (go_language_defn): Adjust.
6934 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
6935 Adjust to work with a completion_tracker instead of a VEC.
6936 * infrun.c (handle_completer): Likewise.
6937 * interps.c (interpreter_completer): Likewise.
6938 * interps.h (interpreter_completer): Likewise.
6939 * language.c (unknown_language_defn, auto_language_defn)
6940 (local_language_defn): Adjust.
6941 * language.h (language_defn::la_make_symbol_completion_list):
6942 Rename to ...
6943 (language_defn::la_collect_symbol_completion_matches): ... this
6944 and adjust to work with a completion_tracker instead of a VEC.
6945 * m2-lang.c (m2_language_defn): Adjust.
6946 * objc-lang.c (objc_language_defn): Adjust.
6947 * opencl-lang.c (opencl_language_defn): Adjust.
6948 * p-lang.c (pascal_language_defn): Adjust.
6949 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
6950 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
6951 with a completion_tracker.
6952 * rust-lang.c (rust_language_defn): Adjust.
6953 * symtab.c (free_completion_list, do_free_completion_list)
6954 (return_val, completion_tracker): Delete.
6955 (completion_list_add_name, completion_list_add_symbol)
6956 (completion_list_add_msymbol, completion_list_objc_symbol)
6957 (completion_list_add_fields, add_symtab_completions): Add
6958 completion_tracker parameter and use it.
6959 (default_make_symbol_completion_list_break_on_1): Rename to...
6960 (default_collect_symbol_completion_matches_break_on): ... this.
6961 Add completion_tracker parameter and use it instead of allocating
6962 a completion tracker here.
6963 (default_make_symbol_completion_list_break_on): Delete old
6964 implementation.
6965 (default_make_symbol_completion_list): Delete.
6966 (default_collect_symbol_completion_matches): New.
6967 (make_symbol_completion_list): Delete.
6968 (collect_symbol_completion_matches): New.
6969 (make_symbol_completion_type): Rename to ...
6970 (collect_symbol_completion_matches_type): ... this. Add
6971 completion_tracker parameter and use it instead of VEC.
6972 (make_file_symbol_completion_list_1): Rename to...
6973 (collect_file_symbol_completion_matches): ... this. Add
6974 completion_tracker parameter and use it instead of VEC.
6975 (make_file_symbol_completion_list): Delete.
6976 (add_filename_to_list): Use completion_list instead of a VEC.
6977 (add_partial_filename_data::list): Now a completion_list.
6978 (make_source_files_completion_list): Work with a completion_list
6979 instead of a VEC.
6980 * symtab.h: Include "completer.h".
6981 (default_make_symbol_completion_list_break_on)
6982 (default_make_symbol_completion_list, make_symbol_completion_list)
6983 (make_symbol_completion_type, make_file_symbol_completion_list)
6984 (make_source_files_completion_list): Delete.
6985 (default_collect_symbol_completion_matches_break_on)
6986 (default_collect_symbol_completion_matches)
6987 (collect_symbol_completion_matches)
6988 (collect_symbol_completion_matches_type)
6989 (collect_file_symbol_completion_matches)
6990 (make_source_files_completion_list): New.
6991 * top.c (init_main): Don't install a rl_completion_entry_function
6992 hook. Install a rl_attempted_completion_function hook instead.
6993 * tui/tui-layout.c (layout_completer): Adjust to work with a
6994 completion_tracker.
6995 * tui/tui-regs.c (tui_reggroup_completer):
6996 * tui/tui-win.c (window_name_completer, focus_completer)
6997 (winheight_completer): Adjust to work with a completion_tracker.
6998 * value.c: Include "completer.h".
6999 (complete_internalvar): Adjust to work with a completion_tracker.
7000 * value.h (complete_internalvar): Likewise.
7001
7002 2017-07-17 Pedro Alves <palves@redhat.com>
7003
7004 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7005 renames.
7006 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7007 comments to completer_ftype's declaration.
7008 <completer_handle_brkchars>: Change type to
7009 completer_handle_brkchars_ftype.
7010 * command.h (completer_ftype): Add describing comment and give
7011 names to parameters.
7012 (completer_ftype_void): Rename to ...
7013 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7014 (set_cmd_completer_handle_brkchars): Adjust.
7015 * completer.c (filename_completer_handle_brkchars): New function.
7016 (complete_line_internal_normal_command): New function, factored
7017 out from ...
7018 (complete_line_internal): ... here.
7019 (command_completer_handle_brkchars)
7020 (default_completer_handle_brkchars)
7021 (completer_handle_brkchars_func_for_completer): New functions.
7022 * completer.h (set_gdb_completion_word_break_characters): Delete
7023 declaration.
7024 (completer_handle_brkchars_func_for_completer): New declaration.
7025 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7026 completer_handle_brkchars_func_for_completer.
7027
7028 2017-07-17 Pedro Alves <palves@redhat.com>
7029
7030 * completer.c (symbol_completer): New function, based on
7031 make_symbol_completion_list_fn.
7032 * completer.h (symbol_completer): New declaration.
7033 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7034 * python/py-cmd.c (completers): Adjust.
7035 * symtab.c (make_symbol_completion_list_fn): Delete.
7036 * symtab.h (make_symbol_completion_list_fn): Delete.
7037 * cli/cli-decode.c (add_cmd): Adjust.
7038
7039 2017-07-17 Pedro Alves <palves@redhat.com>
7040
7041 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7042 * dwarf2read.c: Include "filename-seen-cache.h".
7043 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7044 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7045 * filename-seen-cache.c: New file.
7046 * filename-seen-cache.h: New file.
7047 * symtab.c: Include "filename-seen-cache.h".
7048 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7049 (create_filename_seen_cache, clear_filename_seen_cache)
7050 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7051 to filename-seen-cache.h/filename-seen-cache.c.
7052 (output_source_filename, sources_info)
7053 (maybe_add_partial_symtab_filename)
7054 (make_source_files_completion_list): Adjust to use
7055 filename_seen_cache.
7056
7057 2017-07-17 Pedro Alves <palves@redhat.com>
7058
7059 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7060 fields.
7061 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7062 dwarf2_debug_sections*)): New.
7063 (dwarf2_per_objfile::dwarf2_per_objfile(const
7064 dwarf2_per_objfile&)): Declare as deleted.
7065 (dwarf2_per_objfile::operator=): Declare as deleted.
7066 (dwarf2_per_objfile::dwarf2_per_objfile)
7067 (dwarf2_per_objfile::~dwarf2_per_objfile)
7068 (dwarf2_per_objfile::free_cached_comp_units): New.
7069 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7070 ctor. Call dwarf2_per_objfile's ctor manually.
7071 (dwarf2_locate_sections): Deleted/refactored as ...
7072 (dwarf2_per_objfile::locate_sections): ... this new method.
7073 (free_cached_comp_units): Defer to
7074 dwarf2_per_objfile::free_cached_comp_units.
7075 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7076
7077 2017-07-14 Tom Tromey <tom@tromey.com>
7078
7079 PR rust/21764:
7080 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7081 parameter.
7082 <UNOP_SIZEOF>: Split into separate case.
7083 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7084
7085 2017-07-14 Tom Tromey <tom@tromey.com>
7086
7087 PR rust/21763:
7088 * symtab.c (symbol_matches_domain): Add language_rust to special
7089 case.
7090 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7091 treat LOC_TYPEDEF symbols as variables.
7092
7093 2017-07-14 Pedro Alves <palves@redhat.com>
7094
7095 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7096 symtabs matching all symtabs with SRCFILE as file name instead of
7097 only considering the first hit, with lookup_symtab.
7098
7099 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7100
7101 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7102 operator_name parameters.
7103 (gen_expr): Update function call.
7104
7105 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7106
7107 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7108 parameter.
7109 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7110 Likewise.
7111 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7112 parameter, use agent_expr::gdbarch instead, update function
7113 calls.
7114 (locexpr_tracepoint_var_ref): Likewise.
7115 (loclist_tracepoint_var_ref): Likewise.
7116 * ax-gdb.c (gen_trace_static_fields): Likewise.
7117 (gen_traced_pop): Likewise.
7118 (gen_frame_args_address): Likewise.
7119 (gen_frame_locals_address): Likewise.
7120 (gen_var_ref): Likewise.
7121 (gen_struct_ref_recursive): Likewise.
7122 (gen_static_field): Likewise.
7123 (gen_maybe_namespace_elt): Likewise.
7124 (gen_expr): Likewise.
7125 (gen_trace_for_var): Likewise.
7126 (gen_trace_for_expr): Likewise.
7127 (gen_trace_for_return_address): Likewise.
7128
7129 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7130
7131 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7132 parameter.
7133 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7134
7135 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7136
7137 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7138 from ax, update calls.
7139 (gen_usual_arithmetic): Likewise.
7140 (gen_integral_promotions): Likewise.
7141 (gen_bitfield_ref): Likewise.
7142 (gen_primitive_field): Likewise.
7143 (gen_struct_ref_recursive): Likewise.
7144 (gen_struct_ref): Likewise.
7145 (gen_maybe_namespace_elt): Likewise.
7146 (gen_struct_elt_for_reference): Likewise.
7147 (gen_namespace_elt): Likewise.
7148 (gen_aggregate_elt_ref): Likewise.
7149 (gen_expr): Get gdbarch from ax, update calls.
7150 (gen_expr_binop_rest): Likewise.
7151
7152 2017-07-13 Pedro Alves <palves@redhat.com>
7153
7154 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7155 as default tdesc.
7156 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7157 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7158 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7159 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7160 tdep.
7161 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7162 Get final tdesc from the tdep.
7163 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7164 default tdesc.
7165 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7166 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7167 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7168 Use it as default tdesc.
7169 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7170 down to amd_init_abi. No longer handle fallback tdesc here.
7171 * amd64-tdep.h (tdesc_x32): Declare.
7172 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7173 parameter.
7174 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7175 as default tdesc.
7176
7177 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7178
7179 * s390-linux-tdep.c (s390_process_record): Add support for
7180 instructions new in arch12.
7181
7182 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7183
7184 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7185 PT_GETFSBASE and PT_GETGSBASE.
7186 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7187 PT_SETGSBASE.
7188
7189 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7190
7191 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7192 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7193 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7194 those rules.
7195 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7196 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7197 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7198 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7199 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7200 * features/i386/amd64.xml: Add 64bit-segments.xml.
7201 * features/i386/amd64-avx-avx512.c: Regenerated.
7202 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7203 * features/i386/amd64-avx-mpx.c: Regenerated.
7204 * features/i386/amd64-avx.c: Regenerated.
7205 * features/i386/amd64-mpx.c: Regenerated.
7206 * features/i386/amd64.c: Regenerated.
7207 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7208 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7209 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7210 * regformats/i386/amd64-avx.dat: Regenerated.
7211 * regformats/i386/amd64-mpx.dat: Regenerated.
7212 * regformats/i386/amd64.dat: Regenerated.
7213
7214 2017-07-10 Yao Qi <yao.qi@linaro.org>
7215
7216 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7217 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7218
7219 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7220
7221 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7222 unsetenv.
7223 * gnulib/aclocal.m4: Regenerate.
7224 * gnulib/config.in: Regenerate.
7225 * gnulib/configure: Regenerate.
7226 * gnulib/import/Makefile.am: Regenerate.
7227 * gnulib/import/Makefile.in: Regenerate.
7228 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7229 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7230 * gnulib/import/m4/environ.m4: New file.
7231 * gnulib/import/m4/setenv.m4: New file.
7232 * gnulib/import/setenv.c: New file.
7233 * gnulib/import/unsetenv.c: New file.
7234
7235 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7236
7237 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7238 address when op is DW_OP_addr.
7239
7240 2017-07-09 Tom Tromey <tom@tromey.com>
7241
7242 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7243 check and apply to outer type.
7244
7245 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7246
7247 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7248 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7249 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7250 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7251
7252 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7253
7254 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7255
7256 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7257
7258 * corelow.c (get_core_siginfo): Remove.
7259 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7260 instead of get_core_siginfo.
7261 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7262 * gdbarch.h: Re-generate.
7263 * gdbarch.c: Re-generate.
7264 * linux-tdep.c (linux_core_xfer_siginfo): New.
7265 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7266
7267 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7268
7269 * corelow.c (thread_section_name): Move to ...
7270 * gdbcore.h (thread_section_name): ... here.
7271
7272 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7273
7274 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7275 (struct siginfo32): New.
7276 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7277 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7278 via ptrace(PT_LWPINFO).
7279
7280 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7281
7282 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7283 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7284 (fbsd_get_siginfo_type): New.
7285 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7286 (_initialize_fbsd_tdep): New.
7287
7288 2017-07-06 David Blaikie <dblaikie@gmail.com>
7289
7290 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7291 a singular dwo_unit*) to support multiple CUs in the same way that
7292 multiple TUs are supported.
7293 (create_cus_hash_table): Replace create_dwo_cu with a function for
7294 parsing multiple CUs from a DWO file.
7295 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7296 create_dwo_cu.
7297 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7298 htab_find, rather than comparing the signature to a singleton CU in
7299 the dwo_file.
7300
7301 2017-07-06 Pedro Alves <palves@redhat.com>
7302
7303 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7304
7305 2017-07-04 Pedro Alves <palves@redhat.com>
7306
7307 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7308 * gdbtypes.h (TYPE_STATIC): Delete.
7309 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7310 is_synchronized, is_native>: Delete.
7311 <dummy>: Bump.
7312 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7313 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7314 (TYPE_FN_FIELD_ABSTRACT): Delete.
7315
7316 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7317
7318 * buffer.h (buffer_finish): Fix spelling mistakes.
7319
7320 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7321
7322 * .dir-locals.el: Automatically switch to C-style comments in
7323 versions of Emacs that support the feature.
7324
7325 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7326 Pedro Alves <palves@redhat.com>
7327
7328 PR cli/21688
7329 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7330 (process_next_line): New variable 'inline_cmd'.
7331 Adjust 'if' clauses for "python", "compile" and "guile" to use
7332 'command_name_equals' and check for '!inline_cmd'.
7333
7334 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7335
7336 PR cli/21688
7337 * cli/cli-script.c (command_name_equals_not_inline): New function.
7338 (process_next_line): Adjust 'if' clauses for "python", "compile"
7339 and "guile" to use command_name_equals_not_inline.
7340
7341 2017-06-29 Pedro Alves <palves@redhat.com>
7342
7343 * completer.c (expression_completer): Call
7344 linespec_location_completer instead of location_completer.
7345
7346 2017-06-29 Pedro Alves <palves@redhat.com>
7347
7348 * completer.c (expression_completer): Remove code that recomputes
7349 'text' from 'word'.
7350
7351 2017-06-29 Yao Qi <yao.qi@linaro.org>
7352
7353 * regformats/regdat.sh: Generate code with
7354 "ifndef IN_PROCESS_AGENT".
7355
7356 2017-06-28 Pedro Alves <palves@redhat.com>
7357
7358 * command.h: Include "common/scoped_restore.h".
7359
7360 2017-06-28 Yao Qi <yao.qi@linaro.org>
7361
7362 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7363 instead of obstack_grow.
7364
7365 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7366
7367 PR gdb/21337
7368 * symfile.c (reread_symbols): Call objfiles_changed just before
7369 read_symbols.
7370
7371 2017-06-27 Pedro Alves <palves@redhat.com>
7372
7373 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7374 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7375 (completion_list_add_symbol, completion_list_add_msymbol):
7376 ... these new functions.
7377 (add_symtab_completions)
7378 (default_make_symbol_completion_list_break_on_1): Adjust.
7379
7380 2017-06-27 Pedro Alves <palves@redhat.com>
7381
7382 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7383 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7384 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7385 dtor.
7386 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7387 'storage_obstack' field an auto_obstack. In-class initialize all
7388 non-bitfield fields. Make minsyms_read bool.
7389 * symfile.c (read_symbols): Adjust.
7390
7391 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7392
7393 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7394 (gdbsim_store_register): Likewise.
7395
7396 2017-06-27 Pedro Alves <palves@redhat.com>
7397
7398 * c-exp.y (name_obstack): Now an auto_obstack.
7399 (yylex): Use auto_obstack::clear.
7400 (c_parse): Use auto_obstack::clear instead of reinitializing and
7401 freeing the obstack.
7402 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7403 * d-exp.y (name_obstack): Now an auto_obstack.
7404 (yylex): Use auto_obstack::clear.
7405 (d_parse): Use auto_obstack::clear instead of reinitializing and
7406 freeing the obstack.
7407 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7408 auto_obstack.
7409 * dwarf2read.c (create_addrmap_from_index)
7410 (dwarf2_build_psymtabs_hard)
7411 (update_enumeration_type_from_children): Likewise.
7412 * gdb_obstack.h (auto_obstack): New type.
7413 * go-exp.y (name_obstack): Now an auto_obstack.
7414 (build_packaged_name): Use auto_obstack::clear.
7415 (go_parse): Use auto_obstack::clear instead of reinitializing and
7416 freeing the obstack.
7417 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7418 auto_obstack.
7419 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7420 * rust-exp.y (work_obstack): Now an auto_obstack.
7421 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7422 reinitializing and freeing the obstack.
7423 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7424 (host_char_to_target): Use auto_obstack.
7425 * utils.h (make_cleanup_obstack_free): Delete declaration.
7426 * valprint.c (generic_emit_char, generic_printstr): Use
7427 auto_obstack.
7428
7429 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7430
7431 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7432 thread.
7433 (darwin_init_thread_list): Don't update dummy thread.
7434 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7435
7436 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7437
7438 * record-full.c (netorder16): Remove.
7439
7440 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7441
7442 * common/diagnostics.h: Define macros for GCC.
7443 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7444 * common/vec.h: Include diagnostics.h.
7445 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7446 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7447 warning.
7448
7449 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7450
7451 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7452 New macro.
7453 * ada-lex.l: Ignore deprecated register warnings.
7454
7455 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7456
7457 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7458 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7459
7460 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7461
7462 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7463 its own line.
7464
7465 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7466
7467 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7468
7469 2017-06-23 Alan Hayward <alan.hayward@arm.com>
7470
7471 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7472 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7473 (xtensa_register_read_masked): Likewise.
7474
7475 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7476
7477 * common/environ.c (gdb_environ::unset): Update comment.
7478
7479 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7480
7481 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7482 registers.
7483
7484 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7485
7486 * record-full.c (record_full_exec_insn): Use byte_vector.
7487
7488 2017-06-22 Yao Qi <yao.qi@linaro.org>
7489
7490 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7491 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7492
7493 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7494
7495 * remote.c (cached_reg): Move from here...
7496 * regcache.h (cached_reg): ...to here.
7497 * python/py-unwind.c (struct reg_info): Remove.
7498 (cached_frame_info): Use cached_reg_t.
7499 (pyuw_prev_register): Likewise.
7500 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7501 (pyuw_dealloc_cache): Free all registers.
7502
7503 2017-06-22 Pedro Alves <palves@redhat.com>
7504 Simon Marchi <simon.marchi@ericsson.com>
7505
7506 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7507 warning.
7508 * common/diagnostics.h: New file.
7509
7510 2017-06-22 Pedro Alves <palves@redhat.com>
7511
7512 * common/agent.h: Add include guards.
7513
7514 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7515
7516 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7517 talk about addressable units instead of bytes.
7518
7519 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7520
7521 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7522 of '::const_iterator'.
7523
7524 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7525
7526 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7527 'unittests/environ-selftests.c'.
7528 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7529 * charset.c (find_charset_names): Declare object 'iconv_env'.
7530 Update code to use 'iconv_env' object. Remove call to
7531 'free_environ'.
7532 * common/environ.c: Include <utility>.
7533 (make_environ): Delete function.
7534 (free_environ): Delete function.
7535 (gdb_environ::clear): New function.
7536 (gdb_environ::operator=): New function.
7537 (gdb_environ::get): Likewise.
7538 (environ_vector): Delete function.
7539 (set_in_environ): Delete function.
7540 (gdb_environ::set): New function.
7541 (unset_in_environ): Delete function.
7542 (gdb_environ::unset): New function.
7543 (gdb_environ::envp): Likewise.
7544 * common/environ.h: Include <vector>.
7545 (struct gdb_environ): Delete; transform into...
7546 (class gdb_environ): ... this class.
7547 (free_environ): Delete prototype.
7548 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7549 environ_vector): Likewise.
7550 * infcmd.c (run_command_1): Update code to call
7551 'envp' from 'gdb_environ' class.
7552 (environment_info): Update code to call methods from 'gdb_environ'
7553 class.
7554 (unset_environment_command): Likewise.
7555 (path_info): Likewise.
7556 (path_command): Likewise.
7557 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7558 (inferior::inferior): Initialize 'environment' using the host's
7559 information.
7560 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7561 Include "environ.h".
7562 (class inferior) <environment>: Change type from 'struct
7563 gdb_environ' to 'gdb_environ'.
7564 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7565 methods from 'gdb_environ' class.
7566 * solib.c (solib_find_1): Likewise
7567 * unittests/environ-selftests.c: New file.
7568
7569 2017-06-20 Yao Qi <yao.qi@linaro.org>
7570
7571 * features/i386/i386-linux.xml: Exchange the order of including
7572 32bit-linux.xml and 32bit-sse.xml.
7573 * features/i386/i386-linux.c: Regenerated.
7574
7575 2017-06-20 Yao Qi <yao.qi@linaro.org>
7576
7577 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7578 Delete copy ctor and assignment operator.
7579 (tdesc_type): Likewise.
7580 (tdesc_feature): Likewise.
7581 (tdesc_free_reg): Remove.
7582 (tdesc_create_reg): Use new.
7583 (tdesc_free_type): Remove.
7584 (tdesc_create_vector): Use new.
7585 (tdesc_create_union): Likewise.
7586 (tdesc_create_flags): Likewise.
7587 (tdesc_create_enum): Likewise.
7588 (tdesc_free_feature): Delete.
7589 (free_target_description): Use delete.
7590
7591 2017-06-19 John Baldwin <jhb@FreeBSD.org>
7592
7593 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7594 registers.
7595
7596 2017-06-19 Pedro Alves <palves@redhat.com>
7597
7598 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7599 after gdb::unlinker.
7600
7601 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7602
7603 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7604 gdb_environ to access an environment variable.
7605
7606 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7607
7608 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7609 gdb_byte*.
7610
7611 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7612
7613 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7614
7615 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7616
7617 * configure: Re-generate.
7618 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7619
7620 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7621
7622 * configure: Re-generate.
7623 * warning.m4: Pass -Werror to compiler when checking for
7624 supported warning flags.
7625
7626 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7627
7628 * Makefile.in (COMPILE.pre): Add "-x c++".
7629
7630 2017-06-16 Alan Hayward <alan.hayward@arm.com>
7631 Pedro Alves <palves@redhat.com>
7632 Yao Qi <yao.qi@linaro.org>
7633
7634 * defs.h (RequireLongest): New.
7635 (extract_integer): Declare function template.
7636 (extract_signed_integer): Remove the declaration, but define it
7637 static inline.
7638 (extract_unsigned_integer): Likewise.
7639 (store_integer): Declare function template.
7640 (store_signed_integer): Remove the declaration, but define it
7641 static inline.
7642 (store_unsigned_integer): Likewise.
7643 * findvar.c (extract_integer): New function template.
7644 (extract_signed_integer): Remove.
7645 (extract_unsigned_integer): Remove.
7646 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7647 instantiations.
7648 (store_integer): New function template.
7649 (store_signed_integer): Remove.
7650 (store_unsigned_integer): Remove.
7651 (store_integer): Explicit instantiations.
7652 * regcache.c (regcache_raw_read_signed): Update.
7653 (regcache::raw_read): New function.
7654 (regcache::raw_read_signed): Remove.
7655 (regcache::raw_read_unsigned): Remove.
7656 (regcache_raw_read_unsigned): Update.
7657 (regcache_raw_write_unsigned): Update.
7658 (regcache::raw_write_signed): Remove.
7659 (regcache::raw_write): New function.
7660 (regcache_cooked_read_signed): Update.
7661 (regcache::raw_write_unsigned): Remove.
7662 (regcache::cooked_read_signed): Remove.
7663 (regcache_cooked_read_unsigned): Update.
7664 (regcache::cooked_read_unsigned): Remove.
7665 (regcache_cooked_write_signed): Update.
7666 (regcache_cooked_write_unsigned): Update.
7667 * regcache.h (regcache) <raw_read_signed>: Remove.
7668 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7669 <raw_read, raw_write>: New.
7670 <cooked_read_signed, cooked_write_signed>: Remove.
7671 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7672 <cooked_read, cooked_write>: New.
7673 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7674 (sh64_pseudo_register_write): Update.
7675
7676 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7677
7678 * arc-tdep.c (arc_disassembler_options): New variable.
7679 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7680 of default_print_insn.
7681 (arc_delayed_print_insn): Set info->section when needed,
7682 use default_print_insn to retrieve a disassembler.
7683
7684 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7685
7686 PR gdb/21574
7687 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7688 to mention $SHELL and startup-with-shell.
7689
7690 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7691
7692 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7693
7694 2017-06-14 Yao Qi <yao.qi@linaro.org>
7695
7696 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7697 default_print_insn instead of print_insn_aarch64.
7698 * arm-tdep.c (gdb_print_insn_arm): Call
7699 default_print_insn instead of print_insn_big_arm
7700 and print_insn_little_arm.
7701 * i386-tdep.c (i386_print_insn): Call default_print_insn
7702 instead of print_insn_i386.
7703 * ia64-tdep.c (ia64_print_insn): Call
7704 default_print_insn instead of print_insn_ia64.
7705 * mips-tdep.c (gdb_print_insn_mips): Call
7706 default_print_insn instead of print_insn_big_mips
7707 and print_insn_little_mips.
7708 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7709 instead of print_insn_spu.
7710
7711 2017-06-14 Pedro Alves <palves@redhat.com>
7712
7713 * ada-lang.c: Include "common/byte-vector.h".
7714 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7715 * charset.c (wchar_iterator::iterate): Resize the vector instead
7716 of reserving it.
7717 * common/byte-vector.h: Include "common/def-vector.h".
7718 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7719 * cli/cli-dump.c: Include "common/byte-vector.h".
7720 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7721 * common/byte-vector.h: New file.
7722 * common/def-vector.h: New file.
7723 * common/default-init-alloc.h: New file.
7724 * dwarf2loc.c: Include "common/byte-vector.h".
7725 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7726 instead of reserving it.
7727 * dwarf2read.c: Include "common/byte-vector.h".
7728 (data_buf::m_vec): Now a gdb::byte_vector.
7729 * gdb_regex.c: Include "common/def-vector.h".
7730 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7731 * mi/mi-main.c: Include "common/byte-vector.h".
7732 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7733 * printcmd.c: Include "common/byte-vector.h".
7734 (print_scalar_formatted): Use gdb::byte_vector.
7735 * valprint.c: Include "common/byte-vector.h".
7736 (maybe_negate_by_bytes, print_decimal_chars): Use
7737 gdb::byte_vector.
7738
7739 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7740
7741 * darwin-nat.c: Include "nat/fork-inferior.h".
7742
7743 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7744
7745 * configure.nat: Factor out Darwin bits that are not
7746 architecture-specific. Add fork-inferior.o.
7747
7748 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7749
7750 * configure.nat: Factor out AIX bits that are not
7751 architecture-specific. Add fork-inferior.o.
7752
7753 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7754
7755 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7756 (read_pieced_value, write_pieced_value): ...here. Reduce to
7757 wrappers that just call rw_pieced_value.
7758
7759 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7760
7761 * dwarf2loc.c (write_pieced_value): When writing the data for a
7762 memory piece, use write_memory_with_notification instead of
7763 write_memory.
7764
7765 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7766
7767 * valops.c (read_value_memory): Change embedded_offset to
7768 represent a bit offset instead of a byte offset.
7769 * value.h (read_value_memory): Adjust comment.
7770
7771 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7772
7773 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7774 dest_offset_bits and source_offset_bits.
7775 (write_pieced_value): Likewise.
7776
7777 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7778
7779 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7780 given by DW_OP_bit_piece.
7781 (write_pieced_value): Likewise.
7782
7783 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7784
7785 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7786 some other preparations to the places where sufficient information
7787 is available.
7788 (write_pieced_value): Likewise.
7789
7790 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7791
7792 * dwarf2loc.c (bits_to_bytes): New function.
7793 (read_pieced_value): Fix offset calculations for register pieces
7794 on big-endian targets.
7795 (write_pieced_value): Likewise.
7796
7797 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7798
7799 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7800 (write_pieced_value): Likewise.
7801
7802 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7803
7804 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7805 transfer the source value's least significant bits, instead of its
7806 lowest-addressed ones. Rename type_len to max_offset.
7807 (read_pieced_value): Mirror above changes to write_pieced_value as
7808 applicable.
7809
7810 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7811
7812 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
7813 truncate full bytes from dest_offset_bits before using it as an
7814 offset into the buffer.
7815
7816 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7817
7818 * dwarf2loc.c (write_pieced_value): Include transfer size in
7819 byte-wise check.
7820
7821 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7822
7823 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
7824 calculation of this_size.
7825
7826 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7827
7828 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
7829 when targeting a bit-field.
7830 (write_pieced_value): Likewise.
7831
7832 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7833
7834 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
7835 (allocate_piece_closure): Drop addr_size parameter.
7836 (dwarf2_evaluate_loc_desc_full): Adjust call to
7837 allocate_piece_closure.
7838
7839 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7840
7841 PR gdb/21226
7842 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
7843 the LSB end, independent of endianness.
7844
7845 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7846
7847 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
7848 size capping.
7849
7850 2017-06-13 Yao Qi <yao.qi@linaro.org>
7851
7852 * mips-linux-nat.c: Move include features/mips*-linux.c to
7853 mips-linux-tdep.c.
7854 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
7855 to mips-linux-tdep.c.
7856 * mips-linux-tdep.c: Include features/mips*-linux.c
7857 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
7858 functions.
7859 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
7860 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
7861 (tdesc_mips64_dsp_linux): Declare.
7862
7863 2017-06-12 Tom Tromey <tom@tromey.com>
7864
7865 * valprint.h (val_print_type_code_int): Remove.
7866 * valprint.c (generic_val_print_int): Always call
7867 val_print_scalar_formatted.
7868 (val_print_type_code_int): Remove.
7869 * printcmd.c (print_scalar_formatted): Handle options->format==0.
7870 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
7871 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
7872 * ada-valprint.c (ada_val_print_num): Use
7873 val_print_scalar_formatted.
7874
7875 2017-06-12 Tom Tromey <tom@tromey.com>
7876
7877 * printcmd.c (print_scalar_formatted): Unify the two switches.
7878 Don't convert scalars to LONGEST.
7879
7880 2017-06-12 Tom Tromey <tom@tromey.com>
7881
7882 PR exp/16225:
7883 * valprint.h (print_decimal_chars): Update.
7884 * valprint.c (maybe_negate_by_bytes): New function.
7885 (print_decimal_chars): Add "is_signed" argument.
7886 * printcmd.c (print_scalar_formatted): Update.
7887
7888 2017-06-12 Tom Tromey <tom@tromey.com>
7889
7890 PR exp/16225:
7891 * valprint.h (print_binary_chars, print_hex_chars): Update.
7892 * valprint.c (val_print_type_code_int): Update.
7893 (print_binary_chars): Add "zero_pad" argument.
7894 (emit_octal_digit): New function.
7895 (print_octal_chars): Don't zero-pad.
7896 (print_decimal_chars): Likewise.
7897 (print_hex_chars): Add "zero_pad" argument.
7898 * sh64-tdep.c (sh64_do_fp_register): Update.
7899 * regcache.c (regcache::dump): Update.
7900 * printcmd.c (print_scalar_formatted): Update.
7901 * infcmd.c (default_print_one_register_info): Update.
7902
7903 2017-06-12 Pedro Alves <palves@redhat.com>
7904 Alan Hayward <alan.hayward@arm.com>
7905
7906 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
7907 (mips_eabi_push_dummy_call): Rename local 'regsize' to
7908 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
7909 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
7910 Assert that abi_regsize bytes fit in 'ref_valbuf'.
7911
7912 2017-06-12 Pedro Alves <palves@redhat.com>
7913
7914 * dwarf2read.c (mapped_symtab::data): Now a vector of
7915 symtab_index_entry instead of vector of
7916 std::unique_ptr<symtab_index_entry>. All users adjusted to check
7917 whether an element's name is NULL instead of checking whether the
7918 element itself is NULL.
7919 (find_slot): Change return type. Adjust.
7920 (hash_expand, , add_index_entry, uniquify_cu_indices)
7921 (write_hash_table): Adjust.
7922
7923 2017-06-12 Pedro Alves <palves@redhat.com>
7924
7925 * dwarf2read.c (recursively_count_psymbols): New function.
7926 (write_psymtabs_to_index): Call it to compute number of psyms and
7927 pass estimate size of psyms_seen to unordered_set's ctor.
7928
7929 2017-06-12 Pedro Alves <palves@redhat.com>
7930
7931 * dwarf2read.c (write_hash_table): Check if key already exists
7932 before emplacing.
7933
7934 2017-06-12 Pedro Alves <palves@redhat.com>
7935
7936 * dwarf2read.c (data_buf::append_space): Rename to...
7937 (data_buf::grow): ... this, and make private. Adjust all callers.
7938 (data_buf::append_uint): New method.
7939 (add_address_entry, write_one_signatured_type)
7940 (write_psymtabs_to_index): Use it.
7941
7942 2017-06-12 Pedro Alves <palves@redhat.com>
7943
7944 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
7945 (file_write (FILE *, const std::vector<Elem>&)): Delete.
7946 (data_buf::file_write): Call ::fwrite directly.
7947
7948 2017-06-12 Pedro Alves <palves@redhat.com>
7949
7950 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
7951 std::vector::erase.
7952
7953 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7954
7955 Code cleanup: C++ify .gdb_index producer.
7956 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
7957 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
7958 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
7959 (create_strtab, add_string): Remove.
7960 (file_write, data_buf): New.
7961 (struct symtab_index_entry): Use std::vector for cu_indices.
7962 (struct mapped_symtab): Use std::vector for data.
7963 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
7964 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
7965 Remove.
7966 (find_slot): Change return type. Update it to the new data structures.
7967 (hash_expand, add_index_entry): Update it to the new data structures.
7968 (offset_type_compare): Remove.
7969 (uniquify_cu_indices): Update it to the new data structures.
7970 (c_str_view, c_str_view_hasher, vector_hasher): New.
7971 (add_indices_to_cpool): Remove.
7972 (write_hash_table): Update it to the new data structures.
7973 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
7974 (eq_psymtab_cu_index): Remove.
7975 (psym_index_map): New typedef.
7976 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
7977 reference and std::unordered_map for cu_index_htab.
7978 (add_address_entry, add_address_entry_worker, write_address_map)
7979 (write_psymbols): Update it to the new data structures.
7980 (write_obstack): Remove.
7981 (struct signatured_type_index_data): Change types_list to a data_buf
7982 reference and psyms_seen to a std::unordered_set reference.
7983 (write_one_signatured_type, recursively_write_psymbols)
7984 (write_psymtabs_to_index): Update it to the new data structures.
7985
7986 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
7987
7988 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
7989 separate-debug-file commands.
7990 * symfile.h (separate_debug_file_debug): New global.
7991 * symfile.c (separate_debug_file_debug): New global.
7992 (separate_debug_file_exists, find_separate_debug_file): Add
7993 debug output.
7994 (_initialize_symfile): Add "set debug separate-debug-file"
7995 command.
7996 * build-id.c (build_id_to_debug_bfd,
7997 find_separate_debug_file_by_buildid): Add debug output.
7998
7999 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8000
8001 * gdbarch.sh (displaced_step_free_closure): Remove.
8002 * gdbarch.h, gdbarch.c: Re-generate.
8003 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8004 displaced_step_free_closure.
8005 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8006 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8007 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8008 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8009 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8010 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8011 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8012 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8013 * infrun.c (displaced_step_clear): Call xfree instead of
8014 gdbarch_displaced_step_free_closure.
8015
8016 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8017
8018 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8019 NULL".
8020
8021 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8022
8023 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8024 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8025 (mn10300_push_dummy_call): Likewise.
8026
8027 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8028
8029 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8030
8031 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8032
8033 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8034
8035 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8036
8037 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8038 able to start inferiors using a shell.
8039 (New remote packets): Announce new packet "QStartupWithShell".
8040 * remote.c: Add PACKET_QStartupWithShell.
8041 (extended_remote_create_inferior): Handle new
8042 PACKET_QStartupWithShell.
8043 (remote_protocol_features) <QStartupWithShell>: New entry for
8044 PACKET_QStartupWithShell.
8045 (_initialize_remote): Call "add_packet_config_cmd" for
8046 QStartupShell.
8047
8048 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8049 Pedro Alves <palves@redhat.com>
8050
8051 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8052 and "nat/fork-inferior.h".
8053 * common/common-inferior.h: New file, with contents from
8054 "gdb/inferior.h".
8055 * commom/common-utils.c: Include "common-utils.h".
8056 (stringify_argv): New function.
8057 * common/common-utils.h (stringify_argv): New prototype.
8058 * configure.nat: Add "fork-inferior.o" as a dependency for
8059 "*linux*", "fbsd*" and "nbsd*" hosts.
8060 * corefile.c (get_exec_file): Update comment.
8061 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8062 instead of "startup_inferior".
8063 (darwin_create_inferior): Call "add_thread_silent" after
8064 "fork_inferior".
8065 * fork-child.c: Cleanup unnecessary includes.
8066 (SHELL_FILE): Move to "common/common-fork-child.c".
8067 (environ): Likewise.
8068 (exec_wrapper): Initialize.
8069 (get_exec_wrapper): New function.
8070 (breakup_args): Move to "common/common-fork-child.c"; rename to
8071 "breakup_args_for_exec".
8072 (escape_bang_in_quoted_argument): Move to
8073 "common/common-fork-child.c".
8074 (saved_ui): New variable.
8075 (prefork_hook): New function.
8076 (postfork_hook): Likewise.
8077 (postfork_child_hook): Likewise.
8078 (gdb_startup_inferior): Likewise.
8079 (fork_inferior): Move to "common/common-fork-child.c". Update
8080 function to support gdbserver.
8081 (startup_inferior): Likewise.
8082 * gdbcore.h (get_exec_file): Remove declaration.
8083 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8084 instead of "startup_inferior". Call "add_thread_silent" after
8085 "fork_inferior".
8086 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8087 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8088 instead of "startup_inferior". Call "add_thread_silent" after
8089 "fork_inferior".
8090 * inferior.h: Include "common-inferior.h".
8091 (trace_start_error): Move to "common/common-utils.h".
8092 (trace_start_error_with_name): Likewise.
8093 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8094 (startup_inferior): Likewise.
8095 (gdb_startup_inferior): New prototype.
8096 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8097 * nat/fork-inferior.h: New file.
8098 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8099 instead of "startup_inferior". Call "add_thread_silent" after
8100 "fork_inferior".
8101 * target.h (target_terminal_init): Move prototype to
8102 "target/target.h".
8103 (target_terminal_inferior): Likewise.
8104 (target_terminal_ours): Likewise.
8105 * target/target.h (target_terminal_init): New prototype, moved
8106 from "target.h".
8107 (target_terminal_inferior): Likewise.
8108 (target_terminal_ours): Likewise.
8109 * utils.c (gdb_flush_out_err): New function.
8110
8111 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8112
8113 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8114 * common/common-gdbthread.h: New file, with parts from
8115 "gdb/gdbthread.h".
8116 * gdbthread.h: Include "common-gdbthread.h".
8117 (switch_to_thread): Moved to "common/common-gdbthread.h".
8118
8119 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8120
8121 * Makefile.in (SFILES): Add "common/job-control.c".
8122 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8123 (COMMON_OBS): Add "job-control.o".
8124 * common/job-control.c: New file, with contents from
8125 "gdb/inflow.c".
8126 * common/job-control.h: New file, with contents from "terminal.h".
8127 * fork-child.c: Include "job-control.h".
8128 * inflow.c: Include "job-control.h".
8129 (gdb_setpgid): Move to "common/common-inflow.c".
8130 (_initialize_inflow): Move setting of "job_control" to
8131 "handle_job_control".
8132 * terminal.h (job_control): Moved to "common/common-terminal.h".
8133 (gdb_setpgid): Likewise.
8134 * top.c: Include "job_control.h".
8135 * utils.c: Likewise.
8136 (job_control): Moved to "job-control.c".
8137
8138 2017-06-07 Pedro Alves <palves@redhat.com>
8139
8140 * Makefile.in (SFILES): Add gdb_regex.c.
8141 (COMMON_OBS): Add gdb_regex.o.
8142 * ada-lang.c (ada_add_standard_exceptions)
8143 (ada_add_exceptions_from_frame, name_matches_regex)
8144 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8145 parameter type to compiled_regex. Adjust.
8146 (ada_exceptions_list): Use compiled_regex.
8147 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8148 std::unique_ptr<compiled_regex>.
8149 (exception_catchpoint::~exception_catchpoint): Remove regfree
8150 call.
8151 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8152 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8153 * breakpoint.c (solib_catchpoint::compiled): Now a
8154 std::unique_ptr<compiled_regex>.
8155 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8156 (check_status_catch_solib): Adjust to use compiled_regex.
8157 (add_solib_catchpoint): Adjust to use compiled_regex.
8158 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8159 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8160 compiled_regex reference. Adjust to use it.
8161 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8162 declaration. Include "gdb_regex.h".
8163 (apropos_cmd): Change regex parameter to compiled_regex reference.
8164 * gdb_regex.c: New file.
8165 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8166 declarations.
8167 (class compiled_regex): New.
8168 * linux-tdep.c: Include "common/gdb_optional.h".
8169 (struct mapping_regexes): New, factored out from
8170 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8171 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8172 gdb::optional and remove cleanups. Adjust to compiled_regex.
8173 * probe.c: Include "common/gdb_optional.h".
8174 (collect_probes): Use compiled_regex and gdb::optional and remove
8175 cleanups.
8176 * skip.c: Include "common/gdb_optional.h".
8177 (skiplist_entry::compiled_function_regexp): Now a
8178 gdb::optional<compiled_regex>.
8179 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8180 (free_skiplist_entry): Remove regfree call.
8181 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8182 compiled_regex and gdb::optional.
8183 * symtab.c: Include "common/gdb_optional.h".
8184 (search_symbols): Use compiled_regex and gdb::optional.
8185 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8186 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8187 to gdb_regex.c.
8188
8189 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8190
8191 * regcache.c (regcache::save): Avoid buffer use.
8192 (regcache::dump): Likewise.
8193
8194 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8195
8196 * sh-tdep.c (sh_pseudo_register_read): Remove
8197 MAX_REGISTER_SIZE.
8198 (sh_pseudo_register_write): Likewise.
8199 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8200 (sh64_pseudo_register_write): Likewise
8201
8202 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8203
8204 * aarch64-tdep.c (aarch64_store_return_value): Use
8205 V_REGISTER_SIZE.
8206 (aarch64_pseudo_read_value): Likewise.
8207 (aarch64_pseudo_write): Likewise.
8208
8209 2017-06-06 Yao Qi <yao.qi@linaro.org>
8210
8211 * regformats/regdef.h (set_register_cache): Remove the
8212 declaration.
8213
8214 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8215
8216 * frame.c (frame_unwind_register_signed): Use
8217 frame_unwind_register_value.
8218
8219 2017-06-06 Pedro Alves <palves@redhat.com>
8220
8221 PR breakpoints/21553
8222 * breakpoint.c (create_breakpoints_sal_default)
8223 (init_breakpoint_sal, create_breakpoint_sal): Use
8224 gdb::unique_xmalloc_ptr for string parameters.
8225 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8226 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8227 (base_breakpoint_create_breakpoints_sal)
8228 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8229 (strace_marker_create_breakpoints_sal)
8230 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8231 string parameters.
8232 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8233 gdb::unique_xmalloc_ptr for string parameters.
8234 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8235 parameters.
8236
8237 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8238
8239 * alpha-tdep.c (alpha_register_to_value): Use
8240 get_frame_register_value.
8241 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8242
8243 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8244
8245 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8246 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8247 (ia64_value_to_register): Likewise.
8248 (ia64_extract_return_value): Likewise.
8249 (ia64_store_return_value): Likewise.
8250 (ia64_push_dummy_call): Likewise.
8251
8252 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8253
8254 GDB 8.0 released.
8255
8256 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8257
8258 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8259
8260 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8261
8262 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8263 parameter.
8264 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8265
8266 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8267
8268 * event-loop.c (poll_timers): Unallocate timer using delete
8269 instead of xfree.
8270
8271 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8272
8273 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8274 (struct breakpoint) <~breakpoint>: New.
8275 (struct watchpoint): Inherit from breakpoint.
8276 <~watchpoint>: New.
8277 <base>: Remove.
8278 (struct tracepoint): Inherit from breakpoint.
8279 <base>: Remove.
8280 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8281 (struct longjmp_breakpoint): Inherit from breakpoint.
8282 <~longjmp_breakpoint>: New.
8283 <base>: Remove.
8284 (new_breakpoint_from_type): Remove casts.
8285 (watchpoint_in_thread_scope): Remove reference to base field.
8286 (watchpoint_del_at_next_stop): Likewise.
8287 (update_watchpoint): Likewise.
8288 (watchpoint_check): Likewise.
8289 (bpstat_check_watchpoint): Likewise.
8290 (set_longjmp_breakpoint): Likewise.
8291 (struct fork_catchpoint): Inherit from breakpoint.
8292 <base>: Remove.
8293 (struct solib_catchpoint): Inherit from breakpoint.
8294 <~solib_catchpoint>: New.
8295 <base>: Remove.
8296 (dtor_catch_solib): Change to ...
8297 (solib_catchpoint::~solib_catchpoint): ... this.
8298 (breakpoint_hit_catch_solib): Remove reference to base field.
8299 (add_solib_catchpoint): Likewise.
8300 (create_fork_vfork_event_catchpoint): Likewise.
8301 (struct exec_catchpoint): Inherit from breakpoint.
8302 <~exec_catchpoint>: New.
8303 <base>: Remove.
8304 (dtor_catch_exec): Change to ...
8305 (exec_catchpoint::~exec_catchpoint): ... this.
8306 (dtor_watchpoint): Change to ...
8307 (watchpoint::~watchpoint): ... this.
8308 (watch_command_1): Remove reference to base field.
8309 (catch_exec_command_1): Likewise.
8310 (base_breakpoint_dtor): Change to ...
8311 (breakpoint::~breakpoint): ... this.
8312 (base_breakpoint_ops): Remove dtor field value.
8313 (longjmp_bkpt_dtor): Change to ...
8314 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8315 (strace_marker_create_breakpoints_sal): Remove reference to base
8316 field.
8317 (delete_breakpoint): Don't manually call breakpoint destructor.
8318 (create_tracepoint_from_upload): Remove reference to base field.
8319 (trace_pass_set_count): Likewise.
8320 (initialize_breakpoint_ops): Don't initialize
8321 momentary_breakpoint_ops, don't set dtors.
8322 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8323 <~ada_catchpoint>: New.
8324 <base>: Remove.
8325 (create_excep_cond_exprs): Remove reference to base field.
8326 (dtor_exception): Change to ...
8327 (ada_catchpoint::~ada_catchpoint): ... this.
8328 (dtor_catch_exception): Remove.
8329 (dtor_catch_exception_unhandled): Remove.
8330 (dtor_catch_assert): Remove.
8331 (create_ada_exception_catchpoint): Remove reference to base
8332 field.
8333 (initialize_ada_catchpoint_ops): Don't set dtors.
8334 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8335 breakpoint.
8336 <~signal_catchpoint>: New.
8337 <base>: Remove.
8338 (signal_catchpoint_dtor): Change to ...
8339 (signal_catchpoint::~signal_catchpoint): ... this.
8340 (create_signal_catchpoint): Remove reference to base field.
8341 (initialize_signal_catchpoint_ops): Don't set dtor.
8342 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8343 from breakpoint.
8344 <~syscall_catchpoint>: New.
8345 <base>: Remove.
8346 (dtor_catch_syscall): Change to ...
8347 (syscall_catchpoint::~syscall_catchpoint): ... this.
8348 (create_syscall_event_catchpoint): Remove reference to base
8349 field.
8350 (initialize_syscall_catchpoint_ops): Don't set dtor.
8351 * break-catch-throw.c (struct exception_catchpoint): Inherit
8352 from breakpoint.
8353 <~exception_catchpoint>: New.
8354 <base>: Remove.
8355 (dtor_exception_catchpoint): Change to ...
8356 (exception_catchpoint::~exception_catchpoint): ... this.
8357 (handle_gnu_v3_exceptions): Remove reference to base field.
8358 (initialize_throw_catchpoint_ops): Don't set dtor.
8359 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8360 field.
8361 * remote.c (remote_get_tracepoint_status): Likewise.
8362 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8363 * tracefile.c (tracefile_fetch_registers): Likewise.
8364 * tracepoint.c (actions_command): Likewise.
8365 (validate_actionline): Likewise.
8366 (tfind_1): Likewise.
8367 (get_traceframe_location): Likewise.
8368 (find_matching_tracepoint_location): Likewise.
8369 (parse_tracepoint_status): Likewise.
8370 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8371
8372 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8373
8374 * breakpoint.c (struct longjmp_breakpoint): New struct.
8375 (is_tracepoint_type): Change return type to bool.
8376 (is_longjmp_type): New function.
8377 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8378 (set_raw_breakpoint_without_location): Use
8379 new_breakpoint_from_type.
8380 (set_raw_breakpoint): Likewise.
8381
8382 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8383
8384 * breakpoint.c (new_breakpoint_from_type): New function.
8385 (create_breakpoint_sal): Use new_breakpoint_from_type and
8386 unique_ptr.
8387 (create_breakpoint): Likewise.
8388
8389 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8390
8391 * memattr.c (mem_info_command): Rename to ...
8392 (info_mem_command): ... this.
8393 (mem_enable_command): Rename to ...
8394 (enable_mem_command): ... this.
8395 (mem_disable_command): Rename to ...
8396 (disable_mem_command): ... this.
8397 (mem_delete_command): Rename to ...
8398 (delete_mem_command): ... this.
8399 (_initialize_mem): Adjust function names.
8400
8401 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8402
8403 * btrace.c (handle_pt_insn_events): New.
8404 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8405 STATUS. Split into this and ...
8406 (handle_pt_insn_event_flags): ... this.
8407
8408 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8409
8410 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8411 and struct pt_insn.resynced.
8412 * configure: Regenerated.
8413 * config.in: Regenerated.
8414
8415 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8416
8417 * btrace.c (ftrace_find_call_by_number): New function.
8418 (ftrace_new_function): Store objects, not pointers.
8419 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8420 ftrace_new_gap, ftrace_update_function,
8421 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8422 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8423 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8424 btrace_ends_with_single_insn, btrace_call_get): Account for
8425 btrace_thread_info::functions now storing objects.
8426 * btrace.h (struct btrace_thread_info): Add constructor.
8427 (struct btrace_thread_info) <functions>: Make std::vector.
8428 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8429 Initialize with default values.
8430 * record-btrace.c (record_btrace_frame_sniffer): Account for
8431 btrace_thread_info::functions now storing objects.
8432
8433 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8434
8435 * btrace.c: Remove typedef bfun_s.
8436 (ftrace_new_gap): Directly add gaps to the list of gaps.
8437 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8438 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8439 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8440 instead of gdb VEC.
8441
8442 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8443
8444 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8445 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8446 with btrace_thread_info::next_segment and
8447 btrace_thread_info::prev_segment.
8448 * btrace.h: Remove struct btrace_func_link.
8449 (struct btrace_function): Replace pair of function segment pointers
8450 with pair of indices.
8451 * python/py-record-btrace.c (btpy_call_prev_sibling,
8452 btpy_call_next_sibling): Replace references to
8453 btrace_thread_info::segment with btrace_thread_info::next_segment and
8454 btrace_thread_info::prev_segment.
8455 * record-btrace.c (record_btrace_frame_this_id): Use
8456 btrace_find_call_by_number.
8457
8458 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8459
8460 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8461 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8462 btrace_insn_next, btrace_insn_prev): Remove references to
8463 btrace_thread_info::flow.
8464 * btrace.h (struct btrace_function): Remove FLOW.
8465
8466 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8467
8468 * btrace.c (ftrace_find_call_by_number): New function.
8469 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8470 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8471 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8472 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8473 index.
8474 * btrace.h (struct btrace_function): Turn UP into an index.
8475 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8476 as an index.
8477 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8478 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8479 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8480
8481 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8482
8483 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8484 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8485 ftrace_update_function, ftrace_compute_global_level_offset,
8486 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8487 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8488 btrace_insn_end, btrace_is_empty): Remove references to
8489 btrace_thread_info::begin and btrace_thread_info::end.
8490 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8491 (struct btrace_thread_info) <functions>: Adjust comment.
8492 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8493 btrace_thread_info::begin.
8494
8495 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8496
8497 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8498 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8499 ftrace_update_function): Remove arguments that implicitly were always
8500 BTINFO->END.
8501 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8502 Don't pass BTINFO->END.
8503
8504 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8505
8506 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8507 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8508 btrace_find_insn_by_number): Replace function segment pointer with
8509 index.
8510 (btrace_insn_cmp): Simplify.
8511 * btrace.h: (struct btrace_insn_iterator) Rename index to
8512 insn_index. Replace function segment pointer with index into function
8513 segment vector.
8514 * record-btrace.c (record_btrace_call_history): Replace function
8515 segment pointer use with index.
8516 (record_btrace_frame_sniffer): Retrieve function call segment through
8517 vector.
8518 (record_btrace_set_replay): Remove defunc't safety check.
8519
8520 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8521
8522 * btrace.c (btrace_ends_with_single_insn): New function.
8523 (btrace_call_get, btrace_call_number, btrace_call_begin,
8524 btrace_call_end, btrace_call_next, btrace_call_prev,
8525 btrace_find_call_by_number): Use index into call segment vector
8526 instead of pointer.
8527 (btrace_call_cmp): Simplify.
8528 * btrace.h (struct btrace_call_iterator): Replace function call segment
8529 pointer with index into vector.
8530 * record-btrace.c (record_btrace_call_history): Use index instead of
8531 pointer.
8532
8533 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8534
8535 * btrace.c (btrace_insn_begin, btrace_insn_end,
8536 btrace_find_insn_by_number): Add btinfo to iterator.
8537 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8538
8539 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8540
8541 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8542 and save pointers directly.
8543 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8544 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8545 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8546 changed signature of functions.
8547 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8548 (btrace_fetch): Remove code that adds btrace_function pointers to
8549 vector of btrace_functions.
8550 (btrace_clear): Simplify freeing vector of btrace_functions.
8551
8552 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8553
8554 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8555 Replace VEC_* with std::vector functions.
8556 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8557 (struct btrace_thread_info)<functions>: Change type to std::vector.
8558
8559 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8560
8561 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8562 "Removed targets and native configurations" up. Merge duplicate
8563 "New commands" sub-sections. Add "New options" sub-sections.
8564
8565 2017-05-26 Alan Hayward <alan.hayward@arm.com>
8566
8567 * defs.h (copy_integer_to_size): New declaration.
8568 * findvar.c (copy_integer_to_size): New function.
8569 (do_cint_test): New selftest function.
8570 (copy_integer_to_size_test): Likewise.
8571 (_initialize_findvar): Likewise.
8572 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8573 (mips_fbsd_collect_reg): Use raw_collect_integer.
8574 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8575 (mips64_fill_gregset): Use raw_collect_integer
8576 (mips64_fill_fpregset): Use raw_supply_integer.
8577 * regcache.c (regcache::raw_supply_integer): New function.
8578 (regcache::raw_collect_integer): Likewise.
8579 * regcache.h: (regcache::raw_supply_integer): New declaration.
8580 (regcache::raw_collect_integer): Likewise.
8581
8582 2017-05-24 Yao Qi <yao.qi@linaro.org>
8583
8584 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8585 (COMMON_OBS): Add gdbarch-selftests.o.
8586 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8587 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8588 * gdbarch-selftests.c: New file.
8589 * regcache.h (regcache) <~regcache>: Mark it virtual if
8590 GDB_SELF_TEST.
8591 <raw_write>: Likewise.
8592
8593 2017-05-24 Yao Qi <yao.qi@linaro.org>
8594
8595 * regcache.c (current_regcache): Change it to
8596 regcache::current_regcache.
8597 (regcache_observer_target_changed): Update.
8598 (regcache_thread_ptid_changed): Make it a regcache static
8599 method.
8600 (regcache_thread_ptid_changed): Update.
8601 (class regcache_access): New.
8602 (current_regcache_test): Update.
8603 (_initialize_regcache): Update.
8604 * regcache.h: Include forward_list.
8605 (regcache): Declare regcache_thread_ptid_changed and declare
8606 registers_changed_ptid as friend.
8607
8608 2017-05-24 Yao Qi <yao.qi@linaro.org>
8609
8610 * i387-tdep.c (i387_register_to_value): Use register_size
8611 instead of TYPE_LENGTH.
8612 * m68k-tdep.c (m68k_register_to_value): Likewise.
8613
8614 2017-05-24 Yao Qi <yao.qi@linaro.org>
8615
8616 * i387-tdep.c (i387_convert_register_p): Return false if type
8617 code isn't TYPE_CODE_FLT.
8618
8619 2017-05-24 Yao Qi <yao.qi@linaro.org>
8620
8621 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8622 length is 4.
8623 (alpha_register_to_value): Remove type length check.
8624 (alpha_value_to_register): Likewise.
8625
8626 2017-05-24 Yao Qi <yao.qi@linaro.org>
8627
8628 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8629 TYPE_CODE_FLT.
8630
8631 2017-05-24 Yao Qi <yao.qi@linaro.org>
8632
8633 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8634 TYPE_CODE_FLT or not.
8635
8636 2017-05-24 Yao Qi <yao.qi@linaro.org>
8637
8638 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8639 * avr-tdep.c (avr_gdbarch_init): Likewise.
8640 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8641 * cris-tdep.c (cris_gdbarch_init): Likewise.
8642 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8643 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8644 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8645 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8646 * mep-tdep.c (mep_gdbarch_init): Likewise.
8647 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8648 * mips-tdep.c (mips_gdbarch_init): Likewise.
8649 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8650 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8651 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8652 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8653 * v850-tdep.c (v850_gdbarch_init): Likewise.
8654
8655 2017-05-24 Yao Qi <yao.qi@linaro.org>
8656
8657 * selftest-arch.c (tests_with_arch): Call registers_changed
8658 and reinit_frame_cache.
8659 * selftest.c (run_self_tests): Likewise.
8660
8661 2017-05-24 Yao Qi <yao.qi@linaro.org>
8662
8663 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8664 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8665
8666 2017-05-24 Yao Qi <yao.qi@linaro.org>
8667
8668 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8669 set_gdbarch_print_insn.
8670
8671 2017-05-24 Yao Qi <yao.qi@linaro.org>
8672
8673 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8674 set_gdbarch_print_insn.
8675
8676 2017-05-24 Yao Qi <yao.qi@linaro.org>
8677
8678 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8679 set_gdbarch_print_insn.
8680 * arc-tdep.c (arc_gdbarch_init): Likewise.
8681 * arch-utils.c: include dis-asm.h.
8682 (default_print_insn): New function.
8683 * arch-utils.h (default_print_insn): Declare.
8684 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8685 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8686 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8687 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8688 * frv-tdep.c (frv_gdbarch_init): Likewise.
8689 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8690 * gdbarch.sh (print_insn): Use default_print_insn.
8691 * gdbarch.c: Regenerated.
8692 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8693 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8694 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8695 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8696 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8697 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8698 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8699 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8700 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8701 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8702 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8703 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8704 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8705 * mt-tdep.c (mt_gdbarch_init): Likewise.
8706 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8707 * nios2-tdep.c (nios2_print_insn): Remove.
8708 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8709 * rx-tdep.c (rx_gdbarch_init): Likewise.
8710 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8711 * score-tdep.c (score_print_insn): Remove.
8712 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8713 * sh-tdep.c (sh_gdbarch_init): Likewise.
8714 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8715 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8716 * tic6x-tdep.c (tic6x_print_insn): Remove.
8717 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8718 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8719 * v850-tdep.c (v850_gdbarch_init): Likewise.
8720 * vax-tdep.c (vax_gdbarch_init): Likewise.
8721 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8722 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8723
8724 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8725
8726 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8727 (MIPS_FP0_REGNUM): Remove.
8728 (MIPS_FSR_REGNUM): Remove.
8729 (mips_fbsd_supply_fpregs): Use mips_regnum.
8730 (mips_fbsd_supply_gregs): Likewise.
8731 (mips_fbsd_collect_fpregs): Likewise.
8732 (mips_fbsd_collect_gregs): Likewise.
8733
8734 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8735
8736 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8737 (getpfpregs_supplies): New function.
8738 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8739 getfpregs_supplies.
8740 (mips_fbsd_store_inferior_registers): Likewise.
8741
8742 2017-05-22 Pedro Alves <palves@redhat.com>
8743
8744 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8745 maintainer.
8746
8747 2017-05-22 Alan Hayward <alan.hayward@arm.com>
8748
8749 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8750 (store_register): Likewise.
8751 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8752 (get_decimal_float_return_value): Likewise.
8753 (do_ppc_sysv_return_value): Likewise.
8754 (ppc64_sysv_abi_push_integer): Likewise.
8755 (ppc64_sysv_abi_push_freg): Likewise.
8756 (ppc64_sysv_abi_return_value_base): Likewise.
8757 (ppc64_sysv_abi_return_value): Likewise.
8758 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8759 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8760 * rs6000-nat.c: Likewise.
8761 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8762 (rs6000_value_to_register): Likewise.
8763 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8764
8765 2017-05-21 Tom Tromey <tom@tromey.com>
8766
8767 PR rust/21466:
8768 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8769 arrays as "[T]", not "[T; ]".
8770
8771 2017-05-19 Tom Tromey <tom@tromey.com>
8772
8773 PR rust/21484:
8774 * rust-lang.c (exp_descriptor_rust): New function.
8775 (rust_language_defn): Use it.
8776 * p-lang.c (pascal_language_defn): Update.
8777 * opencl-lang.c (opencl_language_defn): Update.
8778 * objc-lang.c (objc_language_defn): Update.
8779 * m2-lang.c (m2_language_defn): Update.
8780 * language.h (struct language_defn)
8781 <la_watch_location_expression>: New member.
8782 * language.c (unknown_language_defn, auto_language_defn)
8783 (local_language_defn): Update.
8784 * go-lang.c (go_language_defn): Update.
8785 * f-lang.c (f_language_defn): Update.
8786 * d-lang.c (d_language_defn): Update.
8787 * c-lang.h (c_watch_location_expression): Declare.
8788 * c-lang.c (c_watch_location_expression): New function.
8789 (c_language_defn, cplus_language_defn, asm_language_defn)
8790 (minimal_language_defn): Use it.
8791 * breakpoint.c (watch_command_1): Call
8792 la_watch_location_expression.
8793 * ada-lang.c (ada_language_defn): Update.
8794
8795 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8796
8797 PR tui/21482
8798 * gdb_curses.h (NOMACROS): Define.
8799 (NCURSES_NOMACROS): Define.
8800
8801 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8802
8803 PR tui/21482
8804 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8805 arg to char *.
8806 * tui/tui-wingeneral.c (box_win): Likewise.
8807 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
8808 (tui_show_source_line): Likewise.
8809 (tui_show_exec_info_content): Likewise.
8810
8811 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
8812
8813 * sparc-tdep.c (sparc_structure_return_p)
8814 (sparc_arg_on_registers_p): New functions.
8815 (sparc32_store_arguments): Use them.
8816 * sparc64-tdep.c (sparc64_16_byte_align_p)
8817 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
8818 Handle TYPE_CODE_ARRAY.
8819
8820 2017-05-17 Yao Qi <yao.qi@linaro.org>
8821
8822 * cli/cli-decode.c (add_alias_cmd): New function.
8823 * command.h (add_alias_cmd): Declare.
8824 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
8825 instead call add_alias_cmd.
8826
8827 2017-05-17 Pedro Alves <palves@redhat.com>
8828
8829 * Makefile.in (nat_extra_makefile_frag): Rename to ...
8830 (nat_makefile_frag): ... this. All references updated.
8831 * configure.ac: Likewise.
8832 * configure.nat: Likewise. Enhance comments.
8833 * configure: Regenerate.
8834
8835 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8836
8837 * procfs.c (procfs_create_inferior): Change prototype to match
8838 definition.
8839
8840 2017-05-13 Eli Zaretskii <eliz@gnu.org>
8841
8842 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
8843 C++ compiler warning.
8844
8845 2017-05-12 Tom Tromey <tom@tromey.com>
8846
8847 PR rust/21483:
8848 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
8849 recurse, just call value_struct_elt directly.
8850
8851 2017-05-12 Tom Tromey <tom@tromey.com>
8852
8853 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
8854 OP_RUST_ARRAY>: Fix.
8855
8856 2017-05-12 Tom Tromey <tom@tromey.com>
8857
8858 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
8859
8860 2017-05-09 Yao Qi <yao.qi@linaro.org>
8861
8862 * regcache.c: Include <forward_list>.
8863 (struct regcache_list): Remove.
8864 (current_regcache): Update.
8865 (get_thread_arch_aspace_regcache): Update for std::forward_list.
8866 (regcache_thread_ptid_changed): Likewise.
8867 (registers_changed_ptid): Likewise.
8868 (current_regcache_size): Likewise.
8869
8870 2017-05-09 Yao Qi <yao.qi@linaro.org>
8871
8872 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
8873 (current_regcache_size): New function.
8874 (current_regcache_test): New function.
8875 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
8876
8877 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8878
8879 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
8880 (print_gp_register_row): Use get_frame_register_value.
8881
8882 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8883
8884 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
8885 (mips_supply_fpregset): Likewise.
8886 (mips64_supply_gregset): Likewise.
8887
8888 2017-05-08 Alan Hayward <alan.hayward@arm.com>
8889
8890 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
8891 regcache->raw_supply_zeroed.
8892
8893 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8894
8895 * configure.nat: Rearrange 'case' statements to match
8896 host before cpu.
8897
8898 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
8899
8900 * Makefile.in: Remove "@host_makefile_frag@". Add variables
8901 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
8902 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
8903 "@nat_extra_makefile_frag@".
8904 (Makefile): Remove dependency on "@frags@".
8905 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
8906 (data-directory/Makefile): Likewise.
8907 * config/aarch64/linux.mh: Deleted; moved contents to
8908 "gdb/configure.nat".
8909 * config/alpha/alpha-linux.mh: Likewise.
8910 * config/alpha/nbsd.mh: Likewise.
8911 * config/arm/linux.mh: Likewise.
8912 * config/arm/nbsdelf.mh: Likewise.
8913 * config/i386/cygwin.mh: Likewise.
8914 * config/i386/cygwin64.mh: Likewise.
8915 * config/i386/darwin.mh: Likewise.
8916 * config/i386/fbsd.mh: Likewise.
8917 * config/i386/fbsd64.mh: Likewise.
8918 * config/i386/go32.mh: Likewise.
8919 * config/i386/i386gnu.mh: Likewise.
8920 * config/i386/i386sol2.mh: Likewise.
8921 * config/i386/linux.mh: Likewise.
8922 * config/i386/linux64.mh: Likewise.
8923 * config/i386/mingw.mh: Likewise.
8924 * config/i386/mingw64.mh: Likewise.
8925 * config/i386/nbsd64.mh: Likewise.
8926 * config/i386/nbsdelf.mh: Likewise.
8927 * config/i386/nto.mh: Likewise.
8928 * config/i386/obsd.mh: Likewise.
8929 * config/i386/obsd64.mh: Likewise.
8930 * config/i386/sol2-64.mh: Likewise.
8931 * config/ia64/linux.mh: Likewise.
8932 * config/m32r/linux.mh: Likewise.
8933 * config/m68k/linux.mh: Likewise.
8934 * config/m68k/nbsdelf.mh: Likewise.
8935 * config/m68k/obsd.mh: Likewise.
8936 * config/m88k/obsd.mh: Likewise.
8937 * config/mips/fbsd.mh: Likewise.
8938 * config/mips/linux.mh: Likewise.
8939 * config/mips/nbsd.mh: Likewise.
8940 * config/mips/obsd64.mh: Likewise.
8941 * config/pa/linux.mh: Likewise.
8942 * config/pa/nbsd.mh: Likewise.
8943 * config/pa/obsd.mh: Likewise.
8944 * config/powerpc/aix.mh: Likewise.
8945 * config/powerpc/fbsd.mh: Likewise.
8946 * config/powerpc/linux.mh: Likewise.
8947 * config/powerpc/nbsd.mh: Likewise.
8948 * config/powerpc/obsd.mh: Likewise.
8949 * config/powerpc/ppc64-linux.mh: Likewise.
8950 * config/powerpc/spu-linux.mh: Likewise.
8951 * config/s390/linux.mh: Likewise.
8952 * config/sh/nbsd.mh: Likewise.
8953 * config/sparc/fbsd.mh: Likewise.
8954 * config/sparc/linux.mh: Likewise.
8955 * config/sparc/linux64.mh: Likewise.
8956 * config/sparc/nbsd64.mh: Likewise.
8957 * config/sparc/nbsdelf.mh: Likewise.
8958 * config/sparc/obsd64.mh: Likewise.
8959 * config/sparc/sol2.mh: Likewise.
8960 * config/tilegx/linux.mh: Likewise.
8961 * config/vax/nbsdelf.mh: Likewise.
8962 * config/vax/obsd.mh: Likewise.
8963 * config/xtensa/linux.mh: Likewise.
8964 * config/i386/i386gnu.mn: New file, with excerpts from
8965 "config/i386/i386gnu.mh".
8966 * configure: Regenerate.
8967 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
8968 *.mh files under "gdb/config".
8969 * configure.nat: New file, with contents from the
8970 "gdb/config/*/*.mh" files.
8971
8972 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
8973
8974 * btrace.c (btrace_clear): Free insn vector.
8975
8976 2017-05-05 Pedro Alves <palves@redhat.com>
8977
8978 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
8979 * configure: Regenerate.
8980
8981 2017-05-04 Pedro Alves <palves@redhat.com>
8982
8983 * Makefile.in (SFILES): Add progspace-and-thread.c.
8984 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
8985 (COMMON_OBS): Add progspace-and-thread.o.
8986 * breakpoint.c: Include "progspace-and-thread.h".
8987 (update_inserted_breakpoint_locations)
8988 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
8989 Use scoped_restore_current_pspace_and_thread.
8990 (create_std_terminate_master_breakpoint): Use
8991 scoped_restore_current_program_space.
8992 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
8993 (print_breakpoint_location): Use
8994 scoped_restore_current_program_space.
8995 (bp_loc_is_permanent): Use
8996 scoped_restore_current_pspace_and_thread.
8997 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
8998 (download_tracepoint_locations): Use
8999 scoped_restore_current_pspace_and_thread.
9000 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9001 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9002 (enum step_over_calls_kind): Moved from inferior.h.
9003 (class scoped_restore_current_thread): New class.
9004 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9005 declaration.
9006 (scoped_restore_current_thread): New class.
9007 * infcmd.c: Include "common/gdb_optional.h".
9008 (continue_1, proceed_after_attach): Use
9009 scoped_restore_current_thread.
9010 (notice_new_inferior): Use scoped_restore_current_thread.
9011 * inferior.c: Include "progspace-and-thread.h".
9012 (restore_inferior, save_current_inferior): Delete.
9013 (add_inferior_command, clone_inferior_command): Use
9014 scoped_restore_current_pspace_and_thread.
9015 * inferior.h (scoped_restore_current_inferior): New class.
9016 * infrun.c: Include "progspace-and-thread.h" and
9017 "common/gdb_optional.h".
9018 (follow_fork_inferior): Use
9019 scoped_restore_current_pspace_and_thread.
9020 (scoped_restore_exited_inferior): New class.
9021 (handle_vfork_child_exec_or_exit): Use
9022 scoped_restore_exited_inferior,
9023 scoped_restore_current_pspace_and_thread,
9024 scoped_restore_current_thread and scoped_restore.
9025 (fetch_inferior_event): Use scoped_restore_current_thread.
9026 * linespec.c (decode_line_full, decode_line_1): Use
9027 scoped_restore_current_program_space.
9028 * mi/mi-main.c: Include "progspace-and-thread.h".
9029 (exec_continue): Use scoped_restore_current_thread.
9030 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9031 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9032 * proc-service.c (ps_pglobal_lookup): Use
9033 scoped_restore_current_program_space.
9034 * progspace-and-thread.c: New file.
9035 * progspace-and-thread.h: New file.
9036 * progspace.c (release_program_space, clone_program_space): Use
9037 scoped_restore_current_program_space.
9038 (restore_program_space, save_current_program_space)
9039 (save_current_space_and_thread): Delete.
9040 (switch_to_program_space_and_thread): Moved to
9041 progspace-and-thread.c.
9042 * progspace.h (save_current_program_space)
9043 (save_current_space_and_thread): Delete declarations.
9044 (scoped_restore_current_program_space): New class.
9045 * remote.c (remote_btrace_maybe_reopen): Use
9046 scoped_restore_current_thread.
9047 * symtab.c: Include "progspace-and-thread.h".
9048 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9049 * thread.c (print_thread_info_1): Use
9050 scoped_restore_current_thread.
9051 (struct current_thread_cleanup): Delete.
9052 (do_restore_current_thread_cleanup)
9053 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9054 (scoped_restore_current_thread::~scoped_restore_current_thread):
9055 ... this new dtor.
9056 (make_cleanup_restore_current_thread): Rename/convert to ...
9057 (scoped_restore_current_thread::scoped_restore_current_thread):
9058 ... this new ctor.
9059 (thread_apply_all_command): Use scoped_restore_current_thread.
9060 (thread_apply_command): Use scoped_restore_current_thread.
9061 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9062 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9063
9064 2017-05-04 Pedro Alves <palves@redhat.com>
9065
9066 * thread.c (make_cleanup_restore_current_thread): Move
9067 find_thread_ptid call before the is_stopped call. Assert that the
9068 thread is found. Replace is_stopped call by checking the thread's
9069 state directly. Remove unnecessary NULL-thread check.
9070
9071 2017-05-04 Pedro Alves <palves@redhat.com>
9072
9073 * corelow.c (thread_section_name): New class.
9074 (get_core_register_section, get_core_siginfo): Use it.
9075
9076 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9077
9078 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9079 (get_core_register_section): Remove xfree of NULL pointer.
9080
9081 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9082
9083 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9084 * regcache.c (regcache::raw_supply_zeroed): New function.
9085 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9086
9087 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9088
9089 * gdbarch.sh: Remove commented out definition of
9090 TARGET_CHAR_BIT.
9091 * gdbarch.h: Re-generate.
9092
9093 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9094
9095 * configure: Regenerate.
9096
9097 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9098
9099 * solib-target.c (solib_target_relocate_section_addresses):
9100 Remove num_section_bases, num_bases, segment_bases variables.
9101
9102 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9103
9104 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9105
9106 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9107
9108 * solib-target.c: Include <vector>
9109 (struct lm_info_target) <~lm_info_target>: Remove.
9110 <segment_bases, section_bases>: Change type to
9111 std::vector<CORE_ADDR>.
9112 (library_list_start_segment, library_list_start_section,
9113 library_list_end_library,
9114 solib_target_relocate_section_addresses): Adjust.
9115
9116 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9117
9118 * gdbarch.sh (software_single_step): Change return type to
9119 std::vector<CORE_ADDR>.
9120 * gdbarch.c, gdbarch.h: Re-generate.
9121 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9122 Adjust.
9123 (arm_deal_with_atomic_sequence_raw): Adjust.
9124 (thumb_get_next_pcs_raw): Adjust.
9125 (arm_get_next_pcs_raw): Adjust.
9126 (arm_get_next_pcs): Adjust.
9127 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9128 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9129 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9130 (alpha_software_single_step): Adjust.
9131 * alpha-tdep.h (alpha_software_single_step): Adjust.
9132 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9133 * arm-tdep.c (arm_software_single_step): Adjust.
9134 (arm_breakpoint_kind_from_current_state): Adjust.
9135 * arm-tdep.h (arm_software_single_step): Adjust.
9136 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9137 * cris-tdep.c (cris_software_single_step): Adjust.
9138 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9139 (micromips_deal_with_atomic_sequence): Adjust.
9140 (deal_with_atomic_sequence): Adjust.
9141 (mips_software_single_step): Adjust.
9142 * mips-tdep.h (mips_software_single_step): Adjust.
9143 * moxie-tdep.c (moxie_software_single_step): Adjust.
9144 * nios2-tdep.c (nios2_software_single_step): Adjust.
9145 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9146 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9147 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9148 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9149 * sparc-tdep.c (sparc_software_single_step): Adjust.
9150 * spu-tdep.c (spu_software_single_step): Adjust.
9151 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9152
9153 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9154
9155 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9156 * gdbarch.h: Re-generate.
9157
9158 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9159
9160 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9161 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9162 * python/py-instruction.c, python/py-instruction.h: New file.
9163 * python/py-record.c: Add py-instruction.h include.
9164 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9165 gdb.RecordInstruction.
9166 * python/python-internal.h: Add gdbpy_initialize_instruction
9167 declaration.
9168 * python/python.c (do_start_initialization): Add
9169 gdbpy_initialize_instruction.
9170
9171 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9172
9173 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9174 Remove.
9175 (btrace_func_from_recpy_func): New function.
9176 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9177 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9178 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9179 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9180 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9181 Also, use new helper functions.
9182 (btpy_list_item): Use new helper functions.
9183 (recpy_bt_function_call_history): Use new type name.
9184 (btpy_call_getset): Remove.
9185 (gdbpy_initialize_btrace): Remove code to initialize
9186 gdb.BtraceFunctionCall.
9187 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9188 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9189 recpy_bt_func_prev, recpy_bt_func_next): New export.
9190 * python/py-record.c (recpy_func_type): New static object.
9191 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9192 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9193 recpy_func_next): New function.
9194 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9195 (recpy_func_getset): New static object.
9196 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9197 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9198
9199 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9200
9201 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9202 (btpy_object, btpy_insn_type, btpy_new): Remove.
9203 (btpy_list_object): Use gdb.RecordInstruction type instead of
9204 gdb.BtraceInstruction type.
9205 (btrace_insn_from_recpy_insn): New function.
9206 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9207 btpy_new.
9208 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9209 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9210 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9211 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9212 instead of btpy_object.
9213 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9214 btpy_insn_data, btpy_insn_decode): Rename to ...
9215 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9216 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9217 recpy_bt_insn_decode): This. Also, use new helper functions.
9218 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9219 recpy_insn_type.
9220 (btpy_insn_getset): Remove.
9221 (gdbpy_initialize_btrace): Remove code to initialize
9222 gdb.BtraceInstruction. Use recpy_element_object.
9223 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9224 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9225 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9226 * python/py-record.c (recpy_insn_type): New static object.
9227 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9228 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9229 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9230 New function.
9231 (recpy_insn_getset): New static object.
9232 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9233 * python/py-record.h (recpy_element_object): New typedef.
9234 (recpy_insn_type, recpy_insn_new): New export.
9235
9236 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9237
9238 * py-record-btrace.c (btpy_insn_new): Removed.
9239 (btpy_insn_or_gap_new): New function.
9240 (btpy_insn_error): Removed.
9241 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9242 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9243 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9244 btpy_insn_or_gap_new instead of btpy_insn_new.
9245 (btpy_insn_getset): Remove btpy_insn_error.
9246 * py-record.c (recpy_gap_type): New static object.
9247 (recpy_gap_object): New typedef.
9248 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9249 recpy_gap_reason_string): New function.
9250 (recpy_gap_getset): New static object.
9251 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9252 * py-record.h (recpy_gap_new): New export.
9253
9254 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9255
9256 * python/py-record.c (recpy_ptid): Remove.
9257 (recpy_record_getset): Remove recpy_ptid.
9258
9259 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9260
9261 * btrace.c (btrace_fetch): Set inferior_ptid.
9262 * python/py-record-btrace.c: Add "py-record.h" include.
9263 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9264 recpy_bt_end, recpy_bt_instruction_history,
9265 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9266 in gdb.Record object instead of current ptid.
9267 * python/py-record.c: Include new "py-record.h" file.
9268 (recpy_record_object): Moved to py-record.h.
9269 * python/py-record.h: New file.
9270
9271 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9272
9273 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9274 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9275 indentation.
9276
9277 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9278
9279 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9280 the past maintainers section.
9281
9282 2017-04-28 Yao Qi <yao.qi@linaro.org>
9283
9284 * infcmd.c (get_return_value): Use regcache ctor, and remove
9285 cleanup.
9286
9287 2017-04-28 Yao Qi <yao.qi@linaro.org>
9288 Pedro Alves <palves@redhat.com>
9289
9290 * regcache.c (regcache::regcache): New tag dispatch ctor.
9291 (do_cooked_read): Moved above.
9292 (regcache_dup): Use the tag dispatch ctor..
9293 * regcache.h (regcache): Declare ctor, delete copy ctor and
9294 assignment operator, remove friend regcache_dup.
9295
9296 2017-04-28 Yao Qi <yao.qi@linaro.org>
9297
9298 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9299 call method save instead of regcache_cpy.
9300 * regcache.h (struct regcache): Make regcache_dup a friend.
9301
9302 2017-04-28 Yao Qi <yao.qi@linaro.org>
9303
9304 * regcache.c (struct regcache): Move to regcache.h
9305 (regcache::arch): New method.
9306 (regcache_get_ptid): Update.
9307 (get_regcache_arch): Call arch method.
9308 (get_regcache_aspace): Call method aspace.
9309 (register_buffer): Change it to method.
9310 (regcache_save): Change it to regcache::save.
9311 (regcache_restore): Likewise.
9312 (regcache_cpy_no_passthrough): Remove the declaration.
9313 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9314 (regcache_cpy_no_passthrough): Change it to method
9315 cpy_no_passthrough.
9316 (regcache_register_status): Change it to method
9317 get_register_status.
9318 (regcache_invalidate): Change it to method invalidate.
9319 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9320 (regcache_raw_update): Change it to method raw_update.
9321 (regcache_raw_read): Likewise.
9322 (regcache_raw_read_signed): Likewise.
9323 (regcache_raw_read_unsigned): Likewise.
9324 (regcache_raw_write_signed): Likewise.
9325 (regcache_raw_write_unsigned): Likewise.
9326 (regcache_cooked_read): Likewise.
9327 (regcache_cooked_read_value): Likewise.
9328 (regcache_cooked_read_signed): Likewise.
9329 (regcache_cooked_read_unsigned): Likewise.
9330 (regcache_cooked_write_signed): Likewise.
9331 (regcache_cooked_write_unsigned): Likewise.
9332 (regcache_raw_set_cached_value): Likewise.
9333 (regcache_raw_write): Likewise.
9334 (regcache_cooked_write): Likewise.
9335 (regcache_xfer_part): Likewise.
9336 (regcache_raw_read_part): Likewise.
9337 (regcache_raw_write_part): Likewise.
9338 (regcache_cooked_read_part): Likewise.
9339 (regcache_cooked_write_part): Likewise.
9340 (regcache_raw_supply): Likewise.
9341 (regcache_raw_collect): Likewise.
9342 (regcache_transfer_regset): Likewise.
9343 (regcache_supply_regset): Likewise.
9344 (regcache_collect_regset): Likewise.
9345 (regcache_debug_print_register): Likewise.
9346 (enum regcache_dump_what): Move it to regcache.h.
9347 (regcache_dump): Change it to method dump.
9348 * regcache.h (enum regcache_dump_what): New.
9349 (class regcache): New.
9350 * target.c (target_fetch_registers): Call method
9351 debug_print_register.
9352 (target_store_registers): Likewise.
9353
9354 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9355
9356 * windows-nat.c (struct lm_info_windows): Initialize field.
9357 (windows_make_so): Allocate lm_info_windows with new.
9358 (windows_free_so): Free lm_info_windows with delete.
9359
9360 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9361
9362 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9363 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9364 cleanup.
9365 (darwin_free_so): Free lm_info_darwin with delete.
9366
9367 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9368
9369 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9370 <l_addr_p>: Change type to bool.
9371 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9372 (svr4_free_so): Free lm_info_svr4 with delete.
9373 (svr4_copy_library_list): Replace memcpy with call to copy
9374 constructor.
9375 (library_list_start_library, svr4_default_sos): Allocate
9376 lm_info_svr4 with new.
9377
9378 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9379
9380 * solib-target.c (struct lm_info_target): Add destructor,
9381 initialize fields.
9382 <name>: Change type to std::string.
9383 (library_list_start_library): Allocate lm_info_target with new.
9384 (solib_target_free_library_list): Free lm_info_target with
9385 delete.
9386 (solib_target_current_sos): Adapt to std::string.
9387 (solib_target_free_so): Free lm_info_target with delete.
9388
9389 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9390
9391 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9392 fields.
9393 (frv_current_sos): Allocate lm_info_frv with new.
9394 (frv_relocate_main_executable): Free lm_info_frv with delete,
9395 allocate with new.
9396 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9397
9398 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9399
9400 * solib-frv.c (struct lm_info_frv): Fix indentation.
9401
9402 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9403
9404 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9405 map field.
9406 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9407 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9408 and allocate with new.
9409 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9410
9411 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9412
9413 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9414 <filename, member_name>: Change type to std::string.
9415 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9416 (library_list_start_library): Allocate lm_info_aix with new.
9417 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9418 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9419 with copy constructor.
9420
9421 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9422
9423 * solist.h (struct lm_info): Remove.
9424 (struct lm_info_base): New class.
9425 (struct so_list) <lm_info>: Change type to lm_info_base *.
9426 * nto-tdep.c (struct lm_info): Remove.
9427 (lm_addr): Adjust.
9428 * solib-aix.c (struct lm_info): Rename to ...
9429 (struct lm_info_aix): ... this. Extend lm_info_base.
9430 (lm_info_p): Rename to ...
9431 (lm_info_aix_p): ... this, and adjust.
9432 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9433 solib_aix_parse_libraries, library_list_start_library,
9434 solib_aix_free_library_list, solib_aix_parse_libraries,
9435 solib_aix_get_library_list,
9436 solib_aix_relocate_section_addresses, solib_aix_free_so,
9437 solib_aix_get_section_offsets,
9438 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9439 Adjust.
9440 (struct solib_aix_inferior_data) <library_list>: Adjust.
9441 * solib-darwin.c (struct lm_info): Rename to ...
9442 (struct lm_info_darwin): ... this. Extend lm_info_base.
9443 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9444 * solib-dsbt.c (struct lm_info): Rename to ...
9445 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9446 (struct dsbt_info) <main_executable_lm_info): Adjust.
9447 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9448 dsbt_relocate_section_addresses): Adjust.
9449 * solib-frv.c (struct lm_info): Rename to ...
9450 (struct lm_info_frv): ... this. Extend lm_info_base.
9451 (main_executable_lm_info): Adjust.
9452 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9453 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9454 find_canonical_descriptor_in_load_object,
9455 frv_fdpic_find_canonical_descriptor): Adjust.
9456 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9457 to lm_info_svr4.
9458 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9459 svr4_clear_so, svr4_copy_library_list,
9460 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9461 svr4_current_sos, svr4_fetch_objfile_link_map,
9462 solist_update_incremental): Adjust.
9463 * solib-svr4.h (struct lm_info_svr4): Move here from
9464 solib-svr4.c.
9465 * solib-target.c (struct lm_info): Rename to ...
9466 (struct lm_info_target): ... this. Extend lm_info_base.
9467 (lm_info_p): Rename to ...
9468 (lm_info_target_p): ... this.
9469 (solib_target_parse_libraries, library_list_start_segment,
9470 library_list_start_section, library_list_start_library,
9471 library_list_end_library, solib_target_free_library_list,
9472 solib_target_current_sos, solib_target_free_so,
9473 solib_target_relocate_section_addresses): Adjust.
9474 * windows-nat.c (struct lm_info): Rename to ...
9475 (struct lm_info_windows): ... this. Extend lm_info_base.
9476 (windows_make_so, handle_load_dll, handle_unload_dll,
9477 windows_xfer_shared_libraries): Adjust.
9478
9479 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9480
9481 * solib-darwin.c (struct darwin_so_list): Remove.
9482 (darwin_current_sos): Allocate an so_list object instead of a
9483 darwin_so_list, separately allocate an lm_info object.
9484 (darwin_free_so): Free lm_info.
9485
9486 2017-04-28 John Baldwin <jhb@FreeBSD.org>
9487
9488 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9489 with fprintf_filtered.
9490
9491 2017-04-28 Yao Qi <yao.qi@linaro.org>
9492
9493 * regcache.c (regcache::regcache): New function.
9494 (regcache::~regcache): New function.
9495 (regcache_xmalloc_1): Remove.
9496 (regcache_xmalloc): Call new regcache.
9497 (regcache_xfree): Call delete regcache.
9498 (get_thread_arch_aspace_regcache): Call new regcache.
9499
9500 2017-04-28 Yao Qi <yao.qi@linaro.org>
9501
9502 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9503 lwp instead of ptid_get_lwp.
9504
9505 2017-04-28 Yao Qi <yao.qi@linaro.org>
9506
9507 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9508 lwp_info instead of getting from inferior_ptid.
9509
9510 2017-04-27 Keith Seitz <keiths@redhat.com>
9511
9512 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9513 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9514 (CV_CONVERSION_BADNESS): Define.
9515 (rank_one_type): Remove overly restrictive rvalue reference
9516 rank checks.
9517 Add cv-qualifier checks and subranks for type equality.
9518 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9519 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9520 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9521
9522 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9523
9524 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9525 count when creating the object.
9526
9527 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9528 Ulrich Weigand <uweigand@de.ibm.com>
9529
9530 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9531 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9532 is used in AIX.
9533 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9534 (process_xcoff_symbol): Likewise.
9535 (scan_xcoff_symtab): Likewise.
9536
9537 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9538
9539 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9540 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9541 (ia64_access_reg): Use get_frame_register_unsigned.
9542 (ia64_access_rse_reg): Likewise.
9543 (ia64_libunwind_frame_prev_register): Likewise.
9544
9545 2017-04-26 Jiong Wang <jiong.wang@arm.com>
9546
9547 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9548 * gdbarch.c: Regenerated.
9549 * gdbarch.h: Regenerated.
9550 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9551 visibility external.
9552 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9553 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9554 (enum cfa_how_kind): Move to ...
9555 (struct dwarf2_frame_state_reg_info): Likewise.
9556 (struct dwarf2_frame_state): Likewise.
9557 * dwarf2-frame.h: ... here.
9558 (dwarf2_frame_state_alloc_regs): New declaration.
9559 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9560 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9561
9562 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9563
9564 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9565 regcache_raw_read_unsigned.
9566 (xtensa_pseudo_register_write): Likewise.
9567
9568 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9569
9570 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9571 (nds32_pseudo_register_write): Likewise.
9572
9573 2017-04-25 Yao Qi <yao.qi@linaro.org>
9574
9575 * regcache.c (struct regcache) <readonly_p>: Change its type
9576 to bool.
9577 (regcache_xmalloc_1): Update parameter type and callers update.
9578
9579 2017-04-25 Yao Qi <yao.qi@linaro.org>
9580
9581 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9582 set_gdbarch_wchar_bit.
9583 * arm-tdep.c (arm_gdbarch_init): Likewise.
9584
9585 2017-04-25 Pedro Alves <palves@redhat.com>
9586
9587 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9588 (BothAreRelocatable, memcopy, memmove): Don't define.
9589 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9590 macros.
9591
9592 2017-04-25 Pedro Alves <palves@redhat.com>
9593
9594 * common/common-defs.h: Include "common/poison.h".
9595 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9596 and adjust.
9597 * common/poison.h: New file.
9598 * common/traits.h: Include <type_traits>.
9599 (Not, Or, Requires): New, moved from common/function-view.h.
9600
9601 2017-04-25 Pedro Alves <palves@redhat.com>
9602
9603 * breakpoint.h (struct breakpoint): In-class initialize all
9604 fields. Make boolean fields "bool".
9605 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9606 memset call and initializations no longer necessary.
9607
9608 2017-04-25 Pedro Alves <palves@redhat.com>
9609
9610 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9611 reference.
9612 (pt_btrace_insn): New function.
9613 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9614
9615 2017-04-25 Pedro Alves <palves@redhat.com>
9616
9617 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9618 "base" field and inherit from "bp_location" instead. Add
9619 non-default ctor.
9620 (allocate_location_exception): Use new non-default ctor.
9621 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9622 (init_bp_location): Convert to ...
9623 (bp_location::bp_location): ... this new ctor, and remove memset
9624 call.
9625 (base_breakpoint_allocate_location): Use the new non-default ctor.
9626 * breakpoint.h (bp_location): Now a class. Declare default and
9627 non-default ctors. In-class initialize all members.
9628 (init_bp_location): Remove declaration.
9629
9630 2017-04-25 Pedro Alves <palves@redhat.com>
9631
9632 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9633 assignment operator.
9634
9635 2017-04-24 Yao Qi <yao.qi@linaro.org>
9636
9637 * doublest.c (convert_doublest_to_floatformat): Call
9638 floatformat_totalsize_bytes.
9639
9640 2017-04-22 Tom Tromey <tom@tromey.com>
9641
9642 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9643 ui_out_emit_list.
9644 * stack.c (print_frame): Use ui_out_emit_list.
9645 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9646 ui_out_emit_list.
9647 * mi/mi-main.c (print_one_inferior)
9648 (mi_cmd_data_list_register_names)
9649 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9650 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9651 ui_out_emit_list.
9652 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9653 (mi_output_solib_attribs): Use ui_out_emit_list,
9654 ui_out_emit_tuple.
9655 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9656 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9657 (mi_cmd_stack_list_args, list_args_or_locals): Use
9658 ui_out_emit_list.
9659 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9660 * breakpoint.c (print_solib_event, output_thread_groups): Use
9661 ui_out_emit_list.
9662
9663 2017-04-22 Tom Tromey <tom@tromey.com>
9664
9665 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9666 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9667 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9668
9669 2017-04-22 Tom Tromey <tom@tromey.com>
9670
9671 * tracepoint.c (tvariables_info_1)
9672 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9673
9674 2017-04-22 Tom Tromey <tom@tromey.com>
9675
9676 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9677 annotate_arg_emitter.
9678 * breakpoint.c (print_mention_watchpoint)
9679 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9680 * annotate.h (struct annotate_arg_emitter): New.
9681
9682 2017-04-22 Tom Tromey <tom@tromey.com>
9683
9684 * record-btrace.c (record_btrace_insn_history)
9685 (record_btrace_insn_history_range, record_btrace_call_history)
9686 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9687 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9688 ui_out_emit_tuple.
9689 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9690 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9691 * skip.c (skip_info): Use ui_out_emit_tuple.
9692 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9693 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9694 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9695 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9696 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9697 ui_out_emit_tuple.
9698 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9699 (output_register, mi_cmd_data_read_memory)
9700 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9701 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9702 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9703 Use ui_out_emit_tuple.
9704 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9705 ui_out_emit_tuple.
9706 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9707 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9708 * linux-thread-db.c (info_auto_load_libthread_db): Use
9709 ui_out_emit_tuple.
9710 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9711 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9712 * disasm.c (do_mixed_source_and_assembly_deprecated)
9713 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9714 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9715 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9716 * breakpoint.c (print_one_breakpoint_location)
9717 (print_one_breakpoint): Use ui_out_emit_tuple.
9718 * auto-load.c (print_script, info_auto_load_cmd): Use
9719 ui_out_emit_tuple.
9720 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9721
9722 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9723
9724 * thread.c (print_thread_info_1): Remove dead code.
9725
9726 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9727
9728 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9729 GDB_SELF_TEST.
9730 * arm-tdep.c (selftests::arm_record_test): Likewise.
9731
9732 2017-04-21 Yao Qi <yao.qi@linaro.org>
9733
9734 * regcache.c (regcache_restore): Remove argument 2. Replace
9735 argument 3 with regcache. Get register status from
9736 src->register_status and get register contents from
9737 register_buffer (src, regnum).
9738 (regcache_cpy): Update.
9739
9740 2017-04-19 Pedro Alves <palves@redhat.com>
9741
9742 * gdbthread.h (thread): Add missing closing parenthesis in
9743 comment.
9744
9745 2017-04-19 Pedro Alves <palves@redhat.com>
9746
9747 * common/refcounted-object.h: New file.
9748 * gdbthread.h: Include "common/refcounted-object.h".
9749 (thread_info): Inherit from refcounted_object and add comments.
9750 (thread_info::incref, thread_info::decref)
9751 (thread_info::m_refcount): Delete.
9752 (thread_info::deletable): Use the refcounted_object::refcount()
9753 method.
9754 * inferior.c (current_inferior_): Add comment.
9755 (set_current_inferior): Increment/decrement refcounts.
9756 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9757 not-deletable instead of comparing with the current inferior.
9758 (initialize_inferiors): Increment the initial inferior's refcount.
9759 * inferior.h (struct inferior): Forward declare.
9760 Include "common/refcounted-object.h".
9761 (current_inferior, set_current_inferior): Move declaration to
9762 before struct inferior's definition, and fix comment.
9763 (inferior): Inherit from refcounted_object. Add comments.
9764 * thread.c (switch_to_thread_no_regs): Reference the thread's
9765 inferior pointer directly instead of doing a ptid lookup.
9766 (switch_to_no_thread): New function.
9767 (switch_to_thread(thread_info *)): New function, factored out
9768 from ...
9769 (switch_to_thread(ptid_t)): ... this.
9770 (restore_current_thread): Delete.
9771 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9772 fields, and add 'inf' field.
9773 (do_restore_current_thread_cleanup): Check whether old->inf is
9774 alive instead of looking up an inferior by ptid. Use
9775 switch_to_thread and switch_to_no_thread.
9776 (restore_current_thread_cleanup_dtor): Use old->inf directly
9777 instead of lookup up an inferior by id. Decref the inferior.
9778 Don't restore 'removable'.
9779 (make_cleanup_restore_current_thread): Same the inferior pointer
9780 in old, instead of the inferior number. Incref the inferior.
9781 Don't save/clear 'removable'.
9782
9783 2017-04-19 Pedro Alves <palves@redhat.com>
9784
9785 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9786 unittests/scoped_restore-selftests.c.
9787 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9788 * common/scoped_restore.h (scoped_restore_base): Make "class".
9789 (scoped_restore_base::release): New public method.
9790 (scoped_restore_base::scoped_restore_base): New protected ctor.
9791 (scoped_restore_base::m_saved_var): New protected field.
9792 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9793 scoped_restore_base base class instead of m_saved_var directly.
9794 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9795 (scoped_restore_tmpl::scoped_restore_tmpl(const
9796 scoped_restore_tmpl<T>&)): Likewise.
9797 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9798 method.
9799 (scoped_restore_tmpl::saved_var): New method.
9800 (scoped_restore_tmpl::m_saved_var): Delete.
9801 * inferior.h (inferior::detaching): Now a bool.
9802 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9803 cleanup.
9804 * unittests/scoped_restore-selftests.c: New file.
9805
9806 2017-04-19 Pedro Alves <palves@redhat.com>
9807
9808 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
9809 Re-sort in alphabetic order.
9810
9811 2017-04-18 Pedro Alves <palves@redhat.com>
9812
9813 * xml-support.c (obstack_xml_printf): Delete.
9814 * xml-support.h (obstack_xml_printf): Delete.
9815
9816 2017-04-18 Pedro Alves <palves@redhat.com>
9817
9818 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
9819 vdebug, verror, body_text, start_element, end_element, name,
9820 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
9821 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
9822 is_xinclude>: Make private and add m_ prefix.
9823 (gdb_xml_parser::body_text): New method, based on ...
9824 (gdb_xml_body_text): ... this. Adjust.
9825 (gdb_xml_parser::vdebug): New method, based on ...
9826 (gdb_xml_debug): ... this. Adjust.
9827 (gdb_xml_parser::verror): New method, based on ...
9828 (gdb_xml_error): ... this. Adjust.
9829 (gdb_xml_parser::start_element): New method, based on ...
9830 (gdb_xml_start_element): ... this. Adjust.
9831 (gdb_xml_start_element_wrapper): Defer to
9832 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
9833 (gdb_xml_parser::end_element): New method, based on ...
9834 (gdb_xml_end_element_wrapper): ... this. Adjust.
9835 (gdb_xml_parser::~gdb_xml_parser): Adjust.
9836 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
9837 (gdb_xml_parser::use_dtd): New method, based on ...
9838 (gdb_xml_use_dtd): ... this. Adjust.
9839 (gdb_xml_parser::parse): New method, based on ...
9840 (gdb_xml_parse): ... this. Adjust.
9841 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
9842 (xinclude_start_include): Adjust to call the parser's name method.
9843 (xml_xinclude_default, xml_xinclude_start_doctype)
9844 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
9845 method.
9846 (xml_process_xincludes): Adjust to call parser methods.
9847 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
9848 declarations.
9849
9850 2017-04-18 Pedro Alves <palves@redhat.com>
9851
9852 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
9853 gdb::optional<std::string>.
9854 * xml-support.c: Include <string>.
9855 (scope_level::scope_level(scope_level &&))
9856 (scope_level::~scope_level): Delete.
9857 (scope_level::body): Now a std::string.
9858 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
9859 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
9860 parameter.
9861 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
9862 (xinclude_parsing_data::output): Now a std::string reference.
9863 (xinclude_start_include): Adjust.
9864 (xml_xinclude_default): Adjust.
9865 (xml_process_xincludes): Add 'output' parameter, and return bool.
9866 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
9867 and return bool.
9868 * xml-tdesc.c: Include <unordered_map> and <string>.
9869 (tdesc_xml_cache): Delete.
9870 (tdesc_xml_cache_s): Delete.
9871 (xml_cache): Now an std::unordered_map.
9872 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
9873 (target_fetch_description_xml): Change return type to
9874 gdb::optional<std::string>, and adjust.
9875 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
9876 (target_fetch_description_xml): Change return type to
9877 gdb::optional<std::string>.
9878
9879 2017-04-18 Pedro Alves <palves@redhat.com>
9880
9881 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9882 unittests/optional-selftests.c.
9883 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
9884 * unittests/optional-selftests.c: New file.
9885 * unittests/optional/assignment/1.cc: New file.
9886 * unittests/optional/assignment/2.cc: New file.
9887 * unittests/optional/assignment/3.cc: New file.
9888 * unittests/optional/assignment/4.cc: New file.
9889 * unittests/optional/assignment/5.cc: New file.
9890 * unittests/optional/assignment/6.cc: New file.
9891 * unittests/optional/assignment/7.cc: New file.
9892 * unittests/optional/cons/copy.cc: New file.
9893 * unittests/optional/cons/default.cc: New file.
9894 * unittests/optional/cons/move.cc: New file.
9895 * unittests/optional/cons/value.cc: New file.
9896 * unittests/optional/in_place.cc: New file.
9897 * unittests/optional/observers/1.cc: New file.
9898 * unittests/optional/observers/2.cc: New file.
9899
9900 2017-04-18 Pedro Alves <palves@redhat.com>
9901
9902 * common/gdb_optional.h: Include common/traits.h.
9903 (in_place_t): New type.
9904 (in_place): New constexpr variable.
9905 (optional::optional): Remove member initialization of
9906 m_instantiated.
9907 (optional::optional(in_place_t...)): New constructor.
9908 (optional::~optional): Use reset.
9909 (optional::optional(const optional&)): New.
9910 (optional::optional(const optional&&)): New.
9911 (optional::optional(T &)): New.
9912 (optional::optional(T &&)): New.
9913 (operator::operator=(const optional &)): New.
9914 (operator::operator=(optional &&)): New.
9915 (operator::operator= (const T &))
9916 (operator::operator= (T &&))
9917 (operator::emplace (Args &&... args)): Return a T&. Use reset.
9918 (operator::reset): New.
9919 (operator::m_instantiated):: Add in-class initializer.
9920 * common/traits.h: Include <type_traits>.
9921 (struct And): New types.
9922
9923 2017-04-18 Pedro Alves <palves@redhat.com>
9924
9925 * xml-support.c: Include <vector>.
9926 (scope_level::scope_level(const gdb_xml_element *))
9927 (scope_level::scope_level(scope_level&&)): New.
9928 (scope_level::~scope_level): New.
9929 (scope_level_s): Delete.
9930 (gdb_xml_parser::scopes): Now a std::vector.
9931 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
9932 Use std::vector.
9933 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
9934 scope cleanup code.
9935 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
9936 of the scopes member. Use std::vector::emplace_back.
9937
9938 2017-04-18 Pedro Alves <palves@redhat.com>
9939
9940 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
9941 a bool.
9942 (gdb_xml_end_element): Change type of first parameter.
9943 (gdb_xml_cleanup): Rename to ...
9944 (gdb_xml_parser::~gdb_xml_parser): ... this.
9945 (gdb_xml_create_parser_and_cleanup): Delete with ...
9946 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
9947 to this new ctor.
9948 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
9949 using gdb_xml_create_parser_and_cleanup.
9950 (xinclude_parsing_data): Add ctor/dtor.
9951 (xml_xinclude_cleanup): Delete.
9952 (xml_process_xincludes): Create a local xinclude_parsing_data
9953 instead of heap-allocating one. Create a local gdb_xml_parser
9954 instead of heap-allocating one with
9955 gdb_xml_create_parser_and_cleanup.
9956
9957 2017-04-18 John Baldwin <jhb@FreeBSD.org>
9958
9959 PR threads/20743
9960 * fbsd-nat.c (resume_one_thread_cb): Remove.
9961 (resume_all_threads_cb): Remove.
9962 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
9963 iterate_over_threads.
9964
9965 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9966
9967 * NEWS: Create a new section for the next release branch.
9968 Rename the section of the current branch, now that it has
9969 been cut.
9970
9971 2017-04-17 Joel Brobecker <brobecker@adacore.com>
9972
9973 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
9974 * version.in: Bump version to 8.0.50.DATE-git.
9975
9976 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
9977
9978 PR gdb/21385
9979 * windows-nat.c (windows_create_inferior): Declare 'allargs'
9980 independently of the host, and fix build breakage on Cygwin.
9981
9982 2017-04-13 Pedro Alves <palves@redhat.com>
9983
9984 * inferior.c (free_inferior): Convert to ...
9985 (inferior::~inferior): ... this dtor.
9986 (inferior::inferior): New ctor, factored out from ...
9987 (add_inferior_silent): ... here. Allocate the inferior with a new
9988 expression.
9989 (delete_inferior): Call delete instead of free_inferior.
9990 * inferior.h (gdb_environ, continuation): Forward declare.
9991 (inferior): Now a class. Add in-class initialization to all
9992 members. Make boolean fields bool, except 'detaching'.
9993 (inferior::inferior): New explicit ctor.
9994 (inferior::~inferior): New.
9995
9996 2017-04-13 Pedro Alves <palves@redhat.com>
9997
9998 * inferior.c (init_inferior_list): Delete.
9999 * inferior.h (init_inferior_list): Delete.
10000
10001 2017-04-13 Pedro Alves <palves@redhat.com>
10002
10003 PR threads/13217
10004 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10005 (top level): Call it twice, with different thread sets.
10006
10007 2017-04-13 Pedro Alves <palves@redhat.com>
10008
10009 * thread.c: Include <algorithm>.
10010 (thread_array_cleanup): Delete.
10011 (scoped_inc_dec_ref): New class.
10012 (live_threads_count): New function.
10013 (set_thread_refcount): Delete.
10014 (tp_array_compar_ascending): Now a bool.
10015 (tp_array_compar): Convert to a std::sort comparison function.
10016 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10017 and live_threads_count.
10018
10019 2017-04-13 Pedro Alves <palves@redhat.com>
10020
10021 * infrun.c (follow_fork_inferior): Also switch the current
10022 inferior.
10023
10024 2017-04-13 Pedro Alves <palves@redhat.com>
10025
10026 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10027 before calling create_internal_breakpoint.
10028
10029 2017-04-13 Pedro Alves <palves@redhat.com>
10030
10031 * fork-child.c (execv_argv): New class.
10032 (breakup_args): Refactored as ...
10033 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10034 Copy arguments to storage and replace separators with NULL
10035 terminators in place.
10036 (escape_bang_in_quoted_argument): Adjust to return bool.
10037 (execv_argv::execv_argv): New ctor.
10038 (execv_argv::init_for_shell): New method, factored out from
10039 fork_inferior. Don't strdup strings into the vector.
10040 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10041 Remove free_vector_argv call.
10042
10043 2017-04-13 Yao Qi <yao.qi@linaro.org>
10044
10045 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10046 tdep->rx_psw_type.
10047
10048 2017-04-13 Yao Qi <yao.qi@linaro.org>
10049
10050 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10051 * rx-tdep.c (rx_gdbarch_init): Likewise.
10052
10053 2017-04-13 Pedro Alves <palves@redhat.com>
10054
10055 * breakpoint.h (struct breakpoint): Reindent.
10056
10057 2017-04-13 Pedro Alves <palves@redhat.com>
10058
10059 * breakpoint.c (bp_location): Rename to ...
10060 (bp_locations): ... this. All references updated.
10061 (bp_location_count): Rename to ...
10062 (bp_locations_count): ... this. All references updated.
10063 (bp_location_placed_address_before_address_max): Rename to ...
10064 (bp_locations_placed_address_before_address_max): ... this. All
10065 references updated.
10066 (bp_location_shadow_len_after_address_max): Rename to ...
10067 (bp_locations_shadow_len_after_address_max): ... this. All
10068 references updated.
10069 (bp_location_compare_addrs): Rename to ...
10070 (bp_locations_compare_addrs): ... this. All references updated.
10071 (bp_location_compare):Rename to ...
10072 (bp_locations_compare): ... this. All references updated.
10073 (bp_location_target_extensions_update): Rename to ...
10074 (bp_locations_target_extensions_update): ... this. All references
10075 updated.
10076
10077 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10078
10079 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10080 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10081 'sgtty.h'.
10082 * common/gdb_termios.h: New file, with parts of "terminal.h".
10083 * inflow.c: Include "gdb_termios.h".
10084 * ser-unix.c: Include "gdb_termios.h".
10085 * terminal.h: Move terminal-related defines to
10086 "common/gdb_termios.h".
10087
10088 2017-04-12 Tom Tromey <tom@tromey.com>
10089
10090 * probe.c (parse_probes): Update.
10091 * location.h (delete_event_location): Don't declare.
10092 (event_location_deleter::operator()): Update.
10093 * location.c (event_location_deleter::operator()): Rename from
10094 delete_event_location.
10095 * linespec.h (linespec_result) <location>: Change type to
10096 event_location_up.
10097 * linespec.c (canonicalize_linespec, event_location_to_sals)
10098 (decode_objc): Update.
10099 (linespec_result): Don't call delete_event_location.
10100 * breakpoint.c (create_breakpoints_sal)
10101 (bkpt_probe_create_sals_from_location)
10102 (strace_marker_create_sals_from_location): Update.
10103
10104 2017-04-12 Tom Tromey <tom@tromey.com>
10105
10106 * linespec.h (struct linespec_result): Add constructor and
10107 destructor.
10108 (init_linespec_result, destroy_linespec_result)
10109 (make_cleanup_destroy_linespec_result): Don't declare.
10110 * linespec.c (init_linespec_result): Remove.
10111 (linespec_result::~linespec_result): Rename from
10112 destroy_linespec_result. Update.
10113 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10114 Remove.
10115 * breakpoint.c (create_breakpoint, break_range_command)
10116 (decode_location_default): Update.
10117 * ax-gdb.c (agent_command_1): Update.
10118
10119 2017-04-12 Tom Tromey <tom@tromey.com>
10120
10121 * remote.c (remote_download_tracepoint): Update.
10122 * python/py-breakpoint.c (bppy_get_location): Update.
10123 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10124 (gdbscm_breakpoint_location): Update.
10125 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10126 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10127 Change type to event_location_up.
10128 * breakpoint.c (create_overlay_event_breakpoint)
10129 (create_longjmp_master_breakpoint)
10130 (create_std_terminate_master_breakpoint)
10131 (create_exception_master_breakpoint)
10132 (breakpoint_event_location_empty_p, print_breakpoint_location)
10133 (print_one_breakpoint_location, create_thread_event_breakpoint)
10134 (init_breakpoint_sal, create_breakpoint)
10135 (print_recreate_ranged_breakpoint, break_range_command)
10136 (init_ada_exception_breakpoint, say_where): Update.
10137 (base_breakpoint_dtor): Don't call delete_event_location.
10138 (bkpt_print_recreate, tracepoint_print_recreate)
10139 (dprintf_print_recreate, update_static_tracepoint)
10140 (breakpoint_re_set_default): Update.
10141
10142 2017-04-12 Tom Tromey <tom@tromey.com>
10143
10144 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10145 type of "to_do". Update.
10146 (compute_stack_depth): Use std::vector.
10147
10148 2017-04-12 Tom Tromey <tom@tromey.com>
10149
10150 * printcmd.c (find_instruction_backward): Use std::vector.
10151
10152 2017-04-12 Tom Tromey <tom@tromey.com>
10153
10154 * symfile.c (objfilep): Remove typedef.
10155 (reread_symbols): Use a std::vector.
10156
10157 2017-04-12 Tom Tromey <tom@tromey.com>
10158
10159 * mi/mi-main.c (exec_direction_forward): Remove.
10160 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10161 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10162 scoped_restore.
10163 * guile/guile.c (guile_repl_command, guile_command)
10164 (gdbscm_execute_gdb_command): Use scoped_restore.
10165 * go-exp.y (go_parse): Use scoped_restore.
10166 * d-exp.y (d_parse): Use scoped_restore.
10167 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10168 * c-exp.y (c_parse): Use scoped_restore.
10169
10170 2017-04-12 Tom Tromey <tom@tromey.com>
10171
10172 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10173 (mi_parse): Update return type.
10174 (mi_parse_free): Remove.
10175 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10176 (mi_parse::~mi_parse): Rename from mi_parse_free.
10177 (mi_parse_cleanup): Remove.
10178 (mi_parse): Return a unique_ptr. Use new.
10179 * mi/mi-main.c (mi_execute_command): Update.
10180
10181 2017-04-12 Tom Tromey <tom@tromey.com>
10182
10183 * location.c (explicit_location_lex_one): Return a
10184 unique_xmalloc_ptr.
10185 (string_to_explicit_location): Update. Remove cleanups.
10186
10187 2017-04-12 Tom Tromey <tom@tromey.com>
10188
10189 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10190 (compare_value_and_voffset): Change type. Update.
10191 (compute_vtable_size): Change type of "offset_vec".
10192 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10193 (gnuv3_get_typeid): Remove extraneous declaration.
10194
10195 2017-04-12 Tom Tromey <tom@tromey.com>
10196
10197 * charset.h (wchar_iterator): Fix comment.
10198
10199 2017-04-12 Tom Tromey <tom@tromey.com>
10200
10201 * charset.c (iconv_wrapper): New class.
10202 (cleanup_iconv): Remove.
10203 (convert_between_encodings): Use it.
10204
10205 2017-04-12 Tom Tromey <tom@tromey.com>
10206
10207 * symfile.h (increment_reading_symtab): Update type.
10208 * symfile.c (decrement_reading_symtab): Remove.
10209 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10210 * psymtab.c (psymtab_to_symtab): Update.
10211 * dwarf2read.c (dw2_instantiate_symtab): Update.
10212
10213 2017-04-12 Tom Tromey <tom@tromey.com>
10214
10215 * jit.c (struct jit_reader): Declare separately. Add constructor
10216 and destructor. Change type of "handle".
10217 (loaded_jit_reader): Define separately.
10218 (jit_reader_load): Update. New "new".
10219 (jit_reader_unload_command): Use "delete".
10220 * gdb-dlfcn.h (struct dlclose_deleter): New.
10221 (gdb_dlhandle_up): New typedef.
10222 (gdb_dlopen, gdb_dlsym): Update types.
10223 (gdb_dlclose): Remove.
10224 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10225 (gdb_dlsym): Change type of "handle".
10226 (make_cleanup_dlclose): Remove.
10227 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10228 * compile/compile-c-support.c (load_libcc): Update.
10229
10230 2017-04-12 Tom Tromey <tom@tromey.com>
10231
10232 * symtab.h (find_pcs_for_symtab_line): Change return type.
10233 * symtab.c (find_pcs_for_symtab_line): Change return type.
10234 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10235 type of "vec". Update.
10236 (ltpy_get_pcs_for_line): Update.
10237 * linespec.c (decode_digits_ordinary): Update.
10238
10239 2017-04-12 Tom Tromey <tom@tromey.com>
10240
10241 * tracepoint.c (actions_command): Update.
10242 * python/python.c (python_command, python_interactive_command):
10243 Update.
10244 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10245 * guile/guile.c (guile_command): Update.
10246 * defs.h (read_command_lines, read_command_lines_1): Return
10247 command_line_up.
10248 (command_lines_deleter): New struct.
10249 (command_line_up): New typedef.
10250 * compile/compile.c (compile_code_command)
10251 (compile_print_command): Update.
10252 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10253 command_line_up.
10254 (make_cleanup_free_command_lines): Remove.
10255 * cli/cli-script.c (get_command_line, read_command_lines_1)
10256 (copy_command_lines): Return command_line_up.
10257 (while_command, if_command, read_command_lines, define_command)
10258 (document_command): Update.
10259 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10260 Remove.
10261 * breakpoint.h (breakpoint_set_commands): Change type of
10262 "commands".
10263 * breakpoint.c (breakpoint_set_commands): Change type of
10264 "commands". Update.
10265 (do_map_commands_command, update_dprintf_command_list)
10266 (create_tracepoint_from_upload): Update.
10267
10268 2017-04-12 Tom Tromey <tom@tromey.com>
10269
10270 * tracepoint.c (scope_info): Update.
10271 * spu-tdep.c (spu_catch_start): Update.
10272 * python/python.c (gdbpy_decode_line): Update.
10273 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10274 * python/py-breakpoint.c (bppy_init): Update.
10275 * probe.c (parse_probes): Update.
10276 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10277 * location.h (event_location_deleter): New struct.
10278 (event_location_up): New typedef.
10279 (new_linespec_location, new_address_location, new_probe_location)
10280 (new_explicit_location, copy_event_location)
10281 (string_to_event_location, string_to_event_location_basic)
10282 (string_to_explicit_location): Update return type.
10283 (make_cleanup_delete_event_location): Remove.
10284 * location.c (new_linespec_location, new_address_location)
10285 (new_probe_location, new_explicit_location, copy_event_location):
10286 Return event_location_up.
10287 (delete_event_location_cleanup)
10288 (make_cleanup_delete_event_location): Remove.
10289 (string_to_explicit_location, string_to_event_location_basic)
10290 (string_to_event_location): Return event_location_up.
10291 * linespec.c (canonicalize_linespec, event_location_to_sals)
10292 (decode_line_with_current_source)
10293 (decode_line_with_last_displayed, decode_objc): Update.
10294 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10295 * completer.c (location_completer): Update.
10296 * cli/cli-cmds.c (edit_command, list_command): Update.
10297 * breakpoint.c (create_overlay_event_breakpoint)
10298 (create_longjmp_master_breakpoint)
10299 (create_std_terminate_master_breakpoint)
10300 (create_exception_master_breakpoint)
10301 (create_thread_event_breakpoint): Update.
10302 (init_breakpoint_sal): Update. Remove some dead code.
10303 (create_breakpoint_sal): Change type of "location". Update.
10304 (create_breakpoints_sal, create_breakpoint, break_command_1)
10305 (dprintf_command, break_range_command, until_break_command)
10306 (init_ada_exception_breakpoint)
10307 (strace_marker_create_sals_from_location)
10308 (update_static_tracepoint, trace_command, ftrace_command)
10309 (strace_command, create_tracepoint_from_upload): Update.
10310 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10311 * ax-gdb.c (agent_command_1): Update.
10312
10313 2017-04-12 Pedro Alves <palves@redhat.com>
10314
10315 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10316 * configure.tgt: Handle i[34567]86-*-go32* and
10317 i[34567]86-*-msdosdjgpp*.
10318 * i386-tdep.c (i386_svr4_reg_to_regnum):
10319 Make extern.
10320 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10321 i386-go32-tdep.c.
10322 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10323 * i386-go32-tdep.c: New file.
10324 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10325 declarations.
10326
10327 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10328
10329 * aix-thread.c (pd_status2str): Change return type to const char *.
10330
10331 2017-04-12 Pedro Alves <palves@redhat.com>
10332
10333 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10334 calls to set_gdbarch_gnu_triplet_regexp.
10335
10336 2017-04-12 Pedro Alves <palves@redhat.com>
10337
10338 PR gdb/21323
10339 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10340 New enum value.
10341 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10342 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10343 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10344 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10345 * gdbarch.h, gdbarch.c: Regenerate.
10346 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10347 gdbarch_wchar_bit and gdbarch_wchar_signed.
10348 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10349 * arm-tdep.c (arm_gdbarch_init): Likewise.
10350 * avr-tdep.c (avr_gdbarch_init): Likewise.
10351 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10352 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10353 * i386-tdep.c (i386_go32_init_abi): Likewise.
10354 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10355 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10356 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10357 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10358 * sh-tdep.c (sh_gdbarch_init): Likewise.
10359 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10360 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10361 * windows-tdep.c (windows_init_abi): Likewise.
10362 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10363
10364 2017-04-12 Pedro Alves <palves@redhat.com>
10365
10366 PR c++/21323
10367 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10368 cplus_primitive_type_char32_t>: New enum values.
10369 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10370 and cplus_primitive_type_char32_t.
10371 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10372 32, use the archtecture's built-in type for char16_t and char32_t,
10373 respectively. Otherwise, fallback to init_integer_type as before,
10374 but make the type unsigned, and issue a complaint.
10375 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10376
10377 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10378
10379 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10380 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10381
10382 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10383
10384 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10385 'const char *'.
10386
10387 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10388
10389 * common/common-utils.c (free_vector_argv): New function.
10390 * common/common-utils.h: Include <vector>.
10391 (free_vector_argv): New prototype.
10392 * darwin-nat.c (darwin_create_inferior): Rewrite function
10393 prototype in order to constify "exec_file" and accept a
10394 "std::string" for "allargs".
10395 * fork-child.c: Include <vector>.
10396 (breakup_args): Rewrite function, using C++.
10397 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10398 and accept "std::string" for "allargs". Update the code to
10399 calculate "argv" based on "allargs". Update calls to "exec_fun"
10400 and "execvp".
10401 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10402 order to constify "exec_file" and accept a "std::string" for
10403 "allargs".
10404 * go32-nat.c (go32_create_inferior): Likewise.
10405 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10406 * infcmd.c (run_command_1): Constify "exec_file". Use
10407 "std::string" for inferior arguments.
10408 * inferior.h (fork_inferior): Update prototype.
10409 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10410 prototype in order to constify "exec_file" and accept a
10411 "std::string" for "allargs".
10412 * nto-procfs.c (procfs_create_inferior): Likewise.
10413 * procfs.c (procfs_create_inferior): Likewise.
10414 * remote-sim.c (gdbsim_create_inferior): Likewise.
10415 * remote.c (extended_remote_run): Update code to accept
10416 "std::string" as argument.
10417 (extended_remote_create_inferior): Rewrite function prototype in
10418 order to constify "exec_file" and accept a "std::string" for
10419 "allargs".
10420 * rs6000-nat.c (super_create_inferior): Likewise.
10421 (rs6000_create_inferior): Likewise.
10422 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10423 * windows-nat.c (windows_create_inferior): Likewise.
10424
10425 2017-04-11 Pedro Alves <palves@redhat.com>
10426
10427 * thread.c: Fix whitespace throughout.
10428
10429 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10430
10431 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10432
10433 2017-04-11 Alan Hayward <alan.hayward@arm.com>
10434
10435 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10436
10437 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10438
10439 PR gdb/21364
10440 * osdata.c (info_osdata): Check if 'type' is an empty string
10441 instead of NULL.
10442
10443 2017-04-10 Pedro Alves <palves@redhat.com>
10444
10445 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10446 (ptid_to_global_thread_id, in_thread_list)
10447 (do_captured_list_thread_ids, set_resumed, set_running)
10448 (set_executing, set_stop_requested, finish_thread_state)
10449 (validate_registers_access, can_access_registers_ptid)
10450 (print_thread_info_1, switch_to_thread)
10451 (do_restore_current_thread_cleanup)
10452 (make_cleanup_restore_current_thread, thread_command)
10453 (thread_name_command): Use operator== instead of ptid_equal.
10454
10455 2017-04-10 Pedro Alves <palves@redhat.com>
10456
10457 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10458 (current_thread_cleanup_chain): Delete.
10459 (restore_current_thread_cleanup_dtor)
10460 (make_cleanup_restore_current_thread): Remove references to
10461 current_thread_cleanup_chain.
10462
10463 2017-04-10 Alan Hayward <alan.hayward@arm.com>
10464
10465 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10466 REG_UNKNOWN.
10467
10468 2017-04-10 Yao Qi <yao.qi@linaro.org>
10469
10470 PR gdb/19942
10471 * gdbthread.h (thread_info::deletable): New method.
10472 (thread_info::incref): New method.
10473 (thread_info::decref): New method.
10474 (thread_info::refcount): Move it to private.
10475 * infrun.c (save_stop_context): Call inc_refcount.
10476 (release_stop_context_cleanup): Likewise.
10477 * thread.c (set_thread_exited): New function.
10478 (init_thread_list): Delete "tp" only it is deletable, otherwise
10479 call set_thread_exited.
10480 (delete_thread_1): Call set_thread_exited.
10481 (current_thread_cleanup) <inferior_pid>: Remove.
10482 <thread>: New field.
10483 (restore_current_thread_ptid_changed): Removed.
10484 (do_restore_current_thread_cleanup): Adjust.
10485 (restore_current_thread_cleanup_dtor): Don't call
10486 find_thread_ptid.
10487 (set_thread_refcount): Use dec_refcount.
10488 (make_cleanup_restore_current_thread): Adjust.
10489 (thread_apply_all_command): Call inc_refcount.
10490 (_initialize_thread): Don't call
10491 observer_attach_thread_ptid_changed.
10492
10493 2017-04-10 Yao Qi <yao.qi@linaro.org>
10494
10495 * thread.c (delete_thread_1): Hoist code on marking thread as
10496 exited.
10497
10498 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10499
10500 * windows-nat.c (windows_detach): Initialize ptid with
10501 minus_one_ptid.
10502
10503 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10504
10505 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10506
10507 2017-04-07 Alan Hayward <alan.hayward@arm.com>
10508
10509 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10510 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10511 (bfin_pseudo_register_write): Likewise
10512
10513 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10514
10515 * common/ptid.h (struct ptid): Change to...
10516 (class ptid_t): ... this.
10517 <ptid_t>: New constructors.
10518 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10519 matches>: New methods.
10520 <make_null, make_minus_one>: New static methods.
10521 <pid>: Rename to...
10522 <m_pid>: ...this.
10523 <lwp>: Rename to...
10524 <m_lwp>: ...this.
10525 <tid>: Rename to...
10526 <m_tid>: ...this.
10527 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10528 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10529 as references, move comment to class ptid_t.
10530 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10531 ptid_t static methods.
10532 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10533 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10534 Take ptid arguments as references, implement using ptid_t methods.
10535 * unittests/ptid-selftests.c: New file.
10536 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10537 unittests/ptid-selftests.c.
10538 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10539
10540 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10541
10542 * python/python.c (python_run_simple_file): Cast mode literal to
10543 non-const char pointer as expected by PyFile_FromString.
10544
10545 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10546
10547 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10548 minus_one_ptid and null_ptid.
10549
10550 2017-04-05 Pedro Alves <palves@redhat.com>
10551
10552 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10553 * configure: Regenerate.
10554
10555 2017-04-05 Pedro Alves <palves@redhat.com>
10556
10557 * ada-exp.y (yyerror): Constify.
10558 * ada-lang.c (bound_name, get_selections)
10559 (ada_variant_discrim_type)
10560 (ada_variant_discrim_name, ada_value_struct_elt)
10561 (ada_lookup_struct_elt_type, is_unchecked_variant)
10562 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10563 (catch_ada_exception_command_split)
10564 (catch_ada_assert_command_split, catch_assert_command)
10565 (ada_op_name): Constify.
10566 * ada-lang.h (ada_yyerror, get_selections)
10567 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10568 * arc-tdep.c (arc_print_frame_cache): Constify.
10569 * arm-tdep.c (arm_skip_stub): Constify.
10570 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10571 (gen_aggregate_elt_ref): Constify.
10572 * bcache.c (print_bcache_statistics): Constify.
10573 * bcache.h (print_bcache_statistics): Constify.
10574 * break-catch-throw.c (catch_exception_command_1):
10575 * breakpoint.c (struct ep_type_description::description):
10576 Constify.
10577 (add_solib_catchpoint): Constify.
10578 (catch_fork_command_1): Add cast.
10579 (add_catch_command): Constify.
10580 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10581 Constify.
10582 * bsd-uthread.c (bsd_uthread_state): Constify.
10583 * buildsym.c (patch_subfile_names): Constify.
10584 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10585 Constify.
10586 * c-exp.y (yyerror): Constify.
10587 (token::oper): Constify.
10588 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10589 * c-varobj.c (cplus_describe_child): Constify.
10590 * charset.c (find_charset_names): Add cast.
10591 (find_charset_names): Constify array and add const_cast.
10592 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10593 (edit_command): Constify.
10594 * cli/cli-decode.c (lookup_cmd): Constify.
10595 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10596 Constify.
10597 (struct dump_context): Constify.
10598 (add_dump_command, restore_command): Constify.
10599 * cli/cli-script.c (get_command_line): Constify.
10600 * cli/cli-script.h (get_command_line): Constify.
10601 * cli/cli-utils.c (check_for_argument): Constify.
10602 * cli/cli-utils.h (check_for_argument): Constify.
10603 * coff-pe-read.c (struct read_pe_section_data): Constify.
10604 * command.h (lookup_cmd): Constify.
10605 * common/print-utils.c (decimal2str): Constify.
10606 * completer.c (gdb_print_filename): Constify.
10607 * corefile.c (set_gnutarget): Constify.
10608 * cp-name-parser.y (yyerror): Constify.
10609 * cp-valprint.c (cp_print_class_member): Constify.
10610 * cris-tdep.c (cris_register_name, crisv32_register_name):
10611 Constify.
10612 * d-exp.y (yyerror): Constify.
10613 (struct token::oper): Constify.
10614 * d-lang.h (d_yyerror): Constify.
10615 * dbxread.c (struct header_file_location::name): Constify.
10616 (add_old_header_file, add_new_header_file, last_function_name)
10617 (dbx_next_symbol_text, add_bincl_to_list)
10618 (find_corresponding_bincl_psymtab, set_namestring)
10619 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10620 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10621 * defs.h (command_line_input, print_address_symbolic)
10622 (deprecated_readline_begin_hook): Constify.
10623 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10624 Constify.
10625 * event-top.c (handle_line_of_input): Constify and add cast.
10626 * exceptions.c (catch_errors): Constify.
10627 * exceptions.h (catch_errors): Constify.
10628 * expprint.c (print_subexp_standard, op_string, op_name)
10629 (op_name_standard, dump_raw_expression, dump_raw_expression):
10630 * expression.h (op_name, op_string, dump_raw_expression):
10631 Constify.
10632 * f-exp.y (yyerror): Constify.
10633 (struct token::oper): Constify.
10634 (struct f77_boolean_val::name): Constify.
10635 * f-lang.c (f_word_break_characters): Constify.
10636 * f-lang.h (f_yyerror): Constify.
10637 * fork-child.c (fork_inferior): Add cast.
10638 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10639 (new_variant): Constify.
10640 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10641 * gdbarch.c: Regenerate.
10642 * gdbcore.h (set_gnutarget): Constify.
10643 * go-exp.y (yyerror): Constify.
10644 (token::oper): Constify.
10645 * go-lang.h (go_yyerror): Constify.
10646 * go32-nat.c (go32_sysinfo): Constify.
10647 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10648 * guile/scm-cmd.c (cmdscm_function): Constify.
10649 * guile/scm-param.c (pascm_param_value): Constify.
10650 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10651 (h8300sx_register_name): Constify.
10652 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10653 Constify.
10654 * ia64-tdep.c (ia64_register_names): Constify.
10655 * infcmd.c (construct_inferior_arguments): Constify.
10656 (path_command, attach_post_wait): Constify.
10657 * language.c (show_range_command, show_case_command)
10658 (unk_lang_error): Constify.
10659 * language.h (language_defn::la_error)
10660 (language_defn::la_name_of_this): Constify.
10661 * linespec.c (decode_line_2): Constify.
10662 * linux-thread-db.c (thread_db_err_str): Constify.
10663 * lm32-tdep.c (lm32_register_name): Constify.
10664 * m2-exp.y (yyerror): Constify.
10665 * m2-lang.h (m2_yyerror): Constify.
10666 * m32r-tdep.c (m32r_register_names): Constify and make static.
10667 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10668 * m88k-tdep.c (m88k_register_name): Constify.
10669 * macroexp.c (appendmem): Constify.
10670 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10671 (upgrade_type, parse_external, parse_partial_symbols)
10672 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10673 (new_symbol): Constify.
10674 * memattr.c (mem_info_command): Constify.
10675 * mep-tdep.c (register_name_from_keyword): Constify.
10676 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10677 Constify.
10678 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10679 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10680 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10681 cast.
10682 (mi_execute_async_cli_command): Constify.
10683 * mips-tdep.c (mips_register_name): Constify.
10684 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10685 (am33_register_name, am33_2_register_name)
10686 * moxie-tdep.c (moxie_register_names): Constify.
10687 * nat/linux-osdata.c (osdata_type): Constify fields.
10688 * nto-tdep.c (nto_parse_redirection): Constify.
10689 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10690 (lookup_child_selector): Constify.
10691 (objc_methcall::name): Constify.
10692 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10693 (lookup_struct_typedef): Constify.
10694 * objfiles.c (pc_in_section): Constify.
10695 * objfiles.h (pc_in_section): Constify.
10696 * p-exp.y (struct token::oper): Constify.
10697 (yyerror): Constify.
10698 * p-lang.h (pascal_yyerror): Constify.
10699 * parser-defs.h (op_name_standard): Constify.
10700 (op_print::string): Constify.
10701 (exp_descriptor::op_name): Constify.
10702 * printcmd.c (print_address_symbolic): Constify.
10703 * psymtab.c (print_partial_symbols): Constify.
10704 * python/py-breakpoint.c (stop_func): Constify.
10705 (bppy_get_expression): Constify.
10706 * python/py-cmd.c (cmdpy_completer::name): Constify.
10707 (cmdpy_function): Constify.
10708 * python/py-event.c (evpy_add_attribute)
10709 (gdbpy_initialize_event_generic): Constify.
10710 * python/py-event.h (evpy_add_attribute)
10711 (gdbpy_initialize_event_generic): Constify.
10712 * python/py-evts.c (add_new_registry): Constify.
10713 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10714 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10715 * python/py-inferior.c (get_buffer): Add cast.
10716 * python/py-param.c (parm_constant::name): Constify.
10717 * python/py-unwind.c (fprint_frame_id): Constify.
10718 * python/python.c (gdbpy_parameter_value): Constify.
10719 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10720 * remote.c (memory_packet_config::name): Constify.
10721 (show_packet_config_cmd, remote_write_bytes)
10722 (remote_buffer_add_string):
10723 * reverse.c (exec_reverse_once): Constify.
10724 * rs6000-tdep.c (variant::name, variant::description): Constify.
10725 * rust-exp.y (rustyyerror): Constify.
10726 * rust-lang.c (rust_op_name): Constify.
10727 * rust-lang.h (rustyyerror): Constify.
10728 * serial.h (serial_ops::name): Constify.
10729 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10730 (sh_sh3e_register_name, sh_sh2e_register_name)
10731 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10732 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10733 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10734 (sh_sh4al_dsp_register_name): Constify.
10735 * sh64-tdep.c (sh64_register_name): Constify.
10736 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10737 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10738 * stabsread.c (patch_block_stabs, read_type_number)
10739 (ref_map::stabs, ref_add, process_reference)
10740 (symbol_reference_defined, define_symbol, define_symbol)
10741 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10742 (read_one_struct_field, read_struct_fields, read_baseclasses)
10743 (read_tilde_fields, read_struct_type, read_array_type)
10744 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10745 (read_huge_number, read_range_type, read_args, common_block_start)
10746 (find_name_end): Constify.
10747 * stabsread.h (common_block_start, define_symbol)
10748 (process_one_symbol, symbol_reference_defined, ref_add):
10749 * symfile.c (get_section_index, add_symbol_file_command):
10750 * symfile.h (get_section_index): Constify.
10751 * target-descriptions.c (tdesc_type::name): Constify.
10752 (tdesc_free_type): Add cast.
10753 * target.c (find_default_run_target):
10754 (add_deprecated_target_alias, find_default_run_target)
10755 (target_announce_detach): Constify.
10756 (do_option): Constify.
10757 * target.h (add_deprecated_target_alias): Constify.
10758 * thread.c (print_thread_info_1): Constify.
10759 * top.c (deprecated_readline_begin_hook, command_line_input):
10760 Constify.
10761 (init_main): Add casts.
10762 * top.h (handle_line_of_input): Constify.
10763 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10764 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10765 (tfind_command): Rename to ...
10766 (tfind_command_1): ... this and constify.
10767 (tfind_command): New function.
10768 (tfind_end_command, tfind_start_command): Adjust.
10769 (encode_source_string): Constify.
10770 * tracepoint.h (encode_source_string): Constify.
10771 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10772 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10773 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10774 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10775 * tui/tui-win.c (parse_scrolling_args): Constify.
10776 * tui/tui-windata.c (tui_erase_data_content): Constify.
10777 * tui/tui-windata.h (tui_erase_data_content): Constify.
10778 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10779 * tui/tui.c (tui_enable): Add cast.
10780 * utils.c (defaulted_query): Constify.
10781 (init_page_info): Add cast.
10782 (puts_debug, subset_compare): Constify.
10783 * utils.h (subset_compare): Constify.
10784 * varobj.c (varobj_format_string): Constify.
10785 * varobj.h (varobj_format_string): Constify.
10786 * vax-tdep.c (vax_register_name): Constify.
10787 * windows-nat.c (windows_detach): Constify.
10788 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10789 * xml-support.c (gdb_xml_end_element): Constify.
10790 * xml-tdesc.c (tdesc_start_reg): Constify.
10791 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10792 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10793 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10794
10795 2017-04-05 Pedro Alves <palves@redhat.com>
10796
10797 * proc-api.c (struct trans): Constify.
10798 (procfs_note): Constify.
10799 * proc-events.c (struct trans, syscall_table):
10800 * proc-flags.c (struct trans): Constify.
10801 * proc-utils.h (procfs_note): Constify.
10802 * proc-why.c (struct trans): Constify.
10803 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10804 (procfs_detach): Constify.
10805 * sol-thread.c (struct string_map): Constify.
10806 (td_err_string, td_state_string): Constify.
10807
10808 2017-04-05 Pedro Alves <palves@redhat.com>
10809
10810 * proc-api.c (procfs_filename): Don't initialize
10811 procfs_filename.
10812 (prepare_to_trace): Assume procfs_filename is non-NULL.
10813 (_initialize_proc_api): Give procfs_filename a default value here.
10814
10815 2017-04-05 Pedro Alves <palves@redhat.com>
10816
10817 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
10818 'cond_string' parameter.
10819 (extract_exception_regexp): Constify 'string' parameter.
10820 (catch_exception_command_1): Constify.
10821 * breakpoint.c (init_catchpoint)
10822 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
10823 parameter.
10824 (ep_parse_optional_if_clause, catch_fork_command_1)
10825 (catch_exec_command_1): Constify.
10826 * breakpoint.h (init_catchpoint): Constify 'cond_string'
10827 parameter.
10828 (ep_parse_optional_if_clause): Constify.
10829 * cli/cli-utils.c (remove_trailing_whitespace)
10830 (check_for_argument): Constify.
10831 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
10832 non-const overload.
10833 (check_for_argument): Likewise.
10834
10835 2017-04-05 Pedro Alves <palves@redhat.com>
10836
10837 * event-top.c (command_line_handler): Add cast to execute_command
10838 call.
10839 * record-btrace.c (cmd_record_btrace_bts_start)
10840 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
10841 (cmd_record_btrace_start): Add cast to execute_command call.
10842 * record-full.c (record_full_goto_insn):
10843 * record.c (record_start, record_stop): Add cast to
10844 execute_command_to_string calls.
10845 (cmd_record_start): Add cast to execute_command calls.
10846
10847 2017-04-05 Pedro Alves <palves@redhat.com>
10848
10849 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
10850 static inline function.
10851 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
10852 array and use gdb_PyArg_ParseTupleAndKeywords.
10853 * python/py-cmd.c (cmdpy_init): Likewise.
10854 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
10855 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
10856 (infpy_search_memory): Likewise.
10857 * python/py-objfile.c (objfpy_add_separate_debug_file)
10858 (gdbpy_lookup_objfile): Likewise.
10859 * python/py-symbol.c (gdbpy_lookup_symbol)
10860 (gdbpy_lookup_global_symbol): Likewise.
10861 * python/py-type.c (gdbpy_lookup_type): Likewise.
10862 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
10863 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
10864 Likewise.
10865
10866 2017-04-05 Pedro Alves <palves@redhat.com>
10867
10868 * python/python-internal.h (gdb_PyGetSetDef): New type.
10869 * python/py-block.c (block_object_getset)
10870 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
10871 * python/py-event.c (event_object_getset)
10872 (finish_breakpoint_object_getset): Likewise.
10873 * python/py-inferior.c (inferior_object_getset): Likewise.
10874 * python/py-infthread.c (thread_object_getset): Likewise.
10875 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
10876 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
10877 * python/py-objfile.c (objfile_getset): Likewise.
10878 * python/py-progspace.c (pspace_getset): Likewise.
10879 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
10880 Likewise.
10881 * python/py-record.c (recpy_record_getset): Likewise.
10882 * python/py-symbol.c (symbol_object_getset): Likewise.
10883 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
10884 Likewise.
10885 * python/py-type.c (type_object_getset, field_object_getset):
10886 Likewise.
10887 * python/py-value.c (value_object_getset): Likewise.
10888
10889 2017-04-05 Pedro Alves <palves@redhat.com>
10890
10891 * python/python-internal.h (gdb_PyObject_CallMethod)
10892 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
10893 New functions.
10894 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
10895 (PySys_GetObject, PySys_SetPath): New macros.
10896
10897 2017-04-05 Pedro Alves <palves@redhat.com>
10898
10899 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
10900 info_osdata_command.
10901 * osdata.c (info_osdata_command): Rename to ...
10902 (info_osdata): ... this. Constify 'type' parameter, and remove
10903 the 'from_tty' parameter. Accept NULL TYPE.
10904 (info_osdata_command): New function.
10905 * osdata.h (info_osdata_command): Remove declaration.
10906 (info_osdata): New declaration.
10907
10908 2017-04-05 Pedro Alves <palves@redhat.com>
10909
10910 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
10911 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
10912 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
10913 parameter.
10914 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
10915 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
10916 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
10917 parameter.
10918 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
10919 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
10920 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
10921 (mi_cmd_file_list_exec_source_files)
10922 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
10923 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
10924 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
10925 parameter.
10926 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
10927 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
10928 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
10929 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
10930 (mi_cmd_stack_info_frame): Constify 'command' parameter.
10931 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
10932 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
10933 'command' parameter.
10934 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
10935 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
10936 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
10937 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
10938 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
10939 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
10940 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
10941 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
10942 (mi_cmd_var_set_update_range): Constify 'command' parameter.
10943 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
10944 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
10945 parameter.
10946 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
10947 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
10948 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
10949 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
10950 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
10951 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
10952 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
10953 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
10954 (mi_cmd_data_list_changed_registers)
10955 (mi_cmd_data_write_register_values)
10956 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
10957 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
10958 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
10959 (mi_cmd_list_features, mi_cmd_list_target_features)
10960 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
10961 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
10962 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
10963 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
10964 (mi_cmd_trace_frame_collected): Constify 'command'
10965 parameter.
10966 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
10967 'command' parameter.
10968
10969 2017-04-05 Pedro Alves <palves@redhat.com>
10970
10971 * ada-lang.c (ada_completer_word_break_characters): Now a const
10972 array.
10973 (ada_get_gdb_completer_word_break_characters): Constify.
10974 * completer.c (gdb_completer_command_word_break_characters)
10975 (gdb_completer_file_name_break_characters)
10976 (gdb_completer_quote_characters): Now const arrays.
10977 (get_gdb_completer_quote_characters): Constify.
10978 (set_rl_completer_word_break_characters): New function.
10979 (set_gdb_completion_word_break_characters)
10980 (complete_line_internal): Use it.
10981 * completer.h (get_gdb_completer_quote_characters): Constify.
10982 (set_rl_completer_word_break_characters): Declare.
10983 * f-lang.c (f_word_break_characters): Constify.
10984 * language.c (default_word_break_characters): Constify.
10985 * language.h (language_defn::la_word_break_characters): Constify.
10986 (default_word_break_characters): Constify.
10987 * top.c (init_main): Use set_rl_completer_word_break_characters.
10988
10989 2017-04-05 Pedro Alves <palves@redhat.com>
10990
10991 * aix-thread.c (aix_thread_pid_to_str)
10992 (aix_thread_extra_thread_info): Constify.
10993 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
10994 * bsd-uthread.c (bsd_uthread_extra_thread_info)
10995 (bsd_uthread_pid_to_str): Constify.
10996 * corelow.c (core_pid_to_str): Constify.
10997 * darwin-nat.c (darwin_pid_to_str): Constify.
10998 * fbsd-nat.c (fbsd_pid_to_str): Constify.
10999 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11000 Constify.
11001 * gnu-nat.c (gnu_pid_to_str): Constify.
11002 * go32-nat.c (go32_pid_to_str): Constify.
11003 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11004 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11005 * inferior.c (inferior_pid_to_str): Constify.
11006 * linux-nat.c (linux_nat_pid_to_str): Constify.
11007 * linux-tdep.c (linux_core_pid_to_str): Constify.
11008 * linux-thread-db.c (thread_db_pid_to_str)
11009 (thread_db_extra_thread_info): Constify.
11010 * nto-tdep.c (nto_extra_thread_info): Constify.
11011 * nto-tdep.h (nto_extra_thread_info): Constify.
11012 * obsd-nat.c (obsd_pid_to_str): Constify.
11013 * procfs.c (procfs_pid_to_str): Constify.
11014 * ravenscar-thread.c (ravenscar_extra_thread_info)
11015 (ravenscar_pid_to_str): Constify.
11016 * remote-sim.c (gdbsim_pid_to_str): Constify.
11017 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11018 Constify.
11019 * sol-thread.c (solaris_pid_to_str): Constify.
11020 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11021 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11022 * target.c (default_pid_to_str, target_pid_to_str)
11023 (normal_pid_to_str, default_pid_to_str): Constify.
11024 * target.h (target_ops::to_pid_to_str)
11025 (target_ops::to_extra_thread_info): Constify.
11026 (target_pid_to_str, normal_pid_to_str): Constify.
11027 * windows-nat.c (windows_pid_to_str): Constify.
11028 * gdbarch.sh (core_pid_to_str): Constify.
11029 * target-delegates.c: Regenerate.
11030 * gdbarch.h, gdbarch.c: Regenerate.
11031
11032 2017-04-05 Pedro Alves <palves@redhat.com>
11033
11034 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11035 the memory of the temporary warning_pre_print override.
11036 * utils.c (warning_pre_print): Constify.
11037 * utils.h (warning_pre_print): Constify.
11038
11039 2017-04-05 Pedro Alves <palves@redhat.com>
11040
11041 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11042 (shell_command): New function.
11043 (make_command): Use std::string.
11044 (init_cli_cmds): Register shell_command instead of shell_escape.
11045
11046 2017-04-05 Pedro Alves <palves@redhat.com>
11047
11048 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11049 * tracepoint.c (default_collect): Don't initialize.
11050
11051 2017-04-05 Pedro Alves <palves@redhat.com>
11052
11053 * macroexp.c (macro_buffer::shared): Now a bool.
11054 (init_buffer): Update.
11055 (init_shared_buffer): Constify 'addr' parameter.
11056 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11057 casts.
11058
11059 2017-04-05 Pedro Alves <palves@redhat.com>
11060
11061 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11062 * disasm.c (set_disassembler_options): Constify local.
11063 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11064
11065 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11066
11067 PR gdb/21352
11068 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11069 option.
11070
11071 2017-04-05 Yao Qi <yao.qi@linaro.org>
11072
11073 * frame.c (frame_unwind_register_unsigned): Call
11074 frame_unwind_register_value.
11075
11076 2017-04-05 Yao Qi <yao.qi@linaro.org>
11077
11078 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11079 Use gdb_test_multiple, and don't match anchor.
11080
11081 2017-04-05 Pedro Alves <palves@redhat.com>
11082
11083 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11084 (Write After Approval): Remove Simon Marchi.
11085
11086 2017-04-05 Pedro Alves <palves@redhat.com>
11087
11088 * common/gdb_optional.h (optional::optional): Make constexpr and
11089 initialize m_dummy.
11090
11091 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11092
11093 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11094 (amd64fbsd_jmp_buf_reg_offset): Remove.
11095 (amd64fbsd_supply_uthread): Remove function.
11096 (amd64fbsd_collect_uthread): Remove function.
11097 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11098 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11099 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11100 (fbsd-nat.c): Update comment.
11101 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11102 (i386fbsd_jmp_buf_reg_offset): Remove.
11103 (i386fbsd_supply_uthread): Remove function.
11104 (i386fbsd_collect_uthread): Remove function.
11105 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11106
11107 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11108
11109 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11110 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11111 * NEWS: Mention that support for FreeBSD/alpha was removed.
11112 * alpha-fbsd-tdep.c: Delete file.
11113 * config/alpha/fbsd.mh: Delete file.
11114 * configure.host: Delete alpha*-*-freebsd* and
11115 alpha*-*-kfreebsd*-gnu.
11116 * configure.tgt: Delete alpha*-*-freebsd* and
11117 alpha*-*-kfreebsd*-gnu.
11118
11119 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11120
11121 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11122 amd64bsd_store_inferior_registers): Use ptid from regcache.
11123
11124 2017-04-04 Pedro Alves <palves@redhat.com>
11125
11126 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11127 data fields, make them private and add "m_" prefixes.
11128 (lnp_state_machine::lnp_state_machine): New ctor.
11129 (record_line, check_line_address, handle_set_discriminator)
11130 (handle_set_address, handle_advance_pc, handle_special_opcode)
11131 (handle_advance_line, handle_set_file, handle_negate_stmt)
11132 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11133 (end_sequence, advance_line): New methods.
11134 (m_gdbarch, m_record_lines_p): New fields.
11135 (lnp_reader_state): Delete.
11136 (dwarf_record_line): Rename to ...
11137 (lnp_state_machine::record_line): ... adjust.
11138 (init_lnp_state_machine): Delete.
11139 (lnp_state_machine::lnp_state_machine): New.
11140 (check_line_address): Rename to ...
11141 (lnp_state_machine::check_line_address): This.
11142 (dwarf_decode_lines_1): Remove reference to "reader_state".
11143 Adjust lnp_state_machine having a non-default ctor. Use bool.
11144 State machine internal state manipulation moved to
11145 lnp_state_machine methods.
11146
11147 2017-04-04 Pedro Alves <palves@redhat.com>
11148
11149 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11150 unittests/offset-type-selftests.c.
11151 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11152 * common/offset-type.h: New file.
11153 * common/preprocessor.h: New file.
11154 * common/traits.h: New file.
11155 * common/valid-expr.h: New file.
11156 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11157 sect_offset and cu_offset strong typedefs throughout.
11158 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11159 typedefs throughout.
11160 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11161 sect_offset and cu_offset strong typedefs throughout.
11162 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11163 typedefs throughout.
11164 * gdbtypes.h: Include "common/offset-type.h".
11165 (cu_offset): Now an offset type (strong typedef) instead of a
11166 struct.
11167 (sect_offset): Likewise.
11168 (union call_site_parameter_u): Rename "param_offset" field to
11169 "param_cu_off".
11170 * unittests/offset-type-selftests.c: New file.
11171
11172 2017-04-04 Pedro Alves <palves@redhat.com>
11173
11174 * common/underlying.h: New file.
11175 * dwarf2read.c: Include "common/gdb_optional.h" and
11176 "common/underlying.h".
11177 (dir_index, file_name_index): New types.
11178 (file_entry): Use them.
11179 (file_entry::include): Use to_underlying.
11180 (line_header::add_file_name): Use dir_index.
11181 (read_formatted_entries): Use gdb::optional. Read form before
11182 writting to file_entry.
11183 (dwarf_decode_line_header): Use dir_index.
11184 (lnp_state_machine::current_file): Use to_underlying.
11185 (lnp_state_machine::file): Change type to file_name_index.
11186 (dwarf_record_line): Use to_underlying.
11187 (init_lnp_state_machine): Use file_name_index.
11188 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11189
11190 2017-04-04 Pedro Alves <palves@redhat.com>
11191
11192 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11193 operator bool, has_value and get methods.
11194
11195 2017-04-04 Pedro Alves <palves@redhat.com>
11196
11197 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11198 fields.
11199 (line_header): Initialize all data fields. Change type of
11200 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11201 Change type of include_dirs to std::vector<const char *>. Remove
11202 num_include_dirs, include_dirs_size. Change type of file_names to
11203 std::vector<file_entry>. Remove num_file_names, file_names_size.
11204 (line_header::line_header): New.
11205 (line_header::add_include_dir, line_header::add_file_name): New
11206 methods.
11207 (line_header::include_dir_at): Remove NULL check.
11208 (line_header::file_name_at): Add const overload.
11209 (line_header_up): New unique_ptr typedef.
11210 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11211 std::vector. Remove free_line_header call.
11212 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11213 free_line_header call.
11214 (free_cu_line_header): Delete.
11215 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11216 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11217 Adjust to use std::vector.
11218 (free_line_header): Delete.
11219 (free_line_header_voidp): Use delete.
11220 (add_include_dir): Replace with ...
11221 (line_header::add_include_dir): ... this method. Use std::vector.
11222 (add_file_name): Replace with ...
11223 (line_header::add_file_name): ... this method. Use std::vector.
11224 (add_include_dir_stub): Delete.
11225 (read_formatted_entries): Remove memset.
11226 (dwarf_decode_line_header): Return a line_header_up instead of a
11227 raw pointer. Remove cleanup handling. Pass lambdas to
11228 read_formatted_entries. Adjust to use line_header methods.
11229 (dwarf_decode_lines_1): Adjust to use line_header methods.
11230 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11231 use std::vector.
11232
11233 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11234
11235 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11236 instead of struct ptid.
11237
11238 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11239
11240 * frame.c (get_frame_register_bytes): Unwind using value.
11241 (put_frame_register_bytes): Likewise.
11242
11243 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11244
11245 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11246 aggregate-like.
11247
11248 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11249
11250 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11251
11252 2017-03-29 Yao Qi <yao.qi@linaro.org>
11253
11254 * gdbthread.h (struct thread_info): Declare constructor and
11255 destructor. Add some in-class member initializers.
11256 * thread.c (free_thread): Remove.
11257 (init_thread_list): Call delete instead of free_thread.
11258 (new_thread): Call thread_info constructor.
11259 (thread_info::thread_info): New function.
11260 (thread_info::~thread_info): New function.
11261 (delete_thread_1): Call delete instead of free_thread.
11262 (make_cleanup_restore_current_thread): Move tp and frame to
11263 inner block.
11264
11265 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11266
11267 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11268 (arc_skip_prologue): Likewise.
11269 (arc_make_frame_cache): Likewise.
11270 (arc_pv_get_operand): New function.
11271 (arc_is_in_prologue): Likewise.
11272 (arc_analyze_prologue): Likewise.
11273 (arc_print_frame_cache): Likewise.
11274 (MAX_PROLOGUE_LENGTH): New constant.
11275
11276 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11277
11278 * configure.tgt: Add arc-insn.o.
11279 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11280 (dump_arc_instruction_command): New function.
11281 (arc_fprintf_disasm): Likewise.
11282 (arc_disassemble_info): Likewise.
11283 (arc_insn_get_operand_value): Likewise.
11284 (arc_insn_get_operand_value_signed): Likewise.
11285 (arc_insn_get_memory_base_reg): Likewise.
11286 (arc_insn_get_memory_offset): Likewise.
11287 (arc_insn_get_branch_target): Likewise.
11288 (arc_insn_dump): Likewise.
11289 (arc_insn_get_linear_next_pc): Likewise.
11290 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11291 (arc_disassemble_info): Likewise.
11292 (arc_insn_get_branch_target): Likewise.
11293 (arc_insn_get_linear_next_pc): Likewise.
11294 * NEWS: Mention new "maint print arc arc-instruction".
11295
11296 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11297
11298 * arc-tdep (maintenance_print_arc_list): New variable.
11299 (maintenance_print_arc_command): New function.
11300
11301 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11302
11303 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11304 Add "limm" and "reserved".
11305 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11306 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11307 * arc-tdep.h (arc_regnum): Likewise.
11308
11309 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11310
11311 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11312 for THREADPTR register.
11313 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11314 register.
11315 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11316 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11317 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11318
11319 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11320
11321 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11322 registers above gdbarch_num_regs (gdbarch) as privileged in
11323 call0 ABI.
11324
11325 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11326
11327 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11328 for a single specified register or for all registers in
11329 a0_base..a0_base + C0_NREGS range.
11330 (supply_gregset_reg): Call regcache_raw_supply for a single
11331 specified register or for all registers in a0_base..a0_base +
11332 C0_NREGS range.
11333
11334 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11335
11336 * arch/xtensa.h (C0_NREGS): Add definition.
11337 * xtensa-tdep.c (C0_NREGS): Remove definition.
11338
11339 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11340
11341 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11342 Drop xtensa_default_isa initialization.
11343 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11344
11345 2017-03-27 Pedro Alves <palves@redhat.com>
11346
11347 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11348 (file_entry::include_dir): New method.
11349 (line_header::include_dir_at, line_header::file_name_at): New
11350 methods.
11351 (setup_type_unit_groups, setup_type_unit_groups)
11352 (psymtab_include_file_name): Simplify using the new methods.
11353 (lnp_state_machine) <the_line_header>: New field.
11354 <file>: Add comment.
11355 (lnp_state_machine::current_file): New method.
11356 (dwarf_record_line): Simplify using the new methods.
11357 (init_lnp_state_machine): Initialize the "the_line_header" field.
11358 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11359 Simplify using the new methods.
11360
11361 2017-03-27 Pedro Alves <palves@redhat.com>
11362
11363 * cp-name-parser.y (make_empty): Delete.
11364 (demangler_special, nested_name, ptr_operator, array_indicator)
11365 (direct_declarator, declarator_1): Use fill_comp instead of
11366 make_empty.
11367
11368 2017-03-27 Pedro Alves <palves@redhat.com>
11369
11370 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11371 to ATTRIBUTE_PRINTF.
11372 * solib-target.c (library_list_start_list): Print "string" not
11373 "version".
11374 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11375 gdb_xml_error call.
11376
11377 2017-03-27 Pedro Alves <palves@redhat.com>
11378
11379 * dwarf2read.c (struct file_and_directory): New.
11380 (dwarf2_get_dwz_file): Adjust to use std::string.
11381 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11382 (find_file_and_directory): Adjust to return a file_and_directory
11383 object.
11384 (read_file_scope): Adjust to use file_and_directory. Remove
11385 make_cleanup/do_cleanups calls.
11386 (open_and_init_dwp_file): Adjust to use std::string. Remove
11387 make_cleanup/do_cleanups calls.
11388 * python/python.c (do_start_initialization): Adjust to ldirname
11389 returning a std::string.
11390 * utils.c (ldirname): Now returns a std::string.
11391 * utils.h (ldirname): Change return type to std::string.
11392 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11393 returning a std::string.
11394 * xml-tdesc.c (file_read_description_xml): Likewise.
11395
11396 2017-03-24 Alan Hayward <alan.hayward@arm.com>
11397
11398 * regcache.c (regcache_debug_print_register): New function.
11399 * regcache.h (regcache_debug_print_register): New declaration.
11400 * target.c (debug_print_register): Remove.
11401 (target_fetch_registers): Call regcache_debug_print_register.
11402 (target_store_registers): Likewise.
11403
11404 2017-03-24 Pádraig Brady <pbrady@fb.com>
11405
11406 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11407 reference beyond the 'lh->include_dirs' array before accessing to
11408 it.
11409 (psymtab_include_file_name): Likewise.
11410 (dwarf_decode_lines_1): Likewise.
11411 (dwarf_decode_lines): Likewise.
11412 (file_file_name): Likewise.
11413
11414 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11415
11416 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11417 inferior_ptid.
11418 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11419 ps_lsetfpregs): Likewise.
11420 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11421 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11422 ps_lsetfpregs): Likewise.
11423 * target.c (target_fetch_registers, target_store_registers):
11424 Remove asserts.
11425
11426 2017-03-23 Alan Hayward <alan.hayward@arm.com>
11427
11428 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11429
11430 2017-03-23 Yao Qi <yao.qi@linaro.org>
11431
11432 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11433 (_initialize_aarch64_tdep): Register it.
11434 (aarch64_record_load_store): Handle PRFM instruction.
11435 (aarch64_process_record_test): New function.
11436
11437 2017-03-23 Yao Qi <yao.qi@linaro.org>
11438
11439 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11440 indentation.
11441
11442 2017-03-23 Yao Qi <yao.qi@linaro.org>
11443
11444 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11445
11446 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11447
11448 python/python.c (do_start_initialization): Fix memory leak.
11449
11450 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11451
11452 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11453 using get_ptrace_pid.
11454 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11455 inferior_ptid.
11456 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11457 inferior_ptid instead of pid.
11458
11459 2017-03-22 Yao Qi <yao.qi@linaro.org>
11460
11461 * aarch64-tdep.c: Wrap locally used classes in anonymous
11462 namespace.
11463 * arm-tdep.c: Likewise.
11464 * linespec.c: Likewise.
11465 * ui-out.c: Likewise.
11466
11467 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
11468
11469 PR gdb/19637
11470 * python/lib/gdb/printer/bound_registers.py: Import sys.
11471
11472 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11473
11474 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11475 windows_thread_info parameter and use it instead of
11476 current_thread.
11477 (windows_fetch_inferior_registers): Don't set current_thread,
11478 pass the thread to do_windows_fetch_inferior_registers. Use
11479 ptid from regcache instead of inferior_ptid.
11480 (do_windows_store_inferior_registers): Add windows_thread_info
11481 parameter and use it instead of current_thread.
11482 (windows_store_inferior_registers): Don't set current_thread,
11483 pass the thread to do_windows_store_inferior_registers. Use
11484 ptid from regcache instead of inferior_ptid.
11485
11486 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11487
11488 * ser-mingw.c (ser_windows_raw): Remove reference to
11489 struct serial::current_timeout.
11490
11491 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11492
11493 PR tdep/20928
11494 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11495 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11496 (sparc64_fsr_type): Fix %fsr decoding.
11497
11498 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11499
11500 * python/py-record-btrace.c (btpy_insn_data): Change return type
11501 for Python 2.
11502
11503 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11504
11505 * spu-linux-nat.c (spu_fetch_inferior_registers,
11506 spu_store_inferior_registers): Use ptid from regcache, set and
11507 restore inferior_ptid.
11508 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11509 Likewise.
11510
11511 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11512
11513 * i386-linux-nat.c (fetch_register, store_register,
11514 i386_linux_fetch_inferior_registers,
11515 i386_linux_store_inferior_registers): Use ptid from regcache.
11516 * ia64-linux-nat.c (ia64_linux_fetch_register,
11517 ia64_linux_store_register): Likewise.
11518 * inf-ptrace.c (inf_ptrace_fetch_register,
11519 inf_ptrace_store_register): Likewise.
11520 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11521 m32r_linux_store_inferior_registers): Likewise.
11522 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11523 m68kbsd_store_inferior_registers): Likewise.
11524 * m68k-linux-nat.c (fetch_register, store_register,
11525 m68k_linux_fetch_inferior_registers,
11526 m68k_linux_store_inferior_registers): Likewise.
11527 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11528 m88kbsd_store_inferior_registers): Likewise.
11529 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11530 mips_fbsd_store_inferior_registers): Likewise.
11531 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11532 mips64_linux_regsets_store_registers): Likewise.
11533 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11534 mipsnbsd_store_inferior_registers): Likewise.
11535 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11536 mips64obsd_store_inferior_registers): Likewise.
11537 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11538 Likewise.
11539 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11540 ppcfbsd_store_inferior_registers): Likewise.
11541 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11542 ppc_linux_store_inferior_registers): Likewise.
11543 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11544 ppcnbsd_store_inferior_registers): Likewise.
11545 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11546 ppcobsd_store_registers): Likewise.
11547 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11548 Likewise.
11549 * ravenscar-thread.c (ravenscar_fetch_registers,
11550 ravenscar_store_registers, ravenscar_prepare_to_store):
11551 Likewise.
11552 * record-btrace.c (record_btrace_fetch_registers,
11553 record_btrace_store_registers, record_btrace_prepare_to_store):
11554 Likewise.
11555 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11556 Lookup inferior using ptid from regcache, instead of
11557 current_inferior.
11558 * remote.c (remote_fetch_registers, remote_store_registers): Use
11559 ptid from regcache.
11560 * rs6000-nat.c (fetch_register, store_register): Likewise.
11561 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11562 s390_linux_store_inferior_registers): Likewise.
11563 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11564 shnbsd_store_inferior_registers): Likewise.
11565 * sol-thread.c (sol_thread_fetch_registers,
11566 sol_thread_store_registers): Likewise.
11567 * sparc-nat.c (sparc_fetch_inferior_registers,
11568 sparc_store_inferior_registers): Likewise.
11569 * tilegx-linux-nat.c (fetch_inferior_registers,
11570 store_inferior_registers): Likewise.
11571 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11572 vaxbsd_store_inferior_registers): Likewise.
11573 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11574 store_xtregs): Likewise.
11575
11576 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11577
11578 PR gdb/14441
11579 * NEWS: Mention support for rvalue references in GDB and python.
11580 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11581 supports both lvalue and rvalue references.
11582
11583 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11584
11585 PR gdb/14441
11586 * gdbtypes.c (rank_one_type): Implement overloading
11587 resolution rules regarding rvalue references.
11588
11589 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11590
11591 PR gdb/14441
11592 * aarch64-tdep.c (aarch64_type_align)
11593 (aarch64_extract_return_value, aarch64_store_return_value): Change
11594 lvalue reference type checks to general reference type checks.
11595 * amd64-tdep.c (amd64_classify): Likewise.
11596 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11597 Likewise.
11598 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11599 (arm_store_return_value): Likewise.
11600 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11601 * c-typeprint.c (c_print_type): Likewise.
11602 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11603 (cplus_number_of_children, cplus_describe_child): Likewise.
11604 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11605 * completer.c (expression_completer): Likewise.
11606 * cp-support.c (make_symbol_overload_list_adl_namespace):
11607 Likewise.
11608 * darwin-nat-info.c (info_mach_region_command): Likewise.
11609 * dwarf2loc.c (entry_data_value_coerce_ref)
11610 (value_of_dwarf_reg_entry): Likewise.
11611 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11612 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11613 Likewise.
11614 * findvar.c (extract_typed_address, store_typed_address):
11615 Likewise.
11616 * gdbtypes.c (rank_one_type): Likewise.
11617 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11618 * infcall.c (value_arg_coerce): Likewise.
11619 * language.c (pointer_type): Likewise.
11620 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11621 Likewise.
11622 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11623 * mn10300-tdep.c (mn10300_type_align): Likewise.
11624 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11625 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11626 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11627 Likewise.
11628 * printcmd.c (print_formatted, x_command): Likewise.
11629 * python/py-type.c (typy_get_composite, typy_template_argument):
11630 Likewise.
11631 * python/py-value.c (valpy_referenced_value)
11632 (valpy_get_dynamic_type, value_has_field): Likewise.
11633 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11634 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11635 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11636 * spu-tdep.c (spu_scalar_value_p): Likewise.
11637 * symtab.c (lookup_symbol_aux): Likewise.
11638 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11639 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11640 Likewise.
11641 * valops.c (value_cast_pointers, value_cast)
11642 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11643 (value_struct_elt, value_struct_elt_bitpos)
11644 (value_find_oload_method_list, find_overload_match)
11645 (value_rtti_indirect_type): Likewise.
11646 * valprint.c (val_print_scalar_type_p, generic_val_print):
11647 Likewise.
11648 * value.c (value_actual_type, value_as_address, unpack_long)
11649 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11650 (coerce_ref): Likewise.
11651 * varobj.c (varobj_get_value_type): Likewise.
11652
11653 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11654
11655 PR gdb/14441
11656 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11657 table of constants.
11658 * python/lib/gdb/command/explore.py: Support exploring values
11659 of rvalue reference types.
11660 * python/lib/gdb/types.py: Implement get_basic_type() for
11661 rvalue reference types.
11662 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11663 constant.
11664 * python/py-value.c (valpy_getitem): Add an rvalue reference
11665 check.
11666 (valpy_reference_value): Add new parameter "refcode".
11667 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11668 New wrappers for valpy_reference_value().
11669 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11670 (gdbpy_invoke_xmethod): Likewise.
11671
11672 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11673
11674 PR gdb/14441
11675 * dwarf2read.c (process_die, read_type_die_1): Handle the
11676 DW_TAG_rvalue_reference_type DIE.
11677 (read_tag_reference_type): Add new parameter "refcode".
11678
11679 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11680
11681 PR gdb/14441
11682 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11683 (c_type_print_modifier, c_type_print_varspec_suffix)
11684 (c_type_print_base): Support printing rvalue reference types.
11685 * c-valprint.c (c_val_print, c_value_print): Support printing
11686 rvalue reference values.
11687
11688 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11689
11690 PR gdb/14441
11691 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11692 typename.
11693 * cp-support.c (replace_typedefs): Handle
11694 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11695 * python/py-type.c (typy_lookup_type): Likewise.
11696
11697 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11698
11699 PR gdb/14441
11700 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11701 * parse.c (insert_type): Change assert statement.
11702 (follow_types): Handle rvalue reference types.
11703 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11704 constant.
11705
11706 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11707
11708 PR gdb/14441
11709 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11710 value_ref() interface.
11711 * c-valprint.c (c_value_print): Likewise.
11712 * infcall.c (value_arg_coerce): Likewise.
11713 * python/py-value.c (valpy_reference_value): Likewise.
11714 * valops.c (value_cast, value_reinterpret_cast)
11715 (value_dynamic_cast, typecmp): Likewise.
11716 (value_ref): Parameterize by kind of return value reference type.
11717 * value.h (value_ref): Add new parameter "refcode".
11718
11719 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11720
11721 PR gdb/14441
11722 * dwarf2read.c (read_tag_reference_type): Use
11723 lookup_lvalue_reference_type() instead of lookup_reference_type().
11724 * eval.c (evaluate_subexp_standard): Likewise.
11725 * f-exp.y: Likewise.
11726 * gdbtypes.c (make_reference_type, lookup_reference_type):
11727 Generalize with rvalue reference types.
11728 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11729 convenience wrappers for lookup_reference_type().
11730 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11731 reference kind parameter.
11732 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11733 wrappers for lookup_reference_type().
11734 * guile/scm-type.c (gdbscm_type_reference): Use
11735 lookup_lvalue_reference_type() instead of lookup_reference_type().
11736 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11737 * parse.c (follow_types): Likewise.
11738 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11739 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11740 Likewise.
11741 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11742 (gdbpy_invoke_xmethod): Likewise.
11743 * stabsread.c: Provide extra argument to make_reference_type()
11744 call.
11745 * valops.c (value_ref, value_rtti_indirect_type): Use
11746 lookup_lvalue_reference_type() instead of lookup_reference_type().
11747
11748 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11749
11750 PR gdb/14441
11751 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11752 (TYPE_IS_REFERENCE): New macro.
11753 (struct type): Add rvalue_reference_type field.
11754 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11755
11756 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11757
11758 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11759 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11760 New function definition.
11761 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11762 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11763 New function declaration.
11764 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11765 * mi/mi-interp.h: New file.
11766 * solib.c (info_sharedlibrary_command): Replace for loop with
11767 ALL_SO_LIBS macro
11768 * solib.h (update_solib_list): New function declaration.
11769 (so_list_head): Move macro.
11770 * solist.h (ALL_SO_LIBS): New macro.
11771
11772 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11773
11774 * infcmd.c (post_create_inferior): Remove unused argument in
11775 call to solib_add.
11776 * remote.c (remote_start_remote): Likewise.
11777 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11778 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11779 (enable_break): Likewise.
11780 * solib.c (update_solib_list): Remove unused target argument
11781 and its documentation.
11782 (solib_add): Remove unused target argument. Remove unused
11783 argument in call to update_solib_list.
11784 (info_sharedlibrary_command): Remove unused argument in call
11785 to update_solib_list.
11786 (sharedlibrary_command): Remove unused argument in call to
11787 solib_add.
11788 (handle_solib_event): Likewise.
11789 (reload_shared_libraries): Likewise.
11790 * solib.h (solib_add): Remove unused target argument.
11791
11792 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11793
11794 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11795 (s390_displaced_step_fixup): Cover relative branches with the
11796 default fixup handling. This fixes lack of support for some
11797 relative branch instructions.
11798
11799 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11800
11801 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11802 ptid from regcache.
11803
11804 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11805
11806 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11807 i386_darwin_store_inferior_registers): Use ptid from regcache.
11808
11809 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11810
11811 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
11812 i386bsd_store_inferior_registers): Use ptid from regcache.
11813
11814 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11815
11816 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
11817 hppaobsd_store_registers): Use ptid from regcache.
11818
11819 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11820
11821 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
11822 hppanbsd_store_registers): Use ptid from regcache.
11823
11824 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11825
11826 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
11827 from regcache. Use get_ptrace_pid.
11828
11829 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11830
11831 * corelow.c (get_core_register_section): Use ptid from regcache,
11832 update doc.
11833
11834 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11835
11836 * bsd-uthread.c (bsd_uthread_fetch_registers,
11837 bsd_uthread_store_registers): Use ptid from regcache, set and
11838 restore inferior_ptid.
11839
11840 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11841
11842 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
11843 fetch_fp_regs, store_register, store_regs, store_fp_register,
11844 store_fp_regs): Use ptid from regcache.
11845
11846 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11847
11848 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
11849 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
11850 store_vfp_regs): Use ptid from regcache.
11851
11852 2017-03-17 Pedro Alves <palves@redhat.com>
11853
11854 PR remote/21188
11855 * ser-base.c (ser_base_wait_for): Add comment.
11856 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
11857 version.
11858 * ser-unix.c (hardwire_raw): Remove reference to
11859 scb->current_timeout.
11860 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
11861 (hardwire_ops): Install ser_base_readchar instead of
11862 hardwire_readchar.
11863 * serial.h (struct serial) <current_timeout, timeout_remaining>:
11864 Remove fields.
11865
11866 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
11867
11868 PR gdb/19637
11869 * python/lib/gdb/printer/bound_registers.py: Add support for
11870 Python 3.
11871
11872 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
11873
11874 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
11875 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
11876 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
11877 byte_offset to subobj_byte_offset. Fix the handling of
11878 DWARF_VALUE_STACK on big-endian targets when coming via an
11879 implicit pointer.
11880 (dwarf2_evaluate_loc_desc): Adjust call to
11881 dwarf2_evaluate_loc_desc_full.
11882 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
11883 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
11884
11885 2017-03-16 Yao Qi <yao.qi@linaro.org>
11886
11887 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
11888 and REVSH instructions.
11889
11890 2017-03-16 Yao Qi <yao.qi@linaro.org>
11891
11892 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
11893 (arm_record_test): Declare.
11894 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
11895 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
11896 align with the manual.
11897 (thumb_record_misc): Adjust the code order to align with the
11898 manual.
11899 (thumb2_record_decode_insn_handler): Fix instruction matching.
11900 (instruction_reader_thumb): New class.
11901 (arm_record_test): New function.
11902
11903 2017-03-16 Yao Qi <yao.qi@linaro.org>
11904
11905 * arm-tdep.c (abstract_memory_reader): New class.
11906 (instruction_reader): New class.
11907 (extract_arm_insn): Add argument 'reader'. Callers updated.
11908 (decode_insn): Likewise.
11909
11910 2017-03-16 Doug Evans <dje@google.com>
11911
11912 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
11913 member. Change type of TYPE member to SCM. All uses updated.
11914 (lsscm_make_lazy_string_smob): Add assert.
11915 (lsscm_make_lazy_string): Flag bad length values.
11916 (lsscm_elt_type): New function.
11917 (gdbscm_lazy_string_to_value): Rewrite to use
11918 lsscm_safe_lazy_string_to_value.
11919 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
11920 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
11921 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
11922 in incoming type.
11923 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11924 * guile/scm-type.c (tyscm_scm_to_type): New function.
11925
11926 2017-03-15 Doug Evans <dje@google.com>
11927
11928 PR python/17728, python/18439, python/18779
11929 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
11930 member. Change type of TYPE member to PyObject *. All uses updated.
11931 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
11932 (gdbpy_create_lazy_string_object): Flag bad length values.
11933 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
11934 Handle typedefs in incoming type.
11935 (stpy_lazy_string_elt_type): New function.
11936 (gdbpy_extract_lazy_string): Call it.
11937 * python/py-value.c (valpy_lazy_string): Flag bad length values.
11938 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
11939 typedefs in incoming type.
11940
11941 2017-03-16 Doug Evans <dje@google.com>
11942
11943 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
11944 * guile/scm-type.c (tyscm_scm_to_type): New function.
11945
11946 2017-03-16 Jiong Wang <jiong.wang@arm.com>
11947
11948 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
11949 "ULONGEST" for "skip".
11950
11951 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11952
11953 PR gdb/21220
11954 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
11955 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
11956 (inf_ptrace_peek_poke): ...here. New function. Now also loop
11957 over ptrace peek/poke until end of buffer or error.
11958
11959 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
11960
11961 * parse.c (length_of_subexp): Make static.
11962 * parser-defs.h (length_of_subexp): Remove.
11963
11964 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
11965
11966 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
11967 as well.
11968
11969 2017-03-14 Pedro Alves <palves@redhat.com>
11970
11971 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
11972 (main): Use std::unique_ptr. Remove calls to
11973 cp_demangled_name_parse_free.
11974
11975 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11976
11977 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
11978 alphabsd_store_inferior_registers): Use regcache->ptid instead
11979 of inferior_ptid.
11980
11981 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11982
11983 * aix-thread.c (aix_thread_fetch_registers,
11984 aix_thread_store_registers): Use regcache->ptid instead of
11985 inferior_ptid.
11986
11987 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11988
11989 * aarch64-linux-nat.c (fetch_gregs_from_thread,
11990 store_gregs_to_thread, fetch_fpregs_from_thread,
11991 store_fpregs_to_thread): Use regcache->ptid instead of
11992 inferior_ptid.
11993
11994 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
11995
11996 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
11997 amd64_linux_fetch_inferior_registers): Use regcache->ptid
11998 instead of inferior_ptid.
11999
12000 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12001
12002 * target.c (target_fetch_registers, target_store_registers): Add
12003 assert.
12004
12005 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12006
12007 * regcache.h (regcache_get_ptid): New function.
12008 * regcache.c (regcache_get_ptid): New function.
12009
12010 2017-03-13 Mark Wielaard <mark@klomp.org>
12011
12012 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12013
12014 2017-03-10 Keith Seitz <keiths@redhat.com>
12015
12016 PR c++/8218
12017 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12018
12019 2017-03-08 Pedro Alves <palves@redhat.com>
12020
12021 PR gdb/18360
12022 * infrun.c (start_step_over, do_target_resume, resume)
12023 (restart_threads): Assert we're not resuming a thread that is
12024 meant to be stopped.
12025 (infrun_thread_stop_requested_callback): Delete.
12026 (infrun_thread_stop_requested): If the thread is internally
12027 stopped, queue a pending stop event and clear the thread's
12028 inline-frame state.
12029 (handle_stop_requested): New function.
12030 (handle_syscall_event, handle_inferior_event_1): Use
12031 handle_stop_requested.
12032 (handle_stop_requested): New function.
12033 (handle_signal_stop): Set the thread's stop_signal here instead of
12034 at caller.
12035 (finish_step_over): Clear step over info unconditionally.
12036 (handle_signal_stop): If the user had interrupted the event
12037 thread, consider the stop a random signal.
12038 (handle_signal_stop) <signal arrived while stepping over
12039 breakpoint>: Don't restart threads here.
12040 (stop_waiting): Don't clear step-over info here.
12041
12042 2017-03-08 Pedro Alves <palves@redhat.com>
12043
12044 PR 21206
12045 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12046 goes to argument 2, not 1.
12047
12048 2017-03-08 Pedro Alves <palves@redhat.com>
12049
12050 PR cli/21218
12051 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12052 display_gdb_prompt.
12053 (command_line_input): Add comment.
12054
12055 2017-03-08 Pedro Alves <palves@redhat.com>
12056
12057 PR tui/21216
12058 * tui/tui-file.c (tui_file::write): New.
12059 * tui/tui-file.h (tui_file): Override "write".
12060 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12061 factored out from ...
12062 (tui_puts): ... here.
12063 (tui_putc): Use them.
12064 (tui_write): New function.
12065 * tui/tui-io.h (tui_write): Declare.
12066
12067 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12068
12069 * Makefile.in (SFILES): Replace "environ.c" with
12070 "common/environ.c".
12071 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12072 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12073 to...
12074 * common/environ.c: ... here.
12075 * environ.h: Moved to...
12076 * common/environ.h: ... here.
12077
12078 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12079
12080 * gdbarch.sh (pstring_ptr): New static function.
12081 (gdbarch_disassembler_options): Use it.
12082 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12083 not valid_disassembler_option->name.
12084 * gdbarch.c: Regenerate.
12085
12086 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12087
12088 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12089
12090 2017-03-07 Pedro Alves <palves@redhat.com>
12091
12092 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12093
12094 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12095
12096 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12097 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12098 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12099 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12100
12101 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12102
12103 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12104
12105 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12106
12107 * remote.c (remote_add_target_side_commands): Use range-based
12108 for loop.
12109
12110 2017-03-03 Yao Qi <yao.qi@linaro.org>
12111
12112 PR gdb/21165
12113 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12114 value is lazy.
12115 * valprint.c (common_val_print): Likewise.
12116
12117 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12118
12119 * NEWS: Mention new set/show disassembler-options commands.
12120 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12121 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12122 (prospective_options): New static variable.
12123 (gdb_disassembler::gdb_disassembler): Initialize
12124 m_di.disassembler_options.
12125 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12126 (get_disassembler_options): New function.
12127 (set_disassembler_options): Likewise.
12128 (set_disassembler_options_sfunc): Likewise.
12129 (show_disassembler_options_sfunc): Likewise.
12130 (disassembler_options_completer): Likewise.
12131 (_initialize_disasm): Likewise.
12132 * disasm.h (get_disassembler_options): New prototype.
12133 (set_disassembler_options): Likewise.
12134 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12135 (gdbarch_verify_disassembler_options): Likewise.
12136 * gdbarch.c: Regenerate.
12137 * gdbarch.h: Likewise.
12138 * arm-tdep.c (num_disassembly_options): Delete.
12139 (set_disassembly_style): Likewise.
12140 (arm_disassembler_options): New static variable.
12141 (set_disassembly_style_sfunc): Convert short style name into long
12142 option name. Call set_disassembler_options.
12143 (show_disassembly_style_sfunc): New function.
12144 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12145 set_gdbarch_verify_disassembler_options.
12146 (_initialize_arm_tdep): Delete regnames variable and update callers.
12147 (arm_disassembler_options): Initialize.
12148 (disasm_options): New variable.
12149 (num_disassembly_options): Rename from this...
12150 (num_disassembly_styles): ...to this. Compute by scanning through
12151 disasm_options.
12152 (valid_disassembly_styles): Initialize using disasm_options.
12153 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12154 set_arm_regname_option.
12155 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12156 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12157 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12158 set_gdbarch_verify_disassembler_options.
12159 * s390-tdep.c (s390_disassembler_options): New static variable.
12160 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12161 set_gdbarch_verify_disassembler_options.
12162
12163 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12164
12165 * remote.c (remote_add_target_side_condition): Remove "struct"
12166 keyword from range-based for loop.
12167
12168 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12169
12170 * remote.c (remote_add_target_side_condition): Use range-based
12171 for loop. Update comment.
12172
12173 2017-02-27 Yao Qi <yao.qi@linaro.org>
12174
12175 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12176
12177 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12178
12179 * regcache.c (regcache_raw_update): New function.
12180 (regcache_raw_read): Move code to regcache_raw_update.
12181 * regcache.h (regcache_raw_update): New declaration.
12182 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12183
12184 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12185
12186 * dwarf2read.c (create_debug_type_hash_table): Initialize
12187 header.signature and header.type_offset_in_tu.
12188
12189 2017-02-24 Pedro Alves <palves@redhat.com>
12190
12191 * symtab.c (make_file_symbol_completion_list_1): Use
12192 add_symtab_completions.
12193
12194 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12195
12196 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12197
12198 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12199
12200 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12201 I386_MAX_REGISTER_SIZE.
12202 (i386_pseudo_register_write): Likewise.
12203 (i386_process_record): Likewise.
12204 * i387-tdep.c (i387_supply_xsave): Likewise.
12205 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12206 (store_register): Likewise.
12207
12208 2017-02-23 Pedro Alves <palves@redhat.com>
12209
12210 * ada-lang.c: Include "common/function-view.h".
12211 (ada_iterate_over_symbols): Adjust to use function_view as
12212 callback type.
12213 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12214 (ada_make_symbol_completion_list): Use a lambda.
12215 (ada_exc_search_name_matches): Delete.
12216 (name_matches_regex): New.
12217 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12218 * compile/compile-c-support.c: Include "common/function-view.h".
12219 (print_one_macro): Change prototype to accept a ui_file pointer.
12220 (write_macro_definitions): Use a lambda.
12221 * dwarf2read.c: Include "common/function-view.h".
12222 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12223 (dw2_expand_symtabs_matching): Adjust to use function_view as
12224 callback type.
12225 * language.h: Include "common/function-view.h".
12226 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12227 function_view as callback type.
12228 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12229 * linespec.c: Include "common/function-view.h".
12230 (collect_info::add_symbol): New method.
12231 (struct symbol_and_data_callback, iterate_inline_only, struct
12232 symbol_matcher_data, iterate_name_matcher): Delete.
12233 (iterate_over_all_matching_symtabs): Adjust to use function_view
12234 as callback type and lambdas.
12235 (iterate_over_file_blocks): Adjust to use function_view as
12236 callback type.
12237 (decode_compound_collector): Now a class with private fields.
12238 (decode_compound_collector::release_symbols): New method.
12239 (collect_one_symbol): Rename to...
12240 (decode_compound_collector::operator()): ... this and adjust.
12241 (lookup_prefix_sym): decode_compound_collector construction bits
12242 move to decode_compound_collector ctor. Pass the
12243 decode_compound_collector object directly as callback. Remove
12244 cleanups and use decode_compound_collector::release_symbols
12245 instead.
12246 (symtab_collector): Now a class with private fields.
12247 (symtab_collector::release_symtabs): New method.
12248 (add_symtabs_to_list): Rename to...
12249 (symtab_collector::operator()): ... this and adjust.
12250 (collect_symtabs_from_filename): symtab_collector construction
12251 bits move to symtab_collector ctor. Pass the symtab_collector
12252 object directly as callback. Remove cleanups and use
12253 symtab_collector::release_symtabs instead.
12254 (collect_symbols): Delete.
12255 (add_matching_symbols_to_info): Use lambdas.
12256 * macrocmd.c (print_macro_callback): Delete.
12257 (info_macro_command): Use a lambda.
12258 (info_macros_command): Pass print_macro_definition as callable
12259 directly.
12260 (print_one_macro): Remove 'ignore' parameter.
12261 (macro_list_command): Adjust.
12262 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12263 (macro_for_each_data::user_data): Delete field.
12264 (foreach_macro): Adjust to call the function_view.
12265 (macro_for_each): Adjust to use function_view as callback type.
12266 (foreach_macro_in_scope): Adjust to call the function_view.
12267 (macro_for_each_in_scope): Adjust to use function_view as callback
12268 type.
12269 * macrotab.h: Include "common/function-view.h".
12270 (macro_callback_fn): Declare a prototype instead of a pointer.
12271 Remove "user_data" parameter.
12272 (macro_for_each, macro_for_each_in_scope): Adjust to use
12273 function_view as callback type.
12274 * psymtab.c (partial_map_expand_apply)
12275 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12276 Adjust to use function_view as callback type and to return bool.
12277 (psym_expand_symtabs_matching): Adjust to use function_view as
12278 callback types.
12279 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12280 to use function_view as callback type and to return bool.
12281 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12282 callback types.
12283 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12284 as callback types.
12285 * symfile.h: Include "common/function-view.h".
12286 (expand_symtabs_file_matcher_ftype)
12287 (expand_symtabs_symbol_matcher_ftype)
12288 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12289 return bool.
12290 (quick_symbol_functions::map_symtabs_matching_filename)
12291 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12292 function_view as callback type and return bool.
12293 (expand_symtabs_matching): Adjust to use function_view as callback
12294 type.
12295 (maintenance_expand_name_matcher)
12296 (maintenance_expand_file_matcher): Delete.
12297 (maintenance_expand_symtabs): Use lambdas.
12298 * symtab.c (iterate_over_some_symtabs): Adjust to use
12299 function_view as callback types and return bool.
12300 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12301 of a cleanup.
12302 (lookup_symtab_callback): Delete.
12303 (lookup_symtab): Use a lambda.
12304 (iterate_over_symbols): Adjust to use function_view as callback
12305 type.
12306 (struct search_symbols_data, search_symbols_file_matches)
12307 (search_symbols_name_matches): Delete.
12308 (search_symbols): Use a pair of lambdas.
12309 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12310 (symtab_expansion_callback): Delete.
12311 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12312 * symtab.h: Include "common/function-view.h".
12313 (iterate_over_some_symtabs): Adjust to use function_view as
12314 callback type and return bool.
12315 (iterate_over_symtabs): Adjust to use function_view as callback
12316 type.
12317 (symbol_found_callback_ftype): Remove 'data' parameter and return
12318 bool.
12319 (iterate_over_symbols): Adjust to use function_view as callback
12320 type.
12321
12322 2017-02-23 Pedro Alves <palves@redhat.com>
12323
12324 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12325 (%.o) <unittests/%.c>: New pattern.
12326 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12327 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12328 * common/function-view.h: New file.
12329 * unittests/function-view-selftests.c: New file.
12330 * configure: Regenerate.
12331
12332 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12333
12334 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12335 inferior_ptid.
12336 * go32-nat.c (go32_thread_alive): Likewise.
12337
12338 2017-02-23 Yao Qi <yao.qi@linaro.org>
12339
12340 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12341 delete.
12342
12343 2017-02-23 Yao Qi <yao.qi@linaro.org>
12344
12345 * varobj.c (varobj_clear_saved_item): Use delete instead of
12346 xfree.
12347 (update_dynamic_varobj_children): Likewise.
12348
12349 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12350
12351 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12352
12353 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12354
12355 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12356 m_enum_value to 0 in default constructor.
12357
12358 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12359
12360 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12361 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12362 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12363 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12364 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12365 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12366 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12367 IS_STORE_CONDITIONAL_INSN.
12368
12369 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12370
12371 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12372
12373 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12374
12375 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12376
12377 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12378
12379 * dwarf2read.c (skip_one_die, read_attribute_value)
12380 (dwarf2_const_value_attr, dump_die_shallow)
12381 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12382 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12383
12384 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12385
12386 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12387 (dwarf_parse_macro_header): Accept DWARF version 5.
12388 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12389
12390 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12391
12392 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12393 DW_AT_GNU_*.
12394 * common/common-exceptions.h (enum errors): Likewise.
12395 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12396 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12397 (dwarf_expr_context::execute_stack_op): Likewise.
12398 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12399 Likewise.
12400 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12401 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12402 (show_entry_values_debug, call_site_to_target_addr)
12403 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12404 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12405 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12406 (value_of_dwarf_block_entry, indirect_pieced_value)
12407 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12408 (disassemble_dwarf_expression): Likewise.
12409 * dwarf2read.c (process_die, inherit_abstract_dies)
12410 (read_call_site_scope): Likewise.
12411 * gdbtypes.h (struct func_type, struct call_site_parameter)
12412 (struct call_site): Likewise.
12413 * stack.c (read_frame_arg): Likewise.
12414 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12415
12416 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12417
12418 * defs.h (read_unsigned_leb128): New declaration.
12419 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12420 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12421 (dwarf2_find_location_expression): Call also
12422 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12423 * dwarf2loc.h (dwarf2_version): New declaration.
12424 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12425 rnglists.
12426 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12427 .debug_rnglists.
12428 (struct dwop_section_names): Add loclists_dwo.
12429 (dwop_section_names): Add .debug_loclists.dwo.
12430 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12431 (struct dwarf2_per_cu_data): Add dwarf_version.
12432 (struct dwo_sections): Add loclists.
12433 (struct attr_abbrev): Add implicit_const.
12434 (read_indirect_line_string): New declaration.
12435 (read_unsigned_leb128): Delete declaration.
12436 (rcuh_kind): New definition.
12437 (read_and_check_comp_unit_head): Change parameter
12438 is_debug_types_section to section_kind.
12439 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12440 (read_comp_unit_head): Change parameter abfd to section, add parameter
12441 section_kind. Handle DWARF-5.
12442 (error_check_comp_unit_head): Accept also DWARF version 5.
12443 (read_and_check_comp_unit_head): Change parameter
12444 is_debug_types_section to section_kind.
12445 (read_and_check_type_unit_head): Delete function.
12446 (read_abbrev_offset): Handle DWARF-5.
12447 (create_debug_type_hash_table): Add parameter section_kind. Process
12448 only DW_UT_type. Use signature and type_offset_in_tu from struct
12449 comp_unit_head.
12450 (create_debug_types_hash_table): Update create_debug_type_hash_table
12451 caller.
12452 (create_all_type_units): Call create_debug_type_hash_table.
12453 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12454 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12455 caller.
12456 (skip_one_die): Handle DW_FORM_implicit_const.
12457 (dwarf2_rnglists_process): New function.
12458 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12459 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12460 (read_attribute_value): Handle DW_FORM_implicit_const,
12461 DW_FORM_line_strp.
12462 (read_attribute): Handle DW_FORM_implicit_const.
12463 (read_indirect_string_at_offset_from): New function from
12464 read_indirect_string_at_offset.
12465 (read_indirect_string_at_offset): Call
12466 read_indirect_string_at_offset_from.
12467 (read_indirect_line_string_at_offset): New function.
12468 (read_indirect_string): New function comment.
12469 (read_indirect_line_string): New function.
12470 (read_unsigned_leb128): Make it global.
12471 (dwarf2_string_attr): Handle DWARF-5.
12472 (add_include_dir_stub, read_formatted_entries): New functions.
12473 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12474 Handle DWARF-5.
12475 (per_cu_header_read_in): Update read_comp_unit_head caller.
12476 (dwarf2_version): New function.
12477 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12478 rnglists.
12479 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12480 fields.
12481
12482 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12483
12484 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12485
12486 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12487
12488 * dwarf2read.c (dwarf2_ranges_process): New function from
12489 dwarf2_ranges_read.
12490 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12491 dwarf2_ranges_process.
12492
12493 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12494
12495 * dwarf2read.c (create_debug_type_hash_table): New function from
12496 create_debug_types_hash_table.
12497 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12498 (create_all_type_units, open_and_init_dwo_file): Update
12499 create_debug_types_hash_table callers.
12500
12501 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12502
12503 PR gdb/16188
12504 * fork-child.c (trace_start_error): Fix thinko. va_end should
12505 refer to 'ap', not 'args'.
12506
12507 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12508 Pedro Alves <palves@redhat.com>
12509
12510 PR gdb/16188
12511 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12512 calls succeeded.
12513 * fork-child.c (trace_start_error): New function.
12514 (trace_start_error_with_name): Likewise.
12515 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12516 * inf-ptrace.c (inf_ptrace_me): Likewise.
12517 * inferior.h (trace_start_error): New prototype.
12518 (trace_start_error_with_name): Likewise.
12519
12520 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12521
12522 PR gdb/21164
12523 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12524 NULL before using it.
12525 * symmisc.c (maintenance_print_symbols): Likewise.
12526 (maintenance_print_msymbols): Likewise.
12527
12528 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12529
12530 * NEWS: Add record Python bindings entry.
12531
12532 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12533
12534 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12535 py-record-full.o.
12536 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12537 * python/py-record-btrace.c, python/py-record-btrace.h,
12538 python/py-record-full.c, python/py-record-full.h: New file.
12539 * python/py-record.c: Add include for py-record-btrace.h and
12540 py-record-full.h.
12541 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12542 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12543 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12544 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12545 New definition.
12546 (gdbpy_initialize_btrace): New export.
12547 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12548
12549 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12550
12551 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12552 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12553 * python/py-record.c: New file.
12554 * python/python-internal.h (gdbpy_start_recording,
12555 gdbpy_current_recording, gdpy_stop_recording,
12556 gdbpy_initialize_record): New export.
12557 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12558 (python_GdbMethods): Add gdbpy_start_recording,
12559 gdbpy_current_recording and gdbpy_stop_recording.
12560
12561 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12562
12563 * record-btrace.c (record_btrace_record_method): New function.
12564 (init_record_btrace_ops): Initialize to_record_method.
12565 * record-full.c (record_full_record_method): New function.
12566 (init_record_full_ops, init_record_full_core_ops): Add
12567 record_full_record_method.
12568 * record.h (enum record_method): New enum.
12569 * target-debug.h (target_debug_print_enum_record_method: New define.
12570 * target-delegates.c: Regenerate.
12571 * target.c (target_record_method): New function.
12572 * target.h: Include record.h.
12573 (struct target_ops) <to_record_method>: New field.
12574 (target_record_method): New export.
12575
12576 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12577
12578 * record.h (record_start, record_stop): New export.
12579 * record.c (record_start, record_stop): New function.
12580
12581 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12582
12583 * btrace.c (btrace_fetch): Copy function call segments pointer
12584 into a vector.
12585 (btrace_clear): Clear the vector.
12586 (btrace_find_insn_by_number): Use binary search to find the correct
12587 function call segment.
12588 * btrace.h (brace_fun_p): New typedef.
12589 (struct btrace_thread_info) <functions>: New field.
12590
12591 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12592
12593 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12594 * btrace.c (btrace_decode_error): ... here. New function.
12595 * btrace.h (btrace_decode_error): New export.
12596
12597 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12598
12599 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12600 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12601 btrace_find_insn_by_number): Remove special case for gaps.
12602 * btrace.h (btrace_insn_get_error): New export.
12603 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12604 * record-btrace.c (btrace_insn_history): Print number for gaps.
12605 (record_btrace_info, record_btrace_goto): Handle gaps.
12606
12607 2017-02-14 Tom Tromey <tom@tromey.com>
12608
12609 PR python/13598:
12610 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12611 event.
12612 * python/py-evts.c (gdbpy_initialize_py_events): Add
12613 before_prompt registry.
12614 * python/py-events.h (events_object) <before_prompt>: New field.
12615
12616 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12617
12618 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12619
12620 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
12621
12622 * symfile (_initialize_symfile): Add usage text to the load command's
12623 help text.
12624
12625 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12626
12627 * utils.c (defaulted_query): Don't query on secondary UIs.
12628
12629 2017-02-10 Tom Tromey <tom@tromey.com>
12630
12631 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12632
12633 2017-02-10 Tom Tromey <tom@tromey.com>
12634
12635 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12636 "cleanup" local.
12637 * python/py-type.c (typy_legacy_template_argument): Remove
12638 unnecessary "cleanup" local.
12639
12640 2017-02-10 Tom Tromey <tom@tromey.com>
12641
12642 * python/python.c (do_start_initialization): New function, from
12643 _initialize_python.
12644 (_initialize_python): Call do_start_initialization.
12645 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12646 goto.
12647
12648 2017-02-10 Tom Tromey <tom@tromey.com>
12649
12650 * python/py-prettyprint.c (pretty_print_one_value): Use
12651 gdbpy_ref.
12652
12653 2017-02-10 Tom Tromey <tom@tromey.com>
12654
12655 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12656 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12657 gdbpy_ref.
12658 * python/py-type.c (field_new): Use gdbpy_ref.
12659 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12660 gdbpy_ref.
12661 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12662 (py_free_pspace): Likewise.
12663 (pspace_to_pspace_object): Likewise.
12664 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12665 (py_free_objfile): Likewise.
12666 (objfile_to_objfile_object): Likewise.
12667 * python/py-inferior.c (delete_thread_object): Use
12668 gdbpy_ref.
12669 (infpy_read_memory): Likewise.
12670 (py_free_inferior): Likewise.
12671 * python/py-evtregistry.c (create_eventregistry_object): Use
12672 gdbpy_ref.
12673 * python/py-event.c (create_event_object): Use gdbpy_ref.
12674
12675 2017-02-10 Tom Tromey <tom@tromey.com>
12676
12677 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12678 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12679 used.
12680 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12681 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12682 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12683 python/py-framefilter.c, python/py-function.c,
12684 python/py-inferior.c, python/py-infevents.c,
12685 python/py-linetable.c, python/py-newobjfileevent.c,
12686 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12687 python/py-signalevent.c, python/py-stopevent.c,
12688 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12689 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12690 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12691 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12692
12693 2017-02-10 Tom Tromey <tom@tromey.com>
12694
12695 * ui-out.h (ui_out_emit_type): New class.
12696 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12697 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12698 and ui_out_emit_tuple.
12699 (enumerate_locals): Likewise.
12700 (py_mi_print_variables, py_print_locals, py_print_args): Use
12701 ui_out_emit_list.
12702 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12703 ui_out_emit_list.
12704 * common/gdb_optional.h: New file.
12705
12706 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12707
12708 * MAINTAINERS (Write After Approval): Update my e-mail address.
12709
12710 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12711
12712 PR gdb/21122
12713 * breakpoint.c (_initialize_breakpoint): Update the help description
12714 of the 'commands' command to indicate that it takes a list argument.
12715
12716 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12717
12718 * interps.c (current_interp_set_logging): Remove "return".
12719
12720 2017-02-09 Gary Benson <gbenson@redhat.com>
12721
12722 * symtab.c (add_symtab_completions): Prevent NULL pointer
12723 dereference.
12724
12725 2017-02-08 Pedro Alves <palves@redhat.com>
12726
12727 * interps.c (interp::interp): Remove reference to quiet_p.
12728 (interp_set): Make static. Remove dead "Switching to" output
12729 code.
12730 (interp_quiet_p, interp_set_quiet): Delete.
12731 (interpreter_exec_cmd): Don't set the interpreter quiet.
12732 * interps.h (interp_quiet_p): Make static.
12733 (class interp) <quiet_p>: Remove field
12734
12735 2017-02-08 Jerome Guitton <guitton@adacore.com>
12736
12737 * cli/cli-decode.c (find_command_name_length): Make it extern.
12738 * cli/cli-decode.h (find_command_name_length): Declare.
12739 * cli/cli-script.c (command_name_equals, line_first_arg):
12740 New functions.
12741 (process_next_line): Use cli-decode to parse command names.
12742 (build_command_line): Make args a constant pointer.
12743
12744 2017-02-08 Jerome Guitton <guitton@adacore.com>
12745
12746 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12747 Remove case-insensitive search.
12748
12749 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12750
12751 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12752 at the end of the line. Avoids an ARI warning.
12753
12754 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
12755
12756 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12757 rdseed instructions.
12758 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12759
12760 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12761
12762 PR tdep/20936
12763 Provide and use sparc32 and sparc64 target description XML files.
12764 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12765 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12766 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12767 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12768 * features/sparc/sparc32-solaris.xml: New file.
12769 * features/sparc/sparc64-solaris.xml: New file.
12770 * features/sparc/sparc32-solaris.c: Generated.
12771 * features/sparc/sparc64-solaris.c: Generated.
12772 * sparc-tdep.h: Account for differences in target descriptions.
12773 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12774 (sparc32_register_type): Use target provided registers.
12775 (validate_tdesc_registers): New function.
12776 (sparc32_gdbarch_init): Use tdesc_has_registers.
12777 Set pseudoregister functions.
12778 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12779 (sparc64_register_type): Use target provided registers.
12780 (sparc64_init_abi): Set pseudoregister functions.
12781
12782 2017-02-03 Tom Tromey <tom@tromey.com>
12783
12784 PR rust/21097:
12785 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12786 with a single member.
12787
12788 2017-02-03 Pedro Alves <palves@redhat.com>
12789
12790 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12791 (cli_interp_base::~cli_interp_base): New.
12792 (cli_interp): New struct.
12793 (as_cli_interp): Cast the interp itself to cli_interp.
12794 (cli_interpreter_pre_command_loop): Rename to ...
12795 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12796 parameter.
12797 (cli_interpreter_init): Rename to ...
12798 (cli_interp::init): ... this. Remove 'self' parameter. Use
12799 boolean. Make extern.
12800 (cli_interpreter_resume): Rename to ...
12801 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12802 extern.
12803 (cli_interpreter_suspend): Rename to ...
12804 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12805 extern.
12806 (cli_interpreter_exec): Rename to ...
12807 (cli_interp::exec): ... this. Remove 'data' parameter. Make
12808 extern.
12809 (cli_interpreter_supports_command_editing): Rename to ...
12810 (cli_interp_base::supports_command_editing): ... this. Remove
12811 'interp' parameter. Make extern.
12812 (cli_ui_out): Rename to ...
12813 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
12814 Make extern.
12815 (cli_set_logging): Rename to ...
12816 (cli_interp_base::set_logging): ... this. Remove 'interp'
12817 parameter. Make extern.
12818 (cli_interp_procs): Delete.
12819 (cli_interp_factory): Adjust to use "new".
12820 * cli/cli-interp.h: Include "interps.h".
12821 (struct cli_interp_base): New struct.
12822 * interps.c (struct interp): Delete. Fields moved to interps.h.
12823 (interp_new): Delete.
12824 (interp::interp, interp::~interp): New.
12825 (interp_set): Use bool, and return void. Assume the interpreter
12826 has suspend, init and resume methods, and that the all return
12827 void.
12828 (set_top_level_interpreter): interp_set returns void.
12829 (interp_ui_out): Adapt.
12830 (current_interp_set_logging): Adapt.
12831 (interp_data): Delete.
12832 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
12833 (interp_exec): Adapt.
12834 (top_level_interpreter_data): Delete.
12835 * interps.h (interp_init_ftype, interp_resume_ftype)
12836 (interp_suspend_ftype, interp_exec_ftype)
12837 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
12838 (class interp): New.
12839 (interp_new): Delete.
12840 (interp_set): Now returns void. Use bool.
12841 (interp_data, top_level_interpreter_data): Delete.
12842 * mi/mi-common.h: Include interps.h.
12843 (class mi_interp): Inherit from interp. Define a ctor. Declare
12844 init, resume, suspect, exec, interp_ui_out, set_logging and
12845 pre_command_loop methods.
12846 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
12847 (mi_interpreter_init): Rename to ...
12848 (mi_interp::init): ... this. Remove the 'interp' parameter, use
12849 bool, return void and make extern. Adjust.
12850 (mi_interpreter_resume): ... Rename to ...
12851 (mi_interp::resume): ... this. Remove the 'data' parameter,
12852 return void and make extern. Adjust.
12853 (mi_interpreter_suspend): ... Rename to ...
12854 (mi_interp::suspend): ... this. Remove the 'data' parameter,
12855 return void and make extern. Adjust.
12856 (mi_interpreter_exec): ... Rename to ...
12857 (mi_interp::exec): ... this. Remove the 'data' parameter and make
12858 extern. Adjust.
12859 (mi_interpreter_pre_command_loop): ... Rename to ...
12860 (mi_interp::pre_command_loop): ... this. Remove the 'self'
12861 parameter and make extern.
12862 (mi_on_normal_stop_1): Adjust.
12863 (mi_ui_out): Rename to ...
12864 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
12865 parameter and make extern. Adjust.
12866 (mi_set_logging): Rename to ...
12867 (mi_interp::set_logging): ... this. Remove the 'interp'
12868 parameter and make extern. Adjust.
12869 (mi_interp_procs): Delete.
12870 (mi_interp_factory): Adjust to use 'new'.
12871 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
12872 (mi_print_exception, mi_execute_command, mi_load_progress):
12873 Adjust.
12874 * tui/tui-interp.c (tui_interp): New class.
12875 (as_tui_interp): Return a tui_interp pointer.
12876 (tui_on_normal_stop, tui_on_signal_received)
12877 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
12878 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
12879 to use interp::interp_ui_out.
12880 (tui_init): Rename to ...
12881 (tui_interp::init): ... this. Remove the 'self' parameter, use
12882 bool, return void and make extern. Adjust.
12883 (tui_resume): Rename to ...
12884 (tui_interp::resume): ... this. Remove the 'data' parameter,
12885 return void and make extern. Adjust.
12886 (tui_suspend): Rename to ...
12887 (tui_interp::suspend): ... this. Remove the 'data' parameter,
12888 return void and make extern. Adjust.
12889 (tui_ui_out): Rename to ...
12890 (tui_interp::interp_ui_out): ... this. Remove the 'self'
12891 parameter, and make extern. Adjust.
12892 (tui_exec): Rename to ...
12893 (tui_interp::exec): ... this. Remove the 'data' parameter and
12894 make extern.
12895 (tui_interp_procs): Delete.
12896 (tui_interp_factory): Use "new".
12897
12898 2017-02-02 Tom Tromey <tom@tromey.com>
12899
12900 * rust-exp.y (ends_raw_string, space_then_number)
12901 (rust_identifier_start_p): Return bool.
12902 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
12903 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
12904 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
12905 (rust_chartype_p): Return bool.
12906 (val_print_struct, rust_print_struct_def, rust_print_type):
12907 Update.
12908 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
12909 Return bool.
12910
12911 2017-02-02 Tom Tromey <tom@tromey.com>
12912
12913 * rust-lang.c: Reindent.
12914
12915 2017-02-02 Tom Tromey <tom@tromey.com>
12916
12917 * rust-lang.h (rust_crate_for_block): Update.
12918 * rust-lang.c (rust_crate_for_block): Return std::string.
12919 (rust_get_disr_info): Use std:;string, not
12920 gdb::unique_xmalloc_ptr.
12921 * rust-exp.y (crate_name): Update.
12922
12923 2017-02-02 Pedro Alves <palves@redhat.com>
12924
12925 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
12926 field out of gdb_disassembler_test and make it static.
12927
12928 2017-02-02 Pedro Alves <palves@redhat.com>
12929
12930 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
12931 mi1_interp and mi_interp fields.
12932
12933 2017-02-02 Pedro Alves <palves@redhat.com>
12934
12935 * cli/cli-interp.c (struct saved_output_files, saved_output):
12936 Moved from cli/cli-logging.c.
12937 (cli_set_logging): New function.
12938 (cli_interp_procs): Install cli_set_logging.
12939 * cli/cli-interp.h (make_logging_output, cli_set_logging):
12940 Declare.
12941 * cli/cli-logging.c (struct saved_output_files, saved_output):
12942 Moved to cli/cli-interp.c.
12943 (pop_output_files): Don't save outputs here.
12944 (make_logging_output): New function.
12945 (handle_redirections): Don't build tee nor save previous outputs
12946 here.
12947 * interps.c (current_interp_set_logging): Change prototype.
12948 Assume there's always a set_logging_proc method installed.
12949 * interps.h (interp_set_logging_ftype): Change prototype.
12950 (current_interp_set_logging): Change prototype and adjust comment.
12951 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
12952 use make_logging_output.
12953 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
12954 2017-02-02 Pedro Alves <palves@redhat.com>
12955
12956 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
12957 from ...
12958 (set_logging_overwrite): ... here.
12959 (logging_no_redirect_file): Delete.
12960 (set_logging_redirect): Don't handle redirection on the fly.
12961 Instead warn that "logging off" / "logging on" is necessary.
12962 (pop_output_files): Delete references to logging_no_redirect_file.
12963 (show_logging_command): Always speak in terms of what will happen
12964 once logging is reenabled.
12965
12966 2017-02-02 Pedro Alves <palves@redhat.com>
12967
12968 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
12969
12970 2017-02-02 Pedro Alves <palves@redhat.com>
12971
12972 * disasm.c (gdb_pretty_print_insn): Rename to ...
12973 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
12974 Remove gdbarch parameter. Adapt to clear the object's buffers
12975 instead of allocating new buffers, and to print using the object's
12976 gdb_disassembler instead of calling gdb_print_insn.
12977 (dump_insns): Use gdb_pretty_print_disassembler.
12978 * disasm.h (gdb_pretty_print_insn): Delete declaration.
12979 (gdb_pretty_print_disassembler): New class.
12980 * record-btrace.c (btrace_insn_history): Use
12981 gdb_pretty_print_disassembler.
12982
12983 2017-02-02 Pedro Alves <palves@redhat.com>
12984
12985 * ada-lang.c (type_as_string): Use string_file.
12986 * ada-valprint.c (ada_print_floating): Use string_file.
12987 * ada-varobj.c (ada_varobj_scalar_image)
12988 (ada_varobj_get_value_image): Use string_file.
12989 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
12990 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
12991 * breakpoint.c (update_inserted_breakpoint_locations)
12992 (insert_breakpoint_locations, reattach_breakpoints)
12993 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
12994 (print_it_watchpoint): Use string_file.
12995 (save_breakpoints): Use stdio_file.
12996 * c-exp.y (oper): Use string_file.
12997 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
12998 tee_file.
12999 (pop_output_files): Use delete.
13000 (handle_redirections): Use stdio_file and tee_file.
13001 * cli/cli-setshow.c (do_show_command): Use string_file.
13002 * compile/compile-c-support.c (c_compute_program): Use
13003 string_file.
13004 * compile/compile-c-symbols.c (generate_vla_size): Take a
13005 'string_file &' instead of a 'ui_file *'.
13006 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13007 of a 'ui_file *'. Use string_file.
13008 (generate_c_for_variable_locations): Take a 'string_file &'
13009 instead of a 'ui_file *'.
13010 * compile/compile-internal.h (generate_c_for_for_one_variable):
13011 Take a 'string_file &' instead of a 'ui_file *'.
13012 * compile/compile-loc2c.c (push, pushf, unary, binary)
13013 (print_label, pushf_register_address, pushf_register)
13014 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13015 'ui_file *'. Adjust.
13016 * compile/compile.c (compile_to_object): Use string_file.
13017 * compile/compile.h (compile_dwarf_expr_to_c)
13018 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13019 'ui_file *'.
13020 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13021 (replace_typedefs_qualified_name): Use string_file and
13022 obstack_copy0.
13023 * disasm.c (gdb_pretty_print_insn): Use string_file.
13024 (gdb_disassembly): Adjust reference the null_stream global.
13025 (do_ui_file_delete): Delete.
13026 (gdb_insn_length): Use null_stream.
13027 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13028 * dwarf2loc.c (dwarf2_compile_property_to_c)
13029 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13030 'string_file &' instead of a 'ui_file *'.
13031 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13032 * dwarf2read.c (do_ui_file_peek_last): Delete.
13033 (dwarf2_compute_name): Use string_file.
13034 * event-top.c (gdb_setup_readline): Use stdio_file.
13035 * gdbarch.sh (verify_gdbarch): Use string_file.
13036 * gdbtypes.c (safe_parse_type): Use null_stream.
13037 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13038 string_file.
13039 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13040 'string_file *' instead of a 'ui_file *'.
13041 (gdbscm_arch_disassemble): Use string_file.
13042 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13043 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13044 inherits from ui_file.
13045 (ioscm_file_port_delete, ioscm_file_port_rewind)
13046 (ioscm_file_port_put): Delete.
13047 (ioscm_file_port_write): Rename to ...
13048 (ioscm_file_port::write): ... this. Remove file_port_magic
13049 checks.
13050 (ioscm_file_port_new): Delete.
13051 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13052 ui_file_up.
13053 * guile/scm-type.c (tyscm_type_name): Use string_file.
13054 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13055 Use string_file.
13056 * infcmd.c (print_return_value_1): Use string_file.
13057 * infrun.c (print_target_wait_results): Use string_file.
13058 * language.c (add_language): Use string_file.
13059 * location.c (explicit_to_string_internal): Use string_file.
13060 * main.c (captured_main_1): Use null_file.
13061 * maint.c (maintenance_print_architecture): Use stdio_file.
13062 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13063 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13064 event_channel>: Change type to mi_console_file pointer.
13065 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13066 (mi_console_file_delete): Delete.
13067 (struct mi_console_file): Delete.
13068 (mi_console_file_magic): Delete.
13069 (mi_console_file_new): Delete.
13070 (mi_console_file::mi_console_file): New.
13071 (mi_console_file_delete): Delete.
13072 (mi_console_file_fputs): Delete.
13073 (mi_console_file::write): New.
13074 (mi_console_raw_packet): Delete.
13075 (mi_console_file::flush): New.
13076 (mi_console_file_flush): Delete.
13077 (mi_console_set_raw): Rename to ...
13078 (mi_console_file::set_raw): ... this.
13079 * mi/mi-console.h (class mi_console_file): New class.
13080 (mi_console_file_new, mi_console_set_raw): Delete.
13081 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13082 (mi_set_logging): Use delete and tee_file. Adjust.
13083 * mi/mi-main.c (output_register): Use string_file.
13084 (mi_cmd_data_evaluate_expression): Use string_file.
13085 (mi_cmd_data_read_memory): Use string_file.
13086 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13087 * mi/mi-out.c (mi_ui_out::main_stream): New.
13088 (mi_ui_out::rewind): Use main_stream and
13089 string_file.
13090 (mi_ui_out::put): Use main_stream and string_file.
13091 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13092 Allocate a 'string_file' instead.
13093 (mi_out_new): Don't allocate a mem_fileopen stream here.
13094 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13095 (mi_ui_out::main_stream): Declare method.
13096 * printcmd.c (eval_command): Use string_file.
13097 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13098 * python/py-arch.c (archpy_disassemble): Use string_file.
13099 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13100 * python/py-frame.c (frapy_str): Use string_file.
13101 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13102 Use string_file.
13103 * python/py-type.c (typy_str): Use string_file.
13104 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13105 * python/py-value.c (valpy_str): Use string_file.
13106 * record-btrace.c (btrace_insn_history): Use string_file.
13107 * regcache.c (regcache_print): Use stdio_file.
13108 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13109 * remote.c (escape_buffer): Use string_file.
13110 * rust-lang.c (rust_get_disr_info): Use string_file.
13111 * serial.c (serial_open_ops_1): Use stdio_file.
13112 (do_serial_close): Use delete.
13113 * stack.c (print_frame_arg): Use string_file.
13114 (print_frame_args): Remove local mem_fileopen stream, not used.
13115 (print_frame): Use string_file.
13116 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13117 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13118 Take a 'string_file *' instead of a 'ui_file *'.
13119 * top.c (new_ui): Use stdio_file and stderr_file.
13120 (free_ui): Use delete.
13121 (execute_command_to_string): Use string_file.
13122 (quit_confirm): Use string_file.
13123 * tracepoint.c (collection_list::append_exp): Use string_file.
13124 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13125 * tui/tui-file.c: Don't include "ui-file.h".
13126 (enum streamtype, struct tui_stream): Delete.
13127 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13128 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13129 (tui_file::tui_file): New method.
13130 (tui_file_fputs): Delete.
13131 (tui_file_get_strbuf): Delete.
13132 (tui_file::puts): New method.
13133 (tui_file_adjust_strbuf): Delete.
13134 (tui_file_flush): Delete.
13135 (tui_file::flush): New method.
13136 * tui/tui-file.h: Tweak intro comment.
13137 Include ui-file.h.
13138 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13139 (tui_file_adjust_strbuf): Delete declarations.
13140 (class tui_file): New class.
13141 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13142 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13143 (tui_register_format): Use string_stream.
13144 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13145 (tui_get_function_from_frame): Use string_file.
13146 * typeprint.c (type_to_string): Use string_file.
13147 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13148 (null_stream): New global.
13149 (ui_file_delete): Delete.
13150 (ui_file::ui_file): New.
13151 (null_file_isatty): Delete.
13152 (ui_file::~ui_file): New.
13153 (null_file_rewind): Delete.
13154 (ui_file::printf): New.
13155 (null_file_put): Delete.
13156 (null_file_flush): Delete.
13157 (ui_file::putstr): New.
13158 (null_file_write): Delete.
13159 (ui_file::putstrn): New.
13160 (null_file_read): Delete.
13161 (ui_file::putc): New.
13162 (null_file_fputs): Delete.
13163 (null_file_write_async_safe): Delete.
13164 (ui_file::vprintf): New.
13165 (null_file_delete): Delete.
13166 (null_file::write): New.
13167 (null_file_fseek): Delete.
13168 (null_file::puts): New.
13169 (ui_file_data): Delete.
13170 (null_file::write_async_safe): New.
13171 (gdb_flush, ui_file_isatty): Adjust.
13172 (ui_file_put, ui_file_rewind): Delete.
13173 (ui_file_write): Adjust.
13174 (ui_file_write_for_put): Delete.
13175 (ui_file_write_async_safe, ui_file_read): Adjust.
13176 (ui_file_fseek): Delete.
13177 (fputs_unfiltered): Adjust.
13178 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13179 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13180 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13181 (set_ui_file_data): Delete.
13182 (string_file::~string_file, string_file::write)
13183 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13184 (do_ui_file_as_string, ui_file_as_string): Delete.
13185 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13186 (struct mem_file): Delete.
13187 (mem_file_new): Delete.
13188 (stdio_file::stdio_file): New.
13189 (mem_file_delete): Delete.
13190 (stdio_file::stdio_file): New.
13191 (mem_fileopen): Delete.
13192 (stdio_file::~stdio_file): New.
13193 (mem_file_rewind): Delete.
13194 (stdio_file::set_stream): New.
13195 (mem_file_put): Delete.
13196 (stdio_file::open): New.
13197 (mem_file_write): Delete.
13198 (stdio_file_magic, struct stdio_file): Delete.
13199 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13200 (stdio_file::flush): New.
13201 (stdio_file_read): Rename to ...
13202 (stdio_file::read): ... this. Adjust.
13203 (stdio_file_write): Rename to ...
13204 (stdio_file::write): ... this. Adjust.
13205 (stdio_file_write_async_safe): Rename to ...
13206 (stdio_file::write_async_safe) ... this. Adjust.
13207 (stdio_file_fputs): Rename to ...
13208 (stdio_file::puts) ... this. Adjust.
13209 (stdio_file_isatty): Delete.
13210 (stdio_file_fseek): Delete.
13211 (stdio_file::isatty): New.
13212 (stderr_file_write): Rename to ...
13213 (stderr_file::write) ... this. Adjust.
13214 (stderr_file_fputs): Rename to ...
13215 (stderr_file::puts) ... this. Adjust.
13216 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13217 (stderr_file::stderr_file): New.
13218 (tee_file_magic): Delete.
13219 (struct tee_file): Delete.
13220 (tee_file::tee_file): New.
13221 (tee_file_new): Delete.
13222 (tee_file::~tee_file): New.
13223 (tee_file_delete): Delete.
13224 (tee_file_flush): Rename to ...
13225 (tee_file::flush): ... this. Adjust.
13226 (tee_file_write): Rename to ...
13227 (tee_file::write): ... this. Adjust.
13228 (tee_file::write_async_safe): New.
13229 (tee_file_fputs): Rename to ...
13230 (tee_file::puts): ... this. Adjust.
13231 (tee_file_isatty): Rename to ...
13232 (tee_file::isatty): ... this. Adjust.
13233 * ui-file.h (struct obstack, struct ui_file): Don't
13234 forward-declare.
13235 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13236 (ui_file_write_ftype)
13237 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13238 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13239 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13240 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13241 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13242 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13243 (set_ui_file_fseek): Delete.
13244 (ui_file_data, ui_file_delete, ui_file_rewind)
13245 (struct ui_file): New.
13246 (ui_file_up): New.
13247 (class null_file): New.
13248 (null_stream): Declare.
13249 (ui_file_write_for_put, ui_file_put): Delete.
13250 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13251 Delete.
13252 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13253 (gdb_fopen, tee_file_new): Delete.
13254 (struct string_file): New.
13255 (struct stdio_file): New.
13256 (stdio_file_up): New.
13257 (struct stderr_file): New.
13258 (class tee_file): New.
13259 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13260 of a 'ui_file *'. Adjust.
13261 * ui-out.h (class ui_out) <field_stream>: Likewise.
13262 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13263 (null_stream): Delete.
13264 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13265 Adjust.
13266 * utils.h (struct ui_file): Delete forward declaration..
13267 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13268 (error_stream): Take a 'string_file &' instead of a
13269 'ui_file *'.
13270 * varobj.c (varobj_value_get_print_value): Use string_file.
13271 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13272 * gdbarch.c: Regenerate.
13273
13274 2017-02-02 Pedro Alves <palves@redhat.com>
13275
13276 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13277 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13278 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13279 Adjust to call gdb_print_insn instead of
13280 gdb_disassembler::print_insn.
13281 (dump_insns, do_mixed_source_and_assembly_deprecated)
13282 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13283 'gdbarch' parameter. Remove gdb_disassembler parameter.
13284 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13285 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13286 declaration.
13287 (gdb_pretty_print_insn): Re-add declaration.
13288 * record-btrace.c (btrace_insn_history): Don't allocate a
13289 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13290
13291 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13292
13293 * disasm.h (gdb_disassembly): Remove file_string parameter.
13294 * disasm.c (gdb_disassembly): Likewise.
13295 * cli/cli-cmds.c (print_disassembly): Adapt.
13296 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13297 * stack.c (do_gdb_disassembly): Likewise.
13298
13299 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13300
13301 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13302 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13303 targets. And if the implicit value is longer than needed, extract
13304 the first bytes instead of the "least significant" ones.
13305
13306 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13307
13308 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13309 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13310 (btrace_fetch): Assert can_access_registers_ptid.
13311 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13312 validate_registers_access.
13313
13314 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13315
13316 * gdbthread.h (can_access_registers_ptid): New.
13317 * thread.c (can_access_registers_ptid): New.
13318
13319 2017-02-01 Pedro Alves <palves@redhat.com>
13320
13321 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13322
13323 2017-01-31 Pedro Alves <palves@redhat.com>
13324
13325 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13326 Fix typos.
13327
13328 2017-01-31 Pedro Alves <palves@redhat.com>
13329
13330 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13331 not used.
13332
13333 2017-01-31 Pedro Alves <palves@redhat.com>
13334
13335 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13336
13337 2017-01-31 Pedro Alves <palves@redhat.com>
13338
13339 * common/scoped_restore.h
13340 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13341 change the value's parameter type to T2.
13342 (make_scoped_restore): Likewise.
13343
13344 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13345 Richard Henderson <rth@redhat.com>
13346
13347 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13348 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13349 GS_BASE for older kernels.
13350 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13351 GS_BASE for older kernels.
13352 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13353 and GS_BASE to the offset table.
13354 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13355 system register group.
13356 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13357 for older kernels.
13358 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13359 amd64 ABI.
13360 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13361 AMD64_GSBASE_REGNUM.
13362 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13363 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13364 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13365 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13366 i386/64bit-segments.xml in those rules.
13367 * features/i386/64bit-segments.xml: New file.
13368 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13369 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13370 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13371 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13372 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13373 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13374 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13375 * features/i386/amd64-avx-linux.c: Regenerated.
13376 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13377 * features/i386/amd64-avx-mpx.c: Regenerated.
13378 * features/i386/amd64-avx512-linux.c: Regenerated.
13379 * features/i386/amd64-linux.c: Regenerated.
13380 * features/i386/amd64-mpx-linux.c: Regenerated.
13381 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13382 * features/i386/i386-avx-mpx.c: Regenerated.
13383 * features/i386/x32-avx-linux.c: Regenerated.
13384 * features/i386/x32-avx512-linux.c: Regenerated.
13385 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13386 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13387 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13388 * regformats/i386/amd64-linux.dat: Regenerated.
13389 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13390 * regformats/i386/x32-avx-linux.dat: Regenerated.
13391 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13392 * regformats/i386/x32-linux.dat: Regenerated.
13393
13394 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13395
13396 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13397 Set to AMD64_NUM_REGS.
13398
13399 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13400
13401 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13402 that checks validity of a register number.
13403
13404 2017-01-27 Kees Cook <keescook@google.com>
13405
13406 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13407 fetch_fpregs if target has fpa registers.
13408 (arm_linux_store_inferior_registers): Call store_fpregs if target
13409 has fpa registers.
13410
13411 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13412
13413 * cris-tdep.c (cris_gdbarch_init): Remove check for
13414 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13415
13416 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13417
13418 * corelow.c (get_core_register_section): Check for regset
13419 existence before checking for REGSET_VARIABLE_SIZE.
13420
13421 2017-01-26 Yao Qi <yao.qi@linaro.org>
13422 Pedro Alves <palves@redhat.com>
13423
13424 PR gdb/20939
13425 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13426 call memory_error, save memaddr instead.
13427 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13428 negative, cal memory_error.
13429 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13430
13431 2017-01-26 Yao Qi <yao.qi@linaro.org>
13432
13433 * disasm-selftests.c (memory_error_test): New function.
13434 (_initialize_disasm_selftests): Register memory_error_test.
13435
13436 2017-01-26 Yao Qi <yao.qi@linaro.org>
13437
13438 * Makefile.in (SFILES): Add disasm-selftests.c and
13439 selftest-arch.c.
13440 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13441 * disasm-selftests.c: New file.
13442 * selftest-arch.c: New file.
13443 * selftest-arch.h: New file.
13444
13445 2017-01-26 Yao Qi <yao.qi@linaro.org>
13446
13447 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13448 to bfd_arch_mep. Don't return 0 if section is not
13449 found. Call print_insn_mep.
13450
13451 2017-01-26 Pedro Alves <palves@redhat.com>
13452 Yao Qi <yao.qi@linaro.org>
13453
13454 * arm-tdep.c: Include "disasm.h".
13455 (gdb_print_insn_arm): Update code to get gdbarch.
13456 * disasm.c (dis_asm_read_memory): Change it to
13457 gdb_disassembler::dis_asm_read_memory.
13458 (dis_asm_memory_error): Likewise.
13459 (dis_asm_print_address): Likewise.
13460 (gdb_pretty_print_insn): Change it to
13461 gdb_disassembler::pretty_print_insn.
13462 (dump_insns): Add one argument gdb_disassemlber. All
13463 callers updated.
13464 (do_mixed_source_and_assembly_deprecated): Likewise.
13465 (do_mixed_source_and_assembly): Likewise.
13466 (do_assembly_only): Likewise.
13467 (gdb_disassembler::gdb_disassembler): New.
13468 (gdb_disassembler::print_insn): New.
13469 * disasm.h (class gdb_disassembler): New.
13470 (gdb_pretty_print_insn): Remove declaration.
13471 (gdb_disassemble_info): Likewise.
13472 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13473 (gdbscm_disasm_read_memory_worker): Update.
13474 (gdbscm_disasm_read_memory): Update.
13475 (gdbscm_disasm_memory_error): Remove.
13476 (gdbscm_disasm_print_address): Remove.
13477 (gdbscm_disassembler::gdbscm_disassembler): New.
13478 (gdbscm_print_insn_from_port): Update.
13479 * mips-tdep.c: Include disasm.h.
13480 (gdb_print_insn_mips): Update code to get gdbarch.
13481 * record-btrace.c (btrace_insn_history): Update.
13482 * spu-tdep.c: Include disasm.h.
13483 (struct spu_dis_asm_data): Remove.
13484 (struct spu_dis_asm_info): New.
13485 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13486 SPU id.
13487 (gdb_print_insn_spu): Cast disassemble_info to
13488 spu_dis_asm_info.
13489
13490 2017-01-26 Yao Qi <yao.qi@linaro.org>
13491
13492 * disasm.c (do_ui_file_delete): Delete.
13493 (gdb_insn_length): Move code creating stream to ...
13494 * utils.c (null_stream): ... here. New function.
13495 * utils.h (null_stream): Declare.
13496
13497 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13498
13499 * python/py-inferior.c (find_thread_object): Return directly
13500 from the loop. Remove "found" variable.
13501
13502 2017-01-21 Joel Brobecker <brobecker@adacore.com>
13503
13504 GDB 7.12.1 released.
13505
13506 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13507
13508 * python/py-function.c (fnpy_call): Reorder declarations to have
13509 the gdbpy_enter object declared first.
13510 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13511
13512 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13513
13514 PR python/21068
13515 * python/python-internal.h (PyMem_RawMalloc): Define for
13516 Python < 3.4.
13517 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13518 PyMem_RawMalloc instead of PyMem_Malloc.
13519
13520 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13521 Luis Machado <lgustavo@codesourcery.com>
13522
13523 * NEWS (New commands): Mention flash-erase.
13524 (New MI commands): Mention target-flash-erase.
13525 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13526 command.
13527 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13528 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13529 * target.c (flash_erase_command): New function.
13530 (initialize_targets): Add new flash-erase command.
13531 * target.h (flash_erase_command): New declaration.
13532
13533 2017-01-20 Joel Brobecker <brobecker@adacore.com>
13534
13535 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13536 HAVE_SYS_PROCFS_H is defined.
13537
13538 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13539
13540 * remote.c (struct cached_reg): Change data into a pointer.
13541 * (stop_reply_dtr): Free data pointers before deleting vector.
13542 (process_stop_reply): Likewise.
13543 (remote_parse_stop_reply): Allocate space for data
13544
13545 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13546
13547 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13548 MAX_REGISTER_SIZE.
13549 (amd64_pseudo_register_read_value): Likewise.
13550 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13551 (store_register_using_P): Likewise.
13552 * regcache.c (regcache_xfer_part): Likewise.
13553
13554 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13555
13556 Split real and pseudo registers.
13557 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13558 (sparc32_pseudo_regnum): New enum.
13559 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13560 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13561 (SPARC32_CP0_REGISTERS): New macro.
13562 (sparc32_pseudo_register_name): New function.
13563 (sparc32_register_name): Use sparc32_pseudo_register_name.
13564 (sparc32_pseudo_register_type): New function.
13565 (sparc32_register_type): Use sparc32_pseudo_register_type.
13566 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13567 pseudo register numbers.
13568 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13569 (SPARC64_CP0_REGISTERS): New macro.
13570 (sparc64_pseudo_register_name): New function.
13571 (sparc64_register_name): Use sparc64_pseudo_register_name.
13572 (sparc64_pseudo_register_type): New function.
13573 (sparc64_register_type): Use sparc64_pseudo_register_type.
13574 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13575 pseudo register numbers.
13576 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13577 sparc64_store_arguments): Handle pseudo register numbers.
13578
13579 2017-01-13 Yao Qi <yao.qi@linaro.org>
13580
13581 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13582 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13583 output.
13584 (getpkt_or_notif_sane_1): Likewise.
13585
13586 2017-01-13 Yao Qi <yao.qi@linaro.org>
13587
13588 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13589 of CC. Pass "-x c++-header" instead of "-x c".
13590
13591 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13592
13593 * remote.c (remote_can_async_p): Update comment.
13594
13595 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13596
13597 * linux-nat.c (linux_nat_can_async_p): Update comment.
13598
13599 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13600
13601 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13602
13603 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13604
13605 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13606
13607 2017-01-10 Tom Tromey <tom@tromey.com>
13608
13609 * python/py-type.c (typy_legacy_template_argument): Update.
13610 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13611 ~demangle_parse_info): Declare new members.
13612 (cp_demangled_name_to_comp): Return unique_ptr.
13613 (cp_demangled_name_parse_free)
13614 (make_cleanup_cp_demangled_name_parse_free)
13615 (cp_new_demangle_parse_info): Remove.
13616 * cp-support.c (do_demangled_name_parse_free_cleanup)
13617 (make_cleanup_cp_demangled_name_parse_free): Remove.
13618 (inspect_type, cp_canonicalize_string_full)
13619 (cp_canonicalize_string): Update.
13620 (mangled_name_to_comp): Change return type.
13621 (cp_class_name_from_physname, method_name_from_physname)
13622 (cp_func_name, cp_remove_params): Update.
13623 * cp-name-parser.y (demangle_parse_info): New constructor, from
13624 cp_new_demangle_parse_info.
13625 (~demangle_parse_info): New destructor, from
13626 cp_demangled_name_parse_free.
13627 (cp_merge_demangle_parse_infos): Update.
13628 (cp_demangled_name_to_comp): Change return type.
13629
13630 2017-01-10 Tom Tromey <tom@tromey.com>
13631
13632 * top.c (prevent_dont_repeat): Change return type.
13633 * python/python.c (execute_gdb_command): Use std::string.
13634 Update.
13635 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13636 * command.h (prevent_dont_repeat): Change return type.
13637 * breakpoint.c (bpstat_do_actions_1): Update.
13638
13639 2017-01-10 Tom Tromey <tom@tromey.com>
13640
13641 * value.h (scoped_value_mark::~scoped_value_mark): Call
13642 free_to_mark.
13643 (scoped_value_mark::free_to_mark): New method.
13644 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13645 scoped_value_mark.
13646
13647 2017-01-10 Tom Tromey <tom@tromey.com>
13648
13649 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13650 (valpy_reference_value, valpy_const_value, valpy_get_address)
13651 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13652 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13653 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13654 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13655 scoped_value_mark.
13656 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13657 * value.h (scoped_value_mark): New class.
13658
13659 2017-01-10 Tom Tromey <tom@tromey.com>
13660
13661 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13662 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13663 * psymtab.c (discard_psymtabs_upto): Remove.
13664 (make_cleanup_discard_psymtabs): Remove.
13665 (struct psymtab_state): Remove.
13666
13667 2017-01-10 Tom Tromey <tom@tromey.com>
13668
13669 * record-full.c (record_full_save_cleanups): Remove.
13670 (record_full_save): Use gdb::unlinker.
13671 * gcore.c (do_bfd_delete_cleanup): Remove.
13672 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13673 cleanups.
13674 * dwarf2read.c (unlink_if_set): Remove.
13675 (write_psymtabs_to_index): Use gdb::unlinker.
13676 * common/gdb_unlinker.h: New file.
13677
13678 2017-01-10 Tom Tromey <tom@tromey.com>
13679
13680 * windows-tdep.c (windows_xfer_shared_library): Update.
13681 * windows-nat.c (windows_make_so): Update.
13682 * utils.h (make_cleanup_bfd_unref): Remove.
13683 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13684 * symfile.h (symfile_bfd_open)
13685 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13686 * symfile.c (read_symbols, symbol_file_add)
13687 (separate_debug_file_exists): Update.
13688 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13689 (generic_load, reread_symbols): Update.
13690 * symfile-mem.c (symbol_file_add_from_memory): Update.
13691 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13692 (spu_symbol_file_add_from_memory): Update.
13693 * solist.h (struct target_so_ops) <bfd_open>: Return
13694 gdb_bfd_ref_ptr.
13695 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13696 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13697 gdb_bfd_ref_ptr.
13698 (solib_map_sections, reload_shared_libraries_1): Update.
13699 * solib-svr4.c (enable_break): Update.
13700 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13701 * solib-frv.c (enable_break2): Update.
13702 * solib-dsbt.c (enable_break): Update.
13703 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13704 gdb_bfd_ref_ptr.
13705 (darwin_solib_get_all_image_info_addr_at_init): Update.
13706 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13707 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13708 * record-full.c (record_full_save): Update.
13709 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13710 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13711 * minidebug.c (find_separate_debug_file_in_section): Return
13712 gdb_bfd_ref_ptr.
13713 * machoread.c (macho_add_oso_symfile): Change abfd to
13714 gdb_bfd_ref_ptr.
13715 (macho_symfile_read_all_oso): Update.
13716 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13717 (macho_symfile_read): Update.
13718 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13719 (jit_bfd_try_read_symtab): Update.
13720 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13721 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13722 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13723 gdb_bfd_ref_ptr.
13724 (gdb_bfd_ref_policy): New struct.
13725 (gdb_bfd_ref_ptr): New typedef.
13726 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13727 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13728 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13729 gdb_bfd_ref_ptr.
13730 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13731 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13732 (gcore_command): Update.
13733 * exec.c (exec_file_attach): Update.
13734 * elfread.c (elf_symfile_read): Update.
13735 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13736 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13737 (open_and_init_dwo_file): Update.
13738 (open_dwp_file): Return gdb_bfd_ref_ptr.
13739 (open_and_init_dwp_file): Update.
13740 * corelow.c (core_open): Update.
13741 * compile/compile-object-load.c (compile_object_load): Update.
13742 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13743 * coffread.c (coff_symfile_read): Update.
13744 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13745 gdb_bfd_ref_ptr. Rename.
13746 (dump_bfd_file, restore_command): Update.
13747 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13748 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13749 (find_separate_debug_file_by_buildid): Update.
13750
13751 2017-01-10 Tom Tromey <tom@tromey.com>
13752
13753 * common/gdb_ref_ptr.h: New file.
13754 * python/py-ref.h (struct gdbpy_ref_policy): New.
13755 (gdbpy_ref): Now a typedef.
13756
13757 2017-01-10 Tom Tromey <tom@tromey.com>
13758
13759 * utils.h (make_cleanup_htab_delete): Don't declare.
13760 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13761 Remove.
13762 * linespec.c (decode_compound_collector): Add constructor,
13763 destructor.
13764 (lookup_prefix_sym): Remove cleanup.
13765 (symtab_collector): Add constructor, destructor.
13766 (collect_symtabs_from_filename): Remove cleanup.
13767 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13768 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13769 Use htab_up.
13770 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13771 * dwarf2read.c (dw2_expand_symtabs_matching)
13772 (dw2_map_symbol_filenames, dwarf_decode_macros)
13773 (write_psymtabs_to_index): Use htab_up.
13774 * dwarf2loc.c (func_verify_no_selftailcall)
13775 (call_site_find_chain_1, func_verify_no_selftailcall)
13776 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13777 std::vector, gdb::unique_xmalloc_ptr.
13778 (call_sitep): Remove typedef.
13779 (dwarf2_locexpr_baton_eval): Remove unused variable.
13780
13781 2017-01-10 Tom Tromey <tom@tromey.com>
13782
13783 * python/python-internal.h (make_cleanup_py_decref)
13784 (make_cleanup_py_xdecref): Don't declare.
13785 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13786 (py_xdecref, make_cleanup_py_xdecref): Remove.
13787
13788 2017-01-10 Tom Tromey <tom@tromey.com>
13789
13790 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13791 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13792
13793 2017-01-10 Tom Tromey <tom@tromey.com>
13794
13795 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13796
13797 2017-01-10 Tom Tromey <tom@tromey.com>
13798
13799 * python/py-utils.c (unicode_to_encoded_string)
13800 (python_string_to_target_string)
13801 (python_string_to_target_python_string)
13802 (python_string_to_host_string, gdbpy_obj_to_string)
13803 (get_addr_from_python): Use gdbpy_ref.
13804
13805 2017-01-10 Tom Tromey <tom@tromey.com>
13806
13807 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
13808 gdbpy_ref.
13809
13810 2017-01-10 Tom Tromey <tom@tromey.com>
13811
13812 * python/python.c (eval_python_command, gdbpy_decode_line)
13813 (gdbpy_run_events, gdbpy_start_type_printers)
13814 (gdbpy_apply_type_printers): Use gdbpy_ref.
13815
13816 2017-01-10 Tom Tromey <tom@tromey.com>
13817
13818 * python/py-param.c (get_doc_string, compute_enum_values): Use
13819 gdbpy_ref.
13820
13821 2017-01-10 Tom Tromey <tom@tromey.com>
13822
13823 * python/py-inferior.c (find_thread_object, build_inferior_list):
13824 Use gdbpy_ref.
13825
13826 2017-01-10 Tom Tromey <tom@tromey.com>
13827
13828 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13829
13830 2017-01-10 Tom Tromey <tom@tromey.com>
13831
13832 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
13833 gdbpy_ref.
13834
13835 2017-01-10 Tom Tromey <tom@tromey.com>
13836
13837 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
13838 extra incref.
13839 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
13840 Use gdbpy_ref.
13841
13842 2017-01-10 Tom Tromey <tom@tromey.com>
13843
13844 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
13845 gdbpy_ref.
13846
13847 2017-01-10 Tom Tromey <tom@tromey.com>
13848
13849 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
13850 decref results of PyArg_ParseTupleAndKeywords.
13851
13852 2017-01-10 Tom Tromey <tom@tromey.com>
13853
13854 * python/python.c (python_run_simple_file): Use
13855 unique_xmalloc_ptr, gdbpy_ref.
13856
13857 2017-01-10 Tom Tromey <tom@tromey.com>
13858
13859 * python/py-prettyprint.c (print_stack_unless_memory_error)
13860 (print_string_repr, print_children): Use gdbpy_ref.
13861 (dummy_python_frame): New class.
13862 (dummy_python_frame::dummy_python_frame): Rename from
13863 push_dummy_python_frame.
13864 (py_restore_tstate): Remove.
13865
13866 2017-01-10 Tom Tromey <tom@tromey.com>
13867
13868 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
13869
13870 2017-01-10 Tom Tromey <tom@tromey.com>
13871
13872 * python/python.c (ensure_python_env, restore_python_env):
13873 Remove.
13874 * python/python-internal.h (ensure_python_env): Don't declare.
13875 * varobj.h (varobj_ensure_python_env): Don't declare.
13876 * varobj.c (varobj_ensure_python_env): Remove.
13877
13878 2017-01-10 Tom Tromey <tom@tromey.com>
13879
13880 * varobj.c (varobj_value_get_print_value): Use
13881 gdbpy_enter_varobj.
13882
13883 2017-01-10 Tom Tromey <tom@tromey.com>
13884
13885 * python/py-prettyprint.c (print_string_repr, print_children):
13886 Update.
13887 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
13888 of "encoding".
13889 * varobj.c (varobj_value_get_print_value): Update.
13890 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
13891
13892 2017-01-10 Tom Tromey <tom@tromey.com>
13893
13894 * varobj.c (varobj_get_display_hint)
13895 (dynamic_varobj_has_child_method, install_new_value_visualizer)
13896 (varobj_set_visualizer, free_variable): Use
13897 gdbpy_enter_varobj.
13898
13899 2017-01-10 Tom Tromey <tom@tromey.com>
13900
13901 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
13902 (do_finish_initialization): New function. Use gdbpy_ref.
13903 (gdbpy_finish_initialization): Use gdbpy_enter. Call
13904 do_finish_initialization.
13905
13906 2017-01-10 Tom Tromey <tom@tromey.com>
13907
13908 * python/py-param.c (get_set_value, get_show_value): Use
13909 gdbpy_enter, gdbpy_ref.
13910
13911 2017-01-10 Tom Tromey <tom@tromey.com>
13912
13913 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
13914
13915 2017-01-10 Tom Tromey <tom@tromey.com>
13916
13917 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
13918
13919 2017-01-10 Tom Tromey <tom@tromey.com>
13920
13921 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
13922 Use gdbpy_enter_varobj.
13923
13924 2017-01-10 Tom Tromey <tom@tromey.com>
13925
13926 * varobj.c (gdbpy_enter_varobj): New constructor.
13927 * python/python-internal.h (gdbpy_enter_varobj): New class.
13928 * python/py-varobj.c (py_varobj_get_iterator): Use
13929 gdbpy_enter_varobj.
13930
13931 2017-01-10 Tom Tromey <tom@tromey.com>
13932
13933 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
13934 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13935 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
13936 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
13937 unique_xmalloc_ptr.
13938 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
13939
13940 2017-01-10 Tom Tromey <tom@tromey.com>
13941
13942 * python/py-xmethods.c (invoke_match_method): Use
13943 gdbpy_ref.
13944
13945 2017-01-10 Tom Tromey <tom@tromey.com>
13946
13947 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
13948 gdbpy_enter, gdbpy_ref.
13949
13950 2017-01-10 Tom Tromey <tom@tromey.com>
13951
13952 * python/python.c (python_interactive_command): Use gdbpy_enter.
13953
13954 2017-01-10 Tom Tromey <tom@tromey.com>
13955
13956 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
13957 gdbpy_ref.
13958
13959 2017-01-10 Tom Tromey <tom@tromey.com>
13960
13961 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
13962 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
13963
13964 2017-01-10 Tom Tromey <tom@tromey.com>
13965
13966 * utils.h (htab_deleter): New struct.
13967 (htab_up): New typedef.
13968 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
13969 gdbpy_enter, gdbpy_ref, htab_up.
13970
13971 2017-01-10 Tom Tromey <tom@tromey.com>
13972
13973 * python/py-unwind.c (pending_frame_invalidate): Remove.
13974 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
13975
13976 2017-01-10 Tom Tromey <tom@tromey.com>
13977
13978 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
13979 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
13980
13981 2017-01-10 Tom Tromey <tom@tromey.com>
13982
13983 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
13984
13985 2017-01-10 Tom Tromey <tom@tromey.com>
13986
13987 * python/python.c (gdbpy_eval_from_control_command)
13988 (gdbpy_source_script, gdbpy_run_events)
13989 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
13990 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
13991 gdbpy_enter.
13992
13993 2017-01-10 Tom Tromey <tom@tromey.com>
13994
13995 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
13996
13997 2017-01-10 Tom Tromey <tom@tromey.com>
13998
13999 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14000
14001 2017-01-10 Tom Tromey <tom@tromey.com>
14002
14003 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14004 (python_on_inferior_call_pre, python_on_inferior_call_post)
14005 (python_on_memory_change, python_on_register_change)
14006 (python_inferior_exit, python_new_objfile, add_thread_object)
14007 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14008
14009 2017-01-10 Tom Tromey <tom@tromey.com>
14010
14011 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14012 (bpfinishpy_handle_exit): Use gdbpy_enter.
14013
14014 2017-01-10 Tom Tromey <tom@tromey.com>
14015
14016 * python/py-cmd.c (cmdpy_destroyer)
14017 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14018 gdbpy_enter.
14019
14020 2017-01-10 Tom Tromey <tom@tromey.com>
14021
14022 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14023 gdbpy_enter.
14024 (gdbpy_breakpoint_has_cond): Likewise.
14025
14026 2017-01-10 Tom Tromey <tom@tromey.com>
14027
14028 * python/python.c (gdbpy_enter): New constructor.
14029 (~gdbpy_enter): New destructor.
14030 (restore_python_env, ensure_python_env): Rewrite.
14031 * python/python-internal.h (gdbpy_enter): New class.
14032
14033 2017-01-10 Tom Tromey <tom@tromey.com>
14034
14035 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14036
14037 2017-01-10 Tom Tromey <tom@tromey.com>
14038
14039 * python/py-value.c (value_has_field, get_field_flag)
14040 (get_field_type, valpy_getitem, convert_value_from_python): Use
14041 gdbpy_ref.
14042
14043 2017-01-10 Tom Tromey <tom@tromey.com>
14044
14045 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14046 gdbpy_ref.
14047
14048 2017-01-10 Tom Tromey <tom@tromey.com>
14049
14050 * python/py-prettyprint.c (search_pp_list)
14051 (find_pretty_printer_from_objfiles)
14052 (find_pretty_printer_from_progspace)
14053 (find_pretty_printer_from_gdb, find_pretty_printer)
14054 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14055 gdbpy_ref.
14056
14057 2017-01-10 Tom Tromey <tom@tromey.com>
14058
14059 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14060
14061 2017-01-10 Tom Tromey <tom@tromey.com>
14062
14063 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14064 (ltpy_get_all_source_lines): Use gdbpy_ref.
14065
14066 2017-01-10 Tom Tromey <tom@tromey.com>
14067
14068 * python/py-framefilter.c (extract_sym, extract_value)
14069 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14070 gdbpy_ref.
14071
14072 2017-01-10 Tom Tromey <tom@tromey.com>
14073
14074 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14075
14076 2017-01-10 Tom Tromey <tom@tromey.com>
14077
14078 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14079
14080 2017-01-10 Tom Tromey <tom@tromey.com>
14081
14082 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14083 gdbpy_ref.
14084
14085 2017-01-10 Tom Tromey <tom@tromey.com>
14086
14087 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14088
14089 2017-01-10 Tom Tromey <tom@tromey.com>
14090
14091 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14092 (typy_range): Use gdbpy_ref.
14093
14094 2017-01-10 Tom Tromey <tom@tromey.com>
14095
14096 * python/py-threadevent.c (create_thread_event_object): Use
14097 gdbpy_ref.
14098 * python/py-stopevent.c (create_stop_event_object): Simplify.
14099 (emit_stop_event): Use gdbpy_ref.
14100 * python/py-signalevent.c (create_signal_event_object): Use
14101 gdbpy_ref.
14102 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14103 (emit_new_objfile_event, create_clear_objfiles_event_object)
14104 (emit_clear_objfiles_event): Use gdbpy_ref.
14105 * python/py-infevents.c (create_inferior_call_event_object)
14106 (create_register_changed_event_object)
14107 (create_memory_changed_event_object, emit_inferior_call_event)
14108 (emit_memory_changed_event, emit_register_changed_event): Use
14109 gdbpy_ref.
14110 * python/py-exitedevent.c (create_exited_event_object)
14111 (emit_exited_event): Use gdbpy_ref.
14112 * python/py-event.h (evpy_emit_event): Remove
14113 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14114 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14115 * python/py-continueevent.c (emit_continue_event): Use
14116 gdbpy_ref.
14117 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14118 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14119 gdbpy_ref.
14120 * python/py-bpevent.c (create_breakpoint_event_object): Use
14121 gdbpy_ref.
14122
14123 2017-01-10 Tom Tromey <tom@tromey.com>
14124
14125 * python/py-ref.h: New file.
14126
14127 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14128
14129 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14130 void.
14131 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14132 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14133 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14134 * ui-out.c (ui_out::redirect): Likewise.
14135 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14136 * cli/cli-logging.c (set_logging_redirect): Update call site of
14137 ui_out::redirect.
14138 (handle_redirections): Likewise.
14139 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14140 * top.c (execute_command_to_string): Likewise.
14141 * utils.c (do_ui_out_redirect_pop): Likewise.
14142
14143 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14144
14145 * stack.c (_initialize_stack): Update "frame" command help message.
14146
14147 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14148
14149 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14150
14151 2017-01-06 Yao Qi <yao.qi@linaro.org>
14152
14153 * x86-linux-nat.h: Include gdb_proc_service.h.
14154
14155 2017-01-06 Yao Qi <yao.qi@linaro.org>
14156
14157 * ser-base.h: Include serial.h.
14158
14159 2017-01-06 Yao Qi <yao.qi@linaro.org>
14160
14161 * ppc-linux-tdep.h: Include ppc-tdep.h.
14162
14163 2017-01-06 Yao Qi <yao.qi@linaro.org>
14164
14165 * nat/amd64-linux-siginfo.h: Include signal.h.
14166
14167 2017-01-06 Yao Qi <yao.qi@linaro.org>
14168
14169 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14170
14171 2017-01-06 Yao Qi <yao.qi@linaro.org>
14172
14173 * mi/mi-parse.h: Include mi-cmds.h.
14174
14175 2017-01-06 Yao Qi <yao.qi@linaro.org>
14176
14177 * inf-loop.c: Don't include "target.h".
14178 * inf-loop.h: Include it here.
14179
14180 2017-01-06 Yao Qi <yao.qi@linaro.org>
14181
14182 * dfp.h: Include "dboulest.h" and "expression.h".
14183
14184 2017-01-06 Yao Qi <yao.qi@linaro.org>
14185
14186 * ax-gdb.h: Include "ax.h".
14187
14188 2017-01-06 Yao Qi <yao.qi@linaro.org>
14189
14190 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14191 with nat/gdb_ptrace.h.
14192
14193 2017-01-05 Yao Qi <yao.qi@linaro.org>
14194
14195 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14196 new line.
14197 (mips64_fbsd_sigframe_init): Likewise.
14198
14199 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14200
14201 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14202 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14203
14204 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14205
14206 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14207 * NEWS: Mention new FreeBSD/mips native configuration.
14208 * config/mips/fbsd.mh: New file.
14209 * configure.host: Add mips*-*-freebsd*.
14210 * mips-fbsd-nat.c: New file.
14211
14212 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14213
14214 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14215 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14216 * NEWS: Mention new FreeBSD/mips target.
14217 * configure.tgt: Add mips*-*-freebsd*.
14218 * mips-fbsd-tdep.c: New file.
14219 * mips-fbsd-tdep.h: New file.
14220
14221 2017-01-04 Yao Qi <yao.qi@linaro.org>
14222
14223 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14224 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14225
14226 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14227
14228 Update copyright year range in all GDB files.
14229
14230 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14231
14232 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14233
14234 For older changes see ChangeLog-2016.
14235 \f
14236 Local Variables:
14237 mode: change-log
14238 left-margin: 8
14239 fill-column: 74
14240 version-control: never
14241 coding: utf-8
14242 End: