]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/ChangeLog
Use unique_xmalloc_ptr in c_type_print_base
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
331b71e5
TT
12017-11-04 Tom Tromey <tom@tromey.com>
2
3 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
4
9f584b37
TT
52017-11-04 Tom Tromey <tom@tromey.com>
6
7 * linux-tdep.c (linux_core_info_proc_mappings): Use
8 gdb::def_vector.
9 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
10 "size" argument.
11 (linux_corefile_thread): Update.
12 (linux_make_corefile_notes): Remove unused variable.
13
779bc38e
TT
142017-11-04 Tom Tromey <tom@tromey.com>
15
16 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
17 gdb::byte_vector.
18
ed2b3126
TT
192017-11-04 Tom Tromey <tom@tromey.com>
20
21 * objfiles.c (do_free_objfile_cleanup): Remove.
22 * compile/compile-object-load.c (compile_object_load): Update.
23 * objfiles.h (make_cleanup_free_objfile): Remove.
24
7f6743fd
TT
252017-11-04 Tom Tromey <tom@tromey.com>
26
27 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
28 (adi_read_versions): Change "tags" to "gdb_byte *".
29 (adi_print_versions): Likewise.
30
c80049d3
TT
312017-11-04 Tom Tromey <tom@tromey.com>
32
33 * breakpoint.c
34 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
35 from start_rbreak_breakpoints.
36 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
37 * breakpoint.h (class scoped_rbreak_breakpoints): New.
38 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
39 * symtab.c (do_end_rbreak_breakpoints): Remove.
40 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
41
167b0be1
TT
422017-11-04 Tom Tromey <tom@tromey.com>
43
44 * cp-namespace.c (reset_directive_searched): Remove.
45 (cp_lookup_symbol_via_imports): Use scoped_restore.
46 * cp-support.c (reset_directive_searched): Remove.
47 (make_symbol_overload_list_using): Use scoped_restore.
48 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
49 (reset_directive_searched): Remove.
50
5eae7aea
TT
512017-11-04 Tom Tromey <tom@tromey.com>
52
53 * symfile.c (find_separate_debug_file_by_debuglink): Use
54 unique_xmalloc_ptr.
55
c6bcad5f
TT
562017-11-04 Tom Tromey <tom@tromey.com>
57
58 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
59 type of "info".
60 (compute_stack_depth): Likewise.
61 (do_compile_dwarf_expr_to_c): Use std::vector.
62
20dcd8ca
TT
632017-11-04 Tom Tromey <tom@tromey.com>
64
65 * compile/compile-object-load.c (link_callbacks_einfo): Use
66 std::string.
67
33c7c59d
TT
682017-11-04 Tom Tromey <tom@tromey.com>
69
70 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
71 Use scoped_free_pendings.
72 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
73 scoped_free_pendings.
74 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
75 (xcoff_initial_scan): Likewise.
76 * buildsym.c (reset_symtab_globals): Update comment.
77 (scoped_free_pendings): Rename from really_free_pendings.
78 (prepare_for_building): Update comment.
79 (buildsym_init): Likewise.
80 * buildsym.h (class scoped_free_pendings): New class.
81 (really_free_pendings): Don't declare.
82
67fa57cf
UW
832017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
84
85 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
86 output when converting a zero value to a special byteorder format.
87
f26ae15b
YQ
882017-11-02 Yao Qi <yao.qi@linaro.org>
89
90 * frame.c (do_frame_register_read): Remove aspace.
91 * jit.c (jit_frame_sniffer): Likwise.
92 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
93 * regcache.c (regcache::regcache): Pass nullptr.
94 (regcache_print): Caller updated.
95 * regcache.h (regcache::regcache): Remove one constructor
96 parameter aspace.
97
6c6e9412
YQ
982017-11-02 Yao Qi <yao.qi@linaro.org>
99
100 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
101
8b86c959
YQ
1022017-11-02 Yao Qi <yao.qi@linaro.org>
103
104 * breakpoint.c (insert_single_step_breakpoints): Update.
105 * frame.c (struct frame_info) <aspace>: Add const.
106 (frame_save_as_regcache): Add const.
107 (get_frame_address_space): Return const address_space *.
108 * frame.h (get_frame_address_space): Update declaration.
109 * infrun.c (struct step_over_info) <aspace>: Add const.
110 (set_step_over_info): Make aspace const.
111 (displaced_step_prepare_throw): Change variable const.
112 (resume): Likewise.
113 (proceed): Likewise.
114 (adjust_pc_after_break): Likewise.
115 (save_waitstatus): Likewise.
116 (handle_signal_stop): Likewise.
117 (keep_going_pass_signal): Likewise.
118 * jit.c (jit_frame_sniffer): Add const.
119 * mips-tdep.c (mips_single_step_through_delay): Likewise.
120 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
121 * record-full.c (record_full_wait_1): Likewise.
122 * regcache.c (regcache::regcache): Change parameter to const.
123 * regcache.h (regcache::regcache): Likewise.
124 (regcache::aspace): Return const address_space *.
125 (regcache) <m_aspace>: Add const.
126
a01bda52
YQ
1272017-11-02 Yao Qi <yao.qi@linaro.org>
128
129 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
130 * frame.c (create_sentinel_frame): Likewise.
131 * infrun.c (displaced_step_prepare_throw): Likewise.
132 (resume): Likewise.
133 (thread_still_needs_step_over_bp): Likewise.
134 (proceed): Likewise.
135 (do_target_wait): Likewise.
136 (adjust_pc_after_break): Likewise.
137 (handle_syscall_event): Likewise.
138 (save_waitstatus): Likewise.
139 (handle_inferior_event_1): Likewise.
140 (handle_signal_stop): Likewise.
141 (keep_going_pass_signal): Likewise.
142 * linux-nat.c (status_callback): Likewise.
143 (save_stop_reason): Likewise.
144 (resume_stopped_resumed_lwps): Likewise.
145 * record-full.c (record_full_exec_insn): Likewise.
146 (record_full_wait_1): Likewise.
147 * regcache.c (get_regcache_aspace): Remove.
148 * regcache.h (get_regcache_aspace): Remove.
149
d999647b
YQ
1502017-11-02 Yao Qi <yao.qi@linaro.org>
151
152 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
153 (init_regcache_descr): Use gdbarch_num_regs.
154 (regcache::regcache): Likewise.
155 (regcache::get_register_status): Likewise.
156 (regcache::assert_raw_regnum): Likewise.
157 (regcache::cooked_read): Likewise.
158 (regcache::cooked_read_value): Likewise.
159 (regcache::cooked_write): Likewise.
160 (regcache::dump): Likewise.
161 (regcache::num_raw_registers): New method.
162 * regcache.h (class regcache) <num_raw_registers>: New.
163
4e888c28
YQ
1642017-11-02 Yao Qi <yao.qi@linaro.org>
165
166 * regcache.c (regcache::assert_regnum): New method.
167 (regcache::invalidate): Call assert_regnum.
168 (regcache::raw_update): Likewise.
169 (regcache::raw_write): Likewise.
170 (regcache::raw_read_part): Likewise.
171 (regcache::raw_write_part): Likewise.
172 (regcache::raw_supply): Likewise.
173 (regcache::raw_supply_integer): Likewise.
174 (regcache::raw_supply_zeroed): Likewise.
175 (regcache::raw_collect): Likewise.
176 (regcache::raw_collect_integer): Likewise.
177 * regcache.h (regcache::assert_regnum): Declare.
178
2e1b49b3
YQ
1792017-11-02 Yao Qi <yao.qi@linaro.org>
180
181 * regcache.c (regcache::dump): Remove code.
182
6c5218df
YQ
1832017-11-02 Yao Qi <yao.qi@linaro.org>
184
185 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
186 Remove.
187 <sizeof_cooked_register_status>: Remove.
188 (init_regcache_descr): Update.
189 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
190 (regcache::save): Likewise.
191 (regcache::dump): Likewise.
192
dcc31d28
JB
1932017-11-01 James Bowman <james.bowman@ftdichip.com>
194
195 * ft32-tdep.c (ft32_fetch_instruction): New function.
196 (ft32_analyze_prologue): Use ft32_fetch_instruction().
197
3a87ae65
SM
1982017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
199
200 * cli/cli-script.c (execute_control_command): Rename to ...
201 (execute_control_command_1): ... this.
202 (execute_control_command): New function.
203
09b847f3
SM
2042017-10-31 Simon Marchi <simon.marchi@ericsson.com>
205
206 * tracepoint.c (tfind_command): Remove const_cast.
207
f871c485
MG
2082017-10-30 Mike Gulick <mgulick@mathworks.com>
209
210 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
211
b020ff80
SM
2122017-10-30 Simon Marchi <simon.marchi@ericsson.com>
213
214 * common/common-utils.h (in_inclusive_range): New function.
215 * arm-tdep.c (arm_record_extension_space): Use
216 in_inclusive_range.
217 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
218 * cris-tdep.c (cris_spec_reg_applicable): Use
219 in_inclusive_range.
220
1b81856f
PA
2212017-10-30 Pedro Alves <palves@redhat.com>
222 Simon Marchi <simon.marchi@ericsson.com>
223
224 * remote.c (remote_set_syscall_catchpoint): Build a std::string
225 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
226
31b833b3
PA
2272017-10-30 Pedro Alves <palves@redhat.com>
228
229 * common/common-utils.c (string_appendf, string_vappendf): New
230 functions.
231 * common/common-utils.h (string_appendf, string_vappendf): New
232 declarations.
233 * unittests/common-utils-selftests.c (string_appendf_func)
234 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
235 (string_vappendf_tests): New functions.
236 (_initialize_common_utils_selftests): Register "string_appendf" and
237 "string_vappendf tests".
238
4a250334
PA
2392017-10-30 Pedro Alves <palves@redhat.com>
240
241 * unittests/common-utils-selftests.c (format_func): New typedef.
242 (string_printf_tests, string_vprintf_tests): Tests factored out
243 and merged to ...
244 (test_format_func): ... this new function.
245 (string_printf_tests, string_vprintf_tests): Reimplement on top of
246 test_format_func.
247
16c5c17e
SM
2482017-10-29 Simon Marchi <simon.marchi@ericsson.com>
249
250 * darwin-nat.c: Remove include of gdb.h.
251
7ca51576
SM
2522017-10-29 Simon Marchi <simon.marchi@ericsson.com>
253
254 * xtensa-xtregs.c: Fix formatting issues.
255
c1342859
SM
2562017-10-29 Simon Marchi <simon.marchi@ericsson.com>
257
258 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
259
484d8d36
MD
2602017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
261
262 PR python/21213
263 * python/py-infthread.c (thpy_get_inferior): Increment reference
264 of inferior before returning it.
265
b5540b5f
SM
2662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
267
268 * unittests/common-utils-selftests.c (format): Add
269 ATTRIBUTE_PRINTF.
270
5a9dcda1
SM
2712017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
272
273 * xml-syscall.c (struct syscall_desc): Add constructor.
274 <name>: Change type to std::string.
275 (syscall_desc_up): New typedef.
276 (syscall_desc_p): Remove typeder.
277 (DEF_VEC_P(syscall_desc_p)): Remove.
278 (struct syscall_group_desc): Add constructor.
279 <name>: Change type to std::string.
280 <syscalls>: Change type to std::vector.
281 (syscall_group_desc_up): New typedef.
282 (syscall_group_desc_p): Remove typedef.
283 (DEF_VEC_P(syscall_group_desc_p)): Remove.
284 (struct syscalls_info) <syscalls>: Change type to std::vector of
285 unique_ptr.
286 <groups>: Likewise.
287 <my_gdb_datadir>: Change type to std::string.
288 (syscalls_info_up): New typedef.
289 (allocate_syscalls_info): Remove.
290 (syscalls_info_free_syscalls_desc): Remove.
291 (syscalls_info_free_syscall_group_desc): Remove.
292 (free_syscalls_info): Remove.
293 (make_cleanup_free_syscalls_info): Remove.
294 (syscall_group_create_syscall_group_desc): Adjust.
295 (syscall_group_add_syscall): Adjust.
296 (syscall_create_syscall_desc): Adjust.
297 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
298 (init_syscalls_info): Adjust.
299 (syscall_group_get_group_by_name): Adjust.
300 (xml_get_syscall_number): Adjust.
301 (xml_get_syscall_name): Adjust.
302 (xml_list_of_syscalls): Adjust.
303 (xml_list_syscalls_by_group): Adjust.
304 (xml_list_of_groups): Adjust.
305
45461e0d
SM
3062017-10-27 Simon Marchi <simon.marchi@ericsson.com>
307
308 * probe.h: Don't include gdb_vecs.h.
309 (DEF_VEC_P (probe_p)): Remove.
310 (find_probes_in_objfile): Return an std::vector.
311 * probe.c (find_probes_in_objfile): Likewise.
312 * breakpoint.c (breakpoint_objfile_data)
313 <longjmp_probes>: Change type to std::vector.
314 <exception_probes>: Likewise.
315 (free_breakpoint_probes): Don't manually free vectors.
316 (create_longjmp_master_breakpoint): Adjust.
317 (create_exception_master_breakpoint): Adjust.
318 * solib-svr4.c (svr4_create_probe_breakpoints): Change
319 parameter type, adjust.
320 (svr4_create_solib_event_breakpoints): Adjust.
321
43dce439
SM
3222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
323
324 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
325 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
326 with new.
327 (free_breakpoint_probes): Rename to ...
328 (free_breakpoint_objfile_data): ... this, and call delete on
329 bp_objfile_data..
330
6a1b9516
SM
3312017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
332
333 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
334 (loaded_script_ptr): Remove typedef.
335 (DEF_VEC_P (loaded_script_ptr)): Remove.
336 (struct collect_matching_scripts_data): Add constructor.
337 <scripts_p>: Change type to (pointer to) std::vector.
338 (collect_matching_scripts_data): Adjust.
339 (sort_scripts_by_name): Make suitable for std::sort.
340 (print_scripts): Don't sort vector, adjust to std::vector.
341 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
342
593e3209
SM
3432017-10-27 Simon Marchi <simon.marchi@ericsson.com>
344
345 * symfile.c (filename_language): Make struct, not typedef. Add
346 constructor.
347 <ext>: Change type to std::string.
348 (DEF_VEC_O (filename_language)): Remove.
349 (filename_language_table): Change type to std::vector.
350 (add_filename_language): Adjust.
351 (set_ext_lang_command): Adjust.
352 (info_ext_lang_command): Adjust.
353 (deduce_language_from_filename): Adjust.
354 (class scoped_restore_filename_language_table): Remove.
355 (test_filename_language): Use scoped_restore.
356 (test_set_ext_lang_command): Use scoped_restore, adjust to
357 std::vector change.
358
32fa66eb
SM
3592017-10-27 Simon Marchi <simon.marchi@ericsson.com>
360
361 * symfile.c: Include selftest.h.
362 (class scoped_restore_filename_language_table): New.
363 (test_filename_language): New test.
364 (test_set_ext_lang_command): New test.
365 (_initialize_symfile): Register tests.
366
4a27f119
KS
3672017-10-27 Keith Seitz <keiths@redhat.com>
368
369 * breakpoint.c (print_breakpoint_location): Use the symbol saved
370 in the bp_location, falling back to find_pc_sect_function when
371 needed.
372 (add_location_to_breakpoint): Save sal->symbol.
373 * breakpoint.h (struct bp_location) <symbol>: New field.
374 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
375 * symtab.h (struct symtab_and_line) <symbol>: New field.
376
a43f3893
PF
3772017-10-26 Patrick Frants <osscontribute@gmail.com>
378
7453e6b2 379 PR gdb/13669
a43f3893
PF
380 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
381 to rewind obstack.
382
23cc4e1b
PA
3832017-10-26 Pedro Alves <palves@redhat.com>
384
385 * remote.c (remote_async_terminal_ours_p): Delete.
386 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
387 Remove references to 'remote_async_terminal_ours_p'.
388
6abc18bb
YQ
3892017-10-26 Yao Qi <yao.qi@linaro.org>
390
391 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
392
bd522513
YQ
3932017-10-26 Yao Qi <yao.qi@linaro.org>
394
395 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
396 aspace const.
397 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
398 Likewise.
399 * breakpoint.c (bpstat_check_location): Remove cast.
400 (breakpoint_hit_catch_fork): Make aspce const.
401 (breakpoint_hit_catch_solib): Likewise.
402 (breakpoint_hit_catch_exec): Likewise.
403 (breakpoint_hit_ranged_breakpoint): Likewise.
404 (breakpoint_hit_watchpoint): Likewise.
405 (base_breakpoint_breakpoint_hit): Likewise.
406 (bkpt_breakpoint_hit): Likewise.
407 (dprintf_breakpoint_hit): Likewise.
408 (tracepoint_breakpoint_hit): Likewise.
409 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
410
accd0bcd
YQ
4112017-10-26 Yao Qi <yao.qi@linaro.org>
412
413 * breakpoint.c (breakpoint_location_address_match): Change
414 "struct address_space *" to "const address_space".
415 (breakpoint_location_address_range_overlap): Likewise.
416 (breakpoint_here_p): Likewise.
417 (breakpoint_in_range_p): Likewise.
418 (moribund_breakpoint_here_p): Likewise.
419 (bp_location_inserted_here_p): Likewise.
420 (software_breakpoint_inserted_here_p): Likewise.
421 (hardware_breakpoint_inserted_here_p): Likewise.
422 (hardware_watchpoint_inserted_in_range): Likewise.
423 (bpstat_check_location): Likewise.
424 (bpstat_stop_status): Likewise.
425 (breakpoint_address_match): Likewise.
426 (breakpoint_address_match_range): Likewise.
427 (breakpoint_location_address_match): Likewise.
428 (breakpoint_location_address_range_overlap): Likewise.
429 (insert_single_step_breakpoint): Likewise.
430 (breakpoint_has_location_inserted_here): Likewise.
431 (single_step_breakpoint_inserted_here_p): Likewise.
432 (pc_at_non_inline_function): Likewise.
433 * breakpoint.h (bpstat_stop_status): Update declaration.
434 (breakpoint_here_p): Likewise.
435 (breakpoint_in_range_p): Likewise.
436 (moribund_breakpoint_here_p): Likewise.
437 (breakpoint_inserted_here_p): Likewise.
438 (software_breakpoint_inserted_here_p): Likewise.
439 (hardware_breakpoint_inserted_here_p): Likewise.
440 (breakpoint_has_location_inserted_here): Likewise.
441 (single_step_breakpoint_inserted_here_p): Likewise.
442 (hardware_watchpoint_inserted_in_range): Likewise.
443 (breakpoint_address_match): Likewise.
444 (insert_single_step_breakpoint): Likewise.
445 (pc_at_non_inline_function): Likewise.
446 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
447 * record.c (record_check_stopped_by_breakpoint): Likewise.
448 * record.h (record_check_stopped_by_breakpoint): Likewise.
449 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
450
ac7936df
YQ
4512017-10-25 Yao Qi <yao.qi@linaro.org>
452
453 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
454 regcache->arch () instead get_regcache_arch.
455 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
456 Likewise.
457 (aarch64_fbsd_store_inferior_registers): Likewise.
458 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
459 (store_gregs_to_thread): Likewise.
460 (fetch_fpregs_from_thread): Likewise.
461 (store_fpregs_to_thread): Likewise.
462 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
463 (aarch64_store_return_value): Likewise.
464 (aarch64_software_single_step): Likewise.
465 * aix-thread.c (aix_thread_wait): Likewise.
466 (supply_reg32): Likewise.
467 (supply_sprs64): Likewise.
468 (supply_sprs32): Likewise.
469 (fill_gprs64): Likewise.
470 (fill_gprs32): Likewise.
471 (fill_sprs64): Likewise.
472 (fill_sprs32): Likewise.
473 (store_regs_user_thread): Likewise.
474 (store_regs_kernel_thread): Likewise.
475 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
476 (alphabsd_store_inferior_registers): Likewise.
477 * alpha-tdep.c (alpha_extract_return_value): Likewise.
478 (alpha_store_return_value): Likewise.
479 (alpha_deal_with_atomic_sequence): Likewise.
480 (alpha_next_pc): Likewise.
481 (alpha_software_single_step): Likewise.
482 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
483 (amd64bsd_store_inferior_registers): Likewise.
484 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
485 Likewise.
486 (amd64_linux_store_inferior_registers): Likewise.
487 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
488 (amd64_collect_native_gregset): Likewise.
489 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
490 (amd64obsd_collect_uthread): Likewise.
491 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
492 (amd64_collect_fpregset): Likewise.
493 (amd64_supply_fxsave): Likewise.
494 (amd64_supply_xsave): Likewise.
495 (amd64_collect_fxsave): Likewise.
496 (amd64_collect_xsave): Likewise.
497 * arc-tdep.c (arc_write_pc): Likewise.
498 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
499 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
500 (arm_fbsd_store_inferior_registers): Likewise.
501 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
502 (store_vfp_regs): Likewise.
503 (arm_linux_fetch_inferior_registers): Likewise.
504 (arm_linux_store_inferior_registers): Likewise.
505 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
506 (arm_linux_sigreturn_next_pc): Likewise.
507 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
508 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
509 (fetch_register): Likewise.
510 (store_register): Likewise.
511 * arm-tdep.c (arm_is_thumb): Likewise.
512 (displaced_in_arm_mode): Likewise.
513 (bx_write_pc): Likewise.
514 (arm_get_next_pcs_addr_bits_remove): Likewise.
515 (arm_software_single_step): Likewise.
516 (arm_extract_return_value): Likewise.
517 (arm_store_return_value): Likewise.
518 (arm_write_pc): Likewise.
519 * bfin-tdep.c (bfin_extract_return_value): Likewise.
520 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
521 (bsd_uthread_store_registers): Likewise.
522 * core-regset.c (fetch_core_registers): Likewise.
523 * corelow.c (get_core_registers): Likewise.
524 * cris-tdep.c (cris_store_return_value): Likewise.
525 (cris_extract_return_value): Likewise.
526 (find_step_target): Likewise.
527 (find_step_target): Likewise.
528 (cris_software_single_step): Likewise.
529 * ctf.c (ctf_fetch_registers): Likewise.
530 * darwin-nat.c (cancel_breakpoint): Likewise.
531 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
532 * frv-tdep.c (frv_extract_return_value): Likewise.
533 * ft32-tdep.c (ft32_store_return_value): Likewise.
534 (ft32_extract_return_value): Likewise.
535 * go32-nat.c (fetch_register): Likewise.
536 (go32_fetch_registers): Likewise.
537 (go32_store_registers): Likewise.
538 (store_register): Likewise.
539 * h8300-tdep.c (h8300_extract_return_value): Likewise.
540 (h8300_store_return_value): Likewise.
541 * hppa-linux-nat.c (fetch_register): Likewise.
542 (store_register): Likewise.
543 (hppa_linux_fetch_inferior_registers): Likewise.
544 (hppa_linux_store_inferior_registers): Likewise.
545 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
546 (i386_darwin_store_inferior_registers): Likewise.
547 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
548 (gnu_store_registers): Likewise.
549 * i386-linux-nat.c (fetch_register): Likewise.
550 (store_register): Likewise.
551 (supply_gregset): Likewise.
552 (fill_gregset): Likewise.
553 (i386_linux_fetch_inferior_registers): Likewise.
554 (i386_linux_store_inferior_registers): Likewise.
555 (i386_linux_resume): Likewise.
556 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
557 Likewise.
558 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
559 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
560 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
561 (i386obsd_collect_uthread): Likewise.
562 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
563 (i386_supply_gregset): Likewise.
564 (i386_collect_gregset): Likewise.
565 (i386_supply_fpregset): Likewise.
566 (i386_collect_fpregset): Likewise.
567 (i386_mpx_bd_base): Likewise.
568 * i386-v4-nat.c (supply_fpregset): Likewise.
569 (fill_fpregset): Likewise.
570 * i387-tdep.c (i387_supply_fsave): Likewise.
571 (i387_collect_fsave): Likewise.
572 (i387_supply_fxsave): Likewise.
573 (i387_collect_fxsave): Likewise.
574 (i387_supply_xsave): Likewise.
575 (i387_collect_xsave): Likewise.
576 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
577 (ia64_linux_store_registers): Likewise.
578 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
579 (ia64_extract_return_value): Likewise.
580 (ia64_store_return_value): Likewise.
581 (find_func_descr): Likewise.
582 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
583 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
584 (inf_ptrace_store_registers): Likewise.
585 * infrun.c (use_displaced_stepping): Likewise.
586 (displaced_step_prepare_throw): Likewise.
587 (resume): Likewise.
588 (proceed): Likewise.
589 (do_target_wait): Likewise.
590 (adjust_pc_after_break): Likewise.
591 (handle_inferior_event_1): Likewise.
592 (handle_signal_stop): Likewise.
593 (save_infcall_suspend_state): Likewise.
594 (restore_infcall_suspend_state): Likewise.
595 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
596 * jit.c (jit_frame_prev_register): Likewise.
597 * linux-nat.c (save_stop_reason): Likewise.
598 (linux_nat_wait_1): Likewise.
599 (resume_stopped_resumed_lwps): Likewise.
600 * linux-record.c (record_linux_sockaddr): Likewise.
601 (record_linux_msghdr): Likewise.
602 (record_linux_system_call): Likewise.
603 * linux-tdep.c (linux_collect_thread_registers): Likewise.
604 * lm32-tdep.c (lm32_extract_return_value): Likewise.
605 (lm32_store_return_value): Likewise.
606 * m32c-tdep.c (m32c_read_flg): Likewise.
607 (m32c_pseudo_register_read): Likewise.
608 (m32c_pseudo_register_write): Likewise.
609 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
610 (m32r_linux_collect_gregset): Likewise.
611 * m32r-tdep.c (m32r_store_return_value): Likewise.
612 (m32r_extract_return_value): Likewise.
613 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
614 (m68kbsd_collect_fpregset): Likewise.
615 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
616 * m68k-linux-nat.c (fetch_register): Likewise.
617 (old_fetch_inferior_registers): Likewise.
618 (old_store_inferior_registers): Likewise.
619 (store_regs): Likewise.
620 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
621 (m68k_svr4_store_return_value): Likewise.
622 * m88k-tdep.c (m88k_store_arguments): Likewise.
623 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
624 (mi_cmd_data_write_register_values): Likewise.
625 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
626 (mips_fbsd_store_inferior_registers): Likewise.
627 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
628 (mips_fbsd_supply_gregs): Likewise.
629 (mips_fbsd_collect_fpregs): Likewise.
630 (mips_fbsd_collect_gregs): Likewise.
631 (mips_fbsd_supply_fpregset): Likewise.
632 (mips_fbsd_collect_fpregset): Likewise.
633 (mips_fbsd_supply_gregset): Likewise.
634 (mips_fbsd_collect_gregset): Likewise.
635 * mips-linux-nat.c (supply_gregset): Likewise.
636 (fill_gregset): Likewise.
637 (supply_fpregset): Likewise.
638 (fill_fpregset): Likewise.
639 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
640 (mips_fill_gregset): Likewise.
641 (mips_supply_fpregset): Likewise.
642 (mips_fill_fpregset): Likewise.
643 (mips64_supply_gregset): Likewise.
644 (micromips_linux_sigframe_validate): Likewise.
645 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
646 (mipsnbsd_fetch_inferior_registers): Likewise.
647 (mipsnbsd_store_inferior_registers): Likewise.
648 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
649 (mipsnbsd_supply_gregset): Likewise.
650 (mipsnbsd_iterate_over_regset_sections): Likewise.
651 (mipsnbsd_supply_reg): Likewise.
652 (mipsnbsd_supply_fpreg): Likewise.
653 * mips-tdep.c (mips_in_frame_stub): Likewise.
654 (mips_dummy_id): Likewise.
655 (is_octeon_bbit_op): Likewise.
656 (micromips_bc1_pc): Likewise.
657 (extended_mips16_next_pc): Likewise.
658 (mips16_next_pc): Likewise.
659 (deal_with_atomic_sequence): Likewise.
660 * moxie-tdep.c (moxie_process_readu): Likewise.
661 * nios2-tdep.c (nios2_get_next_pc): Likewise.
662 * nto-procfs.c (procfs_store_registers): Likewise.
663 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
664 (ppcfbsd_store_inferior_registers): Likewise.
665 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
666 (fetch_altivec_register): Likewise.
667 (get_spe_registers): Likewise.
668 (fetch_spe_register): Likewise.
669 (fetch_altivec_registers): Likewise.
670 (fetch_all_gp_regs): Likewise.
671 (fetch_all_fp_regs): Likewise.
672 (store_vsx_register): Likewise.
673 (store_altivec_register): Likewise.
674 (set_spe_registers): Likewise.
675 (store_spe_register): Likewise.
676 (store_altivec_registers): Likewise.
677 (store_all_gp_regs): Likewise.
678 (store_all_fp_regs): Likewise.
679 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
680 (ppc_linux_collect_gregset): Likewise.
681 (ppc_canonicalize_syscall): Likewise.
682 (ppc_linux_record_signal): Likewise.
683 (ppu2spu_prev_register): Likewise.
684 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
685 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
686 (ppcobsd_store_registers): Likewise.
687 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
688 Likewise.
689 (ppc_ravenscar_generic_store_registers): Likewise.
690 * procfs.c (procfs_fetch_registers): Likewise.
691 (procfs_store_registers): Likewise.
692 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
693 (ravenscar_store_registers): Likewise.
694 (ravenscar_prepare_to_store): Likewise.
695 * record-btrace.c (record_btrace_fetch_registers): Likewise.
696 * record-full.c (record_full_wait_1): Likewise.
697 (record_full_registers_change): Likewise.
698 (record_full_store_registers): Likewise.
699 (record_full_core_fetch_registers): Likewise.
700 (record_full_save): Likewise.
701 (record_full_goto_insn): Likewise.
702 * regcache.c (regcache_register_size): Likewise.
703 (get_regcache_arch): Remove.
704 (regcache_read_pc): Likewise.
705 * regcache.h (get_regcache_arch): Remove.
706 * remote-sim.c (gdbsim_fetch_register): Likewise.
707 (gdbsim_store_register): Likewise.
708 * remote.c (fetch_register_using_p): Likewise.
709 (send_g_packet): Likewise.
710 (remote_prepare_to_store): Likewise.
711 (store_registers_using_G): Likewise.
712 * reverse.c (save_bookmark_command): Likewise.
713 (goto_bookmark_command): Likewise.
714 * rs6000-aix-tdep.c (branch_dest): Likewise.
715 * rs6000-nat.c (rs6000_ptrace64): Likewise.
716 (fetch_register): Likewise.
717 * rs6000-tdep.c (ppc_supply_reg): Likewise.
718 (ppc_collect_reg): Likewise.
719 (ppc_collect_gregset): Likewise.
720 (ppc_collect_fpregset): Likewise.
721 (ppc_collect_vsxregset): Likewise.
722 (ppc_collect_vrregset): Likewise.
723 (ppc_displaced_step_hw_singlestep): Likewise.
724 (rs6000_pseudo_register_read): Likewise.
725 (rs6000_pseudo_register_write): Likewise.
726 * s390-linux-nat.c (supply_gregset): Likewise.
727 (fill_gregset): Likewise.
728 (s390_linux_fetch_inferior_registers): Likewise.
729 * s390-linux-tdep.c (s390_write_pc): Likewise.
730 (s390_software_single_step): Likewise.
731 (s390_all_but_pc_registers_record): Likewise.
732 (s390_linux_syscall_record): Likewise.
733 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
734 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
735 (shnbsd_store_inferior_registers): Likewise.
736 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
737 (sh_extract_return_value_fpu): Likewise.
738 (sh_store_return_value_nofpu): Likewise.
739 (sh_corefile_supply_regset): Likewise.
740 (sh_corefile_collect_regset): Likewise.
741 * sh64-tdep.c (sh64_extract_return_value): Likewise.
742 (sh64_store_return_value): Likewise.
743 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
744 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
745 (sparc_store_inferior_registers): Likewise.
746 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
747 (sparc_ravenscar_prepare_to_store): Likewise.
748 * sparc-tdep.c (sparc32_store_arguments): Likewise.
749 (sparc_analyze_control_transfer): Likewise.
750 (sparc_step_trap): Likewise.
751 (sparc_software_single_step): Likewise.
752 (sparc32_gdbarch_init): Likewise.
753 (sparc_supply_rwindow): Likewise.
754 (sparc_collect_rwindow): Likewise.
755 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
756 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
757 (sparc64nbsd_collect_gregset): Likewise.
758 (sparc64nbsd_supply_fpregset): Likewise.
759 (sparc64nbsd_collect_fpregset): Likewise.
760 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
761 (sparc64_supply_gregset): Likewise.
762 (sparc64_collect_gregset): Likewise.
763 (sparc64_supply_fpregset): Likewise.
764 (sparc64_collect_fpregset): Likewise.
765 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
766 * spu-tdep.c (spu_unwind_sp): Likewise.
767 (spu2ppu_prev_register): Likewise.
768 (spu_memory_remove_breakpoint): Likewise.
769 * stack.c (return_command): Likewise.
770 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
771 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
772 * tracefile.c (trace_save_ctf): Likewise.
773 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
774 (do_windows_store_inferior_registers): Likewise.
775 (windows_resume): Likewise.
776 * xtensa-linux-nat.c (fill_gregset): Likewise.
777 (supply_gregset_reg): Likewise.
778 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
779 (xtensa_register_read_masked): Likewise.
780 (xtensa_supply_gregset): Likewise.
781 (xtensa_extract_return_value): Likewise.
782 (xtensa_store_return_value): Likewise.
783
edd079d9
UW
7842017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
785
786 * doublest.c (floatformat_from_string): New function.
787 * doublest.h (floatformat_from_string): Add prototype.
788
789 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
790 (OP_FLOAT): ... this.
791 * expression.h: Do not include "doublest.h".
792 (union exp_element): Replace doubleconst and decfloatconst by
793 new element floatconst.
794 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
795 (ada_evaluate_subexp): Likewise.
796 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
797 OP_DOUBLE and OP_DECFLOAT.
798 * expprint.c (print_subexp_standard): Likewise.
799 (dump_subexp_body_standard): Likewise.
800 * breakpoint.c (watchpoint_exp_is_const): Likewise.
801
802 * parse.c: Include "dfp.h".
803 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
804 (write_exp_elt_floatcst): New function.
805 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
806 and OP_DECFLOAT.
807 (operator_check_standard): Likewise.
808 (parse_float): Do not accept suffix. Take type as input. Return bool.
809 Return target format buffer instead of host DOUBLEST.
810 Use floatformat_from_string and decimal_from_string to parse
811 either binary or decimal floating-point types.
812 (parse_c_float): Remove.
813 * parser-defs.h: Do not include "doublest.h".
814 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
815 (write_exp_elt_floatcst): Add prototype.
816 (parse_float): Update prototype.
817 (parse_c_float): Remove.
818
819 * c-exp.y: Do not include "dfp.h".
820 (typed_val_float): Use byte buffer instead of DOUBLEST.
821 (typed_val_decfloat): Remove.
822 (DECFLOAT): Remove.
823 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
824 (parse_number): Update to new parse_float interface.
825 Parse suffixes and determine type before calling parse_float.
826 Handle decimal and binary FP types the same way.
827
828 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
829 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
830 (parse_number): Update to new parse_float interface.
831 Parse suffixes and determine type before calling parse_float.
832
833 * f-exp.y: Replace dval by typed_val_float.
834 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
835 (parse_number): Use parse_float instead of atof.
836
837 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
838 (parse_go_float): Remove.
839 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
840 (parse_number): Call parse_float instead of parse_go_float.
841 Parse suffixes and determine type before calling parse_float.
842
843 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
844 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
845 (parse_number): Update to new parse_float interface.
846 Parse suffixes and determine type before calling parse_float.
847
848 * m2-exp.y: Replace dval by byte buffer val.
849 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
850 (parse_number): Call parse_float instead of atof.
851
852 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
853 (lex_number): Call parse_float instead of strtod.
854 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
855 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
856 Use write_exp_elt_floatcst.
857 (unit_testing): Remove static variable.
858 (rust_type): Do not check unit_testing.
859 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
860
861 * ada-exp.y (type_float, type_double): Remove.
862 (typed_val_float): Use byte buffer instead of DOUBLEST.
863 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
864 * ada-lex.l (processReal): Use parse_float instead of sscanf.
865
cc628f3d
AH
8662017-10-25 Alan Hayward <alan.hayward@arm.com>
867
868 * aarch64-tdep.h (enum aarch64_regnum): Remove.
869 * arch/aarch64.h: New file.
870
09a7c6aa
UW
8712017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
872
873 * dfp.h (decimal_from_string): Use const reference for argument.
874 * dfp.c (decimal_from_string): Likewise.
875
8ba0dd51
UW
8762017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
877
878 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
879 * sh64-tdep.c (sh64_do_fp_register): Likewise.
880 * mips-tdep.c (mips_print_fp_register): Likewise.
881
16e812b2
UW
8822017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
883
884 * common/format.h (enum argclass): Replace decfloat_arg by
885 dec32float_arg, dec64float_arg, and dec128float_arg.
886 * common/format.c (parse_format_string): Update to return
887 new decimal float argument classes.
888
889 * printcmd.c (printf_decfloat): Rename to ...
890 (printf_floating): ... this. Add argclass argument, and use it
891 instead of parsing the format string again. Add support for
892 binary floating-point values, using floatformat_to_string.
893 Convert value to the target format if it doesn't already match.
894 (ui_printf): Call printf_floating instead of printf_decfloat,
895 also for double_arg / long_double_arg. Pass argclass.
896
897 * dfp.c (decimal_to_string): Add format string argument.
898 * dfp.h (decimal_to_string): Likewise.
899
900 * doublest.c (floatformat_to_string): Add format string argument.
901 * doublest.h (floatformat_to_string): Likewise.
902
fdf0cbc2
UW
9032017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
904
905 * doublest.c (floatformat_precision): New routine.
906 (floatformat_to_string): Likewise.
907 * doublest.c (floatformat_to_string): Add prototype.
908
909 * printcmd.c (print_scalar_formatted): Only call print_floating
910 on floating-point types.
911 * valprint.c: Do not include "floatformat.h".
912 (generic_val_print_decfloat): Remove.
913 (generic_val_print): Call generic_val_print_float for both
914 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
915 (print_floating): Use floatformat_to_string. Handle decimal float.
916 (print_decimal_floating): Remove, merge into floatformat_to_string.
917 * value.h (print_decimal_floating): Remove.
918
919 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
920
5033013f
UW
9212017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
922
923 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
924
a664f67e
SM
9252017-10-21 Simon Marchi <simon.marchi@ericsson.com>
926
927 * memattr.h: Don't include vec.h.
928 (struct mem_attrib): Initialize fields.
929 <unknown>: New static method.
930 (struct mem_region): Add constructors, operator<, initialize
931 fields.
932 * memattr.c: Include algorithm.
933 (default_mem_attrib, unknown_mem_attrib): Remove.
934 (user_mem_region_list): New global.
935 (target_mem_region_list, mem_region_list): Change type to
936 std::vector<mem_region>.
937 (mem_use_target): Now a function.
938 (target_mem_regions_valid): Change type to bool.
939 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
940 (require_user_regions): Adjust.
941 (require_target_regions): Adjust.
942 (create_mem_region): Adjust.
943 (lookup_mem_region): Adjust.
944 (invalidate_target_mem_regions): Adjust.
945 (mem_clear): Rename to...
946 (user_mem_clear): ... this, and adjust.
947 (mem_command): Adjust.
948 (info_mem_command): Adjust.
949 (mem_enable, enable_mem_command, mem_disable,
950 disable_mem_command): Adjust.
951 (mem_delete): Adjust.
952 (delete_mem_command): Adjust.
953 * memory-map.h (parse_memory_map): Return an std::vector.
954 * memory-map.c (parse_memory_map): Likewise.
955 (struct memory_map_parsing_data): Add constructor.
956 <memory_map>: Point to std::vector.
957 (memory_map_start_memory): Adjust.
958 (memory_map_end_memory): Adjust.
959 (memory_map_end_property): Adjust.
960 (clear_result): Remove.
961 * remote.c (remote_memory_map): Return an std::vector.
962 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
963 Remove.
964 (target_debug_print_mem_region_vector): New.
965 * target-delegates.c: Regenerate.
966 * target.h (mem_region_vector): New typedef.
967 (to_memory_map): Return mem_region_vector.
968 (target_memory_map): Return an std::vector.
969 * target.c (target_memory_map): Return an std::vector.
970 (flash_erase_command): Adjust.
971
6e17c565
SM
9722017-10-21 Simon Marchi <simon.marchi@ericsson.com>
973
974 * memory-map.c (struct memory_map_parsing_data) <property_name>:
975 Change type to std::string.
976 (memory_map_start_property): Adjust.
977 (memory_map_end_property): Adjust.
978
cfba9872
SM
9792017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
980
981 * infrun.h: Include common/byte-vector.h.
982 (struct displaced_step_closure): New struct.
983 (struct buf_displaced_step_closure): New struct.
984 * infrun.c (displaced_step_closure::~displaced_step_closure):
985 Provide default implementation.
986 (displaced_step_clear): Deallocate step closure with delete.
987 * aarch64-tdep.c (displaced_step_closure): Rename to ...
988 (aarch64_displaced_step_closure): ... this, extend
989 displaced_step_closure.
990 (aarch64_displaced_step_data) <dsc>: Change type to
991 aarch64_displaced_step_closure.
992 (aarch64_displaced_step_copy_insn): Adjust to type change, use
993 unique_ptr.
994 (aarch64_displaced_step_fixup): Add cast for displaced step
995 closure.
996 * amd64-tdep.c (displaced_step_closure): Rename to ...
997 (amd64_displaced_step_closure): ... this, extend
998 displaced_step_closure.
999 <insn_buf>: Change type to std::vector<gdb_byte>.
1000 <max_len>: Remove.
1001 (fixup_riprel): Change type of DSC parameter, adjust to type
1002 change of insn_buf.
1003 (fixup_displaced_copy): Change type of DSC parameter.
1004 (amd64_displaced_step_copy_insn): Instantiate
1005 amd64_displaced_step_closure.
1006 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1007 to type change of insn_buf.
1008 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1009 parameter DSC.
1010 (arm_linux_copy_svc): Likewise.
1011 (cleanup_kernel_helper_return): Likewise.
1012 (arm_catch_kernel_helper_return): Likewise.
1013 (arm_linux_displaced_step_copy_insn): Instantiate
1014 arm_displaced_step_closure.
1015 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1016 (displaced_read_reg): Change type of parameter DSC.
1017 (branch_write_pc): Likewise.
1018 (load_write_pc): Likewise.
1019 (alu_write_pc): Likewise.
1020 (displaced_write_reg): Likewise.
1021 (arm_copy_unmodified): Likewise.
1022 (thumb_copy_unmodified_32bit): Likewise.
1023 (thumb_copy_unmodified_16bit): Likewise.
1024 (cleanup_preload): Likewise.
1025 (install_preload): Likewise.
1026 (arm_copy_preload): Likewise.
1027 (thumb2_copy_preload): Likewise.
1028 (install_preload_reg): Likewise.
1029 (arm_copy_preload_reg): Likewise.
1030 (cleanup_copro_load_store): Likewise.
1031 (install_copro_load_store): Likewise.
1032 (arm_copy_copro_load_store) Likewise.
1033 (thumb2_copy_copro_load_store): Likewise.
1034 (cleanup_branch): Likewise.
1035 (install_b_bl_blx): Likewise.
1036 (arm_copy_b_bl_blx): Likewise.
1037 (thumb2_copy_b_bl_blx): Likewise.
1038 (thumb_copy_b): Likewise.
1039 (install_bx_blx_reg): Likewise.
1040 (arm_copy_bx_blx_reg): Likewise.
1041 (thumb_copy_bx_blx_reg): Likewise.
1042 (cleanup_alu_imm): Likewise.
1043 (arm_copy_alu_imm): Likewise.
1044 (thumb2_copy_alu_imm): Likewise.
1045 (cleanup_alu_reg): Likewise.
1046 (install_alu_reg): Likewise.
1047 (arm_copy_alu_reg): Likewise.
1048 (thumb_copy_alu_reg): Likewise.
1049 (cleanup_alu_shifted_reg): Likewise.
1050 (install_alu_shifted_reg): Likewise.
1051 (arm_copy_alu_shifted_reg): Likewise.
1052 (cleanup_load): Likewise.
1053 (cleanup_store): Likewise.
1054 (arm_copy_extra_ld_st): Likewise.
1055 (install_load_store): Likewise.
1056 (thumb2_copy_load_literal): Likewise.
1057 (thumb2_copy_load_reg_imm): Likewise.
1058 (arm_copy_ldr_str_ldrb_strb): Likewise.
1059 (cleanup_block_load_all): Likewise.
1060 (cleanup_block_store_pc): Likewise.
1061 (cleanup_block_load_pc): Likewise.
1062 (arm_copy_block_xfer): Likewise.
1063 (thumb2_copy_block_xfer): Likewise.
1064 (cleanup_svc): Likewise.
1065 (install_svc): Likewise.
1066 (arm_copy_svc): Likewise.
1067 (thumb_copy_svc): Likewise.
1068 (arm_copy_undef): Likewise.
1069 (thumb_32bit_copy_undef): Likewise.
1070 (arm_copy_unpred): Likewise.
1071 (arm_decode_misc_memhint_neon): Likewise.
1072 (arm_decode_unconditional): Likewise.
1073 (arm_decode_miscellaneous): Likewise.
1074 (arm_decode_dp_misc): Likewise.
1075 (arm_decode_ld_st_word_ubyte): Likewise.
1076 (arm_decode_media): Likewise.
1077 (arm_decode_b_bl_ldmstm): Likewise.
1078 (arm_decode_ext_reg_ld_st): Likewise.
1079 (thumb2_decode_dp_shift_reg): Likewise.
1080 (thumb2_decode_ext_reg_ld_st): Likewise.
1081 (arm_decode_svc_copro): Likewise.
1082 (thumb2_decode_svc_copro): Likewise.
1083 (install_pc_relative): Likewise.
1084 (thumb_copy_pc_relative_16bit): Likewise.
1085 (thumb_decode_pc_relative_16bit): Likewise.
1086 (thumb_copy_pc_relative_32bit): Likewise.
1087 (thumb_copy_16bit_ldr_literal): Likewise.
1088 (thumb_copy_cbnz_cbz): Likewise.
1089 (thumb2_copy_table_branch): Likewise.
1090 (cleanup_pop_pc_16bit_all): Likewise.
1091 (thumb_copy_pop_pc_16bit): Likewise.
1092 (thumb_process_displaced_16bit_insn): Likewise.
1093 (decode_thumb_32bit_ld_mem_hints): Likewise.
1094 (thumb_process_displaced_32bit_insn): Likewise.
1095 (thumb_process_displaced_insn): Likewise.
1096 (arm_process_displaced_insn): Likewise.
1097 (arm_displaced_init_closure): Likewise.
1098 (arm_displaced_step_fixup): Add cast for closure.
1099 * arm-tdep.h: Include infrun.h.
1100 (displaced_step_closure): Rename to ...
1101 (arm_displaced_step_closure): ... this, extend
1102 displaced_step_closure.
1103 <u::svc::copy_svc_os>: Change type of parameter DSC.
1104 <cleanup>: Likewise.
1105 (arm_process_displaced_insn): Likewise.
1106 (arm_displaced_init_closure): Likewise.
1107 (displaced_read_reg): Likewise.
1108 (displaced_write_reg): Likewise.
1109 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1110 Adjust.
1111 * i386-tdep.h: Include infrun.h.
1112 (i386_displaced_step_closure): New typedef.
1113 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1114 i386_displaced_step_closure.
1115 (i386_displaced_step_fixup): Adjust.
1116 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1117 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1118 and unique_ptr.
1119 (ppc_displaced_step_fixup): Adjust.
1120 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1121 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1122 and unique_ptr.
1123 (s390_displaced_step_fixup): Adjust.
1124
b392b304
SM
11252017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1128 Remove declarations.
1129
d5833c62
TT
11302017-10-20 Tom Tromey <tom@tromey.com>
1131
1132 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1133 std::vector.
1134 (gdb_bfd_record_inclusion): Update.
1135 (bfdp): Remove typedef.
1136
06d5bbc8
TT
11372017-10-20 Tom Tromey <tom@tromey.com>
1138
1139 * gdb_bfd.c (gdb_bfd_ref): Use new.
1140 (struct gdb_bfd_data): Add constructor, destructor, and member
1141 initializers.
1142 (gdb_bfd_unref): Use delete.
1143
2712ce2e
TT
11442017-10-20 Tom Tromey <tom@tromey.com>
1145
1146 * exec.c (exec_file_attach): Use new_bfd_ref.
1147 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1148 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1149 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1150 new_bfd_ref.
1151 * gdb_bfd.h (new_bfd_ref): New function.
1152
fcc8fb2f
PA
11532017-10-20 Pedro Alves <palves@redhat.com>
1154
1155 * main.c (captured_command_loop): Add attribute noinline.
1156
4c2287b0
SM
11572017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1158
1159 * interps.c (struct interp_factory): Add constructor.
1160 (interp_factory_p): Remove typedef.
1161 (DEF_VEC_P(interp_factory_p)): Remove.
1162 (interpreter_factories): Change type to std::vector.
1163 (interp_factory_register): Adjust.
1164 (interp_lookup): Adjust.
1165 (interpreter_completer): Adjust.
1166
3d415c26
TT
11672017-10-19 Tom Tromey <tom@tromey.com>
1168
1169 * break-catch-syscall.c (catch_syscall_completer): Use
1170 std::string, gdb::unique_xmalloc_ptr.
1171
395423c4
TT
11722017-10-19 Tom Tromey <tom@tromey.com>
1173
1174 * infcall.c (call_function_by_hand_dummy): Use std::string.
1175
54f70bc1
TT
11762017-10-19 Tom Tromey <tom@tromey.com>
1177
1178 * mi/mi-main.c (mi_cmd_execute): Update.
1179 * top.h (prepare_execute_command): Return scoped_value_mark.
1180 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1181 Add move constructor.
1182 * top.c (prepare_execute_command): Return scoped_value_mark.
1183 (execute_command): Update.
1184
63929e84
PA
11852017-10-19 Pedro Alves <palves@redhat.com>
1186
1187 * xml-support.c (xml_fetch_content_from_file): Check fread's
1188 return.
1189
a75868f5
PA
11902017-10-19 Pedro Alves <palves@redhat.com>
1191
1192 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1193 async.
1194 (handle_error_fd): New function.
1195 (ser_base_async): Add/delete an event loop file handler for
1196 error_fd.
1197
2edf834e
PA
11982017-10-19 Pedro Alves <palves@redhat.com>
1199
1200 * xml-support.c (xml_fetch_content_from_file): Don't read in
1201 chunks. Instead use fseek to determine the file's size, and read
1202 it in one go.
1203
c8ba13ad
KS
12042017-11-18 Keith Seitz <keiths@redhat.com>
1205
1206 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1207 types.
1208 Add whitespace to front of type name.
1209
37534686
KS
12102017-10-18 Keith Seitz <keiths@redhat.com>
1211
1212 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1213 DW_AT_accessibility.
1214
28c7c158
YQ
12152017-10-18 Yao Qi <yao.qi@linaro.org>
1216
1217 * features/tic6x-c62x-linux.c: Remove.
1218
30f0b101
TT
12192017-10-17 Tom Tromey <tom@tromey.com>
1220
1221 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1222 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1223 (do_mixed_source_and_assembly): Likewise.
1224
57e12da9
TT
12252017-10-17 Tom Tromey <tom@tromey.com>
1226
1227 * regcache.c (regcache::xfer_part): Remove assertion.
1228
7b700999
PA
12292017-10-17 Pedro Alves <palves@redhat.com>
1230
1231 * xml-support.c (xml_fetch_content_from_file): Call
1232 unique_ptr::release() instead unique_ptr::get() when passing
1233 through xrealloc.
1234
d3037ba6
YQ
12352017-10-17 Yao Qi <yao.qi@linaro.org>
1236
1237 * regcache.c (regcache::xfer_part): Remove parameters read and
1238 write, add parameter is_raw. All callers are updated.
1239
83d5a34d
KS
12402017-10-16 Keith Seitz <keiths@redhat.com>
1241
1242 * c-typeprint.c (enum access_specifier): Moved here from
1243 c_type_print_base.
1244 (output_access_specifier): New function.
1245 (c_type_print_base): Consider typedefs when assessing
1246 whether access labels are needed.
1247 Use output_access_specifier as needed.
1248 Output access specifier for typedefs, if needed.
1249 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1250 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1251 fields.
1252 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1253 accessor macros.
1254
87028b87
TT
12552017-10-16 Tom Tromey <tom@tromey.com>
1256
1257 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1258 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1259 * target.c (target_fileio_read_stralloc): Update.
1260 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1261 * target.h (target_fileio_read_stralloc): Return
1262 unique_xmalloc_ptr.
1263
b7b030ad
TT
12642017-10-16 Tom Tromey <tom@tromey.com>
1265
1266 * xml-syscall.c (xml_init_syscalls_info): Update.
1267 * xml-support.c (xinclude_start_include): Update.
1268 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1269 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1270 (xml_fetch_content_from_file): Likewise.
1271 * osdata.c (get_osdata): Update.
1272 * target.h (target_read_stralloc, target_get_osdata): Return
1273 unique_xmalloc_ptr.
1274 * solib-aix.c (solib_aix_get_library_list): Update.
1275 * solib-target.c (solib_target_current_sos): Update.
1276 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1277 * xml-tdesc.c (fetch_available_features_from_target): Update.
1278 (target_fetch_description_xml): Update.
1279 (file_read_description_xml): Update.
1280 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1281 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1282 (remote_pid_to_exec_file): Update.
1283 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1284 (target_get_osdata): Likewise.
1285
b80406ac
TT
12862017-10-16 Tom Tromey <tom@tromey.com>
1287
1288 * remote.c (remote_register_number_and_offset): Use std::vector.
1289 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1290 (putpkt_binary): Use gdb::def_vector.
1291 (compare_sections_command): Use gdb::byte_vector.
1292
a90ecff8
TT
12932017-10-16 Tom Tromey <tom@tromey.com>
1294
1295 * ppc-linux-nat.c (hwdebug_insert_point): Use
1296 gdb::unique_xmalloc_ptr, XDUP.
1297
2dc0e219
TT
12982017-10-16 Tom Tromey <tom@tromey.com>
1299
1300 * probe.c (parse_probes): Use std::string.
1301 (info_probes_for_ops, enable_probes_command)
1302 (disable_probes_command): Remove cleanups.
1303
b05628f0
TT
13042017-10-16 Tom Tromey <tom@tromey.com>
1305
1306 * buildsym.c (block_compar): Remove.
1307 (end_symtab_get_static_block): Use std::vector.
1308
a79b1bc6
SM
13092017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1310
1311 * memrange.h (struct mem_range): Define operator< and operator==.
1312 (mem_range_s): Remove.
1313 (DEF_VEC_O (mem_range_s)): Remove.
1314 (normalize_mem_ranges): Change parameter type to std::vector.
1315 * memrange.c (compare_mem_ranges): Remove.
1316 (normalize_mem_ranges): Change parameter type to std::vector,
1317 adjust to vector change.
1318 * exec.c (section_table_available_memory): Return vector, remove
1319 parameter.
1320 (section_table_read_available_memory): Adjust to std::vector
1321 change.
1322 * remote.c (remote_read_bytes): Adjust to std::vector
1323 change.
1324 * tracepoint.h (traceframe_available_memory): Change parameter
1325 type to std::vector.
1326 * tracepoint.c (traceframe_available_memory): Change parameter
1327 type to std::vector, adjust.
1328 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1329 std::vector change.
1330 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1331 unittests/memrange-selftests.c.
1332 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1333 * gdb/unittests/memrange-selftests.c: New file.
1334
63f0e930
PA
13352017-10-16 Pedro Alves <palves@redhat.com>
1336
1337 * elfread.c (probe_key_free): Rename range-for variable.
1338 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1339 (find_probe_by_pc, collect_probes): Rename range-for variable.
1340
c40c7bfc
YQ
13412017-10-16 Yao Qi <yao.qi@linaro.org>
1342
1343 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1344 * features/tic6x-c62x.c: Remove.
1345 * features/tic6x-c64x-linux.c: Remove.
1346 * features/tic6x-c64x.c: Remove.
1347 * features/tic6x-c64xp-linux.c: Remove.
1348 * features/tic6x-c64xp.c: Remove.
1349 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1350 initialize_tdesc_tic6x_*_linux functions.
1351 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1352 initialize_tdesc_tic6x_* functions.
1353
df27ae6a
YQ
13542017-10-16 Yao Qi <yao.qi@linaro.org>
1355
1356 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1357 tic6x-c62x.
1358 * regformats/tic6x-c62x.dat: Remove.
1359 * regformats/tic6x-c64x.dat: Remove.
1360 * regformats/tic6x-c64xp.dat: Remove.
1361
86766165
SM
13622017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1365 (the !HAVE_LIBEXPAT version).
1366
824dfcc3
SM
13672017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1368
1369 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1370 const.
1371
2098b393
SM
13722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1373
1374 * target.h: Include tracepoint.h.
1375 (enum trace_find_type): Move to tracepoint.h.
1376 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1377 * tracepoint.h: Don't include target.h
1378 (enum trace_find_type): Move from target.h.
1379 (parse_traceframe_info): Return a unique ptr.
1380 * tracepoint.c (current_traceframe_info): Change type to unique
1381 ptr.
1382 (free_traceframe_info): Remove.
1383 (clear_traceframe_info): Don't manually free
1384 current_traceframe_info.
1385 (free_result): Remove.
1386 (parse_traceframe_info): Return a unique ptr.
1387 (get_traceframe_info): Adjust to unique ptr.
1388 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1389 * remote.c (remote_traceframe_info): Return a unique ptr.
1390 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1391 ptr.
1392 * target-debug.h (target_debug_print_traceframe_info_up): New
1393 macro.
1394 * target-delegates.c: Regenerate.
1395
4cdd21a8
SM
13962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * memrange.h (struct mem_range): Add constructors.
1399 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1400 std::vector<mem_range>.
1401 * tracepoint.c (free_traceframe_info): Don't manually free
1402 vector.
1403 (traceframe_info_start_memory): Adjust to vector change.
1404 (traceframe_available_memory): Likewise.
1405 * tracefile-tfile.c (build_traceframe_info): Likewise.
1406 * ctf.c (ctf_traceframe_info): Likewise.
1407
d0d292a2
SM
14082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1409
1410 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1411 std::vector<int>.
1412 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1413 (traceframe_info_start_tvar): Adjust to vector change.
1414 (parse_traceframe_info): Allocate with new.
1415 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1416 vector change.
1417 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1418 change.
1419 tfile_traceframe_info): Allocate with new.
1420 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1421 change.
1422
8d3c73ef
SM
14232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1424
1425 * tracepoint.c (traceframe_info): Rename to...
1426 (current_traceframe_info): ...this.
1427 (clear_traceframe_info): Adjust.
1428 (get_traceframe_info): Adjust.
1429
b129dcac
SM
14302017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1431
1432 * nat/linux-osdata.c: Include algorithm.
1433 (compare_processes): Remove.
1434 (struct pid_pgid_entry): New struct.
1435 (linux_xfer_osdata_processgroups): Use std::vector instead of
1436 XNEWVEC.
1437
af5bf4ad
SM
14382017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1439
1440 * objfiles.h: Don't include symfile.h.
1441 (struct partial_symbol): Remove forward-declaration.
1442 (struct objfile) <global_psymbols, static_psymbols>: Change type
1443 to std::vector<partial_symbol *>.
1444 * objfiles.c (objfile::objfile): Don't memset those fields.
1445 (objfile::~objfile): Don't free those fields.
1446 * psympriv.h (struct psymbol_allocation_list): Remove
1447 forward-declaration.
1448 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1449 to std::vector.
1450 (start_psymtab_common): Change parameters to std::vector.
1451 * psymtab.c: Include algorithm.
1452 (require_partial_symbols): Call shrink_to_fit.
1453 (find_pc_sect_psymbol): Adjust to vector change.
1454 (match_partial_symbol): Likewise.
1455 (lookup_partial_symbol): Likewise.
1456 (psym_relocate): Likewise.
1457 (dump_psymtab): Likewise.
1458 (recursively_search_psymtabs): Likewise.
1459 (compare_psymbols): Remove.
1460 (sort_pst_symbols): Adjust to vector change.
1461 (start_psymtab_common): Likewise.
1462 (end_psymtab_common): Likewise.
1463 (psymbol_bcache_full): De-constify return value.
1464 (add_psymbol_to_bcache): Likewise.
1465 (extend_psymbol_list): Remove.
1466 (append_psymbol_to_list): Adjust to vector change.
1467 (add_psymbol_to_list): Likewise.
1468 (init_psymbol_list): Likewise.
1469 (maintenance_info_psymtabs): Likewise.
1470 (maintenance_check_psymtabs): Likewise.
1471 * symfile.h (struct psymbol_allocation_list): Remove.
1472 * symfile.c (reread_symbols): Adjust to vector change.
1473 * dbxread.c (start_psymtab): Change type of parameters.
1474 (dbx_symfile_read): Adjust to vector change.
1475 (read_dbx_symtab): Likewise.
1476 (start_psymtab): Change type of parameters.
1477 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1478 (create_partial_symtab): Likewise.
1479 (add_partial_symbol): Likewise.
1480 (write_one_signatured_type): Likewise.
1481 (recursively_write_psymbols): Likewise.
1482 * mdebugread.c (parse_partial_symbols): Likewise.
1483 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1484 (scan_xcoff_symtab): Adjust to vector change.
1485 (xcoff_initial_scan): Likewise.
1486
3ec5942f
SM
14872017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1488
1489 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1490
2399fe6a
YQ
14912017-10-13 Yao Qi <yao.qi@linaro.org>
1492
1493 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1494 Remove s390x-*-expedite, add s390x-expedite.
1495
4bf3f4a8
YQ
14962017-10-13 Yao Qi <yao.qi@linaro.org>
1497
1498 * features/s390-gs-linux64.c: Regenerated.
1499 * features/s390x-gs-linux64.c: Regenerated.
1500
9e86da07
TT
15012017-10-13 Tom Tromey <tom@tromey.com>
1502
1503 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1504 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1505 delete.
1506 * symfile.c (symbol_file_add_with_addrs): Use new.
1507 (symbol_file_add_separate): Update comment.
1508 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1509 * jit.c (jit_object_close_impl): Use new.
1510 (jit_unregister_code): Use delete.
1511 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1512 (~objfile): Rename from free_objfile.
1513 (free_objfile_separate_debug, do_free_objfile_cleanup)
1514 (free_all_objfiles, objfile_purge_solibs): Use delete.
1515 * objfiles.h (struct objfile): Add constructor and destructor.
1516 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1517 (allocate_objfile, free_objfile): Don't declare.
1518 (struct objstats): Add initializers.
1519
c2508e90
SM
15202017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1521
1522 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1523 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1524 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1525 * gdbarch.h: Regenerate.
1526 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1527 Adjust comment.
1528 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1529 (i386_displaced_step_fixup): Adjust comment.
1530 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1531
a900ff72
TT
15322017-10-12 Tom Tromey <tom@tromey.com>
1533
1534 * prologue-value.h (pv_area::store_would_trash): Return bool.
1535 (pv_area::find_reg): Likewise.
1536 * prologue-value.c (pv_area::store_would_trash): Return bool.
1537 (pv_area::find_reg): Likewise.
1538
f7b7ed97
TT
15392017-10-12 Tom Tromey <tom@tromey.com>
1540
1541 * s390-linux-tdep.c (s390_store, s390_load)
1542 (s390_check_for_saved, s390_analyze_prologue): Update.
1543 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1544 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1545 * prologue-value.h (class pv_area): Move from prologue-value.c.
1546 Change names of members. Add constructor, destructor, member
1547 functions.
1548 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1549 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1550 (pv_area_fetch, pv_area_scan): Don't declare.
1551 * prologue-value.c (struct pv_area::area_entry): Now member of
1552 pv_area.
1553 (struct pv_area): Move to prologue-value.h.
1554 (pv_area::pv_area): Rename from make_pv_area.
1555 (pv_area::~pv_area): Rename from free_pv_area.
1556 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1557 (clear_entries, find_entry, overlaps, store_would_trash, store)
1558 (fetch, find_reg, scan): Now member of pv_area.
1559 Remove "area" argument. Update.
1560 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1561 Update.
1562 * mn10300-tdep.c (push_reg, check_for_saved)
1563 (mn10300_analyze_prologue): Update.
1564 * mep-tdep.c (is_arg_spill, check_for_saved)
1565 (mep_analyze_prologue): Update.
1566 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1567 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1568 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1569 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1570 Update.
1571 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1572 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1573
466eecee
SM
15742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1575
1576 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1577 * linux-nat.c (linux_nat_delete_thread): New variable.
1578 (lwp_free): Invoke linux_nat_delete_thread if set.
1579 (linux_nat_set_delete_thread): New function.
1580 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1581 thread delete callback.
1582 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1583 (_initialize_arm_linux_nat): Assign thread delete callback.
1584 * s390-linux-nat.c (s390_delete_thread): New function.
1585 (_initialize_s390_nat): Assign thread delete callback.
1586 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1587 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1588 function.
1589 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1590 declaration.
1591 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1592 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1593
f71c8822
TT
15942017-10-09 Tom Tromey <tom@tromey.com>
1595
1596 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1597 std::string.
1598 * tui/tui-layout.c (enum tui_status): Use std::string.
1599
981a3fb3
TT
16002017-10-11 Tom Tromey <tom@tromey.com>
1601
1602 * gdbthread.h (thread_command): Constify.
1603 * inferior.h (detach_command): Constify.
1604 * top.h (set_history, show_history): Constify.
1605 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1606 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1607 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1608 * printcmd.c (set_command): Constify.
1609 (non_const_set_command): New function.
1610 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1611 * breakpoint.c (enable_command, disable_command, delete_command)
1612 (catch_command, tcatch_command, set_breakpoint_cmd)
1613 (show_breakpoint_cmd): Constify.
1614 * macrocmd.c (macro_command): Constify.
1615 * infcmd.c (unset_command, kill_command, detach_command)
1616 (info_proc_cmd): Constify.
1617 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1618 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1619 (info_auto_load_cmd): Constify.
1620 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1621 (unset_tdesc_cmd): Constify.
1622 * ada-lang.c (set_ada_command, show_ada_command)
1623 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1624 * guile/guile.c (set_guile_command, show_guile_command)
1625 (info_guile_command): Constify.
1626 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1627 Constify.
1628 * skip.c (skip_command): Constify.
1629 * compile/compile.c (_initialize_compile): Constify.
1630 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1631 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1632 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1633 (maint_btrace_pt_show_cmd): Constify.
1634 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1635 Constify.
1636 * python/python.c (user_show_python, user_set_python): Constify.
1637 * mips-tdep.c (set_mips_command, show_mips_command)
1638 (set_mipsfpu_command): Constify.
1639 * record-btrace.c (cmd_record_btrace_start)
1640 (cmd_set_record_btrace, cmd_show_record_btrace)
1641 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1642 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1643 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1644 Constify.
1645 * symfile.c (overlay_command): Constify.
1646 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1647 * cli/cli-logging.c (set_logging_command, show_logging_command):
1648 Constify.
1649 * cli/cli-dump.c (dump_command, append_command)
1650 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1651 (tekhex_dump_command, binary_dump_command)
1652 (binary_append_command): Constify.
1653 * cli/cli-decode.c (struct cmd_list_element): Change type of
1654 "fun".
1655 * cli/cli-cmds.c (info_command, show_command, set_debug)
1656 (show_debug): Constify.
1657 (show_command): Add non-const overload.
1658 * top.c (set_history, show_history): Constify.
1659 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1660 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1661 * target.c (target_command): Constify.
1662 * sparc64-tdep.c (info_adi_command): Constify.
1663 * record-full.c (cmd_record_full_start): Constify.
1664 (set_record_full_command): Constify. Fix typo.
1665 (show_record_full_command): Constify.
1666 * thread.c (thread_command, thread_apply_command): Constify.
1667 * memattr.c (dummy_cmd): Constify.
1668 * value.c (function_command): Constify.
1669 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1670 * probe.c (info_probes_command): Constify.
1671 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1672 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1673 (show_thread_cmd, set_thread_default_cmd)
1674 (show_thread_default_cmd): Constify.
1675 (check_empty): Constify.
1676 * tracepoint.c (tfind_command): Constify.
1677 * cp-support.c (maint_cplus_command): Constify.
1678 * windows-tdep.c (info_w32_command): Constify.
1679 * record.c (cmd_record_start, set_record_command)
1680 (show_record_command, info_record_command, cmd_record_goto):
1681 Constify.
1682 * ravenscar-thread.c (set_ravenscar_command)
1683 (show_ravenscar_command): Constify.
1684 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1685 Constify.
1686 (add_internal_problem_command): Remove casts.
1687 * arc-tdep.c (maintenance_print_arc_command): Constify.
1688 * valprint.c (set_print, show_print, set_print_raw)
1689 (show_print_raw): Constify.
1690 * maint.c (maintenance_command, maintenance_info_command)
1691 (maintenance_print_command, maintenance_set_cmd)
1692 (maintenance_show_cmd, set_per_command_cmd)
1693 (show_per_command_cmd, maintenance_check_command): Constify.
1694 * language.c (set_check, show_check): Constify.
1695 * typeprint.c (show_print_type, set_print_type): Constify.
1696 * go32-nat.c (go32_info_dos_command): Constify.
1697
fdf44873
TT
16982017-10-11 Tom Tromey <tom@tromey.com>
1699
1700 * breakpoint.c (prepare_re_set_context): Remove.
1701 (breakpoint_re_set_one): Update. Don't use cleanups.
1702 (breakpoint_re_set): Use scoped_restore, std::string, and
1703 scoped_restore_current_language.
1704
81b1e71c
TT
17052017-10-11 Tom Tromey <tom@tromey.com>
1706
1707 * breakpoint.c (commands_command_1): Use std::string.
1708 (cleanup_executing_breakpoints): Remove.
1709 (bpstat_do_actions_1): Use scoped_restore.
1710 (bpstat_check_watchpoint): Use std::string.
1711 (decode_static_tracepoint_spec): Likewise.
1712 (break_range_command): Likewise.
1713 (watch_command_1): Likewise.
1714 (compare_breakpoints): Change argument types.
1715 (clear_command): Use std::vector.
1716 (cleanup_executing_breakpoints): Remove.
1717 (update_global_location_list): Use unique_xmalloc_ptr.
1718 (strace_command): Remove unused declaration.
1719
4f9d9906
JB
17202017-10-11 John Baldwin <jhb@FreeBSD.org>
1721
1722 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1723 * NEWS: Mention new FreeBSD/arm native configuration.
1724 * configure.host: Add arm*-*-freebsd*.
1725 * configure.nat: Likewise.
1726 * arm-fbsd-nat.c: New file.
1727
7176dfd2
JB
17282017-10-11 John Baldwin <jhb@FreeBSD.org>
1729
1730 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1731 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1732 * NEWS: Mention new FreeBSD/arm target.
1733 * configure.tgt: Add arm*-*-freebsd*.
1734 * arm-fbsd-tdep.c: New file.
1735 * arm-fbsd-tdep.h: New file.
1736
fe220226
MR
17372017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1738
1739 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1740 `gdbarch_elfcore_write_linux_prpsinfo'.
1741 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1742 method.
1743 (elf_internal_linux_prpsinfo): Remove declaration.
1744 * gdbarch.h: Regenerate.
1745 * gdbarch.c: Regenerate.
1746
a2f63b2e
MR
17472017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1748
1749 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1750 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1751
458ca1d0
PA
17522017-10-11 Pedro Alves <palves@redhat.com>
1753
1754 * breakpoint.c (reattach_breakpoints): Delete.
1755 * breakpoint.h (reattach_breakpoints): Delete.
1756
905014d7
SM
17572017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1758
1759 * symfile.c (registered_sym_fns): Make struct, not typedef.
1760 (DEF_VEC_O (registered_sym_fns)): Remove.
1761 (symtab_fns): Change type to std::vector.
1762 (add_symtab_fns): Adjust.
1763 (find_sym_fns): Adjust.
1764
56d704da
AK
17652017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1766
1767 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1768 * arc-tdep.h (arc_arch_is_em): New function.
1769 (arc_arch_is_hs): Likewise.
1770
7fa29be9
EB
17712017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1772
1773 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1774 parentheses in the declaration.
1775 (macro_lookup_inclusion): Likewise.
1776 (macro_lookup_definition): Likewise.
1777 * p-lang.h (pascal_builtin_types): Likewise.
1778 * tui/tui-data.c (tui_win_list): Likewise.
1779 * tui/tui-data.h (tui_win_list): Likewise.
1780 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1781
d9b477e3
KB
17822017-10-11 Mark Rages <markrages@gmail.com>
1783
1784 * target-memory.c (block_boundaries): Fix for block address not
1785 aligned on block size.
1786
65630365
PA
17872017-10-10 Pedro Alves <palves@redhat.com>
1788 Tom Tromey <tom@tromey.com>
1789
1790 * breakpoint.c (struct captured_breakpoint_query_args)
1791 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1792 (print_breakpoint): New.
1793 * breakpoint.h (print_breakpoint): Declare.
1794 * common/common-exceptions.h (enum return_reason): Remove
1795 references to catch_exceptions.
1796 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1797 Delete.
1798 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1799 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1800 * gdb.h: Delete.
1801 * gdbthread.h (thread_select): Declare.
1802 * mi/mi-cmd-break.c: Don't include gdb.h.
1803 (breakpoint_notify): Use print_breakpoint.
1804 * mi/mi-cmd-catch.c: Don't include gdb.h.
1805 * mi/mi-interp.c: Don't include gdb.h.
1806 (mi_print_breakpoint_for_event): New.
1807 (mi_breakpoint_created, mi_breakpoint_modified): Use
1808 mi_print_breakpoint_for_event.
1809 * mi/mi-main.c: Don't include gdb.h.
1810 (mi_cmd_thread_select): Parse the global thread ID here. Use
1811 thread_select instead of gdb_thread_select.
1812 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1813 of using gdb_list_thread_ids.
1814 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1815 FILEIO_ENOSYS here.
1816 (remote_fileio_request): Use TRY/CATCH instead of
1817 catch_exceptions.
1818 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1819 (symbol_file_add_from_memory_wrapper): Delete.
1820 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1821 * thread.c: Don't include gdb.h.
1822 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1823 (thread_alive): Use thread_select.
1824 (do_captured_thread_select): Delete, parts salvaged as ...
1825 (thread_select): ... this new function.
1826 (gdb_thread_select): Delete.
1827
bf469271
PA
18282017-10-10 Pedro Alves <palves@redhat.com>
1829 Tom Tromey <tom@tromey.com>
1830
1831 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1832 and reverse logic.
1833 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1834 No longer macros. Instead ...
1835 (enum wp_check_result): They're now values of this new
1836 enumeration.
1837 (watchpoint_check): Change return type to wp_check_result and
1838 parameter type to bpstat.
1839 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1840 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1841 catch_errors. Reverse logic of watchpoint_check call.
1842 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1843 pointer as parameter.
1844 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1845 * common/common-exceptions.c (throw_exception_sjlj): Update
1846 comments to avoid mentioning catch_errors.
1847 * exceptions.c (catch_errors): Delete.
1848 * exceptions.h: Update comments to avoid mentioning catch_errors.
1849 (catch_errors_ftype, catch_errors): Delete.
1850 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1851 (hook_stop_stub): Delete.
1852 (restore_selected_frame): Change return type to void, and
1853 parameter type to const frame_id &.
1854 (restore_infcall_control_state): Use TRY/CATCH instead of
1855 catch_errors.
1856 * main.c (captured_command_loop): Return void and remove
1857 parameter. Remove references to catch_errors.
1858 (captured_main): Use TRY/CATCH instead of catch_errors.
1859 * objc-lang.c (objc_submethod_helper_data)
1860 (find_objc_msgcall_submethod_helper): Delete.
1861 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1862 catch_errors.
1863 * record-full.c (record_full_message): Return void.
1864 (record_full_message_args, record_full_message_wrapper): Delete.
1865 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1866 instead of catch_errors.
1867 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1868 parameter type to int.
1869 * solib-darwin.c (open_symbol_file_object): Ditto.
1870 * solib-dsbt.c (open_symbol_file_object): Ditto.
1871 * solib-frv.c (open_symbol_file_object): Ditto.
1872 * solib-svr4.c (open_symbol_file_object): Ditto.
1873 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1874 * solib.c (update_solib_list): Use TRY/CATCH instead of
1875 catch_errors.
1876 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1877 Change type.
1878 * symmisc.c (struct print_symbol_args): Remove.
1879 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1880 (print_symbol): Change type.
1881 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1882 and remove parameters.
1883 (catch_errors): New.
1884 (get_windows_debug_event): Adjust.
1885
1a56bfa5
TT
18862017-10-09 Tom Tromey <tom@tromey.com>
1887
1888 * mi/mi-main.c (free_splay_tree): Remove.
1889 (list_available_thread_groups): Use splay_tree_up.
1890 * common/gdb_splay_tree.h: New file.
1891
0c478e2d
TT
18922017-10-09 Tom Tromey <tom@tromey.com>
1893
1894 * mi/mi-main.c (do_nothing): Remove.
1895 (list_available_thread_groups): Update.
1896
cbd2b4e3
PA
18972017-10-09 Pedro Alves <palves@redhat.com>
1898
1899 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1900 reading registers when switching context.
1901
a181c0bf
JB
19022017-10-09 John Baldwin <jhb@FreeBSD.org>
1903
1904 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1905 (fbsd_convert_siginfo): Likewise.
1906 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1907
6e66f753
SM
19082017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1909
1910 * configure.ac (try_guile_versions): Remove guile-2.2.
1911 * configure: Regenerate.
1912
890e9790
TT
19132017-10-09 Tom Tromey <tom@tromey.com>
1914
1915 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1916 (COMPILE.pre): Use $(CXX).
1917
109483d9
PA
19182017-10-09 Pedro Alves <palves@redhat.com>
1919
1920 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1921 Use bool.
1922 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1923 * cp-support.h (cp_remove_params): Now returns a
1924 gdb::unique_xmalloc_ptr.
1925 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1926 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1927 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1928 returning a gdb::unique_xmalloc_ptr.
1929 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1930 * stack.c (find_frame_funname): Adjust to cp_remove_params
1931 returning a gdb::unique_xmalloc_ptr.
1932
791afaa2
TT
19332017-10-08 Tom Tromey <tom@tromey.com>
1934
1935 * dwarf2read.c (dwarf2_get_dwz_file): Use
1936 gdb::unique_xmalloc_ptr.
1937 (find_slot_in_mapped_hash): Likewise.
1938 (dwarf2_physname): Likewise.
1939 (create_dwo_unit_in_dwp_v1): Use std::string.
1940 (create_dwo_unit_in_dwp_v2): Likewise.
1941 (lookup_dwo_cutu): Likewise.
1942 (inherit_abstract_dies): Use std::vector.
1943 (read_array_type): Likewise.
1944 (dwarf_decode_macros): Remove unused declaration.
1945 (unsigned_int_compar): Remove.
1946 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1947 (psymtabs_addrmap_cleanup): Remove.
1948
30a9c02f
TT
19492017-10-08 Tom Tromey <tom@tromey.com>
1950
1951 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1952 * frame.h (frame_cleanup_after_sniffer): Declare.
1953 (frame_prepare_for_sniffer): Return void.
1954 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1955 type of argument.
1956 (frame_prepare_for_sniffer): Return void.
1957
757325a3
TT
19582017-10-08 Tom Tromey <tom@tromey.com>
1959
1960 * utils.h (make_cleanup_value_free): Remove.
1961 * utils.c (do_value_free, struct cleanup): Remove.
1962 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1963 Use gdb_value_up.
1964 * value.h (struct value_deleter): New.
1965 (gdb_value_up): New typedef.
1966
b9c04fb2
TT
19672017-10-08 Tom Tromey <tom@tromey.com>
1968
1969 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1970 (make_cleanup_free_search_symbols): Remove.
1971 (search_symbols): Return std::vector.
1972 (symbol_search::compare_search_syms): Now member of
1973 symbol_search. Change arguments.
1974 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1975 (symtab_symbol_info, rbreak_command): Update.
1976 * symtab.h (struct symbol_search) <next>: Remove.
1977 Add constructors.
1978 (symbol_search::operator<): New function.
1979 (symbol_search::operator==): New function.
1980 (search_symbols): Remove std::vector.
1981 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
1982 (symbol_search::compare_search_syms): Declare.
1983
0d28b0a5
YQ
19842017-10-06 Yao Qi <yao.qi@linaro.org>
1985
1986 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
1987 arch/aarch64-insn.o.
1988 Remove one rule.
1989 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
1990
71917808
YQ
19912017-10-06 Yao Qi <yao.qi@linaro.org>
1992
1993 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
1994 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
1995 arch/arm-linux.o respectively.
1996 * configure.tgt: Likewise.
1997
2081b2b2
YQ
19982017-10-06 Yao Qi <yao.qi@linaro.org>
1999
2000 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2001 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2002
a1b85d28
PA
20032017-10-06 Pedro Alves <palves@redhat.com>
2004
2005 * windows-nat.c: Include <algorithm>.
2006
d97987e2
YQ
20072017-10-06 Yao Qi <yao.qi@linaro.org>
2008
2009 * configure.tgt (i386_tobjs): New variable.
2010 (amd64_tobjs): New variable.
2011 Set $cpu_obs and $os_obs.
2012
f38307f5
YQ
20132017-10-06 Yao Qi <yao.qi@linaro.org>
2014
2015 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2016 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2017 (clean): Remove object files and dependency files.
2018 (distclean): Remove the directory.
2019 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2020 * configure: Re-generated.
2021 * configure.tgt: Replace amd64.o with arch/amd64.o.
2022
2f924de6
JM
20232017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2024
2025 PR build/22188
2026 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2027 and SETEND.
2028
2fd9d7ca
PA
20292017-10-05 Pedro Alves <palves@redhat.com>
2030
2031 * linux-nat.c (linux_child_follow_fork): When following the parent
2032 and detaching the child, consult the parent thread's architecture
2033 instead of the child's.
2034
d13b8493
UW
20352017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2036
2037 * ax.h: Do not include "doublest.h".
2038 (union agent_val): Remove.
2039
3b4b2f16
UW
20402017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2041
2042 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2043 (decimal_to_string): Return std::string object.
2044 (decimal_from_string): Accept std::string object. Return bool.
2045 (decimal_from_integral, decimal_from_doublest): Remove.
2046 (decimal_from_longest): Add prototype.
2047 (decimal_from_ulongest): Likewise.
2048 (decimal_to_longest): Likewise.
2049 (decimal_from_doublest): Likewise.
2050 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2051 (MAX_DECIMAL_STRING): Move here.
2052 (decimal_to_string): Return std::string object.
2053 (decimal_from_string): Accept std::string object. Return bool.
2054 (decimal_from_integral): Remove, replace by ...
2055 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2056 (decimal_to_longest): New function.
2057 (decimal_from_floating): Remove, replace by ...
2058 (decimal_from_doublest): ... this new function.
2059 (decimal_to_doublest): Update to new decimal_to_string interface.
2060
2061 * value.c (unpack_long): Use decimal_to_longest.
2062 * valops.c (value_cast): Use decimal_from_doublest instead of
2063 decimal_from_floating. Use decimal_from_[u]longest isntead of
2064 decimal_from_integral.
2065 * valarith.c (value_args_as_decimal): Likewise.
2066 * valprint.c (print_decimal_floating): Update to new
2067 decimal_to_string interface.
2068 * printcmd.c (printf_decfloat): Likewise.
2069 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2070
1841ee5d
UW
20712017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2072
2073 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2074 * gdbtypes.c: Include "floatformat.h".
2075 * value.c: Likewise.
2076 * m68k-tdep.c: Likewise.
2077
2078 * findvar.c: Do not include "floatformat.h".
2079 * amd64-darwin-tdep.c: Likewise.
2080 * arm-linux-tdep.c: Likewise.
2081 * i386-darwin-tdep.c: Likewise.
2082 * i387-tdep.c: Likewise.
2083 * m68k-linux-tdep.c: Likewise.
2084 * mep-tdep.c: Likewise.
2085 * mips-tdep.c: Likewise.
2086 * nios2-tdep.c: Likewise.
2087 * s390-linux-tdep.c: Likewise.
2088 * sparc-obsd-tdep.c: Likewise.
2089 * sparc-tdep.c: Likewise.
2090 * sparc64-tdep.c: Likewise.
2091 * spu-tdep.c: Likewise.
2092 * tic6x-tdep.c: Likewise.
2093 * tilegx-tdep.c: Likewise.
2094 * vax-tdep.c: Likewise.
2095 * xstormy16-tdep.c: Likewise.
2096 * xtensa-tdep.c: Likewise.
2097
2098 * top.c: Do not include "doublest.h".
2099 * aarch64-tdep.c: Likewise.
2100 * alpha-tdep.c: Likewise.
2101 * arm-linux-tdep.c: Likewise.
2102 * m68k-linux-tdep.c: Likewise.
2103 * tilegx-tdep.c: Likewise.
2104 * xstormy16-tdep.c: Likewise.
2105
a80a6471
JB
21062017-10-05 John Baldwin <jhb@FreeBSD.org>
2107
2108 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2109 (mipsn32_fbsd_sigframe): Define.
2110 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2111 for FreeBSD/mipsn32.
2112
12c4bd7f
JB
21132017-10-05 John Baldwin <jhb@FreeBSD.org>
2114
2115 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2116 AT_HWCAP.
2117
c91933e9
TG
21182017-10-05 Tristan Gingold <tgingold@free.fr>
2119
2120 * MAINTAINERS (Misc): Update my email address.
2121
5cd63fda
PA
21222017-10-04 Pedro Alves <palves@redhat.com>
2123
2124 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2125 it instead of target_gdbarch.
2126 (get_remote_state, get_remote_packet_size): Adjust
2127 get_remote_arch_state calls, passing down target_gdbarch
2128 explicitly.
2129 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2130 'gdbarch' and use it instead of target_gdbarch.
2131 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2132 passing down target_gdbarch explicitly.
2133 (struct stop_reply) <arch>: New field.
2134 (remote_parse_stop_reply): Use the stopped thread's architecture,
2135 not the current inferior's. Save the architecture in the
2136 stop_reply.
2137 (process_stop_reply): Use the stop reply's architecture.
2138 (process_g_packet, remote_fetch_registers)
2139 (remote_prepare_to_store, store_registers_using_G)
2140 (remote_store_registers): Adjust get_remote_arch_state calls,
2141 using the regcache's architecture.
2142 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2143 passing down target_gdbarch explicitly.
2144 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2145 beneath instead of calling target_gdbarch.
2146 * target.c (default_thread_architecture): Use the specified
2147 inferior's architecture, instead of the current inferior's
2148 architecture (via target_gdbarch).
2149
ed4227b7
PA
21502017-10-04 Pedro Alves <palves@redhat.com>
2151
2152 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2153 case.
2154 (regcache_print): Handle !target_has_registers here instead.
2155
55b11ddf
PA
21562017-10-04 Pedro Alves <palves@redhat.com>
2157
2158 * frame.c (create_test_frame): Delete.
2159 * frame.h (create_test_frame): Delete.
2160 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2161 (class regcache_test): Delete.
2162 (test_target_has_registers, test_target_has_stack)
2163 (test_target_has_memory, test_target_prepare_to_store)
2164 (test_target_store_registers): New functions.
2165 (test_target_ops): New class.
2166 (register_to_value_test): Error out if there's already a
2167 process_stratum (or higher) target pushed. Create a fuller mock
2168 environment, with mock target_ops, inferior, address space, thread
2169 and inferior_ptid.
2170 * progspace.c (struct address_space): Move to ...
2171 * progspace.h (struct address_space): ... here.
2172 * regcache.h (regcache::~regcache, regcache::raw_write)
2173 [GDB_SELF_TEST]: No longer virtual.
2174
4c71c105
SM
21752017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2176
2177 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2178
73dcd72d
PA
21792017-10-04 Pedro Alves <palves@redhat.com>
2180
2181 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2182 out of 'between TRY and CATCH'.
2183
44704526
PA
21842017-10-04 Pedro Alves <palves@redhat.com>
2185
2186 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2187 * common/common-exceptions.h (TRY): Open an outermost scope.
2188 Expand intro comment.
2189 (CATCH): Reindent.
2190 (END_CATCH): Close the outermost scope.
2191 * completer.c (complete_line_internal): Add missing END_CATCH.
2192
bc3b087d
SDJ
21932017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2194
2195 * NEWS (Changes since GDB 8.0): Add entry about new
2196 'set-cwd-on-gdbserver' feature.
2197 (New remote packets): Add entry for QSetWorkingDir.
2198 * common/common-inferior.h (set_inferior_cwd): New prototype.
2199 * infcmd.c (set_inferior_cwd): Remove "static".
2200 (show_cwd_command): Expand text to include remote debugging.
2201 * remote.c: Add PACKET_QSetWorkingDir.
2202 (remote_protocol_features) <QSetWorkingDir>: New entry for
2203 PACKET_QSetWorkingDir.
2204 (extended_remote_set_inferior_cwd): New function.
2205 (extended_remote_create_inferior): Call
2206 "extended_remote_set_inferior_cwd".
2207 (_initialize_remote): Call "add_packet_config_cmd" for
2208 QSetWorkingDir.
2209
d092c5a2
SDJ
22102017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2211
2212 * NEWS (New commands): Mention "set/show cwd".
2213 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2214 "cd" command's help text.
2215 * common/common-inferior.h (get_inferior_cwd): New prototype.
2216 * infcmd.c (inferior_cwd_scratch): New global variable.
2217 (set_inferior_cwd): New function.
2218 (get_inferior_cwd): Likewise.
2219 (set_cwd_command): Likewise.
2220 (show_cwd_command): Likewise.
2221 (_initialize_infcmd): Add "set/show cwd" commands.
2222 * inferior.h (class inferior) <cwd>: New field.
2223 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2224 (fork_inferior): Change inferior's cwd before its execution.
2225 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2226 to CreateProcess.
2227
7da0a886
SDJ
22282017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2229
2230 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2231 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2232 (COMMON_OBS): Add gdb_tilde_expand.o.
2233 * common/gdb_tilde_expand.c: New file.
2234 * common/gdb_tilde_expand.h: Likewise.
2235
db8dd160
MR
22362017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2237
2238 * gdbarch.sh (objfile): Remove duplicate declaration.
2239 * gdbarch.h: Regenerate.
2240
f8bfbf22
TT
22412017-10-03 Tom Tromey <tom@tromey.com>
2242
2243 * utils.c (internal_vproblem): Use string_vprintf.
2244
5178ed48
TT
22452017-10-03 Tom Tromey <tom@tromey.com>
2246
2247 * printcmd.c (info_symbol_command): Use std::string.
2248
8cff8730
TT
22492017-10-03 Tom Tromey <tom@tromey.com>
2250
2251 * top.c (gdb_safe_append_history): Use std::string.
2252
895b8f30
TT
22532017-10-03 Tom Tromey <tom@tromey.com>
2254
2255 * event-top.c (stdin_event_handler): Update.
2256 * main.c (captured_main_1): Update.
2257 * top.h (make_delete_ui_cleanup): Remove.
2258 (struct ui): Add constructor and destructor.
2259 (new_ui, delete_ui): Remove.
2260 * top.c (make_delete_ui_cleanup): Remove.
2261 (new_ui_command): Use std::unique_ptr.
2262 (delete_ui_cleanup): Remove.
2263 (ui::ui): Rename from new_ui. Update.
2264 (free_ui): Remove.
2265 (ui::~ui): Rename from delete_ui. Update.
2266
0efef640
TT
22672017-10-03 Tom Tromey <tom@tromey.com>
2268
2269 * symfile.c (load_progress): Use gdb::byte_vector.
2270
245ad7d3
TT
22712017-10-03 Tom Tromey <tom@tromey.com>
2272
2273 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2274 declaration.
2275 * printcmd.c (x_command): Remove unused declaration.
2276 * symfile.c (symbol_file_command): Remove unused declaration.
2277
e05550d7
TT
22782017-10-03 Tom Tromey <tom@tromey.com>
2279
2280 * utils.c (internal_vproblem): Use std::string.
2281 (defaulted_query): Likewise.
2282
b95de2b7
TT
22832017-10-03 Tom Tromey <tom@tromey.com>
2284
2285 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2286 * top.c (execute_command_to_string): Update.
2287 * utils.c (make_cleanup_restore_page_info): Remove.
2288 (do_restore_page_info_cleanup): Remove.
2289 (set_batch_flag_and_restore_page_info):
2290 New.
2291 (make_cleanup_restore_page_info): Remove.
2292 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2293 (~set_batch_flag_and_restore_page_info): New
2294 (make_cleanup_restore_uinteger): Remove.
2295 (make_cleanup_restore_integer): Remove.
2296 (struct restore_integer_closure): Remove.
2297 (restore_integer): Remove.
2298 * utils.h (struct set_batch_flag_and_restore_page_info): New
2299 class.
2300 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2301 (make_cleanup_restore_page_info): Remove.
2302 (make_cleanup_restore_uinteger) Remove.
2303 (make_cleanup_restore_integer) Remove.
2304
07036511
TT
23052017-10-03 Tom Tromey <tom@tromey.com>
2306
2307 * record-full.h (record_full_gdb_operation_disable_set): Return
2308 scoped_restore_tmpl<int>.
2309 * infrun.c (adjust_pc_after_break): Update.
2310 (handle_signal_stop): Update.
2311 * record-full.c (record_full_gdb_operation_disable_set): Return
2312 scoped_restore_tmpl<int>.
2313 (record_full_wait_1, record_full_insert_breakpoint)
2314 (record_full_remove_breakpoint, record_full_save)
2315 (record_full_goto_insn): Update.
2316
45320ffa
TT
23172017-10-02 Tom Tromey <tom@tromey.com>
2318
2319 PR rust/22236:
2320 * rust-lang.c (rust_val_print_str): New function.
2321 (val_print_struct): Call it.
2322 (rust_subscript): Preserve name of slice type.
2323
b3e3859b
TT
23242017-10-02 Tom Tromey <tom@tromey.com>
2325
2326 * rust-lang.c (rust_subscript): Handle slices in
2327 EVAL_AVOID_SIDE_EFFECTS case.
2328
01af5e0d
TT
23292017-10-02 Tom Tromey <tom@tromey.com>
2330
2331 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2332
888e3ddb
TT
23332017-10-02 Tom Tromey <tom@tromey.com>
2334
2335 * rust-lang.h (rust_slice_type): Add "extern".
2336
cc536b21
PA
23372017-10-02 Tom Tromey <tom@tromey.com>
2338 Pedro Alves <palves@redhat.com>
2339
2340 * ada-lang.h (ada_exc_info::operator<): Make const.
2341 (ada_exc_info::operator==): Make const.
2342 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2343 Make const.
2344
386c8614
TT
23452017-09-29 Tom Tromey <tom@tromey.com>
2346
2347 * target.c (read_whatever_is_readable): Change type of "result".
2348 Update.
2349 (free_memory_read_result_vector): Remove.
2350 (read_memory_robust): Change return type. Update.
2351 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2352 bin2hex, std::string.
2353 * target.h (memory_read_result_s): Remove typedef.
2354 (free_memory_read_result_vector): Remove.
2355 (read_memory_robust): Return std::vector.
2356
789c4b5e
TT
23572017-09-29 Tom Tromey <tom@tromey.com>
2358
2359 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2360
ab816a27
TT
23612017-09-29 Tom Tromey <tom@tromey.com>
2362
2363 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2364 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2365 operator< and operator==.
2366 (ada_exceptions_list): Return a std::vector.
2367 * ada-lang.c (ada_exc_info::operator<): Rename from
2368 compare_ada_exception_info.
2369 (ada_exc_info::operator==): New.
2370 (sort_remove_dups_ada_exceptions_list): Change type of
2371 "exceptions".
2372 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2373 (ada_add_global_exceptions): Likewise.
2374 (ada_exceptions_list_1): Return a std::vector.
2375 (ada_exceptions_list): Likewise.
2376
52f9abe4
TT
23772017-09-29 Tom Tromey <tom@tromey.com>
2378
2379 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2380 'std::set *'.
2381 (print_one_inferior): Update.
2382 (free_vector_of_ints): Remove.
2383 (list_available_thread_groups): Change "ids" to std::set.
2384 (mi_cmd_list_thread_groups): Update.
2385 (struct collect_cores_data) <core>: Now a std::set.
2386 (collect_cores): Update.
2387 (unique): Remove.
2388 (print_one_inferior): Update.
2389
dcd5ddcc
TT
23902017-09-29 Tom Tromey <tom@tromey.com>
2391
2392 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2393 (mi_execute_async_cli_command): Likewise.
2394 (mi_cmd_trace_frame_collected): Use field_fmt.
2395
45d288cc
TT
23962017-09-29 Tom Tromey <tom@tromey.com>
2397
2398 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2399 gdb::byte_vector.
2400
6afe2f4a
TT
24012017-09-29 Tom Tromey <tom@tromey.com>
2402
2403 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2404
9813429a
TT
24052017-09-29 Tom Tromey <tom@tromey.com>
2406
2407 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2408
2d6960b4
TT
24092017-09-29 Tom Tromey <tom@tromey.com>
2410
2411 * varobj.h (varobj_gen_name): Return std::string.
2412 * varobj.c (varobj_gen_name): Return std::string.
2413 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2414 (mi_cmd_var_delete): Don't copy "name".
2415
784c453a
TT
24162017-09-29 Tom Tromey <tom@tromey.com>
2417
2418 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2419 (mi_cmd_break_insert_1): Update.
2420
a9bc57b9
TT
24212017-09-29 Tom Tromey <tom@tromey.com>
2422
2423 * target.h (make_scoped_defer_target_commit_resume): Update.
2424 * target.c (make_scoped_defer_target_commit_resume): Rename from
2425 make_cleanup_defer_target_commit_resume. Return a
2426 scoped_restore.
2427 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2428
9754d8c4
TT
24292017-09-29 Tom Tromey <tom@tromey.com>
2430
2431 * main.c (captured_main_1): Remove unused declaration.
2432 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2433
99ef965c
TT
24342017-09-29 Tom Tromey <tom@tromey.com>
2435
2436 * symtab.c (search_symbols): Remove unused outer cleanup.
2437 (make_source_files_completion_list): Remove unused declaration.
2438
42518ba7
TT
24392017-09-29 Tom Tromey <tom@tromey.com>
2440
2441 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2442
726b2169
TT
24432017-09-29 Tom Tromey <tom@tromey.com>
2444
2445 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2446 gdb::byte_vector.
2447
55b06432
TT
24482017-09-29 Tom Tromey <tom@tromey.com>
2449
2450 * complaints.c (vcomplaint): Use std::string.
2451
8abcee91
TT
24522017-09-29 Tom Tromey <tom@tromey.com>
2453
2454 * tracepoint.c (trace_variable_command): Use std::string.
2455 (encode_actions_1): Remove unused declarations.
2456 (create_tsv_from_upload): Use std::string.
2457
6ad94bc7
TT
24582017-09-29 Tom Tromey <tom@tromey.com>
2459
2460 * cp-support.c (gdb_demangle): Use std::string.
2461
2003f3d8
TT
24622017-09-29 Tom Tromey <tom@tromey.com>
2463
2464 * stack.c (parse_frame_specification): Use std::string
2465 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2466
8f8accb5
TT
24672017-09-29 Tom Tromey <tom@tromey.com>
2468
2469 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2470
200aa7b1
TT
24712017-09-29 Tom Tromey <tom@tromey.com>
2472
2473 * utils.c (vfprintf_maybe_filtered): Use std::string.
2474 (vfprintf_unfiltered): Likewise.
2475
606aae8a
TT
24762017-09-29 Tom Tromey <tom@tromey.com>
2477
2478 * event-top.c (top_level_prompt): Return std::string.
2479 (display_gdb_prompt): Update.
2480
bd413795
TT
24812017-09-29 Tom Tromey <tom@tromey.com>
2482
2483 * unittests/common-utils-selftests.c (format): New function.
2484 (string_vprintf_tests): New function.
2485 (_initialize_common_utils_selftests): Register new tests.
2486 * common/common-utils.c (string_vprintf): New function.
2487 * common/common-utils.h (string_vprintf): Declare.
2488
256642e8
PA
24892017-09-29 Pedro Alves <palves@redhat.com>
2490
2491 * common/rsp-low.c (unpack_varlen_hex): Constify.
2492 * common/rsp-low.h (unpack_varlen_hex): Constify.
2493 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2494 Constify.
2495 * remote.c (remote_set_permissions, read_ptid)
2496 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2497 (remote_static_tracepoint_marker_at)
2498 (remote_static_tracepoint_markers_by_strid)
2499 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2500 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2501 (parse_tracepoint_definition, parse_tsv_definition)
2502 (parse_static_tracepoint_marker_definition): Constify.
2503 * tracepoint.h (parse_static_tracepoint_marker_definition)
2504 (parse_trace_status, parse_tracepoint_status)
2505 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2506
b6bb3468
PA
25072017-09-29 Pedro Alves <palves@redhat.com>
2508
2509 * remote.c (target_buf, target_buf_size): Delete.
2510 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2511 Use the connection's packet buffer instead.
2512 All callers adjusted.
2513 (_initialize_remote): Remove references to target_buf and
2514 target_buf_size.
2515
b2f8eb7a
PA
25162017-09-28 Pedro Alves <palves@redhat.com>
2517
2518 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2519 unittests/common-utils-selftests.c.
2520 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2521 (COMMON_OBS): Remove utils-selftests.o.
2522 * utils-selftests.c: Move to ...
2523 * unittests/common-utils-selftests.c: ... here and rename self
2524 test to "string_printf".
2525
08302ed2
DE
25262017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2527
2528 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2529 having NULL cus or tus.
2530
96a5a1d3
UW
25312017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2532
2533 * arm-tdep.c: (convert_from_extended): Remove.
2534 (convert_to_extended): Likewise.
2535 (arm_extract_return_value): Use convert_typed_floating.
2536 (arm_store_return_value): Likewise.
2537
2538 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2539 * sh-tdep.c: Do not include "floatformat.h".
2540 (sh_littlebyte_bigword_type): New function.
2541 (sh_register_convert_to_virtual): Use convert_typed_floating.
2542 (sh_register_convert_to_raw): Likewise.
2543 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2544 (sh64_littlebyte_bigword_type): New function.
2545 (sh64_extract_return_value): Use convert_typed_floating.
2546 (sh64_register_convert_to_virtual): Likewise.
2547 (sh64_register_convert_to_raw): Likewise.
2548
0db7851f
UW
25492017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2550
2551 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2552 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2553
2554 * gdbtypes.h (union type_specific): Make field floatformat hold
2555 just a single struct floatformat, not an array.
2556 (floatformat_from_type): Move here.
2557 * gdbtypes.c (floatformat_from_type): Move here. Update to
2558 changed TYPE_FLOATFORMAT definition.
2559 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2560 (recursive_dump_type): Likewise.
2561 (init_float_type): Install correct floatformat for byte order.
2562 (arch_float_type): Likewise.
2563
77b7c781
UW
25642017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2565
2566 * gdbtypes.c (init_type): Change incoming argument from
2567 length-in-bytes to length-in-bits. Assert length is a
2568 multiple of TARGET_CHAR_BITS.
2569 (arch_type, arch_flags_type): Likewise.
2570 (init_integer_type): Update call to init_type.
2571 (init_character_type): Likewise.
2572 (init_boolean_type): Likewise.
2573 (init_float_type): Likewise.
2574 (init_decfloat_type): Likewise.
2575 (init_complex_type): Likewise.
2576 (init_pointer_type): Likewise.
2577 (objfile_type): Likewise.
2578 (arch_integer_type): Update call to arch_type.
2579 (arch_character_type): Likewise.
2580 (arch_boolean_type): Likewise.
2581 (arch_float_type): Likewise.
2582 (arch_decfloat_type): Likewise.
2583 (arch_complex_type): Likewise.
2584 (arch_pointer_type): Likewise.
2585 (gdbtypes_post_init): Likewise.
2586
2587 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2588 (read_base_type): Likewise.
2589 * mdebugread.c (basic_type): Likewise.
2590 * stabsread.c (dbx_init_float_type): Likewise.
2591 (rs6000_builtin_type): Likewise.
2592 (read_range_type): Likewise. Also, fix call to init_integer_type
2593 with erroneous length argument.
2594
2595 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2596 * d-lang.c (build_d_types): Likewise.
2597 * f-lang.c (build_fortran_types): Likewise.
2598 * go-lang.c (build_go_types): Likewise.
2599 * opencl-lang.c (build_opencl_types): Likewise.
2600 * jit.c (finalize_symtab): Likewise.
2601 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2602 (build_std_type_info_type): Likewise.
2603 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2604 update call to arch_flags_type.
2605
2606 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2607 arch_type.
2608 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2609 * windows-tdep.c (windows_get_tlb_type): Likewise.
2610
2611 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2612 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2613 * m32c-tdep.c (make_types): Likewise.
2614 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2615 (rl78_psw_type): Update call to arch_flags_type.
2616 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2617 * rx-tdep.c (rx_psw_type): Likewise.
2618 (rx_fpsw_type): Likewise.
2619 * sparc-tdep.c (sparc_psr_type): Likewise.
2620 (sparc_fsr_type): Likewise.
2621 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2622 (sparc64_ccr_type): Likewise.
2623 (sparc64_fsr_type): Likewise.
2624 (sparc64_fprs_type): Likewise.
2625
f21b4d5c
TT
26262017-09-27 Tom Tromey <tom@tromey.com>
2627
2628 * findcmd.c (find_command): Constify.
2629
643c2ffa
TT
26302017-09-27 Tom Tromey <tom@tromey.com>
2631
2632 * ada-tasks.c (task_command_1, task_command): Constify.
2633
510e5e56
TT
26342017-09-27 Tom Tromey <tom@tromey.com>
2635
2636 * symtab.c (maintenance_print_symbol_cache)
2637 (maintenance_flush_symbol_cache)
2638 (maintenance_print_symbol_cache_statistics): Constify.
2639
e503b191
TT
26402017-09-27 Tom Tromey <tom@tromey.com>
2641
2642 * inferior.c (detach_inferior_command, kill_inferior_command)
2643 (inferior_command): Constify.
2644
4e001312
TT
26452017-09-27 Tom Tromey <tom@tromey.com>
2646
2647 * regcache.c (regcache_print, maintenance_print_registers)
2648 (maintenance_print_raw_registers)
2649 (maintenance_print_cooked_registers)
2650 (maintenance_print_register_groups)
2651 (maintenance_print_remote_registers): Constify.
2652
77763700
TT
26532017-09-27 Tom Tromey <tom@tromey.com>
2654
2655 * printcmd.c (map_display_numbers, undisplay_command)
2656 (enable_disable_display_command, enable_display_command)
2657 (disable_display_command): Constify.
2658
4495129a
TT
26592017-09-27 Tom Tromey <tom@tromey.com>
2660
2661 * breakpoint.h (delete_command): Don't declare.
2662 * breakpoint.c (delete_command, enable_once_command)
2663 (enable_count_command, enable_delete_command, breakpoint_1)
2664 (maintenance_info_breakpoints, stopin_command, stopat_command)
2665 (delete_command, delete_trace_command, save_breakpoints)
2666 (save_breakpoints_command, save_tracepoints_command): Constify.
2667
3088cf40
TT
26682017-09-27 Tom Tromey <tom@tromey.com>
2669
2670 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2671 (skip_ws, extract_identifier, macro_define_command)
2672 (macro_undef_command, macro_list_command): Constify.
2673
69f476a3
TT
26742017-09-27 Tom Tromey <tom@tromey.com>
2675
2676 * infcmd.c (environment_info, set_environment_command)
2677 (unset_environment_command, path_info, info_proc_cmd_1)
2678 (info_proc_cmd_mappings, info_proc_cmd_stat)
2679 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2680 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2681
c4a3e68e
TT
26822017-09-27 Tom Tromey <tom@tromey.com>
2683
2684 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2685 Constify.
2686
c9d31bd6
TT
26872017-09-27 Tom Tromey <tom@tromey.com>
2688
2689 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2690
1f3f85eb
TT
26912017-09-27 Tom Tromey <tom@tromey.com>
2692
2693 * demangle.c (demangle_command): Constify.
2694
9c504b5d
TT
26952017-09-27 Tom Tromey <tom@tromey.com>
2696
2697 * progspace.c (maintenance_info_program_spaces_command):
2698 Constify.
2699
6663cf91
TT
27002017-09-27 Tom Tromey <tom@tromey.com>
2701
2702 * compile/compile.c (check_raw_argument, compile_file_command)
2703 (compile_code_command, compile_print_command): Constify.
2704
34e5fa26
TT
27052017-09-27 Tom Tromey <tom@tromey.com>
2706
2707 * reggroups.c (maintenance_print_reggroups): Constify.
2708
8384c356
TT
27092017-09-27 Tom Tromey <tom@tromey.com>
2710
2711 * dwarf2read.c (save_gdb_index_command): Constify.
2712
884beb0c
TT
27132017-09-27 Tom Tromey <tom@tromey.com>
2714
2715 * stap-probe.c (info_probes_stap_command): Constify.
2716
e0b2930c
TT
27172017-09-27 Tom Tromey <tom@tromey.com>
2718
2719 * fork-child.c (unset_exec_wrapper_command): Constify.
2720
f938677d
TT
27212017-09-27 Tom Tromey <tom@tromey.com>
2722
2723 * btrace.c (get_uint, get_context_size, no_chunk)
2724 (maint_btrace_packet_history_cmd)
2725 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2726 (maint_info_btrace_cmd): Constify.
2727
8949cb87
TT
27282017-09-27 Tom Tromey <tom@tromey.com>
2729
2730 * reverse.c (delete_bookmark_command): Constify.
2731
ac88e2de
TT
27322017-09-27 Tom Tromey <tom@tromey.com>
2733
2734 * remote.c (set_memory_packet_size)
2735 (set_memory_write_packet_size, show_memory_write_packet_size)
2736 (set_memory_read_packet_size, show_memory_read_packet_size)
2737 (compare_sections_command, packet_command, remote_put_command)
2738 (remote_get_command, remote_delete_command): Constify.
2739
bd4c9dfe
TT
27402017-09-27 Tom Tromey <tom@tromey.com>
2741
2742 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2743 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2744 (set_mipsfpu_auto_command): Constify.
2745
5e93d4c6
TT
27462017-09-27 Tom Tromey <tom@tromey.com>
2747
2748 * cli/cli-cmds.h (cd_command): Constify.
2749 * cli/cli-cmds.c (cd_command): Constify.
2750
fc41a75b
TT
27512017-09-27 Tom Tromey <tom@tromey.com>
2752
2753 * thread.c (thread_name_command, thread_find_command): Constify.
2754
67810076
TT
27552017-09-27 Tom Tromey <tom@tromey.com>
2756
2757 * probe.c (enable_probes_command, disable_probes_command):
2758 Constify.
2759
1d8b34a7
TT
27602017-09-27 Tom Tromey <tom@tromey.com>
2761
2762 * symfile.c (symbol_file_command): Constify.
2763 * gdbcore.h (deprecated_file_changed_hook): Constify.
2764 * exec.c (deprecated_file_changed_hook, exec_file_command)
2765 (file_command): Constify.
2766 * defs.h (symbol_file_command): Constify.
2767
442019e1
TT
27682017-09-27 Tom Tromey <tom@tromey.com>
2769
2770 * remote-fileio.c (set_system_call_allowed)
2771 (show_system_call_allowed): Constify.
2772
2983f7cb
TT
27732017-09-27 Tom Tromey <tom@tromey.com>
2774
2775 * tracepoint.c (delete_trace_variable_command)
2776 (tfind_end_command, tfind_start_command, tfind_pc_command)
2777 (tfind_tracepoint_command, tfind_line_command)
2778 (tfind_range_command, tfind_outside_command): Constify.
2779
4fd41b24
TT
27802017-09-27 Tom Tromey <tom@tromey.com>
2781
2782 * ax-gdb.c (maint_agent_printf_command, agent_command)
2783 (agent_eval_command): Constify.
2784
f2fc3015
TT
27852017-09-27 Tom Tromey <tom@tromey.com>
2786
2787 * tracepoint.c (info_scope_command): Constify.
2788 * python/python.c (gdbpy_decode_line): Constify.
2789 * python/py-breakpoint.c (bppy_init): Constify.
2790 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2791 * location.h: (new_linespec_location)
2792 (string_to_event_location_basic, string_to_event_location):
2793 Constify.
2794 * location.c (new_linespec_location)
2795 (string_to_event_location_basic, string_to_event_location):
2796 Constify.
2797 * linespec.h (decode_line_with_current_source)
2798 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2799 * linespec.c (linespec_lex_to_end)
2800 (decode_line_with_current_source)
2801 (decode_line_with_last_displayed): Constify.
2802 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2803 Constify.
2804 * cli/cli-cmds.c (edit_command, list_command): Constify.
2805 * breakpoint.h (until_break_command, watch_command_wrapper)
2806 (awatch_command_wrapper, rwatch_command_wrapper)
2807 (init_ada_exception_breakpoint): Constify.
2808 * breakpoint.c (break_command_1, dprintf_command)
2809 (break_range_command, watch_command_wrapper)
2810 (rwatch_command_wrapper, awatch_command_wrapper)
2811 (until_break_command, init_ada_exception_breakpoint)
2812 (strace_marker_create_sals_from_location, trace_command)
2813 (ftrace_command, strace_command, struct tracepoint): Constify.
2814 * ax-gdb.c (agent_command_1): Constify.
2815 * ada-lang.c (ada_exception_sal): Constify.
2816
8c2f95f4
TT
28172017-09-27 Tom Tromey <tom@tromey.com>
2818
2819 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2820 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2821 (get_context_size, no_chunk, get_insn_history_modifiers)
2822 (cmd_record_insn_history, get_call_history_modifiers)
2823 (cmd_record_call_history): Constify.
2824
a0d65762
TT
28252017-09-27 Tom Tromey <tom@tromey.com>
2826
2827 * source.c (show_substitute_path_command)
2828 (unset_substitute_path_command, set_substitute_path_command):
2829 Constify.
2830
58971144
TT
28312017-09-27 Tom Tromey <tom@tromey.com>
2832
2833 * typeprint.c (maintenance_print_type): Constify.
2834 * maint.c (maintenance_dump_me, maintenance_demangle)
2835 (maintenance_time_display, maintenance_info_sections)
2836 (maintenance_print_statistics, maintenance_deprecate)
2837 (maintenance_undeprecate): Constify.
2838 (maintenance_do_deprecate): Constify. Use std::string.
2839 (maintenance_selftest): Constify.
2840 * gdbtypes.h (maintenance_print_type): Constify.
2841
c482f52c
TT
28422017-09-27 Tom Tromey <tom@tromey.com>
2843
2844 * hppa-tdep.c (unwind_command): Constify.
2845
e100df1a
TT
28462017-09-27 Tom Tromey <tom@tromey.com>
2847
2848 * target-descriptions.c (unset_tdesc_filename_cmd)
2849 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2850 Constify.
2851
31d56ade
TT
28522017-09-27 Tom Tromey <tom@tromey.com>
2853
2854 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2855
b961da0b
TT
28562017-09-27 Tom Tromey <tom@tromey.com>
2857
2858 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2859
e2d8ae16
TT
28602017-09-27 Tom Tromey <tom@tromey.com>
2861
2862 * tui/tui-regs.c (tui_reg_command): Constify.
2863
863779b0
TT
28642017-09-27 Tom Tromey <tom@tromey.com>
2865
2866 * skip.c (skip_file_command, skip_function_command)
2867 (skip_enable_command, skip_disable_command, skip_delete_command):
2868 Constify.
2869
cdb34d4a
TT
28702017-09-27 Tom Tromey <tom@tromey.com>
2871
2872 * record-btrace.c (cmd_record_btrace_bts_start)
2873 (cmd_record_btrace_pt_start): Constify.
2874
e99c83e7
TT
28752017-09-27 Tom Tromey <tom@tromey.com>
2876
2877 * symmisc.c (maintenance_print_symbols)
2878 (maintenance_print_msymbols, maintenance_print_objfiles)
2879 (maintenance_info_symtabs, maintenance_check_symtabs)
2880 (maintenance_expand_symtabs, maintenance_info_line_tables):
2881 Constify.
2882
32faf971
TT
28832017-09-27 Tom Tromey <tom@tromey.com>
2884
2885 * top.c (new_ui_command): Constify.
2886
2cf311eb
TT
28872017-09-27 Tom Tromey <tom@tromey.com>
2888
2889 * symfile.c (add_symbol_file_command)
2890 (remove_symbol_file_command, list_overlays_command)
2891 (map_overlay_command, unmap_overlay_command)
2892 (overlay_auto_command, overlay_manual_command)
2893 (overlay_off_command, overlay_load_command): Constify.
2894
e6738699
TT
28952017-09-27 Tom Tromey <tom@tromey.com>
2896
2897 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2898 (info_spu_mailbox_command, info_spu_dma_command)
2899 (info_spu_proxydma_command): Constify.
2900
aa360cd5
TT
29012017-09-27 Tom Tromey <tom@tromey.com>
2902
2903 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2904
898241a5
TT
29052017-09-27 Tom Tromey <tom@tromey.com>
2906
2907 * cli/cli-script.c (user_defined_command): Constify.
2908
2d0ac106
TT
29092017-09-27 Tom Tromey <tom@tromey.com>
2910
2911 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2912 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2913 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2914 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2915 (dump_binary_value, append_binary_memory, append_binary_value):
2916 Constify.
2917 (struct dump_context) <func>: Constify.
2918 (add_dump_command): Update.
2919
dede02ce
TT
29202017-09-27 Tom Tromey <tom@tromey.com>
2921
2922 * cli/cli-cmds.c (show_version, show_configuration)
2923 (source_command, show_user): Constify.
2924
d3cb6b99
TT
29252017-09-27 Tom Tromey <tom@tromey.com>
2926
2927 * target.c (maintenance_print_target_stack): Constify.
2928
1970a12f
TT
29292017-09-27 Tom Tromey <tom@tromey.com>
2930
2931 * interps.c (interpreter_exec_cmd): Constify.
2932
41243651
TT
29332017-09-27 Tom Tromey <tom@tromey.com>
2934
2935 * record-full.c (cmd_record_full_restore): Constify.
2936
4465d9db
TT
29372017-09-27 Tom Tromey <tom@tromey.com>
2938
2939 * memattr.c (enable_mem_command, disable_mem_command)
2940 (delete_mem_command): Constify.
2941
ad25e423
TT
29422017-09-27 Tom Tromey <tom@tromey.com>
2943
2944 * value.c (show_convenience): Constify.
2945
d64097b1
TT
29462017-09-27 Tom Tromey <tom@tromey.com>
2947
2948 * gdbcore.h (core_file_command): Update.
2949 * corefile.c (core_file_command): Constify.
2950
4d4589ef
TT
29512017-09-27 Tom Tromey <tom@tromey.com>
2952
2953 * user-regs.c (maintenance_print_user_registers): Constify.
2954
32a7bf17
TT
29552017-09-27 Tom Tromey <tom@tromey.com>
2956
2957 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2958
4a475551
TT
29592017-09-27 Tom Tromey <tom@tromey.com>
2960
2961 * cp-support.c (first_component_command): Constify.
2962
990b9f9f
TT
29632017-09-27 Tom Tromey <tom@tromey.com>
2964
2965 * psymtab.c (maintenance_print_psymbols)
2966 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2967 Constify.
2968
c281872e
TT
29692017-09-27 Tom Tromey <tom@tromey.com>
2970
2971 * windows-tdep.c (display_tib): Constify.
2972
5b64bf74
TT
29732017-09-27 Tom Tromey <tom@tromey.com>
2974
2975 * linux-fork.c (delete_checkpoint_command)
2976 (detach_checkpoint_command): Constify.
2977
4ada038f
TT
29782017-09-27 Tom Tromey <tom@tromey.com>
2979
2980 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
2981
57f5a81b
TT
29822017-09-27 Tom Tromey <tom@tromey.com>
2983
2984 * arc-tdep.c (dump_arc_instruction_command): Constify.
2985
b0a8e6c4
TT
29862017-09-27 Tom Tromey <tom@tromey.com>
2987
2988 * valprint.c (set_radix, show_radix): Constify.
2989
8d97dc1c
TT
29902017-09-27 Tom Tromey <tom@tromey.com>
2991
2992 * dtrace-probe.c (info_probes_dtrace_command): Constify.
2993
eb7c454d
TT
29942017-09-27 Tom Tromey <tom@tromey.com>
2995
2996 * command.h (not_just_help_class_command): Update.
2997 * cli/cli-decode.h (not_just_help_class_command): Update.
2998 * cli/cli-decode.c (not_just_help_class_command): Constify.
2999
e4e33335
TT
30002017-09-27 Tom Tromey <tom@tromey.com>
3001
3002 * gdb_bfd.c (maintenance_info_bfds): Constify.
3003
0450cc4c
TT
30042017-09-27 Tom Tromey <tom@tromey.com>
3005
3006 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3007 overloads.
3008 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3009 (do_const_cfunc): New function.
3010 (cmd_cfunc_eq): New overload.
3011 (cli_user_command_p): Check do_const_cfunc.
3012 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3013 const_cfunc.
3014 * command.h (add_cmd): Add const overload and no-function
3015 overload.
3016 (set_cmd_cfunc): Add const overload.
3017 (cmd_const_cfunc_ftype): Declare.
3018 (cmd_cfunc_eq): Add const overload.
3019 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3020 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3021 overload.
3022
a9bbfbd8
TT
30232017-09-27 Tom Tromey <tom@tromey.com>
3024
3025 * macroexp.c (get_next_token_for_substitution): New function.
3026 (substitute_args): Call it. Check for __VA_OPT__.
3027
5230b05a
WT
30282017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3029 Pedro Alves <palves@redhat.com>
3030
3031 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3032 producer_is_icc_lt_14.
3033 (producer_is_icc_lt_14): New function.
3034 (check_producer): Add code for checking version of ICC.
3035 (producer_is_icc): Move to producer.c.
3036 (read_structure_type): Restrict ICC workaround to ICC<14.
3037 * producer.c: Include selftest.h.
3038 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3039 New functions.
3040 * producer.h (producer_is_icc): New declaration.
3041
b32b108a
WT
30422017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3043
3044 * Makefile.in (SFILES): Add producer.c.
3045 (COMMON_OBS): Add producer.o
3046 * amd64-tdep.c (producer.h): Add new include.
3047 * dwarf2read.c (producer.h): Add new include.
3048 * producer.c: New file.
3049 * producer.h: New file.
3050 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3051 producer.c.
3052 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3053 producer.h.
3054
5007d765
MK
30552017-09-26 Matthias Klose <doko@ubuntu.com>
3056
3057 * configure.ac: Search ncursesw before ncurses.
3058 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3059 * gdb_curses.h: Include <ncursesw/ncurses.h>
3060 * config.in, configure: Regenerate.
3061
281c4447
RO
30622017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3063
3064 PR gdb/22185
3065 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3066 obsolete.
3067 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3068 Remove i386sol2 support.
3069 * configure.nat <i386sol2>: Remove.
3070 <sol2-64>: Fold into ...
3071 <sol2>: ... this.
3072 Move common settings to default section.
3073 Add sol-thread.o.
3074 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3075 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3076 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3077 <i[34567]86-*-solaris*>: Remove.
3078 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3079
3080 * configure.ac: Remove wctype in libw check.
3081 (_MSE_INT_H): Don't define on Solaris 7-9.
3082 <solaris*>: Remove libthread_db.so.1 check.
3083 * configure: Regenerate.
3084 * config.in: Regenerate.
3085
3086 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3087 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3088 (gdb_ps_size_t): Remove.
3089 Use base types in users.
3090 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3091
3092 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3093
39b06c20
RO
30942017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3095
3096 PR build/22206
3097 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3098 (adi_is_addr_mapped): Likewise.
3099 (PSR_ICC): Don't redefine.
3100 (PSR_IMPL): Likewise.
3101
6c3e20f1
TT
31022017-09-25 Tom Tromey <tom@tromey.com>
3103
3104 * regcache.c (regcache::dump): Use string_printf.
3105
b292235f
TT
31062017-09-25 Tom Tromey <tom@tromey.com>
3107
3108 * regcache.c (class regcache_invalidator): New.
3109 (struct register_to_invalidate): Remove.
3110 (make_cleanup_regcache_invalidate): Remove.
3111 (regcache::raw_write): Use regcache_invalidator.
3112
9ac86b52
TT
31132017-09-25 Tom Tromey <tom@tromey.com>
3114
3115 * spu-tdep.c (spu2ppu_sniffer): Update.
3116 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3117 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3118 Remove.
3119 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3120 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3121 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3122 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3123 (frame_pop): Update.
3124
c0e383c6
TT
31252017-09-25 Tom Tromey <tom@tromey.com>
3126
3127 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3128 * regcache.h (regcache_xfree): Don't declare.
3129 * regcache.c (regcache_xfree): Remove.
3130 (do_regcache_xfree): Use delete.
3131 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3132 * linux-fork.c (free_fork): Use delete.
3133 (fork_save_infrun_state): Likewise.
3134 * jit.c (jit_dealloc_cache): Use delete.
3135 * infrun.c (discard_infcall_suspend_state): Use delete.
3136
791199cc
TT
31372017-09-25 Tom Tromey <tom@tromey.com>
3138
3139 * regcache.h (regcache_xmalloc): Don't declare.
3140 (regcache_raw_set_cached_value): Update comment.
3141 * regcache.c (regcache_xmalloc): Remove.
3142 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3143 * jit.c (jit_frame_sniffer): Use new.
3144 * frame.c (frame_save_as_regcache): Use new.
3145
289e23aa
AA
31462017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3147
3148 * NEWS: Advertise support for guarded-storage registers on IBM z.
3149
1b63490c
AA
31502017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3151
3152 * s390-linux-nat.c (have_regset_gs): New static variable.
3153 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3154 control block and guarded-storage broadcast control regsets.
3155 (s390_read_description): Detect whether the target has
3156 guarded-storage support, return appropriate tdesc.
3157 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3158 (features/s390x-gs-linux64.c): Likewise.
3159 (struct gdbarch_tdep) <have_gs>: New field.
3160 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3161 (s390_gsbc_regset): New variables.
3162 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3163 and s390_gsbc_regset, if applicable.
3164 (s390_core_read_description): Check whether core file was from a
3165 target with guarded-storage support; include appropriate regsets.
3166 (s390_gdbarch_init): Add registers for guarded-storage support.
3167 (_initialize_s390_tdep): Initialize new target descriptions that
3168 include registers for guarded-storage support.
3169 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3170 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3171 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3172 (S390_NUM_REGS): Adjust macro definition.
3173 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3174 (tdesc_s390x_gs_linux64): New declarations.
3175
96235dc1
AA
31762017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3177
3178 * features/s390-gs-linux64.xml: New file.
3179 * features/s390-gs.xml: New file.
3180 * features/s390-gsbc.xml: New file.
3181 * features/s390x-gs-linux64.xml: New file.
3182 * features/Makefile (WHICH): Add s390-gs-linux64 and
3183 s390x-gs-linux64.
3184 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3185 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3186 * features/s390-gs-linux64.c: New generated file.
3187 * features/s390x-gs-linux64.c: New file.
3188 * regformats/s390-gs-linux64.dat: New file.
3189 * regformats/s390x-gs-linux64.dat: New file.
3190
b4a7c699
TT
31912017-09-23 Tom Tromey <tom@tromey.com>
3192
3193 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3194
c2f97536
TT
31952017-09-22 Tom Tromey <tom@tromey.com>
3196
3197 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3198 type to scoped_restore_tmpl.
3199 <scoped_input_handler>: Initialize m_quit_handler directly.
3200
43573013
SDJ
32012017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3202
3203 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3204 (cd_command): Likewise. Free "current_directory" before
3205 assigning to it.
3206 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3207 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3208 * top.c (gdb_dirbuf): Remove global declaration.
3209 * top.h (gdb_dirbuf): Likewise.
3210
6ec2e0f5
SDJ
32112017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3212
3213 * gnulib/aclocal.m4: Regenerate.
3214 * gnulib/config.in: Regenerate.
3215 * gnulib/configure: Regenerate.
3216 * gnulib/import/Makefile.am: Regenerate.
3217 * gnulib/import/Makefile.in: Regenerate.
3218 * gnulib/import/assure.h: New file.
3219 * gnulib/import/at-func.c: Likewise
3220 * gnulib/import/chdir-long.c: New file.
3221 * gnulib/import/chdir-long.h: New file.
3222 * gnulib/import/cloexec.c: New file.
3223 * gnulib/import/cloexec.h: New file.
3224 * gnulib/import/close.c: New file.
3225 * gnulib/import/closedir.c: New file.
3226 * gnulib/import/dirent-private.h: New file.
3227 * gnulib/import/dup-safer.c: New file.
3228 * gnulib/import/dup.c: New file.
3229 * gnulib/import/dup2.c: New file.
3230 * gnulib/import/error.c: New file.
3231 * gnulib/import/error.h: New file.
3232 * gnulib/import/exitfail.c: New file.
3233 * gnulib/import/exitfail.h: New file.
3234 * gnulib/import/fchdir.c: New file.
3235 * gnulib/import/fcntl.c: New file.
3236 * gnulib/import/fcntl.in.h: New file.
3237 * gnulib/import/fd-hook.c: New file.
3238 * gnulib/import/fd-hook.h: New file.
3239 * gnulib/import/fd-safer.c: New file.
3240 * gnulib/import/fdopendir.c: New file.
3241 * gnulib/import/filename.h: New file.
3242 * gnulib/import/filenamecat-lgpl.c: New file.
3243 * gnulib/import/filenamecat.h: New file.
3244 * gnulib/import/fstat.c: New file.
3245 * gnulib/import/fstatat.c: New file.
3246 * gnulib/import/getcwd-lgpl.c: New file.
3247 * gnulib/import/getcwd.c: New file.
3248 * gnulib/import/getdtablesize.c: New file.
3249 * gnulib/import/getlogin_r.c: New file.
3250 * gnulib/import/getprogname.c: New file.
3251 * gnulib/import/getprogname.h: New file.
3252 * gnulib/import/gettext.h: New file.
3253 * gnulib/import/glob-libc.h: New file.
3254 * gnulib/import/glob.c: New file.
3255 * gnulib/import/glob.in.h: New file.
3256 * gnulib/import/intprops.h: New file.
3257 * gnulib/import/m4/chdir-long.m4: New file.
3258 * gnulib/import/m4/close.m4: New file.
3259 * gnulib/import/m4/closedir.m4: New file.
3260 * gnulib/import/m4/d-ino.m4: New file.
3261 * gnulib/import/m4/d-type.m4: New file.
3262 * gnulib/import/m4/dup.m4: New file.
3263 * gnulib/import/m4/dup2.m4: New file.
3264 * gnulib/import/m4/error.m4: New file.
3265 * gnulib/import/m4/fchdir.m4: New file.
3266 * gnulib/import/m4/fcntl.m4: New file.
3267 * gnulib/import/m4/fcntl_h.m4: New file.
3268 * gnulib/import/m4/fdopendir.m4: New file.
3269 * gnulib/import/m4/filenamecat.m4: New file.
3270 * gnulib/import/m4/fstat.m4: New file.
3271 * gnulib/import/m4/fstatat.m4: New file.
3272 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3273 * gnulib/import/m4/getcwd-path-max.m4: New file.
3274 * gnulib/import/m4/getcwd.m4: New file.
3275 * gnulib/import/m4/getdtablesize.m4: New file.
3276 * gnulib/import/m4/getlogin_r.m4: New file.
3277 * gnulib/import/m4/getprogname.m4: New file.
3278 * gnulib/import/m4/glob.m4: New file.
3279 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3280 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3281 * gnulib/import/m4/mempcpy.m4: New file.
3282 * gnulib/import/m4/memrchr.m4: New file.
3283 * gnulib/import/m4/mode_t.m4: New file.
3284 * gnulib/import/m4/msvc-inval.m4: New file.
3285 * gnulib/import/m4/msvc-nothrow.m4: New file.
3286 * gnulib/import/m4/open.m4: New file.
3287 * gnulib/import/m4/openat.m4: New file.
3288 * gnulib/import/m4/opendir.m4: New file.
3289 * gnulib/import/m4/readdir.m4: New file.
3290 * gnulib/import/m4/realloc.m4: New file.
3291 * gnulib/import/m4/rewinddir.m4: New file.
3292 * gnulib/import/m4/save-cwd.m4: New file.
3293 * gnulib/import/m4/strdup.m4: New file.
3294 * gnulib/import/m4/strerror.m4: New file.
3295 * gnulib/import/m4/unistd-safer.m4: New file.
3296 * gnulib/import/mempcpy.c: New file.
3297 * gnulib/import/memrchr.c: New file.
3298 * gnulib/import/msvc-inval.c: New file.
3299 * gnulib/import/msvc-inval.h: New file.
3300 * gnulib/import/msvc-nothrow.c: New file.
3301 * gnulib/import/msvc-nothrow.h: New file.
3302 * gnulib/import/open.c: New file.
3303 * gnulib/import/openat-die.c: New file.
3304 * gnulib/import/openat-priv.h: New file.
3305 * gnulib/import/openat-proc.c: New file.
3306 * gnulib/import/openat.c: New file.
3307 * gnulib/import/openat.h: New file.
3308 * gnulib/import/opendir.c: New file.
3309 * gnulib/import/pipe-safer.c: New file.
3310 * gnulib/import/readdir.c: New file.
3311 * gnulib/import/realloc.c: New file.
3312 * gnulib/import/rewinddir.c: New file.
3313 * gnulib/import/save-cwd.c: New file.
3314 * gnulib/import/save-cwd.h: New file.
3315 * gnulib/import/strdup.c: New file.
3316 * gnulib/import/strerror-override.c: New file.
3317 * gnulib/import/strerror-override.h: New file.
3318 * gnulib/import/strerror.c: New file.
3319 * gnulib/import/unistd--.h: New file.
3320 * gnulib/import/unistd-safer.h: New file.
3321 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3322 "getcwd" and "glob".
3323 * ser-tcp.c: Undefine "close" before redefining it.
3324
432ae719
SM
33252017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3326
3327 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3328 get rid of res_val.
3329
4fa7574e
RO
33302017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3331
3332 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3333 <sol2,sparc>: Likewise.
3334 <sol2-64,i386>: Likewise.
3335
3336 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3337 -Wdeprecated-declarations on *-*-solaris*.
3338 * configure: Regenerate.
3339
3340 * procfs.c: Include "nat/inferior.h".
3341 (procfs_info_proc): Fix typo.
3342
f6327dcb
KB
33432017-09-21 Kevin Buettner <kevinb@redhat.com>
3344
3345 * remote.c (vector): Include.
3346 (struct private_thread_info): Add field, thread_handle.
3347 (free_private_thread_info): Deallocate storage associated with
3348 thread handle.
3349 (get_private_info_thread): Initialize `thread_handle' field.
3350 (struct thread_item): Add field, thread_handle.
3351 (clear_threads_listing_context): Deallocate storage associated
3352 with thread handle.
3353 (start_thread): Add support for "handle" attribute.
3354 (thread_attributes): Add "handle".
3355 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3356 field.
3357 (remote_update_thread_list): Update thread_handle.
3358 (remote_thread_handle_to_thread_info): New function.
3359 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3360
fbbe5337
KB
33612017-09-21 Kevin Buettner <kevinb@redhat.com>
3362
3363 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3364 function.
3365 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3366 * python/python-internal.h (thread_object_type): Declare.
3367
e04ee09e
KB
33682017-09-21 Kevin Buettner <kevinb@redhat.com>
3369
3370 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3371 (target_thread_handle_to_thread_info): Declare.
3372 * target.c (target_thread_handle_to_thread_info): New function.
3373 * target-delegates.c: Regenerate.
3374 * gdbthread.h (find_thread_by_handle): Declare.
3375 * thread.c (find_thread_by_handle): New function.
3376 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3377 function.
3378 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3379
1e5b66ed
SM
33802017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3381
3382 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3383
ebe48ba0
SM
33842017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3385
3386 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3387
0a0bf5dc
YQ
33882017-09-21 Yao Qi <yao.qi@linaro.org>
3389
3390 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3391 to gdb_target_obs.
3392
d1b0a7bf
TT
33932017-09-20 Tom Tromey <tom@tromey.com>
3394
3395 * breakpoint.c (struct counted_command_line): Remove.
3396 (breakpoint_commands): Update.
3397 (alloc_counted_command_line, incref_counted_command_line)
3398 (decref_counted_command_line, do_cleanup_counted_command_line)
3399 (make_cleanup_decref_counted_command_line): Remove.
3400 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3401 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3402 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3403 (save_breakpoints): Update.
3404 * breakpoint.h (counted_command_line): Now a typedef to
3405 shared_ptr.
3406 (struct breakpoint) <commands>: Now a counted_command_line.
3407 (struct bpstats) <command>: Likewise.
3408
48649e1b
TT
34092017-09-20 Tom Tromey <tom@tromey.com>
3410
3411 * breakpoint.c (struct commands_info, do_map_commands_command):
3412 Remove.
3413 (commands_command_1): Update.
3414 (iterate_over_related_breakpoints): Take a function_view.
3415 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3416 (delete_command): Update.
3417 (map_breakpoint_numbers): Take a function_view.
3418 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3419 (disable_command): Update.
3420 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3421 (enable_command): Update.
3422 (struct disp_data, do_enable_breakpoint_disp)
3423 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3424 (do_map_enable_delete_breakpoint): Remove.
3425 (enable_once_command, enable_count_command, enable_delete_command)
3426 (delete_trace_variable_command): Update.
3427
04afa70c
TT
34282017-09-20 Tom Tromey <tom@tromey.com>
3429
3430 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3431 (bpstat_clear): Use delete.
3432 (bpstats): New constructors.
3433 (bpstat_copy, bpstat_stop_status): Use new.
3434 (dprintf_after_condition_true): Update.
3435 * breakpoint.h (bpstats::bpstats): Add constructors.
3436 (bpstats::~bpstats): Add destructor.
3437
c83833f4
PA
34382017-09-20 Pedro Alves <palves@redhat.com>
3439
3440 * eval.c (make_params): Delete, refactored as ...
3441 (class fake_method): ... this new type's ctor.
3442 (fake_method::~fake_method): New.
3443 (evaluate_subexp_standard): Use 'fake_method'.
3444
223ffa71
TT
34452017-09-20 Tom Tromey <tom@tromey.com>
3446
3447 * windows-nat.c (get_windows_debug_event, windows_wait)
3448 (do_initial_windows_stuff, windows_attach): Update.
3449 * utils.c (vwarning, internal_vproblem): Update.
3450 (ui_unregister_input_event_handler_cleanup)
3451 (prepare_to_handle_input): Remove.
3452 (class scoped_input_handler): New.
3453 (defaulted_query, prompt_for_continue): Update.
3454 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3455 Update.
3456 * top.c (undo_terminal_modifications_before_exit): Update.
3457 * target/target.h (target_terminal_init, target_terminal_inferior)
3458 (target_terminal_ours): Don't declare.
3459 (class target_terminal): New.
3460 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3461 (target_terminal_ours_for_output)
3462 (make_cleanup_restore_target_terminal): Don't declare.
3463 (target_terminal_info): Remove.
3464 * target.c (enum terminal_state, terminal_state): Remove.
3465 (target_terminal::terminal_state): Define.
3466 (target_terminal::init): Rename from target_terminal_init.
3467 (target_terminal::inferior): Rename from
3468 target_terminal_inferior.
3469 (target_terminal::ours): Rename from target_terminal_ours.
3470 (target_terminal::ours_for_output): Rename from
3471 target_terminal_ours_for_output.
3472 (target_terminal::info): New method.
3473 (cleanup_restore_target_terminal)
3474 (make_cleanup_restore_target_terminal): Remove.
3475 * solib.c (handle_solib_event): Update.
3476 * remote.c (remote_serial_quit_handler): Update.
3477 (remote_terminal_inferior, remote_wait_as): Update.
3478 * record-full.c (record_full_wait_1): Update.
3479 * nto-procfs.c (procfs_create_inferior): Update.
3480 * nat/fork-inferior.c (startup_inferior): Update.
3481 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3482 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3483 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3484 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3485 (mi_breakpoint_created, mi_breakpoint_deleted)
3486 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3487 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3488 (mi_user_selected_context_changed, report_initial_inferior):
3489 Update.
3490 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3491 (linux_nat_terminal_inferior): Update.
3492 * infrun.c (follow_fork_inferior)
3493 (handle_vfork_child_exec_or_exit, do_target_resume)
3494 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3495 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3496 Update.
3497 * inflow.c (child_terminal_init, info_terminal_command): Update.
3498 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3499 (attach_command): Update.
3500 * infcall.c (call_thread_fsm_should_stop): Update.
3501 * gnu-nat.c (gnu_attach): Update.
3502 * extension.c (struct active_ext_lang_state)
3503 (restore_active_ext_lang): Update.
3504 * exceptions.c (print_flush): Update.
3505 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3506 (struct quit_handler_cleanup_data, restore_quit_handler)
3507 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3508 Remove.
3509 * cp-support.c (gdb_demangle): Update.
3510 * breakpoint.c (update_inserted_breakpoint_locations)
3511 (insert_breakpoint_locations, handle_jit_event)
3512 (disable_breakpoints_in_unloaded_shlib): Update.
3513 * annotate.c (annotate_breakpoints_invalid)
3514 (annotate_frames_invalid): Update.
3515
013af3fc
TT
35162017-09-20 Tom Tromey <tom@tromey.com>
3517
3518 * main.c (catch_command_errors): Rename from
3519 catch_command_errors_const.
3520 (captured_main_1): Update.
3521
06871ae8
PA
35222017-09-20 Pedro Alves <palves@redhat.com>
3523
3524 * cli/cli-cmds.c (list_command): Use print_sal_location.
3525 (print_sal_location): New function.
3526 (ambiguous_line_spec): Use print_sal_location.
3527 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3528 * symtab.c (find_function_start_sal): Likewise.
3529 * symtab.h (symtab_and_line::symbol): New field.
3530
e5f25bc5
PA
35312017-09-20 Pedro Alves <palves@redhat.com>
3532
3533 * linespec.c (minsym_found): Handle non-text minsyms.
3534 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3535
1b7fa39e
WT
35362017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3537
3538 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3539 backslash.
3540
37dd0825
WT
35412017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3542
3543 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3544 vmovups instead vmovaps.
3545 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3546
4e5a4f58
JB
35472017-09-19 John Baldwin <jhb@FreeBSD.org>
3548
3549 * NEWS (Changes since GDB 8.0): Add starti.
3550 * infcmd.c (enum run_break): New.
3551 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3552 case.
3553 (run_command): Use enum run_how.
3554 (start_command): Likewise.
3555 (starti_command): New function.
3556 (RUN_ARGS_HELP): New macro.
3557 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3558 commands. Add starti command.
3559
aa70c9f1
YQ
35602017-09-19 Yao Qi <yao.qi@linaro.org>
3561
3562 * Makefile.in (monitor.o): Remove the rule.
3563
d6541620
YQ
35642017-09-19 Yao Qi <yao.qi@linaro.org>
3565
3566 * annotate.h (struct annotate_arg_emitter): Use
3567 DISABLE_COPY_AND_ASSIGN.
3568 * common/refcounted-object.h (refcounted_object): Likewise.
3569 * completer.h (struct completion_result): Likewise.
3570 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3571 * filename-seen-cache.h (filename_seen_cache): Likewise.
3572 * gdbcore.h (thread_section_name): Likewise.
3573 * gdb_regex.h (compiled_regex): Likewise.
3574 * gdbthread.h (scoped_restore_current_thread): Likewise.
3575 * inferior.h (scoped_restore_current_inferior): Likewise.
3576 * jit.c (jit_reader): Likewise.
3577 * linespec.h (struct linespec_result): Likewise.
3578 * mi/mi-parse.h (struct mi_parse): Likewise.
3579 * nat/fork-inferior.c (execv_argv): Likewise.
3580 * progspace.h (scoped_restore_current_program_space): Likewise.
3581 * python/python-internal.h (class gdbpy_enter): Likewise.
3582 * regcache.h (regcache): Likewise.
3583 * target-descriptions.c (struct tdesc_reg): Likewise.
3584 (struct tdesc_type): Likewise.
3585 (struct tdesc_feature): Likewise.
3586 * ui-out.h (ui_out_emit_type): Likewise.
3587
0615127c
SM
35882017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3589
3590 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3591 label abort_expression.
3592
5e187554
SM
35932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3594
3595 * common/buffer.c (buffer_xml_printf): Adjust.
3596 * common/xml-utils.c (xml_escape_text): Change return type to
3597 std::string, update code accordingly.
3598 * common/xml-utils.h (xml_escape_text): Change return type to
3599 std::string.
3600 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3601 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3602 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3603 Adjust.
3604
c3d7b541
SM
36052017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3606
3607 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3608 (SUBDIR_UNITTESTS_OBS): Add new object file.
3609 * unittests/xml-utils-selftests.c: New file.
3610
1526853e
SM
36112017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3612
3613 * common/selftest.h (selftest): New struct/interface.
3614 (register_test): Add name parameter, add new overload.
3615 (run_tests): Add filter parameter.
3616 (for_each_selftest_ftype): New typedef.
3617 (for_each_selftest): New declaration.
3618 * common/selftest.c (tests): Change type to
3619 map<string, unique_ptr<selftest>>.
3620 (simple_selftest): New struct.
3621 (register_test): New function.
3622 (register_test): Add name parameter and use it.
3623 (run_tests): Add filter parameter and use it. Add prints.
3624 Adjust to vector -> map change.
3625 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3626 registering selftests.
3627 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3628 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3629 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3630 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3631 * findvar.c (_initialize_findvar): Likewise.
3632 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3633 * maint.c (maintenance_selftest): Update call to run_tests.
3634 (maintenance_info_selftests): New function.
3635 (_initialize_maint_cmds): Register "maintenance info selftests"
3636 command. Update "maintenance selftest" doc.
3637 * regcache.c (_initialize_regcache): Add names when registering
3638 selftests.
3639 * rust-exp.y (_initialize_rust_exp): Likewise.
3640 * selftest-arch.c (gdbarch_selftest): New struct.
3641 (gdbarch_tests): Remove.
3642 (register_test_foreach_arch): Add name parameter. Call
3643 register_test.
3644 (tests_with_arch): Remove, move most content to
3645 gdbarch_selftest::operator().
3646 (_initialize_selftests_foreach_arch): Remove.
3647 * selftest-arch.h (register_test_foreach_arch): Add name
3648 parameter.
3649 (run_tests_with_arch): New declaration.
3650 * utils-selftests.c (_initialize_utils_selftests): Add names
3651 when registering selftests.
3652 * utils.c (_initialize_utils): Likewise.
3653 * unittests/array-view-selftests.c
3654 (_initialize_array_view_selftests): Likewise.
3655 * unittests/environ-selftests.c (_initialize_environ_selftests):
3656 Likewise.
3657 * unittests/function-view-selftests.c
3658 (_initialize_function_view_selftests): Likewise.
3659 * unittests/offset-type-selftests.c
3660 (_initialize_offset_type_selftests): Likewise.
3661 * unittests/optional-selftests.c
3662 (_initialize_optional_selftests): Likewise.
3663 * unittests/scoped_restore-selftests.c
3664 (_initialize_scoped_restore_selftests): Likewise.
3665 * NEWS: Document "maintenance selftest" and "maint info
3666 selftests".
3667
5846367a
SM
36682017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3669
3670 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3671 scoped_restore.
3672
bd77e8ff
SM
36732017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3674
3675 * mi/mi-main.c (mi_load_progress): Make uiout variable
3676 a unique_ptr.
3677
26a67918
PA
36782017-09-15 Pedro Alves <palves@redhat.com>
3679
3680 * compile/compile-c-types.c (convert_enum, convert_int)
3681 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3682
3f8a7804
SM
36832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3684
3685 * dwarf2read.c (copy_string): Remove.
3686 (parse_macro_definition): Replace copy_string with savestring.
3687
8d200706
YQ
36882017-09-15 Yao Qi <yao.qi@linaro.org>
3689
3690 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3691 gdb_target_obs.
3692 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3693 Likewise.
3694 (i[34567]86-*-linux*): Likewise.
3695
d185219d
SM
36962017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3697
3698 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3699 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3700 <stack>: Change type to std::vector.
3701 <stack_len, stack_allocated>: Remove.
3702 <grow_stack>: Remove.
3703 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3704 (dwarf_expr_context::~dwarf_expr_context): Remove.
3705 (dwarf_expr_context::grow_stack): Remove.
3706 (dwarf_expr_context::push): Adjust.
3707 (dwarf_expr_context::pop): Adjust.
3708 (dwarf_expr_context::fetch): Adjust.
3709 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3710 (dwarf_expr_context::stack_empty_p): Adjust.
3711 (dwarf_expr_context::execute_stack_op): Adjust.
3712
eccd80d6
SM
37132017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3714
3715 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3716 return type to bool.
3717 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3718
69009882
SM
37192017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3720
3721 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3722 Change type to bool.
3723 (dwarf_stack_value) <in_stack_memory>: Likewise.
3724 (dwarf_expr_context) <push_address>: Change parameter type to
3725 bool.
3726 <fetch_in_stack_memory>: Change return type to bool.
3727 <push>: Change parameter type to bool.
3728 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3729 to bool.
3730 (dwarf_expr_context::push_address): Likewise.
3731 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3732 to bool.
3733 (dwarf_expr_context::execute_stack_op): Adjust.
3734 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3735
1e467161
SM
37362017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3737
3738 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3739 (struct dwarf_expr_context) <n_pieces>: Remove.
3740 <pieces>: Change type to std::vector.
3741 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3742 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3743 pieces.
3744 (dwarf_expr_context::add_piece): Adjust.
3745 * dwarf2loc.c (struct piece_closure): Initialize fields.
3746 <n_pieces>: Remove.
3747 <pieces>: Change type to std::vector.
3748 (allocate_piece_closure): Adjust, change parameter to
3749 std::vector rvalue and std::move it to piece_closure.
3750 (rw_pieced_value): Adjust.
3751 (check_pieced_synthetic_pointer): Adjust.
3752 (indirect_synthetic_pointer): Adjust.
3753 (coerce_pieced_ref): Adjust.
3754 (free_pieced_value_closure): Adjust. Use delete to free
3755 piece_closure.
3756 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3757 to allocate_piece_closure.
3758 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3759
0782db84
SM
37602017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3761
3762 * probe.h (probe_ops_cp): Remove typedef.
3763 (DEF_VEC_P (probe_ops_cp)): Remove.
3764 (all_probe_ops): Change type to std::vector.
3765 * probe.c (info_probes_for_ops): Adjust to vector change.
3766 (probe_linespec_to_ops): Likewise.
3767 (all_probe_ops): Change type to std::vector.
3768 (_initialize_probe): Adjust to vector change.
3769 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3770 * elfread.c (elf_get_probes): Likewise.
3771 * stap-probe.c (_initialize_stap_probe): Likewise.
3772
1eac6bea
SM
37732017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3774
3775 * probe.h (struct bound_probe): Define constructors.
3776 * probe.c (bound_probe_s): Remove typedef.
3777 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3778 (collect_probes): Change return type to std::vector, remove
3779 cleanup.
3780 (compare_probes): Return bool, change parameter type. Change
3781 semantic to "less than".
3782 (gen_ui_out_table_header_info): Change parameter to std::vector
3783 and update.
3784 (exists_probe_with_pops): Likewise.
3785 (info_probes_for_ops): Update to std::vector change.
3786 (enable_probes_command): Likewise.
3787 (disable_probes_command): Likewise.
3788
aaa63a31
SM
37892017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3790
3791 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3792 vec to std::vector.
3793 * probe.c (parse_probes_in_pspace): Update.
3794 (find_probes_in_objfile): Update.
3795 (find_probe_by_pc): Update.
3796 (collect_probes): Update.
3797 (probe_any_get_probes): Update.
3798 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3799 return type to reference to std::vector.
3800 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3801 std::vector and update.
3802 (dtrace_process_dof): Likewise.
3803 (dtrace_get_probes): Likewise.
3804 * elfread.c (elf_get_probes): Change return type to std::vector,
3805 store an std::vector in bfd_data.
3806 (probe_key_free): Update to std::vector.
3807 * stap-probe.c (handle_stap_probe): Change parameter to
3808 std::vector and update.
3809 (stap_get_probes): Likewise.
3810 * symfile-debug.c (debug_sym_get_probes): Change return type to
3811 std::vector and update.
3812
cb85b21b
TT
38132017-09-11 Tom Tromey <tom@tromey.com>
3814
3815 * breakpoint.c (program_breakpoint_here_p): Update.
3816 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3817 from make_show_memory_breakpoints_cleanup. Return a
3818 scoped_restore_tmpl<int>.
3819 (restore_show_memory_breakpoints): Remove.
3820 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3821 * mem-break.c (memory_validate_breakpoint): Update.
3822 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3823 (ia64_memory_remove_breakpoint): Update.
3824 (ia64_breakpoint_from_pc): Update.
3825 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3826 from make_show_memory_breakpoints_cleanup.
3827
8fbc99ef
TT
38282017-09-11 Tom Tromey <tom@tromey.com>
3829
3830 * d-namespace.c (d_lookup_symbol): Use std::string.
3831 (find_symbol_in_baseclass): Likewise.
3832
50feb4bd
TT
38332017-09-11 Tom Tromey <tom@tromey.com>
3834
3835 * ctf.c (ctf_start): Use std::string.
3836
c6dc63a1
TT
38372017-09-11 Tom Tromey <tom@tromey.com>
3838
3839 * ada-lang.c (is_known_support_routine): Update.
3840 (ada_unhandled_exception_name_addr_from_raise): Update.
3841 * guile/scm-frame.c (gdbscm_frame_name): Update.
3842 * python/py-frame.c (frapy_name): Update.
3843 (frapy_function): Update.
3844 * stack.h (find_frame_funname): Update.
3845 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3846 (print_frame): Update.
3847
d6b9b80f
TT
38482017-09-11 Tom Tromey <tom@tromey.com>
3849
3850 * findcmd.c (put_bits): Take a gdb::byte_vector.
3851 (parse_find_args): Return gdb::byte_vector. "args" now const.
3852 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3853 cleanups.
3854 (find_command): Update.
3855
a9921622
TT
38562017-09-11 Tom Tromey <tom@tromey.com>
3857
3858 * cli/cli-script.c (class scoped_restore_hook_in): New.
3859 (clear_hook_in_cleanup): Remove.
3860 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3861 scoped_restore_hook_in.
3862
be0d7abb
TT
38632017-09-11 Tom Tromey <tom@tromey.com>
3864
3865 * cli/cli-script.c (restore_interp): Remove.
3866 (read_command_lines): Use scoped_restore_interp.
3867 * interps.c (scoped_restore_interp::set_temp): Rename from
3868 interp_set_temp.
3869 * interps.h (class scoped_restore_interp): New.
3870 (interp_set_temp): Remove.
3871
00f675ff
TT
38722017-09-11 Tom Tromey <tom@tromey.com>
3873
3874 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3875 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3876 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3877 scoped_restore.
3878 (mi_cmd_break_insert_1): Update.
3879 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3880 scoped_restore.
3881
cb791d59
TT
38822017-09-11 Tom Tromey <tom@tromey.com>
3883
3884 * demangle.c (demangle_command): Update.
3885 * breakpoint.c (disable_command): Update.
3886 (enable_command): Update.
3887 (find_location_by_number): Make "number" const. Use
3888 get_number_trailer.
3889 * cli/cli-utils.c (extract_arg): Return std::string.
3890 * probe.c (parse_probe_linespec): Update. Change types.
3891 (collect_probes): Take string arguments.
3892 (parse_probe_linespec): Likewise.
3893 (info_probes_for_ops): Update.
3894 (enable_probes_command): Update.
3895 (disable_probes_command): Update.
3896 * break-catch-sig.c (catch_signal_split_args): Update.
3897 * mi/mi-parse.c (mi_parse): Update.
3898
2039bd9f
TT
38992017-09-11 Tom Tromey <tom@tromey.com>
3900
3901 * language.h (language_enum): Make argument const.
3902 * language.c (language_enum): Make argument const.
3903
f1735a53
TT
39042017-09-11 Tom Tromey <tom@tromey.com>
3905
3906 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3907 as function.
3908 (skip_to_space): Rename from skip_to_space_const.
3909 * common/common-utils.c (skip_to_space): New function.
3910 (skip_to_space): Rename from skip_to_space_const.
3911 * cli/cli-utils.h (get_number): Rename from get_number_const.
3912 (extract_arg): Rename from extract_arg_const.
3913 * cli/cli-utils.c (get_number): Rename from get_number_const.
3914 (extract_arg): Rename from extract_arg_const.
3915 (number_or_range_parser::get_number): Use ::get_number.
3916 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3917 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3918 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3919 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3920 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3921 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3922 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3923 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3924
7d221d74
TT
39252017-09-11 Tom Tromey <tom@tromey.com>
3926
3927 * python/python.c (do_start_initialization): Use
3928 py-event-types.def to initialize types.
3929 Define all object type structures.
3930 * python/python-internal.h: Don't declare event initialization
3931 functions.
3932 * python/py-threadevent.c (thread_event_object_type): Don't
3933 define.
3934 * python/py-stopevent.c (stop_event_object_type): Don't define.
3935 * python/py-signalevent.c (signal_event_object_type): Don't
3936 declare or define.
3937 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3938 (clear_objfiles_event_object_type): Don't declare or define.
3939 * python/py-infevents.c (inferior_call_pre_event_object_type)
3940 (inferior_call_post_event_object_type)
3941 (register_changed_event_object_type)
3942 (memory_changed_event_object_type): Don't declare or define.
3943 * python/py-inferior.c (new_thread_event_object_type)
3944 (new_inferior_event_object_type)
3945 (inferior_deleted_event_object_type): Don't declare or define.
3946 * python/py-exitedevent.c (exited_event_object_type): Don't
3947 declare or define.
3948 * python/py-evts.c (gdbpy_initialize_py_events): Use
3949 py-all-events.def.
3950 * python/py-events.h (thread_event_object_type): Don't declare.
3951 (events_object): Use py-all-events.def.
3952 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3953 py-event-types.def.
3954 * python/py-event-types.def: New file.
3955 * python/py-continueevent.c (create_continue_event_object): Don't
3956 declare or define.
3957 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3958 declare or define.
3959 * python/py-all-events.def: New file.
3960
35c61a1d
TT
39612017-09-11 Tom Tromey <tom@tromey.com>
3962
3963 * python/py-threadevent.c (create_thread_event_object): Return
3964 gdbpy_ref.
3965 * python/py-stopevent.h (create_stop_event_object)
3966 (create_breakpoint_event_object, create_signal_event_object):
3967 Update.
3968 * python/py-stopevent.c (create_stop_event_object): Return
3969 gdbpy_ref.
3970 (emit_stop_event): Update.
3971 * python/py-signalevent.c (create_signal_event_object): Return
3972 gdbpy_ref.
3973 * python/py-infevents.c (create_inferior_call_event_object):
3974 Update.
3975 * python/py-event.h (create_event_object)
3976 (create_thread_event_object): Update.
3977 * python/py-event.c (create_event_object): Return gdbpy_ref.
3978 * python/py-continueevent.c: Return gdbpy_ref.
3979 * python/py-bpevent.c (create_breakpoint_event_object): Return
3980 gdbpy_ref.
3981
7c96f8c1
TT
39822017-09-11 Tom Tromey <tom@tromey.com>
3983
3984 PR python/15622:
3985 * NEWS: Add entry.
3986 * python/python.c (do_start_initialization): Initialize new event
3987 types.
3988 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
3989 (gdbpy_initialize_inferior_deleted_event)
3990 (gdbpy_initialize_new_thread_event): Declare.
3991 * python/py-threadevent.c (create_thread_event_object): Add option
3992 "thread" parameter.
3993 * python/py-inferior.c (new_thread_event_object_type)
3994 (new_inferior_event_object_type)
3995 (inferior_deleted_event_object_type): Declare.
3996 (python_new_inferior, python_inferior_deleted): New functions.
3997 (add_thread_object): Emit new_thread event.
3998 (gdbpy_initialize_inferior): Attach new functions to corresponding
3999 observers.
4000 (new_thread, new_inferior, inferior_deleted): Define new event
4001 types.
4002 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4003 registries.
4004 * python/py-events.h (events_object) <new_inferior,
4005 inferior_deleted, new_thread>: New fields.
4006 * python/py-event.h (create_thread_event_breakpoint): Add optional
4007 "thread" parameter.
4008
72542b8e
AB
40092017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4010
4011 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4012 check current_ui instead.
4013 (internal_vproblem): Likewise.
4014
0d64823e
SM
40152017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4016
4017 * thread.c (print_thread_info_1): Remove unnecessary calls to
4018 uiout->is_mi_like_p.
4019
eb1e02fd
TT
40202017-09-09 Tom Tromey <tom@tromey.com>
4021
4022 * namespace.h (add_using_directive): Update.
4023 * namespace.c (add_using_directive): Change type of excludes to
4024 std::vector.
4025 * dwarf2read.c (read_import_statement): Use std::vector.
4026 (read_namespace): Update.
4027 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4028
0fc21fd8
TT
40292017-09-09 Tom Tromey <tom@tromey.com>
4030
4031 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4032
49663d05
TT
40332017-09-09 Tom Tromey <tom@tromey.com>
4034
4035 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4036
0b868b60
TT
40372017-09-09 Tom Tromey <tom@tromey.com>
4038
4039 * stack.c (func_command): Use gdb::def_vector.
4040
c0470d48
TT
40412017-09-09 Tom Tromey <tom@tromey.com>
4042
4043 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4044 ui_out_emit_list, ui_out_emit_tuple.
4045 (mi_cmd_var_update): Likewise.
4046
ca5909c7
TT
40472017-09-09 Tom Tromey <tom@tromey.com>
4048
4049 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4050 ui_out_redirect_pop.
4051 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4052 ui_out_redirect_pop.
4053 * utils.c (do_ui_out_redirect_pop)
4054 (make_cleanup_ui_out_redirect_pop): Remove.
4055 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4056 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4057 * ui-out.h (ui_out_redirect_pop): New class.
4058
e6a2252a
TT
40592017-09-09 Tom Tromey <tom@tromey.com>
4060
4061 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4062 (list_available_thread_groups, mi_cmd_list_thread_groups)
4063 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4064 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4065 Likewise.
4066
393702cd
TT
40672017-09-09 Tom Tromey <tom@tromey.com>
4068
4069 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4070 ui_out_emit_tuple.
4071
76f9c9cf
TT
40722017-09-09 Tom Tromey <tom@tromey.com>
4073
4074 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4075 * stack.c (print_frame): Use ui_out_emit_tuple.
4076 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4077 (info_spu_mailbox_command, info_spu_dma_command)
4078 (info_spu_proxydma_command): Likewise.
4079 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4080 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4081 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4082 ui_out_emit_tuple.
4083 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4084
dc9fe180
TT
40852017-09-09 Tom Tromey <tom@tromey.com>
4086
4087 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4088 (class ui_out_emit_table): Update comment.
4089 * ui-out.c (do_cleanup_table_end)
4090 (make_cleanup_ui_out_table_begin_end): Remove.
4091 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4092 (info_spu_dma_cmdlist): Likewise.
4093 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4094 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4095 ui_out_emit_table.
4096
f8cc3da6
TT
40972017-09-09 Tom Tromey <tom@tromey.com>
4098
4099 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4100 ui_out_emit_list, gdb::optional.
4101
481695ed
JB
41022017-09-09 John Baldwin <jhb@FreeBSD.org>
4103
4104 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4105 prototype.
4106 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4107 prototype.
4108 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4109 prototype.
4110 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4111 * ada-exp.y: Remove _initialize_ada_exp prototype.
4112 * ada-lang.c: Remove _initialize_ada_language prototype.
4113 * ada-tasks.c: Remove _initialize_tasks prototype.
4114 * addrmap.c: Remove _initialize_addrmap prototype.
4115 * agent.c: Remove _initialize_agent prototype.
4116 * aix-thread.c: Remove _initialize_aix_thread prototype.
4117 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4118 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4119 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4120 prototype.
4121 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4122 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4123 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4124 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4125 prototype.
4126 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4127 prototype.
4128 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4129 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4130 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4131 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4132 prototype.
4133 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4134 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4135 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4136 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4137 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4138 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4139 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4140 prototype.
4141 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4142 prototype.
4143 * annotate.c: Remove _initialize_annotate prototype.
4144 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4145 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4146 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4147 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4148 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4149 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4150 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4151 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4152 prototype.
4153 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4154 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4155 * auto-load.c: Remove _initialize_auto_load prototype.
4156 * auxv.c: Remove _initialize_auxv prototype.
4157 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4158 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4159 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4160 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4161 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4162 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4163 prototype.
4164 * break-catch-throw.c: Remove _initialize_break_catch_throw
4165 prototype.
4166 * breakpoint.c: Remove _initialize_breakpoint prototype.
4167 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4168 * btrace.c: Remove _initialize_btrace prototype.
4169 * charset.c: Remove _initialize_charset prototype.
4170 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4171 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4172 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4173 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4174 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4175 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4176 * coffread.c: Remove _initialize_coffread prototype.
4177 * compile/compile.c: Remove _initialize_compile prototype.
4178 * complaints.c: Remove _initialize_complaints prototype.
4179 * completer.c: Remove _initialize_completer prototype.
4180 * copying.awk: Remove _initialize_copying prototype.
4181 * copying.c: Regenerate.
4182 * core-regset.c: Remove _initialize_core_regset prototype.
4183 * corefile.c: Remove _initialize_core prototype.
4184 * corelow.c: Remove _initialize_corelow prototype.
4185 * cp-abi.c: Remove _initialize_cp_abi prototype.
4186 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4187 * cp-support.c: Remove _initialize_cp_support prototype.
4188 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4189 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4190 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4191 * ctf.c: Remove _initialize_ctf prototype.
4192 * d-lang.c: Remove _initialize_d_language prototype.
4193 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4194 prototype.
4195 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4196 * dbxread.c: Remove _initialize_dbxread prototype.
4197 * dcache.c: Remove _initialize_dcache prototype.
4198 * demangle.c: Remove _initialize_demangler prototype.
4199 * disasm-selftests.c: Remove _initialize_disasm_selftests
4200 prototype.
4201 * disasm.c: Remove _initialize_disasm prototype.
4202 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4203 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4204 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4205 prototype.
4206 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4207 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4208 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4209 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4210 * elfread.c: Remove _initialize_elfread prototype.
4211 * exec.c: Remove _initialize_exec prototype.
4212 * extension.c: Remove _initialize_extension prototype.
4213 * f-lang.c: Remove _initialize_f_language prototype.
4214 * f-valprint.c: Remove _initialize_f_valprint prototype.
4215 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4216 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4217 * filesystem.c: Remove _initialize_filesystem prototype.
4218 * findcmd.c: Remove _initialize_mem_search prototype.
4219 * fork-child.c: Remove _initialize_fork_child prototype.
4220 * frame-base.c: Remove _initialize_frame_base prototype.
4221 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4222 * frame.c: Remove _initialize_frame prototype.
4223 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4224 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4225 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4226 * gcore.c: Remove _initialize_gcore prototype.
4227 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4228 * gdbarch.c: Regenerate.
4229 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4230 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4231 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4232 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4233 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4234 * go-lang.c: Remove _initialize_go_language prototype.
4235 * go32-nat.c: Remove _initialize_go32_nat prototype.
4236 * guile/guile.c: Remove _initialize_guile prototype.
4237 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4238 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4239 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4240 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4241 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4242 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4243 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4244 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4245 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4246 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4247 prototype.
4248 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4249 prototype.
4250 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4251 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4252 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4253 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4254 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4255 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4256 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4257 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4258 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4259 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4260 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4261 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4262 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4263 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4264 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4265 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4266 prototype.
4267 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4268 prototype.
4269 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4270 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4271 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4272 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4273 * infcall.c: Remove _initialize_infcall prototype.
4274 * infcmd.c: Remove _initialize_infcmd prototype.
4275 * inferior.c: Remove _initialize_inferiors prototype.
4276 * inflow.c: Remove _initialize_inflow prototype.
4277 * infrun.c: Remove _initialize_infrun prototype.
4278 * interps.c: Remove _initialize_interpreter prototype.
4279 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4280 * jit.c: Remove _initialize_jit prototype.
4281 * language.c: Remove _initialize_language prototype.
4282 * linux-fork.c: Remove _initialize_linux_fork prototype.
4283 * linux-nat.c: Remove _initialize_linux_nat prototype.
4284 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4285 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4286 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4287 * m2-lang.c: Remove _initialize_m2_language prototype.
4288 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4289 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4290 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4291 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4292 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4293 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4294 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4295 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4296 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4297 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4298 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4299 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4300 * machoread.c: Remove _initialize_machoread prototype.
4301 * macrocmd.c: Remove _initialize_macrocmd prototype.
4302 * macroscope.c: Remove _initialize_macroscope prototype.
4303 * maint.c: Remove _initialize_maint_cmds prototype.
4304 * mdebugread.c: Remove _initialize_mdebugread prototype.
4305 * memattr.c: Remove _initialize_mem prototype.
4306 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4307 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4308 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4309 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4310 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4311 * microblaze-linux-tdep.c: Remove
4312 _initialize_microblaze_linux_tdep prototype.
4313 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4314 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4315 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4316 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4317 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4318 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4319 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4320 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4321 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4322 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4323 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4324 prototype.
4325 * mipsread.c: Remove _initialize_mipsread prototype.
4326 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4327 prototype.
4328 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4329 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4330 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4331 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4332 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4333 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4334 prototype.
4335 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4336 * nto-procfs.c: Remove _initialize_procfs prototype.
4337 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4338 * objc-lang.c: Remove _initialize_objc_language prototype.
4339 * objfiles.c: Remove _initialize_objfiles prototype.
4340 * observer.c: Remove observer_test_first_notification_function,
4341 observer_test_second_notification_function,
4342 observer_test_third_notification_function, and
4343 _initialize_observer prototypes.
4344 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4345 * osabi.c: Remove _initialize_gdb_osabi prototype.
4346 * osdata.c: Remove _initialize_osdata prototype.
4347 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4348 * parse.c: Remove _initialize_parse prototype.
4349 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4350 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4351 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4352 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4353 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4354 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4355 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4356 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4357 * printcmd.c: Remove _initialize_printcmd prototype.
4358 * probe.c: Remove _initialize_probe prototype.
4359 * proc-api.c: Remove _initialize_proc_api prototype.
4360 * proc-events.c: Remove _initialize_proc_events prototype.
4361 * proc-service.c: Remove _initialize_proc_service prototype.
4362 * procfs.c: Remove _initialize_procfs prototype.
4363 * psymtab.c: Remove _initialize_psymtab prototype.
4364 * python/python.c: Remove _initialize_python prototype.
4365 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4366 * record-btrace.c: Remove _initialize_record_btrace prototype.
4367 * record-full.c: Remove _initialize_record_full prototype.
4368 * record.c: Remove _initialize_record prototype.
4369 * regcache.c: Remove _initialize_regcache prototype.
4370 * reggroups.c: Remove _initialize_reggroup prototype.
4371 * remote-notif.c: Remove _initialize_notif prototype.
4372 * remote-sim.c: Remove _initialize_remote_sim prototype.
4373 * remote.c: Remove _initialize_remote prototype.
4374 * reverse.c: Remove _initialize_reverse prototype.
4375 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4376 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4377 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4378 prototype.
4379 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4380 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4381 * rust-exp.y: Remove _initialize_rust_exp prototype.
4382 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4383 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4384 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4385 * score-tdep.c: Remove _initialize_score_tdep prototype.
4386 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4387 prototype.
4388 * ser-go32.c: Remove _initialize_ser_dos prototype.
4389 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4390 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4391 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4392 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4393 * serial.c: Remove _initialize_serial prototype.
4394 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4395 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4396 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4397 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4398 * skip.c: Remove _initialize_step_skip prototype.
4399 * sol-thread.c: Remove _initialize_sol_thread prototype.
4400 * solib-aix.c: Remove _initialize_solib_aix prototype.
4401 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4402 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4403 * solib-frv.c: Remove _initialize_frv_solib prototype.
4404 * solib-spu.c: Remove _initialize_spu_solib prototype.
4405 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4406 * solib-target.c: Remove _initialize_solib_target prototype.
4407 * solib.c: Remove _initialize_solib prototype.
4408 * source.c: Remove _initialize_source prototype.
4409 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4410 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4411 prototype.
4412 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4413 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4414 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4415 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4416 prototype.
4417 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4418 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4419 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4420 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4421 prototype.
4422 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4423 prototype.
4424 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4425 prototype.
4426 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4427 prototype.
4428 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4429 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4430 prototype.
4431 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4432 prototype.
4433 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4434 prototype.
4435 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4436 prototype.
4437 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4438 prototype.
4439 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4440 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4441 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4442 * stabsread.c: Remove _initialize_stabsread prototype.
4443 * stack.c: Remove _initialize_stack prototype.
4444 * stap-probe.c: Remove _initialize_stap_probe prototype.
4445 * std-regs.c: Remove _initialize_frame_reg prototype.
4446 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4447 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4448 * symfile.c: Remove _initialize_symfile prototype.
4449 * symmisc.c: Remove _initialize_symmisc prototype.
4450 * symtab.c: Remove _initialize_symtab prototype.
4451 * target-dcache.c: Remove _initialize_target_dcache prototype.
4452 * target-descriptions.c: Remove _initialize_target_descriptions
4453 prototype.
4454 * thread.c: Remove _initialize_thread prototype.
4455 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4456 prototype.
4457 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4458 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4459 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4460 prototype.
4461 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4462 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4463 * tracefile.c: Remove _initialize_tracefile prototype.
4464 * tracepoint.c: Remove _initialize_tracepoint prototype.
4465 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4466 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4467 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4468 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4469 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4470 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4471 * tui/tui.c: Remove _initialize_tui prototype.
4472 * typeprint.c: Remove _initialize_typeprint prototype.
4473 * user-regs.c: Remove _initialize_user_regs prototype.
4474 * utils.c: Remove _initialize_utils prototype.
4475 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4476 * valarith.c: Remove _initialize_valarith prototype.
4477 * valops.c: Remove _initialize_valops prototype.
4478 * valprint.c: Remove _initialize_valprint prototype.
4479 * value.c: Remove _initialize_values prototype.
4480 * varobj.c: Remove _initialize_varobj prototype.
4481 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4482 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4483 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4484 * windows-nat.c: Remove _initialize_windows_nat,
4485 _initialize_check_for_gdb_ini, and _initialize_loadable
4486 prototypes.
4487 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4488 * xcoffread.c: Remove _initialize_xcoffread prototype.
4489 * xml-support.c: Remove _initialize_xml_support prototype.
4490 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4491 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4492 prototype.
4493 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4494 prototype.
4495 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4496
a611b5cb
KS
44972017-09-08 Keith Seitz <keiths@redhat.com>
4498
4499 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4500 field.
4501
469412dd
CW
45022017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4503
4504 * f-valprint.c (f_val_print): Remove check for one byte
4505 sized integers. Remove printing of character type.
4506
a5ad232b
FP
45072017-09-08 Frank Penczek <frank.penczek@intel.com>
4508 Christoph Weinmann <christoph.t.weinmann@intel.com>
4509 Bernhard Heckel <bernhard.heckel@intel.com>
4510
4511 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4512 to maintain proper indentation when printing pointers/refs.
4513
e5014227
JB
45142017-09-07 Joel Brobecker <brobecker@adacore.com>
4515
4516 GDB 8.0.1 released.
4517
63c99141
JB
45182017-09-07 Joel Brobecker <brobecker@adacore.com>
4519
4520 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4521
69c1e056
TT
45222017-09-05 Tom Tromey <tom@tromey.com>
4523
4524 * parse.c (funcall_chain): Now a std::vector.
4525 (start_arglist, end_arglist): Simplify.
4526 (free_funcalls): Remove.
4527 (parse_exp_in_context_1): Remove cleanup.
4528
fef704bf
TT
45292017-09-05 Tom Tromey <tom@tromey.com>
4530
4531 * go-exp.y (go_parse): Don't create a cleanup.
4532
5613c585
TT
45332017-09-05 Tom Tromey <tom@tromey.com>
4534
4535 * d-exp.y (PrimaryExpression): Use std::string.
4536 (d_parse): Don't create a cleanup.
4537
eae49211
TT
45382017-09-05 Tom Tromey <tom@tromey.com>
4539
4540 * utils.c (do_clear_parser_state): Remove.
4541 (make_cleanup_clear_parser_state): Remove.
4542 * p-exp.y (pascal_parse): Use scoped_restore.
4543 * m2-exp.y (m2_parse): Use scoped_restore.
4544 * f-exp.y (f_parse): Use scoped_restore.
4545 * d-exp.y (d_parse): Use scoped_restore.
4546 * c-exp.y (c_parse): Use scoped_restore.
4547 * ada-exp.y (ada_parse): Use scoped_restore.
4548 * utils.h (make_cleanup_clear_parser_state): Remove.
4549
73b9be8b
KS
45502017-09-06 Keith Seitz <keiths@redhat.com>
4551
4552 * dwarf2read.c (dw2_linkage_name_attr): New function.
4553 (dw2_linkage_name): New function.
4554 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4555 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4556 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4557
a102602b
KR
45582017-09-06 Kamil Rytarowski <n54@gmx.com>
4559
4560 * config/djgpp/djconfig.sh: Correct shell portability issue.
4561
28ad437d
KR
45622017-09-06 Kamil Rytarowski <n54@gmx.com>
4563
4564 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4565
351787dd
JB
45662017-09-06 John Baldwin <jhb@FreeBSD.org>
4567
4568 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4569 * NEWS: Mention new FreeBSD/mips native configuration.
4570 * configure.host: Add aarch64*-*-freebsd*.
4571 * configure.nat: Likewise.
4572 * aarch64-fbsd-nat.c: New file.
4573
c0f84956
JB
45742017-09-06 John Baldwin <jhb@FreeBSD.org>
4575
4576 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4577 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4578 * NEWS: Mention new FreeBSD/aarch64 target.
4579 * configure.tgt: Add aarch64*-*-freebsd*.
4580 * aarch64-fbsd-tdep.c: New file.
4581 * aarch64-fbsd-tdep.h: New file.
4582
7610297a
KR
45832017-09-06 Kamil Rytarowski <n54@gmx.com>
4584
4585 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4586
fbd1b771
JK
45872017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4588
4589 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4590 of TLS symbols.
4591
5ca79eae
PW
45922017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4593
4594 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4595 call.
4596
bf93d7ba
SM
45972017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4598
4599 * infrun.c (follow_exec): Call add_thread after
4600 target_find_description.
4601
1bb7c059
SM
46022017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4603
4604 * infrun.c (handle_inferior_event_1): When exec'ing, read
4605 stop_pc after follow_exec.
4606
fc809827
SM
46072017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4608
4609 * remote.c (process_g_packet): Update error message.
4610
d2fcdd85
YQ
46112017-09-05 Yao Qi <yao.qi@linaro.org>
4612
4613 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4614 targets.
4615
e69570ee
PA
46162017-09-05 Pedro Alves <palves@redhat.com>
4617
4618 * eval.c (eval_call, evaluate_funcall): New functions, factored
4619 out from ...
4620 (evaluate_subexp_standard): ... this.
4621
22916b07
YQ
46222017-09-05 Yao Qi <yao.qi@linaro.org>
4623
4624 * amd64-tdep.c (amd64_target_description): Create target
4625 descriptions.
4626 (_initialize_amd64_tdep): Don't call functions
4627 initialize_tdesc_amd64_*. Add self tests.
4628 * arch/amd64.c (amd64_create_target_description): Add parameter
4629 is_linux. Call set_tdesc_osabi if is_linux is true.
4630 * arch/amd64.h (amd64_create_target_description): Update the
4631 declaration.
4632 * arch/i386.c (i386_create_target_description): Add parameter
4633 is_linux. Call set_tdesc_osabi if is_linux is true.
4634 * arch/i386.h (i386_create_target_description): Update
4635 declaration.
4636 * configure.tgt: Add i386.o to gdb_target_obs.
4637 * features/Makefile (XMLTOC): Remove i386/*.xml.
4638 * features/i386/amd64-avx-avx512.c: Remove.
4639 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4640 * features/i386/amd64-avx-mpx.c: Remove.
4641 * features/i386/amd64-avx.c: Remove.
4642 * features/i386/amd64-mpx.c: Remove.
4643 * features/i386/amd64.c: Remove.
4644 * features/i386/i386-avx-avx512.c: Remove.
4645 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4646 * features/i386/i386-avx-mpx.c: Remove.
4647 * features/i386/i386-avx.c: Remove.
4648 * features/i386/i386-mmx.c: Remove.
4649 * features/i386/i386-mpx.c: Remove.
4650 * features/i386/i386.c: Remove.
4651 * i386-tdep.c: Don't include features/i386/i386*.c., include
4652 target-descriptions.h and arch/i386.h.
4653 (i386_target_description): Create target descriptions.
4654 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4655 functions. Do self tests.
4656
0854b7b1
YQ
46572017-09-05 Yao Qi <yao.qi@linaro.org>
4658
4659 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4660 * features/i386/amd64-avx-avx512-linux.c: Removed.
4661 * features/i386/amd64-avx-linux.c: Removed.
4662 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4663 * features/i386/amd64-avx-mpx-linux.c: Removed.
4664 * features/i386/amd64-linux.c: Removed.
4665 * features/i386/amd64-mpx-linux.c: Removed.
4666 * features/i386/x32-avx-avx512-linux.c: Removed.
4667 * features/i386/x32-avx-linux.c: Removed.
4668 * features/i386/x32-linux.c: Removed.
4669
b4570e4b
YQ
46702017-09-05 Yao Qi <yao.qi@linaro.org>
4671
4672 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4673 features/i386/*.c.
4674 (amd64_linux_read_description): Call
4675 amd64_create_target_description.
4676 * arch/amd64.c: New file.
4677 * arch/amd64.h: New file.
4678 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4679 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4680
6c73f67f
YQ
46812017-09-05 Yao Qi <yao.qi@linaro.org>
4682
4683 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4684 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4685 (amd64_linux_read_description): Create target descriptions.
4686 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4687 functions. Add unit tests.
4688 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4689 x32-core.xml.
4690 * features/i386/64bit-avx.c: Generated.
4691 * features/i386/64bit-avx512.c: Generated.
4692 * features/i386/64bit-core.c: Generated.
4693 * features/i386/64bit-linux.c: Generated.
4694 * features/i386/64bit-mpx.c: Generated.
4695 * features/i386/64bit-pkeys.c: Generated.
4696 * features/i386/64bit-segments.c: Generated.
4697 * features/i386/64bit-sse.c: Generated.
4698 * features/i386/x32-core.c: Generated.
4699 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4700 c files for amd64-linux and x32-linux.
4701
9d3d478b
YQ
47022017-09-05 Yao Qi <yao.qi@linaro.org>
4703
4704 * amd64-linux-tdep.c (amd64_linux_read_description): New
4705 function.
4706 (amd64_linux_core_read_description): Call
4707 amd64_linux_read_description.
4708 (amd64_linux_init_abi): Likewise.
4709 (amd64_x32_linux_init_abi): Likewise.
4710 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4711 * x86-linux-nat.c (x86_linux_read_description): Call
4712 amd64_linux_read_description.
4713
b9f1d50f
YQ
47142017-09-05 Yao Qi <yao.qi@linaro.org>
4715
4716 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4717 comments.
4718
188c9e6d
YQ
47192017-09-05 Yao Qi <yao.qi@linaro.org>
4720
4721 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4722 * features/i386/i386-avx-avx512-linux.c: Remove.
4723 * features/i386/i386-avx-linux.c: Remove.
4724 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4725 * features/i386/i386-avx-mpx-linux.c: Remove.
4726 * features/i386/i386-linux.c: Remove.
4727 * features/i386/i386-mmx-linux.c: Remove.
4728 * features/i386/i386-mpx-linux.c: Remove.
4729
5f035c07
YQ
47302017-09-05 Yao Qi <yao.qi@linaro.org>
4731
4732 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4733 (SFILES): Add arch/i386.c.
4734 (HFILES_NO_SRCDIR): Add arch/i386.h.
4735 * arch/i386.c: New file.
4736 * arch/i386.h: New file.
4737 * arch/tdesc.h (allocate_target_description): Declare.
4738 (set_tdesc_architecture): Declare.
4739 (set_tdesc_osabi): Declare.
4740 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4741 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4742 include arch/i386.h.
4743 (i386_linux_read_description): Remove code and call
4744 i386_create_target_description.
4745 (set_tdesc_architecture): New function.
4746 (set_tdesc_osabi): New function.
4747 * target-descriptions.h (allocate_target_description): Remove.
4748
0abe8a89
YQ
47492017-09-05 Yao Qi <yao.qi@linaro.org>
4750
4751 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4752 * target-descriptions.c (tdesc_create_feature): Likewise, and
4753 adjust code.
4754 * features/i386/32bit-avx.c: Re-generated.
4755 * features/i386/32bit-avx512.c: Re-generated.
4756 * features/i386/32bit-core.c: Re-generated.
4757 * features/i386/32bit-linux.c: Re-generated.
4758 * features/i386/32bit-mpx.c: Re-generated.
4759 * features/i386/32bit-pkeys.c: Re-generated.
4760 * features/i386/32bit-sse.c: Re-generated.
4761
0a188386
YQ
47622017-09-05 Yao Qi <yao.qi@linaro.org>
4763
4764 * regformats/regdef.h (struct reg): Override operator == and !=.
4765
f49ff000
YQ
47662017-09-05 Yao Qi <yao.qi@linaro.org>
4767
4768 * arch/tdesc.h: New file.
4769 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4770 * target-descriptions.c: Update comments.
4771 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4772 declarations.
4773 * features/i386/32bit-avx.c: Re-generated.
4774 * features/i386/32bit-avx512.c: Re-generated.
4775 * features/i386/32bit-core.c: Re-generated.
4776 * features/i386/32bit-linux.c: Re-generated.
4777 * features/i386/32bit-mpx.c: Re-generated.
4778 * features/i386/32bit-pkeys.c: Re-generated.
4779 * features/i386/32bit-sse.c: Re-generated.
4780
f7000548
YQ
47812017-09-05 Yao Qi <yao.qi@linaro.org>
4782
4783 * regformats/regdat.sh: Update generated code.
4784
c9a5e2a5
YQ
47852017-09-05 Yao Qi <yao.qi@linaro.org>
4786
4787 * regformats/regdat.sh: Adjust code order.
4788
d6b687ac
SM
47892017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4790
4791 * expprint.c (dump_subexp_body_standard): Use constant format
4792 string in fprintf_filtered call.
4793
a379bfd0
JB
47942017-09-04 John Baldwin <jhb@FreeBSD.org>
4795
4796 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4797 NetBSD/i386.
4798 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4799
f7efc967
JB
48002017-09-04 John Baldwin <jhb@FreeBSD.org>
4801
4802 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4803
c49fbc6c
JB
48042017-09-04 John Baldwin <jhb@FreeBSD.org>
4805
4806 * bsd-kvm.o: Define _KMEMUSER.
4807 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4808 * configure: Regenerate.
4809
26562e73
JB
48102017-09-04 John Baldwin <jhb@FreeBSD.org>
4811
4812 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4813 * i386-fbsd-nat.c: Likewise.
4814
31cf1487
JB
48152017-09-04 John Baldwin <jhb@FreeBSD.org>
4816
4817 * unittests/array-view-selftests.c: Add include of <array>.
4818
5b9f8a7c
JB
48192017-09-04 John Baldwin <jhb@FreeBSD.org>
4820
4821 * spu-tdep.c (flush_ea_cache): Add missing argument to
4822 call_function_by_hand.
4823
d69cf9b2
PA
48242017-09-04 Pedro Alves <palves@redhat.com>
4825
4826 * NEWS (Safer support for debugging with no debug info): New.
4827
3693fdb3
PA
48282017-09-04 Pedro Alves <palves@redhat.com>
4829
4830 * c-exp.y (function_method, function_method_void): Add current
4831 instance flags to TYPE_INSTANCE.
4832 * dwarf2read.c (check_modifier): New.
4833 (compute_delayed_physnames): Assert that only C++ adds delayed
4834 physnames. Mark fn_fields as const/volatile depending on
4835 physname.
4836 * eval.c (make_params): New type_instance_flags parameter. Use
4837 it as the new type's instance flags.
4838 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4839 flags element and pass it to make_params.
4840 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4841 instance flags element.
4842 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4843 * gdbtypes.h: Include "enum-flags.h".
4844 (type_instance_flags): New enum-flags type.
4845 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4846 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4847 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4848 (follow_type_instance_flags): New function.
4849 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4850 * parser-defs.h (follow_type_instance_flags): Declare.
4851 * valops.c (value_struct_elt_for_reference): const/volatile must
4852 match too.
4853
e68cb8e0
PA
48542017-09-04 Pedro Alves <palves@redhat.com>
4855
4856 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4857 function/method scopes; lookup the nested name as a function local
4858 static variable.
4859
858be34c
PA
48602017-09-04 Pedro Alves <palves@redhat.com>
4861
4862 (%type <voidval>): Add function_method.
4863 * c-exp.y (exp): New production for calls with no arguments.
4864 (function_method, function_method_void_or_typelist): New
4865 productions.
4866 (exp): New production for "method()::static_var".
4867 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4868 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4869 Handle OP_FUNC_STATIC_VAR.
4870 * parse.c (operator_length_standard):
4871 Handle OP_FUNC_STATIC_VAR.
4872
dd5901a6
PA
48732017-09-04 Pedro Alves <palves@redhat.com>
4874
4875 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4876 handling.
4877 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4878 Ditto.
4879 * parse.c (operator_length_standard, operator_check_standard):
4880 Ditto.
4881 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4882
46a4882b
PA
48832017-09-04 Pedro Alves <palves@redhat.com>
4884
4885 * ax-gdb.c: Include "typeprint.h".
4886 (gen_expr_for_cast): New function.
4887 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4888 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4889 type is unknown.
4890 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4891 nodebug_data_symbol.
4892 * eval.c: Include "typeprint.h".
4893 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4894 Error out if symbol has unknown type.
4895 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4896 evaluate_subexp_for_cast.
4897 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4898 OP_VAR_MSYM_VALUE.
4899 (evaluate_subexp_for_cast): New function.
4900 * gdbtypes.c (init_nodebug_var_type): New function.
4901 (objfile_type): Use it to initialize types of variables with no
4902 debug info.
4903 * typeprint.c (error_unknown_type): New.
4904 * typeprint.h (error_unknown_type): New declaration.
4905 * compile/compile-c-types.c (convert_type_basic): Handle
4906 TYPE_CODE_ERROR; warn and fallback to int for variables with
4907 unknown type.
4908
fe13dfec
PA
49092017-09-04 Pedro Alves <palves@redhat.com>
4910
4911 * eval.c (evaluate_var_value): New function, factored out from ...
4912 (evaluate_subexp_standard): ... here.
4913
d008ee21
PA
49142017-09-04 Pedro Alves <palves@redhat.com>
4915
4916 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4917 Remove useless assignments to 'op'.
4918
827d0c51
PA
49192017-09-04 Pedro Alves <palves@redhat.com>
4920
4921 * eval.c (eval_skip_value): New function.
4922 (evaluate_subexp_standard): Use it.
4923
2c5a2be1
PA
49242017-09-04 Pedro Alves <palves@redhat.com>
4925
4926 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4927 function name from symbol/minsym and pass it to
4928 error_call_unknown_return_type.
4929
74ea4be4
PA
49302017-09-04 Pedro Alves <palves@redhat.com>
4931
4932 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4933 * ax-gdb.c (gen_msym_var_ref): New function.
4934 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4935 * eval.c (evaluate_var_msym_value): New function.
4936 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4937 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4938 to call_function_by_hand.
4939 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4940 Handle OP_VAR_MSYM_VALUE.
4941 (union exp_element) <msymbol>: New field.
4942 * minsyms.h (struct type): Forward declare.
4943 (find_minsym_type_and_address): Declare.
4944 * parse.c (write_exp_elt_msym): New function.
4945 (write_exp_msymbol): Delete, refactored as ...
4946 (find_minsym_type_and_address): ... this new function.
4947 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4948 (operator_length_standard, operator_check_standard): Handle
4949 OP_VAR_MSYM_VALUE.
4950 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4951
7022349d
PA
49522017-09-04 Pedro Alves <palves@redhat.com>
4953
4954 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4955 TYPE_GNU_IFUNC specially here. Throw error if return type is
4956 unknown.
4957 * ada-typeprint.c (print_func_type): Handle functions with unknown
4958 return type.
4959 * c-typeprint.c (c_type_print_base): Handle functions and methods
4960 with unknown return type.
4961 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4962 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4963 * compile/compile-c-types.c: Include "objfiles.h".
4964 (convert_func): For functions with unknown return type, warn and
4965 default to int.
4966 * compile/compile-object-run.c (compile_object_run): Adjust call
4967 to call_function_by_hand_dummy.
4968 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4969 call_function_by_hand.
4970 * eval.c (evaluate_subexp_standard): Adjust calls to
4971 call_function_by_hand. Handle functions and methods with unknown
4972 return type. Pass expect_type to call_function_by_hand.
4973 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4974 return type.
4975 * gcore.c (call_target_sbrk): Adjust call to
4976 call_function_by_hand.
4977 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
4978 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
4979 an integer address type instead of nodebug.
4980 * guile/scm-value.c (gdbscm_value_call): Adjust call to
4981 call_function_by_hand.
4982 * infcall.c (error_call_unknown_return_type): New function.
4983 (call_function_by_hand): New "default_return_type" parameter.
4984 Pass it down.
4985 (call_function_by_hand_dummy): New "default_return_type"
4986 parameter. Use it instead of defaulting to int. If there's no
4987 default and the return type is unknown, throw an error. If
4988 there's a default return type, and the called function has no
4989 debug info, then assume the function is prototyped.
4990 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
4991 New "default_return_type" parameter.
4992 (error_call_unknown_return_type): New declaration.
4993 * linux-fork.c (call_lseek): Cast return type of lseek.
4994 (inferior_call_waitpid, checkpoint_command): Adjust calls to
4995 call_function_by_hand.
4996 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
4997 calls to call_function_by_hand.
4998 * m2-typeprint.c (m2_procedure): Handle functions with unknown
4999 return type.
5000 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5001 (value_nsstring, print_object_command): Adjust calls to
5002 call_function_by_hand.
5003 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5004 functions with unknown return type.
5005 (pascal_type_print_func_varspec_suffix): New function.
5006 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5007 TYPE_CODE_METHOD>: Use it.
5008 * python/py-value.c (valpy_call): Adjust call to
5009 call_function_by_hand.
5010 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5011 call_function_by_hand.
5012 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5013 call_function_by_hand.
5014 * valops.c (value_allocate_space_in_inferior): Adjust call to
5015 call_function_by_hand.
5016 * typeprint.c (type_print_unknown_return_type): New function.
5017 * typeprint.h (type_print_unknown_return_type): New declaration.
5018
54990598
PA
50192017-09-04 Pedro Alves <palves@redhat.com>
5020
5021 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5022 types with more than one parameter as prototyped.
5023
9a24775b
PA
50242017-09-04 Pedro Alves <palves@redhat.com>
5025
5026 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5027 (disassemble_command): Use gdb_disassembly_flags instead of bare
5028 int.
5029 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5030 (dump_insns, do_mixed_source_and_assembly_deprecated)
5031 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5032 Use gdb_disassembly_flags instead of bare int.
5033 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5034 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5035 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5036 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5037 (enum gdb_disassembly_flag): ... values of this new enumeration.
5038 (gdb_disassembly_flags): Define.
5039 (gdb_disassembly)
5040 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5041 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5042 gdb_disassembly_flags instead of bare int.
5043 * record-btrace.c (btrace_insn_history)
5044 (record_btrace_insn_history, record_btrace_insn_history_range)
5045 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5046 instead of bare int.
5047 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5048 Use gdb_disassembly_flags instead of bare int.
5049 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5050 Define.
5051 * target-delegates.c: Regenerate.
5052 * target.c (target_insn_history, target_insn_history_from)
5053 (target_insn_history_range): Use gdb_disassembly_flags instead of
5054 bare int.
5055 * target.h: Include "disasm.h".
5056 (struct target_ops) <to_insn_history, to_insn_history_from,
5057 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5058 int.
5059 (target_insn_history, target_insn_history_from)
5060 (target_insn_history_range): Use gdb_disassembly_flags instead of
5061 bare int.
5062
80a65e9b
SM
50632017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * cli/cli-script.c (build_command_line): For if/while commands,
5066 check whether args is empty.
5067
6b66338c
SM
50682017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5069
5070 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5071 (enum command_control_type): Likewise.
5072 (struct command_line): Likewise.
5073 (free_command_lines): Likewise.
5074 (struct command_lines_deleter): Likewise.
5075 (command_line_up): Likewise.
5076 (read_command_lines): Likewise.
5077 (read_command_lines_1): Likewise.
5078 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5079 (enum command_control_type): Likewise.
5080 (struct command_line): Likewise.
5081 (free_command_lines): Likewise.
5082 (struct command_lines_deleter): Likewise.
5083 (command_line_up): Likewise.
5084 (read_command_lines): Likewise.
5085 (read_command_lines_1): Likewise.
5086 * breakpoint.h: Include cli/cli-script.h.
5087 * extension-priv.h: Likewise.
5088 * gdbcmd.h: Likewise.
5089
51abb421
PA
50902017-09-04 Pedro Alves <palves@redhat.com>
5091
5092 * ada-lang.c (is_known_support_routine): Move sal declaration to
5093 where it is initialized.
5094 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5095 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5096 (clear_command, update_static_tracepoint): Remove init_sal
5097 references. Move declarations closer to initializations.
5098 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5099 initializations.
5100 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5101 references. Move sal declarations closer to initializations.
5102 * frame.c (find_frame_sal): Return a symtab_and_line via function
5103 return instead of output parameter. Remove init_sal references.
5104 * frame.h (find_frame_sal): Return a symtab_and_line via function
5105 return instead of output parameter.
5106 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5107 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5108 instead of memset.
5109 (gdbscm_find_pc_line): Remove init_sal reference.
5110 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5111 references. Move declarations closer to initializations.
5112 * infcmd.c (set_step_frame): Update. Move declarations closer to
5113 initializations.
5114 (finish_backward): Remove init_sal references. Move declarations
5115 closer to initializations.
5116 * infrun.c (process_event_stop_test, handle_step_into_function)
5117 (insert_hp_step_resume_breakpoint_at_frame)
5118 (insert_step_resume_breakpoint_at_caller): Likewise.
5119 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5120 (symbol_to_sal): Likewise.
5121 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5122 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5123 to its initialization.
5124 * reverse.c (save_bookmark_command): Use new/delete. Remove
5125 init_sal references. Move declarations closer to initializations.
5126 * source.c (get_current_source_symtab_and_line): Remove brace
5127 initialization.
5128 (set_current_source_symtab_and_line): Now takes the sal by const
5129 reference. Remove brace initialization.
5130 (line_info): Remove init_sal reference.
5131 * source.h (set_current_source_symtab_and_line): Now takes a
5132 symtab_and_line via const reference.
5133 * stack.c (set_current_sal_from_frame): Adjust.
5134 (print_frame_info): Adjust.
5135 (get_last_displayed_sal): Return the sal via function return
5136 instead of via output parameter. Simplify.
5137 (frame_info): Adjust.
5138 * stack.h (get_last_displayed_sal): Return the sal via function
5139 return instead of via output parameter.
5140 * symtab.c (init_sal): Delete.
5141 (find_pc_sect_line): Remove init_sal references. Move
5142 declarations closer to initializations.
5143 (find_function_start_sal): Remove init_sal references. Move
5144 declarations closer to initializations.
5145 * symtab.h (struct symtab_and_line): In-class initialize all
5146 fields.
5147 * tracepoint.c (set_traceframe_context)
5148 (print_one_static_tracepoint_marker): Remove init_sal references.
5149 Move declarations closer to initializations.
5150 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5151 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5152 declarations closer to initializations.
5153 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5154 init_sal references. Adjust.
5155
6c5b2ebe
PA
51562017-09-04 Pedro Alves <palves@redhat.com>
5157
5158 * ax-gdb.c (agent_command_1): Use range-for.
5159 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5160 * breakpoint.c: Include "common/array-view.h".
5161 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5162 parameter from struct symtabs_and_lines to
5163 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5164 (breakpoint_sals_to_pc): Change sals parameter from struct
5165 symtabs_and_lines to std::vector reference.
5166 (check_fast_tracepoint_sals): Change sals parameter from struct
5167 symtabs_and_lines to std::array_view. Use range-for.
5168 (decode_static_tracepoint_spec): Return a std::vector instead of
5169 symtabs_and_lines. Update.
5170 (create_breakpoint): Update.
5171 (break_range_command, until_break_command, clear_command): Update.
5172 (base_breakpoint_decode_location, bkpt_decode_location)
5173 (bkpt_probe_create_sals_from_location)
5174 (bkpt_probe_decode_location, tracepoint_decode_location)
5175 (tracepoint_probe_decode_location)
5176 (strace_marker_create_sals_from_location): Return a std::vector
5177 instead of symtabs_and_lines.
5178 (strace_marker_create_breakpoints_sal): Update.
5179 (strace_marker_decode_location): Return a std::vector instead of
5180 symtabs_and_lines. Update.
5181 (update_breakpoint_locations): Change struct symtabs_and_lines
5182 parameters to gdb::array_view. Adjust.
5183 (location_to_sals): Return a std::vector instead of
5184 symtabs_and_lines. Update.
5185 (breakpoint_re_set_default): Use std::vector instead of struct
5186 symtabs_and_lines.
5187 (decode_location_default): Return a std::vector instead of
5188 symtabs_and_lines. Update.
5189 * breakpoint.h: Include "common/array-view.h".
5190 (struct breakpoint_ops) <decode_location>: Now returns a
5191 std::vector instead of returning a symtabs_and_lines via output
5192 parameter.
5193 (update_breakpoint_locations): Change sals parameters to use
5194 gdb::array_view.
5195 * cli/cli-cmds.c (edit_command, list_command): Update to use
5196 std::vector and gdb::array_view.
5197 (ambiguous_line_spec): Adjust to use gdb::array_view and
5198 range-for.
5199 (compare_symtabs): Rename to ...
5200 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5201 const reference and adjust.
5202 (filter_sals): Rewrite using std::vector and standard algorithms.
5203 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5204 (jump_command): Update to use std::vector.
5205 * linespec.c (struct linespec_state) <canonical_names>: Update
5206 comment.
5207 (add_sal_to_sals_basic): Delete.
5208 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5209 (decode_line_2, create_sals_line_offset)
5210 (convert_address_location_to_sals, convert_linespec_to_sals)
5211 (convert_explicit_location_to_sals, parse_linespec)
5212 (event_location_to_sals, decode_line_full, decode_line_1)
5213 (decode_line_with_current_source)
5214 (decode_line_with_last_displayed, decode_objc)
5215 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5216 (linespec_result::~linespec_result): Adjust to use std::vector
5217 instead of symtabs_and_lines.
5218 * linespec.h (linespec_sals::sals): Now a std::vector.
5219 (struct linespec_result): Use std::vector, bool, and in-class
5220 initialization.
5221 (decode_line_1, decode_line_with_current_source)
5222 (decode_line_with_last_displayed): Return std::vector.
5223 * macrocmd.c (info_macros_command): Use std::vector.
5224 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5225 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5226 std::vector.
5227 * probe.h (parse_probes): Return a std::vector.
5228 * python/python.c (gdbpy_decode_line): Use std::vector and
5229 gdb::array_view.
5230 * source.c (select_source_symtab, line_info): Use std::vector.
5231 * stack.c (func_command): Use std::vector.
5232 * symtab.h (struct symtabs_and_lines): Delete.
5233 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5234
7c44b49c
PA
52352017-09-04 Pedro Alves <palves@redhat.com>
5236
5237 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5238 unittests/array-view-selftests.c.
5239 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5240 * common/array-view.h: New file.
5241 * unittests/array-view-selftests.c: New file.
5242
e439fa14
PA
52432017-09-04 Pedro Alves <palves@redhat.com>
5244
5245 * cli/cli-cmds.c (edit_command): Pass message to
5246 ambiguous_line_spec.
5247 (list_command): Pass message to ambiguous_line_spec. Say
5248 "first"/"last" instead of "start" and "end" to be consistent with
5249 the manual.
5250 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5251 them to print formatted message.
5252
7525b645
PA
52532017-09-04 Pedro Alves <palves@redhat.com>
5254
5255 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5256 ftrace_update_insns by reference instead of pointer.
5257
badc0020
YQ
52582017-09-04 Yao Qi <yao.qi@linaro.org>
5259
5260 * i386-go32-tdep.c: Include x86-xstate.h.
5261 (i386_go32_init_abi): Call i386_target_description.
5262 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5263 if xcr0 is X86_XSTATE_X87_MASK.
5264 * i386-tdep.h (tdesc_i386): Remove the declaration.
5265 (tdesc_i386_mmx): Likewise.
5266
d78bdb54
YQ
52672017-09-04 Yao Qi <yao.qi@linaro.org>
5268
5269 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5270 X86_XSTATE_SSE_MASK instead of 0.
5271
ca1fa5ee
YQ
52722017-09-04 Yao Qi <yao.qi@linaro.org>
5273
5274 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5275 i386_target_description.
5276 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5277 i386_target_description.
5278 * i386-tdep.c (i386_gdbarch_init): Likewise.
5279
2434b019
YQ
52802017-09-04 Yao Qi <yao.qi@linaro.org>
5281
5282 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5283 (x86_darwin_init_abi_64): Call amd64_target_description.
5284 * amd64-dicos-tdep.c: Likewise.
5285 * amd64-fbsd-nat.c: Likewise.
5286 * amd64-fbsd-tdep.c: Likewise.
5287 * amd64-nbsd-tdep.c: Likewise.
5288 * amd64-obsd-tdep.c: Likewise.
5289 * amd64-sol2-tdep.c: Likewise.
5290 * amd64-windows-tdep.c: Likewise.
5291 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5292
0860c437
SM
52932017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5294
5295 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5296 (btrace_function) <insn>: Change type to use std::vector.
5297 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5298 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5299 ftrace_update_insns, ftrace_compute_global_level_offset,
5300 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5301 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5302 change to std::vector.
5303 (ftrace_update_insns): Adjust to change to std::vector, change
5304 type of INSN parameter.
5305 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5306 * record-btrace.c (btrace_call_history_insn_range,
5307 btrace_compute_src_line_range,
5308 record_btrace_frame_prev_register): Adjust to change to
5309 std::vector.
5310 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5311 to change to std::vector.
5312
0638b7f9
TT
53132017-09-03 Tom Tromey <tom@tromey.com>
5314
5315 * corefile.c (reopen_exec_file): Use std::string.
5316
8f84fb0e
TT
53172017-09-03 Tom Tromey <tom@tromey.com>
5318
5319 * compile/compile.c (compile_register_name_mangled): Return
5320 std::string.
5321 * compile/compile-loc2c.c (pushf_register_address): Update.
5322 (pushf_register): Update.
5323 * compile/compile-c-types.c (convert_array): Update.
5324 * compile/compile-c-symbols.c (generate_vla_size): Update.
5325 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5326 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5327 (convert_one_symbol): Update.
5328 (generate_c_for_for_one_variable): Update.
5329 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5330 std::string.
5331 (generate_register_struct): Update.
5332 * compile/compile-internal.h (c_get_range_decl_name): Return a
5333 std::string.
5334 (compile_register_name_mangled): Return std::string.
5335
18e9961f
TT
53362017-09-03 Tom Tromey <tom@tromey.com>
5337
5338 * utils.c (perror_string): Return a std::string.
5339 (throw_perror_with_name, perror_warning_with_name): Update.
5340
45343786
TT
53412017-09-03 Tom Tromey <tom@tromey.com>
5342
5343 * demangle.c (demangle_command): Use std::string,
5344 unique_xmalloc_ptr.
5345
b57af503
TT
53462017-09-03 Tom Tromey <tom@tromey.com>
5347
5348 * cli/cli-setshow.c (do_set_command): Use std::string.
5349
6eecf35f
TT
53502017-09-03 Tom Tromey <tom@tromey.com>
5351
5352 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5353
56496dd4
TT
53542017-09-03 Tom Tromey <tom@tromey.com>
5355
5356 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5357
e91a1fa7
TT
53582017-09-03 Tom Tromey <tom@tromey.com>
5359
5360 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5361 gdb::unique_xmalloc_ptr.
5362
7ffd83d7
TT
53632017-09-03 Tom Tromey <tom@tromey.com>
5364
5365 * thread.c (print_thread_info_1): Use string_printf.
5366 (thread_apply_command, thread_apply_all_command): Use
5367 std::string.
5368
1ccbe998
TT
53692017-09-03 Tom Tromey <tom@tromey.com>
5370
5371 * valprint.c (val_print_string): Update.
5372 * gdbcore.h (memory_error_message): Return std::string.
5373 * corefile.c (memory_error_message): Return std::string.
5374 (memory_error): Update.
5375 * breakpoint.c (insert_bp_location): Update.
5376
23fdd69e
SM
53772017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5378
5379 * target/waitstatus.h (target_waitstatus_to_string): Change
5380 return type to std::string.
5381 * target/waitstatus.c (target_waitstatus_to_string): Return
5382 std::string.
5383 * target.h (target_waitstatus_to_string): Remove declaration.
5384 * infrun.c (resume, clear_proceed_status_thread,
5385 print_target_wait_results, do_target_wait, save_waitstatus,
5386 stop_all_threads): Adjust.
5387 * record-btrace.c (record_btrace_wait): Adjust.
5388 * target-debug.h
5389 (target_debug_print_struct_target_waitstatus_p): Adjust.
5390
5c811d30
JK
53912017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5392
5393 PR gdb/22046
5394 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5395 detection.
5396
0a2dde4a
SDJ
53972017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5398
5399 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5400 for setting/unsetting environment variables on the remote target.
5401 (New remote packets): Add entries for QEnvironmentHexEncoded,
5402 QEnvironmentUnset and QEnvironmentReset.
5403 * common/environ.c (gdb_environ::operator=): Extend method to
5404 handle m_user_set_env_list and m_user_unset_env_list.
5405 (gdb_environ::clear): Likewise.
5406 (match_var_in_string): Change type of first parameter from 'char
5407 *' to 'const char *'.
5408 (gdb_environ::set): Extend method to handle
5409 m_user_set_env_list and m_user_unset_env_list.
5410 (gdb_environ::unset): Likewise.
5411 (gdb_environ::clear_user_set_env): New method.
5412 (gdb_environ::user_set_envp): Likewise.
5413 (gdb_environ::user_unset_envp): Likewise.
5414 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5415 m_user_unset_env_list on move constructor/assignment.
5416 (unset): Add new default parameter 'update_unset_list = true'.
5417 (clear_user_set_env): New method.
5418 (user_set_envp): Likewise.
5419 (user_unset_envp): Likewise.
5420 (m_user_set_env_list): New std::set.
5421 (m_user_unset_env_list): Likewise.
5422 * common/rsp-low.c (hex2str): New function.
5423 (bin2hex): New overload for bin2hex function.
5424 * common/rsp-low.c (hex2str): New prototype.
5425 (str2hex): New overload prototype.
5426 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5427 QEnvironmentUnset and QEnvironmentReset.
5428 (remote_protocol_features): Add QEnvironmentHexEncoded,
5429 QEnvironmentUnset and QEnvironmentReset packets.
5430 (send_environment_packet): New function.
5431 (extended_remote_environment_support): Likewise.
5432 (extended_remote_create_inferior): Call
5433 extended_remote_environment_support.
5434 (_initialize_remote): Add QEnvironmentHexEncoded,
5435 QEnvironmentUnset and QEnvironmentReset packet configs.
5436 * unittests/environ-selftests.c (gdb_selftest_env_var):
5437 New variable.
5438 (test_vector_initialization): New function.
5439 (test_init_from_host_environ): Likewise.
5440 (test_reinit_from_host_environ): Likewise.
5441 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5442 Likewise.
5443 (test_unset_set_empty_vector): Likewise.
5444 (test_vector_clear): Likewise.
5445 (test_std_move): Likewise.
5446 (test_move_constructor):
5447 (test_self_move): Likewise.
5448 (test_set_unset_reset): Likewise.
5449 (run_tests): Rewrite in terms of the functions above.
5450
654670a4
WP
54512017-08-31 Weimin Pan <weimin.pan@oracle.com>
5452
5453 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5454 (adi_available): Use a temp variable of type CORE_ADDR as argument
5455 3 when calling target_auxv_search.
5456 (adi_normalize_address): Use masks and xor operators to calculate
5457 normalized address.
5458 (adi_read_versions, adi_write_versions, adi_print_versions)
5459 (do_examine, do_assign): Use paddress.
5460
7755ddb7
JB
54612017-08-29 John Baldwin <jhb@FreeBSD.org>
5462
5463 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5464 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5465 out of loop and add supply of FIR.
5466 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5467 add collect of FIR.
5468
fd437cbc
SM
54692017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5470
3804a343 5471 PR gdb/21827
fd437cbc
SM
5472 * cli/cli-script.c (define_command): Don't convert command name
5473 to lower case.
5474
988f6b3d
JB
54752017-08-25 Joel Brobecker <brobecker@adacore.com>
5476
5477 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5478 Update all callers accordingly. Remove all code blocks handling
5479 the case where DISPP is not NULL.
5480
663c44ac
JK
54812017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5482
5483 PR symtab/22003
5484 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5485 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5486 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5487
f1902523
JK
54882017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5489
5490 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5491 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5492 (read_comp_units_from_section): New parameter abbrev_section, use
5493 read_and_check_comp_unit_head, allocate signatured_type if needed.
5494 (create_all_comp_units): Update read_comp_units_from_section caller.
5495
87215ad1
SDJ
54962017-08-23 Pedro Alves <palves@redhat.com>
5497
5498 PR remote/21852
5499 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5500 to null_ptid and switch to thread without reading the registers
5501 after adding the inferior.
5502
6e41ddec
JK
55032017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5504
5505 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5506 compile-gcc.
5507 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5508 (compile_to_object): Implement compile_gcc.
5509 (_initialize_compile): Install "set compile-gcc". Initialize
5510 compile_gcc.
5511
e68c32d5
JK
55122017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5513
5514 * compile/compile.c (compile_to_object): Conditionally call
5515 set_verbose. Conditionally call compile or compile_v0.
5516
58afddc6
WP
55172017-08-07 Weimin Pan <weimin.pan@oracle.com>
5518
5519 * sparc64-tdep.h: (adi_normalize_address): New export.
5520 * sparc-nat.h: (open_adi_tag_fd): New export.
5521 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5522 * sparc64-linux-tdep.c:
5523 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5524 (sparc64_linux_handle_segmentation_fault): New function.
5525 (sparc64_linux_init_abi): Register
5526 sparc64_linux_handle_segmentation_fault
5527 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5528 (sparc64_addr_bits_remove): New function.
5529 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5530 (MAX_PROC_NAME_SIZE): New macro.
5531 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5532 (sparc64adilist): New variable.
5533 (adi_proc_list): New variable.
5534 (find_adi_info): New function.
5535 (add_adi_info): New function.
5536 (get_adi_info_proc): New function.
5537 (get_adi_info): New function.
5538 (info_adi_command): New function.
5539 (read_maps_entry): New function.
5540 (adi_available): New function.
5541 (adi_normalize_address): New function.
5542 (adi_align_address): New function.
5543 (adi_convert_byte_count): New function.
5544 (adi_tag_fd): New function.
5545 (adi_is_addr_mapped): New function.
5546 (adi_read_versions): New function.
5547 (adi_write_versions): New function.
5548 (adi_print_versions): New function.
5549 (do_examine): New function.
5550 (do_assign): New function.
5551 (adi_examine_command): New function.
5552 (adi_assign_command): New function.
5553 (_initialize_sparc64_adi_tdep): New function.
5554
11db9430
SM
55552017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5556
5557 * breakpoint.c (breakpoints_info): Rename to ...
5558 (info_breakpoints_command): ... this.
5559 (watchpoints_info): Rename to ...
5560 (info_watchpoints_command): ... this.
5561 (tracepoints_info): Rename to ...
5562 (info_tracepoints_command): ... this.
5563 (_initialize_breakpoint): Adjust.
5564 * dcache.c (dcache_info): Rename to ...
5565 (info_display_command): ... this.
5566 (_initialize_dcache): Adjust.
5567 * frame.h (args_info): Rename to ...
5568 (info_args_command): ... this.
5569 (locals_info): Rename to ...
5570 (info_locals_command): ... this.
5571 * infcmd.c (nofp_registers_info): Rename to ...
5572 (info_registers_command): ... this.
5573 (float_info): Rename to ...
5574 (info_float_command): ... this.
5575 (program_info): Rename to ...
5576 (info_program_command): ... this.
5577 (all_registers_info): Rename to ...
5578 (info_all_registers_command): ... this.
5579 (vector_info): Rename to ...
5580 (info_vector_command): ... this.
5581 (float_info): Rename to ...
5582 (info_float_command): ... this.
5583 (_initialize_infcmd): Adjust.
5584 * inferior.h (term_info): Rename to ...
5585 (info_terminal_command): ... this.
5586 * inflow.c (term_info): Rename to ...
5587 (info_terminal_command): ... this.
5588 (_initialize_inflow): Adjust.
5589 * infrun.c (signals_info): Rename to ...
5590 (info_signals_command): ... this.
5591 (_initialize_infrun): Adjust.
5592 * objc-lang.c (classes_info): Rename to ...
5593 (info_classes_command): ... this.
5594 (selectors_info): Rename to ...
5595 (info_selectors_command): ... this.
5596 (_initialize_objc_language): Adjust.
5597 * printcmd.c (sym_info): Rename to ...
5598 (info_symbol_command): ... this.
5599 (address_info): Rename to ...
5600 (info_address_command): ... this.
5601 (display_info): Rename to ...
5602 (info_display_command): ... this.
5603 (_initialize_printcmd): Adjust.
5604 * reverse.c (bookmarks_info): Rename to ...
5605 (info_breakpoints_command): ... this.
5606 (_initialize_reverse): Adjust.
5607 * ser-go32.c (dos_info): Rename to ...
5608 (info_serial_command): ... this.
5609 (_initialize_ser_dos): Adjust.
5610 * skip.c (skip_info): Rename to ...
5611 (info_skip_command): ... this.
5612 (_initialize_step_skip): Adjust.
5613 * source.c (line_info): Rename to ...
5614 (info_line_command): ... this.
5615 (source_info): Rename to ...
5616 (info_source_command)
5617 * stack.c (frame_info): Rename to ...
5618 (info_frame_command): ... this.
5619 (locals_info): Rename to ...
5620 (info_locals_command): ... this.
5621 (args_info): Rename to ...
5622 (info_args_command): ... this.
5623 (_initialize_stack): Adjust.
5624 * symtab.c (sources_info): Rename to ...
5625 (info_sources_command): ... this.
5626 (variables_info): Rename to ...
5627 (info_variables_command): ... this.
5628 (functions_info): Rename to ...
5629 (info_functions_command): ... this.
5630 (types_info): Rename to ...
5631 (info_types_command): ... this.
5632 (_initialize_symtab): Adjust.
5633 * target.c (target_info): Rename to ...
5634 (info_target_command): ... this.
5635 (initialize_targets): Adjust.
5636 * tracepoint.c (tvariables_info): Rename to ...
5637 (info_tvariables_command): ... this.
5638 (scope_info): Rename to ...
5639 (info_scope_command): ... this.
5640 (trace_dump_actions): Adjust.
5641 (_initialize_tracepoint): Adjust.
5642
b270e6f9
TT
56432017-08-22 Tom Tromey <tom@tromey.com>
5644
5645 * breakpoint.h (install_breakpoint): Update.
5646 * breakpoint.c (add_solib_catchpoint): Update.
5647 (install_breakpoint): Change argument to a std::unique_ptr.
5648 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5649 (create_breakpoint_sal, create_breakpoint): Update.
5650 (watch_command_1, catch_exec_command_1)
5651 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5652 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5653 Return the breakpoint.
5654 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5655 (new_single_step_breakpoint): Update.
5656 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5657 std::unique_ptr.
5658 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5659 std::unique_ptr.
5660 * break-catch-sig.c (create_signal_catchpoint): Use
5661 std::unique_ptr.
5662 * ada-lang.c (create_ada_exception_catchpoint): Use
5663 std::unique_ptr.
5664
36bd8eaa
TT
56652017-08-22 Tom Tromey <tom@tromey.com>
5666
5667 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5668
56f37645
TT
56692017-08-22 Tom Tromey <tom@tromey.com>
5670
5671 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5672 (lookup_partial_symbol): Update.
5673
0b581c69
TT
56742017-08-22 Tom Tromey <tom@tromey.com>
5675
5676 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5677 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5678 (find_and_open_source, symtab_to_fullname): Update.
5679 * psymtab.c (psymtab_to_fullname): Update.
5680
14278e1f
TT
56812017-08-22 Tom Tromey <tom@tromey.com>
5682
5683 * exec.c (exec_file_attach): Update.
5684 * linux-thread-db.c (try_thread_db_load): Update.
5685 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5686 * utils.c (gdb_realpath): Change return type.
5687 (gdb_realpath_keepfile): Update.
5688 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5689 (_initialize_utils): Register the new self test.
5690 * source.c (openp): Update.
5691 (find_and_open_source): Update.
5692 * nto-tdep.c (nto_find_and_open_solib): Update.
5693 * main.c (set_gdb_data_directory): Update.
5694 (captured_main_1): Update.
5695 * dwarf2read.c (dwarf2_get_dwz_file): Update
5696 (dw2_map_symbol_filenames): Update.
5697 * auto-load.c (auto_load_safe_path_vec_update): Update.
5698 (filename_is_in_auto_load_safe_path_vec): Change type of
5699 "filename_realp".
5700 (auto_load_objfile_script): Update.
5701 (file_is_auto_load_safe): Update. Use std::string.
5702 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5703
4971c9a7
TT
57042017-08-22 Tom Tromey <tom@tromey.com>
5705
5706 * utils.c (gdb_realpath_keepfile): Return a
5707 gdb::unique_xmalloc_ptr.
5708 * exec.c (exec_file_attach): Update.
5709 * utils.h (gdb_realpath_keepfile): Return a
5710 gdb::unique_xmalloc_ptr.
5711
e3e41d58
TT
57122017-08-22 Tom Tromey <tom@tromey.com>
5713
5714 * compile/compile.c (compile_file_command): Use
5715 gdb::unique_xmalloc_ptr, std::string.
5716 * utils.c (gdb_abspath): Change return type.
5717 * source.c (openp): Update.
5718 * objfiles.c (allocate_objfile): Update.
5719 * main.c (set_gdb_data_directory): Update.
5720 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5721
0d999a6e
ZZ
57222017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5723
5724 * cli-cmds.c (list_commands): List actual code around more than
5725 one location.
5726
329d5e7e
JB
57272017-08-21 John Baldwin <jhb@FreeBSD.org>
5728
5729 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5730
bf223d3e
PA
57312017-08-21 Pedro Alves <palves@redhat.com>
5732
5733 PR gdb/19487
5734 * c-exp.y (variable production): Handle function aliases.
5735 * minsyms.c (msymbol_is_text): New function.
5736 * minsyms.h (msymbol_is_text): Declare.
5737 * symtab.c (find_function_alias_target): New function.
5738 * symtab.h (find_function_alias_target): Declare.
5739
c973d0aa
PA
57402017-08-21 Pedro Alves <palves@redhat.com>
5741
5742 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5743 typedefs.
5744 * typeprint.c (whatis_exp): If handling "whatis", and expression
5745 is OP_TYPE, strip one typedef level. Otherwise don't strip
5746 typedefs here.
5747 * valops.c (value_cast): Save "to" type before resolving
5748 stubs/typedefs. Use that type as resulting value's type.
5749
2989a365
TT
57502017-08-18 Tom Tromey <tom@tromey.com>
5751 Pedro Alves <palves@redhat.com>
5752
5753 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5754 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5755 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5756 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5757 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5758 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5759 (linux_get_siginfo_data): Add "thread" argument. Use
5760 scoped_restore.
5761 * linux-nat.c (linux_child_follow_fork)
5762 (check_stopped_by_watchpoint): Use scoped_restore.
5763 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5764 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5765 (restore_inferior_ptid, save_inferior_ptid): Remove.
5766 * btrace.c (btrace_fetch): Use scoped_restore.
5767 * bsd-uthread.c (bsd_uthread_fetch_registers)
5768 (bsd_uthread_store_registers): Use scoped_restore.
5769 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5770 scoped_restore.
5771 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5772 (aix_thread_xfer_partial): Use scoped_restore.
5773 * inferior.h (save_inferior_ptid): Remove.
5774
e60eb288
YQ
57752017-08-18 Yao Qi <yao.qi@linaro.org>
5776
5777 PR tdep/21818
5778 * arm-tdep.c (gdb_print_insn_arm): Mark
5779 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5780
6d580b63
YQ
57812017-08-18 Yao Qi <yao.qi@linaro.org>
5782
5783 * NEWS: Mention GDBserver's new option "--selftest".
5784 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5785 * selftest.c: Move it to common/selftest.c.
5786 * selftest.h: Move it to common/selftest.h.
5787 * selftest-arch.c (reset): New function.
5788 (tests_with_arch): Call reset.
5789
86dcbf50
YQ
57902017-08-18 Yao Qi <yao.qi@linaro.org>
5791
5792 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5793 instead of exception_fprintf and printf_filtered.
5794
7649770c
YQ
57952017-08-18 Yao Qi <yao.qi@linaro.org>
5796
5797 * selftest.c (register_self_test): Rename it to
5798 selftests::register_test.
5799 (run_self_tests): selftest::run_tests.
5800 * selftest.h: Update declarations.
5801 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5802 selftests::register_test_foreach_arch.
5803 * selftest-arch.h: Update declaration.
5804 * aarch64-tdep.c: Update.
5805 * arm-tdep.c: Likewise.
5806 * disasm-selftests.c: Likewise.
5807 * dwarf2loc.c: Likewise.
5808 * dwarf2-frame.c: Likewise.
5809 * findvar.c: Likewise.
5810 * gdbarch-selftests.c: Likewise.
5811 * maint.c (maintenance_selftest): Likewise.
5812 * regcache.c: Likewise.
5813 * rust-exp.y: Likewise.
5814 * selftest-arch.c: Likewise.
5815 * unittests/environ-selftests.c: Likewise.
5816 * unittests/function-view-selftests.c: Likewise.
5817 * unittests/offset-type-selftests.c: Likewise.
5818 * unittests/optional-selftests.c: Likewise.
5819 * unittests/scoped_restore-selftests.c: Likewise.
5820 * utils-selftests.c: Likewise.
5821
b0cba12e
PA
58222017-08-17 Pedro Alves <palves@redhat.com>
5823
5824 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5825 local.
5826
4c8aa72d
PA
58272017-08-17 Pedro Alves <palves@redhat.com>
5828
5829 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5830 field.
5831 (reset_die_in_process): Delete, replaced by ...
5832 (process_die_scope): ... this new class. Make it responsible for
5833 freeing cu->line_header too.
5834 (process_die): Use process_die_scope.
5835 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5836 cu->line_header_die_owner. Don't release the line header if it's
5837 owned by the CU.
5838 (setup_type_unit_groups): Make the CU/DIE own the line header.
5839 Don't release the line header here.
5840
ba713918
AL
58412017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5842
5843 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5844
44d0fb3a
RK
58452017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5846
5847 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5848 Single-Key mode
5849
a5afdb16
RK
58502017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5851
5852 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5853 mode command list.
5854
47613aeb
SH
58552017-08-15 Stafford Horne <shorne@gmail.com>
5856
5857 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5858
9c3cc999
SH
58592017-08-15 Stafford Horne <shorne@gmail.com>
5860
5861 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5862
206726fb
SDJ
58632017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5864
5865 PR gdb/21954
5866 * infcmd.c (unset_environment_command): Use the 'clear' method on
5867 the environment instead of resetting it.
5868
0335ac6d
JB
58692017-08-15 John Baldwin <jhb@FreeBSD.org>
5870
5871 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5872 platforms.
5873
d3abe1c8
TT
58742017-08-14 Tom Tromey <tom@tromey.com>
5875
5876 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5877 (print_binary_chars): Likewise.
5878 (BITS_IN_BYTES): Remove.
5879
d6382fff
TT
58802017-08-14 Tom Tromey <tom@tromey.com>
5881
5882 PR gdb/21675
5883 * valprint.c (LOW_ZERO): Change value to 034.
5884 (print_octal_chars): Add static_asserts for octal constants.
5885 * printcmd.c (print_scalar_formatted): Add 'd' case.
5886
f978cb06
TT
58872017-08-11 Tom Tromey <tom@tromey.com>
5888
5889 * symfile.c (add_symbol_file_command): Use std::vector.
5890
2f5404b3
TT
58912017-08-14 Tom Tromey <tom@tromey.com>
5892
5893 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5894 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5895 std::move.
5896 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5897
de7985c3
PA
58982017-08-11 Pedro Alves <palves@redhat.com>
5899
5900 * infrun.c (process_event_stop_test): Adjust
5901 function_name_is_marked_for_skip call.
5902 * skip.c: Include <list>.
5903 (skiplist_entry): Make it a class with private fields, and
5904 getters/setters.
5905 (skiplist_entry_chain): Delete.
5906 (skiplist_entries): New.
5907 (skiplist_entry_count): Delete.
5908 (highest_skiplist_entry_num): New.
5909 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5910 (add_skiplist_entry): Delete.
5911 (skiplist_entry::skiplist_entry): New.
5912 (skiplist_entry::add_entry): New.
5913 (skip_file_command, skip_function): Adjust.
5914 (compile_skip_regexp): Delete.
5915 (skip_command): Don't compile regexp here. Adjust to use
5916 skiplist_entry::add_entry.
5917 (skip_info): Adjust to use range-for and getters.
5918 (skip_enable_command, skip_disable_command): Adjust to use
5919 range-for and setters.
5920 (skip_delete_command): Adjust to use std::list.
5921 (add_skiplist_entry): Delete.
5922 (skip_file_p): Delete, refactored as ...
5923 (skiplist_entry::do_skip_file_p): ... this new method.
5924 (skip_gfile_p): Delete, refactored as ...
5925 (skiplist_entry::do_gskip_file_p): ... this new method.
5926 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5927 (skiplist_entry::skip_function_p): ... this new method.
5928 (function_name_is_marked_for_skip): Now returns bool, and takes
5929 the function sal by const reference. Adjust to use range-for and
5930 skiplist_entry methods.
5931 (_initialize_step_skip): Remove references to
5932 skiplist_entry_chain, skiplist_entry_count.
5933 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5934 takes the function sal by const reference.
5935
be7d3cd5
YQ
59362017-08-11 Yao Qi <yao.qi@linaro.org>
5937
5938 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5939 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5940 (dwarf2_frame_cache):
5941 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5942 RETURN_MASK_ALL and set *this_case to NULL.
5943 * frame-unwind.h: Update comments.
5944
1c90d9f0
YQ
59452017-08-11 Yao Qi <yao.qi@linaro.org>
5946
5947 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5948 (dwarf2_frame_state_copy_regs): Remove.
5949 (dwarf2_frame_state_free_regs): Remove.
5950 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5951 (dwarf2_restore_rule): Call method .alloc_regs instead of
5952 dwarf2_frame_state_alloc_regs.
5953 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5954 constructor. Call std::move.
5955 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5956 (dwarf2_frame_cache): Likewise.
5957
5958 [GDB_SELF_TEST]: Include selftest.h and
5959 selftest-arch.h.
5960 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5961 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5962 execute_cfa_program_test.
5963
5964 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5965 copy ctor, assignment operator, move assignment.
5966 <alloc_regs>: New method.
5967 <swap>: New method.
5968 (struct dwarf2_frame_state): Delete dtor.
5969 (dwarf2_frame_state_alloc_regs): Remove declaration.
5970 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5971 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5972
afe37d6b
YQ
59732017-08-11 Yao Qi <yao.qi@linaro.org>
5974
5975 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
5976 (dwarf2_frame_state::dwarf2_frame_state): New.
5977 (dwarf2_frame_state::~dwarf2_frame_state): New.
5978 (dwarf2_fetch_cfa_info): Update.
5979 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
5980 rather than a pointer. Update code.
5981 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
5982 dtor.
5983 <data_align, code_align, retaddr_column>: Change them to const.
5984 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
5985 to bool.
5986
b348037f
YQ
59872017-08-11 Yao Qi <yao.qi@linaro.org>
5988
5989 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
5990 <loc.exp>: New field.
5991 * dwarf2-frame.c (execute_cfa_program): Update.
5992 (dwarf2_frame_prev_register): Update.
5993
e7c9de26
PA
59942017-08-10 Pedro Alves <palves@redhat.com>
5995
5996 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
5997
e8c6b620
JB
59982017-08-09 John Baldwin <jhb@FreeBSD.org>
5999
6000 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6001 (fbsd_pending_children): Use std::list.
6002 (fbsd_remember_child): Likewise.
6003 (fbsd_is_child_pending): Likewise.
6004 (fbsd_pending_vfork_done): Use std::forward_list.
6005 (fbsd_add_vfork_done): Likewise.
6006 (fbsd_is_vfork_done_pending): Likewise.
6007 (fbsd_next_vfork_done): Likewise.
6008
e4a26669
JB
60092017-08-09 John Baldwin <jhb@FreeBSD.org>
6010
6011 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6012 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6013 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6014 for `mapfilename'.
6015 (fbsd_xfer_partial): Use gdb::byte_vector.
af3881e6 6016 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
e4a26669 6017
142311d3
JB
60182017-08-09 John Baldwin <jhb@FreeBSD.org>
6019
6020 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6021 "filestuff.h".
6022 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6023
42fa2e0e
TT
60242017-08-09 Tom Tromey <tom@tromey.com>
6025
6026 * skip.c (skiplist_entry): New constructor.
6027 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6028 (skiplist_entry::file_is_glob): Now bool.
6029 (skiplist_entry::file, skiplist_entry::function): Now
6030 std::string.
6031 (make_skip_entry): Return a unique_ptr. Use new.
6032 (free_skiplist_entry, free_skiplist_entry_cleanup)
6033 (make_free_skiplist_entry_cleanup): Remove.
6034 (skip_command, skip_disable_command, add_skiplist_entry)
6035 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6036 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6037 (function_name_is_marked_for_skip): Update.
6038 (skip_delete_command): Update. Use delete.
6039
cd3af38d
JW
60402017-08-09 Jiong Wang <jiong.wang@arm.com>
6041
6042 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6043 (aarch64_linux_core_read_description): New function.
6044 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6045
29592bde
PA
60462017-08-09 Pedro Alves <palves@redhat.com>
6047
6048 * cp-name-parser.y (cp_comp_to_string): Return a
6049 gdb::unique_xmalloc_ptr<char>.
6050 * cp-support.c (replace_typedefs_qualified_name)
6051 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6052 (cp_canonicalize_string_full): Use op= instead of explicit
6053 convertion.
6054 (cp_class_name_from_physname, method_name_from_physname)
6055 (cp_func_name, cp_remove_params): Adjust to use
6056 gdb::unique_xmalloc_ptr<char>.
6057 * cp-support.h (cp_comp_to_string): Return a
6058 gdb::unique_xmalloc_ptr<char>.
6059 * python/py-type.c (typy_lookup_type): Adjust to use
6060 gdb::unique_xmalloc_ptr<char>.
6061
b3340438
L
60622017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6063
6064 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6065
e88e8651
YQ
60662017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6067 Yao Qi <yao.qi@linaro.org>
6068
6069 * cp-support.c (cp_canonicalize_string_full): Use
6070 gdb::unique_xmalloc_ptr<char>.
6071 (cp_canonicalize_string): Likewise.
6072
f5a29eb0
YQ
60732017-08-09 Yao Qi <yao.qi@linaro.org>
6074
6075 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6076 * regformats/i386/amd64-avx-avx512.dat: Remove.
6077 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6078 * regformats/i386/amd64-avx-mpx.dat:Remove.
6079 * regformats/i386/amd64-avx.dat: Remove.
6080 * regformats/i386/amd64-mpx.dat: Remove.
6081 * regformats/i386/i386-avx-avx512.dat: Remove.
6082 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6083 * regformats/i386/i386-avx-mpx.dat: Remove.
6084 * regformats/i386/i386-mmx.dat: Remove.
6085 * regformats/i386/i386-mpx.dat: Remove.
6086
57757c2f
YQ
60872017-08-09 Yao Qi <yao.qi@linaro.org>
6088
6089 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6090 * amd64-tdep.c: Don't include features/i386/x32*.c.
6091 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6092 functions.
6093 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6094 and i386/x32-avx-avx512.
6095 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6096 and i386/x32.xml.
6097 * features/i386/x32-avx-avx512.c: Removed.
6098 * features/i386/x32-avx-avx512.xml: Removed.
6099 * features/i386/x32-avx.c: Removed.
6100 * features/i386/x32-avx.xml: Removed.
6101 * features/i386/x32.c: Removed.
6102 * features/i386/x32.xml: Removed.
6103 * regformats/i386/x32-avx-avx512.dat: Removed.
6104 * regformats/i386/x32-avx.dat: Removed.
6105 * regformats/i386/x32.dat: Removed.
6106
ba7b109b
MR
61072017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6108
6109 PR breakpoints/21886
6110 * mem-break.c (default_memory_insert_breakpoint): Use
6111 `->placed_address' rather than `->reqstd_address' for the
6112 breakpoint location.
6113
e347efc3
MR
61142017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6115
6116 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6117 assertions.
6118
0dba2a6c
MR
61192017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6120
6121 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6122 a union of `tdep_info', `tdesc_data' and `id'.
6123 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6124 rather than `info.tdep_info'.
6125 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6126 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6127 * i386-tdep.c (i386_gdbarch_init): Likewise.
6128 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6129 * mips-tdep.c (mips_gdbarch_init): Likewise.
6130 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6131 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6132 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6133 `info.tdep_info'.
6134 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6135 `info.tdep_info'.
6136 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6137 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6138 `info.tdep_info'.
6139 * spu-tdep.c (spu_gdbarch_init): Likewise.
6140 * gdbarch.h: Regenerate.
6141
16eb6b2d
LS
61422017-08-07 Leszek Swirski <leszeks@google.com>
6143
7b005726 6144 PR symtab/20899
16eb6b2d
LS
6145 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6146
74cbb09e
SM
61472017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6148
6149 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6150 (gdbsim_open): Rename gdb_argv args object to argv.
6151
ee0c3293
TT
61522017-08-05 Tom Tromey <tom@tromey.com>
6153
6154 * compile/compile-object-load.c (compile_object_load): Use
6155 gdb::unique_xmalloc_ptr.
6156 * cli/cli-dump.c (scan_filename): Rename from
6157 scan_filename_with_cleanup. Change return type.
6158 (scan_expression): Rename from scan_expression_with_cleanup.
6159 Change return type.
6160 (dump_memory_to_file, dump_value_to_file, restore_command):
6161 Use gdb::unique_xmalloc_ptr. Update.
6162 * cli/cli-cmds.c (find_and_open_script): Use
6163 gdb::unique_xmalloc_ptr.
6164 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6165 * symmisc.c (maintenance_print_symbols)
6166 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6167 * symfile.c (symfile_bfd_open, generic_load)
6168 (add_symbol_file_command, remove_symbol_file_command): Use
6169 gdb::unique_xmalloc_ptr.
6170 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6171 * psymtab.c (maintenance_print_psymbols): Use
6172 gdb::unique_xmalloc_ptr.
6173 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6174 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6175 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6176 (reload_shared_libraries_1): Likewise.
6177
3232fabd
TT
61782017-08-05 Tom Tromey <tom@tromey.com>
6179
6180 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6181 (rust_op_vector, rust_set_vector): New typedefs.
6182 (current_parser): New global.
6183 (work_obstack): Change to pointer type. Update all users.
6184 (rust_ast, pstate): Remove globals.
6185 (struct rust_parser): New.
6186 (%union) <params, field_inits>: Change type.
6187 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6188 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6189 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6190 (convert_params_to_types, convert_params_to_expression): Change
6191 type of "params".
6192 (ast_string): Change type of "fields".
6193 (rust_parse): Make a rust_parser. Remove cleanups.
6194 (rust_lex_tests): Make and install an auto_obstack.
6195
f02fd774
YQ
61962017-08-04 Yao Qi <yao.qi@linaro.org>
6197
6198 * configure.srv (ipa_x32_linux_regobj): New.
6199 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6200 instead of X86_TDESC_AVX512.
6201 (initialize_low_tracepoint): Call
6202 init_registers_x32_avx_avx512_linux.
6203
91975afd
YQ
62042017-08-04 Yao Qi <yao.qi@linaro.org>
6205
6206 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6207
2331fa3a
RK
62082017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6209
6210 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6211
744e4fe1
TT
62122017-08-03 Tom Tromey <tom@tromey.com>
6213
6214 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6215 Remove.
6216 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6217
1c034b67
TT
62182017-08-03 Tom Tromey <tom@tromey.com>
6219
6220 * python/py-param.c (compute_enum_values): Use gdb_argv.
6221
773a1edc
TT
62222017-08-03 Tom Tromey <tom@tromey.com>
6223
6224 * utils.h (struct gdb_argv_deleter): New.
6225 (gdb_argv): New class.
6226 * utils.c (gdb_argv::reset): New method.
6227 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6228 * tracefile.c (tsave_command): Use gdb_argv.
6229 * top.c (new_ui_command): Use gdb_argv.
6230 * symmisc.c (maintenance_print_symbols)
6231 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6232 * symfile.c (symbol_file_command, generic_load)
6233 (remove_symbol_file_command): Use gdb_argv.
6234 * stack.c (backtrace_command): Use gdb_argv.
6235 * source.c (add_path, show_substitute_path_command)
6236 (unset_substitute_path_command, set_substitute_path_command):
6237 Use gdb_argv.
6238 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6239 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6240 * remote.c (extended_remote_run, remote_put_command)
6241 (remote_get_command, remote_delete_command): Use gdb_argv.
6242 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6243 (gdbsim_open): Use gdb_argv.
6244 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6245 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6246 * procfs.c (procfs_info_proc): Use gdb_argv.
6247 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6248 * infrun.c (handle_command): Use gdb_argv.
6249 * inferior.c (add_inferior_command, clone_inferior_command):
6250 Use gdb_argv.
6251 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6252 * exec.c (exec_file_command): Use gdb_argv.
6253 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6254 * compile/compile.c (build_argc_argv): Use gdb_argv.
6255
0d50bde3
TT
62562017-08-03 Tom Tromey <tom@tromey.com>
6257
6258 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6259
7f968c89
TT
62602017-08-03 Tom Tromey <tom@tromey.com>
6261
6262 * python/python.c (compute_python_string): Return std::string.
6263 (gdbpy_eval_from_control_command): Update.
6264 (do_start_initialization): Use std::string.
6265 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6266 xstrprintf.
6267 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6268 xstrprintf.
6269
3c9ebddd
TT
62702017-08-03 Tom Tromey <tom@tromey.com>
6271
6272 * top.h (do_restore_instream_cleanup): Remove.
6273 * top.c (do_restore_instream_cleanup): Remove.
6274 (read_command_file): Use scoped_restore.
6275 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6276
b51b225e
TT
62772017-08-03 Tom Tromey <tom@tromey.com>
6278
6279 * cli/cli-script.c (execute_user_command)
6280 (execute_control_command): Use scoped_restore.
6281
ac991630
TT
62822017-08-03 Tom Tromey <tom@tromey.com>
6283
6284 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6285 (execute_user_command): Remove user_call_depth; use
6286 user_args_stack's size instead.
6287
898e0c8e
TT
62882017-08-03 Tom Tromey <tom@tromey.com>
6289
6290 * top.h (in_user_command): Remove.
6291 * top.c (in_user_command): Remove.
6292 * cli/cli-script.c (do_restore_user_call_depth)
6293 (execute_user_command): Update.
6294
26fcd5d7
TT
62952017-08-03 Tom Tromey <tom@tromey.com>
6296
6297 * valops.c (search_struct_method): Use gdb::byte_vector.
6298 * valarith.c (value_concat): Use std::vector.
6299 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6300 (simple_search_memory): Likewise.
6301 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6302 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6303 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6304 * elfread.c (elf_rel_plt_read): Use std::string.
6305 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6306 * cli/cli-dump.c (restore_section_callback): Use
6307 gdb::byte_vector.
6308
7c218e6c
TT
63092017-08-03 Tom Tromey <tom@tromey.com>
6310
6311 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6312
31b68d4a
TT
63132017-08-03 Tom Tromey <tom@tromey.com>
6314
6315 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6316 (tui_register_format): Use scoped_restore.
6317
2ec845e7
TT
63182017-08-03 Tom Tromey <tom@tromey.com>
6319
6320 * reverse.c (exec_direction_default): Remove.
6321 (exec_reverse_once): Use scoped_restore.
6322 * remote.c (restore_remote_timeout): Remove.
6323 (remote_flash_erase, remote_flash_write, remote_flash_done)
6324 (readchar, remote_serial_write): Use scoped_restore.
6325 * cli/cli-script.c (struct source_cleanup_lines_args)
6326 (source_cleanup_lines): Remove.
6327 (script_from_file): Use scoped_restore.
6328 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6329 (source_command): Use scoped_restore.
6330
b3bc8453
TT
63312017-08-03 Tom Tromey <tom@tromey.com>
6332
6333 * utils.h (make_cleanup_free_so): Remove.
6334 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6335 * solist.h (struct so_deleter): New.
6336 (so_list_up): New typedef.
6337 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6338
e3ad2841
TT
63392017-08-03 Tom Tromey <tom@tromey.com>
6340
6341 * utils.h (make_cleanup_restore_current_language): Remove.
6342 * utils.c (do_restore_current_language)
6343 (make_cleanup_restore_current_language): Remove.
6344 * parse.c (parse_exp_in_context_1)
6345 (parse_expression_with_language): Use
6346 scoped_restore_current_language.
6347 * mi/mi-main.c (mi_cmd_execute): Use
6348 scoped_restore_current_language.
6349 * language.h (scoped_restore_current_language): New class.
6350
b80cf838
TT
63512017-08-03 Tom Tromey <tom@tromey.com>
6352
6353 * compile/compile.c (cleanup_unlink_file): Remove.
6354 (compile_to_object): Use gdb::unlinker.
6355 (eval_compile_command): Likewise.
6356
fad0444a
TT
63572017-08-03 Tom Tromey <tom@tromey.com>
6358
6359 * utils.h (make_cleanup_fclose): Remove.
6360 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6361
6e7bc05c
TT
63622017-08-03 Tom Tromey <tom@tromey.com>
6363
6364 * top.c (open_terminal_stream): Return gdb_file_up.
6365 (new_ui_command): Update.
6366
4a45905b
TT
63672017-08-03 Tom Tromey <tom@tromey.com>
6368
6369 * source.c (print_source_lines_base, forward_search_command)
6370 (reverse_search_command): Use gdb_file_up.
6371
7cd06d6e
TT
63722017-08-03 Tom Tromey <tom@tromey.com>
6373
6374 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6375
ed166945
TT
63762017-08-03 Tom Tromey <tom@tromey.com>
6377
6378 * cli/cli-cmds.c (find_and_open_script): Change return type.
6379 Remove "streamp" and "full_path" parameters.
6380 (source_script_with_search): Update.
6381 * auto-load.c (source_script_file): Update.
6382 * cli/cli-cmds.h (find_and_open_script): Change type.
6383 (open_script): New struct.
6384
d419f42d
TT
63852017-08-03 Tom Tromey <tom@tromey.com>
6386
6387 * xml-support.c (xml_fetch_content_from_file): Update.
6388 * ui-file.c (stdio_file::open): Update.
6389 * tracefile-tfile.c (tfile_start): Update.
6390 * remote.c (remote_file_put, remote_file_get): Update.
6391 * nat/linux-procfs.c (linux_proc_get_int)
6392 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6393 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6394 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6395 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6396 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6397 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6398 * linux-nat.c (linux_proc_pending_signals): Update.
6399 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6400 (file_closer): Remove.
6401 * compile/compile.c (compile_to_object): Update.
6402 * common/filestuff.h (struct gdb_file_deleter): New.
6403 (gdb_file_up): New typedef.
6404 (gdb_fopen_cloexec): Change return type.
6405 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6406 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6407 (dump_binary_file, restore_binary_file): Update.
6408 * auto-load.c (auto_load_objfile_script_1): Update.
6409
4a2b031d
TT
64102017-08-03 Tom Tromey <tom@tromey.com>
6411
6412 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6413 (info_static_tracepoint_markers_command): Likewise.
6414 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6415 * skip.c (skip_info): Use ui_out_emit_table.
6416 * progspace.c (print_program_space): Use ui_out_emit_table.
6417 * osdata.c (info_osdata): Use ui_out_emit_table.
6418 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6419 ui_out_emit_table.
6420 * linux-thread-db.c (info_auto_load_libthread_db): Use
6421 ui_out_emit_table.
6422 * inferior.c (print_inferior): Use ui_out_emit_table.
6423 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6424 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6425 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6426 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6427 * ui-out.h (class ui_out_emit_table): New.
6428
a4f320fd
MR
64292017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6430
6431 * mips-tdep.c (mips_fpu_type_str): New function.
6432 (mips_dump_tdep): Call it.
6433
a2f1f308
MR
64342017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6435
6436 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6437 `->mips_fpu_type'.
6438
7e5ed83b
XR
64392017-07-31 Xavier Roirand <roirand@adacore.com>
6440
6441 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6442
4c9dc811
XR
64432017-07-27 Xavier Roirand <roirand@adacore.com>
6444
6445 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6446
27d41eac
YQ
64472017-07-26 Yao Qi <yao.qi@linaro.org>
6448
6449 * cli/cli-cmds.c (maintenancechecklist): New variable.
6450 * gdbcmd.h (maintenancechecklist): Declare it.
6451 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6452 Call i386_linux_read_description with different masks.
6453 * maint.c (maintenance_check_command): New function.
6454 (_initialize_maint_cmds): Call add_prefix_cmd.
6455 * target-descriptions.c (tdesc_reg): override operator != and ==.
6456 (tdesc_type): Likewise.
6457 (tdesc_feature): Likewise.
6458 (target_desc): Likewise.
6459 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6460 (maintenance_check_xml_descriptions): New function.
6461 (_initialize_target_descriptions) Add command "xml-descriptions".
6462 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6463
ea03d0d3
YQ
64642017-07-26 Yao Qi <yao.qi@linaro.org>
6465
6466 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6467 Include features/i386/32bit-*.c.
6468 (i386_linux_read_description): Generate target description if it
6469 doesn't exist.
6470 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6471 functions.
6472 * features/i386/32bit-linux.c: Re-generated.
6473 * features/i386/32bit-sse.c: Likewise.
6474 * target-descriptions.c (print_c_feature::visit): Print code to
6475 set register number if needed.
6476 (print_c_feature) <m_next_regnum>: New field.
6477
25aa13e5
YQ
64782017-07-26 Yao Qi <yao.qi@linaro.org>
6479
6480 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6481 (FEATURE_XMLFILES): New.
6482 (FEATURE_CFILES): New.
6483 New rules.
6484 (clean-cfiles): Remove generated c files.
6485 * features/i386/32bit-avx.c: Generated.
6486 * features/i386/32bit-avx512.c: Generated.
6487 * features/i386/32bit-core.c: Generated.
6488 * features/i386/32bit-linux.c: Generated.
6489 * features/i386/32bit-mpx.c: Generated.
6490 * features/i386/32bit-pkeys.c: Generated.
6491 * features/i386/32bit-sse.c: Generated.
6492 * target-descriptions.c: Include algorithm.
6493 (tdesc_element_visitor): Add method visit_end.
6494 (print_c_tdesc): Implement visit_end.
6495 (print_c_tdesc:: m_filename_after_features): Move it to
6496 protected.
6497 (print_c_feature): New class.
6498 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6499 name starts with "i386/32bit-".
6500
6eb1e6a8
YQ
65012017-07-26 Yao Qi <yao.qi@linaro.org>
6502
6503 * target-descriptions.c (tdesc_element_visitor): New class.
6504 (tdesc_element): New class.
6505 (tdesc_reg): Inherit from tdesc_element.
6506 (tdesc_reg::accept): New function.
6507 (tdesc_type): Inherit from tdesc_element.
6508 (tdesc_type::accept): New function.
6509 (tdesc_feature): Inherit from tdesc_element.
6510 (tdesc_feature::accept): New function.
6511 (target_desc): Inherit from tdesc_element.
6512 (target_desc::target_desc): New.
6513 (target_desc::~target_desc): New.
6514 (target_desc::accept): New.
6515 (allocate_target_description): Use new.
6516 (free_target_description): Use delete.
6517 (print_c_tdesc): New class.
6518 (maint_print_c_tdesc_cmd): Adjust.
6519
6520 * features/aarch64.c: Re-generated.
6521 * features/arc-arcompact.c: Re-generated.
6522 * features/arc-v2.c: Re-generated.
6523 * features/arm/arm-with-iwmmxt.c: Re-generated.
6524 * features/arm/arm-with-m.c: Re-generated.
6525 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6526 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6527 * features/arm/arm-with-neon.c: Re-generated.
6528 * features/arm/arm-with-vfpv2.c: Re-generated.
6529 * features/arm/arm-with-vfpv3.c: Re-generated.
6530 * features/i386/amd64-avx-avx512.c: Re-generated.
6531 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6532 * features/i386/amd64-avx.c: Re-generated.
6533 * features/i386/amd64-avx-linux.c: Re-generated.
6534 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6535 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6536 * features/i386/amd64-avx-mpx.c: Re-generated.
6537 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6538 * features/i386/amd64.c: Re-generated.
6539 * features/i386/amd64-linux.c: Re-generated.
6540 * features/i386/amd64-mpx.c: Re-generated.
6541 * features/i386/amd64-mpx-linux.c: Re-generated.
6542 * features/i386/i386-avx-avx512.c: Re-generated.
6543 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6544 * features/i386/i386-avx.c: Re-generated.
6545 * features/i386/i386-avx-linux.c: Re-generated.
6546 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6547 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6548 * features/i386/i386-avx-mpx.c: Re-generated.
6549 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6550 * features/i386/i386.c: Re-generated.
6551 * features/i386/i386-linux.c: Re-generated.
6552 * features/i386/i386-mmx.c: Re-generated.
6553 * features/i386/i386-mmx-linux.c: Re-generated.
6554 * features/i386/i386-mpx.c: Re-generated.
6555 * features/i386/i386-mpx-linux.c: Re-generated.
6556 * features/i386/x32-avx-avx512.c: Re-generated.
6557 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6558 * features/i386/x32-avx.c: Re-generated.
6559 * features/i386/x32-avx-linux.c: Re-generated.
6560 * features/i386/x32.c: Re-generated.
6561 * features/i386/x32-linux.c: Re-generated.
6562 * features/microblaze.c: Re-generated.
6563 * features/microblaze-with-stack-protect.c: Re-generated.
6564 * features/mips64-dsp-linux.c: Re-generated.
6565 * features/mips64-linux.c: Re-generated.
6566 * features/mips-dsp-linux.c: Re-generated.
6567 * features/mips-linux.c: Re-generated.
6568 * features/nds32.c: Re-generated.
6569 * features/nios2.c: Re-generated.
6570 * features/nios2-linux.c: Re-generated.
6571 * features/rs6000/powerpc-32.c: Re-generated.
6572 * features/rs6000/powerpc-32l.c: Re-generated.
6573 * features/rs6000/powerpc-403.c: Re-generated.
6574 * features/rs6000/powerpc-403gc.c : Re-generated.
6575 * features/rs6000/powerpc-405.c: Re-generated.
6576 * features/rs6000/powerpc-505.c: Re-generated.
6577 * features/rs6000/powerpc-601.c: Re-generated.
6578 * features/rs6000/powerpc-602.c: Re-generated.
6579 * features/rs6000/powerpc-603.c: Re-generated.
6580 * features/rs6000/powerpc-604.c: Re-generated.
6581 * features/rs6000/powerpc-64.c: Re-generated.
6582 * features/rs6000/powerpc-64l.c: Re-generated.
6583 * features/rs6000/powerpc-7400.c: Re-generated.
6584 * features/rs6000/powerpc-750.c: Re-generated.
6585 * features/rs6000/powerpc-860.c: Re-generated.
6586 * features/rs6000/powerpc-altivec32.c: Re-generated.
6587 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6588 * features/rs6000/powerpc-altivec64.c: Re-generated.
6589 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6590 * features/rs6000/powerpc-cell32l.c: Re-generated.
6591 * features/rs6000/powerpc-cell64l.c: Re-generated.
6592 * features/rs6000/powerpc-e500.c: Re-generated.
6593 * features/rs6000/powerpc-e500l.c: Re-generated.
6594 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6595 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6596 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6597 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6598 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6599 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6600 * features/rs6000/powerpc-vsx32.c: Re-generated.
6601 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6602 * features/rs6000/powerpc-vsx64.c: Re-generated.
6603 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6604 * features/rs6000/rs6000.c: Re-generated.
6605 * features/s390-linux32.c: Re-generated.
6606 * features/s390-linux32v1.c: Re-generated.
6607 * features/s390-linux32v2.c: Re-generated.
6608 * features/s390-linux64.c: Re-generated.
6609 * features/s390-linux64v1.c: Re-generated.
6610 * features/s390-linux64v2.c: Re-generated.
6611 * features/s390-te-linux64.c: Re-generated.
6612 * features/s390-tevx-linux64.c: Re-generated.
6613 * features/s390-vx-linux64.c: Re-generated.
6614 * features/s390x-linux64.c: Re-generated.
6615 * features/s390x-linux64v1.c: Re-generated.
6616 * features/s390x-linux64v2.c: Re-generated.
6617 * features/s390x-te-linux64.c: Re-generated.
6618 * features/s390x-tevx-linux64.c: Re-generated.
6619 * features/s390x-vx-linux64.c: Re-generated.
6620 * features/sparc/sparc32-solaris.c: Re-generated.
6621 * features/sparc/sparc64-solaris.c: Re-generated.
6622 * features/tic6x-c62x.c: Re-generated.
6623 * features/tic6x-c62x-linux.c: Re-generated.
6624 * features/tic6x-c64x.c: Re-generated.
6625 * features/tic6x-c64x-linux.c: Re-generated.
6626 * features/tic6x-c64xp.c: Re-generated.
6627 * features/tic6x-c64xp-linux.c: Re-generated.
6628
35b4818d
YQ
66292017-07-26 Yao Qi <yao.qi@linaro.org>
6630
6631 * i386-linux-tdep.c (i386_linux_read_description): New function.
6632 (i386_linux_core_read_description): Call
6633 i386_linux_read_description.
6634 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6635 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6636 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6637 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6638 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6639 * x86-linux-nat.c (x86_linux_read_description): Call
6640 i386_linux_read_description.
6641
8e2141c6
YQ
66422017-07-26 Yao Qi <yao.qi@linaro.org>
6643
6644 * NEWS: Mention it.
6645 * features/Makefile (%.c: %.xml): Pass the xml file name to
6646 command "maint print c-tdesc".
6647 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6648 name from 'arg'.
6649
b468ff4c
YQ
66502017-07-26 Yao Qi <yao.qi@linaro.org>
6651
6652 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6653 in-class initialization.
6654 (tdesc_create_feature): Call new instead of XCNEW.
6655 (free_target_description): Ue delete.
6656
b9c0e1b4
JB
66572017-07-25 John Baldwin <jhb@FreeBSD.org>
6658
6659 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6660
a04b5337
YQ
66612017-07-25 Yao Qi <yao.qi@linaro.org>
6662
6663 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6664 constant.
6665 (amd64_x32_init_abi): Likewise.
6666 * amd64-tdep.h (amd64_init_abi): Update declaration.
6667 (amd64_x32_init_abi): Likewise.
6668
02ad7fc2
YQ
66692017-07-25 Yao Qi <yao.qi@linaro.org>
6670
6671 PR tdep/21717
6672 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6673 condition for FPSCR.
6674 (arm_linux_store_inferior_registers): Likewise.
6675
b6f48cb0
TT
66762017-07-22 Tom Tromey <tom@tromey.com>
6677
6678 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6679 <syscalls_counts>: Now a std::vector.
6680 (get_catch_syscall_inferior_data): Use "new".
6681 (catch_syscall_inferior_data_cleanup): Use "delete".
6682 (insert_catch_syscall, remove_catch_syscall)
6683 (clear_syscall_counts): Update.
6684
e12c9b7a
TT
66852017-07-22 Tom Tromey <tom@tromey.com>
6686
6687 * break-catch-syscall.c (syscall_catchpoint)
6688 <syscalls_to_be_caught>: Now a std::vector<int>
6689 (~syscall_catchpoint): Remove.
6690 (insert_catch_syscall, remove_catch_syscall)
6691 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6692 (print_mention_catch_syscall, print_recreate_catch_syscall):
6693 Update.
6694 (create_syscall_event_catchpoint): Change type of "filter"
6695 parameter.
6696 (catch_syscall_split_args): Return a std::vector.
6697 (catch_syscall_command_1, catching_syscall_number_1): Update.
6698
4fa8aeac
TT
66992017-07-22 Tom Tromey <tom@tromey.com>
6700
6701 * break-catch-throw.c (struct exception_catchpoint)
6702 <exception_rx>: Now a std::string.
6703 (~exception_catchpoint): Remove.
6704 (print_one_detail_exception_catchpoint): Update.
6705 (handle_gnu_v3_exceptions): Change type of except_rx.
6706 (extract_exception_regexp): Return a std::string.
6707 (catch_exception_command_1): Update.
6708
f746a154
TT
67092017-07-22 Tom Tromey <tom@tromey.com>
6710
6711 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6712 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6713 std::vector.
6714 <catch_all>: Now a bool.
6715 (~signal_catchpoint): Remove.
6716 (signal_catchpoint_insert_location)
6717 (signal_catchpoint_remove_location)
6718 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6719 (signal_catchpoint_print_mention)
6720 (signal_catchpoint_print_recreate)
6721 (signal_catchpoint_explains_signal): Update.
6722 (create_signal_catchpoint): Change type of "filter" and
6723 "catch_all".
6724 (catch_signal_split_args): Return a std::vector. Change type of
6725 "catch_all".
6726 (catch_signal_command): Update.
6727
47e77640
PA
67282017-07-20 Pedro Alves <palves@redhat.com>
6729
6730 * ada-lang.c (ada_language_defn): Make extern.
6731 (_initialize_ada_language): Remove add_language call.
6732 * c-lang.c (c_language_defn, cplus_language_defn)
6733 (asm_language_defn, minimal_language_defn): Make extern.
6734 (_initialize_c_language): Delete.
6735 * completer.c (compare_cstrings): Delete, moved to utils.h.
6736 * d-lang.c (d_language_defn): Make extern.
6737 (_initialize_d_language): Remove add_language calls.
6738 * defs.h (enum language): Add comment.
6739 * f-lang.c (f_language_defn): Make extern.
6740 (_initialize_f_language): Remove add_language call.
6741 * go-lang.c (go_language_defn): Make extern.
6742 (_initialize_go_language): Remove add_language call.
6743 * language.c: Include <algorithm>.
6744 (languages): Redefine as const array.
6745 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6746 (set_language_command): Handle "local". Use for-range loop.
6747 (set_language): Remove loop.
6748 (language_enum): Rewrite.
6749 (language_def, language_str): Remove loops.
6750 (add_language): Delete.
6751 (add_set_language_command): New, based on add_languages.
6752 (skip_language_trampoline): Adjust.
6753 (local_language_defn): Delete.
6754 (language_gdbarch_post_init): Adjust.
6755 (_initialize_language): Remove add_language calls. Call
6756 add_set_language_command.
6757 * language.h (add_language): Delete.
6758 (auto_language_defn)
6759 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6760 (asm_language_defn, c_language_defn, cplus_language_defn)
6761 (d_language_defn, f_language_defn, go_language_defn)
6762 (m2_language_defn, objc_language_defn, opencl_language_defn)
6763 (pascal_language_defn, rust_language_defn): Declare.
6764 * m2-lang.c (m2_language_defn): Make extern.
6765 (_initialize_m2_language): Remove add_language call.
6766 * objc-lang.c (objc_language_defn): Make extern.
6767 (_initialize_objc_language): Remove add_language call.
6768 * opencl-lang.c (opencl_language_defn): Make extern.
6769 (_initialize_opencl_language): Remove add_language call.
6770 * p-lang.c (pascal_language_defn): Make extern.
6771 (_initialize_pascal_language): Delete.
6772 * rust-lang.c (rust_language_defn): Make extern.
6773 (_initialize_rust_language): Delete.
6774 * utils.h (compare_cstrings): New static inline function.
6775
edb0c9cb
PA
67762017-07-20 Pedro Alves <palves@redhat.com>
6777
6778 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6779 (get_var_value): Constify parameters.
6780 (get_int_var_value): Change prototype.
6781 (to_fixed_range_type): Adjust.
6782 * ada-lang.h (get_int_var_value): Change prototype.
6783
a778f165
PA
67842017-07-20 Pedro Alves <palves@redhat.com>
6785
6786 * dwarf2read.c (dw2_lookup_symbol): Use
6787 SYMBOL_MATCHES_SEARCH_NAME.
6788 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6789
42edd901
PA
67902017-07-20 Pedro Alves <palves@redhat.com>
6791
6792 * block.c (block_iter_name_step, block_iter_name_first)
6793 (block_iter_name_next): Delete.
6794 (block_lookup_symbol_primary): Adjust to use
6795 dict_iter_match_first/dict_iter_match_next.
6796 * block.h (block_iter_name_first, block_iter_name_next): Delete
6797 declarations.
6798 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6799 dict_iter_match_first/dict_iter_match_next.
6800
cf325299
PA
68012017-07-20 Pedro Alves <palves@redhat.com>
6802
6803 * cp-support.c (cp_find_first_component_aux): Add missing case for
6804 end of string.
6805
c5ed0576
DB
68062017-07-18 David Blaikie <dblaikie@gmail.com>
6807
6808 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6809 of dwo_cu's dwo_file.
6810
27841e76
YQ
68112017-07-18 Yao Qi <yao.qi@linaro.org>
6812
6813 * remote.c (store_registers_using_G): Remove one line comment.
6814
cfb7e58b
YQ
68152017-07-18 Yao Qi <yao.qi@linaro.org>
6816
6817 * regcache.c (regcache_cpy): Simplify it.
6818 (regcache::cpy_no_passthrough): Remove it.
6819 * regcache.h (cpy_no_passthrough): Remove it.
6820 (regcache_dup, regcache_cpy): Update comments.
6821
386535dd
PA
68222017-07-18 Pedro Alves <palves@redhat.com>
6823
6824 * remote-sim.c (sim_command_completer): Adjust to work with a
6825 completion_tracker instead of a VEC.
6826
c45ec17c
PA
68272017-07-17 Pedro Alves <palves@redhat.com>
6828
6829 * completer.c (complete_source_filenames): New function.
6830 (complete_address_and_linespec_locations): New function.
6831 (location_completer): Use complete_address_and_linespec_locations.
6832 (completion_tracker::build_completion_result): Honor the tracker's
6833 request to suppress append.
6834 * completer.h (completion_tracker::suppress_append_ws)
6835 (completion_tracker::set_suppress_append_ws): New methods.
6836 (completion_tracker::m_suppress_append_ws): New field.
6837 (complete_source_filenames): New declaration.
6838 * linespec.c (linespec_complete_what): New.
6839 (struct ls_parser) <complete_what, completion_word,
6840 completion_quote_char, completion_quote_end, completion_tracker>:
6841 New fields.
6842 (string_find_incomplete_keyword_at_end): New.
6843 (linespec_lexer_lex_string): Record quote char. If in completion
6844 mode, don't throw.
6845 (linespec_lexer_consume_token): Advance the completion word point.
6846 (linespec_lexer_peek_token): Save/restore completion info.
6847 (save_stream_and_consume_token): New.
6848 (set_completion_after_number): New.
6849 (linespec_parse_basic): Set what to complete next depending on
6850 token. Handle function and label completions specially.
6851 (parse_linespec): Disable objc shortcut in completion mode. Set
6852 what to complete next depending on token type. Skip keyword if in
6853 completion mode.
6854 (complete_linespec_component, linespec_complete): New.
6855 * linespec.h (linespec_complete): Declare.
6856
be966d42
PA
68572017-07-17 Pedro Alves <palves@redhat.com>
6858
6859 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6860 Handle 'operator<' / 'operator<<'.
6861
a2459270
PA
68622017-07-17 Pedro Alves <palves@redhat.com>
6863
6864 * completer.c (collect_explicit_location_matches): Handle
6865 MATCH_LABEL.
6866 (convert_explicit_location_to_linespec): New, factored out from
6867 ...
6868 (convert_explicit_location_to_sals): ... this.
6869 (complete_label): New.
6870 (linespec_complete_label, find_label_symbols_in_block): New.
6871 (find_label_symbols): Add completion_mode parameter and adjust to
6872 call find_label_symbols_in_block.
6873 * linespec.h (linespec_complete_label): Declare.
6874
c6756f62
PA
68752017-07-17 Pedro Alves <palves@redhat.com>
6876
6877 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6878 complete_symbol_mode parameter.
6879 * cli/cli-cmds.c (complete_command): Get the completion result out
6880 of the handle_brkchars tracker if used a custom word point.
6881 * completer.c: Include "linespec.h".
6882 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6883 (advance_to_expression_complete_word_point): New.
6884 (completion_tracker::completes_to_completion_word): New.
6885 (complete_files_symbols): Pass down
6886 complete_symbol_mode::EXPRESSION.
6887 (explicit_options, probe_options): New.
6888 (collect_explicit_location_matches): Complete on the
6889 explictit_loc->foo instead of word. Use
6890 linespec_complete_function. Handle MATCH_LINE. Handle offering
6891 keyword and options completions.
6892 (backup_text_ptr): Delete.
6893 (skip_keyword): New.
6894 (complete_explicit_location): Remove 'word' parameter. Add
6895 language, quoted_arg_start and quoted_arg_end parameters.
6896 Rewrite, parsing left to right.
6897 (location_completer): Rewrite.
6898 (location_completer_handle_brkchars): New function.
6899 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6900 (enum complete_line_internal_reason): Adjust comments.
6901 (completion_tracker::discard_completions): New.
6902 (completer_handle_brkchars_func_for_completer): Handle
6903 location_completer.
6904 (gdb_custom_word_point_brkchars)
6905 (gdb_org_rl_basic_quote_characters): New.
6906 (gdb_completion_word_break_characters_throw)
6907 (completion_find_completion_word): Handle trackers that use a
6908 custom word point.
6909 (completion_tracker::advance_custom_word_point_by): New.
6910 (completion_tracker::build_completion_result): Don't rely on
6911 readline appending the quote char.
6912 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6913 use a custom word point.
6914 (gdb_rl_attempted_completion_function): Restore
6915 rl_basic_quote_characters.
6916 * completer.h (class completion_tracker): Extend intro comment.
6917 (completion_tracker::set_quote_char)
6918 (completion_tracker::quote_char)
6919 (completion_tracker::set_use_custom_word_point)
6920 (completion_tracker::use_custom_word_point)
6921 (completion_tracker::custom_word_point)
6922 (completion_tracker::set_custom_word_point)
6923 (completion_tracker::advance_custom_word_point_by)
6924 (completion_tracker::completes_to_completion_word)
6925 (completion_tracker::discard_completions): New methods.
6926 (completion_tracker::m_quote_char)
6927 (completion_tracker::m_use_custom_word_point)
6928 (completion_tracker::m_custom_word_point): New fields.
6929 (advance_to_expression_complete_word_point): Declare.
6930 * f-lang.c (f_collect_symbol_completion_matches): Add
6931 complete_symbol_mode parameter.
6932 * language.h (struct language_defn)
6933 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6934 parameter.
6935 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6936 (linespec_complete_function): New function.
6937 (linespec_lexer_lex_keyword): Adjust.
6938 * linespec.h (linespec_keywords, linespec_complete_function): New
6939 declarations.
6940 * location.c (find_end_quote): New function.
6941 (explicit_location_lex_one): Add explicit_completion_info
6942 parameter. Save quoting info. Don't throw if being called for
6943 completion. Don't handle Ada operators here.
6944 (is_cp_operator, skip_op_false_positives, first_of)
6945 (explicit_location_lex_one_function): New function.
6946 (string_to_explicit_location): Replace 'dont_throw' parameter with
6947 an explicit_completion_info pointer parameter. Handle it. Don't
6948 use explicit_location_lex_one to lex function names. Use
6949 explicit_location_lex_one_function instead.
6950 * location.h (struct explicit_completion_info): New.
6951 (string_to_explicit_location): Replace 'dont_throw' parameter with
6952 an explicit_completion_info pointer parameter.
6953 * symtab.c (default_collect_symbol_completion_matches_break_on):
6954 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6955 (default_collect_symbol_completion_matches)
6956 (collect_symbol_completion_matches): Add complete_symbol_mode
6957 parameter.
6958 (collect_symbol_completion_matches_type): Pass down
6959 complete_symbol_mode::EXPRESSION.
6960 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6961 parameter. Handle LINESPEC mode.
6962 * symtab.h (complete_symbol_mode): New.
6963 (default_collect_symbol_completion_matches_break_on)
6964 (default_collect_symbol_completion_matches)
6965 (collect_symbol_completion_matches)
6966 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6967 parameter.
6968
1d550c82
PA
69692017-07-17 Pedro Alves <palves@redhat.com>
6970
6971 * utils.c (enum class strncmp_iw_mode): New.
6972 (strcmp_iw): Rename to ...
6973 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6974 parameters. Handle them.
6975 (strncmp_iw): New.
6976 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
6977 * utils.h (strncmp_iw): Declare.
6978 (strcmp_iw): Move describing comments here.
6979
8090b426
PA
69802017-07-17 Pedro Alves <palves@redhat.com>
6981
6982 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
6983 CP_OPERATOR_STR.
6984 * c-typeprint.c (is_type_conversion_operator): Use
6985 CP_OPERATOR_STR.
6986 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
6987 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
6988 CP_OPERATOR_LEN.
6989 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
6990 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
6991 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
6992 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
6993 CP_OPERATOR_STR.
6994 * location.c: Include "cp-support.h".
6995 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
6996 CP_OPERATOR_STR.
6997 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
6998 CP_OPERATOR_LEN.
6999
6a2c1b87
PA
70002017-07-17 Pedro Alves <palves@redhat.com>
7001
7002 * cli/cli-cmds.c (complete_command): Use a completion tracker
7003 along with completion_find_completion_word for handle_brkchars
7004 phase.
7005 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7006 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7007 (struct gdb_rl_completion_word_info): New.
7008 (gdb_rl_find_completion_word): New.
7009 (completion_find_completion_word): New.
7010 * completer.h (completion_find_completion_word): Declare.
7011
eb3ff9a5
PA
70122017-07-17 Pedro Alves <palves@redhat.com>
7013
7014 * ada-lang.c (symbol_completion_match): Adjust comments.
7015 (symbol_completion_add): Replace vector parameter with
7016 completion_tracker parameter. Use it.
7017 (ada_make_symbol_completion_list): Rename to...
7018 (ada_collect_symbol_completion_matches): ... this. Add
7019 completion_tracker parameter and use it.
7020 (ada_language_defn): Adjust.
7021 * break-catch-syscall.c (catch_syscall_completer): Adjust
7022 prototype and work with completion_tracker instead of VEC.
7023 * breakpoint.c (condition_completer): Adjust prototype and work
7024 with completion_tracker instead of VEC.
7025 * c-lang.c (c_language_defn, cplus_language_defn)
7026 (asm_language_defn, minimal_language_defn): Adjust to renames.
7027 * cli/cli-cmds.c (complete_command): Rework using
7028 completion_tracker. Catch exceptions when completing.
7029 * cli/cli-decode.c (integer_unlimited_completer)
7030 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7031 with completion_tracker instead of VEC.
7032 * command.h (struct completion_tracker): Forward declare.
7033 (completer_ftype, completer_handle_brkchars_ftype): Change
7034 types.
7035 (complete_on_cmdlist, complete_on_enum): Adjust.
7036 * completer.c: Include <algorithm>.
7037 (struct gdb_completer_state): New.
7038 (current_completion): New global.
7039 (readline_line_completion_function): Delete.
7040 (noop_completer, filename_completer)
7041 (filename_completer_handle_brkchars, complete_files_symbols)
7042 (linespec_location_completer): Adjust to work with a
7043 completion_tracker instead of a VEC.
7044 (string_or_empty): New.
7045 (collect_explicit_location_matches): Adjust to work with a
7046 completion_tracker instead of a VEC.
7047 (explicit_location_completer): Rename to ...
7048 (complete_explicit_location): ... this and adjust to work with a
7049 completion_tracker instead of a VEC.
7050 (location_completer): Adjust to work with a completion_tracker
7051 instead of a VEC.
7052 (add_struct_fields): Adjust to work with a completion_list instead
7053 of VEC.
7054 (expression_completer): Rename to ...
7055 (complete_expression): ... this and adjust to work with a
7056 completion_tracker instead of a VEC. Use complete_files_symbols.
7057 (expression_completer): Reimplement on top of complete_expression.
7058 (symbol_completer): Adjust to work with a completion_tracker
7059 instead of a VEC.
7060 (enum complete_line_internal_reason): Add describing comments.
7061 (complete_line_internal_normal_command): Adjust to work with a
7062 completion_tracker instead of a VEC.
7063 (complete_line_internal): Rename to ...
7064 (complete_line_internal_1): ... this and adjust to work with a
7065 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7066 handle_brkchars phase.
7067 (new_completion_tracker): Delete.
7068 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7069 complete_line_internal_1.
7070 (free_completion_tracker): Delete.
7071 (INITIAL_COMPLETION_HTAB_SIZE): New.
7072 (completion_tracker::completion_tracker)
7073 (completion_tracker::~completion_tracker): New.
7074 (maybe_add_completion): Delete.
7075 (completion_tracker::maybe_add_completion)
7076 (completion_tracker::add_completion)
7077 (completion_tracker::add_completions): New.
7078 (throw_max_completions_reached_error): Delete.
7079 (complete_line): Adjust to work with a completion_tracker instead
7080 of a VEC. Don't create a completion_tracker_t or check for max
7081 completions here.
7082 (command_completer, command_completer_handle_brkchars)
7083 (signal_completer, reg_or_group_completer_1)
7084 (reg_or_group_completer, default_completer_handle_brkchars):
7085 Adjust to work with a completion_tracker.
7086 (gdb_completion_word_break_characters_throw): New.
7087 (gdb_completion_word_break_characters): Reimplement.
7088 (line_completion_function): Delete.
7089 (completion_tracker::recompute_lowest_common_denominator)
7090 (expand_preserving_ws)
7091 (completion_tracker::build_completion_result)
7092 (completion_result::completion_result)
7093 (completion_result::completion_result)
7094 (completion_result::~completion_result)
7095 (completion_result::completion_result)
7096 (completion_result::release_match_list, compare_cstrings)
7097 (completion_result::sort_match_list)
7098 (completion_result::reset_match_list)
7099 (gdb_rl_attempted_completion_function_throw)
7100 (gdb_rl_attempted_completion_function): New.
7101 * completer.h (completion_list, struct completion_result)
7102 (class completion_tracker): New.
7103 (complete_line): Add completion_tracker parameter.
7104 (readline_line_completion_function): Delete.
7105 (gdb_rl_attempted_completion_function): New.
7106 (noop_completer, filename_completer, expression_completer)
7107 (location_completer, symbol_completer, command_completer)
7108 (signal_completer, reg_or_group_completer): Update prototypes.
7109 (completion_tracker_t, new_completion_tracker)
7110 (make_cleanup_free_completion_tracker): Delete.
7111 (enum maybe_add_completion_enum): Delete.
7112 (maybe_add_completion): Delete.
7113 (throw_max_completions_reached_error): Delete.
7114 * corefile.c (complete_set_gnutarget): Adjust to work with a
7115 completion_tracker instead of a VEC.
7116 * cp-abi.c (cp_abi_completer): Adjust to work with a
7117 completion_tracker instead of a VEC.
7118 * d-lang.c (d_language_defn): Adjust.
7119 * disasm.c (disassembler_options_completer): Adjust to work with a
7120 completion_tracker instead of a VEC.
7121 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7122 (f_collect_symbol_completion_matches): ... this. Adjust to work
7123 with a completion_tracker instead of a VEC.
7124 (f_language_defn): Adjust.
7125 * go-lang.c (go_language_defn): Adjust.
7126 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7127 Adjust to work with a completion_tracker instead of a VEC.
7128 * infrun.c (handle_completer): Likewise.
7129 * interps.c (interpreter_completer): Likewise.
7130 * interps.h (interpreter_completer): Likewise.
7131 * language.c (unknown_language_defn, auto_language_defn)
7132 (local_language_defn): Adjust.
7133 * language.h (language_defn::la_make_symbol_completion_list):
7134 Rename to ...
7135 (language_defn::la_collect_symbol_completion_matches): ... this
7136 and adjust to work with a completion_tracker instead of a VEC.
7137 * m2-lang.c (m2_language_defn): Adjust.
7138 * objc-lang.c (objc_language_defn): Adjust.
7139 * opencl-lang.c (opencl_language_defn): Adjust.
7140 * p-lang.c (pascal_language_defn): Adjust.
7141 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7142 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7143 with a completion_tracker.
7144 * rust-lang.c (rust_language_defn): Adjust.
7145 * symtab.c (free_completion_list, do_free_completion_list)
7146 (return_val, completion_tracker): Delete.
7147 (completion_list_add_name, completion_list_add_symbol)
7148 (completion_list_add_msymbol, completion_list_objc_symbol)
7149 (completion_list_add_fields, add_symtab_completions): Add
7150 completion_tracker parameter and use it.
7151 (default_make_symbol_completion_list_break_on_1): Rename to...
7152 (default_collect_symbol_completion_matches_break_on): ... this.
7153 Add completion_tracker parameter and use it instead of allocating
7154 a completion tracker here.
7155 (default_make_symbol_completion_list_break_on): Delete old
7156 implementation.
7157 (default_make_symbol_completion_list): Delete.
7158 (default_collect_symbol_completion_matches): New.
7159 (make_symbol_completion_list): Delete.
7160 (collect_symbol_completion_matches): New.
7161 (make_symbol_completion_type): Rename to ...
7162 (collect_symbol_completion_matches_type): ... this. Add
7163 completion_tracker parameter and use it instead of VEC.
7164 (make_file_symbol_completion_list_1): Rename to...
7165 (collect_file_symbol_completion_matches): ... this. Add
7166 completion_tracker parameter and use it instead of VEC.
7167 (make_file_symbol_completion_list): Delete.
7168 (add_filename_to_list): Use completion_list instead of a VEC.
7169 (add_partial_filename_data::list): Now a completion_list.
7170 (make_source_files_completion_list): Work with a completion_list
7171 instead of a VEC.
7172 * symtab.h: Include "completer.h".
7173 (default_make_symbol_completion_list_break_on)
7174 (default_make_symbol_completion_list, make_symbol_completion_list)
7175 (make_symbol_completion_type, make_file_symbol_completion_list)
7176 (make_source_files_completion_list): Delete.
7177 (default_collect_symbol_completion_matches_break_on)
7178 (default_collect_symbol_completion_matches)
7179 (collect_symbol_completion_matches)
7180 (collect_symbol_completion_matches_type)
7181 (collect_file_symbol_completion_matches)
7182 (make_source_files_completion_list): New.
7183 * top.c (init_main): Don't install a rl_completion_entry_function
7184 hook. Install a rl_attempted_completion_function hook instead.
7185 * tui/tui-layout.c (layout_completer): Adjust to work with a
7186 completion_tracker.
7187 * tui/tui-regs.c (tui_reggroup_completer):
7188 * tui/tui-win.c (window_name_completer, focus_completer)
7189 (winheight_completer): Adjust to work with a completion_tracker.
7190 * value.c: Include "completer.h".
7191 (complete_internalvar): Adjust to work with a completion_tracker.
7192 * value.h (complete_internalvar): Likewise.
7193
6e1dbf8c
PA
71942017-07-17 Pedro Alves <palves@redhat.com>
7195
7196 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7197 renames.
7198 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7199 comments to completer_ftype's declaration.
7200 <completer_handle_brkchars>: Change type to
7201 completer_handle_brkchars_ftype.
7202 * command.h (completer_ftype): Add describing comment and give
7203 names to parameters.
7204 (completer_ftype_void): Rename to ...
7205 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7206 (set_cmd_completer_handle_brkchars): Adjust.
7207 * completer.c (filename_completer_handle_brkchars): New function.
7208 (complete_line_internal_normal_command): New function, factored
7209 out from ...
7210 (complete_line_internal): ... here.
7211 (command_completer_handle_brkchars)
7212 (default_completer_handle_brkchars)
7213 (completer_handle_brkchars_func_for_completer): New functions.
7214 * completer.h (set_gdb_completion_word_break_characters): Delete
7215 declaration.
7216 (completer_handle_brkchars_func_for_completer): New declaration.
7217 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7218 completer_handle_brkchars_func_for_completer.
7219
78b13106
PA
72202017-07-17 Pedro Alves <palves@redhat.com>
7221
7222 * completer.c (symbol_completer): New function, based on
7223 make_symbol_completion_list_fn.
7224 * completer.h (symbol_completer): New declaration.
7225 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7226 * python/py-cmd.c (completers): Adjust.
7227 * symtab.c (make_symbol_completion_list_fn): Delete.
7228 * symtab.h (make_symbol_completion_list_fn): Delete.
7229 * cli/cli-decode.c (add_cmd): Adjust.
7230
bbf2f4df
PA
72312017-07-17 Pedro Alves <palves@redhat.com>
7232
7233 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7234 * dwarf2read.c: Include "filename-seen-cache.h".
7235 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7236 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7237 * filename-seen-cache.c: New file.
7238 * filename-seen-cache.h: New file.
7239 * symtab.c: Include "filename-seen-cache.h".
7240 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7241 (create_filename_seen_cache, clear_filename_seen_cache)
7242 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7243 to filename-seen-cache.h/filename-seen-cache.c.
7244 (output_source_filename, sources_info)
7245 (maybe_add_partial_symtab_filename)
7246 (make_source_files_completion_list): Adjust to use
7247 filename_seen_cache.
7248
330cdd98
PA
72492017-07-17 Pedro Alves <palves@redhat.com>
7250
7251 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7252 fields.
7253 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7254 dwarf2_debug_sections*)): New.
7255 (dwarf2_per_objfile::dwarf2_per_objfile(const
7256 dwarf2_per_objfile&)): Declare as deleted.
7257 (dwarf2_per_objfile::operator=): Declare as deleted.
7258 (dwarf2_per_objfile::dwarf2_per_objfile)
7259 (dwarf2_per_objfile::~dwarf2_per_objfile)
7260 (dwarf2_per_objfile::free_cached_comp_units): New.
7261 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7262 ctor. Call dwarf2_per_objfile's ctor manually.
7263 (dwarf2_locate_sections): Deleted/refactored as ...
7264 (dwarf2_per_objfile::locate_sections): ... this new method.
7265 (free_cached_comp_units): Defer to
7266 dwarf2_per_objfile::free_cached_comp_units.
7267 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7268
8880f2a9
TT
72692017-07-14 Tom Tromey <tom@tromey.com>
7270
7271 PR rust/21764:
7272 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7273 parameter.
7274 <UNOP_SIZEOF>: Split into separate case.
7275 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7276
65547233
TT
72772017-07-14 Tom Tromey <tom@tromey.com>
7278
7279 PR rust/21763:
7280 * symtab.c (symbol_matches_domain): Add language_rust to special
7281 case.
7282 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7283 treat LOC_TYPEDEF symbols as variables.
7284
8f14146e
PA
72852017-07-14 Pedro Alves <palves@redhat.com>
7286
7287 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7288 symtabs matching all symtabs with SRCFILE as file name instead of
7289 only considering the first hit, with lookup_symtab.
7290
2347965c
SM
72912017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7292
7293 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7294 operator_name parameters.
7295 (gen_expr): Update function call.
7296
40f4af28
SM
72972017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7298
7299 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7300 parameter.
7301 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7302 Likewise.
7303 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7304 parameter, use agent_expr::gdbarch instead, update function
7305 calls.
7306 (locexpr_tracepoint_var_ref): Likewise.
7307 (loclist_tracepoint_var_ref): Likewise.
7308 * ax-gdb.c (gen_trace_static_fields): Likewise.
7309 (gen_traced_pop): Likewise.
7310 (gen_frame_args_address): Likewise.
7311 (gen_frame_locals_address): Likewise.
7312 (gen_var_ref): Likewise.
7313 (gen_struct_ref_recursive): Likewise.
7314 (gen_static_field): Likewise.
7315 (gen_maybe_namespace_elt): Likewise.
7316 (gen_expr): Likewise.
7317 (gen_trace_for_var): Likewise.
7318 (gen_trace_for_expr): Likewise.
7319 (gen_trace_for_return_address): Likewise.
7320
053f8057
SM
73212017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7322
7323 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7324 parameter.
7325 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7326
6661ad48
SM
73272017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7328
7329 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7330 from ax, update calls.
7331 (gen_usual_arithmetic): Likewise.
7332 (gen_integral_promotions): Likewise.
7333 (gen_bitfield_ref): Likewise.
7334 (gen_primitive_field): Likewise.
7335 (gen_struct_ref_recursive): Likewise.
7336 (gen_struct_ref): Likewise.
7337 (gen_maybe_namespace_elt): Likewise.
7338 (gen_struct_elt_for_reference): Likewise.
7339 (gen_namespace_elt): Likewise.
7340 (gen_aggregate_elt_ref): Likewise.
7341 (gen_expr): Get gdbarch from ax, update calls.
7342 (gen_expr_binop_rest): Likewise.
7343
c55a47e7
PA
73442017-07-13 Pedro Alves <palves@redhat.com>
7345
7346 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7347 as default tdesc.
7348 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7349 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7350 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7351 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7352 tdep.
7353 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7354 Get final tdesc from the tdep.
7355 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7356 default tdesc.
7357 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7358 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7359 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7360 Use it as default tdesc.
7361 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7362 down to amd_init_abi. No longer handle fallback tdesc here.
7363 * amd64-tdep.h (tdesc_x32): Declare.
7364 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7365 parameter.
7366 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7367 as default tdesc.
7368
55efceab
AA
73692017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7370
7371 * s390-linux-tdep.c (s390_process_record): Add support for
7372 instructions new in arch12.
7373
0aa37b65
JB
73742017-07-11 John Baldwin <jhb@FreeBSD.org>
7375
7376 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7377 PT_GETFSBASE and PT_GETGSBASE.
7378 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7379 PT_SETGSBASE.
7380
48aeef91
JB
73812017-07-11 John Baldwin <jhb@FreeBSD.org>
7382
7383 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7384 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7385 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7386 those rules.
7387 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7388 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7389 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7390 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7391 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7392 * features/i386/amd64.xml: Add 64bit-segments.xml.
7393 * features/i386/amd64-avx-avx512.c: Regenerated.
7394 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7395 * features/i386/amd64-avx-mpx.c: Regenerated.
7396 * features/i386/amd64-avx.c: Regenerated.
7397 * features/i386/amd64-mpx.c: Regenerated.
7398 * features/i386/amd64.c: Regenerated.
7399 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7400 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7401 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7402 * regformats/i386/amd64-avx.dat: Regenerated.
7403 * regformats/i386/amd64-mpx.dat: Regenerated.
7404 * regformats/i386/amd64.dat: Regenerated.
7405
77c501bc
YQ
74062017-07-10 Yao Qi <yao.qi@linaro.org>
7407
7408 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7409 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7410
6dc8d757
AK
74112017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7412
7413 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7414 unsetenv.
7415 * gnulib/aclocal.m4: Regenerate.
7416 * gnulib/config.in: Regenerate.
7417 * gnulib/configure: Regenerate.
7418 * gnulib/import/Makefile.am: Regenerate.
7419 * gnulib/import/Makefile.in: Regenerate.
7420 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7421 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7422 * gnulib/import/m4/environ.m4: New file.
7423 * gnulib/import/m4/setenv.m4: New file.
7424 * gnulib/import/setenv.c: New file.
7425 * gnulib/import/unsetenv.c: New file.
7426
266934d1
SM
74272017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7428
7429 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7430 address when op is DW_OP_addr.
7431
03278692
TT
74322017-07-09 Tom Tromey <tom@tromey.com>
7433
7434 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7435 check and apply to outer type.
7436
4b654465
JB
74372017-07-07 John Baldwin <jhb@FreeBSD.org>
7438
7439 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7440 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7441 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7442 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7443
2af9fc44
JB
74442017-07-07 John Baldwin <jhb@FreeBSD.org>
7445
7446 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7447
382b69bb
JB
74482017-07-07 John Baldwin <jhb@FreeBSD.org>
7449
7450 * corelow.c (get_core_siginfo): Remove.
7451 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7452 instead of get_core_siginfo.
7453 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7454 * gdbarch.h: Re-generate.
7455 * gdbarch.c: Re-generate.
7456 * linux-tdep.c (linux_core_xfer_siginfo): New.
7457 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7458
6e5eab33
JB
74592017-07-07 John Baldwin <jhb@FreeBSD.org>
7460
7461 * corelow.c (thread_section_name): Move to ...
7462 * gdbcore.h (thread_section_name): ... here.
7463
929edea9
JB
74642017-07-07 John Baldwin <jhb@FreeBSD.org>
7465
7466 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7467 (struct siginfo32): New.
7468 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7469 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7470 via ptrace(PT_LWPINFO).
7471
762c974a
JB
74722017-07-07 John Baldwin <jhb@FreeBSD.org>
7473
7474 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7475 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7476 (fbsd_get_siginfo_type): New.
7477 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7478 (_initialize_fbsd_tdep): New.
7479
33c5cd75
DB
74802017-07-06 David Blaikie <dblaikie@gmail.com>
7481
7482 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7483 a singular dwo_unit*) to support multiple CUs in the same way that
7484 multiple TUs are supported.
7485 (create_cus_hash_table): Replace create_dwo_cu with a function for
7486 parsing multiple CUs from a DWO file.
7487 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7488 create_dwo_cu.
7489 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7490 htab_find, rather than comparing the signature to a singleton CU in
7491 the dwo_file.
7492
8455d262
PA
74932017-07-06 Pedro Alves <palves@redhat.com>
7494
7495 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7496
4da3eb35
PA
74972017-07-04 Pedro Alves <palves@redhat.com>
7498
7499 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7500 * gdbtypes.h (TYPE_STATIC): Delete.
7501 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7502 is_synchronized, is_native>: Delete.
7503 <dummy>: Bump.
7504 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7505 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7506 (TYPE_FN_FIELD_ABSTRACT): Delete.
7507
5bfd255c
SM
75082017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7509
7510 * buffer.h (buffer_finish): Fix spelling mistakes.
7511
25c54127
EZ
75122017-07-01 Eli Zaretskii <eliz@gnu.org>
7513
7514 * .dir-locals.el: Automatically switch to C-style comments in
7515 versions of Emacs that support the feature.
7516
dc4bde35
SDJ
75172017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7518 Pedro Alves <palves@redhat.com>
7519
7520 PR cli/21688
7521 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7522 (process_next_line): New variable 'inline_cmd'.
7523 Adjust 'if' clauses for "python", "compile" and "guile" to use
7524 'command_name_equals' and check for '!inline_cmd'.
7525
51ed89aa
SDJ
75262017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7527
7528 PR cli/21688
7529 * cli/cli-script.c (command_name_equals_not_inline): New function.
7530 (process_next_line): Adjust 'if' clauses for "python", "compile"
7531 and "guile" to use command_name_equals_not_inline.
7532
eb17d413
PA
75332017-06-29 Pedro Alves <palves@redhat.com>
7534
7535 * completer.c (expression_completer): Call
7536 linespec_location_completer instead of location_completer.
7537
195bcdd5
PA
75382017-06-29 Pedro Alves <palves@redhat.com>
7539
7540 * completer.c (expression_completer): Remove code that recomputes
7541 'text' from 'word'.
7542
adc764e7
YQ
75432017-06-29 Yao Qi <yao.qi@linaro.org>
7544
7545 * regformats/regdat.sh: Generate code with
7546 "ifndef IN_PROCESS_AGENT".
7547
6e75794e
PA
75482017-06-28 Pedro Alves <palves@redhat.com>
7549
7550 * command.h: Include "common/scoped_restore.h".
7551
bc491f2e
YQ
75522017-06-28 Yao Qi <yao.qi@linaro.org>
7553
7554 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7555 instead of obstack_grow.
7556
41664b45
DG
75572017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7558
7559 PR gdb/21337
7560 * symfile.c (reread_symbols): Call objfiles_changed just before
7561 read_symbols.
7562
6da67eb1
PA
75632017-06-27 Pedro Alves <palves@redhat.com>
7564
7565 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7566 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7567 (completion_list_add_symbol, completion_list_add_msymbol):
7568 ... these new functions.
7569 (add_symtab_completions)
7570 (default_make_symbol_completion_list_break_on_1): Adjust.
7571
23732b1e
PA
75722017-06-27 Pedro Alves <palves@redhat.com>
7573
7574 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7575 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7576 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7577 dtor.
7578 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7579 'storage_obstack' field an auto_obstack. In-class initialize all
7580 non-bitfield fields. Make minsyms_read bool.
7581 * symfile.c (read_symbols): Adjust.
7582
a4d1e79a
AH
75832017-06-27 Alan Hayward <alan.hayward@arm.com>
7584
7585 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7586 (gdbsim_store_register): Likewise.
7587
8268c778
PA
75882017-06-27 Pedro Alves <palves@redhat.com>
7589
7590 * c-exp.y (name_obstack): Now an auto_obstack.
7591 (yylex): Use auto_obstack::clear.
7592 (c_parse): Use auto_obstack::clear instead of reinitializing and
7593 freeing the obstack.
7594 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7595 * d-exp.y (name_obstack): Now an auto_obstack.
7596 (yylex): Use auto_obstack::clear.
7597 (d_parse): Use auto_obstack::clear instead of reinitializing and
7598 freeing the obstack.
7599 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7600 auto_obstack.
7601 * dwarf2read.c (create_addrmap_from_index)
7602 (dwarf2_build_psymtabs_hard)
7603 (update_enumeration_type_from_children): Likewise.
7604 * gdb_obstack.h (auto_obstack): New type.
7605 * go-exp.y (name_obstack): Now an auto_obstack.
7606 (build_packaged_name): Use auto_obstack::clear.
7607 (go_parse): Use auto_obstack::clear instead of reinitializing and
7608 freeing the obstack.
7609 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7610 auto_obstack.
7611 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7612 * rust-exp.y (work_obstack): Now an auto_obstack.
7613 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7614 reinitializing and freeing the obstack.
7615 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7616 (host_char_to_target): Use auto_obstack.
7617 * utils.h (make_cleanup_obstack_free): Delete declaration.
7618 * valprint.c (generic_emit_char, generic_printstr): Use
7619 auto_obstack.
7620
db665f42
SM
76212017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7622
7623 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7624 thread.
7625 (darwin_init_thread_list): Don't update dummy thread.
7626 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7627
873c0814
SM
76282017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7629
7630 * record-full.c (netorder16): Remove.
7631
8b5a7a6e
SM
76322017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7633
7634 * common/diagnostics.h: Define macros for GCC.
7635 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7636 * common/vec.h: Include diagnostics.h.
7637 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7638 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7639 warning.
7640
d1435379
SM
76412017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7642
7643 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7644 New macro.
7645 * ada-lex.l: Ignore deprecated register warnings.
7646
cc75e0fd
SM
76472017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7648
7649 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7650 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7651
07809eaf
SM
76522017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7653
7654 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7655 its own line.
7656
f076f034
SM
76572017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7658
7659 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7660
0dd5cbc5
AH
76612017-06-23 Alan Hayward <alan.hayward@arm.com>
7662
7663 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7664 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7665 (xtensa_register_read_masked): Likewise.
7666
d4c6ce5b
SDJ
76672017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7668
7669 * common/environ.c (gdb_environ::unset): Update comment.
7670
16892a03
AH
76712017-06-22 Alan Hayward <alan.hayward@arm.com>
7672
7673 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7674 registers.
7675
d7dcbefc
AH
76762017-06-22 Alan Hayward <alan.hayward@arm.com>
7677
7678 * record-full.c (record_full_exec_insn): Use byte_vector.
7679
b30ff123
YQ
76802017-06-22 Yao Qi <yao.qi@linaro.org>
7681
7682 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7683 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7684
4fa847d7
AH
76852017-06-22 Alan Hayward <alan.hayward@arm.com>
7686
7687 * remote.c (cached_reg): Move from here...
7688 * regcache.h (cached_reg): ...to here.
7689 * python/py-unwind.c (struct reg_info): Remove.
7690 (cached_frame_info): Use cached_reg_t.
7691 (pyuw_prev_register): Likewise.
7692 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7693 (pyuw_dealloc_cache): Free all registers.
7694
f4906a9a
PA
76952017-06-22 Pedro Alves <palves@redhat.com>
7696 Simon Marchi <simon.marchi@ericsson.com>
7697
7698 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7699 warning.
7700 * common/diagnostics.h: New file.
7701
b45a1208
PA
77022017-06-22 Pedro Alves <palves@redhat.com>
7703
7704 * common/agent.h: Add include guards.
7705
e4da2c61
SM
77062017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7707
7708 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7709 talk about addressable units instead of bytes.
7710
96160d60
SDJ
77112017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7712
7713 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7714 of '::const_iterator'.
7715
9a6c7d9c
SDJ
77162017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7717
7718 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7719 'unittests/environ-selftests.c'.
7720 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7721 * charset.c (find_charset_names): Declare object 'iconv_env'.
7722 Update code to use 'iconv_env' object. Remove call to
7723 'free_environ'.
7724 * common/environ.c: Include <utility>.
7725 (make_environ): Delete function.
7726 (free_environ): Delete function.
7727 (gdb_environ::clear): New function.
7728 (gdb_environ::operator=): New function.
7729 (gdb_environ::get): Likewise.
7730 (environ_vector): Delete function.
7731 (set_in_environ): Delete function.
7732 (gdb_environ::set): New function.
7733 (unset_in_environ): Delete function.
7734 (gdb_environ::unset): New function.
7735 (gdb_environ::envp): Likewise.
7736 * common/environ.h: Include <vector>.
7737 (struct gdb_environ): Delete; transform into...
7738 (class gdb_environ): ... this class.
7739 (free_environ): Delete prototype.
7740 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7741 environ_vector): Likewise.
7742 * infcmd.c (run_command_1): Update code to call
7743 'envp' from 'gdb_environ' class.
7744 (environment_info): Update code to call methods from 'gdb_environ'
7745 class.
7746 (unset_environment_command): Likewise.
7747 (path_info): Likewise.
7748 (path_command): Likewise.
7749 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7750 (inferior::inferior): Initialize 'environment' using the host's
7751 information.
7752 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7753 Include "environ.h".
7754 (class inferior) <environment>: Change type from 'struct
7755 gdb_environ' to 'gdb_environ'.
7756 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7757 methods from 'gdb_environ' class.
7758 * solib.c (solib_find_1): Likewise
7759 * unittests/environ-selftests.c: New file.
7760
75c554cf
YQ
77612017-06-20 Yao Qi <yao.qi@linaro.org>
7762
7763 * features/i386/i386-linux.xml: Exchange the order of including
7764 32bit-linux.xml and 32bit-sse.xml.
7765 * features/i386/i386-linux.c: Regenerated.
7766
72ddacb7
YQ
77672017-06-20 Yao Qi <yao.qi@linaro.org>
7768
7769 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7770 Delete copy ctor and assignment operator.
7771 (tdesc_type): Likewise.
7772 (tdesc_feature): Likewise.
7773 (tdesc_free_reg): Remove.
7774 (tdesc_create_reg): Use new.
7775 (tdesc_free_type): Remove.
7776 (tdesc_create_vector): Use new.
7777 (tdesc_create_union): Likewise.
7778 (tdesc_create_flags): Likewise.
7779 (tdesc_create_enum): Likewise.
7780 (tdesc_free_feature): Delete.
7781 (free_target_description): Use delete.
7782
325c9fd4
JB
77832017-06-19 John Baldwin <jhb@FreeBSD.org>
7784
7785 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7786 registers.
7787
16b7a719
PA
77882017-06-19 Pedro Alves <palves@redhat.com>
7789
7790 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7791 after gdb::unlinker.
7792
1c8e01c9
SDJ
77932017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7794
7795 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7796 gdb_environ to access an environment variable.
7797
ffce45d2
TP
77982017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7799
7800 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7801 gdb_byte*.
7802
1d4fbac9
SM
78032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7804
7805 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7806
8465943a
SM
78072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7808
7809 * configure: Re-generate.
7810 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7811
3e019bdc
SM
78122017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7813
7814 * configure: Re-generate.
7815 * warning.m4: Pass -Werror to compiler when checking for
7816 supported warning flags.
7817
cf0dd6f0
SM
78182017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7819
7820 * Makefile.in (COMPILE.pre): Add "-x c++".
7821
6f98355c
YQ
78222017-06-16 Alan Hayward <alan.hayward@arm.com>
7823 Pedro Alves <palves@redhat.com>
7824 Yao Qi <yao.qi@linaro.org>
7825
7826 * defs.h (RequireLongest): New.
7827 (extract_integer): Declare function template.
7828 (extract_signed_integer): Remove the declaration, but define it
7829 static inline.
7830 (extract_unsigned_integer): Likewise.
7831 (store_integer): Declare function template.
7832 (store_signed_integer): Remove the declaration, but define it
7833 static inline.
7834 (store_unsigned_integer): Likewise.
7835 * findvar.c (extract_integer): New function template.
7836 (extract_signed_integer): Remove.
7837 (extract_unsigned_integer): Remove.
7838 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7839 instantiations.
7840 (store_integer): New function template.
7841 (store_signed_integer): Remove.
7842 (store_unsigned_integer): Remove.
7843 (store_integer): Explicit instantiations.
7844 * regcache.c (regcache_raw_read_signed): Update.
7845 (regcache::raw_read): New function.
7846 (regcache::raw_read_signed): Remove.
7847 (regcache::raw_read_unsigned): Remove.
7848 (regcache_raw_read_unsigned): Update.
7849 (regcache_raw_write_unsigned): Update.
7850 (regcache::raw_write_signed): Remove.
7851 (regcache::raw_write): New function.
7852 (regcache_cooked_read_signed): Update.
7853 (regcache::raw_write_unsigned): Remove.
7854 (regcache::cooked_read_signed): Remove.
7855 (regcache_cooked_read_unsigned): Update.
7856 (regcache::cooked_read_unsigned): Remove.
7857 (regcache_cooked_write_signed): Update.
7858 (regcache_cooked_write_unsigned): Update.
7859 * regcache.h (regcache) <raw_read_signed>: Remove.
7860 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7861 <raw_read, raw_write>: New.
7862 <cooked_read_signed, cooked_write_signed>: Remove.
7863 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7864 <cooked_read, cooked_write>: New.
7865 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7866 (sh64_pseudo_register_write): Update.
7867
a87dc45a
AK
78682017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7869
7870 * arc-tdep.c (arc_disassembler_options): New variable.
7871 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7872 of default_print_insn.
7873 (arc_delayed_print_insn): Set info->section when needed,
7874 use default_print_insn to retrieve a disassembler.
7875
45159d6a
SDJ
78762017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7877
7878 PR gdb/21574
7879 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7880 to mention $SHELL and startup-with-shell.
7881
b46c4cf0
MF
78822017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7883
7884 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7885
6394c606
YQ
78862017-06-14 Yao Qi <yao.qi@linaro.org>
7887
7888 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7889 default_print_insn instead of print_insn_aarch64.
7890 * arm-tdep.c (gdb_print_insn_arm): Call
7891 default_print_insn instead of print_insn_big_arm
7892 and print_insn_little_arm.
7893 * i386-tdep.c (i386_print_insn): Call default_print_insn
7894 instead of print_insn_i386.
7895 * ia64-tdep.c (ia64_print_insn): Call
7896 default_print_insn instead of print_insn_ia64.
7897 * mips-tdep.c (gdb_print_insn_mips): Call
7898 default_print_insn instead of print_insn_big_mips
7899 and print_insn_little_mips.
7900 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7901 instead of print_insn_spu.
7902
d5722aa2
PA
79032017-06-14 Pedro Alves <palves@redhat.com>
7904
7905 * ada-lang.c: Include "common/byte-vector.h".
7906 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7907 * charset.c (wchar_iterator::iterate): Resize the vector instead
7908 of reserving it.
7909 * common/byte-vector.h: Include "common/def-vector.h".
7910 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7911 * cli/cli-dump.c: Include "common/byte-vector.h".
7912 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7913 * common/byte-vector.h: New file.
7914 * common/def-vector.h: New file.
7915 * common/default-init-alloc.h: New file.
7916 * dwarf2loc.c: Include "common/byte-vector.h".
7917 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7918 instead of reserving it.
7919 * dwarf2read.c: Include "common/byte-vector.h".
7920 (data_buf::m_vec): Now a gdb::byte_vector.
7921 * gdb_regex.c: Include "common/def-vector.h".
7922 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7923 * mi/mi-main.c: Include "common/byte-vector.h".
7924 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7925 * printcmd.c: Include "common/byte-vector.h".
7926 (print_scalar_formatted): Use gdb::byte_vector.
7927 * valprint.c: Include "common/byte-vector.h".
7928 (maybe_negate_by_bytes, print_decimal_chars): Use
7929 gdb::byte_vector.
7930
01ec7a27
SM
79312017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7932
7933 * darwin-nat.c: Include "nat/fork-inferior.h".
7934
848d9074
SM
79352017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7936
7937 * configure.nat: Factor out Darwin bits that are not
7938 architecture-specific. Add fork-inferior.o.
7939
3b912944
SM
79402017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7941
7942 * configure.nat: Factor out AIX bits that are not
7943 architecture-specific. Add fork-inferior.o.
7944
55acdf22
AA
79452017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7946
7947 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7948 (read_pieced_value, write_pieced_value): ...here. Reduce to
7949 wrappers that just call rw_pieced_value.
7950
f65e2044
AA
79512017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7952
7953 * dwarf2loc.c (write_pieced_value): When writing the data for a
7954 memory piece, use write_memory_with_notification instead of
7955 write_memory.
7956
23f945bf
AA
79572017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7958
7959 * valops.c (read_value_memory): Change embedded_offset to
7960 represent a bit offset instead of a byte offset.
7961 * value.h (read_value_memory): Adjust comment.
7962
f236533e
AA
79632017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7964
7965 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7966 dest_offset_bits and source_offset_bits.
7967 (write_pieced_value): Likewise.
7968
65d84b76
AA
79692017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7970
7971 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7972 given by DW_OP_bit_piece.
7973 (write_pieced_value): Likewise.
7974
242d31ab
AA
79752017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7976
7977 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
7978 some other preparations to the places where sufficient information
7979 is available.
7980 (write_pieced_value): Likewise.
7981
03c8af18
AA
79822017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7983
7984 * dwarf2loc.c (bits_to_bytes): New function.
7985 (read_pieced_value): Fix offset calculations for register pieces
7986 on big-endian targets.
7987 (write_pieced_value): Likewise.
7988
840989c1
AA
79892017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7990
7991 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
7992 (write_pieced_value): Likewise.
7993
359b19bb
AA
79942017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7995
7996 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
7997 transfer the source value's least significant bits, instead of its
7998 lowest-addressed ones. Rename type_len to max_offset.
7999 (read_pieced_value): Mirror above changes to write_pieced_value as
8000 applicable.
8001
07c9ca3b
AA
80022017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8003
8004 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8005 truncate full bytes from dest_offset_bits before using it as an
8006 offset into the buffer.
8007
f1cc9874
AA
80082017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8009
8010 * dwarf2loc.c (write_pieced_value): Include transfer size in
8011 byte-wise check.
8012
cdaac320
AA
80132017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8014
8015 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8016 calculation of this_size.
8017
af547a96
AA
80182017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8019
8020 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8021 when targeting a bit-field.
8022 (write_pieced_value): Likewise.
8023
ddd7882a
AA
80242017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8025
8026 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8027 (allocate_piece_closure): Drop addr_size parameter.
8028 (dwarf2_evaluate_loc_desc_full): Adjust call to
8029 allocate_piece_closure.
8030
e9352324
AA
80312017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8032
8033 PR gdb/21226
8034 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8035 the LSB end, independent of endianness.
8036
d5d1163e
AA
80372017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8038
8039 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8040 size capping.
8041
032bb6ea
YQ
80422017-06-13 Yao Qi <yao.qi@linaro.org>
8043
8044 * mips-linux-nat.c: Move include features/mips*-linux.c to
8045 mips-linux-tdep.c.
8046 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8047 to mips-linux-tdep.c.
8048 * mips-linux-tdep.c: Include features/mips*-linux.c
8049 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8050 functions.
8051 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8052 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8053 (tdesc_mips64_dsp_linux): Declare.
8054
f12f6bad
TT
80552017-06-12 Tom Tromey <tom@tromey.com>
8056
8057 * valprint.h (val_print_type_code_int): Remove.
8058 * valprint.c (generic_val_print_int): Always call
8059 val_print_scalar_formatted.
8060 (val_print_type_code_int): Remove.
8061 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8062 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8063 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8064 * ada-valprint.c (ada_val_print_num): Use
8065 val_print_scalar_formatted.
8066
d9109c80
TT
80672017-06-12 Tom Tromey <tom@tromey.com>
8068
8069 * printcmd.c (print_scalar_formatted): Unify the two switches.
8070 Don't convert scalars to LONGEST.
8071
4ac0cb1c
TT
80722017-06-12 Tom Tromey <tom@tromey.com>
8073
8074 PR exp/16225:
8075 * valprint.h (print_decimal_chars): Update.
8076 * valprint.c (maybe_negate_by_bytes): New function.
8077 (print_decimal_chars): Add "is_signed" argument.
8078 * printcmd.c (print_scalar_formatted): Update.
8079
30a25466
TT
80802017-06-12 Tom Tromey <tom@tromey.com>
8081
8082 PR exp/16225:
8083 * valprint.h (print_binary_chars, print_hex_chars): Update.
8084 * valprint.c (val_print_type_code_int): Update.
8085 (print_binary_chars): Add "zero_pad" argument.
8086 (emit_octal_digit): New function.
8087 (print_octal_chars): Don't zero-pad.
8088 (print_decimal_chars): Likewise.
8089 (print_hex_chars): Add "zero_pad" argument.
8090 * sh64-tdep.c (sh64_do_fp_register): Update.
8091 * regcache.c (regcache::dump): Update.
8092 * printcmd.c (print_scalar_formatted): Update.
8093 * infcmd.c (default_print_one_register_info): Update.
8094
b3464d03
PA
80952017-06-12 Pedro Alves <palves@redhat.com>
8096 Alan Hayward <alan.hayward@arm.com>
8097
8098 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8099 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8100 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8101 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8102 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8103
4b76cda9
PA
81042017-06-12 Pedro Alves <palves@redhat.com>
8105
8106 * dwarf2read.c (mapped_symtab::data): Now a vector of
8107 symtab_index_entry instead of vector of
8108 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8109 whether an element's name is NULL instead of checking whether the
8110 element itself is NULL.
8111 (find_slot): Change return type. Adjust.
8112 (hash_expand, , add_index_entry, uniquify_cu_indices)
8113 (write_hash_table): Adjust.
8114
e8f8bcb3
PA
81152017-06-12 Pedro Alves <palves@redhat.com>
8116
8117 * dwarf2read.c (recursively_count_psymbols): New function.
8118 (write_psymtabs_to_index): Call it to compute number of psyms and
8119 pass estimate size of psyms_seen to unordered_set's ctor.
8120
70a1152b
PA
81212017-06-12 Pedro Alves <palves@redhat.com>
8122
8123 * dwarf2read.c (write_hash_table): Check if key already exists
8124 before emplacing.
8125
c2f134ac
PA
81262017-06-12 Pedro Alves <palves@redhat.com>
8127
8128 * dwarf2read.c (data_buf::append_space): Rename to...
8129 (data_buf::grow): ... this, and make private. Adjust all callers.
8130 (data_buf::append_uint): New method.
8131 (add_address_entry, write_one_signatured_type)
8132 (write_psymtabs_to_index): Use it.
8133
a81e6d4d
PA
81342017-06-12 Pedro Alves <palves@redhat.com>
8135
8136 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8137 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8138 (data_buf::file_write): Call ::fwrite directly.
8139
6fd931f2
PA
81402017-06-12 Pedro Alves <palves@redhat.com>
8141
8142 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8143 std::vector::erase.
8144
bc8f2430
JK
81452017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8146
8147 Code cleanup: C++ify .gdb_index producer.
8148 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8149 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8150 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8151 (create_strtab, add_string): Remove.
8152 (file_write, data_buf): New.
8153 (struct symtab_index_entry): Use std::vector for cu_indices.
8154 (struct mapped_symtab): Use std::vector for data.
8155 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8156 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8157 Remove.
8158 (find_slot): Change return type. Update it to the new data structures.
8159 (hash_expand, add_index_entry): Update it to the new data structures.
8160 (offset_type_compare): Remove.
8161 (uniquify_cu_indices): Update it to the new data structures.
8162 (c_str_view, c_str_view_hasher, vector_hasher): New.
8163 (add_indices_to_cpool): Remove.
8164 (write_hash_table): Update it to the new data structures.
8165 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8166 (eq_psymtab_cu_index): Remove.
8167 (psym_index_map): New typedef.
8168 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8169 reference and std::unordered_map for cu_index_htab.
8170 (add_address_entry, add_address_entry_worker, write_address_map)
8171 (write_psymbols): Update it to the new data structures.
8172 (write_obstack): Remove.
8173 (struct signatured_type_index_data): Change types_list to a data_buf
8174 reference and psyms_seen to a std::unordered_set reference.
8175 (write_one_signatured_type, recursively_write_psymbols)
8176 (write_psymtabs_to_index): Update it to the new data structures.
8177
c4dcb155
SM
81782017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8179
8180 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8181 separate-debug-file commands.
8182 * symfile.h (separate_debug_file_debug): New global.
8183 * symfile.c (separate_debug_file_debug): New global.
8184 (separate_debug_file_exists, find_separate_debug_file): Add
8185 debug output.
8186 (_initialize_symfile): Add "set debug separate-debug-file"
8187 command.
8188 * build-id.c (build_id_to_debug_bfd,
8189 find_separate_debug_file_by_buildid): Add debug output.
8190
6d45d4b4
SM
81912017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8192
8193 * gdbarch.sh (displaced_step_free_closure): Remove.
8194 * gdbarch.h, gdbarch.c: Re-generate.
8195 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8196 displaced_step_free_closure.
8197 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8198 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8199 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8200 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8201 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8202 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8203 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8204 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8205 * infrun.c (displaced_step_clear): Call xfree instead of
8206 gdbarch_displaced_step_free_closure.
8207
2f91880f
SDJ
82082017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8209
8210 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8211 NULL".
8212
b8b6e72f
AH
82132017-06-08 Alan Hayward <alan.hayward@arm.com>
8214
8215 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8216 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8217 (mn10300_push_dummy_call): Likewise.
8218
5369082e
AH
82192017-06-08 Alan Hayward <alan.hayward@arm.com>
8220
8221 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8222
ff4ca5ac
AH
82232017-06-08 Alan Hayward <alan.hayward@arm.com>
8224
8225 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8226
aefd8b33
SDJ
82272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8228
8229 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8230 able to start inferiors using a shell.
8231 (New remote packets): Announce new packet "QStartupWithShell".
8232 * remote.c: Add PACKET_QStartupWithShell.
8233 (extended_remote_create_inferior): Handle new
8234 PACKET_QStartupWithShell.
8235 (remote_protocol_features) <QStartupWithShell>: New entry for
8236 PACKET_QStartupWithShell.
8237 (_initialize_remote): Call "add_packet_config_cmd" for
8238 QStartupShell.
8239
2090129c
SDJ
82402017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8241 Pedro Alves <palves@redhat.com>
8242
8243 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8244 and "nat/fork-inferior.h".
8245 * common/common-inferior.h: New file, with contents from
8246 "gdb/inferior.h".
8247 * commom/common-utils.c: Include "common-utils.h".
8248 (stringify_argv): New function.
8249 * common/common-utils.h (stringify_argv): New prototype.
8250 * configure.nat: Add "fork-inferior.o" as a dependency for
8251 "*linux*", "fbsd*" and "nbsd*" hosts.
8252 * corefile.c (get_exec_file): Update comment.
8253 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8254 instead of "startup_inferior".
8255 (darwin_create_inferior): Call "add_thread_silent" after
8256 "fork_inferior".
8257 * fork-child.c: Cleanup unnecessary includes.
8258 (SHELL_FILE): Move to "common/common-fork-child.c".
8259 (environ): Likewise.
8260 (exec_wrapper): Initialize.
8261 (get_exec_wrapper): New function.
8262 (breakup_args): Move to "common/common-fork-child.c"; rename to
8263 "breakup_args_for_exec".
8264 (escape_bang_in_quoted_argument): Move to
8265 "common/common-fork-child.c".
8266 (saved_ui): New variable.
8267 (prefork_hook): New function.
8268 (postfork_hook): Likewise.
8269 (postfork_child_hook): Likewise.
8270 (gdb_startup_inferior): Likewise.
8271 (fork_inferior): Move to "common/common-fork-child.c". Update
8272 function to support gdbserver.
8273 (startup_inferior): Likewise.
8274 * gdbcore.h (get_exec_file): Remove declaration.
8275 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8276 instead of "startup_inferior". Call "add_thread_silent" after
8277 "fork_inferior".
8278 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8279 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8280 instead of "startup_inferior". Call "add_thread_silent" after
8281 "fork_inferior".
8282 * inferior.h: Include "common-inferior.h".
8283 (trace_start_error): Move to "common/common-utils.h".
8284 (trace_start_error_with_name): Likewise.
8285 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8286 (startup_inferior): Likewise.
8287 (gdb_startup_inferior): New prototype.
8288 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8289 * nat/fork-inferior.h: New file.
8290 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8291 instead of "startup_inferior". Call "add_thread_silent" after
8292 "fork_inferior".
8293 * target.h (target_terminal_init): Move prototype to
8294 "target/target.h".
8295 (target_terminal_inferior): Likewise.
8296 (target_terminal_ours): Likewise.
8297 * target/target.h (target_terminal_init): New prototype, moved
8298 from "target.h".
8299 (target_terminal_inferior): Likewise.
8300 (target_terminal_ours): Likewise.
8301 * utils.c (gdb_flush_out_err): New function.
8302
043a4934
SDJ
83032017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8304
8305 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8306 * common/common-gdbthread.h: New file, with parts from
8307 "gdb/gdbthread.h".
8308 * gdbthread.h: Include "common-gdbthread.h".
8309 (switch_to_thread): Moved to "common/common-gdbthread.h".
8310
15652511
SDJ
83112017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8312
8313 * Makefile.in (SFILES): Add "common/job-control.c".
8314 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8315 (COMMON_OBS): Add "job-control.o".
8316 * common/job-control.c: New file, with contents from
8317 "gdb/inflow.c".
8318 * common/job-control.h: New file, with contents from "terminal.h".
8319 * fork-child.c: Include "job-control.h".
8320 * inflow.c: Include "job-control.h".
8321 (gdb_setpgid): Move to "common/common-inflow.c".
8322 (_initialize_inflow): Move setting of "job_control" to
8323 "handle_job_control".
8324 * terminal.h (job_control): Moved to "common/common-terminal.h".
8325 (gdb_setpgid): Likewise.
8326 * top.c: Include "job_control.h".
8327 * utils.c: Likewise.
8328 (job_control): Moved to "job-control.c".
8329
2d7cc5c7
PA
83302017-06-07 Pedro Alves <palves@redhat.com>
8331
8332 * Makefile.in (SFILES): Add gdb_regex.c.
8333 (COMMON_OBS): Add gdb_regex.o.
8334 * ada-lang.c (ada_add_standard_exceptions)
8335 (ada_add_exceptions_from_frame, name_matches_regex)
8336 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8337 parameter type to compiled_regex. Adjust.
8338 (ada_exceptions_list): Use compiled_regex.
8339 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8340 std::unique_ptr<compiled_regex>.
8341 (exception_catchpoint::~exception_catchpoint): Remove regfree
8342 call.
8343 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8344 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8345 * breakpoint.c (solib_catchpoint::compiled): Now a
8346 std::unique_ptr<compiled_regex>.
8347 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8348 (check_status_catch_solib): Adjust to use compiled_regex.
8349 (add_solib_catchpoint): Adjust to use compiled_regex.
8350 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8351 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8352 compiled_regex reference. Adjust to use it.
8353 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8354 declaration. Include "gdb_regex.h".
8355 (apropos_cmd): Change regex parameter to compiled_regex reference.
8356 * gdb_regex.c: New file.
8357 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8358 declarations.
8359 (class compiled_regex): New.
8360 * linux-tdep.c: Include "common/gdb_optional.h".
8361 (struct mapping_regexes): New, factored out from
8362 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8363 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8364 gdb::optional and remove cleanups. Adjust to compiled_regex.
8365 * probe.c: Include "common/gdb_optional.h".
8366 (collect_probes): Use compiled_regex and gdb::optional and remove
8367 cleanups.
8368 * skip.c: Include "common/gdb_optional.h".
8369 (skiplist_entry::compiled_function_regexp): Now a
8370 gdb::optional<compiled_regex>.
8371 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8372 (free_skiplist_entry): Remove regfree call.
8373 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8374 compiled_regex and gdb::optional.
8375 * symtab.c: Include "common/gdb_optional.h".
8376 (search_symbols): Use compiled_regex and gdb::optional.
8377 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8378 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8379 to gdb_regex.c.
8380
50d6adef
AH
83812017-06-07 Alan Hayward <alan.hayward@arm.com>
8382
8383 * regcache.c (regcache::save): Avoid buffer use.
8384 (regcache::dump): Likewise.
8385
4a8a33c8
AH
83862017-06-07 Alan Hayward <alan.hayward@arm.com>
8387
8388 * sh-tdep.c (sh_pseudo_register_read): Remove
8389 MAX_REGISTER_SIZE.
8390 (sh_pseudo_register_write): Likewise.
8391 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8392 (sh64_pseudo_register_write): Likewise
8393
d1be909e
AH
83942017-06-07 Alan Hayward <alan.hayward@arm.com>
8395
8396 * aarch64-tdep.c (aarch64_store_return_value): Use
8397 V_REGISTER_SIZE.
8398 (aarch64_pseudo_read_value): Likewise.
8399 (aarch64_pseudo_write): Likewise.
8400
f4a65042
YQ
84012017-06-06 Yao Qi <yao.qi@linaro.org>
8402
8403 * regformats/regdef.h (set_register_cache): Remove the
8404 declaration.
8405
9f7fb0aa
AH
84062017-06-06 Alan Hayward <alan.hayward@arm.com>
8407
8408 * frame.c (frame_unwind_register_signed): Use
8409 frame_unwind_register_value.
8410
e1e01040
PA
84112017-06-06 Pedro Alves <palves@redhat.com>
8412
8413 PR breakpoints/21553
8414 * breakpoint.c (create_breakpoints_sal_default)
8415 (init_breakpoint_sal, create_breakpoint_sal): Use
8416 gdb::unique_xmalloc_ptr for string parameters.
8417 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8418 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8419 (base_breakpoint_create_breakpoints_sal)
8420 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8421 (strace_marker_create_breakpoints_sal)
8422 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8423 string parameters.
8424 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8425 gdb::unique_xmalloc_ptr for string parameters.
8426 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8427 parameters.
8428
fbe654c8
AH
84292017-06-06 Alan Hayward <alan.hayward@arm.com>
8430
8431 * alpha-tdep.c (alpha_register_to_value): Use
8432 get_frame_register_value.
8433 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8434
ae0d01d6
AH
84352017-06-06 Alan Hayward <alan.hayward@arm.com>
8436
8437 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8438 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8439 (ia64_value_to_register): Likewise.
8440 (ia64_extract_return_value): Likewise.
8441 (ia64_store_return_value): Likewise.
8442 (ia64_push_dummy_call): Likewise.
8443
49cf576c
JB
84442017-06-04 Joel Brobecker <brobecker@adacore.com>
8445
8446 GDB 8.0 released.
8447
26b6a6ab
SM
84482017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8449
8450 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8451
22827c51
SM
84522017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8453
8454 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8455 parameter.
8456 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8457
0e05cf3a
SM
84582017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8459
8460 * event-loop.c (poll_timers): Unallocate timer using delete
8461 instead of xfree.
8462
c1fc2657
SM
84632017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8464
8465 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8466 (struct breakpoint) <~breakpoint>: New.
8467 (struct watchpoint): Inherit from breakpoint.
8468 <~watchpoint>: New.
8469 <base>: Remove.
8470 (struct tracepoint): Inherit from breakpoint.
8471 <base>: Remove.
8472 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8473 (struct longjmp_breakpoint): Inherit from breakpoint.
8474 <~longjmp_breakpoint>: New.
8475 <base>: Remove.
8476 (new_breakpoint_from_type): Remove casts.
8477 (watchpoint_in_thread_scope): Remove reference to base field.
8478 (watchpoint_del_at_next_stop): Likewise.
8479 (update_watchpoint): Likewise.
8480 (watchpoint_check): Likewise.
8481 (bpstat_check_watchpoint): Likewise.
8482 (set_longjmp_breakpoint): Likewise.
8483 (struct fork_catchpoint): Inherit from breakpoint.
8484 <base>: Remove.
8485 (struct solib_catchpoint): Inherit from breakpoint.
8486 <~solib_catchpoint>: New.
8487 <base>: Remove.
8488 (dtor_catch_solib): Change to ...
8489 (solib_catchpoint::~solib_catchpoint): ... this.
8490 (breakpoint_hit_catch_solib): Remove reference to base field.
8491 (add_solib_catchpoint): Likewise.
8492 (create_fork_vfork_event_catchpoint): Likewise.
8493 (struct exec_catchpoint): Inherit from breakpoint.
8494 <~exec_catchpoint>: New.
8495 <base>: Remove.
8496 (dtor_catch_exec): Change to ...
8497 (exec_catchpoint::~exec_catchpoint): ... this.
8498 (dtor_watchpoint): Change to ...
8499 (watchpoint::~watchpoint): ... this.
8500 (watch_command_1): Remove reference to base field.
8501 (catch_exec_command_1): Likewise.
8502 (base_breakpoint_dtor): Change to ...
8503 (breakpoint::~breakpoint): ... this.
8504 (base_breakpoint_ops): Remove dtor field value.
8505 (longjmp_bkpt_dtor): Change to ...
8506 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8507 (strace_marker_create_breakpoints_sal): Remove reference to base
8508 field.
8509 (delete_breakpoint): Don't manually call breakpoint destructor.
8510 (create_tracepoint_from_upload): Remove reference to base field.
8511 (trace_pass_set_count): Likewise.
8512 (initialize_breakpoint_ops): Don't initialize
8513 momentary_breakpoint_ops, don't set dtors.
8514 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8515 <~ada_catchpoint>: New.
8516 <base>: Remove.
8517 (create_excep_cond_exprs): Remove reference to base field.
8518 (dtor_exception): Change to ...
8519 (ada_catchpoint::~ada_catchpoint): ... this.
8520 (dtor_catch_exception): Remove.
8521 (dtor_catch_exception_unhandled): Remove.
8522 (dtor_catch_assert): Remove.
8523 (create_ada_exception_catchpoint): Remove reference to base
8524 field.
8525 (initialize_ada_catchpoint_ops): Don't set dtors.
8526 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8527 breakpoint.
8528 <~signal_catchpoint>: New.
8529 <base>: Remove.
8530 (signal_catchpoint_dtor): Change to ...
8531 (signal_catchpoint::~signal_catchpoint): ... this.
8532 (create_signal_catchpoint): Remove reference to base field.
8533 (initialize_signal_catchpoint_ops): Don't set dtor.
8534 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8535 from breakpoint.
8536 <~syscall_catchpoint>: New.
8537 <base>: Remove.
8538 (dtor_catch_syscall): Change to ...
8539 (syscall_catchpoint::~syscall_catchpoint): ... this.
8540 (create_syscall_event_catchpoint): Remove reference to base
8541 field.
8542 (initialize_syscall_catchpoint_ops): Don't set dtor.
8543 * break-catch-throw.c (struct exception_catchpoint): Inherit
8544 from breakpoint.
8545 <~exception_catchpoint>: New.
8546 <base>: Remove.
8547 (dtor_exception_catchpoint): Change to ...
8548 (exception_catchpoint::~exception_catchpoint): ... this.
8549 (handle_gnu_v3_exceptions): Remove reference to base field.
8550 (initialize_throw_catchpoint_ops): Don't set dtor.
8551 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8552 field.
8553 * remote.c (remote_get_tracepoint_status): Likewise.
8554 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8555 * tracefile.c (tracefile_fetch_registers): Likewise.
8556 * tracepoint.c (actions_command): Likewise.
8557 (validate_actionline): Likewise.
8558 (tfind_1): Likewise.
8559 (get_traceframe_location): Likewise.
8560 (find_matching_tracepoint_location): Likewise.
8561 (parse_tracepoint_status): Likewise.
8562 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8563
3b0871f4
SM
85642017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8565
8566 * breakpoint.c (struct longjmp_breakpoint): New struct.
8567 (is_tracepoint_type): Change return type to bool.
8568 (is_longjmp_type): New function.
8569 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8570 (set_raw_breakpoint_without_location): Use
8571 new_breakpoint_from_type.
8572 (set_raw_breakpoint): Likewise.
8573
a5e364af
SM
85742017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8575
8576 * breakpoint.c (new_breakpoint_from_type): New function.
8577 (create_breakpoint_sal): Use new_breakpoint_from_type and
8578 unique_ptr.
8579 (create_breakpoint): Likewise.
8580
ae3b3f34
SM
85812017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8582
8583 * memattr.c (mem_info_command): Rename to ...
8584 (info_mem_command): ... this.
8585 (mem_enable_command): Rename to ...
8586 (enable_mem_command): ... this.
8587 (mem_disable_command): Rename to ...
8588 (disable_mem_command): ... this.
8589 (mem_delete_command): Rename to ...
8590 (delete_mem_command): ... this.
8591 (_initialize_mem): Adjust function names.
8592
13ace077
MM
85932017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8594
8595 * btrace.c (handle_pt_insn_events): New.
8596 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8597 STATUS. Split into this and ...
8598 (handle_pt_insn_event_flags): ... this.
8599
c56ccc05
MM
86002017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8601
8602 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8603 and struct pt_insn.resynced.
8604 * configure: Regenerated.
8605 * config.in: Regenerated.
8606
08c3f6d2
TW
86072017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8608
8609 * btrace.c (ftrace_find_call_by_number): New function.
8610 (ftrace_new_function): Store objects, not pointers.
8611 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8612 ftrace_new_gap, ftrace_update_function,
8613 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8614 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8615 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8616 btrace_ends_with_single_insn, btrace_call_get): Account for
8617 btrace_thread_info::functions now storing objects.
8618 * btrace.h (struct btrace_thread_info): Add constructor.
8619 (struct btrace_thread_info) <functions>: Make std::vector.
8620 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8621 Initialize with default values.
8622 * record-btrace.c (record_btrace_frame_sniffer): Account for
8623 btrace_thread_info::functions now storing objects.
8624
8ffd39f2
TW
86252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8626
8627 * btrace.c: Remove typedef bfun_s.
8628 (ftrace_new_gap): Directly add gaps to the list of gaps.
8629 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8630 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8631 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8632 instead of gdb VEC.
8633
4aeb0dfc
TW
86342017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8635
8636 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8637 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8638 with btrace_thread_info::next_segment and
8639 btrace_thread_info::prev_segment.
8640 * btrace.h: Remove struct btrace_func_link.
8641 (struct btrace_function): Replace pair of function segment pointers
8642 with pair of indices.
8643 * python/py-record-btrace.c (btpy_call_prev_sibling,
8644 btpy_call_next_sibling): Replace references to
8645 btrace_thread_info::segment with btrace_thread_info::next_segment and
8646 btrace_thread_info::prev_segment.
8647 * record-btrace.c (record_btrace_frame_this_id): Use
8648 btrace_find_call_by_number.
8649
eb8f2b9c
TW
86502017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8651
8652 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8653 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8654 btrace_insn_next, btrace_insn_prev): Remove references to
8655 btrace_thread_info::flow.
8656 * btrace.h (struct btrace_function): Remove FLOW.
8657
42bfe59e
TW
86582017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8659
8660 * btrace.c (ftrace_find_call_by_number): New function.
8661 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8662 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8663 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8664 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8665 index.
8666 * btrace.h (struct btrace_function): Turn UP into an index.
8667 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8668 as an index.
8669 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8670 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8671 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8672
b54b03bd
TW
86732017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8674
8675 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8676 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8677 ftrace_update_function, ftrace_compute_global_level_offset,
8678 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8679 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8680 btrace_insn_end, btrace_is_empty): Remove references to
8681 btrace_thread_info::begin and btrace_thread_info::end.
8682 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8683 (struct btrace_thread_info) <functions>: Adjust comment.
8684 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8685 btrace_thread_info::begin.
8686
8286623c
TW
86872017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8688
8689 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8690 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8691 ftrace_update_function): Remove arguments that implicitly were always
8692 BTINFO->END.
8693 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8694 Don't pass BTINFO->END.
8695
a0f1b963
TW
86962017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8697
8698 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8699 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8700 btrace_find_insn_by_number): Replace function segment pointer with
8701 index.
8702 (btrace_insn_cmp): Simplify.
8703 * btrace.h: (struct btrace_insn_iterator) Rename index to
8704 insn_index. Replace function segment pointer with index into function
8705 segment vector.
8706 * record-btrace.c (record_btrace_call_history): Replace function
8707 segment pointer use with index.
8708 (record_btrace_frame_sniffer): Retrieve function call segment through
8709 vector.
8710 (record_btrace_set_replay): Remove defunc't safety check.
8711
f158f208
TW
87122017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8713
8714 * btrace.c (btrace_ends_with_single_insn): New function.
8715 (btrace_call_get, btrace_call_number, btrace_call_begin,
8716 btrace_call_end, btrace_call_next, btrace_call_prev,
8717 btrace_find_call_by_number): Use index into call segment vector
8718 instead of pointer.
8719 (btrace_call_cmp): Simplify.
8720 * btrace.h (struct btrace_call_iterator): Replace function call segment
8721 pointer with index into vector.
8722 * record-btrace.c (record_btrace_call_history): Use index instead of
8723 pointer.
8724
521103fd
TW
87252017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8726
8727 * btrace.c (btrace_insn_begin, btrace_insn_end,
8728 btrace_find_insn_by_number): Add btinfo to iterator.
8729 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8730
17b89b34
TW
87312017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8732
8733 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8734 and save pointers directly.
8735 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8736 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8737 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8738 changed signature of functions.
8739 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8740 (btrace_fetch): Remove code that adds btrace_function pointers to
8741 vector of btrace_functions.
8742 (btrace_clear): Simplify freeing vector of btrace_functions.
8743
2b51eddc
TW
87442017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8745
8746 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8747 Replace VEC_* with std::vector functions.
8748 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8749 (struct btrace_thread_info)<functions>: Change type to std::vector.
8750
db6be0d5
SM
87512017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8752
8753 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8754 "Removed targets and native configurations" up. Merge duplicate
8755 "New commands" sub-sections. Add "New options" sub-sections.
8756
b057297a
AH
87572017-05-26 Alan Hayward <alan.hayward@arm.com>
8758
8759 * defs.h (copy_integer_to_size): New declaration.
8760 * findvar.c (copy_integer_to_size): New function.
8761 (do_cint_test): New selftest function.
8762 (copy_integer_to_size_test): Likewise.
8763 (_initialize_findvar): Likewise.
8764 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8765 (mips_fbsd_collect_reg): Use raw_collect_integer.
8766 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8767 (mips64_fill_gregset): Use raw_collect_integer
8768 (mips64_fill_fpregset): Use raw_supply_integer.
8769 * regcache.c (regcache::raw_supply_integer): New function.
8770 (regcache::raw_collect_integer): Likewise.
8771 * regcache.h: (regcache::raw_supply_integer): New declaration.
8772 (regcache::raw_collect_integer): Likewise.
8773
b77b02a5
YQ
87742017-05-24 Yao Qi <yao.qi@linaro.org>
8775
8776 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8777 (COMMON_OBS): Add gdbarch-selftests.o.
8778 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8779 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8780 * gdbarch-selftests.c: New file.
8781 * regcache.h (regcache) <~regcache>: Mark it virtual if
8782 GDB_SELF_TEST.
8783 <raw_write>: Likewise.
8784
e521e87e
YQ
87852017-05-24 Yao Qi <yao.qi@linaro.org>
8786
8787 * regcache.c (current_regcache): Change it to
8788 regcache::current_regcache.
8789 (regcache_observer_target_changed): Update.
8790 (regcache_thread_ptid_changed): Make it a regcache static
8791 method.
8792 (regcache_thread_ptid_changed): Update.
8793 (class regcache_access): New.
8794 (current_regcache_test): Update.
8795 (_initialize_regcache): Update.
8796 * regcache.h: Include forward_list.
8797 (regcache): Declare regcache_thread_ptid_changed and declare
8798 registers_changed_ptid as friend.
8799
d8e07dda
YQ
88002017-05-24 Yao Qi <yao.qi@linaro.org>
8801
8802 * i387-tdep.c (i387_register_to_value): Use register_size
8803 instead of TYPE_LENGTH.
8804 * m68k-tdep.c (m68k_register_to_value): Likewise.
8805
8c8f9122
YQ
88062017-05-24 Yao Qi <yao.qi@linaro.org>
8807
8808 * i387-tdep.c (i387_convert_register_p): Return false if type
8809 code isn't TYPE_CODE_FLT.
8810
68fce50f
YQ
88112017-05-24 Yao Qi <yao.qi@linaro.org>
8812
8813 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8814 length is 4.
8815 (alpha_register_to_value): Remove type length check.
8816 (alpha_value_to_register): Likewise.
8817
88954b49
YQ
88182017-05-24 Yao Qi <yao.qi@linaro.org>
8819
8820 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8821 TYPE_CODE_FLT.
8822
e3ec9b69
YQ
88232017-05-24 Yao Qi <yao.qi@linaro.org>
8824
8825 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8826 TYPE_CODE_FLT or not.
8827
cdd238da
YQ
88282017-05-24 Yao Qi <yao.qi@linaro.org>
8829
8830 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8831 * avr-tdep.c (avr_gdbarch_init): Likewise.
8832 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8833 * cris-tdep.c (cris_gdbarch_init): Likewise.
8834 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8835 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8836 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8837 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8838 * mep-tdep.c (mep_gdbarch_init): Likewise.
8839 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8840 * mips-tdep.c (mips_gdbarch_init): Likewise.
8841 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8842 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8843 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8844 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8845 * v850-tdep.c (v850_gdbarch_init): Likewise.
8846
7a3929c4
YQ
88472017-05-24 Yao Qi <yao.qi@linaro.org>
8848
8849 * selftest-arch.c (tests_with_arch): Call registers_changed
8850 and reinit_frame_cache.
8851 * selftest.c (run_self_tests): Likewise.
8852
f4985dba
YQ
88532017-05-24 Yao Qi <yao.qi@linaro.org>
8854
8855 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8856 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8857
ab20fa4a
YQ
88582017-05-24 Yao Qi <yao.qi@linaro.org>
8859
8860 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8861 set_gdbarch_print_insn.
8862
f532ab94
YQ
88632017-05-24 Yao Qi <yao.qi@linaro.org>
8864
8865 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8866 set_gdbarch_print_insn.
8867
39503f82
YQ
88682017-05-24 Yao Qi <yao.qi@linaro.org>
8869
8870 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8871 set_gdbarch_print_insn.
8872 * arc-tdep.c (arc_gdbarch_init): Likewise.
8873 * arch-utils.c: include dis-asm.h.
8874 (default_print_insn): New function.
8875 * arch-utils.h (default_print_insn): Declare.
8876 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8877 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8878 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8879 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8880 * frv-tdep.c (frv_gdbarch_init): Likewise.
8881 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8882 * gdbarch.sh (print_insn): Use default_print_insn.
8883 * gdbarch.c: Regenerated.
8884 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8885 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8886 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8887 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8888 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8889 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8890 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8891 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8892 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8893 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8894 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8895 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8896 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8897 * mt-tdep.c (mt_gdbarch_init): Likewise.
8898 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8899 * nios2-tdep.c (nios2_print_insn): Remove.
8900 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8901 * rx-tdep.c (rx_gdbarch_init): Likewise.
8902 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8903 * score-tdep.c (score_print_insn): Remove.
8904 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8905 * sh-tdep.c (sh_gdbarch_init): Likewise.
8906 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8907 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8908 * tic6x-tdep.c (tic6x_print_insn): Remove.
8909 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8910 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8911 * v850-tdep.c (v850_gdbarch_init): Likewise.
8912 * vax-tdep.c (vax_gdbarch_init): Likewise.
8913 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8914 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8915
f7241d4f
JB
89162017-05-23 John Baldwin <jhb@FreeBSD.org>
8917
8918 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8919 (MIPS_FP0_REGNUM): Remove.
8920 (MIPS_FSR_REGNUM): Remove.
8921 (mips_fbsd_supply_fpregs): Use mips_regnum.
8922 (mips_fbsd_supply_gregs): Likewise.
8923 (mips_fbsd_collect_fpregs): Likewise.
8924 (mips_fbsd_collect_gregs): Likewise.
8925
d489d81d
JB
89262017-05-23 John Baldwin <jhb@FreeBSD.org>
8927
8928 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8929 (getpfpregs_supplies): New function.
8930 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8931 getfpregs_supplies.
8932 (mips_fbsd_store_inferior_registers): Likewise.
8933
e11b3cdc
PA
89342017-05-22 Pedro Alves <palves@redhat.com>
8935
8936 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8937 maintainer.
8938
0f068fb5
AH
89392017-05-22 Alan Hayward <alan.hayward@arm.com>
8940
8941 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8942 (store_register): Likewise.
8943 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8944 (get_decimal_float_return_value): Likewise.
8945 (do_ppc_sysv_return_value): Likewise.
8946 (ppc64_sysv_abi_push_integer): Likewise.
8947 (ppc64_sysv_abi_push_freg): Likewise.
8948 (ppc64_sysv_abi_return_value_base): Likewise.
8949 (ppc64_sysv_abi_return_value): Likewise.
8950 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8951 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8952 * rs6000-nat.c: Likewise.
8953 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8954 (rs6000_value_to_register): Likewise.
8955 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8956
e6cf65f2
TT
89572017-05-21 Tom Tromey <tom@tromey.com>
8958
8959 PR rust/21466:
8960 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8961 arrays as "[T]", not "[T; ]".
8962
43cc5389
TT
89632017-05-19 Tom Tromey <tom@tromey.com>
8964
8965 PR rust/21484:
8966 * rust-lang.c (exp_descriptor_rust): New function.
8967 (rust_language_defn): Use it.
8968 * p-lang.c (pascal_language_defn): Update.
8969 * opencl-lang.c (opencl_language_defn): Update.
8970 * objc-lang.c (objc_language_defn): Update.
8971 * m2-lang.c (m2_language_defn): Update.
8972 * language.h (struct language_defn)
8973 <la_watch_location_expression>: New member.
8974 * language.c (unknown_language_defn, auto_language_defn)
8975 (local_language_defn): Update.
8976 * go-lang.c (go_language_defn): Update.
8977 * f-lang.c (f_language_defn): Update.
8978 * d-lang.c (d_language_defn): Update.
8979 * c-lang.h (c_watch_location_expression): Declare.
8980 * c-lang.c (c_watch_location_expression): New function.
8981 (c_language_defn, cplus_language_defn, asm_language_defn)
8982 (minimal_language_defn): Use it.
8983 * breakpoint.c (watch_command_1): Call
8984 la_watch_location_expression.
8985 * ada-lang.c (ada_language_defn): Update.
8986
7a6e7fcc
RO
89872017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8988
6e7e1744
RO
8989 PR tui/21482
8990 * gdb_curses.h (NOMACROS): Define.
8991 (NCURSES_NOMACROS): Define.
8992
89932017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8994
8995 PR tui/21482
7a6e7fcc
RO
8996 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
8997 arg to char *.
8998 * tui/tui-wingeneral.c (box_win): Likewise.
8999 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9000 (tui_show_source_line): Likewise.
9001 (tui_show_exec_info_content): Likewise.
9002
1933fd8e
VM
90032017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9004
9005 * sparc-tdep.c (sparc_structure_return_p)
9006 (sparc_arg_on_registers_p): New functions.
9007 (sparc32_store_arguments): Use them.
9008 * sparc64-tdep.c (sparc64_16_byte_align_p)
9009 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9010 Handle TYPE_CODE_ARRAY.
9011
21873064
YQ
90122017-05-17 Yao Qi <yao.qi@linaro.org>
9013
9014 * cli/cli-decode.c (add_alias_cmd): New function.
9015 * command.h (add_alias_cmd): Declare.
9016 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9017 instead call add_alias_cmd.
9018
2b351b19
PA
90192017-05-17 Pedro Alves <palves@redhat.com>
9020
9021 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9022 (nat_makefile_frag): ... this. All references updated.
9023 * configure.ac: Likewise.
9024 * configure.nat: Likewise. Enhance comments.
9025 * configure: Regenerate.
9026
5f2ad7a3
RO
90272017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9028
9029 * procfs.c (procfs_create_inferior): Change prototype to match
9030 definition.
9031
adf3dde5
EZ
90322017-05-13 Eli Zaretskii <eliz@gnu.org>
9033
9034 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9035 C++ compiler warning.
9036
6830f270
TT
90372017-05-12 Tom Tromey <tom@tromey.com>
9038
9039 PR rust/21483:
9040 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9041 recurse, just call value_struct_elt directly.
9042
68f2f2e3
TT
90432017-05-12 Tom Tromey <tom@tromey.com>
9044
9045 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9046 OP_RUST_ARRAY>: Fix.
9047
256afbc2
TT
90482017-05-12 Tom Tromey <tom@tromey.com>
9049
9050 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9051
94bb8dfe
YQ
90522017-05-09 Yao Qi <yao.qi@linaro.org>
9053
9054 * regcache.c: Include <forward_list>.
9055 (struct regcache_list): Remove.
9056 (current_regcache): Update.
9057 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9058 (regcache_thread_ptid_changed): Likewise.
9059 (registers_changed_ptid): Likewise.
9060 (current_regcache_size): Likewise.
9061
8248946c
YQ
90622017-05-09 Yao Qi <yao.qi@linaro.org>
9063
9064 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9065 (current_regcache_size): New function.
9066 (current_regcache_test): New function.
9067 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9068
313c5961
AH
90692017-05-08 Alan Hayward <alan.hayward@arm.com>
9070
9071 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9072 (print_gp_register_row): Use get_frame_register_value.
9073
27bfc1d1
AH
90742017-05-08 Alan Hayward <alan.hayward@arm.com>
9075
9076 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9077 (mips_supply_fpregset): Likewise.
9078 (mips64_supply_gregset): Likewise.
9079
146e6c5c
AH
90802017-05-08 Alan Hayward <alan.hayward@arm.com>
9081
9082 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9083 regcache->raw_supply_zeroed.
9084
e50f25ec
SDJ
90852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9086
9087 * configure.nat: Rearrange 'case' statements to match
9088 host before cpu.
9089
21ea5acd
SDJ
90902017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9091
9092 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9093 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9094 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9095 "@nat_extra_makefile_frag@".
9096 (Makefile): Remove dependency on "@frags@".
9097 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9098 (data-directory/Makefile): Likewise.
9099 * config/aarch64/linux.mh: Deleted; moved contents to
9100 "gdb/configure.nat".
9101 * config/alpha/alpha-linux.mh: Likewise.
9102 * config/alpha/nbsd.mh: Likewise.
9103 * config/arm/linux.mh: Likewise.
9104 * config/arm/nbsdelf.mh: Likewise.
9105 * config/i386/cygwin.mh: Likewise.
9106 * config/i386/cygwin64.mh: Likewise.
9107 * config/i386/darwin.mh: Likewise.
9108 * config/i386/fbsd.mh: Likewise.
9109 * config/i386/fbsd64.mh: Likewise.
9110 * config/i386/go32.mh: Likewise.
9111 * config/i386/i386gnu.mh: Likewise.
9112 * config/i386/i386sol2.mh: Likewise.
9113 * config/i386/linux.mh: Likewise.
9114 * config/i386/linux64.mh: Likewise.
9115 * config/i386/mingw.mh: Likewise.
9116 * config/i386/mingw64.mh: Likewise.
9117 * config/i386/nbsd64.mh: Likewise.
9118 * config/i386/nbsdelf.mh: Likewise.
9119 * config/i386/nto.mh: Likewise.
9120 * config/i386/obsd.mh: Likewise.
9121 * config/i386/obsd64.mh: Likewise.
9122 * config/i386/sol2-64.mh: Likewise.
9123 * config/ia64/linux.mh: Likewise.
9124 * config/m32r/linux.mh: Likewise.
9125 * config/m68k/linux.mh: Likewise.
9126 * config/m68k/nbsdelf.mh: Likewise.
9127 * config/m68k/obsd.mh: Likewise.
9128 * config/m88k/obsd.mh: Likewise.
9129 * config/mips/fbsd.mh: Likewise.
9130 * config/mips/linux.mh: Likewise.
9131 * config/mips/nbsd.mh: Likewise.
9132 * config/mips/obsd64.mh: Likewise.
9133 * config/pa/linux.mh: Likewise.
9134 * config/pa/nbsd.mh: Likewise.
9135 * config/pa/obsd.mh: Likewise.
9136 * config/powerpc/aix.mh: Likewise.
9137 * config/powerpc/fbsd.mh: Likewise.
9138 * config/powerpc/linux.mh: Likewise.
9139 * config/powerpc/nbsd.mh: Likewise.
9140 * config/powerpc/obsd.mh: Likewise.
9141 * config/powerpc/ppc64-linux.mh: Likewise.
9142 * config/powerpc/spu-linux.mh: Likewise.
9143 * config/s390/linux.mh: Likewise.
9144 * config/sh/nbsd.mh: Likewise.
9145 * config/sparc/fbsd.mh: Likewise.
9146 * config/sparc/linux.mh: Likewise.
9147 * config/sparc/linux64.mh: Likewise.
9148 * config/sparc/nbsd64.mh: Likewise.
9149 * config/sparc/nbsdelf.mh: Likewise.
9150 * config/sparc/obsd64.mh: Likewise.
9151 * config/sparc/sol2.mh: Likewise.
9152 * config/tilegx/linux.mh: Likewise.
9153 * config/vax/nbsdelf.mh: Likewise.
9154 * config/vax/obsd.mh: Likewise.
9155 * config/xtensa/linux.mh: Likewise.
9156 * config/i386/i386gnu.mn: New file, with excerpts from
9157 "config/i386/i386gnu.mh".
9158 * configure: Regenerate.
9159 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9160 *.mh files under "gdb/config".
9161 * configure.nat: New file, with contents from the
9162 "gdb/config/*/*.mh" files.
9163
7ed1acaf
TW
91642017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9165
9166 * btrace.c (btrace_clear): Free insn vector.
9167
e13cb306
PA
91682017-05-05 Pedro Alves <palves@redhat.com>
9169
9170 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9171 * configure: Regenerate.
9172
5ed8105e
PA
91732017-05-04 Pedro Alves <palves@redhat.com>
9174
9175 * Makefile.in (SFILES): Add progspace-and-thread.c.
9176 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9177 (COMMON_OBS): Add progspace-and-thread.o.
9178 * breakpoint.c: Include "progspace-and-thread.h".
9179 (update_inserted_breakpoint_locations)
9180 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9181 Use scoped_restore_current_pspace_and_thread.
9182 (create_std_terminate_master_breakpoint): Use
9183 scoped_restore_current_program_space.
9184 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9185 (print_breakpoint_location): Use
9186 scoped_restore_current_program_space.
9187 (bp_loc_is_permanent): Use
9188 scoped_restore_current_pspace_and_thread.
9189 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9190 (download_tracepoint_locations): Use
9191 scoped_restore_current_pspace_and_thread.
9192 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9193 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9194 (enum step_over_calls_kind): Moved from inferior.h.
9195 (class scoped_restore_current_thread): New class.
9196 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9197 declaration.
9198 (scoped_restore_current_thread): New class.
9199 * infcmd.c: Include "common/gdb_optional.h".
9200 (continue_1, proceed_after_attach): Use
9201 scoped_restore_current_thread.
9202 (notice_new_inferior): Use scoped_restore_current_thread.
9203 * inferior.c: Include "progspace-and-thread.h".
9204 (restore_inferior, save_current_inferior): Delete.
9205 (add_inferior_command, clone_inferior_command): Use
9206 scoped_restore_current_pspace_and_thread.
9207 * inferior.h (scoped_restore_current_inferior): New class.
9208 * infrun.c: Include "progspace-and-thread.h" and
9209 "common/gdb_optional.h".
9210 (follow_fork_inferior): Use
9211 scoped_restore_current_pspace_and_thread.
9212 (scoped_restore_exited_inferior): New class.
9213 (handle_vfork_child_exec_or_exit): Use
9214 scoped_restore_exited_inferior,
9215 scoped_restore_current_pspace_and_thread,
9216 scoped_restore_current_thread and scoped_restore.
9217 (fetch_inferior_event): Use scoped_restore_current_thread.
9218 * linespec.c (decode_line_full, decode_line_1): Use
9219 scoped_restore_current_program_space.
9220 * mi/mi-main.c: Include "progspace-and-thread.h".
9221 (exec_continue): Use scoped_restore_current_thread.
9222 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9223 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9224 * proc-service.c (ps_pglobal_lookup): Use
9225 scoped_restore_current_program_space.
9226 * progspace-and-thread.c: New file.
9227 * progspace-and-thread.h: New file.
9228 * progspace.c (release_program_space, clone_program_space): Use
9229 scoped_restore_current_program_space.
9230 (restore_program_space, save_current_program_space)
9231 (save_current_space_and_thread): Delete.
9232 (switch_to_program_space_and_thread): Moved to
9233 progspace-and-thread.c.
9234 * progspace.h (save_current_program_space)
9235 (save_current_space_and_thread): Delete declarations.
9236 (scoped_restore_current_program_space): New class.
9237 * remote.c (remote_btrace_maybe_reopen): Use
9238 scoped_restore_current_thread.
9239 * symtab.c: Include "progspace-and-thread.h".
9240 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9241 * thread.c (print_thread_info_1): Use
9242 scoped_restore_current_thread.
9243 (struct current_thread_cleanup): Delete.
9244 (do_restore_current_thread_cleanup)
9245 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9246 (scoped_restore_current_thread::~scoped_restore_current_thread):
9247 ... this new dtor.
9248 (make_cleanup_restore_current_thread): Rename/convert to ...
9249 (scoped_restore_current_thread::scoped_restore_current_thread):
9250 ... this new ctor.
9251 (thread_apply_all_command): Use scoped_restore_current_thread.
9252 (thread_apply_command): Use scoped_restore_current_thread.
9253 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9254 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9255
f6223dbb
PA
92562017-05-04 Pedro Alves <palves@redhat.com>
9257
9258 * thread.c (make_cleanup_restore_current_thread): Move
9259 find_thread_ptid call before the is_stopped call. Assert that the
9260 thread is found. Replace is_stopped call by checking the thread's
9261 state directly. Remove unnecessary NULL-thread check.
9262
3c3ae77e
PA
92632017-05-04 Pedro Alves <palves@redhat.com>
9264
9265 * corelow.c (thread_section_name): New class.
9266 (get_core_register_section, get_core_siginfo): Use it.
9267
45eba0ab
AA
92682017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9269
9270 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9271 (get_core_register_section): Remove xfree of NULL pointer.
9272
f81fdd35
AH
92732017-05-03 Alan Hayward <alan.hayward@arm.com>
9274
9275 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9276 * regcache.c (regcache::raw_supply_zeroed): New function.
9277 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9278
35837774
SM
92792017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9280
9281 * gdbarch.sh: Remove commented out definition of
9282 TARGET_CHAR_BIT.
9283 * gdbarch.h: Re-generate.
9284
c94fee56
SDJ
92852017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9286
9287 * configure: Regenerate.
9288
d17f7b36
SM
92892017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9290
9291 * solib-target.c (solib_target_relocate_section_addresses):
9292 Remove num_section_bases, num_bases, segment_bases variables.
9293
b560ebd6
SM
92942017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9295
9296 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9297
f2f46dfc
SM
92982017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9299
9300 * solib-target.c: Include <vector>
9301 (struct lm_info_target) <~lm_info_target>: Remove.
9302 <segment_bases, section_bases>: Change type to
9303 std::vector<CORE_ADDR>.
9304 (library_list_start_segment, library_list_start_section,
9305 library_list_end_library,
9306 solib_target_relocate_section_addresses): Adjust.
9307
a0ff9e1a
SM
93082017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9309
9310 * gdbarch.sh (software_single_step): Change return type to
9311 std::vector<CORE_ADDR>.
9312 * gdbarch.c, gdbarch.h: Re-generate.
9313 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9314 Adjust.
9315 (arm_deal_with_atomic_sequence_raw): Adjust.
9316 (thumb_get_next_pcs_raw): Adjust.
9317 (arm_get_next_pcs_raw): Adjust.
9318 (arm_get_next_pcs): Adjust.
9319 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9320 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9321 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9322 (alpha_software_single_step): Adjust.
9323 * alpha-tdep.h (alpha_software_single_step): Adjust.
9324 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9325 * arm-tdep.c (arm_software_single_step): Adjust.
9326 (arm_breakpoint_kind_from_current_state): Adjust.
9327 * arm-tdep.h (arm_software_single_step): Adjust.
9328 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9329 * cris-tdep.c (cris_software_single_step): Adjust.
9330 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9331 (micromips_deal_with_atomic_sequence): Adjust.
9332 (deal_with_atomic_sequence): Adjust.
9333 (mips_software_single_step): Adjust.
9334 * mips-tdep.h (mips_software_single_step): Adjust.
9335 * moxie-tdep.c (moxie_software_single_step): Adjust.
9336 * nios2-tdep.c (nios2_software_single_step): Adjust.
9337 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9338 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9339 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9340 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9341 * sparc-tdep.c (sparc_software_single_step): Adjust.
9342 * spu-tdep.c (spu_software_single_step): Adjust.
9343 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9344
ea480a30
SM
93452017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9346
9347 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9348 * gdbarch.h: Re-generate.
9349
d050f7d7
TW
93502017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9351
9352 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9353 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9354 * python/py-instruction.c, python/py-instruction.h: New file.
9355 * python/py-record.c: Add py-instruction.h include.
9356 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9357 gdb.RecordInstruction.
9358 * python/python-internal.h: Add gdbpy_initialize_instruction
9359 declaration.
9360 * python/python.c (do_start_initialization): Add
9361 gdbpy_initialize_instruction.
9362
14f819c8
TW
93632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9364
9365 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9366 Remove.
9367 (btrace_func_from_recpy_func): New function.
9368 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9369 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9370 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9371 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9372 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9373 Also, use new helper functions.
9374 (btpy_list_item): Use new helper functions.
9375 (recpy_bt_function_call_history): Use new type name.
9376 (btpy_call_getset): Remove.
9377 (gdbpy_initialize_btrace): Remove code to initialize
9378 gdb.BtraceFunctionCall.
9379 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9380 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9381 recpy_bt_func_prev, recpy_bt_func_next): New export.
9382 * python/py-record.c (recpy_func_type): New static object.
9383 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9384 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9385 recpy_func_next): New function.
9386 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9387 (recpy_func_getset): New static object.
9388 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9389 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9390
0ed5da75
TW
93912017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9392
9393 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9394 (btpy_object, btpy_insn_type, btpy_new): Remove.
9395 (btpy_list_object): Use gdb.RecordInstruction type instead of
9396 gdb.BtraceInstruction type.
9397 (btrace_insn_from_recpy_insn): New function.
9398 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9399 btpy_new.
9400 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9401 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9402 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9403 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9404 instead of btpy_object.
9405 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9406 btpy_insn_data, btpy_insn_decode): Rename to ...
9407 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9408 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9409 recpy_bt_insn_decode): This. Also, use new helper functions.
9410 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9411 recpy_insn_type.
9412 (btpy_insn_getset): Remove.
9413 (gdbpy_initialize_btrace): Remove code to initialize
9414 gdb.BtraceInstruction. Use recpy_element_object.
9415 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9416 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9417 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9418 * python/py-record.c (recpy_insn_type): New static object.
9419 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9420 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9421 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9422 New function.
9423 (recpy_insn_getset): New static object.
9424 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9425 * python/py-record.h (recpy_element_object): New typedef.
9426 (recpy_insn_type, recpy_insn_new): New export.
9427
913aeadd
TW
94282017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9429
9430 * py-record-btrace.c (btpy_insn_new): Removed.
9431 (btpy_insn_or_gap_new): New function.
9432 (btpy_insn_error): Removed.
9433 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9434 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9435 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9436 btpy_insn_or_gap_new instead of btpy_insn_new.
9437 (btpy_insn_getset): Remove btpy_insn_error.
9438 * py-record.c (recpy_gap_type): New static object.
9439 (recpy_gap_object): New typedef.
9440 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9441 recpy_gap_reason_string): New function.
9442 (recpy_gap_getset): New static object.
9443 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9444 * py-record.h (recpy_gap_new): New export.
9445
a3be24ad
TW
94462017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9447
9448 * python/py-record.c (recpy_ptid): Remove.
9449 (recpy_record_getset): Remove recpy_ptid.
9450
ae20e79a
TW
94512017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9452
9453 * btrace.c (btrace_fetch): Set inferior_ptid.
9454 * python/py-record-btrace.c: Add "py-record.h" include.
9455 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9456 recpy_bt_end, recpy_bt_instruction_history,
9457 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9458 in gdb.Record object instead of current ptid.
9459 * python/py-record.c: Include new "py-record.h" file.
9460 (recpy_record_object): Moved to py-record.h.
9461 * python/py-record.h: New file.
9462
8d0050ea
TW
94632017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9464
9465 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9466 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9467 indentation.
9468
3f380b50
JB
94692017-05-01 Joel Brobecker <brobecker@adacore.com>
9470
9471 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9472 the past maintainers section.
9473
07495424
YQ
94742017-04-28 Yao Qi <yao.qi@linaro.org>
9475
9476 * infcmd.c (get_return_value): Use regcache ctor, and remove
9477 cleanup.
9478
deb1fa3e
YQ
94792017-04-28 Yao Qi <yao.qi@linaro.org>
9480 Pedro Alves <palves@redhat.com>
9481
9482 * regcache.c (regcache::regcache): New tag dispatch ctor.
9483 (do_cooked_read): Moved above.
9484 (regcache_dup): Use the tag dispatch ctor..
9485 * regcache.h (regcache): Declare ctor, delete copy ctor and
9486 assignment operator, remove friend regcache_dup.
9487
b421c83c
YQ
94882017-04-28 Yao Qi <yao.qi@linaro.org>
9489
9490 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9491 call method save instead of regcache_cpy.
9492 * regcache.h (struct regcache): Make regcache_dup a friend.
9493
ef79d9a3
YQ
94942017-04-28 Yao Qi <yao.qi@linaro.org>
9495
9496 * regcache.c (struct regcache): Move to regcache.h
9497 (regcache::arch): New method.
9498 (regcache_get_ptid): Update.
9499 (get_regcache_arch): Call arch method.
9500 (get_regcache_aspace): Call method aspace.
9501 (register_buffer): Change it to method.
9502 (regcache_save): Change it to regcache::save.
9503 (regcache_restore): Likewise.
9504 (regcache_cpy_no_passthrough): Remove the declaration.
9505 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9506 (regcache_cpy_no_passthrough): Change it to method
9507 cpy_no_passthrough.
9508 (regcache_register_status): Change it to method
9509 get_register_status.
9510 (regcache_invalidate): Change it to method invalidate.
9511 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9512 (regcache_raw_update): Change it to method raw_update.
9513 (regcache_raw_read): Likewise.
9514 (regcache_raw_read_signed): Likewise.
9515 (regcache_raw_read_unsigned): Likewise.
9516 (regcache_raw_write_signed): Likewise.
9517 (regcache_raw_write_unsigned): Likewise.
9518 (regcache_cooked_read): Likewise.
9519 (regcache_cooked_read_value): Likewise.
9520 (regcache_cooked_read_signed): Likewise.
9521 (regcache_cooked_read_unsigned): Likewise.
9522 (regcache_cooked_write_signed): Likewise.
9523 (regcache_cooked_write_unsigned): Likewise.
9524 (regcache_raw_set_cached_value): Likewise.
9525 (regcache_raw_write): Likewise.
9526 (regcache_cooked_write): Likewise.
9527 (regcache_xfer_part): Likewise.
9528 (regcache_raw_read_part): Likewise.
9529 (regcache_raw_write_part): Likewise.
9530 (regcache_cooked_read_part): Likewise.
9531 (regcache_cooked_write_part): Likewise.
9532 (regcache_raw_supply): Likewise.
9533 (regcache_raw_collect): Likewise.
9534 (regcache_transfer_regset): Likewise.
9535 (regcache_supply_regset): Likewise.
9536 (regcache_collect_regset): Likewise.
9537 (regcache_debug_print_register): Likewise.
9538 (enum regcache_dump_what): Move it to regcache.h.
9539 (regcache_dump): Change it to method dump.
9540 * regcache.h (enum regcache_dump_what): New.
9541 (class regcache): New.
9542 * target.c (target_fetch_registers): Call method
9543 debug_print_register.
9544 (target_store_registers): Likewise.
9545
f8fdb78e
SM
95462017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9547
9548 * windows-nat.c (struct lm_info_windows): Initialize field.
9549 (windows_make_so): Allocate lm_info_windows with new.
9550 (windows_free_so): Free lm_info_windows with delete.
9551
9ccbfd7b
SM
95522017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9553
9554 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9555 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9556 cleanup.
9557 (darwin_free_so): Free lm_info_darwin with delete.
9558
76e75227
SM
95592017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9560
9561 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9562 <l_addr_p>: Change type to bool.
9563 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9564 (svr4_free_so): Free lm_info_svr4 with delete.
9565 (svr4_copy_library_list): Replace memcpy with call to copy
9566 constructor.
9567 (library_list_start_library, svr4_default_sos): Allocate
9568 lm_info_svr4 with new.
9569
51046d9e
SM
95702017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9571
9572 * solib-target.c (struct lm_info_target): Add destructor,
9573 initialize fields.
9574 <name>: Change type to std::string.
9575 (library_list_start_library): Allocate lm_info_target with new.
9576 (solib_target_free_library_list): Free lm_info_target with
9577 delete.
9578 (solib_target_current_sos): Adapt to std::string.
9579 (solib_target_free_so): Free lm_info_target with delete.
9580
4023ae76
SM
95812017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9582
9583 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9584 fields.
9585 (frv_current_sos): Allocate lm_info_frv with new.
9586 (frv_relocate_main_executable): Free lm_info_frv with delete,
9587 allocate with new.
9588 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9589
af43057b
SM
95902017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9591
9592 * solib-frv.c (struct lm_info_frv): Fix indentation.
9593
b0911207
SM
95942017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9595
9596 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9597 map field.
9598 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9599 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9600 and allocate with new.
9601 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9602
6c401f72
SM
96032017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9604
9605 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9606 <filename, member_name>: Change type to std::string.
9607 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9608 (library_list_start_library): Allocate lm_info_aix with new.
9609 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9610 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9611 with copy constructor.
9612
d0e449a1
SM
96132017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9614
9615 * solist.h (struct lm_info): Remove.
9616 (struct lm_info_base): New class.
9617 (struct so_list) <lm_info>: Change type to lm_info_base *.
9618 * nto-tdep.c (struct lm_info): Remove.
9619 (lm_addr): Adjust.
9620 * solib-aix.c (struct lm_info): Rename to ...
9621 (struct lm_info_aix): ... this. Extend lm_info_base.
9622 (lm_info_p): Rename to ...
9623 (lm_info_aix_p): ... this, and adjust.
9624 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9625 solib_aix_parse_libraries, library_list_start_library,
9626 solib_aix_free_library_list, solib_aix_parse_libraries,
9627 solib_aix_get_library_list,
9628 solib_aix_relocate_section_addresses, solib_aix_free_so,
9629 solib_aix_get_section_offsets,
9630 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9631 Adjust.
9632 (struct solib_aix_inferior_data) <library_list>: Adjust.
9633 * solib-darwin.c (struct lm_info): Rename to ...
9634 (struct lm_info_darwin): ... this. Extend lm_info_base.
9635 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9636 * solib-dsbt.c (struct lm_info): Rename to ...
9637 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9638 (struct dsbt_info) <main_executable_lm_info): Adjust.
9639 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9640 dsbt_relocate_section_addresses): Adjust.
9641 * solib-frv.c (struct lm_info): Rename to ...
9642 (struct lm_info_frv): ... this. Extend lm_info_base.
9643 (main_executable_lm_info): Adjust.
9644 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9645 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9646 find_canonical_descriptor_in_load_object,
9647 frv_fdpic_find_canonical_descriptor): Adjust.
9648 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9649 to lm_info_svr4.
9650 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9651 svr4_clear_so, svr4_copy_library_list,
9652 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9653 svr4_current_sos, svr4_fetch_objfile_link_map,
9654 solist_update_incremental): Adjust.
9655 * solib-svr4.h (struct lm_info_svr4): Move here from
9656 solib-svr4.c.
9657 * solib-target.c (struct lm_info): Rename to ...
9658 (struct lm_info_target): ... this. Extend lm_info_base.
9659 (lm_info_p): Rename to ...
9660 (lm_info_target_p): ... this.
9661 (solib_target_parse_libraries, library_list_start_segment,
9662 library_list_start_section, library_list_start_library,
9663 library_list_end_library, solib_target_free_library_list,
9664 solib_target_current_sos, solib_target_free_so,
9665 solib_target_relocate_section_addresses): Adjust.
9666 * windows-nat.c (struct lm_info): Rename to ...
9667 (struct lm_info_windows): ... this. Extend lm_info_base.
9668 (windows_make_so, handle_load_dll, handle_unload_dll,
9669 windows_xfer_shared_libraries): Adjust.
9670
434a4023
SM
96712017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9672
9673 * solib-darwin.c (struct darwin_so_list): Remove.
9674 (darwin_current_sos): Allocate an so_list object instead of a
9675 darwin_so_list, separately allocate an lm_info object.
9676 (darwin_free_so): Free lm_info.
9677
428544e8
JB
96782017-04-28 John Baldwin <jhb@FreeBSD.org>
9679
9680 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9681 with fprintf_filtered.
9682
4621115f
YQ
96832017-04-28 Yao Qi <yao.qi@linaro.org>
9684
9685 * regcache.c (regcache::regcache): New function.
9686 (regcache::~regcache): New function.
9687 (regcache_xmalloc_1): Remove.
9688 (regcache_xmalloc): Call new regcache.
9689 (regcache_xfree): Call delete regcache.
9690 (get_thread_arch_aspace_regcache): Call new regcache.
9691
339053c2
YQ
96922017-04-28 Yao Qi <yao.qi@linaro.org>
9693
9694 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9695 lwp instead of ptid_get_lwp.
9696
7974a605
YQ
96972017-04-28 Yao Qi <yao.qi@linaro.org>
9698
9699 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9700 lwp_info instead of getting from inferior_ptid.
9701
e15c3eb4
KS
97022017-04-27 Keith Seitz <keiths@redhat.com>
9703
9704 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9705 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9706 (CV_CONVERSION_BADNESS): Define.
9707 (rank_one_type): Remove overly restrictive rvalue reference
9708 rank checks.
9709 Add cv-qualifier checks and subranks for type equality.
9710 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9711 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9712 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9713
72bc1d24
SM
97142017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9715
9716 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9717 count when creating the object.
9718
55bcecda
UW
97192017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9720 Ulrich Weigand <uweigand@de.ibm.com>
9721
9722 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9723 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9724 is used in AIX.
9725 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9726 (process_xcoff_symbol): Likewise.
9727 (scan_xcoff_symtab): Likewise.
9728
5c99fcf8
AH
97292017-04-26 Alan Hayward <alan.hayward@arm.com>
9730
9731 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9732 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9733 (ia64_access_reg): Use get_frame_register_unsigned.
9734 (ia64_access_rse_reg): Likewise.
9735 (ia64_libunwind_frame_prev_register): Likewise.
9736
b41c5a85
JW
97372017-04-26 Jiong Wang <jiong.wang@arm.com>
9738
9739 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9740 * gdbarch.c: Regenerated.
9741 * gdbarch.h: Regenerated.
9742 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9743 visibility external.
9744 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9745 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9746 (enum cfa_how_kind): Move to ...
9747 (struct dwarf2_frame_state_reg_info): Likewise.
9748 (struct dwarf2_frame_state): Likewise.
9749 * dwarf2-frame.h: ... here.
9750 (dwarf2_frame_state_alloc_regs): New declaration.
9751 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9752 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9753
c185f580
AH
97542017-04-26 Alan Hayward <alan.hayward@arm.com>
9755
9756 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9757 regcache_raw_read_unsigned.
9758 (xtensa_pseudo_register_write): Likewise.
9759
19c45594
AH
97602017-04-26 Alan Hayward <alan.hayward@arm.com>
9761
9762 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9763 (nds32_pseudo_register_write): Likewise.
9764
4658f12e
YQ
97652017-04-25 Yao Qi <yao.qi@linaro.org>
9766
9767 * regcache.c (struct regcache) <readonly_p>: Change its type
9768 to bool.
9769 (regcache_xmalloc_1): Update parameter type and callers update.
9770
d581dda8
YQ
97712017-04-25 Yao Qi <yao.qi@linaro.org>
9772
9773 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9774 set_gdbarch_wchar_bit.
9775 * arm-tdep.c (arm_gdbarch_init): Likewise.
9776
debed3db
PA
97772017-04-25 Pedro Alves <palves@redhat.com>
9778
9779 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9780 (BothAreRelocatable, memcopy, memmove): Don't define.
9781 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9782 macros.
9783
b0b92aeb
PA
97842017-04-25 Pedro Alves <palves@redhat.com>
9785
9786 * common/common-defs.h: Include "common/poison.h".
9787 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9788 and adjust.
9789 * common/poison.h: New file.
9790 * common/traits.h: Include <type_traits>.
9791 (Not, Or, Requires): New, moved from common/function-view.h.
9792
16c4d54a
PA
97932017-04-25 Pedro Alves <palves@redhat.com>
9794
9795 * breakpoint.h (struct breakpoint): In-class initialize all
9796 fields. Make boolean fields "bool".
9797 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9798 memset call and initializations no longer necessary.
9799
b5c36682
PA
98002017-04-25 Pedro Alves <palves@redhat.com>
9801
9802 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9803 reference.
9804 (pt_btrace_insn): New function.
9805 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9806
5625a286
PA
98072017-04-25 Pedro Alves <palves@redhat.com>
9808
9809 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9810 "base" field and inherit from "bp_location" instead. Add
9811 non-default ctor.
9812 (allocate_location_exception): Use new non-default ctor.
9813 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9814 (init_bp_location): Convert to ...
9815 (bp_location::bp_location): ... this new ctor, and remove memset
9816 call.
9817 (base_breakpoint_allocate_location): Use the new non-default ctor.
9818 * breakpoint.h (bp_location): Now a class. Declare default and
9819 non-default ctors. In-class initialize all members.
9820 (init_bp_location): Remove declaration.
9821
23bcc18f
PA
98222017-04-25 Pedro Alves <palves@redhat.com>
9823
9824 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9825 assignment operator.
9826
e1ba3053
YQ
98272017-04-24 Yao Qi <yao.qi@linaro.org>
9828
9829 * doublest.c (convert_doublest_to_floatformat): Call
9830 floatformat_totalsize_bytes.
9831
10f489e5
TT
98322017-04-22 Tom Tromey <tom@tromey.com>
9833
9834 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9835 ui_out_emit_list.
9836 * stack.c (print_frame): Use ui_out_emit_list.
9837 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9838 ui_out_emit_list.
9839 * mi/mi-main.c (print_one_inferior)
9840 (mi_cmd_data_list_register_names)
9841 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9842 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9843 ui_out_emit_list.
9844 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9845 (mi_output_solib_attribs): Use ui_out_emit_list,
9846 ui_out_emit_tuple.
9847 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9848 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9849 (mi_cmd_stack_list_args, list_args_or_locals): Use
9850 ui_out_emit_list.
9851 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9852 * breakpoint.c (print_solib_event, output_thread_groups): Use
9853 ui_out_emit_list.
9854
0092b74d
TT
98552017-04-22 Tom Tromey <tom@tromey.com>
9856
9857 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9858 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9859 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9860
a14a62dd
TT
98612017-04-22 Tom Tromey <tom@tromey.com>
9862
9863 * tracepoint.c (tvariables_info_1)
9864 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9865
46b9c129
TT
98662017-04-22 Tom Tromey <tom@tromey.com>
9867
9868 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9869 annotate_arg_emitter.
9870 * breakpoint.c (print_mention_watchpoint)
9871 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9872 * annotate.h (struct annotate_arg_emitter): New.
9873
2e783024
TT
98742017-04-22 Tom Tromey <tom@tromey.com>
9875
9876 * record-btrace.c (record_btrace_insn_history)
9877 (record_btrace_insn_history_range, record_btrace_call_history)
9878 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9879 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9880 ui_out_emit_tuple.
9881 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9882 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9883 * skip.c (skip_info): Use ui_out_emit_tuple.
9884 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9885 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9886 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9887 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9888 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9889 ui_out_emit_tuple.
9890 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9891 (output_register, mi_cmd_data_read_memory)
9892 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9893 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9894 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9895 Use ui_out_emit_tuple.
9896 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9897 ui_out_emit_tuple.
9898 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9899 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9900 * linux-thread-db.c (info_auto_load_libthread_db): Use
9901 ui_out_emit_tuple.
9902 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9903 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9904 * disasm.c (do_mixed_source_and_assembly_deprecated)
9905 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9906 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9907 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9908 * breakpoint.c (print_one_breakpoint_location)
9909 (print_one_breakpoint): Use ui_out_emit_tuple.
9910 * auto-load.c (print_script, info_auto_load_cmd): Use
9911 ui_out_emit_tuple.
9912 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9913
9be21bb4
SM
99142017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9915
9916 * thread.c (print_thread_info_1): Remove dead code.
9917
0d4c07af
JK
99182017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9919
9920 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9921 GDB_SELF_TEST.
9922 * arm-tdep.c (selftests::arm_record_test): Likewise.
9923
4daf993d
YQ
99242017-04-21 Yao Qi <yao.qi@linaro.org>
9925
9926 * regcache.c (regcache_restore): Remove argument 2. Replace
9927 argument 3 with regcache. Get register status from
9928 src->register_status and get register contents from
9929 register_buffer (src, regnum).
9930 (regcache_cpy): Update.
9931
a6c21d4a
PA
99322017-04-19 Pedro Alves <palves@redhat.com>
9933
9934 * gdbthread.h (thread): Add missing closing parenthesis in
9935 comment.
9936
3a3fd0fd
PA
99372017-04-19 Pedro Alves <palves@redhat.com>
9938
9939 * common/refcounted-object.h: New file.
9940 * gdbthread.h: Include "common/refcounted-object.h".
9941 (thread_info): Inherit from refcounted_object and add comments.
9942 (thread_info::incref, thread_info::decref)
9943 (thread_info::m_refcount): Delete.
9944 (thread_info::deletable): Use the refcounted_object::refcount()
9945 method.
9946 * inferior.c (current_inferior_): Add comment.
9947 (set_current_inferior): Increment/decrement refcounts.
9948 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9949 not-deletable instead of comparing with the current inferior.
9950 (initialize_inferiors): Increment the initial inferior's refcount.
9951 * inferior.h (struct inferior): Forward declare.
9952 Include "common/refcounted-object.h".
9953 (current_inferior, set_current_inferior): Move declaration to
9954 before struct inferior's definition, and fix comment.
9955 (inferior): Inherit from refcounted_object. Add comments.
9956 * thread.c (switch_to_thread_no_regs): Reference the thread's
9957 inferior pointer directly instead of doing a ptid lookup.
9958 (switch_to_no_thread): New function.
9959 (switch_to_thread(thread_info *)): New function, factored out
9960 from ...
9961 (switch_to_thread(ptid_t)): ... this.
9962 (restore_current_thread): Delete.
9963 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9964 fields, and add 'inf' field.
9965 (do_restore_current_thread_cleanup): Check whether old->inf is
9966 alive instead of looking up an inferior by ptid. Use
9967 switch_to_thread and switch_to_no_thread.
9968 (restore_current_thread_cleanup_dtor): Use old->inf directly
9969 instead of lookup up an inferior by id. Decref the inferior.
9970 Don't restore 'removable'.
9971 (make_cleanup_restore_current_thread): Same the inferior pointer
9972 in old, instead of the inferior number. Incref the inferior.
9973 Don't save/clear 'removable'.
9974
9bcb1f16
PA
99752017-04-19 Pedro Alves <palves@redhat.com>
9976
9977 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9978 unittests/scoped_restore-selftests.c.
9979 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
9980 * common/scoped_restore.h (scoped_restore_base): Make "class".
9981 (scoped_restore_base::release): New public method.
9982 (scoped_restore_base::scoped_restore_base): New protected ctor.
9983 (scoped_restore_base::m_saved_var): New protected field.
9984 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
9985 scoped_restore_base base class instead of m_saved_var directly.
9986 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
9987 (scoped_restore_tmpl::scoped_restore_tmpl(const
9988 scoped_restore_tmpl<T>&)): Likewise.
9989 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
9990 method.
9991 (scoped_restore_tmpl::saved_var): New method.
9992 (scoped_restore_tmpl::m_saved_var): Delete.
9993 * inferior.h (inferior::detaching): Now a bool.
9994 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
9995 cleanup.
9996 * unittests/scoped_restore-selftests.c: New file.
9997
26fcd539
PA
99982017-04-19 Pedro Alves <palves@redhat.com>
9999
10000 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10001 Re-sort in alphabetic order.
10002
fdd243b0
PA
100032017-04-18 Pedro Alves <palves@redhat.com>
10004
10005 * xml-support.c (obstack_xml_printf): Delete.
10006 * xml-support.h (obstack_xml_printf): Delete.
10007
4895cde2
PA
100082017-04-18 Pedro Alves <palves@redhat.com>
10009
10010 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10011 vdebug, verror, body_text, start_element, end_element, name,
10012 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10013 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10014 is_xinclude>: Make private and add m_ prefix.
10015 (gdb_xml_parser::body_text): New method, based on ...
10016 (gdb_xml_body_text): ... this. Adjust.
10017 (gdb_xml_parser::vdebug): New method, based on ...
10018 (gdb_xml_debug): ... this. Adjust.
10019 (gdb_xml_parser::verror): New method, based on ...
10020 (gdb_xml_error): ... this. Adjust.
10021 (gdb_xml_parser::start_element): New method, based on ...
10022 (gdb_xml_start_element): ... this. Adjust.
10023 (gdb_xml_start_element_wrapper): Defer to
10024 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10025 (gdb_xml_parser::end_element): New method, based on ...
10026 (gdb_xml_end_element_wrapper): ... this. Adjust.
10027 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10028 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10029 (gdb_xml_parser::use_dtd): New method, based on ...
10030 (gdb_xml_use_dtd): ... this. Adjust.
10031 (gdb_xml_parser::parse): New method, based on ...
10032 (gdb_xml_parse): ... this. Adjust.
10033 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10034 (xinclude_start_include): Adjust to call the parser's name method.
10035 (xml_xinclude_default, xml_xinclude_start_doctype)
10036 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10037 method.
10038 (xml_process_xincludes): Adjust to call parser methods.
10039 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10040 declarations.
10041
bd8a901f
PA
100422017-04-18 Pedro Alves <palves@redhat.com>
10043
10044 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10045 gdb::optional<std::string>.
10046 * xml-support.c: Include <string>.
10047 (scope_level::scope_level(scope_level &&))
10048 (scope_level::~scope_level): Delete.
10049 (scope_level::body): Now a std::string.
10050 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10051 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10052 parameter.
10053 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10054 (xinclude_parsing_data::output): Now a std::string reference.
10055 (xinclude_start_include): Adjust.
10056 (xml_xinclude_default): Adjust.
10057 (xml_process_xincludes): Add 'output' parameter, and return bool.
10058 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10059 and return bool.
10060 * xml-tdesc.c: Include <unordered_map> and <string>.
10061 (tdesc_xml_cache): Delete.
10062 (tdesc_xml_cache_s): Delete.
10063 (xml_cache): Now an std::unordered_map.
10064 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10065 (target_fetch_description_xml): Change return type to
10066 gdb::optional<std::string>, and adjust.
10067 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10068 (target_fetch_description_xml): Change return type to
10069 gdb::optional<std::string>.
10070
d35d1958
PA
100712017-04-18 Pedro Alves <palves@redhat.com>
10072
10073 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10074 unittests/optional-selftests.c.
10075 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10076 * unittests/optional-selftests.c: New file.
10077 * unittests/optional/assignment/1.cc: New file.
10078 * unittests/optional/assignment/2.cc: New file.
10079 * unittests/optional/assignment/3.cc: New file.
10080 * unittests/optional/assignment/4.cc: New file.
10081 * unittests/optional/assignment/5.cc: New file.
10082 * unittests/optional/assignment/6.cc: New file.
10083 * unittests/optional/assignment/7.cc: New file.
10084 * unittests/optional/cons/copy.cc: New file.
10085 * unittests/optional/cons/default.cc: New file.
10086 * unittests/optional/cons/move.cc: New file.
10087 * unittests/optional/cons/value.cc: New file.
10088 * unittests/optional/in_place.cc: New file.
10089 * unittests/optional/observers/1.cc: New file.
10090 * unittests/optional/observers/2.cc: New file.
10091
22796e97
PA
100922017-04-18 Pedro Alves <palves@redhat.com>
10093
10094 * common/gdb_optional.h: Include common/traits.h.
10095 (in_place_t): New type.
10096 (in_place): New constexpr variable.
10097 (optional::optional): Remove member initialization of
10098 m_instantiated.
10099 (optional::optional(in_place_t...)): New constructor.
10100 (optional::~optional): Use reset.
10101 (optional::optional(const optional&)): New.
10102 (optional::optional(const optional&&)): New.
10103 (optional::optional(T &)): New.
10104 (optional::optional(T &&)): New.
10105 (operator::operator=(const optional &)): New.
10106 (operator::operator=(optional &&)): New.
10107 (operator::operator= (const T &))
10108 (operator::operator= (T &&))
10109 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10110 (operator::reset): New.
10111 (operator::m_instantiated):: Add in-class initializer.
10112 * common/traits.h: Include <type_traits>.
10113 (struct And): New types.
10114
a7fc9b61
PA
101152017-04-18 Pedro Alves <palves@redhat.com>
10116
10117 * xml-support.c: Include <vector>.
10118 (scope_level::scope_level(const gdb_xml_element *))
10119 (scope_level::scope_level(scope_level&&)): New.
10120 (scope_level::~scope_level): New.
10121 (scope_level_s): Delete.
10122 (gdb_xml_parser::scopes): Now a std::vector.
10123 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10124 Use std::vector.
10125 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10126 scope cleanup code.
10127 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10128 of the scopes member. Use std::vector::emplace_back.
10129
010151c9
PA
101302017-04-18 Pedro Alves <palves@redhat.com>
10131
10132 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10133 a bool.
10134 (gdb_xml_end_element): Change type of first parameter.
10135 (gdb_xml_cleanup): Rename to ...
10136 (gdb_xml_parser::~gdb_xml_parser): ... this.
10137 (gdb_xml_create_parser_and_cleanup): Delete with ...
10138 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10139 to this new ctor.
10140 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10141 using gdb_xml_create_parser_and_cleanup.
10142 (xinclude_parsing_data): Add ctor/dtor.
10143 (xml_xinclude_cleanup): Delete.
10144 (xml_process_xincludes): Create a local xinclude_parsing_data
10145 instead of heap-allocating one. Create a local gdb_xml_parser
10146 instead of heap-allocating one with
10147 gdb_xml_create_parser_and_cleanup.
10148
d56060f0
JB
101492017-04-18 John Baldwin <jhb@FreeBSD.org>
10150
10151 PR threads/20743
10152 * fbsd-nat.c (resume_one_thread_cb): Remove.
10153 (resume_all_threads_cb): Remove.
10154 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10155 iterate_over_threads.
10156
305d16a9
JB
101572017-04-17 Joel Brobecker <brobecker@adacore.com>
10158
10159 * NEWS: Create a new section for the next release branch.
10160 Rename the section of the current branch, now that it has
10161 been cut.
10162
8bb57231
JB
101632017-04-17 Joel Brobecker <brobecker@adacore.com>
10164
10165 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10166 * version.in: Bump version to 8.0.50.DATE-git.
10167
096c92dd
SDJ
101682017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10169
10170 PR gdb/21385
10171 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10172 independently of the host, and fix build breakage on Cygwin.
10173
0550c955
PA
101742017-04-13 Pedro Alves <palves@redhat.com>
10175
10176 * inferior.c (free_inferior): Convert to ...
10177 (inferior::~inferior): ... this dtor.
10178 (inferior::inferior): New ctor, factored out from ...
10179 (add_inferior_silent): ... here. Allocate the inferior with a new
10180 expression.
10181 (delete_inferior): Call delete instead of free_inferior.
10182 * inferior.h (gdb_environ, continuation): Forward declare.
10183 (inferior): Now a class. Add in-class initialization to all
10184 members. Make boolean fields bool, except 'detaching'.
10185 (inferior::inferior): New explicit ctor.
10186 (inferior::~inferior): New.
10187
e3d60dfc
PA
101882017-04-13 Pedro Alves <palves@redhat.com>
10189
10190 * inferior.c (init_inferior_list): Delete.
10191 * inferior.h (init_inferior_list): Delete.
10192
5fd69d0a
PA
101932017-04-13 Pedro Alves <palves@redhat.com>
10194
10195 PR threads/13217
10196 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10197 (top level): Call it twice, with different thread sets.
10198
c6609450
PA
101992017-04-13 Pedro Alves <palves@redhat.com>
10200
10201 * thread.c: Include <algorithm>.
10202 (thread_array_cleanup): Delete.
10203 (scoped_inc_dec_ref): New class.
10204 (live_threads_count): New function.
10205 (set_thread_refcount): Delete.
10206 (tp_array_compar_ascending): Now a bool.
10207 (tp_array_compar): Convert to a std::sort comparison function.
10208 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10209 and live_threads_count.
10210
2a00d7ce
PA
102112017-04-13 Pedro Alves <palves@redhat.com>
10212
10213 * infrun.c (follow_fork_inferior): Also switch the current
10214 inferior.
10215
441d7c93
PA
102162017-04-13 Pedro Alves <palves@redhat.com>
10217
10218 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10219 before calling create_internal_breakpoint.
10220
808480f6
PA
102212017-04-13 Pedro Alves <palves@redhat.com>
10222
10223 * fork-child.c (execv_argv): New class.
10224 (breakup_args): Refactored as ...
10225 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10226 Copy arguments to storage and replace separators with NULL
10227 terminators in place.
10228 (escape_bang_in_quoted_argument): Adjust to return bool.
10229 (execv_argv::execv_argv): New ctor.
10230 (execv_argv::init_for_shell): New method, factored out from
10231 fork_inferior. Don't strdup strings into the vector.
10232 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10233 Remove free_vector_argv call.
10234
ad3d022a
YQ
102352017-04-13 Yao Qi <yao.qi@linaro.org>
10236
10237 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10238 tdep->rx_psw_type.
10239
e6ddc3bf
YQ
102402017-04-13 Yao Qi <yao.qi@linaro.org>
10241
10242 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10243 * rx-tdep.c (rx_gdbarch_init): Likewise.
10244
bfb8cf90
PA
102452017-04-13 Pedro Alves <palves@redhat.com>
10246
10247 * breakpoint.h (struct breakpoint): Reindent.
10248
f5336ca5
PA
102492017-04-13 Pedro Alves <palves@redhat.com>
10250
10251 * breakpoint.c (bp_location): Rename to ...
10252 (bp_locations): ... this. All references updated.
10253 (bp_location_count): Rename to ...
10254 (bp_locations_count): ... this. All references updated.
10255 (bp_location_placed_address_before_address_max): Rename to ...
10256 (bp_locations_placed_address_before_address_max): ... this. All
10257 references updated.
10258 (bp_location_shadow_len_after_address_max): Rename to ...
10259 (bp_locations_shadow_len_after_address_max): ... this. All
10260 references updated.
10261 (bp_location_compare_addrs): Rename to ...
10262 (bp_locations_compare_addrs): ... this. All references updated.
10263 (bp_location_compare):Rename to ...
10264 (bp_locations_compare): ... this. All references updated.
10265 (bp_location_target_extensions_update): Rename to ...
10266 (bp_locations_target_extensions_update): ... this. All references
10267 updated.
10268
be628ab8
SDJ
102692017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10270
10271 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10272 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10273 'sgtty.h'.
10274 * common/gdb_termios.h: New file, with parts of "terminal.h".
10275 * inflow.c: Include "gdb_termios.h".
10276 * ser-unix.c: Include "gdb_termios.h".
10277 * terminal.h: Move terminal-related defines to
10278 "common/gdb_termios.h".
10279
8e9e35b1
TT
102802017-04-12 Tom Tromey <tom@tromey.com>
10281
10282 * probe.c (parse_probes): Update.
10283 * location.h (delete_event_location): Don't declare.
10284 (event_location_deleter::operator()): Update.
10285 * location.c (event_location_deleter::operator()): Rename from
10286 delete_event_location.
10287 * linespec.h (linespec_result) <location>: Change type to
10288 event_location_up.
10289 * linespec.c (canonicalize_linespec, event_location_to_sals)
10290 (decode_objc): Update.
10291 (linespec_result): Don't call delete_event_location.
10292 * breakpoint.c (create_breakpoints_sal)
10293 (bkpt_probe_create_sals_from_location)
10294 (strace_marker_create_sals_from_location): Update.
10295
16e802b9
TT
102962017-04-12 Tom Tromey <tom@tromey.com>
10297
10298 * linespec.h (struct linespec_result): Add constructor and
10299 destructor.
10300 (init_linespec_result, destroy_linespec_result)
10301 (make_cleanup_destroy_linespec_result): Don't declare.
10302 * linespec.c (init_linespec_result): Remove.
10303 (linespec_result::~linespec_result): Rename from
10304 destroy_linespec_result. Update.
10305 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10306 Remove.
10307 * breakpoint.c (create_breakpoint, break_range_command)
10308 (decode_location_default): Update.
10309 * ax-gdb.c (agent_command_1): Update.
10310
d28cd78a
TT
103112017-04-12 Tom Tromey <tom@tromey.com>
10312
10313 * remote.c (remote_download_tracepoint): Update.
10314 * python/py-breakpoint.c (bppy_get_location): Update.
10315 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10316 (gdbscm_breakpoint_location): Update.
10317 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10318 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10319 Change type to event_location_up.
10320 * breakpoint.c (create_overlay_event_breakpoint)
10321 (create_longjmp_master_breakpoint)
10322 (create_std_terminate_master_breakpoint)
10323 (create_exception_master_breakpoint)
10324 (breakpoint_event_location_empty_p, print_breakpoint_location)
10325 (print_one_breakpoint_location, create_thread_event_breakpoint)
10326 (init_breakpoint_sal, create_breakpoint)
10327 (print_recreate_ranged_breakpoint, break_range_command)
10328 (init_ada_exception_breakpoint, say_where): Update.
10329 (base_breakpoint_dtor): Don't call delete_event_location.
10330 (bkpt_print_recreate, tracepoint_print_recreate)
10331 (dprintf_print_recreate, update_static_tracepoint)
10332 (breakpoint_re_set_default): Update.
10333
711799d5
TT
103342017-04-12 Tom Tromey <tom@tromey.com>
10335
10336 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10337 type of "to_do". Update.
10338 (compute_stack_depth): Use std::vector.
10339
52d214d3
TT
103402017-04-12 Tom Tromey <tom@tromey.com>
10341
10342 * printcmd.c (find_instruction_backward): Use std::vector.
10343
4c404b8b
TT
103442017-04-12 Tom Tromey <tom@tromey.com>
10345
10346 * symfile.c (objfilep): Remove typedef.
10347 (reread_symbols): Use a std::vector.
10348
156d9eab
TT
103492017-04-12 Tom Tromey <tom@tromey.com>
10350
10351 * mi/mi-main.c (exec_direction_forward): Remove.
10352 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10353 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10354 scoped_restore.
10355 * guile/guile.c (guile_repl_command, guile_command)
10356 (gdbscm_execute_gdb_command): Use scoped_restore.
10357 * go-exp.y (go_parse): Use scoped_restore.
10358 * d-exp.y (d_parse): Use scoped_restore.
10359 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10360 * c-exp.y (c_parse): Use scoped_restore.
10361
4d89769a
TT
103622017-04-12 Tom Tromey <tom@tromey.com>
10363
10364 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10365 (mi_parse): Update return type.
10366 (mi_parse_free): Remove.
10367 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10368 (mi_parse::~mi_parse): Rename from mi_parse_free.
10369 (mi_parse_cleanup): Remove.
10370 (mi_parse): Return a unique_ptr. Use new.
10371 * mi/mi-main.c (mi_execute_command): Update.
10372
4b217cc7
TT
103732017-04-12 Tom Tromey <tom@tromey.com>
10374
10375 * location.c (explicit_location_lex_one): Return a
10376 unique_xmalloc_ptr.
10377 (string_to_explicit_location): Update. Remove cleanups.
10378
59d3651b
TT
103792017-04-12 Tom Tromey <tom@tromey.com>
10380
10381 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10382 (compare_value_and_voffset): Change type. Update.
10383 (compute_vtable_size): Change type of "offset_vec".
10384 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10385 (gnuv3_get_typeid): Remove extraneous declaration.
10386
b24b0d6c
TT
103872017-04-12 Tom Tromey <tom@tromey.com>
10388
10389 * charset.h (wchar_iterator): Fix comment.
10390
80a3b8c5
TT
103912017-04-12 Tom Tromey <tom@tromey.com>
10392
10393 * charset.c (iconv_wrapper): New class.
10394 (cleanup_iconv): Remove.
10395 (convert_between_encodings): Use it.
10396
c83dd867
TT
103972017-04-12 Tom Tromey <tom@tromey.com>
10398
10399 * symfile.h (increment_reading_symtab): Update type.
10400 * symfile.c (decrement_reading_symtab): Remove.
10401 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10402 * psymtab.c (psymtab_to_symtab): Update.
10403 * dwarf2read.c (dw2_instantiate_symtab): Update.
10404
0e8621a0
TT
104052017-04-12 Tom Tromey <tom@tromey.com>
10406
10407 * jit.c (struct jit_reader): Declare separately. Add constructor
10408 and destructor. Change type of "handle".
10409 (loaded_jit_reader): Define separately.
10410 (jit_reader_load): Update. New "new".
10411 (jit_reader_unload_command): Use "delete".
10412 * gdb-dlfcn.h (struct dlclose_deleter): New.
10413 (gdb_dlhandle_up): New typedef.
10414 (gdb_dlopen, gdb_dlsym): Update types.
10415 (gdb_dlclose): Remove.
10416 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10417 (gdb_dlsym): Change type of "handle".
10418 (make_cleanup_dlclose): Remove.
10419 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10420 * compile/compile-c-support.c (load_libcc): Update.
10421
67d89901
TT
104222017-04-12 Tom Tromey <tom@tromey.com>
10423
10424 * symtab.h (find_pcs_for_symtab_line): Change return type.
10425 * symtab.c (find_pcs_for_symtab_line): Change return type.
10426 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10427 type of "vec". Update.
10428 (ltpy_get_pcs_for_line): Update.
10429 * linespec.c (decode_digits_ordinary): Update.
10430
93921405
TT
104312017-04-12 Tom Tromey <tom@tromey.com>
10432
10433 * tracepoint.c (actions_command): Update.
10434 * python/python.c (python_command, python_interactive_command):
10435 Update.
10436 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10437 * guile/guile.c (guile_command): Update.
10438 * defs.h (read_command_lines, read_command_lines_1): Return
10439 command_line_up.
10440 (command_lines_deleter): New struct.
10441 (command_line_up): New typedef.
10442 * compile/compile.c (compile_code_command)
10443 (compile_print_command): Update.
10444 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10445 command_line_up.
10446 (make_cleanup_free_command_lines): Remove.
10447 * cli/cli-script.c (get_command_line, read_command_lines_1)
10448 (copy_command_lines): Return command_line_up.
10449 (while_command, if_command, read_command_lines, define_command)
10450 (document_command): Update.
10451 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10452 Remove.
10453 * breakpoint.h (breakpoint_set_commands): Change type of
10454 "commands".
10455 * breakpoint.c (breakpoint_set_commands): Change type of
10456 "commands". Update.
10457 (do_map_commands_command, update_dprintf_command_list)
10458 (create_tracepoint_from_upload): Update.
10459
ffc2605c
TT
104602017-04-12 Tom Tromey <tom@tromey.com>
10461
10462 * tracepoint.c (scope_info): Update.
10463 * spu-tdep.c (spu_catch_start): Update.
10464 * python/python.c (gdbpy_decode_line): Update.
10465 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10466 * python/py-breakpoint.c (bppy_init): Update.
10467 * probe.c (parse_probes): Update.
10468 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10469 * location.h (event_location_deleter): New struct.
10470 (event_location_up): New typedef.
10471 (new_linespec_location, new_address_location, new_probe_location)
10472 (new_explicit_location, copy_event_location)
10473 (string_to_event_location, string_to_event_location_basic)
10474 (string_to_explicit_location): Update return type.
10475 (make_cleanup_delete_event_location): Remove.
10476 * location.c (new_linespec_location, new_address_location)
10477 (new_probe_location, new_explicit_location, copy_event_location):
10478 Return event_location_up.
10479 (delete_event_location_cleanup)
10480 (make_cleanup_delete_event_location): Remove.
10481 (string_to_explicit_location, string_to_event_location_basic)
10482 (string_to_event_location): Return event_location_up.
10483 * linespec.c (canonicalize_linespec, event_location_to_sals)
10484 (decode_line_with_current_source)
10485 (decode_line_with_last_displayed, decode_objc): Update.
10486 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10487 * completer.c (location_completer): Update.
10488 * cli/cli-cmds.c (edit_command, list_command): Update.
10489 * breakpoint.c (create_overlay_event_breakpoint)
10490 (create_longjmp_master_breakpoint)
10491 (create_std_terminate_master_breakpoint)
10492 (create_exception_master_breakpoint)
10493 (create_thread_event_breakpoint): Update.
10494 (init_breakpoint_sal): Update. Remove some dead code.
10495 (create_breakpoint_sal): Change type of "location". Update.
10496 (create_breakpoints_sal, create_breakpoint, break_command_1)
10497 (dprintf_command, break_range_command, until_break_command)
10498 (init_ada_exception_breakpoint)
10499 (strace_marker_create_sals_from_location)
10500 (update_static_tracepoint, trace_command, ftrace_command)
10501 (strace_command, create_tracepoint_from_upload): Update.
10502 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10503 * ax-gdb.c (agent_command_1): Update.
10504
8f10c932
PA
105052017-04-12 Pedro Alves <palves@redhat.com>
10506
10507 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10508 * configure.tgt: Handle i[34567]86-*-go32* and
10509 i[34567]86-*-msdosdjgpp*.
10510 * i386-tdep.c (i386_svr4_reg_to_regnum):
10511 Make extern.
10512 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10513 i386-go32-tdep.c.
10514 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10515 * i386-go32-tdep.c: New file.
10516 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10517 declarations.
10518
0a31ccfb
SM
105192017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10520
10521 * aix-thread.c (pd_status2str): Change return type to const char *.
10522
e9bb3fbb
PA
105232017-04-12 Pedro Alves <palves@redhat.com>
10524
10525 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10526 calls to set_gdbarch_gnu_triplet_regexp.
10527
53375380
PA
105282017-04-12 Pedro Alves <palves@redhat.com>
10529
10530 PR gdb/21323
10531 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10532 New enum value.
10533 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10534 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10535 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10536 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10537 * gdbarch.h, gdbarch.c: Regenerate.
10538 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10539 gdbarch_wchar_bit and gdbarch_wchar_signed.
10540 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10541 * arm-tdep.c (arm_gdbarch_init): Likewise.
10542 * avr-tdep.c (avr_gdbarch_init): Likewise.
10543 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10544 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10545 * i386-tdep.c (i386_go32_init_abi): Likewise.
10546 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10547 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10548 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10549 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10550 * sh-tdep.c (sh_gdbarch_init): Likewise.
10551 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10552 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10553 * windows-tdep.c (windows_init_abi): Likewise.
10554 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10555
53e710ac
PA
105562017-04-12 Pedro Alves <palves@redhat.com>
10557
10558 PR c++/21323
10559 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10560 cplus_primitive_type_char32_t>: New enum values.
10561 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10562 and cplus_primitive_type_char32_t.
10563 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10564 32, use the archtecture's built-in type for char16_t and char32_t,
10565 respectively. Otherwise, fallback to init_integer_type as before,
10566 but make the type unsigned, and issue a complaint.
10567 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10568
ab0538b8
AH
105692017-04-12 Alan Hayward <alan.hayward@arm.com>
10570
5e0e0422 10571 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
10572 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10573
5430098f
SDJ
105742017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10575
10576 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10577 'const char *'.
10578
7c5ded6a
SDJ
105792017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10580
10581 * common/common-utils.c (free_vector_argv): New function.
10582 * common/common-utils.h: Include <vector>.
10583 (free_vector_argv): New prototype.
10584 * darwin-nat.c (darwin_create_inferior): Rewrite function
10585 prototype in order to constify "exec_file" and accept a
10586 "std::string" for "allargs".
10587 * fork-child.c: Include <vector>.
10588 (breakup_args): Rewrite function, using C++.
10589 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10590 and accept "std::string" for "allargs". Update the code to
10591 calculate "argv" based on "allargs". Update calls to "exec_fun"
10592 and "execvp".
10593 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10594 order to constify "exec_file" and accept a "std::string" for
10595 "allargs".
10596 * go32-nat.c (go32_create_inferior): Likewise.
10597 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10598 * infcmd.c (run_command_1): Constify "exec_file". Use
10599 "std::string" for inferior arguments.
10600 * inferior.h (fork_inferior): Update prototype.
10601 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10602 prototype in order to constify "exec_file" and accept a
10603 "std::string" for "allargs".
10604 * nto-procfs.c (procfs_create_inferior): Likewise.
10605 * procfs.c (procfs_create_inferior): Likewise.
10606 * remote-sim.c (gdbsim_create_inferior): Likewise.
10607 * remote.c (extended_remote_run): Update code to accept
10608 "std::string" as argument.
10609 (extended_remote_create_inferior): Rewrite function prototype in
10610 order to constify "exec_file" and accept a "std::string" for
10611 "allargs".
10612 * rs6000-nat.c (super_create_inferior): Likewise.
10613 (rs6000_create_inferior): Likewise.
10614 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10615 * windows-nat.c (windows_create_inferior): Likewise.
10616
ae0eee42
PA
106172017-04-11 Pedro Alves <palves@redhat.com>
10618
10619 * thread.c: Fix whitespace throughout.
10620
a6acac06
PR
106212017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10622
10623 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10624
64403bd1
AH
106252017-04-11 Alan Hayward <alan.hayward@arm.com>
10626
10627 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10628
a5bef50f
SDJ
106292017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10630
10631 PR gdb/21364
10632 * osdata.c (info_osdata): Check if 'type' is an empty string
10633 instead of NULL.
10634
9295a5a9
PA
106352017-04-10 Pedro Alves <palves@redhat.com>
10636
10637 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10638 (ptid_to_global_thread_id, in_thread_list)
10639 (do_captured_list_thread_ids, set_resumed, set_running)
10640 (set_executing, set_stop_requested, finish_thread_state)
10641 (validate_registers_access, can_access_registers_ptid)
10642 (print_thread_info_1, switch_to_thread)
10643 (do_restore_current_thread_cleanup)
10644 (make_cleanup_restore_current_thread, thread_command)
10645 (thread_name_command): Use operator== instead of ptid_equal.
10646
996812e3
PA
106472017-04-10 Pedro Alves <palves@redhat.com>
10648
10649 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10650 (current_thread_cleanup_chain): Delete.
10651 (restore_current_thread_cleanup_dtor)
10652 (make_cleanup_restore_current_thread): Remove references to
10653 current_thread_cleanup_chain.
10654
845b344f
AH
106552017-04-10 Alan Hayward <alan.hayward@arm.com>
10656
10657 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10658 REG_UNKNOWN.
10659
803bdfe4
YQ
106602017-04-10 Yao Qi <yao.qi@linaro.org>
10661
10662 PR gdb/19942
10663 * gdbthread.h (thread_info::deletable): New method.
10664 (thread_info::incref): New method.
10665 (thread_info::decref): New method.
10666 (thread_info::refcount): Move it to private.
10667 * infrun.c (save_stop_context): Call inc_refcount.
10668 (release_stop_context_cleanup): Likewise.
10669 * thread.c (set_thread_exited): New function.
10670 (init_thread_list): Delete "tp" only it is deletable, otherwise
10671 call set_thread_exited.
10672 (delete_thread_1): Call set_thread_exited.
10673 (current_thread_cleanup) <inferior_pid>: Remove.
10674 <thread>: New field.
10675 (restore_current_thread_ptid_changed): Removed.
10676 (do_restore_current_thread_cleanup): Adjust.
10677 (restore_current_thread_cleanup_dtor): Don't call
10678 find_thread_ptid.
10679 (set_thread_refcount): Use dec_refcount.
10680 (make_cleanup_restore_current_thread): Adjust.
10681 (thread_apply_all_command): Call inc_refcount.
10682 (_initialize_thread): Don't call
10683 observer_attach_thread_ptid_changed.
10684
8c25b497
YQ
106852017-04-10 Yao Qi <yao.qi@linaro.org>
10686
10687 * thread.c (delete_thread_1): Hoist code on marking thread as
10688 exited.
10689
8473b447
SM
106902017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10691
10692 * windows-nat.c (windows_detach): Initialize ptid with
10693 minus_one_ptid.
10694
6670ec13
SM
106952017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10696
10697 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10698
ba2f91bb
AH
106992017-04-07 Alan Hayward <alan.hayward@arm.com>
10700
10701 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10702 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10703 (bfin_pseudo_register_write): Likewise
10704
436252de
SM
107052017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10706
10707 * common/ptid.h (struct ptid): Change to...
10708 (class ptid_t): ... this.
10709 <ptid_t>: New constructors.
10710 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10711 matches>: New methods.
10712 <make_null, make_minus_one>: New static methods.
10713 <pid>: Rename to...
10714 <m_pid>: ...this.
10715 <lwp>: Rename to...
10716 <m_lwp>: ...this.
10717 <tid>: Rename to...
10718 <m_tid>: ...this.
10719 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10720 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10721 as references, move comment to class ptid_t.
10722 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10723 ptid_t static methods.
10724 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10725 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10726 Take ptid arguments as references, implement using ptid_t methods.
10727 * unittests/ptid-selftests.c: New file.
10728 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10729 unittests/ptid-selftests.c.
10730 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10731
0dedf377
TP
107322017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10733
10734 * python/python.c (python_run_simple_file): Cast mode literal to
10735 non-const char pointer as expected by PyFile_FromString.
10736
4e9868d4
SM
107372017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10738
10739 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10740 minus_one_ptid and null_ptid.
10741
9bf2a700
PA
107422017-04-05 Pedro Alves <palves@redhat.com>
10743
10744 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10745 * configure: Regenerate.
10746
a121b7c1
PA
107472017-04-05 Pedro Alves <palves@redhat.com>
10748
10749 * ada-exp.y (yyerror): Constify.
10750 * ada-lang.c (bound_name, get_selections)
10751 (ada_variant_discrim_type)
10752 (ada_variant_discrim_name, ada_value_struct_elt)
10753 (ada_lookup_struct_elt_type, is_unchecked_variant)
10754 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10755 (catch_ada_exception_command_split)
10756 (catch_ada_assert_command_split, catch_assert_command)
10757 (ada_op_name): Constify.
10758 * ada-lang.h (ada_yyerror, get_selections)
10759 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10760 * arc-tdep.c (arc_print_frame_cache): Constify.
10761 * arm-tdep.c (arm_skip_stub): Constify.
10762 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10763 (gen_aggregate_elt_ref): Constify.
10764 * bcache.c (print_bcache_statistics): Constify.
10765 * bcache.h (print_bcache_statistics): Constify.
10766 * break-catch-throw.c (catch_exception_command_1):
10767 * breakpoint.c (struct ep_type_description::description):
10768 Constify.
10769 (add_solib_catchpoint): Constify.
10770 (catch_fork_command_1): Add cast.
10771 (add_catch_command): Constify.
10772 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10773 Constify.
10774 * bsd-uthread.c (bsd_uthread_state): Constify.
10775 * buildsym.c (patch_subfile_names): Constify.
10776 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10777 Constify.
10778 * c-exp.y (yyerror): Constify.
10779 (token::oper): Constify.
10780 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10781 * c-varobj.c (cplus_describe_child): Constify.
10782 * charset.c (find_charset_names): Add cast.
10783 (find_charset_names): Constify array and add const_cast.
10784 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10785 (edit_command): Constify.
10786 * cli/cli-decode.c (lookup_cmd): Constify.
10787 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10788 Constify.
10789 (struct dump_context): Constify.
10790 (add_dump_command, restore_command): Constify.
10791 * cli/cli-script.c (get_command_line): Constify.
10792 * cli/cli-script.h (get_command_line): Constify.
10793 * cli/cli-utils.c (check_for_argument): Constify.
10794 * cli/cli-utils.h (check_for_argument): Constify.
10795 * coff-pe-read.c (struct read_pe_section_data): Constify.
10796 * command.h (lookup_cmd): Constify.
10797 * common/print-utils.c (decimal2str): Constify.
10798 * completer.c (gdb_print_filename): Constify.
10799 * corefile.c (set_gnutarget): Constify.
10800 * cp-name-parser.y (yyerror): Constify.
10801 * cp-valprint.c (cp_print_class_member): Constify.
10802 * cris-tdep.c (cris_register_name, crisv32_register_name):
10803 Constify.
10804 * d-exp.y (yyerror): Constify.
10805 (struct token::oper): Constify.
10806 * d-lang.h (d_yyerror): Constify.
10807 * dbxread.c (struct header_file_location::name): Constify.
10808 (add_old_header_file, add_new_header_file, last_function_name)
10809 (dbx_next_symbol_text, add_bincl_to_list)
10810 (find_corresponding_bincl_psymtab, set_namestring)
10811 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10812 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10813 * defs.h (command_line_input, print_address_symbolic)
10814 (deprecated_readline_begin_hook): Constify.
10815 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10816 Constify.
10817 * event-top.c (handle_line_of_input): Constify and add cast.
10818 * exceptions.c (catch_errors): Constify.
10819 * exceptions.h (catch_errors): Constify.
10820 * expprint.c (print_subexp_standard, op_string, op_name)
10821 (op_name_standard, dump_raw_expression, dump_raw_expression):
10822 * expression.h (op_name, op_string, dump_raw_expression):
10823 Constify.
10824 * f-exp.y (yyerror): Constify.
10825 (struct token::oper): Constify.
10826 (struct f77_boolean_val::name): Constify.
10827 * f-lang.c (f_word_break_characters): Constify.
10828 * f-lang.h (f_yyerror): Constify.
10829 * fork-child.c (fork_inferior): Add cast.
10830 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10831 (new_variant): Constify.
10832 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10833 * gdbarch.c: Regenerate.
10834 * gdbcore.h (set_gnutarget): Constify.
10835 * go-exp.y (yyerror): Constify.
10836 (token::oper): Constify.
10837 * go-lang.h (go_yyerror): Constify.
10838 * go32-nat.c (go32_sysinfo): Constify.
10839 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10840 * guile/scm-cmd.c (cmdscm_function): Constify.
10841 * guile/scm-param.c (pascm_param_value): Constify.
10842 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10843 (h8300sx_register_name): Constify.
10844 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10845 Constify.
10846 * ia64-tdep.c (ia64_register_names): Constify.
10847 * infcmd.c (construct_inferior_arguments): Constify.
10848 (path_command, attach_post_wait): Constify.
10849 * language.c (show_range_command, show_case_command)
10850 (unk_lang_error): Constify.
10851 * language.h (language_defn::la_error)
10852 (language_defn::la_name_of_this): Constify.
10853 * linespec.c (decode_line_2): Constify.
10854 * linux-thread-db.c (thread_db_err_str): Constify.
10855 * lm32-tdep.c (lm32_register_name): Constify.
10856 * m2-exp.y (yyerror): Constify.
10857 * m2-lang.h (m2_yyerror): Constify.
10858 * m32r-tdep.c (m32r_register_names): Constify and make static.
10859 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10860 * m88k-tdep.c (m88k_register_name): Constify.
10861 * macroexp.c (appendmem): Constify.
10862 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10863 (upgrade_type, parse_external, parse_partial_symbols)
10864 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10865 (new_symbol): Constify.
10866 * memattr.c (mem_info_command): Constify.
10867 * mep-tdep.c (register_name_from_keyword): Constify.
10868 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10869 Constify.
10870 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10871 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10872 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10873 cast.
10874 (mi_execute_async_cli_command): Constify.
10875 * mips-tdep.c (mips_register_name): Constify.
10876 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10877 (am33_register_name, am33_2_register_name)
10878 * moxie-tdep.c (moxie_register_names): Constify.
10879 * nat/linux-osdata.c (osdata_type): Constify fields.
10880 * nto-tdep.c (nto_parse_redirection): Constify.
10881 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10882 (lookup_child_selector): Constify.
10883 (objc_methcall::name): Constify.
10884 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10885 (lookup_struct_typedef): Constify.
10886 * objfiles.c (pc_in_section): Constify.
10887 * objfiles.h (pc_in_section): Constify.
10888 * p-exp.y (struct token::oper): Constify.
10889 (yyerror): Constify.
10890 * p-lang.h (pascal_yyerror): Constify.
10891 * parser-defs.h (op_name_standard): Constify.
10892 (op_print::string): Constify.
10893 (exp_descriptor::op_name): Constify.
10894 * printcmd.c (print_address_symbolic): Constify.
10895 * psymtab.c (print_partial_symbols): Constify.
10896 * python/py-breakpoint.c (stop_func): Constify.
10897 (bppy_get_expression): Constify.
10898 * python/py-cmd.c (cmdpy_completer::name): Constify.
10899 (cmdpy_function): Constify.
10900 * python/py-event.c (evpy_add_attribute)
10901 (gdbpy_initialize_event_generic): Constify.
10902 * python/py-event.h (evpy_add_attribute)
10903 (gdbpy_initialize_event_generic): Constify.
10904 * python/py-evts.c (add_new_registry): Constify.
10905 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10906 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10907 * python/py-inferior.c (get_buffer): Add cast.
10908 * python/py-param.c (parm_constant::name): Constify.
10909 * python/py-unwind.c (fprint_frame_id): Constify.
10910 * python/python.c (gdbpy_parameter_value): Constify.
10911 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10912 * remote.c (memory_packet_config::name): Constify.
10913 (show_packet_config_cmd, remote_write_bytes)
10914 (remote_buffer_add_string):
10915 * reverse.c (exec_reverse_once): Constify.
10916 * rs6000-tdep.c (variant::name, variant::description): Constify.
10917 * rust-exp.y (rustyyerror): Constify.
10918 * rust-lang.c (rust_op_name): Constify.
10919 * rust-lang.h (rustyyerror): Constify.
10920 * serial.h (serial_ops::name): Constify.
10921 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10922 (sh_sh3e_register_name, sh_sh2e_register_name)
10923 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10924 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10925 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10926 (sh_sh4al_dsp_register_name): Constify.
10927 * sh64-tdep.c (sh64_register_name): Constify.
10928 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10929 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10930 * stabsread.c (patch_block_stabs, read_type_number)
10931 (ref_map::stabs, ref_add, process_reference)
10932 (symbol_reference_defined, define_symbol, define_symbol)
10933 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10934 (read_one_struct_field, read_struct_fields, read_baseclasses)
10935 (read_tilde_fields, read_struct_type, read_array_type)
10936 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10937 (read_huge_number, read_range_type, read_args, common_block_start)
10938 (find_name_end): Constify.
10939 * stabsread.h (common_block_start, define_symbol)
10940 (process_one_symbol, symbol_reference_defined, ref_add):
10941 * symfile.c (get_section_index, add_symbol_file_command):
10942 * symfile.h (get_section_index): Constify.
10943 * target-descriptions.c (tdesc_type::name): Constify.
10944 (tdesc_free_type): Add cast.
10945 * target.c (find_default_run_target):
10946 (add_deprecated_target_alias, find_default_run_target)
10947 (target_announce_detach): Constify.
10948 (do_option): Constify.
10949 * target.h (add_deprecated_target_alias): Constify.
10950 * thread.c (print_thread_info_1): Constify.
10951 * top.c (deprecated_readline_begin_hook, command_line_input):
10952 Constify.
10953 (init_main): Add casts.
10954 * top.h (handle_line_of_input): Constify.
10955 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10956 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10957 (tfind_command): Rename to ...
10958 (tfind_command_1): ... this and constify.
10959 (tfind_command): New function.
10960 (tfind_end_command, tfind_start_command): Adjust.
10961 (encode_source_string): Constify.
10962 * tracepoint.h (encode_source_string): Constify.
10963 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10964 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10965 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10966 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10967 * tui/tui-win.c (parse_scrolling_args): Constify.
10968 * tui/tui-windata.c (tui_erase_data_content): Constify.
10969 * tui/tui-windata.h (tui_erase_data_content): Constify.
10970 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10971 * tui/tui.c (tui_enable): Add cast.
10972 * utils.c (defaulted_query): Constify.
10973 (init_page_info): Add cast.
10974 (puts_debug, subset_compare): Constify.
10975 * utils.h (subset_compare): Constify.
10976 * varobj.c (varobj_format_string): Constify.
10977 * varobj.h (varobj_format_string): Constify.
10978 * vax-tdep.c (vax_register_name): Constify.
10979 * windows-nat.c (windows_detach): Constify.
10980 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
10981 * xml-support.c (gdb_xml_end_element): Constify.
10982 * xml-tdesc.c (tdesc_start_reg): Constify.
10983 * xstormy16-tdep.c (xstormy16_register_name): Constify.
10984 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
10985 * xtensa-tdep.h (xtensa_register_t::name): Constify.
10986
995816ba
PA
109872017-04-05 Pedro Alves <palves@redhat.com>
10988
10989 * proc-api.c (struct trans): Constify.
10990 (procfs_note): Constify.
10991 * proc-events.c (struct trans, syscall_table):
10992 * proc-flags.c (struct trans): Constify.
10993 * proc-utils.h (procfs_note): Constify.
10994 * proc-why.c (struct trans): Constify.
10995 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
10996 (procfs_detach): Constify.
10997 * sol-thread.c (struct string_map): Constify.
10998 (td_err_string, td_state_string): Constify.
10999
3e83a920
PA
110002017-04-05 Pedro Alves <palves@redhat.com>
11001
11002 * proc-api.c (procfs_filename): Don't initialize
11003 procfs_filename.
11004 (prepare_to_trace): Assume procfs_filename is non-NULL.
11005 (_initialize_proc_api): Give procfs_filename a default value here.
11006
63160a43
PA
110072017-04-05 Pedro Alves <palves@redhat.com>
11008
11009 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11010 'cond_string' parameter.
11011 (extract_exception_regexp): Constify 'string' parameter.
11012 (catch_exception_command_1): Constify.
11013 * breakpoint.c (init_catchpoint)
11014 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11015 parameter.
11016 (ep_parse_optional_if_clause, catch_fork_command_1)
11017 (catch_exec_command_1): Constify.
11018 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11019 parameter.
11020 (ep_parse_optional_if_clause): Constify.
11021 * cli/cli-utils.c (remove_trailing_whitespace)
11022 (check_for_argument): Constify.
11023 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11024 non-const overload.
11025 (check_for_argument): Likewise.
11026
9b2eba3d
PA
110272017-04-05 Pedro Alves <palves@redhat.com>
11028
11029 * event-top.c (command_line_handler): Add cast to execute_command
11030 call.
11031 * record-btrace.c (cmd_record_btrace_bts_start)
11032 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11033 (cmd_record_btrace_start): Add cast to execute_command call.
11034 * record-full.c (record_full_goto_insn):
11035 * record.c (record_start, record_stop): Add cast to
11036 execute_command_to_string calls.
11037 (cmd_record_start): Add cast to execute_command calls.
11038
2adadf51
PA
110392017-04-05 Pedro Alves <palves@redhat.com>
11040
11041 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11042 static inline function.
11043 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11044 array and use gdb_PyArg_ParseTupleAndKeywords.
11045 * python/py-cmd.c (cmdpy_init): Likewise.
11046 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11047 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11048 (infpy_search_memory): Likewise.
11049 * python/py-objfile.c (objfpy_add_separate_debug_file)
11050 (gdbpy_lookup_objfile): Likewise.
11051 * python/py-symbol.c (gdbpy_lookup_symbol)
11052 (gdbpy_lookup_global_symbol): Likewise.
11053 * python/py-type.c (gdbpy_lookup_type): Likewise.
11054 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11055 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11056 Likewise.
11057
0d1f4ceb
PA
110582017-04-05 Pedro Alves <palves@redhat.com>
11059
11060 * python/python-internal.h (gdb_PyGetSetDef): New type.
11061 * python/py-block.c (block_object_getset)
11062 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11063 * python/py-event.c (event_object_getset)
11064 (finish_breakpoint_object_getset): Likewise.
11065 * python/py-inferior.c (inferior_object_getset): Likewise.
11066 * python/py-infthread.c (thread_object_getset): Likewise.
11067 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11068 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11069 * python/py-objfile.c (objfile_getset): Likewise.
11070 * python/py-progspace.c (pspace_getset): Likewise.
11071 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11072 Likewise.
11073 * python/py-record.c (recpy_record_getset): Likewise.
11074 * python/py-symbol.c (symbol_object_getset): Likewise.
11075 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11076 Likewise.
11077 * python/py-type.c (type_object_getset, field_object_getset):
11078 Likewise.
11079 * python/py-value.c (value_object_getset): Likewise.
11080
4d759979
PA
110812017-04-05 Pedro Alves <palves@redhat.com>
11082
11083 * python/python-internal.h (gdb_PyObject_CallMethod)
11084 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11085 New functions.
11086 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11087 (PySys_GetObject, PySys_SetPath): New macros.
11088
fdf9e36f
PA
110892017-04-05 Pedro Alves <palves@redhat.com>
11090
11091 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11092 info_osdata_command.
11093 * osdata.c (info_osdata_command): Rename to ...
11094 (info_osdata): ... this. Constify 'type' parameter, and remove
11095 the 'from_tty' parameter. Accept NULL TYPE.
11096 (info_osdata_command): New function.
11097 * osdata.h (info_osdata_command): Remove declaration.
11098 (info_osdata): New declaration.
11099
9f33b8b7
PA
111002017-04-05 Pedro Alves <palves@redhat.com>
11101
11102 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11103 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11104 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11105 parameter.
11106 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11107 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11108 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11109 parameter.
11110 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11111 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11112 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11113 (mi_cmd_file_list_exec_source_files)
11114 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11115 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11116 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11117 parameter.
11118 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11119 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11120 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11121 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11122 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11123 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11124 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11125 'command' parameter.
11126 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11127 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11128 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11129 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11130 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11131 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11132 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11133 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11134 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11135 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11136 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11137 parameter.
11138 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11139 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11140 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11141 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11142 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11143 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11144 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11145 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11146 (mi_cmd_data_list_changed_registers)
11147 (mi_cmd_data_write_register_values)
11148 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11149 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11150 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11151 (mi_cmd_list_features, mi_cmd_list_target_features)
11152 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11153 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11154 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11155 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11156 (mi_cmd_trace_frame_collected): Constify 'command'
11157 parameter.
11158 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11159 'command' parameter.
11160
67cb5b2d
PA
111612017-04-05 Pedro Alves <palves@redhat.com>
11162
11163 * ada-lang.c (ada_completer_word_break_characters): Now a const
11164 array.
11165 (ada_get_gdb_completer_word_break_characters): Constify.
11166 * completer.c (gdb_completer_command_word_break_characters)
11167 (gdb_completer_file_name_break_characters)
11168 (gdb_completer_quote_characters): Now const arrays.
11169 (get_gdb_completer_quote_characters): Constify.
11170 (set_rl_completer_word_break_characters): New function.
11171 (set_gdb_completion_word_break_characters)
11172 (complete_line_internal): Use it.
11173 * completer.h (get_gdb_completer_quote_characters): Constify.
11174 (set_rl_completer_word_break_characters): Declare.
11175 * f-lang.c (f_word_break_characters): Constify.
11176 * language.c (default_word_break_characters): Constify.
11177 * language.h (language_defn::la_word_break_characters): Constify.
11178 (default_word_break_characters): Constify.
11179 * top.c (init_main): Use set_rl_completer_word_break_characters.
11180
7a114964
PA
111812017-04-05 Pedro Alves <palves@redhat.com>
11182
11183 * aix-thread.c (aix_thread_pid_to_str)
11184 (aix_thread_extra_thread_info): Constify.
11185 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11186 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11187 (bsd_uthread_pid_to_str): Constify.
11188 * corelow.c (core_pid_to_str): Constify.
11189 * darwin-nat.c (darwin_pid_to_str): Constify.
11190 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11191 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11192 Constify.
11193 * gnu-nat.c (gnu_pid_to_str): Constify.
11194 * go32-nat.c (go32_pid_to_str): Constify.
11195 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11196 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11197 * inferior.c (inferior_pid_to_str): Constify.
11198 * linux-nat.c (linux_nat_pid_to_str): Constify.
11199 * linux-tdep.c (linux_core_pid_to_str): Constify.
11200 * linux-thread-db.c (thread_db_pid_to_str)
11201 (thread_db_extra_thread_info): Constify.
11202 * nto-tdep.c (nto_extra_thread_info): Constify.
11203 * nto-tdep.h (nto_extra_thread_info): Constify.
11204 * obsd-nat.c (obsd_pid_to_str): Constify.
11205 * procfs.c (procfs_pid_to_str): Constify.
11206 * ravenscar-thread.c (ravenscar_extra_thread_info)
11207 (ravenscar_pid_to_str): Constify.
11208 * remote-sim.c (gdbsim_pid_to_str): Constify.
11209 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11210 Constify.
11211 * sol-thread.c (solaris_pid_to_str): Constify.
11212 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11213 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11214 * target.c (default_pid_to_str, target_pid_to_str)
11215 (normal_pid_to_str, default_pid_to_str): Constify.
11216 * target.h (target_ops::to_pid_to_str)
11217 (target_ops::to_extra_thread_info): Constify.
11218 (target_pid_to_str, normal_pid_to_str): Constify.
11219 * windows-nat.c (windows_pid_to_str): Constify.
11220 * gdbarch.sh (core_pid_to_str): Constify.
11221 * target-delegates.c: Regenerate.
11222 * gdbarch.h, gdbarch.c: Regenerate.
11223
69bbf465
PA
112242017-04-05 Pedro Alves <palves@redhat.com>
11225
11226 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11227 the memory of the temporary warning_pre_print override.
11228 * utils.c (warning_pre_print): Constify.
11229 * utils.h (warning_pre_print): Constify.
11230
be47f9e8
PA
112312017-04-05 Pedro Alves <palves@redhat.com>
11232
11233 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11234 (shell_command): New function.
11235 (make_command): Use std::string.
11236 (init_cli_cmds): Register shell_command instead of shell_escape.
11237
bde6261a
PA
112382017-04-05 Pedro Alves <palves@redhat.com>
11239
11240 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11241 * tracepoint.c (default_collect): Don't initialize.
11242
b38ef47f
PA
112432017-04-05 Pedro Alves <palves@redhat.com>
11244
11245 * macroexp.c (macro_buffer::shared): Now a bool.
11246 (init_buffer): Update.
11247 (init_shared_buffer): Constify 'addr' parameter.
11248 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11249 casts.
11250
f995bbe8
PA
112512017-04-05 Pedro Alves <palves@redhat.com>
11252
11253 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11254 * disasm.c (set_disassembler_options): Constify local.
11255 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11256
4a596fe2
SDJ
112572017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11258
11259 PR gdb/21352
11260 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11261 option.
11262
2cad08ea
YQ
112632017-04-05 Yao Qi <yao.qi@linaro.org>
11264
11265 * frame.c (frame_unwind_register_unsigned): Call
11266 frame_unwind_register_value.
11267
55a98976
YQ
112682017-04-05 Yao Qi <yao.qi@linaro.org>
11269
11270 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11271 Use gdb_test_multiple, and don't match anchor.
11272
4ac40124
PA
112732017-04-05 Pedro Alves <palves@redhat.com>
11274
11275 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11276 (Write After Approval): Remove Simon Marchi.
11277
c053b654
PA
112782017-04-05 Pedro Alves <palves@redhat.com>
11279
11280 * common/gdb_optional.h (optional::optional): Make constexpr and
11281 initialize m_dummy.
11282
4c7bf4f9
JB
112832017-04-04 John Baldwin <jhb@FreeBSD.org>
11284
11285 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11286 (amd64fbsd_jmp_buf_reg_offset): Remove.
11287 (amd64fbsd_supply_uthread): Remove function.
11288 (amd64fbsd_collect_uthread): Remove function.
11289 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11290 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11291 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11292 (fbsd-nat.c): Update comment.
11293 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11294 (i386fbsd_jmp_buf_reg_offset): Remove.
11295 (i386fbsd_supply_uthread): Remove function.
11296 (i386fbsd_collect_uthread): Remove function.
11297 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11298
1e1a8bef
JB
112992017-04-04 John Baldwin <jhb@FreeBSD.org>
11300
11301 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11302 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11303 * NEWS: Mention that support for FreeBSD/alpha was removed.
11304 * alpha-fbsd-tdep.c: Delete file.
11305 * config/alpha/fbsd.mh: Delete file.
11306 * configure.host: Delete alpha*-*-freebsd* and
11307 alpha*-*-kfreebsd*-gnu.
11308 * configure.tgt: Delete alpha*-*-freebsd* and
11309 alpha*-*-kfreebsd*-gnu.
11310
49907934
JB
113112017-04-04 John Baldwin <jhb@FreeBSD.org>
11312
11313 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11314 amd64bsd_store_inferior_registers): Use ptid from regcache.
11315
6f77053d
PA
113162017-04-04 Pedro Alves <palves@redhat.com>
11317
11318 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11319 data fields, make them private and add "m_" prefixes.
11320 (lnp_state_machine::lnp_state_machine): New ctor.
11321 (record_line, check_line_address, handle_set_discriminator)
11322 (handle_set_address, handle_advance_pc, handle_special_opcode)
11323 (handle_advance_line, handle_set_file, handle_negate_stmt)
11324 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11325 (end_sequence, advance_line): New methods.
11326 (m_gdbarch, m_record_lines_p): New fields.
11327 (lnp_reader_state): Delete.
11328 (dwarf_record_line): Rename to ...
11329 (lnp_state_machine::record_line): ... adjust.
11330 (init_lnp_state_machine): Delete.
11331 (lnp_state_machine::lnp_state_machine): New.
11332 (check_line_address): Rename to ...
11333 (lnp_state_machine::check_line_address): This.
11334 (dwarf_decode_lines_1): Remove reference to "reader_state".
11335 Adjust lnp_state_machine having a non-default ctor. Use bool.
11336 State machine internal state manipulation moved to
11337 lnp_state_machine methods.
11338
9c541725
PA
113392017-04-04 Pedro Alves <palves@redhat.com>
11340
11341 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11342 unittests/offset-type-selftests.c.
11343 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11344 * common/offset-type.h: New file.
11345 * common/preprocessor.h: New file.
11346 * common/traits.h: New file.
11347 * common/valid-expr.h: New file.
11348 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11349 sect_offset and cu_offset strong typedefs throughout.
11350 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11351 typedefs throughout.
11352 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11353 sect_offset and cu_offset strong typedefs throughout.
11354 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11355 typedefs throughout.
11356 * gdbtypes.h: Include "common/offset-type.h".
11357 (cu_offset): Now an offset type (strong typedef) instead of a
11358 struct.
11359 (sect_offset): Likewise.
11360 (union call_site_parameter_u): Rename "param_offset" field to
11361 "param_cu_off".
11362 * unittests/offset-type-selftests.c: New file.
11363
ecfb656c
PA
113642017-04-04 Pedro Alves <palves@redhat.com>
11365
11366 * common/underlying.h: New file.
11367 * dwarf2read.c: Include "common/gdb_optional.h" and
11368 "common/underlying.h".
11369 (dir_index, file_name_index): New types.
11370 (file_entry): Use them.
11371 (file_entry::include): Use to_underlying.
11372 (line_header::add_file_name): Use dir_index.
11373 (read_formatted_entries): Use gdb::optional. Read form before
11374 writting to file_entry.
11375 (dwarf_decode_line_header): Use dir_index.
11376 (lnp_state_machine::current_file): Use to_underlying.
11377 (lnp_state_machine::file): Change type to file_name_index.
11378 (dwarf_record_line): Use to_underlying.
11379 (init_lnp_state_machine): Use file_name_index.
11380 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11381
d194f1fe
PA
113822017-04-04 Pedro Alves <palves@redhat.com>
11383
11384 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11385 operator bool, has_value and get methods.
11386
fff8551c
PA
113872017-04-04 Pedro Alves <palves@redhat.com>
11388
11389 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11390 fields.
11391 (line_header): Initialize all data fields. Change type of
11392 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11393 Change type of include_dirs to std::vector<const char *>. Remove
11394 num_include_dirs, include_dirs_size. Change type of file_names to
11395 std::vector<file_entry>. Remove num_file_names, file_names_size.
11396 (line_header::line_header): New.
11397 (line_header::add_include_dir, line_header::add_file_name): New
11398 methods.
11399 (line_header::include_dir_at): Remove NULL check.
11400 (line_header::file_name_at): Add const overload.
11401 (line_header_up): New unique_ptr typedef.
11402 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11403 std::vector. Remove free_line_header call.
11404 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11405 free_line_header call.
11406 (free_cu_line_header): Delete.
11407 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11408 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11409 Adjust to use std::vector.
11410 (free_line_header): Delete.
11411 (free_line_header_voidp): Use delete.
11412 (add_include_dir): Replace with ...
11413 (line_header::add_include_dir): ... this method. Use std::vector.
11414 (add_file_name): Replace with ...
11415 (line_header::add_file_name): ... this method. Use std::vector.
11416 (add_include_dir_stub): Delete.
11417 (read_formatted_entries): Remove memset.
11418 (dwarf_decode_line_header): Return a line_header_up instead of a
11419 raw pointer. Remove cleanup handling. Pass lambdas to
11420 read_formatted_entries. Adjust to use line_header methods.
11421 (dwarf_decode_lines_1): Adjust to use line_header methods.
11422 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11423 use std::vector.
11424
d62a8ae2
SM
114252017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11426
11427 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11428 instead of struct ptid.
11429
db3a1dc7
AH
114302017-05-04 Alan Hayward <alan.hayward@arm.com>
11431
11432 * frame.c (get_frame_register_bytes): Unwind using value.
11433 (put_frame_register_bytes): Likewise.
11434
b1b45502
IB
114352017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11436
11437 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11438 aggregate-like.
11439
ec13808e
JK
114402017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11441
11442 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11443
12316564
YQ
114442017-03-29 Yao Qi <yao.qi@linaro.org>
11445
11446 * gdbthread.h (struct thread_info): Declare constructor and
11447 destructor. Add some in-class member initializers.
11448 * thread.c (free_thread): Remove.
11449 (init_thread_list): Call delete instead of free_thread.
11450 (new_thread): Call thread_info constructor.
11451 (thread_info::thread_info): New function.
11452 (thread_info::~thread_info): New function.
11453 (delete_thread_1): Call delete instead of free_thread.
11454 (make_cleanup_restore_current_thread): Move tp and frame to
11455 inner block.
11456
fe5f7374
AK
114572017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11458
11459 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11460 (arc_skip_prologue): Likewise.
11461 (arc_make_frame_cache): Likewise.
11462 (arc_pv_get_operand): New function.
11463 (arc_is_in_prologue): Likewise.
11464 (arc_analyze_prologue): Likewise.
11465 (arc_print_frame_cache): Likewise.
11466 (MAX_PROLOGUE_LENGTH): New constant.
11467
eea78757
AK
114682017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11469
11470 * configure.tgt: Add arc-insn.o.
11471 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11472 (dump_arc_instruction_command): New function.
11473 (arc_fprintf_disasm): Likewise.
11474 (arc_disassemble_info): Likewise.
11475 (arc_insn_get_operand_value): Likewise.
11476 (arc_insn_get_operand_value_signed): Likewise.
11477 (arc_insn_get_memory_base_reg): Likewise.
11478 (arc_insn_get_memory_offset): Likewise.
11479 (arc_insn_get_branch_target): Likewise.
11480 (arc_insn_dump): Likewise.
11481 (arc_insn_get_linear_next_pc): Likewise.
11482 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11483 (arc_disassemble_info): Likewise.
11484 (arc_insn_get_branch_target): Likewise.
11485 (arc_insn_get_linear_next_pc): Likewise.
11486 * NEWS: Mention new "maint print arc arc-instruction".
11487
3be78afd
AK
114882017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11489
11490 * arc-tdep (maintenance_print_arc_list): New variable.
11491 (maintenance_print_arc_command): New function.
11492
296ec4fa
AK
114932017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11494
11495 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11496 Add "limm" and "reserved".
11497 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11498 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11499 * arc-tdep.h (arc_regnum): Likewise.
11500
f74f865e
MF
115012017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11502
11503 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11504 for THREADPTR register.
11505 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11506 register.
11507 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11508 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11509 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11510
0d0bf81a
MF
115112017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11512
11513 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11514 registers above gdbarch_num_regs (gdbarch) as privileged in
11515 call0 ABI.
11516
0ce4291e
MF
115172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11518
11519 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11520 for a single specified register or for all registers in
11521 a0_base..a0_base + C0_NREGS range.
11522 (supply_gregset_reg): Call regcache_raw_supply for a single
11523 specified register or for all registers in a0_base..a0_base +
11524 C0_NREGS range.
11525
c56054f9
MF
115262017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11527
11528 * arch/xtensa.h (C0_NREGS): Add definition.
11529 * xtensa-tdep.c (C0_NREGS): Remove definition.
11530
a4398628
MF
115312017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11532
11533 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11534 Drop xtensa_default_isa initialization.
11535 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11536
8c43009f
PA
115372017-03-27 Pedro Alves <palves@redhat.com>
11538
11539 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11540 (file_entry::include_dir): New method.
11541 (line_header::include_dir_at, line_header::file_name_at): New
11542 methods.
11543 (setup_type_unit_groups, setup_type_unit_groups)
11544 (psymtab_include_file_name): Simplify using the new methods.
11545 (lnp_state_machine) <the_line_header>: New field.
11546 <file>: Add comment.
11547 (lnp_state_machine::current_file): New method.
11548 (dwarf_record_line): Simplify using the new methods.
11549 (init_lnp_state_machine): Initialize the "the_line_header" field.
11550 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11551 Simplify using the new methods.
11552
a7e80b9e
PA
115532017-03-27 Pedro Alves <palves@redhat.com>
11554
11555 * cp-name-parser.y (make_empty): Delete.
11556 (demangler_special, nested_name, ptr_operator, array_indicator)
11557 (direct_declarator, declarator_1): Use fill_comp instead of
11558 make_empty.
11559
21047726
PA
115602017-03-27 Pedro Alves <palves@redhat.com>
11561
11562 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11563 to ATTRIBUTE_PRINTF.
11564 * solib-target.c (library_list_start_list): Print "string" not
11565 "version".
11566 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11567 gdb_xml_error call.
11568
d721ba37
PA
115692017-03-27 Pedro Alves <palves@redhat.com>
11570
11571 * dwarf2read.c (struct file_and_directory): New.
11572 (dwarf2_get_dwz_file): Adjust to use std::string.
11573 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11574 (find_file_and_directory): Adjust to return a file_and_directory
11575 object.
11576 (read_file_scope): Adjust to use file_and_directory. Remove
11577 make_cleanup/do_cleanups calls.
11578 (open_and_init_dwp_file): Adjust to use std::string. Remove
11579 make_cleanup/do_cleanups calls.
11580 * python/python.c (do_start_initialization): Adjust to ldirname
11581 returning a std::string.
11582 * utils.c (ldirname): Now returns a std::string.
11583 * utils.h (ldirname): Change return type to std::string.
11584 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11585 returning a std::string.
11586 * xml-tdesc.c (file_read_description_xml): Likewise.
11587
ed771251
AH
115882017-03-24 Alan Hayward <alan.hayward@arm.com>
11589
11590 * regcache.c (regcache_debug_print_register): New function.
11591 * regcache.h (regcache_debug_print_register): New declaration.
11592 * target.c (debug_print_register): Remove.
11593 (target_fetch_registers): Call regcache_debug_print_register.
11594 (target_store_registers): Likewise.
11595
568c1b9f
PB
115962017-03-24 Pádraig Brady <pbrady@fb.com>
11597
11598 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11599 reference beyond the 'lh->include_dirs' array before accessing to
11600 it.
11601 (psymtab_include_file_name): Likewise.
11602 (dwarf_decode_lines_1): Likewise.
11603 (dwarf_decode_lines): Likewise.
11604 (file_file_name): Likewise.
11605
3e00d44f
SM
116062017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11607
11608 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11609 inferior_ptid.
11610 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11611 ps_lsetfpregs): Likewise.
11612 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11613 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11614 ps_lsetfpregs): Likewise.
11615 * target.c (target_fetch_registers, target_store_registers):
11616 Remove asserts.
11617
077ae656
AH
116182017-03-23 Alan Hayward <alan.hayward@arm.com>
11619
11620 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11621
1e2b521d
YQ
116222017-03-23 Yao Qi <yao.qi@linaro.org>
11623
11624 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11625 (_initialize_aarch64_tdep): Register it.
11626 (aarch64_record_load_store): Handle PRFM instruction.
11627 (aarch64_process_record_test): New function.
11628
33877125
YQ
116292017-03-23 Yao Qi <yao.qi@linaro.org>
11630
11631 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11632 indentation.
11633
a0eef940
YQ
116342017-03-23 Yao Qi <yao.qi@linaro.org>
11635
11636 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11637
3f2a3564
PR
116382017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11639
11640 python/python.c (do_start_initialization): Fix memory leak.
11641
b67aeab0
SM
116422017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11643
11644 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11645 using get_ptrace_pid.
11646 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11647 inferior_ptid.
11648 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11649 inferior_ptid instead of pid.
11650
ffdbe864
YQ
116512017-03-22 Yao Qi <yao.qi@linaro.org>
11652
11653 * aarch64-tdep.c: Wrap locally used classes in anonymous
11654 namespace.
11655 * arm-tdep.c: Likewise.
11656 * linespec.c: Likewise.
11657 * ui-out.c: Likewise.
11658
9d736fbf
JG
116592017-03-22 Jonah Graham <jonah@kichwacoders.com>
11660
11661 PR gdb/19637
11662 * python/lib/gdb/printer/bound_registers.py: Import sys.
11663
3de88e9a
SM
116642017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11665
11666 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11667 windows_thread_info parameter and use it instead of
11668 current_thread.
11669 (windows_fetch_inferior_registers): Don't set current_thread,
11670 pass the thread to do_windows_fetch_inferior_registers. Use
11671 ptid from regcache instead of inferior_ptid.
11672 (do_windows_store_inferior_registers): Add windows_thread_info
11673 parameter and use it instead of current_thread.
11674 (windows_store_inferior_registers): Don't set current_thread,
11675 pass the thread to do_windows_store_inferior_registers. Use
11676 ptid from regcache instead of inferior_ptid.
11677
0e7b8f61
SM
116782017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11679
11680 * ser-mingw.c (ser_windows_raw): Remove reference to
11681 struct serial::current_timeout.
11682
5badf10a
IR
116832017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11684
11685 PR tdep/20928
11686 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11687 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11688 (sparc64_fsr_type): Fix %fsr decoding.
11689
cee59b3f
TW
116902017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11691
11692 * python/py-record-btrace.c (btpy_insn_data): Change return type
11693 for Python 2.
11694
639a9038
SM
116952017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11696
11697 * spu-linux-nat.c (spu_fetch_inferior_registers,
11698 spu_store_inferior_registers): Use ptid from regcache, set and
11699 restore inferior_ptid.
11700 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11701 Likewise.
11702
bcc0c096
SM
117032017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11704
11705 * i386-linux-nat.c (fetch_register, store_register,
11706 i386_linux_fetch_inferior_registers,
11707 i386_linux_store_inferior_registers): Use ptid from regcache.
11708 * ia64-linux-nat.c (ia64_linux_fetch_register,
11709 ia64_linux_store_register): Likewise.
11710 * inf-ptrace.c (inf_ptrace_fetch_register,
11711 inf_ptrace_store_register): Likewise.
11712 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11713 m32r_linux_store_inferior_registers): Likewise.
11714 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11715 m68kbsd_store_inferior_registers): Likewise.
11716 * m68k-linux-nat.c (fetch_register, store_register,
11717 m68k_linux_fetch_inferior_registers,
11718 m68k_linux_store_inferior_registers): Likewise.
11719 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11720 m88kbsd_store_inferior_registers): Likewise.
11721 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11722 mips_fbsd_store_inferior_registers): Likewise.
11723 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11724 mips64_linux_regsets_store_registers): Likewise.
11725 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11726 mipsnbsd_store_inferior_registers): Likewise.
11727 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11728 mips64obsd_store_inferior_registers): Likewise.
11729 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11730 Likewise.
11731 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11732 ppcfbsd_store_inferior_registers): Likewise.
11733 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11734 ppc_linux_store_inferior_registers): Likewise.
11735 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11736 ppcnbsd_store_inferior_registers): Likewise.
11737 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11738 ppcobsd_store_registers): Likewise.
11739 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11740 Likewise.
11741 * ravenscar-thread.c (ravenscar_fetch_registers,
11742 ravenscar_store_registers, ravenscar_prepare_to_store):
11743 Likewise.
11744 * record-btrace.c (record_btrace_fetch_registers,
11745 record_btrace_store_registers, record_btrace_prepare_to_store):
11746 Likewise.
11747 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11748 Lookup inferior using ptid from regcache, instead of
11749 current_inferior.
11750 * remote.c (remote_fetch_registers, remote_store_registers): Use
11751 ptid from regcache.
11752 * rs6000-nat.c (fetch_register, store_register): Likewise.
11753 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11754 s390_linux_store_inferior_registers): Likewise.
11755 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11756 shnbsd_store_inferior_registers): Likewise.
11757 * sol-thread.c (sol_thread_fetch_registers,
11758 sol_thread_store_registers): Likewise.
11759 * sparc-nat.c (sparc_fetch_inferior_registers,
11760 sparc_store_inferior_registers): Likewise.
11761 * tilegx-linux-nat.c (fetch_inferior_registers,
11762 store_inferior_registers): Likewise.
11763 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11764 vaxbsd_store_inferior_registers): Likewise.
11765 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11766 store_xtregs): Likewise.
11767
c0f55cc6
AV
117682017-03-20 Artemiy Volkov <artemiyv@acm.org>
11769
11770 PR gdb/14441
11771 * NEWS: Mention support for rvalue references in GDB and python.
11772 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11773 supports both lvalue and rvalue references.
11774
15c0a2a9
AV
117752017-03-20 Artemiy Volkov <artemiyv@acm.org>
11776
11777 PR gdb/14441
11778 * gdbtypes.c (rank_one_type): Implement overloading
11779 resolution rules regarding rvalue references.
11780
aa006118
AV
117812017-03-20 Artemiy Volkov <artemiyv@acm.org>
11782
11783 PR gdb/14441
11784 * aarch64-tdep.c (aarch64_type_align)
11785 (aarch64_extract_return_value, aarch64_store_return_value): Change
11786 lvalue reference type checks to general reference type checks.
11787 * amd64-tdep.c (amd64_classify): Likewise.
11788 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11789 Likewise.
11790 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11791 (arm_store_return_value): Likewise.
11792 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11793 * c-typeprint.c (c_print_type): Likewise.
11794 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11795 (cplus_number_of_children, cplus_describe_child): Likewise.
11796 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11797 * completer.c (expression_completer): Likewise.
11798 * cp-support.c (make_symbol_overload_list_adl_namespace):
11799 Likewise.
11800 * darwin-nat-info.c (info_mach_region_command): Likewise.
11801 * dwarf2loc.c (entry_data_value_coerce_ref)
11802 (value_of_dwarf_reg_entry): Likewise.
11803 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11804 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11805 Likewise.
11806 * findvar.c (extract_typed_address, store_typed_address):
11807 Likewise.
11808 * gdbtypes.c (rank_one_type): Likewise.
11809 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11810 * infcall.c (value_arg_coerce): Likewise.
11811 * language.c (pointer_type): Likewise.
11812 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11813 Likewise.
11814 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11815 * mn10300-tdep.c (mn10300_type_align): Likewise.
11816 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11817 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11818 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11819 Likewise.
11820 * printcmd.c (print_formatted, x_command): Likewise.
11821 * python/py-type.c (typy_get_composite, typy_template_argument):
11822 Likewise.
11823 * python/py-value.c (valpy_referenced_value)
11824 (valpy_get_dynamic_type, value_has_field): Likewise.
11825 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11826 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11827 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11828 * spu-tdep.c (spu_scalar_value_p): Likewise.
11829 * symtab.c (lookup_symbol_aux): Likewise.
11830 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11831 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11832 Likewise.
11833 * valops.c (value_cast_pointers, value_cast)
11834 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11835 (value_struct_elt, value_struct_elt_bitpos)
11836 (value_find_oload_method_list, find_overload_match)
11837 (value_rtti_indirect_type): Likewise.
11838 * valprint.c (val_print_scalar_type_p, generic_val_print):
11839 Likewise.
11840 * value.c (value_actual_type, value_as_address, unpack_long)
11841 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11842 (coerce_ref): Likewise.
11843 * varobj.c (varobj_get_value_type): Likewise.
11844
3fcf899d
AV
118452017-03-20 Artemiy Volkov <artemiyv@acm.org>
11846
11847 PR gdb/14441
11848 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11849 table of constants.
11850 * python/lib/gdb/command/explore.py: Support exploring values
11851 of rvalue reference types.
11852 * python/lib/gdb/types.py: Implement get_basic_type() for
11853 rvalue reference types.
11854 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11855 constant.
11856 * python/py-value.c (valpy_getitem): Add an rvalue reference
11857 check.
11858 (valpy_reference_value): Add new parameter "refcode".
11859 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11860 New wrappers for valpy_reference_value().
11861 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11862 (gdbpy_invoke_xmethod): Likewise.
11863
4297a3f0
AV
118642017-03-20 Artemiy Volkov <artemiyv@acm.org>
11865
11866 PR gdb/14441
11867 * dwarf2read.c (process_die, read_type_die_1): Handle the
11868 DW_TAG_rvalue_reference_type DIE.
11869 (read_tag_reference_type): Add new parameter "refcode".
11870
e1cb3213
AV
118712017-03-20 Artemiy Volkov <artemiyv@acm.org>
11872
11873 PR gdb/14441
11874 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11875 (c_type_print_modifier, c_type_print_varspec_suffix)
11876 (c_type_print_base): Support printing rvalue reference types.
11877 * c-valprint.c (c_val_print, c_value_print): Support printing
11878 rvalue reference values.
11879
e4347c89
AV
118802017-03-20 Artemiy Volkov <artemiyv@acm.org>
11881
11882 PR gdb/14441
11883 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11884 typename.
11885 * cp-support.c (replace_typedefs): Handle
11886 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11887 * python/py-type.c (typy_lookup_type): Likewise.
11888
53cc15f5
AV
118892017-03-20 Artemiy Volkov <artemiyv@acm.org>
11890
11891 PR gdb/14441
11892 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11893 * parse.c (insert_type): Change assert statement.
11894 (follow_types): Handle rvalue reference types.
11895 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11896 constant.
11897
a65cfae5
AV
118982017-03-20 Artemiy Volkov <artemiyv@acm.org>
11899
11900 PR gdb/14441
11901 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11902 value_ref() interface.
11903 * c-valprint.c (c_value_print): Likewise.
11904 * infcall.c (value_arg_coerce): Likewise.
11905 * python/py-value.c (valpy_reference_value): Likewise.
11906 * valops.c (value_cast, value_reinterpret_cast)
11907 (value_dynamic_cast, typecmp): Likewise.
11908 (value_ref): Parameterize by kind of return value reference type.
11909 * value.h (value_ref): Add new parameter "refcode".
11910
3b224330
AV
119112017-03-20 Artemiy Volkov <artemiyv@acm.org>
11912
11913 PR gdb/14441
11914 * dwarf2read.c (read_tag_reference_type): Use
11915 lookup_lvalue_reference_type() instead of lookup_reference_type().
11916 * eval.c (evaluate_subexp_standard): Likewise.
11917 * f-exp.y: Likewise.
11918 * gdbtypes.c (make_reference_type, lookup_reference_type):
11919 Generalize with rvalue reference types.
11920 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11921 convenience wrappers for lookup_reference_type().
11922 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11923 reference kind parameter.
11924 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11925 wrappers for lookup_reference_type().
11926 * guile/scm-type.c (gdbscm_type_reference): Use
11927 lookup_lvalue_reference_type() instead of lookup_reference_type().
11928 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11929 * parse.c (follow_types): Likewise.
11930 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11931 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11932 Likewise.
11933 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11934 (gdbpy_invoke_xmethod): Likewise.
11935 * stabsread.c: Provide extra argument to make_reference_type()
11936 call.
11937 * valops.c (value_ref, value_rtti_indirect_type): Use
11938 lookup_lvalue_reference_type() instead of lookup_reference_type().
11939
f9aeb8d4
AV
119402017-03-20 Artemiy Volkov <artemiyv@acm.org>
11941
11942 PR gdb/14441
11943 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11944 (TYPE_IS_REFERENCE): New macro.
11945 (struct type): Add rvalue_reference_type field.
11946 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11947
51457a05
MAL
119482017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11949
11950 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11951 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11952 New function definition.
11953 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11954 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11955 New function declaration.
11956 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11957 * mi/mi-interp.h: New file.
11958 * solib.c (info_sharedlibrary_command): Replace for loop with
11959 ALL_SO_LIBS macro
11960 * solib.h (update_solib_list): New function declaration.
11961 (so_list_head): Move macro.
11962 * solist.h (ALL_SO_LIBS): New macro.
11963
e696b3ad
MAL
119642017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11965
11966 * infcmd.c (post_create_inferior): Remove unused argument in
11967 call to solib_add.
11968 * remote.c (remote_start_remote): Likewise.
11969 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11970 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11971 (enable_break): Likewise.
11972 * solib.c (update_solib_list): Remove unused target argument
11973 and its documentation.
11974 (solib_add): Remove unused target argument. Remove unused
11975 argument in call to update_solib_list.
11976 (info_sharedlibrary_command): Remove unused argument in call
11977 to update_solib_list.
11978 (sharedlibrary_command): Remove unused argument in call to
11979 solib_add.
11980 (handle_solib_event): Likewise.
11981 (reload_shared_libraries): Likewise.
11982 * solib.h (solib_add): Remove unused target argument.
11983
dcb84eda
AA
119842017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
11985
11986 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
11987 (s390_displaced_step_fixup): Cover relative branches with the
11988 default fixup handling. This fixes lack of support for some
11989 relative branch instructions.
11990
d9cb6cdc
SM
119912017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11992
11993 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
11994 ptid from regcache.
11995
1afaf9f4
SM
119962017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
11997
11998 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
11999 i386_darwin_store_inferior_registers): Use ptid from regcache.
12000
aac12e24
SM
120012017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12002
12003 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12004 i386bsd_store_inferior_registers): Use ptid from regcache.
12005
bbe1eef1
SM
120062017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12007
12008 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12009 hppaobsd_store_registers): Use ptid from regcache.
12010
10799020
SM
120112017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12012
12013 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12014 hppanbsd_store_registers): Use ptid from regcache.
12015
00204cf7
SM
120162017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12017
12018 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12019 from regcache. Use get_ptrace_pid.
12020
11a33714
SM
120212017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12022
12023 * corelow.c (get_core_register_section): Use ptid from regcache,
12024 update doc.
12025
317cd492
SM
120262017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12027
12028 * bsd-uthread.c (bsd_uthread_fetch_registers,
12029 bsd_uthread_store_registers): Use ptid from regcache, set and
12030 restore inferior_ptid.
12031
9ac8a7c2
SM
120322017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12033
12034 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12035 fetch_fp_regs, store_register, store_regs, store_fp_register,
12036 store_fp_regs): Use ptid from regcache.
12037
4ac4bb6a
SM
120382017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12039
12040 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12041 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12042 store_vfp_regs): Use ptid from regcache.
12043
9bcbdca8
PA
120442017-03-17 Pedro Alves <palves@redhat.com>
12045
12046 PR remote/21188
12047 * ser-base.c (ser_base_wait_for): Add comment.
12048 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12049 version.
12050 * ser-unix.c (hardwire_raw): Remove reference to
12051 scb->current_timeout.
12052 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12053 (hardwire_ops): Install ser_base_readchar instead of
12054 hardwire_readchar.
12055 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12056 Remove fields.
12057
7503099f
JG
120582017-03-17 Jonah Graham <jonah@kichwacoders.com>
12059
12060 PR gdb/19637
12061 * python/lib/gdb/printer/bound_registers.py: Add support for
12062 Python 3.
12063
7942e96e
AA
120642017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12065
12066 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12067 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12068 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12069 byte_offset to subobj_byte_offset. Fix the handling of
12070 DWARF_VALUE_STACK on big-endian targets when coming via an
12071 implicit pointer.
12072 (dwarf2_evaluate_loc_desc): Adjust call to
12073 dwarf2_evaluate_loc_desc_full.
12074 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12075 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12076
ba14f379
YQ
120772017-03-16 Yao Qi <yao.qi@linaro.org>
12078
12079 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12080 and REVSH instructions.
12081
b121eeb9
YQ
120822017-03-16 Yao Qi <yao.qi@linaro.org>
12083
12084 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12085 (arm_record_test): Declare.
12086 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12087 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12088 align with the manual.
12089 (thumb_record_misc): Adjust the code order to align with the
12090 manual.
12091 (thumb2_record_decode_insn_handler): Fix instruction matching.
12092 (instruction_reader_thumb): New class.
12093 (arm_record_test): New function.
12094
728a7913
YQ
120952017-03-16 Yao Qi <yao.qi@linaro.org>
12096
12097 * arm-tdep.c (abstract_memory_reader): New class.
12098 (instruction_reader): New class.
12099 (extract_arm_insn): Add argument 'reader'. Callers updated.
12100 (decode_insn): Likewise.
12101
34b43320
DE
121022017-03-16 Doug Evans <dje@google.com>
12103
a7c0469f
DE
12104 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12105 member. Change type of TYPE member to SCM. All uses updated.
12106 (lsscm_make_lazy_string_smob): Add assert.
12107 (lsscm_make_lazy_string): Flag bad length values.
12108 (lsscm_elt_type): New function.
12109 (gdbscm_lazy_string_to_value): Rewrite to use
12110 lsscm_safe_lazy_string_to_value.
12111 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12112 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12113 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12114 in incoming type.
12115 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12116 * guile/scm-type.c (tyscm_scm_to_type): New function.
12117
121182017-03-15 Doug Evans <dje@google.com>
12119
34b43320
DE
12120 PR python/17728, python/18439, python/18779
12121 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12122 member. Change type of TYPE member to PyObject *. All uses updated.
12123 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12124 (gdbpy_create_lazy_string_object): Flag bad length values.
12125 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12126 Handle typedefs in incoming type.
12127 (stpy_lazy_string_elt_type): New function.
12128 (gdbpy_extract_lazy_string): Call it.
12129 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12130 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12131 typedefs in incoming type.
12132
a3a5fecc
DE
121332017-03-16 Doug Evans <dje@google.com>
12134
12135 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12136 * guile/scm-type.c (tyscm_scm_to_type): New function.
12137
28f1c605
JW
121382017-03-16 Jiong Wang <jiong.wang@arm.com>
12139
12140 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12141 "ULONGEST" for "skip".
12142
87c336f6
AA
121432017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12144
12145 PR gdb/21220
12146 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12147 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12148 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12149 over ptrace peek/poke until end of buffer or error.
12150
cf81cf60
SM
121512017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12152
12153 * parse.c (length_of_subexp): Make static.
12154 * parser-defs.h (length_of_subexp): Remove.
12155
a379284a
AA
121562017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12157
12158 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12159 as well.
12160
8a6200ba
PA
121612017-03-14 Pedro Alves <palves@redhat.com>
12162
12163 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12164 (main): Use std::unique_ptr. Remove calls to
12165 cp_demangled_name_parse_free.
12166
f79ec206
SM
121672017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12168
12169 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12170 alphabsd_store_inferior_registers): Use regcache->ptid instead
12171 of inferior_ptid.
12172
edb5fb00
SM
121732017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12174
12175 * aix-thread.c (aix_thread_fetch_registers,
12176 aix_thread_store_registers): Use regcache->ptid instead of
12177 inferior_ptid.
12178
55119686
SM
121792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12180
12181 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12182 store_gregs_to_thread, fetch_fpregs_from_thread,
12183 store_fpregs_to_thread): Use regcache->ptid instead of
12184 inferior_ptid.
12185
6a06fbb7
SM
121862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12187
12188 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12189 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12190 instead of inferior_ptid.
12191
c6386875
SM
121922017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12193
12194 * target.c (target_fetch_registers, target_store_registers): Add
12195 assert.
12196
ddaaf0fb
SM
121972017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12198
12199 * regcache.h (regcache_get_ptid): New function.
12200 * regcache.c (regcache_get_ptid): New function.
12201
b9da89d1 122022017-03-13 Mark Wielaard <mark@klomp.org>
12203
12204 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12205
5f4d1085
KS
122062017-03-10 Keith Seitz <keiths@redhat.com>
12207
12208 PR c++/8218
12209 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12210
c65d6b55
PA
122112017-03-08 Pedro Alves <palves@redhat.com>
12212
12213 PR gdb/18360
12214 * infrun.c (start_step_over, do_target_resume, resume)
12215 (restart_threads): Assert we're not resuming a thread that is
12216 meant to be stopped.
12217 (infrun_thread_stop_requested_callback): Delete.
12218 (infrun_thread_stop_requested): If the thread is internally
12219 stopped, queue a pending stop event and clear the thread's
12220 inline-frame state.
12221 (handle_stop_requested): New function.
12222 (handle_syscall_event, handle_inferior_event_1): Use
12223 handle_stop_requested.
12224 (handle_stop_requested): New function.
12225 (handle_signal_stop): Set the thread's stop_signal here instead of
12226 at caller.
12227 (finish_step_over): Clear step over info unconditionally.
12228 (handle_signal_stop): If the user had interrupted the event
12229 thread, consider the stop a random signal.
12230 (handle_signal_stop) <signal arrived while stepping over
12231 breakpoint>: Don't restart threads here.
12232 (stop_waiting): Don't clear step-over info here.
12233
15c22686
PA
122342017-03-08 Pedro Alves <palves@redhat.com>
12235
12236 PR 21206
12237 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12238 goes to argument 2, not 1.
12239
6e5d74e7
PA
122402017-03-08 Pedro Alves <palves@redhat.com>
12241
12242 PR cli/21218
12243 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12244 display_gdb_prompt.
12245 (command_line_input): Add comment.
12246
9753a2f6
PA
122472017-03-08 Pedro Alves <palves@redhat.com>
12248
12249 PR tui/21216
12250 * tui/tui-file.c (tui_file::write): New.
12251 * tui/tui-file.h (tui_file): Override "write".
12252 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12253 factored out from ...
12254 (tui_puts): ... here.
12255 (tui_putc): Use them.
12256 (tui_write): New function.
12257 * tui/tui-io.h (tui_write): Declare.
12258
1672e0d9
SDJ
122592017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12260
12261 * Makefile.in (SFILES): Replace "environ.c" with
12262 "common/environ.c".
12263 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12264 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12265 to...
12266 * common/environ.c: ... here.
12267 * environ.h: Moved to...
12268 * common/environ.h: ... here.
12269
f7bb4e3a
PB
122702017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12271
12272 * gdbarch.sh (pstring_ptr): New static function.
12273 (gdbarch_disassembler_options): Use it.
12274 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12275 not valid_disassembler_option->name.
12276 * gdbarch.c: Regenerate.
12277
e45ced6c
PB
122782017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12279
12280 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12281
5f6fd321
PA
122822017-03-07 Pedro Alves <palves@redhat.com>
12283
12284 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12285
6dbb839a 122862017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
12287
12288 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12289 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12290 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 12291 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 12292
d274ecf4
SM
122932017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12294
12295 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12296
df97be55
SM
122972017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12298
12299 * remote.c (remote_add_target_side_commands): Use range-based
12300 for loop.
12301
7d45f3df
YQ
123022017-03-03 Yao Qi <yao.qi@linaro.org>
12303
12304 PR gdb/21165
12305 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12306 value is lazy.
12307 * valprint.c (common_val_print): Likewise.
12308
65b48a81
PB
123092017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12310
12311 * NEWS: Mention new set/show disassembler-options commands.
12312 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12313 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12314 (prospective_options): New static variable.
12315 (gdb_disassembler::gdb_disassembler): Initialize
12316 m_di.disassembler_options.
12317 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12318 (get_disassembler_options): New function.
12319 (set_disassembler_options): Likewise.
12320 (set_disassembler_options_sfunc): Likewise.
12321 (show_disassembler_options_sfunc): Likewise.
12322 (disassembler_options_completer): Likewise.
12323 (_initialize_disasm): Likewise.
12324 * disasm.h (get_disassembler_options): New prototype.
12325 (set_disassembler_options): Likewise.
12326 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12327 (gdbarch_verify_disassembler_options): Likewise.
12328 * gdbarch.c: Regenerate.
12329 * gdbarch.h: Likewise.
12330 * arm-tdep.c (num_disassembly_options): Delete.
12331 (set_disassembly_style): Likewise.
12332 (arm_disassembler_options): New static variable.
12333 (set_disassembly_style_sfunc): Convert short style name into long
12334 option name. Call set_disassembler_options.
12335 (show_disassembly_style_sfunc): New function.
12336 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12337 set_gdbarch_verify_disassembler_options.
12338 (_initialize_arm_tdep): Delete regnames variable and update callers.
12339 (arm_disassembler_options): Initialize.
12340 (disasm_options): New variable.
12341 (num_disassembly_options): Rename from this...
12342 (num_disassembly_styles): ...to this. Compute by scanning through
12343 disasm_options.
12344 (valid_disassembly_styles): Initialize using disasm_options.
12345 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12346 set_arm_regname_option.
12347 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12348 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12349 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12350 set_gdbarch_verify_disassembler_options.
12351 * s390-tdep.c (s390_disassembler_options): New static variable.
12352 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12353 set_gdbarch_verify_disassembler_options.
12354
d538e36d
SM
123552017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12356
12357 * remote.c (remote_add_target_side_condition): Remove "struct"
12358 keyword from range-based for loop.
12359
83621223
SM
123602017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12361
12362 * remote.c (remote_add_target_side_condition): Use range-based
12363 for loop. Update comment.
12364
2123df0e
YQ
123652017-02-27 Yao Qi <yao.qi@linaro.org>
12366
12367 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12368
8e368124
AH
123692017-02-26 Alan Hayward <alan.hayward@arm.com>
12370
12371 * regcache.c (regcache_raw_update): New function.
12372 (regcache_raw_read): Move code to regcache_raw_update.
12373 * regcache.h (regcache_raw_update): New declaration.
12374 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12375
a49dd8dd
JK
123762017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12377
12378 * dwarf2read.c (create_debug_type_hash_table): Initialize
12379 header.signature and header.type_offset_in_tu.
12380
34e4bae9
PA
123812017-02-24 Pedro Alves <palves@redhat.com>
12382
12383 * symtab.c (make_file_symbol_completion_list_1): Use
12384 add_symtab_completions.
12385
b0e4b369
AH
123862017-02-24 Alan Hayward <alan.hayward@arm.com>
12387
12388 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12389
975c21ab
AH
123902017-02-24 Alan Hayward <alan.hayward@arm.com>
12391
12392 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12393 I386_MAX_REGISTER_SIZE.
12394 (i386_pseudo_register_write): Likewise.
12395 (i386_process_record): Likewise.
12396 * i387-tdep.c (i387_supply_xsave): Likewise.
12397 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12398 (store_register): Likewise.
12399
14bc53a8
PA
124002017-02-23 Pedro Alves <palves@redhat.com>
12401
12402 * ada-lang.c: Include "common/function-view.h".
12403 (ada_iterate_over_symbols): Adjust to use function_view as
12404 callback type.
12405 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12406 (ada_make_symbol_completion_list): Use a lambda.
12407 (ada_exc_search_name_matches): Delete.
12408 (name_matches_regex): New.
12409 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12410 * compile/compile-c-support.c: Include "common/function-view.h".
12411 (print_one_macro): Change prototype to accept a ui_file pointer.
12412 (write_macro_definitions): Use a lambda.
12413 * dwarf2read.c: Include "common/function-view.h".
12414 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12415 (dw2_expand_symtabs_matching): Adjust to use function_view as
12416 callback type.
12417 * language.h: Include "common/function-view.h".
12418 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12419 function_view as callback type.
12420 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12421 * linespec.c: Include "common/function-view.h".
12422 (collect_info::add_symbol): New method.
12423 (struct symbol_and_data_callback, iterate_inline_only, struct
12424 symbol_matcher_data, iterate_name_matcher): Delete.
12425 (iterate_over_all_matching_symtabs): Adjust to use function_view
12426 as callback type and lambdas.
12427 (iterate_over_file_blocks): Adjust to use function_view as
12428 callback type.
12429 (decode_compound_collector): Now a class with private fields.
12430 (decode_compound_collector::release_symbols): New method.
12431 (collect_one_symbol): Rename to...
12432 (decode_compound_collector::operator()): ... this and adjust.
12433 (lookup_prefix_sym): decode_compound_collector construction bits
12434 move to decode_compound_collector ctor. Pass the
12435 decode_compound_collector object directly as callback. Remove
12436 cleanups and use decode_compound_collector::release_symbols
12437 instead.
12438 (symtab_collector): Now a class with private fields.
12439 (symtab_collector::release_symtabs): New method.
12440 (add_symtabs_to_list): Rename to...
12441 (symtab_collector::operator()): ... this and adjust.
12442 (collect_symtabs_from_filename): symtab_collector construction
12443 bits move to symtab_collector ctor. Pass the symtab_collector
12444 object directly as callback. Remove cleanups and use
12445 symtab_collector::release_symtabs instead.
12446 (collect_symbols): Delete.
12447 (add_matching_symbols_to_info): Use lambdas.
12448 * macrocmd.c (print_macro_callback): Delete.
12449 (info_macro_command): Use a lambda.
12450 (info_macros_command): Pass print_macro_definition as callable
12451 directly.
12452 (print_one_macro): Remove 'ignore' parameter.
12453 (macro_list_command): Adjust.
12454 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12455 (macro_for_each_data::user_data): Delete field.
12456 (foreach_macro): Adjust to call the function_view.
12457 (macro_for_each): Adjust to use function_view as callback type.
12458 (foreach_macro_in_scope): Adjust to call the function_view.
12459 (macro_for_each_in_scope): Adjust to use function_view as callback
12460 type.
12461 * macrotab.h: Include "common/function-view.h".
12462 (macro_callback_fn): Declare a prototype instead of a pointer.
12463 Remove "user_data" parameter.
12464 (macro_for_each, macro_for_each_in_scope): Adjust to use
12465 function_view as callback type.
12466 * psymtab.c (partial_map_expand_apply)
12467 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12468 Adjust to use function_view as callback type and to return bool.
12469 (psym_expand_symtabs_matching): Adjust to use function_view as
12470 callback types.
12471 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12472 to use function_view as callback type and to return bool.
12473 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12474 callback types.
12475 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12476 as callback types.
12477 * symfile.h: Include "common/function-view.h".
12478 (expand_symtabs_file_matcher_ftype)
12479 (expand_symtabs_symbol_matcher_ftype)
12480 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12481 return bool.
12482 (quick_symbol_functions::map_symtabs_matching_filename)
12483 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12484 function_view as callback type and return bool.
12485 (expand_symtabs_matching): Adjust to use function_view as callback
12486 type.
12487 (maintenance_expand_name_matcher)
12488 (maintenance_expand_file_matcher): Delete.
12489 (maintenance_expand_symtabs): Use lambdas.
12490 * symtab.c (iterate_over_some_symtabs): Adjust to use
12491 function_view as callback types and return bool.
12492 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12493 of a cleanup.
12494 (lookup_symtab_callback): Delete.
12495 (lookup_symtab): Use a lambda.
12496 (iterate_over_symbols): Adjust to use function_view as callback
12497 type.
12498 (struct search_symbols_data, search_symbols_file_matches)
12499 (search_symbols_name_matches): Delete.
12500 (search_symbols): Use a pair of lambdas.
12501 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12502 (symtab_expansion_callback): Delete.
12503 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12504 * symtab.h: Include "common/function-view.h".
12505 (iterate_over_some_symtabs): Adjust to use function_view as
12506 callback type and return bool.
12507 (iterate_over_symtabs): Adjust to use function_view as callback
12508 type.
12509 (symbol_found_callback_ftype): Remove 'data' parameter and return
12510 bool.
12511 (iterate_over_symbols): Adjust to use function_view as callback
12512 type.
12513
07e253aa
PA
125142017-02-23 Pedro Alves <palves@redhat.com>
12515
12516 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12517 (%.o) <unittests/%.c>: New pattern.
12518 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12519 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12520 * common/function-view.h: New file.
12521 * unittests/function-view-selftests.c: New file.
12522 * configure: Regenerate.
12523
8eaf5320
SM
125242017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12525
12526 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12527 inferior_ptid.
12528 * go32-nat.c (go32_thread_alive): Likewise.
12529
38768751
YQ
125302017-02-23 Yao Qi <yao.qi@linaro.org>
12531
12532 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12533 delete.
12534
0a8beaba
YQ
125352017-02-23 Yao Qi <yao.qi@linaro.org>
12536
12537 * varobj.c (varobj_clear_saved_item): Use delete instead of
12538 xfree.
12539 (update_dynamic_varobj_children): Likewise.
12540
58fdfd2c
JK
125412017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12542
12543 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12544
1b90b139
SM
125452017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12546
12547 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12548 m_enum_value to 0 in default constructor.
12549
2039d74e
EBM
125502017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12551
12552 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12553 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12554 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12555 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12556 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12557 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12558 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12559 IS_STORE_CONDITIONAL_INSN.
12560
7814882a
JK
125612017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12562
12563 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12564
0ae60b63
JK
125652017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12566
12567 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12568
0224619f
JK
125692017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12570
12571 * dwarf2read.c (skip_one_die, read_attribute_value)
12572 (dwarf2_const_value_attr, dump_die_shallow)
12573 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12574 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12575
0af92d60
JK
125762017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12577
12578 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12579 (dwarf_parse_macro_header): Accept DWARF version 5.
12580 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12581
216f72a1
JK
125822017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12583
12584 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12585 DW_AT_GNU_*.
12586 * common/common-exceptions.h (enum errors): Likewise.
12587 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12588 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12589 (dwarf_expr_context::execute_stack_op): Likewise.
12590 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12591 Likewise.
12592 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12593 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12594 (show_entry_values_debug, call_site_to_target_addr)
12595 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12596 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12597 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12598 (value_of_dwarf_block_entry, indirect_pieced_value)
12599 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12600 (disassemble_dwarf_expression): Likewise.
12601 * dwarf2read.c (process_die, inherit_abstract_dies)
12602 (read_call_site_scope): Likewise.
12603 * gdbtypes.h (struct func_type, struct call_site_parameter)
12604 (struct call_site): Likewise.
12605 * stack.c (read_frame_arg): Likewise.
12606 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12607
43988095
JK
126082017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12609
12610 * defs.h (read_unsigned_leb128): New declaration.
12611 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12612 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12613 (dwarf2_find_location_expression): Call also
12614 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12615 * dwarf2loc.h (dwarf2_version): New declaration.
12616 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12617 rnglists.
12618 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12619 .debug_rnglists.
12620 (struct dwop_section_names): Add loclists_dwo.
12621 (dwop_section_names): Add .debug_loclists.dwo.
12622 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12623 (struct dwarf2_per_cu_data): Add dwarf_version.
12624 (struct dwo_sections): Add loclists.
12625 (struct attr_abbrev): Add implicit_const.
12626 (read_indirect_line_string): New declaration.
12627 (read_unsigned_leb128): Delete declaration.
12628 (rcuh_kind): New definition.
12629 (read_and_check_comp_unit_head): Change parameter
12630 is_debug_types_section to section_kind.
12631 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12632 (read_comp_unit_head): Change parameter abfd to section, add parameter
12633 section_kind. Handle DWARF-5.
12634 (error_check_comp_unit_head): Accept also DWARF version 5.
12635 (read_and_check_comp_unit_head): Change parameter
12636 is_debug_types_section to section_kind.
12637 (read_and_check_type_unit_head): Delete function.
12638 (read_abbrev_offset): Handle DWARF-5.
12639 (create_debug_type_hash_table): Add parameter section_kind. Process
12640 only DW_UT_type. Use signature and type_offset_in_tu from struct
12641 comp_unit_head.
12642 (create_debug_types_hash_table): Update create_debug_type_hash_table
12643 caller.
12644 (create_all_type_units): Call create_debug_type_hash_table.
12645 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12646 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12647 caller.
12648 (skip_one_die): Handle DW_FORM_implicit_const.
12649 (dwarf2_rnglists_process): New function.
12650 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12651 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12652 (read_attribute_value): Handle DW_FORM_implicit_const,
12653 DW_FORM_line_strp.
12654 (read_attribute): Handle DW_FORM_implicit_const.
12655 (read_indirect_string_at_offset_from): New function from
12656 read_indirect_string_at_offset.
12657 (read_indirect_string_at_offset): Call
12658 read_indirect_string_at_offset_from.
12659 (read_indirect_line_string_at_offset): New function.
12660 (read_indirect_string): New function comment.
12661 (read_indirect_line_string): New function.
12662 (read_unsigned_leb128): Make it global.
12663 (dwarf2_string_attr): Handle DWARF-5.
12664 (add_include_dir_stub, read_formatted_entries): New functions.
12665 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12666 Handle DWARF-5.
12667 (per_cu_header_read_in): Update read_comp_unit_head caller.
12668 (dwarf2_version): New function.
12669 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12670 rnglists.
12671 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12672 fields.
12673
22d2f3ab
JK
126742017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12675
12676 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12677
5f46c5a5
JK
126782017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12679
12680 * dwarf2read.c (dwarf2_ranges_process): New function from
12681 dwarf2_ranges_read.
12682 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12683 dwarf2_ranges_process.
12684
78d4d2c5
JK
126852017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12686
12687 * dwarf2read.c (create_debug_type_hash_table): New function from
12688 create_debug_types_hash_table.
12689 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12690 (create_all_type_units, open_and_init_dwo_file): Update
12691 create_debug_types_hash_table callers.
12692
1b076f25
SDJ
126932017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12694
12695 PR gdb/16188
12696 * fork-child.c (trace_start_error): Fix thinko. va_end should
12697 refer to 'ap', not 'args'.
12698
0db8980c
SDJ
126992017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12700 Pedro Alves <palves@redhat.com>
12701
12702 PR gdb/16188
12703 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12704 calls succeeded.
12705 * fork-child.c (trace_start_error): New function.
12706 (trace_start_error_with_name): Likewise.
12707 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12708 * inf-ptrace.c (inf_ptrace_me): Likewise.
12709 * inferior.h (trace_start_error): New prototype.
12710 (trace_start_error_with_name): Likewise.
12711
99e8a4f9
SDJ
127122017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12713
12714 PR gdb/21164
12715 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12716 NULL before using it.
12717 * symmisc.c (maintenance_print_symbols): Likewise.
12718 (maintenance_print_msymbols): Likewise.
12719
4e746bb6
TW
127202017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12721
12722 * NEWS: Add record Python bindings entry.
12723
127242017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12725
12726 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12727 py-record-full.o.
12728 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12729 * python/py-record-btrace.c, python/py-record-btrace.h,
12730 python/py-record-full.c, python/py-record-full.h: New file.
12731 * python/py-record.c: Add include for py-record-btrace.h and
12732 py-record-full.h.
12733 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12734 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12735 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12736 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12737 New definition.
12738 (gdbpy_initialize_btrace): New export.
12739 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12740
127412017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12742
12743 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12744 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12745 * python/py-record.c: New file.
12746 * python/python-internal.h (gdbpy_start_recording,
12747 gdbpy_current_recording, gdpy_stop_recording,
12748 gdbpy_initialize_record): New export.
12749 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12750 (python_GdbMethods): Add gdbpy_start_recording,
12751 gdbpy_current_recording and gdbpy_stop_recording.
12752
127532017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12754
12755 * record-btrace.c (record_btrace_record_method): New function.
12756 (init_record_btrace_ops): Initialize to_record_method.
12757 * record-full.c (record_full_record_method): New function.
12758 (init_record_full_ops, init_record_full_core_ops): Add
12759 record_full_record_method.
12760 * record.h (enum record_method): New enum.
12761 * target-debug.h (target_debug_print_enum_record_method: New define.
12762 * target-delegates.c: Regenerate.
12763 * target.c (target_record_method): New function.
12764 * target.h: Include record.h.
12765 (struct target_ops) <to_record_method>: New field.
12766 (target_record_method): New export.
12767
127682017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12769
12770 * record.h (record_start, record_stop): New export.
12771 * record.c (record_start, record_stop): New function.
12772
127732017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12774
12775 * btrace.c (btrace_fetch): Copy function call segments pointer
12776 into a vector.
12777 (btrace_clear): Clear the vector.
12778 (btrace_find_insn_by_number): Use binary search to find the correct
12779 function call segment.
12780 * btrace.h (brace_fun_p): New typedef.
12781 (struct btrace_thread_info) <functions>: New field.
12782
127832017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12784
12785 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12786 * btrace.c (btrace_decode_error): ... here. New function.
12787 * btrace.h (btrace_decode_error): New export.
12788
127892017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12790
12791 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12792 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12793 btrace_find_insn_by_number): Remove special case for gaps.
12794 * btrace.h (btrace_insn_get_error): New export.
12795 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12796 * record-btrace.c (btrace_insn_history): Print number for gaps.
12797 (record_btrace_info, record_btrace_goto): Handle gaps.
12798
3f77c769
TT
127992017-02-14 Tom Tromey <tom@tromey.com>
12800
12801 PR python/13598:
12802 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12803 event.
12804 * python/py-evts.c (gdbpy_initialize_py_events): Add
12805 before_prompt registry.
12806 * python/py-events.h (events_object) <before_prompt>: New field.
12807
4c2c7ac6
MM
128082017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12809
12810 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12811
5cf30ebf
LM
128122017-02-13 Luis Machado <lgustavo@codesourcery.com>
12813
12814 * symfile (_initialize_symfile): Add usage text to the load command's
12815 help text.
12816
26a06916
SM
128172017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12818
12819 * utils.c (defaulted_query): Don't query on secondary UIs.
12820
0b145e37
TT
128212017-02-10 Tom Tromey <tom@tromey.com>
12822
12823 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12824
2d8365c4
TT
128252017-02-10 Tom Tromey <tom@tromey.com>
12826
12827 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12828 "cleanup" local.
12829 * python/py-type.c (typy_legacy_template_argument): Remove
12830 unnecessary "cleanup" local.
12831
2bb8f231
TT
128322017-02-10 Tom Tromey <tom@tromey.com>
12833
12834 * python/python.c (do_start_initialization): New function, from
12835 _initialize_python.
12836 (_initialize_python): Call do_start_initialization.
12837 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12838 goto.
12839
1bdfaf42
TT
128402017-02-10 Tom Tromey <tom@tromey.com>
12841
12842 * python/py-prettyprint.c (pretty_print_one_value): Use
12843 gdbpy_ref.
12844
88b6faea
TT
128452017-02-10 Tom Tromey <tom@tromey.com>
12846
12847 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12848 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12849 gdbpy_ref.
12850 * python/py-type.c (field_new): Use gdbpy_ref.
12851 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12852 gdbpy_ref.
12853 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12854 (py_free_pspace): Likewise.
12855 (pspace_to_pspace_object): Likewise.
12856 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12857 (py_free_objfile): Likewise.
12858 (objfile_to_objfile_object): Likewise.
12859 * python/py-inferior.c (delete_thread_object): Use
12860 gdbpy_ref.
12861 (infpy_read_memory): Likewise.
12862 (py_free_inferior): Likewise.
12863 * python/py-evtregistry.c (create_eventregistry_object): Use
12864 gdbpy_ref.
12865 * python/py-event.c (create_event_object): Use gdbpy_ref.
12866
7780f186
TT
128672017-02-10 Tom Tromey <tom@tromey.com>
12868
12869 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12870 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12871 used.
12872 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12873 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12874 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12875 python/py-framefilter.c, python/py-function.c,
12876 python/py-inferior.c, python/py-infevents.c,
12877 python/py-linetable.c, python/py-newobjfileevent.c,
12878 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12879 python/py-signalevent.c, python/py-stopevent.c,
12880 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12881 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12882 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12883 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12884
d4b0bb18
TT
128852017-02-10 Tom Tromey <tom@tromey.com>
12886
12887 * ui-out.h (ui_out_emit_type): New class.
12888 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12889 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12890 and ui_out_emit_tuple.
12891 (enumerate_locals): Likewise.
12892 (py_mi_print_variables, py_print_locals, py_print_args): Use
12893 ui_out_emit_list.
12894 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12895 ui_out_emit_list.
12896 * common/gdb_optional.h: New file.
12897
f67f945c
MG
128982017-02-10 Martin Galvan <martingalvan@sourceware.org>
12899
12900 * MAINTAINERS (Write After Approval): Update my e-mail address.
12901
18da0c51
MG
129022017-02-10 Martin Galvan <martingalvan@sourceware.org>
12903
12904 PR gdb/21122
12905 * breakpoint.c (_initialize_breakpoint): Update the help description
12906 of the 'commands' command to indicate that it takes a list argument.
12907
62c14536
SM
129082017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12909
12910 * interps.c (current_interp_set_logging): Remove "return".
12911
ff6fa247
GB
129122017-02-09 Gary Benson <gbenson@redhat.com>
12913
12914 * symtab.c (add_symtab_completions): Prevent NULL pointer
12915 dereference.
12916
a474bd8e
PA
129172017-02-08 Pedro Alves <palves@redhat.com>
12918
12919 * interps.c (interp::interp): Remove reference to quiet_p.
12920 (interp_set): Make static. Remove dead "Switching to" output
12921 code.
12922 (interp_quiet_p, interp_set_quiet): Delete.
12923 (interpreter_exec_cmd): Don't set the interpreter quiet.
12924 * interps.h (interp_quiet_p): Make static.
12925 (class interp) <quiet_p>: Remove field
12926
3d7b173c
JG
129272017-02-08 Jerome Guitton <guitton@adacore.com>
12928
604c4576
JG
12929 * cli/cli-decode.c (find_command_name_length): Make it extern.
12930 * cli/cli-decode.h (find_command_name_length): Declare.
12931 * cli/cli-script.c (command_name_equals, line_first_arg):
12932 New functions.
12933 (process_next_line): Use cli-decode to parse command names.
12934 (build_command_line): Make args a constant pointer.
12935
129362017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 12937
3d7b173c
JG
12938 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12939 Remove case-insensitive search.
12940
1291063d
JM
129412017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12942
12943 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12944 at the end of the line. Avoids an ARI warning.
12945
20b477a7
LM
129462017-02-06 Luis Machado <lgustavo@codesourcery.com>
12947
12948 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12949 rdseed instructions.
12950 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12951
3f7b46f2
IR
129522017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12953
12954 PR tdep/20936
12955 Provide and use sparc32 and sparc64 target description XML files.
12956 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12957 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12958 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12959 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12960 * features/sparc/sparc32-solaris.xml: New file.
12961 * features/sparc/sparc64-solaris.xml: New file.
12962 * features/sparc/sparc32-solaris.c: Generated.
12963 * features/sparc/sparc64-solaris.c: Generated.
12964 * sparc-tdep.h: Account for differences in target descriptions.
12965 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12966 (sparc32_register_type): Use target provided registers.
12967 (validate_tdesc_registers): New function.
12968 (sparc32_gdbarch_init): Use tdesc_has_registers.
12969 Set pseudoregister functions.
12970 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12971 (sparc64_register_type): Use target provided registers.
12972 (sparc64_init_abi): Set pseudoregister functions.
12973
f0fd41c1
TT
129742017-02-03 Tom Tromey <tom@tromey.com>
12975
12976 PR rust/21097:
12977 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
12978 with a single member.
12979
d6f9b0fb
PA
129802017-02-03 Pedro Alves <palves@redhat.com>
12981
12982 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
12983 (cli_interp_base::~cli_interp_base): New.
12984 (cli_interp): New struct.
12985 (as_cli_interp): Cast the interp itself to cli_interp.
12986 (cli_interpreter_pre_command_loop): Rename to ...
12987 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
12988 parameter.
12989 (cli_interpreter_init): Rename to ...
12990 (cli_interp::init): ... this. Remove 'self' parameter. Use
12991 boolean. Make extern.
12992 (cli_interpreter_resume): Rename to ...
12993 (cli_interp::resume): ... this. Remove 'data' parameter. Make
12994 extern.
12995 (cli_interpreter_suspend): Rename to ...
12996 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
12997 extern.
12998 (cli_interpreter_exec): Rename to ...
12999 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13000 extern.
13001 (cli_interpreter_supports_command_editing): Rename to ...
13002 (cli_interp_base::supports_command_editing): ... this. Remove
13003 'interp' parameter. Make extern.
13004 (cli_ui_out): Rename to ...
13005 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13006 Make extern.
13007 (cli_set_logging): Rename to ...
13008 (cli_interp_base::set_logging): ... this. Remove 'interp'
13009 parameter. Make extern.
13010 (cli_interp_procs): Delete.
13011 (cli_interp_factory): Adjust to use "new".
13012 * cli/cli-interp.h: Include "interps.h".
13013 (struct cli_interp_base): New struct.
13014 * interps.c (struct interp): Delete. Fields moved to interps.h.
13015 (interp_new): Delete.
13016 (interp::interp, interp::~interp): New.
13017 (interp_set): Use bool, and return void. Assume the interpreter
13018 has suspend, init and resume methods, and that the all return
13019 void.
13020 (set_top_level_interpreter): interp_set returns void.
13021 (interp_ui_out): Adapt.
13022 (current_interp_set_logging): Adapt.
13023 (interp_data): Delete.
13024 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13025 (interp_exec): Adapt.
13026 (top_level_interpreter_data): Delete.
13027 * interps.h (interp_init_ftype, interp_resume_ftype)
13028 (interp_suspend_ftype, interp_exec_ftype)
13029 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13030 (class interp): New.
13031 (interp_new): Delete.
13032 (interp_set): Now returns void. Use bool.
13033 (interp_data, top_level_interpreter_data): Delete.
13034 * mi/mi-common.h: Include interps.h.
13035 (class mi_interp): Inherit from interp. Define a ctor. Declare
13036 init, resume, suspect, exec, interp_ui_out, set_logging and
13037 pre_command_loop methods.
13038 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13039 (mi_interpreter_init): Rename to ...
13040 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13041 bool, return void and make extern. Adjust.
13042 (mi_interpreter_resume): ... Rename to ...
13043 (mi_interp::resume): ... this. Remove the 'data' parameter,
13044 return void and make extern. Adjust.
13045 (mi_interpreter_suspend): ... Rename to ...
13046 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13047 return void and make extern. Adjust.
13048 (mi_interpreter_exec): ... Rename to ...
13049 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13050 extern. Adjust.
13051 (mi_interpreter_pre_command_loop): ... Rename to ...
13052 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13053 parameter and make extern.
13054 (mi_on_normal_stop_1): Adjust.
13055 (mi_ui_out): Rename to ...
13056 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13057 parameter and make extern. Adjust.
13058 (mi_set_logging): Rename to ...
13059 (mi_interp::set_logging): ... this. Remove the 'interp'
13060 parameter and make extern. Adjust.
13061 (mi_interp_procs): Delete.
13062 (mi_interp_factory): Adjust to use 'new'.
13063 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13064 (mi_print_exception, mi_execute_command, mi_load_progress):
13065 Adjust.
13066 * tui/tui-interp.c (tui_interp): New class.
13067 (as_tui_interp): Return a tui_interp pointer.
13068 (tui_on_normal_stop, tui_on_signal_received)
13069 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13070 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13071 to use interp::interp_ui_out.
13072 (tui_init): Rename to ...
13073 (tui_interp::init): ... this. Remove the 'self' parameter, use
13074 bool, return void and make extern. Adjust.
13075 (tui_resume): Rename to ...
13076 (tui_interp::resume): ... this. Remove the 'data' parameter,
13077 return void and make extern. Adjust.
13078 (tui_suspend): Rename to ...
13079 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13080 return void and make extern. Adjust.
13081 (tui_ui_out): Rename to ...
13082 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13083 parameter, and make extern. Adjust.
13084 (tui_exec): Rename to ...
13085 (tui_interp::exec): ... this. Remove the 'data' parameter and
13086 make extern.
13087 (tui_interp_procs): Delete.
13088 (tui_interp_factory): Use "new".
13089
65c40c95
TT
130902017-02-02 Tom Tromey <tom@tromey.com>
13091
13092 * rust-exp.y (ends_raw_string, space_then_number)
13093 (rust_identifier_start_p): Return bool.
13094 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13095 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13096 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13097 (rust_chartype_p): Return bool.
13098 (val_print_struct, rust_print_struct_def, rust_print_type):
13099 Update.
13100 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13101 Return bool.
13102
b50f188d
TT
131032017-02-02 Tom Tromey <tom@tromey.com>
13104
13105 * rust-lang.c: Reindent.
13106
03c85b11
TT
131072017-02-02 Tom Tromey <tom@tromey.com>
13108
13109 * rust-lang.h (rust_crate_for_block): Update.
13110 * rust-lang.c (rust_crate_for_block): Return std::string.
13111 (rust_get_disr_info): Use std:;string, not
13112 gdb::unique_xmalloc_ptr.
13113 * rust-exp.y (crate_name): Update.
13114
9b6da501
PA
131152017-02-02 Pedro Alves <palves@redhat.com>
13116
13117 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13118 field out of gdb_disassembler_test and make it static.
13119
ec4cb20b
PA
131202017-02-02 Pedro Alves <palves@redhat.com>
13121
13122 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13123 mi1_interp and mi_interp fields.
13124
5be5dbf0
PA
131252017-02-02 Pedro Alves <palves@redhat.com>
13126
616268b6
PA
13127 * cli/cli-interp.c (struct saved_output_files, saved_output):
13128 Moved from cli/cli-logging.c.
13129 (cli_set_logging): New function.
13130 (cli_interp_procs): Install cli_set_logging.
13131 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13132 Declare.
13133 * cli/cli-logging.c (struct saved_output_files, saved_output):
13134 Moved to cli/cli-interp.c.
13135 (pop_output_files): Don't save outputs here.
13136 (make_logging_output): New function.
13137 (handle_redirections): Don't build tee nor save previous outputs
13138 here.
13139 * interps.c (current_interp_set_logging): Change prototype.
13140 Assume there's always a set_logging_proc method installed.
13141 * interps.h (interp_set_logging_ftype): Change prototype.
13142 (current_interp_set_logging): Change prototype and adjust comment.
13143 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13144 use make_logging_output.
13145 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
131462017-02-02 Pedro Alves <palves@redhat.com>
13147
5be5dbf0
PA
13148 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13149 from ...
13150 (set_logging_overwrite): ... here.
13151 (logging_no_redirect_file): Delete.
13152 (set_logging_redirect): Don't handle redirection on the fly.
13153 Instead warn that "logging off" / "logging on" is necessary.
13154 (pop_output_files): Delete references to logging_no_redirect_file.
13155 (show_logging_command): Always speak in terms of what will happen
13156 once logging is reenabled.
13157
c99cc448
PA
131582017-02-02 Pedro Alves <palves@redhat.com>
13159
13160 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13161
8b172ce7
PA
131622017-02-02 Pedro Alves <palves@redhat.com>
13163
13164 * disasm.c (gdb_pretty_print_insn): Rename to ...
13165 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13166 Remove gdbarch parameter. Adapt to clear the object's buffers
13167 instead of allocating new buffers, and to print using the object's
13168 gdb_disassembler instead of calling gdb_print_insn.
13169 (dump_insns): Use gdb_pretty_print_disassembler.
13170 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13171 (gdb_pretty_print_disassembler): New class.
13172 * record-btrace.c (btrace_insn_history): Use
13173 gdb_pretty_print_disassembler.
13174
d7e74731
PA
131752017-02-02 Pedro Alves <palves@redhat.com>
13176
13177 * ada-lang.c (type_as_string): Use string_file.
13178 * ada-valprint.c (ada_print_floating): Use string_file.
13179 * ada-varobj.c (ada_varobj_scalar_image)
13180 (ada_varobj_get_value_image): Use string_file.
13181 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13182 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13183 * breakpoint.c (update_inserted_breakpoint_locations)
13184 (insert_breakpoint_locations, reattach_breakpoints)
13185 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13186 (print_it_watchpoint): Use string_file.
13187 (save_breakpoints): Use stdio_file.
13188 * c-exp.y (oper): Use string_file.
13189 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13190 tee_file.
13191 (pop_output_files): Use delete.
13192 (handle_redirections): Use stdio_file and tee_file.
13193 * cli/cli-setshow.c (do_show_command): Use string_file.
13194 * compile/compile-c-support.c (c_compute_program): Use
13195 string_file.
13196 * compile/compile-c-symbols.c (generate_vla_size): Take a
13197 'string_file &' instead of a 'ui_file *'.
13198 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13199 of a 'ui_file *'. Use string_file.
13200 (generate_c_for_variable_locations): Take a 'string_file &'
13201 instead of a 'ui_file *'.
13202 * compile/compile-internal.h (generate_c_for_for_one_variable):
13203 Take a 'string_file &' instead of a 'ui_file *'.
13204 * compile/compile-loc2c.c (push, pushf, unary, binary)
13205 (print_label, pushf_register_address, pushf_register)
13206 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13207 'ui_file *'. Adjust.
13208 * compile/compile.c (compile_to_object): Use string_file.
13209 * compile/compile.h (compile_dwarf_expr_to_c)
13210 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13211 'ui_file *'.
13212 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13213 (replace_typedefs_qualified_name): Use string_file and
13214 obstack_copy0.
13215 * disasm.c (gdb_pretty_print_insn): Use string_file.
13216 (gdb_disassembly): Adjust reference the null_stream global.
13217 (do_ui_file_delete): Delete.
13218 (gdb_insn_length): Use null_stream.
13219 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13220 * dwarf2loc.c (dwarf2_compile_property_to_c)
13221 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13222 'string_file &' instead of a 'ui_file *'.
13223 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13224 * dwarf2read.c (do_ui_file_peek_last): Delete.
13225 (dwarf2_compute_name): Use string_file.
13226 * event-top.c (gdb_setup_readline): Use stdio_file.
13227 * gdbarch.sh (verify_gdbarch): Use string_file.
13228 * gdbtypes.c (safe_parse_type): Use null_stream.
13229 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13230 string_file.
13231 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13232 'string_file *' instead of a 'ui_file *'.
13233 (gdbscm_arch_disassemble): Use string_file.
13234 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13235 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13236 inherits from ui_file.
13237 (ioscm_file_port_delete, ioscm_file_port_rewind)
13238 (ioscm_file_port_put): Delete.
13239 (ioscm_file_port_write): Rename to ...
13240 (ioscm_file_port::write): ... this. Remove file_port_magic
13241 checks.
13242 (ioscm_file_port_new): Delete.
13243 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13244 ui_file_up.
13245 * guile/scm-type.c (tyscm_type_name): Use string_file.
13246 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13247 Use string_file.
13248 * infcmd.c (print_return_value_1): Use string_file.
13249 * infrun.c (print_target_wait_results): Use string_file.
13250 * language.c (add_language): Use string_file.
13251 * location.c (explicit_to_string_internal): Use string_file.
13252 * main.c (captured_main_1): Use null_file.
13253 * maint.c (maintenance_print_architecture): Use stdio_file.
13254 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13255 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13256 event_channel>: Change type to mi_console_file pointer.
13257 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13258 (mi_console_file_delete): Delete.
13259 (struct mi_console_file): Delete.
13260 (mi_console_file_magic): Delete.
13261 (mi_console_file_new): Delete.
13262 (mi_console_file::mi_console_file): New.
13263 (mi_console_file_delete): Delete.
13264 (mi_console_file_fputs): Delete.
13265 (mi_console_file::write): New.
13266 (mi_console_raw_packet): Delete.
13267 (mi_console_file::flush): New.
13268 (mi_console_file_flush): Delete.
13269 (mi_console_set_raw): Rename to ...
13270 (mi_console_file::set_raw): ... this.
13271 * mi/mi-console.h (class mi_console_file): New class.
13272 (mi_console_file_new, mi_console_set_raw): Delete.
13273 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13274 (mi_set_logging): Use delete and tee_file. Adjust.
13275 * mi/mi-main.c (output_register): Use string_file.
13276 (mi_cmd_data_evaluate_expression): Use string_file.
13277 (mi_cmd_data_read_memory): Use string_file.
13278 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13279 * mi/mi-out.c (mi_ui_out::main_stream): New.
13280 (mi_ui_out::rewind): Use main_stream and
13281 string_file.
13282 (mi_ui_out::put): Use main_stream and string_file.
13283 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13284 Allocate a 'string_file' instead.
13285 (mi_out_new): Don't allocate a mem_fileopen stream here.
13286 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13287 (mi_ui_out::main_stream): Declare method.
13288 * printcmd.c (eval_command): Use string_file.
13289 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13290 * python/py-arch.c (archpy_disassemble): Use string_file.
13291 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13292 * python/py-frame.c (frapy_str): Use string_file.
13293 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13294 Use string_file.
13295 * python/py-type.c (typy_str): Use string_file.
13296 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13297 * python/py-value.c (valpy_str): Use string_file.
13298 * record-btrace.c (btrace_insn_history): Use string_file.
13299 * regcache.c (regcache_print): Use stdio_file.
13300 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13301 * remote.c (escape_buffer): Use string_file.
13302 * rust-lang.c (rust_get_disr_info): Use string_file.
13303 * serial.c (serial_open_ops_1): Use stdio_file.
13304 (do_serial_close): Use delete.
13305 * stack.c (print_frame_arg): Use string_file.
13306 (print_frame_args): Remove local mem_fileopen stream, not used.
13307 (print_frame): Use string_file.
13308 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13309 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13310 Take a 'string_file *' instead of a 'ui_file *'.
13311 * top.c (new_ui): Use stdio_file and stderr_file.
13312 (free_ui): Use delete.
13313 (execute_command_to_string): Use string_file.
13314 (quit_confirm): Use string_file.
13315 * tracepoint.c (collection_list::append_exp): Use string_file.
13316 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13317 * tui/tui-file.c: Don't include "ui-file.h".
13318 (enum streamtype, struct tui_stream): Delete.
13319 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13320 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13321 (tui_file::tui_file): New method.
13322 (tui_file_fputs): Delete.
13323 (tui_file_get_strbuf): Delete.
13324 (tui_file::puts): New method.
13325 (tui_file_adjust_strbuf): Delete.
13326 (tui_file_flush): Delete.
13327 (tui_file::flush): New method.
13328 * tui/tui-file.h: Tweak intro comment.
13329 Include ui-file.h.
13330 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13331 (tui_file_adjust_strbuf): Delete declarations.
13332 (class tui_file): New class.
13333 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13334 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13335 (tui_register_format): Use string_stream.
13336 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13337 (tui_get_function_from_frame): Use string_file.
13338 * typeprint.c (type_to_string): Use string_file.
13339 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13340 (null_stream): New global.
13341 (ui_file_delete): Delete.
13342 (ui_file::ui_file): New.
13343 (null_file_isatty): Delete.
13344 (ui_file::~ui_file): New.
13345 (null_file_rewind): Delete.
13346 (ui_file::printf): New.
13347 (null_file_put): Delete.
13348 (null_file_flush): Delete.
13349 (ui_file::putstr): New.
13350 (null_file_write): Delete.
13351 (ui_file::putstrn): New.
13352 (null_file_read): Delete.
13353 (ui_file::putc): New.
13354 (null_file_fputs): Delete.
13355 (null_file_write_async_safe): Delete.
13356 (ui_file::vprintf): New.
13357 (null_file_delete): Delete.
13358 (null_file::write): New.
13359 (null_file_fseek): Delete.
13360 (null_file::puts): New.
13361 (ui_file_data): Delete.
13362 (null_file::write_async_safe): New.
13363 (gdb_flush, ui_file_isatty): Adjust.
13364 (ui_file_put, ui_file_rewind): Delete.
13365 (ui_file_write): Adjust.
13366 (ui_file_write_for_put): Delete.
13367 (ui_file_write_async_safe, ui_file_read): Adjust.
13368 (ui_file_fseek): Delete.
13369 (fputs_unfiltered): Adjust.
13370 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13371 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13372 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13373 (set_ui_file_data): Delete.
13374 (string_file::~string_file, string_file::write)
13375 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13376 (do_ui_file_as_string, ui_file_as_string): Delete.
13377 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13378 (struct mem_file): Delete.
13379 (mem_file_new): Delete.
13380 (stdio_file::stdio_file): New.
13381 (mem_file_delete): Delete.
13382 (stdio_file::stdio_file): New.
13383 (mem_fileopen): Delete.
13384 (stdio_file::~stdio_file): New.
13385 (mem_file_rewind): Delete.
13386 (stdio_file::set_stream): New.
13387 (mem_file_put): Delete.
13388 (stdio_file::open): New.
13389 (mem_file_write): Delete.
13390 (stdio_file_magic, struct stdio_file): Delete.
13391 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13392 (stdio_file::flush): New.
13393 (stdio_file_read): Rename to ...
13394 (stdio_file::read): ... this. Adjust.
13395 (stdio_file_write): Rename to ...
13396 (stdio_file::write): ... this. Adjust.
13397 (stdio_file_write_async_safe): Rename to ...
13398 (stdio_file::write_async_safe) ... this. Adjust.
13399 (stdio_file_fputs): Rename to ...
13400 (stdio_file::puts) ... this. Adjust.
13401 (stdio_file_isatty): Delete.
13402 (stdio_file_fseek): Delete.
13403 (stdio_file::isatty): New.
13404 (stderr_file_write): Rename to ...
13405 (stderr_file::write) ... this. Adjust.
13406 (stderr_file_fputs): Rename to ...
13407 (stderr_file::puts) ... this. Adjust.
13408 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13409 (stderr_file::stderr_file): New.
13410 (tee_file_magic): Delete.
13411 (struct tee_file): Delete.
13412 (tee_file::tee_file): New.
13413 (tee_file_new): Delete.
13414 (tee_file::~tee_file): New.
13415 (tee_file_delete): Delete.
13416 (tee_file_flush): Rename to ...
13417 (tee_file::flush): ... this. Adjust.
13418 (tee_file_write): Rename to ...
13419 (tee_file::write): ... this. Adjust.
13420 (tee_file::write_async_safe): New.
13421 (tee_file_fputs): Rename to ...
13422 (tee_file::puts): ... this. Adjust.
13423 (tee_file_isatty): Rename to ...
13424 (tee_file::isatty): ... this. Adjust.
13425 * ui-file.h (struct obstack, struct ui_file): Don't
13426 forward-declare.
13427 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13428 (ui_file_write_ftype)
13429 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13430 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13431 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13432 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13433 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13434 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13435 (set_ui_file_fseek): Delete.
13436 (ui_file_data, ui_file_delete, ui_file_rewind)
13437 (struct ui_file): New.
13438 (ui_file_up): New.
13439 (class null_file): New.
13440 (null_stream): Declare.
13441 (ui_file_write_for_put, ui_file_put): Delete.
13442 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13443 Delete.
13444 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13445 (gdb_fopen, tee_file_new): Delete.
13446 (struct string_file): New.
13447 (struct stdio_file): New.
13448 (stdio_file_up): New.
13449 (struct stderr_file): New.
13450 (class tee_file): New.
13451 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13452 of a 'ui_file *'. Adjust.
13453 * ui-out.h (class ui_out) <field_stream>: Likewise.
13454 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13455 (null_stream): Delete.
13456 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13457 Adjust.
13458 * utils.h (struct ui_file): Delete forward declaration..
13459 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13460 (error_stream): Take a 'string_file &' instead of a
13461 'ui_file *'.
13462 * varobj.c (varobj_value_get_print_value): Use string_file.
13463 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13464 * gdbarch.c: Regenerate.
13465
187808b0
PA
134662017-02-02 Pedro Alves <palves@redhat.com>
13467
13468 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13469 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13470 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13471 Adjust to call gdb_print_insn instead of
13472 gdb_disassembler::print_insn.
13473 (dump_insns, do_mixed_source_and_assembly_deprecated)
13474 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13475 'gdbarch' parameter. Remove gdb_disassembler parameter.
13476 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13477 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13478 declaration.
13479 (gdb_pretty_print_insn): Re-add declaration.
13480 * record-btrace.c (btrace_insn_history): Don't allocate a
13481 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13482
7a8eb317
SM
134832017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13484
13485 * disasm.h (gdb_disassembly): Remove file_string parameter.
13486 * disasm.c (gdb_disassembly): Likewise.
13487 * cli/cli-cmds.c (print_disassembly): Adapt.
13488 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13489 * stack.c (do_gdb_disassembly): Likewise.
13490
7346ef59
AA
134912017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13492
13493 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13494 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13495 targets. And if the implicit value is longer than needed, extract
13496 the first bytes instead of the "least significant" ones.
13497
cd4007e4
MM
134982017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13499
13500 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13501 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13502 (btrace_fetch): Assert can_access_registers_ptid.
13503 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13504 validate_registers_access.
13505
cf77c34e
MM
135062017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13507
13508 * gdbthread.h (can_access_registers_ptid): New.
13509 * thread.c (can_access_registers_ptid): New.
13510
be85ce7d
PA
135112017-02-01 Pedro Alves <palves@redhat.com>
13512
13513 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13514
29b0b251
PA
135152017-01-31 Pedro Alves <palves@redhat.com>
13516
13517 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13518 Fix typos.
13519
289b5b24
PA
135202017-01-31 Pedro Alves <palves@redhat.com>
13521
13522 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13523 not used.
13524
b47413b4
PA
135252017-01-31 Pedro Alves <palves@redhat.com>
13526
13527 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13528
60adb36c
PA
135292017-01-31 Pedro Alves <palves@redhat.com>
13530
13531 * common/scoped_restore.h
13532 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13533 change the value's parameter type to T2.
13534 (make_scoped_restore): Likewise.
13535
2735833d
WT
135362017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13537 Richard Henderson <rth@redhat.com>
13538
13539 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13540 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13541 GS_BASE for older kernels.
13542 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13543 GS_BASE for older kernels.
13544 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13545 and GS_BASE to the offset table.
13546 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13547 system register group.
13548 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13549 for older kernels.
13550 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13551 amd64 ABI.
13552 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13553 AMD64_GSBASE_REGNUM.
13554 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13555 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13556 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13557 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13558 i386/64bit-segments.xml in those rules.
13559 * features/i386/64bit-segments.xml: New file.
13560 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13561 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13562 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13563 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13564 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13565 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13566 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13567 * features/i386/amd64-avx-linux.c: Regenerated.
13568 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13569 * features/i386/amd64-avx-mpx.c: Regenerated.
13570 * features/i386/amd64-avx512-linux.c: Regenerated.
13571 * features/i386/amd64-linux.c: Regenerated.
13572 * features/i386/amd64-mpx-linux.c: Regenerated.
13573 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13574 * features/i386/i386-avx-mpx.c: Regenerated.
13575 * features/i386/x32-avx-linux.c: Regenerated.
13576 * features/i386/x32-avx512-linux.c: Regenerated.
13577 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13578 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13579 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13580 * regformats/i386/amd64-linux.dat: Regenerated.
13581 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13582 * regformats/i386/x32-avx-linux.dat: Regenerated.
13583 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13584 * regformats/i386/x32-linux.dat: Regenerated.
13585
8884e97e
WT
135862017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13587
13588 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13589 Set to AMD64_NUM_REGS.
13590
7005d26a
WT
135912017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13592
13593 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13594 that checks validity of a register number.
13595
4bd2e1b2
KC
135962017-01-27 Kees Cook <keescook@google.com>
13597
13598 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13599 fetch_fpregs if target has fpa registers.
13600 (arm_linux_store_inferior_registers): Call store_fpregs if target
13601 has fpa registers.
13602
7cf1de6c
AA
136032017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13604
13605 * cris-tdep.c (cris_gdbarch_init): Remove check for
13606 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13607
874a1c8c
AT
136082017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13609
13610 * corelow.c (get_core_register_section): Check for regset
13611 existence before checking for REGSET_VARIABLE_SIZE.
13612
d8b49cf0
YQ
136132017-01-26 Yao Qi <yao.qi@linaro.org>
13614 Pedro Alves <palves@redhat.com>
13615
13616 PR gdb/20939
13617 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13618 call memory_error, save memaddr instead.
13619 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13620 negative, cal memory_error.
13621 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13622
658ca58c
YQ
136232017-01-26 Yao Qi <yao.qi@linaro.org>
13624
13625 * disasm-selftests.c (memory_error_test): New function.
13626 (_initialize_disasm_selftests): Register memory_error_test.
13627
79843d45
YQ
136282017-01-26 Yao Qi <yao.qi@linaro.org>
13629
13630 * Makefile.in (SFILES): Add disasm-selftests.c and
13631 selftest-arch.c.
13632 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13633 * disasm-selftests.c: New file.
13634 * selftest-arch.c: New file.
13635 * selftest-arch.h: New file.
13636
8cafda32
YQ
136372017-01-26 Yao Qi <yao.qi@linaro.org>
13638
13639 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13640 to bfd_arch_mep. Don't return 0 if section is not
13641 found. Call print_insn_mep.
13642
e47ad6c0
YQ
136432017-01-26 Pedro Alves <palves@redhat.com>
13644 Yao Qi <yao.qi@linaro.org>
13645
13646 * arm-tdep.c: Include "disasm.h".
13647 (gdb_print_insn_arm): Update code to get gdbarch.
13648 * disasm.c (dis_asm_read_memory): Change it to
13649 gdb_disassembler::dis_asm_read_memory.
13650 (dis_asm_memory_error): Likewise.
13651 (dis_asm_print_address): Likewise.
13652 (gdb_pretty_print_insn): Change it to
13653 gdb_disassembler::pretty_print_insn.
13654 (dump_insns): Add one argument gdb_disassemlber. All
13655 callers updated.
13656 (do_mixed_source_and_assembly_deprecated): Likewise.
13657 (do_mixed_source_and_assembly): Likewise.
13658 (do_assembly_only): Likewise.
13659 (gdb_disassembler::gdb_disassembler): New.
13660 (gdb_disassembler::print_insn): New.
13661 * disasm.h (class gdb_disassembler): New.
13662 (gdb_pretty_print_insn): Remove declaration.
13663 (gdb_disassemble_info): Likewise.
13664 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13665 (gdbscm_disasm_read_memory_worker): Update.
13666 (gdbscm_disasm_read_memory): Update.
13667 (gdbscm_disasm_memory_error): Remove.
13668 (gdbscm_disasm_print_address): Remove.
13669 (gdbscm_disassembler::gdbscm_disassembler): New.
13670 (gdbscm_print_insn_from_port): Update.
13671 * mips-tdep.c: Include disasm.h.
13672 (gdb_print_insn_mips): Update code to get gdbarch.
13673 * record-btrace.c (btrace_insn_history): Update.
13674 * spu-tdep.c: Include disasm.h.
13675 (struct spu_dis_asm_data): Remove.
13676 (struct spu_dis_asm_info): New.
13677 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13678 SPU id.
13679 (gdb_print_insn_spu): Cast disassemble_info to
13680 spu_dis_asm_info.
13681
80d75874
YQ
136822017-01-26 Yao Qi <yao.qi@linaro.org>
13683
13684 * disasm.c (do_ui_file_delete): Delete.
13685 (gdb_insn_length): Move code creating stream to ...
13686 * utils.c (null_stream): ... here. New function.
13687 * utils.h (null_stream): Declare.
13688
60685cd0
SM
136892017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13690
13691 * python/py-inferior.c (find_thread_object): Return directly
13692 from the loop. Remove "found" variable.
13693
eb1cdb62
JB
136942017-01-21 Joel Brobecker <brobecker@adacore.com>
13695
13696 GDB 7.12.1 released.
13697
b1ce6568
SM
136982017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13699
13700 * python/py-function.c (fnpy_call): Reorder declarations to have
13701 the gdbpy_enter object declared first.
13702 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13703
6f8b0407
SM
137042017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13705
fec93fb1 13706 PR python/21068
6f8b0407
SM
13707 * python/python-internal.h (PyMem_RawMalloc): Define for
13708 Python < 3.4.
13709 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13710 PyMem_RawMalloc instead of PyMem_Malloc.
13711
78cbbba8
LM
137122017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13713 Luis Machado <lgustavo@codesourcery.com>
13714
13715 * NEWS (New commands): Mention flash-erase.
13716 (New MI commands): Mention target-flash-erase.
13717 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13718 command.
13719 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13720 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13721 * target.c (flash_erase_command): New function.
13722 (initialize_targets): Add new flash-erase command.
13723 * target.h (flash_erase_command): New declaration.
13724
2132fe85
JB
137252017-01-20 Joel Brobecker <brobecker@adacore.com>
13726
13727 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13728 HAVE_SYS_PROCFS_H is defined.
13729
d1dff226
AH
137302017-01-18 Alan Hayward <alan.hayward@arm.com>
13731
13732 * remote.c (struct cached_reg): Change data into a pointer.
13733 * (stop_reply_dtr): Free data pointers before deleting vector.
13734 (process_stop_reply): Likewise.
13735 (remote_parse_stop_reply): Allocate space for data
13736
9890e433
AH
137372017-01-18 Alan Hayward <alan.hayward@arm.com>
13738
13739 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13740 MAX_REGISTER_SIZE.
13741 (amd64_pseudo_register_read_value): Likewise.
13742 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13743 (store_register_using_P): Likewise.
13744 * regcache.c (regcache_xfer_part): Likewise.
13745
7a36499a
IR
137462017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13747
13748 Split real and pseudo registers.
13749 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13750 (sparc32_pseudo_regnum): New enum.
13751 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13752 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13753 (SPARC32_CP0_REGISTERS): New macro.
13754 (sparc32_pseudo_register_name): New function.
13755 (sparc32_register_name): Use sparc32_pseudo_register_name.
13756 (sparc32_pseudo_register_type): New function.
13757 (sparc32_register_type): Use sparc32_pseudo_register_type.
13758 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13759 pseudo register numbers.
13760 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13761 (SPARC64_CP0_REGISTERS): New macro.
13762 (sparc64_pseudo_register_name): New function.
13763 (sparc64_register_name): Use sparc64_pseudo_register_name.
13764 (sparc64_pseudo_register_type): New function.
13765 (sparc64_register_type): Use sparc64_pseudo_register_type.
13766 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13767 pseudo register numbers.
13768 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13769 sparc64_store_arguments): Handle pseudo register numbers.
13770
6f8976bf
YQ
137712017-01-13 Yao Qi <yao.qi@linaro.org>
13772
13773 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13774 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13775 output.
13776 (getpkt_or_notif_sane_1): Likewise.
13777
e4241ace
YQ
137782017-01-13 Yao Qi <yao.qi@linaro.org>
13779
13780 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13781 of CC. Pass "-x c++-header" instead of "-x c".
13782
3015c064
SM
137832017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13784
13785 * remote.c (remote_can_async_p): Update comment.
13786
fde1b17d
SM
137872017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13788
13789 * linux-nat.c (linux_nat_can_async_p): Update comment.
13790
ca1ca08b
SM
137912017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13792
13793 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13794
4ad2da73
SM
137952017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13796
13797 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13798
c8b23b3f
TT
137992017-01-10 Tom Tromey <tom@tromey.com>
13800
13801 * python/py-type.c (typy_legacy_template_argument): Update.
13802 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13803 ~demangle_parse_info): Declare new members.
13804 (cp_demangled_name_to_comp): Return unique_ptr.
13805 (cp_demangled_name_parse_free)
13806 (make_cleanup_cp_demangled_name_parse_free)
13807 (cp_new_demangle_parse_info): Remove.
13808 * cp-support.c (do_demangled_name_parse_free_cleanup)
13809 (make_cleanup_cp_demangled_name_parse_free): Remove.
13810 (inspect_type, cp_canonicalize_string_full)
13811 (cp_canonicalize_string): Update.
13812 (mangled_name_to_comp): Change return type.
13813 (cp_class_name_from_physname, method_name_from_physname)
13814 (cp_func_name, cp_remove_params): Update.
13815 * cp-name-parser.y (demangle_parse_info): New constructor, from
13816 cp_new_demangle_parse_info.
13817 (~demangle_parse_info): New destructor, from
13818 cp_demangled_name_parse_free.
13819 (cp_merge_demangle_parse_infos): Update.
13820 (cp_demangled_name_to_comp): Change return type.
13821
1ac32117
TT
138222017-01-10 Tom Tromey <tom@tromey.com>
13823
13824 * top.c (prevent_dont_repeat): Change return type.
13825 * python/python.c (execute_gdb_command): Use std::string.
13826 Update.
13827 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13828 * command.h (prevent_dont_repeat): Change return type.
13829 * breakpoint.c (bpstat_do_actions_1): Update.
13830
0cf08227
TT
138312017-01-10 Tom Tromey <tom@tromey.com>
13832
13833 * value.h (scoped_value_mark::~scoped_value_mark): Call
13834 free_to_mark.
13835 (scoped_value_mark::free_to_mark): New method.
13836 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13837 scoped_value_mark.
13838
eb115069
TT
138392017-01-10 Tom Tromey <tom@tromey.com>
13840
13841 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13842 (valpy_reference_value, valpy_const_value, valpy_get_address)
13843 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13844 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13845 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13846 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13847 scoped_value_mark.
13848 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13849 * value.h (scoped_value_mark): New class.
13850
906768f9
TT
138512017-01-10 Tom Tromey <tom@tromey.com>
13852
13853 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13854 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13855 * psymtab.c (discard_psymtabs_upto): Remove.
13856 (make_cleanup_discard_psymtabs): Remove.
13857 (struct psymtab_state): Remove.
13858
bef155c3
TT
138592017-01-10 Tom Tromey <tom@tromey.com>
13860
13861 * record-full.c (record_full_save_cleanups): Remove.
13862 (record_full_save): Use gdb::unlinker.
13863 * gcore.c (do_bfd_delete_cleanup): Remove.
13864 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13865 cleanups.
13866 * dwarf2read.c (unlink_if_set): Remove.
13867 (write_psymtabs_to_index): Use gdb::unlinker.
13868 * common/gdb_unlinker.h: New file.
13869
192b62ce
TT
138702017-01-10 Tom Tromey <tom@tromey.com>
13871
13872 * windows-tdep.c (windows_xfer_shared_library): Update.
13873 * windows-nat.c (windows_make_so): Update.
13874 * utils.h (make_cleanup_bfd_unref): Remove.
13875 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13876 * symfile.h (symfile_bfd_open)
13877 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13878 * symfile.c (read_symbols, symbol_file_add)
13879 (separate_debug_file_exists): Update.
13880 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13881 (generic_load, reread_symbols): Update.
13882 * symfile-mem.c (symbol_file_add_from_memory): Update.
13883 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13884 (spu_symbol_file_add_from_memory): Update.
13885 * solist.h (struct target_so_ops) <bfd_open>: Return
13886 gdb_bfd_ref_ptr.
13887 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13888 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13889 gdb_bfd_ref_ptr.
13890 (solib_map_sections, reload_shared_libraries_1): Update.
13891 * solib-svr4.c (enable_break): Update.
13892 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13893 * solib-frv.c (enable_break2): Update.
13894 * solib-dsbt.c (enable_break): Update.
13895 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13896 gdb_bfd_ref_ptr.
13897 (darwin_solib_get_all_image_info_addr_at_init): Update.
13898 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13899 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13900 * record-full.c (record_full_save): Update.
13901 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13902 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13903 * minidebug.c (find_separate_debug_file_in_section): Return
13904 gdb_bfd_ref_ptr.
13905 * machoread.c (macho_add_oso_symfile): Change abfd to
13906 gdb_bfd_ref_ptr.
13907 (macho_symfile_read_all_oso): Update.
13908 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13909 (macho_symfile_read): Update.
13910 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13911 (jit_bfd_try_read_symtab): Update.
13912 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13913 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13914 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13915 gdb_bfd_ref_ptr.
13916 (gdb_bfd_ref_policy): New struct.
13917 (gdb_bfd_ref_ptr): New typedef.
13918 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13919 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13920 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13921 gdb_bfd_ref_ptr.
13922 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13923 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13924 (gcore_command): Update.
13925 * exec.c (exec_file_attach): Update.
13926 * elfread.c (elf_symfile_read): Update.
13927 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13928 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13929 (open_and_init_dwo_file): Update.
13930 (open_dwp_file): Return gdb_bfd_ref_ptr.
13931 (open_and_init_dwp_file): Update.
13932 * corelow.c (core_open): Update.
13933 * compile/compile-object-load.c (compile_object_load): Update.
13934 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13935 * coffread.c (coff_symfile_read): Update.
13936 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13937 gdb_bfd_ref_ptr. Rename.
13938 (dump_bfd_file, restore_command): Update.
13939 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13940 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13941 (find_separate_debug_file_by_buildid): Update.
13942
50315b21
TT
139432017-01-10 Tom Tromey <tom@tromey.com>
13944
13945 * common/gdb_ref_ptr.h: New file.
13946 * python/py-ref.h (struct gdbpy_ref_policy): New.
13947 (gdbpy_ref): Now a typedef.
13948
fc4007c9
TT
139492017-01-10 Tom Tromey <tom@tromey.com>
13950
13951 * utils.h (make_cleanup_htab_delete): Don't declare.
13952 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13953 Remove.
13954 * linespec.c (decode_compound_collector): Add constructor,
13955 destructor.
13956 (lookup_prefix_sym): Remove cleanup.
13957 (symtab_collector): Add constructor, destructor.
13958 (collect_symtabs_from_filename): Remove cleanup.
13959 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13960 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13961 Use htab_up.
13962 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13963 * dwarf2read.c (dw2_expand_symtabs_matching)
13964 (dw2_map_symbol_filenames, dwarf_decode_macros)
13965 (write_psymtabs_to_index): Use htab_up.
13966 * dwarf2loc.c (func_verify_no_selftailcall)
13967 (call_site_find_chain_1, func_verify_no_selftailcall)
13968 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13969 std::vector, gdb::unique_xmalloc_ptr.
13970 (call_sitep): Remove typedef.
13971 (dwarf2_locexpr_baton_eval): Remove unused variable.
13972
8dbcee67
TT
139732017-01-10 Tom Tromey <tom@tromey.com>
13974
13975 * python/python-internal.h (make_cleanup_py_decref)
13976 (make_cleanup_py_xdecref): Don't declare.
13977 * python/py-utils.c (py_decref, make_cleanup_py_decref)
13978 (py_xdecref, make_cleanup_py_xdecref): Remove.
13979
13df46cc
TT
139802017-01-10 Tom Tromey <tom@tromey.com>
13981
13982 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
13983 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
13984
06fc9bf7
TT
139852017-01-10 Tom Tromey <tom@tromey.com>
13986
13987 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
13988
830a4934
TT
139892017-01-10 Tom Tromey <tom@tromey.com>
13990
13991 * python/py-utils.c (unicode_to_encoded_string)
13992 (python_string_to_target_string)
13993 (python_string_to_target_python_string)
13994 (python_string_to_host_string, gdbpy_obj_to_string)
13995 (get_addr_from_python): Use gdbpy_ref.
13996
4586d543
TT
139972017-01-10 Tom Tromey <tom@tromey.com>
13998
13999 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14000 gdbpy_ref.
14001
59876f8f
TT
140022017-01-10 Tom Tromey <tom@tromey.com>
14003
14004 * python/python.c (eval_python_command, gdbpy_decode_line)
14005 (gdbpy_run_events, gdbpy_start_type_printers)
14006 (gdbpy_apply_type_printers): Use gdbpy_ref.
14007
97d83487
TT
140082017-01-10 Tom Tromey <tom@tromey.com>
14009
14010 * python/py-param.c (get_doc_string, compute_enum_values): Use
14011 gdbpy_ref.
14012
9205649a
TT
140132017-01-10 Tom Tromey <tom@tromey.com>
14014
14015 * python/py-inferior.c (find_thread_object, build_inferior_list):
14016 Use gdbpy_ref.
14017
74c49d45
TT
140182017-01-10 Tom Tromey <tom@tromey.com>
14019
14020 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14021
16361ffb
TT
140222017-01-10 Tom Tromey <tom@tromey.com>
14023
14024 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14025 gdbpy_ref.
14026
905f2cca
TT
140272017-01-10 Tom Tromey <tom@tromey.com>
14028
14029 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14030 extra incref.
14031 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14032 Use gdbpy_ref.
14033
64081434
TT
140342017-01-10 Tom Tromey <tom@tromey.com>
14035
14036 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14037 gdbpy_ref.
14038
59e9e831
TT
140392017-01-10 Tom Tromey <tom@tromey.com>
14040
14041 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14042 decref results of PyArg_ParseTupleAndKeywords.
14043
9de10f6d
TT
140442017-01-10 Tom Tromey <tom@tromey.com>
14045
14046 * python/python.c (python_run_simple_file): Use
14047 unique_xmalloc_ptr, gdbpy_ref.
14048
2bd5759d
TT
140492017-01-10 Tom Tromey <tom@tromey.com>
14050
14051 * python/py-prettyprint.c (print_stack_unless_memory_error)
14052 (print_string_repr, print_children): Use gdbpy_ref.
14053 (dummy_python_frame): New class.
14054 (dummy_python_frame::dummy_python_frame): Rename from
14055 push_dummy_python_frame.
14056 (py_restore_tstate): Remove.
14057
3b4e0e01
TT
140582017-01-10 Tom Tromey <tom@tromey.com>
14059
14060 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14061
17a22718
TT
140622017-01-10 Tom Tromey <tom@tromey.com>
14063
14064 * python/python.c (ensure_python_env, restore_python_env):
14065 Remove.
14066 * python/python-internal.h (ensure_python_env): Don't declare.
14067 * varobj.h (varobj_ensure_python_env): Don't declare.
14068 * varobj.c (varobj_ensure_python_env): Remove.
14069
68cdc557
TT
140702017-01-10 Tom Tromey <tom@tromey.com>
14071
14072 * varobj.c (varobj_value_get_print_value): Use
14073 gdbpy_enter_varobj.
14074
1eba6383
TT
140752017-01-10 Tom Tromey <tom@tromey.com>
14076
14077 * python/py-prettyprint.c (print_string_repr, print_children):
14078 Update.
14079 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14080 of "encoding".
14081 * varobj.c (varobj_value_get_print_value): Update.
14082 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14083
bde7b3e3
TT
140842017-01-10 Tom Tromey <tom@tromey.com>
14085
14086 * varobj.c (varobj_get_display_hint)
14087 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14088 (varobj_set_visualizer, free_variable): Use
14089 gdbpy_enter_varobj.
14090
a7785f8c
TT
140912017-01-10 Tom Tromey <tom@tromey.com>
14092
14093 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14094 (do_finish_initialization): New function. Use gdbpy_ref.
14095 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14096 do_finish_initialization.
14097
2865bfce
TT
140982017-01-10 Tom Tromey <tom@tromey.com>
14099
14100 * python/py-param.c (get_set_value, get_show_value): Use
14101 gdbpy_enter, gdbpy_ref.
14102
0e9dcc75
TT
141032017-01-10 Tom Tromey <tom@tromey.com>
14104
14105 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14106
12a5cedd
TT
141072017-01-10 Tom Tromey <tom@tromey.com>
14108
14109 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14110
788f2586
TT
141112017-01-10 Tom Tromey <tom@tromey.com>
14112
14113 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14114 Use gdbpy_enter_varobj.
14115
6cd67bea
TT
141162017-01-10 Tom Tromey <tom@tromey.com>
14117
14118 * varobj.c (gdbpy_enter_varobj): New constructor.
14119 * python/python-internal.h (gdbpy_enter_varobj): New class.
14120 * python/py-varobj.c (py_varobj_get_iterator): Use
14121 gdbpy_enter_varobj.
14122
14b122bf
TT
141232017-01-10 Tom Tromey <tom@tromey.com>
14124
14125 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14126 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14127 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14128 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14129 unique_xmalloc_ptr.
14130 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14131
bf1ca3b9
TT
141322017-01-10 Tom Tromey <tom@tromey.com>
14133
14134 * python/py-xmethods.c (invoke_match_method): Use
14135 gdbpy_ref.
14136
572a5524
TT
141372017-01-10 Tom Tromey <tom@tromey.com>
14138
14139 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14140 gdbpy_enter, gdbpy_ref.
14141
396a78b6
TT
141422017-01-10 Tom Tromey <tom@tromey.com>
14143
14144 * python/python.c (python_interactive_command): Use gdbpy_enter.
14145
a88b13c7
TT
141462017-01-10 Tom Tromey <tom@tromey.com>
14147
14148 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14149 gdbpy_ref.
14150
e9f0c363
TT
141512017-01-10 Tom Tromey <tom@tromey.com>
14152
14153 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14154 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14155
6349f452
TT
141562017-01-10 Tom Tromey <tom@tromey.com>
14157
14158 * utils.h (htab_deleter): New struct.
14159 (htab_up): New typedef.
14160 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14161 gdbpy_enter, gdbpy_ref, htab_up.
14162
c0171de6
TT
141632017-01-10 Tom Tromey <tom@tromey.com>
14164
14165 * python/py-unwind.c (pending_frame_invalidate): Remove.
14166 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14167
f18e226f
TT
141682017-01-10 Tom Tromey <tom@tromey.com>
14169
14170 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14171 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14172
c57af3f1
TT
141732017-01-10 Tom Tromey <tom@tromey.com>
14174
14175 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14176
60e600ec
TT
141772017-01-10 Tom Tromey <tom@tromey.com>
14178
14179 * python/python.c (gdbpy_eval_from_control_command)
14180 (gdbpy_source_script, gdbpy_run_events)
14181 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14182 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14183 gdbpy_enter.
14184
bf7da5b0
TT
141852017-01-10 Tom Tromey <tom@tromey.com>
14186
14187 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14188
2d38bced
TT
141892017-01-10 Tom Tromey <tom@tromey.com>
14190
14191 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14192
07bc7329
TT
141932017-01-10 Tom Tromey <tom@tromey.com>
14194
14195 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14196 (python_on_inferior_call_pre, python_on_inferior_call_post)
14197 (python_on_memory_change, python_on_register_change)
14198 (python_inferior_exit, python_new_objfile, add_thread_object)
14199 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14200
6e7c365e
TT
142012017-01-10 Tom Tromey <tom@tromey.com>
14202
14203 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14204 (bpfinishpy_handle_exit): Use gdbpy_enter.
14205
6ba0cd40
TT
142062017-01-10 Tom Tromey <tom@tromey.com>
14207
14208 * python/py-cmd.c (cmdpy_destroyer)
14209 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14210 gdbpy_enter.
14211
de2dc875
TT
142122017-01-10 Tom Tromey <tom@tromey.com>
14213
14214 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14215 gdbpy_enter.
14216 (gdbpy_breakpoint_has_cond): Likewise.
14217
4ecee2c4
TT
142182017-01-10 Tom Tromey <tom@tromey.com>
14219
14220 * python/python.c (gdbpy_enter): New constructor.
14221 (~gdbpy_enter): New destructor.
14222 (restore_python_env, ensure_python_env): Rewrite.
14223 * python/python-internal.h (gdbpy_enter): New class.
14224
37fce74f
TT
142252017-01-10 Tom Tromey <tom@tromey.com>
14226
14227 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14228
53a0cca3
TT
142292017-01-10 Tom Tromey <tom@tromey.com>
14230
14231 * python/py-value.c (value_has_field, get_field_flag)
14232 (get_field_type, valpy_getitem, convert_value_from_python): Use
14233 gdbpy_ref.
14234
ff3724f5
TT
142352017-01-10 Tom Tromey <tom@tromey.com>
14236
14237 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14238 gdbpy_ref.
14239
0700aea5
TT
142402017-01-10 Tom Tromey <tom@tromey.com>
14241
14242 * python/py-prettyprint.c (search_pp_list)
14243 (find_pretty_printer_from_objfiles)
14244 (find_pretty_printer_from_progspace)
14245 (find_pretty_printer_from_gdb, find_pretty_printer)
14246 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14247 gdbpy_ref.
14248
1bb44c9f
TT
142492017-01-10 Tom Tromey <tom@tromey.com>
14250
14251 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14252
87ce03fd
TT
142532017-01-10 Tom Tromey <tom@tromey.com>
14254
14255 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14256 (ltpy_get_all_source_lines): Use gdbpy_ref.
14257
ee0a3fb8
TT
142582017-01-10 Tom Tromey <tom@tromey.com>
14259
14260 * python/py-framefilter.c (extract_sym, extract_value)
14261 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14262 gdbpy_ref.
14263
bf2a52fa
TT
142642017-01-10 Tom Tromey <tom@tromey.com>
14265
14266 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14267
f59fe7f8
TT
142682017-01-10 Tom Tromey <tom@tromey.com>
14269
14270 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14271
80bd970a
TT
142722017-01-10 Tom Tromey <tom@tromey.com>
14273
14274 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14275 gdbpy_ref.
14276
d1b3de2e
TT
142772017-01-10 Tom Tromey <tom@tromey.com>
14278
14279 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14280
3bb43384
TT
142812017-01-10 Tom Tromey <tom@tromey.com>
14282
14283 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14284 (typy_range): Use gdbpy_ref.
14285
abf5651e
TT
142862017-01-10 Tom Tromey <tom@tromey.com>
14287
14288 * python/py-threadevent.c (create_thread_event_object): Use
14289 gdbpy_ref.
14290 * python/py-stopevent.c (create_stop_event_object): Simplify.
14291 (emit_stop_event): Use gdbpy_ref.
14292 * python/py-signalevent.c (create_signal_event_object): Use
14293 gdbpy_ref.
14294 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14295 (emit_new_objfile_event, create_clear_objfiles_event_object)
14296 (emit_clear_objfiles_event): Use gdbpy_ref.
14297 * python/py-infevents.c (create_inferior_call_event_object)
14298 (create_register_changed_event_object)
14299 (create_memory_changed_event_object, emit_inferior_call_event)
14300 (emit_memory_changed_event, emit_register_changed_event): Use
14301 gdbpy_ref.
14302 * python/py-exitedevent.c (create_exited_event_object)
14303 (emit_exited_event): Use gdbpy_ref.
14304 * python/py-event.h (evpy_emit_event): Remove
14305 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14306 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14307 * python/py-continueevent.c (emit_continue_event): Use
14308 gdbpy_ref.
14309 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14310 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14311 gdbpy_ref.
14312 * python/py-bpevent.c (create_breakpoint_event_object): Use
14313 gdbpy_ref.
14314
a68ff33e
TT
143152017-01-10 Tom Tromey <tom@tromey.com>
14316
14317 * python/py-ref.h: New file.
14318
7becfd03
SM
143192017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14320
14321 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14322 void.
14323 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14324 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14325 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14326 * ui-out.c (ui_out::redirect): Likewise.
14327 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14328 * cli/cli-logging.c (set_logging_redirect): Update call site of
14329 ui_out::redirect.
14330 (handle_redirections): Likewise.
14331 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14332 * top.c (execute_command_to_string): Likewise.
14333 * utils.c (do_ui_out_redirect_pop): Likewise.
14334
df294654
SM
143352017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14336
14337 * stack.c (_initialize_stack): Update "frame" command help message.
14338
f5e6296e
IB
143392017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14340
14341 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14342
0e2d6fa6
YQ
143432017-01-06 Yao Qi <yao.qi@linaro.org>
14344
14345 * x86-linux-nat.h: Include gdb_proc_service.h.
14346
44d6d3f9
YQ
143472017-01-06 Yao Qi <yao.qi@linaro.org>
14348
14349 * ser-base.h: Include serial.h.
14350
656731fe
YQ
143512017-01-06 Yao Qi <yao.qi@linaro.org>
14352
14353 * ppc-linux-tdep.h: Include ppc-tdep.h.
14354
1ca8f924
YQ
143552017-01-06 Yao Qi <yao.qi@linaro.org>
14356
14357 * nat/amd64-linux-siginfo.h: Include signal.h.
14358
bc3008c4
YQ
143592017-01-06 Yao Qi <yao.qi@linaro.org>
14360
14361 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14362
66c80d03
YQ
143632017-01-06 Yao Qi <yao.qi@linaro.org>
14364
14365 * mi/mi-parse.h: Include mi-cmds.h.
14366
051d2dda
YQ
143672017-01-06 Yao Qi <yao.qi@linaro.org>
14368
14369 * inf-loop.c: Don't include "target.h".
14370 * inf-loop.h: Include it here.
14371
8018d34f
YQ
143722017-01-06 Yao Qi <yao.qi@linaro.org>
14373
14374 * dfp.h: Include "dboulest.h" and "expression.h".
14375
c0b8369c
YQ
143762017-01-06 Yao Qi <yao.qi@linaro.org>
14377
14378 * ax-gdb.h: Include "ax.h".
14379
ad5cba2a
YQ
143802017-01-06 Yao Qi <yao.qi@linaro.org>
14381
14382 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14383 with nat/gdb_ptrace.h.
14384
1c33cd7f
YQ
143852017-01-05 Yao Qi <yao.qi@linaro.org>
14386
14387 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14388 new line.
14389 (mips64_fbsd_sigframe_init): Likewise.
14390
c988ac1d
JB
143912017-01-04 John Baldwin <jhb@FreeBSD.org>
14392
14393 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14394 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14395
b268007c
JB
143962017-01-04 John Baldwin <jhb@FreeBSD.org>
14397
14398 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14399 * NEWS: Mention new FreeBSD/mips native configuration.
14400 * config/mips/fbsd.mh: New file.
14401 * configure.host: Add mips*-*-freebsd*.
14402 * mips-fbsd-nat.c: New file.
14403
387360da
JB
144042017-01-04 John Baldwin <jhb@FreeBSD.org>
14405
14406 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14407 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14408 * NEWS: Mention new FreeBSD/mips target.
14409 * configure.tgt: Add mips*-*-freebsd*.
14410 * mips-fbsd-tdep.c: New file.
14411 * mips-fbsd-tdep.h: New file.
14412
2aaaf250
YQ
144132017-01-04 Yao Qi <yao.qi@linaro.org>
14414
14415 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14416 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14417
61baf725
JB
144182017-01-01 Joel Brobecker <brobecker@adacore.com>
14419
6dbb839a 14420 Update copyright year range in all GDB files.
61baf725 14421
c113e7ff 144222017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 14423
c113e7ff 14424 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 14425
c113e7ff 14426For older changes see ChangeLog-2016.
c906108c
SS
14427\f
14428Local Variables:
14429mode: change-log
14430left-margin: 8
14431fill-column: 74
14432version-control: never
57da7796 14433coding: utf-8
c906108c 14434End: