]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/ChangeLog
e309283d9ce67a989ace6d17caf7ed6607df1b9c
[thirdparty/binutils-gdb.git] / gdb / ChangeLog
1 2017-11-04 Tom Tromey <tom@tromey.com>
2
3 * breakpoint.c (set_momentary_breakpoint): Return
4 breakpoint_up.
5 (until_break_command): Update.
6 (new_until_break_fsm): Change argument types to
7 breakpoint_up.
8 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
9 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
10 Remove.
11 * infcmd.c (finish_forward): Update.
12 * breakpoint.h (set_momentary_breakpoint)
13 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
14 (make_cleanup_delete_breakpoint): Remove.
15 (struct breakpoint_deleter): New.
16 (breakpoint_up): New typedef.
17 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
18 (insert_exception_resume_breakpoint): Update.
19 (insert_exception_resume_from_probe): Update.
20 (insert_longjmp_resume_breakpoint): Update.
21 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
22 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
23 * infcall.c (call_function_by_hand_dummy): Update
24
25 2017-11-04 Tom Tromey <tom@tromey.com>
26
27 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
28
29 2017-11-04 Tom Tromey <tom@tromey.com>
30
31 * linux-tdep.c (linux_core_info_proc_mappings): Use
32 gdb::def_vector.
33 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
34 "size" argument.
35 (linux_corefile_thread): Update.
36 (linux_make_corefile_notes): Remove unused variable.
37
38 2017-11-04 Tom Tromey <tom@tromey.com>
39
40 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
41 gdb::byte_vector.
42
43 2017-11-04 Tom Tromey <tom@tromey.com>
44
45 * objfiles.c (do_free_objfile_cleanup): Remove.
46 * compile/compile-object-load.c (compile_object_load): Update.
47 * objfiles.h (make_cleanup_free_objfile): Remove.
48
49 2017-11-04 Tom Tromey <tom@tromey.com>
50
51 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
52 (adi_read_versions): Change "tags" to "gdb_byte *".
53 (adi_print_versions): Likewise.
54
55 2017-11-04 Tom Tromey <tom@tromey.com>
56
57 * breakpoint.c
58 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
59 from start_rbreak_breakpoints.
60 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
61 * breakpoint.h (class scoped_rbreak_breakpoints): New.
62 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
63 * symtab.c (do_end_rbreak_breakpoints): Remove.
64 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
65
66 2017-11-04 Tom Tromey <tom@tromey.com>
67
68 * cp-namespace.c (reset_directive_searched): Remove.
69 (cp_lookup_symbol_via_imports): Use scoped_restore.
70 * cp-support.c (reset_directive_searched): Remove.
71 (make_symbol_overload_list_using): Use scoped_restore.
72 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
73 (reset_directive_searched): Remove.
74
75 2017-11-04 Tom Tromey <tom@tromey.com>
76
77 * symfile.c (find_separate_debug_file_by_debuglink): Use
78 unique_xmalloc_ptr.
79
80 2017-11-04 Tom Tromey <tom@tromey.com>
81
82 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
83 type of "info".
84 (compute_stack_depth): Likewise.
85 (do_compile_dwarf_expr_to_c): Use std::vector.
86
87 2017-11-04 Tom Tromey <tom@tromey.com>
88
89 * compile/compile-object-load.c (link_callbacks_einfo): Use
90 std::string.
91
92 2017-11-04 Tom Tromey <tom@tromey.com>
93
94 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
95 Use scoped_free_pendings.
96 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
97 scoped_free_pendings.
98 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
99 (xcoff_initial_scan): Likewise.
100 * buildsym.c (reset_symtab_globals): Update comment.
101 (scoped_free_pendings): Rename from really_free_pendings.
102 (prepare_for_building): Update comment.
103 (buildsym_init): Likewise.
104 * buildsym.h (class scoped_free_pendings): New class.
105 (really_free_pendings): Don't declare.
106
107 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
108
109 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
110 output when converting a zero value to a special byteorder format.
111
112 2017-11-02 Yao Qi <yao.qi@linaro.org>
113
114 * frame.c (do_frame_register_read): Remove aspace.
115 * jit.c (jit_frame_sniffer): Likwise.
116 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
117 * regcache.c (regcache::regcache): Pass nullptr.
118 (regcache_print): Caller updated.
119 * regcache.h (regcache::regcache): Remove one constructor
120 parameter aspace.
121
122 2017-11-02 Yao Qi <yao.qi@linaro.org>
123
124 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
125
126 2017-11-02 Yao Qi <yao.qi@linaro.org>
127
128 * breakpoint.c (insert_single_step_breakpoints): Update.
129 * frame.c (struct frame_info) <aspace>: Add const.
130 (frame_save_as_regcache): Add const.
131 (get_frame_address_space): Return const address_space *.
132 * frame.h (get_frame_address_space): Update declaration.
133 * infrun.c (struct step_over_info) <aspace>: Add const.
134 (set_step_over_info): Make aspace const.
135 (displaced_step_prepare_throw): Change variable const.
136 (resume): Likewise.
137 (proceed): Likewise.
138 (adjust_pc_after_break): Likewise.
139 (save_waitstatus): Likewise.
140 (handle_signal_stop): Likewise.
141 (keep_going_pass_signal): Likewise.
142 * jit.c (jit_frame_sniffer): Add const.
143 * mips-tdep.c (mips_single_step_through_delay): Likewise.
144 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
145 * record-full.c (record_full_wait_1): Likewise.
146 * regcache.c (regcache::regcache): Change parameter to const.
147 * regcache.h (regcache::regcache): Likewise.
148 (regcache::aspace): Return const address_space *.
149 (regcache) <m_aspace>: Add const.
150
151 2017-11-02 Yao Qi <yao.qi@linaro.org>
152
153 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
154 * frame.c (create_sentinel_frame): Likewise.
155 * infrun.c (displaced_step_prepare_throw): Likewise.
156 (resume): Likewise.
157 (thread_still_needs_step_over_bp): Likewise.
158 (proceed): Likewise.
159 (do_target_wait): Likewise.
160 (adjust_pc_after_break): Likewise.
161 (handle_syscall_event): Likewise.
162 (save_waitstatus): Likewise.
163 (handle_inferior_event_1): Likewise.
164 (handle_signal_stop): Likewise.
165 (keep_going_pass_signal): Likewise.
166 * linux-nat.c (status_callback): Likewise.
167 (save_stop_reason): Likewise.
168 (resume_stopped_resumed_lwps): Likewise.
169 * record-full.c (record_full_exec_insn): Likewise.
170 (record_full_wait_1): Likewise.
171 * regcache.c (get_regcache_aspace): Remove.
172 * regcache.h (get_regcache_aspace): Remove.
173
174 2017-11-02 Yao Qi <yao.qi@linaro.org>
175
176 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
177 (init_regcache_descr): Use gdbarch_num_regs.
178 (regcache::regcache): Likewise.
179 (regcache::get_register_status): Likewise.
180 (regcache::assert_raw_regnum): Likewise.
181 (regcache::cooked_read): Likewise.
182 (regcache::cooked_read_value): Likewise.
183 (regcache::cooked_write): Likewise.
184 (regcache::dump): Likewise.
185 (regcache::num_raw_registers): New method.
186 * regcache.h (class regcache) <num_raw_registers>: New.
187
188 2017-11-02 Yao Qi <yao.qi@linaro.org>
189
190 * regcache.c (regcache::assert_regnum): New method.
191 (regcache::invalidate): Call assert_regnum.
192 (regcache::raw_update): Likewise.
193 (regcache::raw_write): Likewise.
194 (regcache::raw_read_part): Likewise.
195 (regcache::raw_write_part): Likewise.
196 (regcache::raw_supply): Likewise.
197 (regcache::raw_supply_integer): Likewise.
198 (regcache::raw_supply_zeroed): Likewise.
199 (regcache::raw_collect): Likewise.
200 (regcache::raw_collect_integer): Likewise.
201 * regcache.h (regcache::assert_regnum): Declare.
202
203 2017-11-02 Yao Qi <yao.qi@linaro.org>
204
205 * regcache.c (regcache::dump): Remove code.
206
207 2017-11-02 Yao Qi <yao.qi@linaro.org>
208
209 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
210 Remove.
211 <sizeof_cooked_register_status>: Remove.
212 (init_regcache_descr): Update.
213 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
214 (regcache::save): Likewise.
215 (regcache::dump): Likewise.
216
217 2017-11-01 James Bowman <james.bowman@ftdichip.com>
218
219 * ft32-tdep.c (ft32_fetch_instruction): New function.
220 (ft32_analyze_prologue): Use ft32_fetch_instruction().
221
222 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
223
224 * cli/cli-script.c (execute_control_command): Rename to ...
225 (execute_control_command_1): ... this.
226 (execute_control_command): New function.
227
228 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
229
230 * tracepoint.c (tfind_command): Remove const_cast.
231
232 2017-10-30 Mike Gulick <mgulick@mathworks.com>
233
234 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
235
236 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
237
238 * common/common-utils.h (in_inclusive_range): New function.
239 * arm-tdep.c (arm_record_extension_space): Use
240 in_inclusive_range.
241 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
242 * cris-tdep.c (cris_spec_reg_applicable): Use
243 in_inclusive_range.
244
245 2017-10-30 Pedro Alves <palves@redhat.com>
246 Simon Marchi <simon.marchi@ericsson.com>
247
248 * remote.c (remote_set_syscall_catchpoint): Build a std::string
249 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
250
251 2017-10-30 Pedro Alves <palves@redhat.com>
252
253 * common/common-utils.c (string_appendf, string_vappendf): New
254 functions.
255 * common/common-utils.h (string_appendf, string_vappendf): New
256 declarations.
257 * unittests/common-utils-selftests.c (string_appendf_func)
258 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
259 (string_vappendf_tests): New functions.
260 (_initialize_common_utils_selftests): Register "string_appendf" and
261 "string_vappendf tests".
262
263 2017-10-30 Pedro Alves <palves@redhat.com>
264
265 * unittests/common-utils-selftests.c (format_func): New typedef.
266 (string_printf_tests, string_vprintf_tests): Tests factored out
267 and merged to ...
268 (test_format_func): ... this new function.
269 (string_printf_tests, string_vprintf_tests): Reimplement on top of
270 test_format_func.
271
272 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
273
274 * darwin-nat.c: Remove include of gdb.h.
275
276 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
277
278 * xtensa-xtregs.c: Fix formatting issues.
279
280 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
281
282 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
283
284 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
285
286 PR python/21213
287 * python/py-infthread.c (thpy_get_inferior): Increment reference
288 of inferior before returning it.
289
290 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
291
292 * unittests/common-utils-selftests.c (format): Add
293 ATTRIBUTE_PRINTF.
294
295 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
296
297 * xml-syscall.c (struct syscall_desc): Add constructor.
298 <name>: Change type to std::string.
299 (syscall_desc_up): New typedef.
300 (syscall_desc_p): Remove typeder.
301 (DEF_VEC_P(syscall_desc_p)): Remove.
302 (struct syscall_group_desc): Add constructor.
303 <name>: Change type to std::string.
304 <syscalls>: Change type to std::vector.
305 (syscall_group_desc_up): New typedef.
306 (syscall_group_desc_p): Remove typedef.
307 (DEF_VEC_P(syscall_group_desc_p)): Remove.
308 (struct syscalls_info) <syscalls>: Change type to std::vector of
309 unique_ptr.
310 <groups>: Likewise.
311 <my_gdb_datadir>: Change type to std::string.
312 (syscalls_info_up): New typedef.
313 (allocate_syscalls_info): Remove.
314 (syscalls_info_free_syscalls_desc): Remove.
315 (syscalls_info_free_syscall_group_desc): Remove.
316 (free_syscalls_info): Remove.
317 (make_cleanup_free_syscalls_info): Remove.
318 (syscall_group_create_syscall_group_desc): Adjust.
319 (syscall_group_add_syscall): Adjust.
320 (syscall_create_syscall_desc): Adjust.
321 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
322 (init_syscalls_info): Adjust.
323 (syscall_group_get_group_by_name): Adjust.
324 (xml_get_syscall_number): Adjust.
325 (xml_get_syscall_name): Adjust.
326 (xml_list_of_syscalls): Adjust.
327 (xml_list_syscalls_by_group): Adjust.
328 (xml_list_of_groups): Adjust.
329
330 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
331
332 * probe.h: Don't include gdb_vecs.h.
333 (DEF_VEC_P (probe_p)): Remove.
334 (find_probes_in_objfile): Return an std::vector.
335 * probe.c (find_probes_in_objfile): Likewise.
336 * breakpoint.c (breakpoint_objfile_data)
337 <longjmp_probes>: Change type to std::vector.
338 <exception_probes>: Likewise.
339 (free_breakpoint_probes): Don't manually free vectors.
340 (create_longjmp_master_breakpoint): Adjust.
341 (create_exception_master_breakpoint): Adjust.
342 * solib-svr4.c (svr4_create_probe_breakpoints): Change
343 parameter type, adjust.
344 (svr4_create_solib_event_breakpoints): Adjust.
345
346 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
347
348 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
349 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
350 with new.
351 (free_breakpoint_probes): Rename to ...
352 (free_breakpoint_objfile_data): ... this, and call delete on
353 bp_objfile_data..
354
355 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
356
357 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
358 (loaded_script_ptr): Remove typedef.
359 (DEF_VEC_P (loaded_script_ptr)): Remove.
360 (struct collect_matching_scripts_data): Add constructor.
361 <scripts_p>: Change type to (pointer to) std::vector.
362 (collect_matching_scripts_data): Adjust.
363 (sort_scripts_by_name): Make suitable for std::sort.
364 (print_scripts): Don't sort vector, adjust to std::vector.
365 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
366
367 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
368
369 * symfile.c (filename_language): Make struct, not typedef. Add
370 constructor.
371 <ext>: Change type to std::string.
372 (DEF_VEC_O (filename_language)): Remove.
373 (filename_language_table): Change type to std::vector.
374 (add_filename_language): Adjust.
375 (set_ext_lang_command): Adjust.
376 (info_ext_lang_command): Adjust.
377 (deduce_language_from_filename): Adjust.
378 (class scoped_restore_filename_language_table): Remove.
379 (test_filename_language): Use scoped_restore.
380 (test_set_ext_lang_command): Use scoped_restore, adjust to
381 std::vector change.
382
383 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
384
385 * symfile.c: Include selftest.h.
386 (class scoped_restore_filename_language_table): New.
387 (test_filename_language): New test.
388 (test_set_ext_lang_command): New test.
389 (_initialize_symfile): Register tests.
390
391 2017-10-27 Keith Seitz <keiths@redhat.com>
392
393 * breakpoint.c (print_breakpoint_location): Use the symbol saved
394 in the bp_location, falling back to find_pc_sect_function when
395 needed.
396 (add_location_to_breakpoint): Save sal->symbol.
397 * breakpoint.h (struct bp_location) <symbol>: New field.
398 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
399 * symtab.h (struct symtab_and_line) <symbol>: New field.
400
401 2017-10-26 Patrick Frants <osscontribute@gmail.com>
402
403 PR gdb/13669
404 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
405 to rewind obstack.
406
407 2017-10-26 Pedro Alves <palves@redhat.com>
408
409 * remote.c (remote_async_terminal_ours_p): Delete.
410 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
411 Remove references to 'remote_async_terminal_ours_p'.
412
413 2017-10-26 Yao Qi <yao.qi@linaro.org>
414
415 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
416
417 2017-10-26 Yao Qi <yao.qi@linaro.org>
418
419 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
420 aspace const.
421 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
422 Likewise.
423 * breakpoint.c (bpstat_check_location): Remove cast.
424 (breakpoint_hit_catch_fork): Make aspce const.
425 (breakpoint_hit_catch_solib): Likewise.
426 (breakpoint_hit_catch_exec): Likewise.
427 (breakpoint_hit_ranged_breakpoint): Likewise.
428 (breakpoint_hit_watchpoint): Likewise.
429 (base_breakpoint_breakpoint_hit): Likewise.
430 (bkpt_breakpoint_hit): Likewise.
431 (dprintf_breakpoint_hit): Likewise.
432 (tracepoint_breakpoint_hit): Likewise.
433 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
434
435 2017-10-26 Yao Qi <yao.qi@linaro.org>
436
437 * breakpoint.c (breakpoint_location_address_match): Change
438 "struct address_space *" to "const address_space".
439 (breakpoint_location_address_range_overlap): Likewise.
440 (breakpoint_here_p): Likewise.
441 (breakpoint_in_range_p): Likewise.
442 (moribund_breakpoint_here_p): Likewise.
443 (bp_location_inserted_here_p): Likewise.
444 (software_breakpoint_inserted_here_p): Likewise.
445 (hardware_breakpoint_inserted_here_p): Likewise.
446 (hardware_watchpoint_inserted_in_range): Likewise.
447 (bpstat_check_location): Likewise.
448 (bpstat_stop_status): Likewise.
449 (breakpoint_address_match): Likewise.
450 (breakpoint_address_match_range): Likewise.
451 (breakpoint_location_address_match): Likewise.
452 (breakpoint_location_address_range_overlap): Likewise.
453 (insert_single_step_breakpoint): Likewise.
454 (breakpoint_has_location_inserted_here): Likewise.
455 (single_step_breakpoint_inserted_here_p): Likewise.
456 (pc_at_non_inline_function): Likewise.
457 * breakpoint.h (bpstat_stop_status): Update declaration.
458 (breakpoint_here_p): Likewise.
459 (breakpoint_in_range_p): Likewise.
460 (moribund_breakpoint_here_p): Likewise.
461 (breakpoint_inserted_here_p): Likewise.
462 (software_breakpoint_inserted_here_p): Likewise.
463 (hardware_breakpoint_inserted_here_p): Likewise.
464 (breakpoint_has_location_inserted_here): Likewise.
465 (single_step_breakpoint_inserted_here_p): Likewise.
466 (hardware_watchpoint_inserted_in_range): Likewise.
467 (breakpoint_address_match): Likewise.
468 (insert_single_step_breakpoint): Likewise.
469 (pc_at_non_inline_function): Likewise.
470 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
471 * record.c (record_check_stopped_by_breakpoint): Likewise.
472 * record.h (record_check_stopped_by_breakpoint): Likewise.
473 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
474
475 2017-10-25 Yao Qi <yao.qi@linaro.org>
476
477 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
478 regcache->arch () instead get_regcache_arch.
479 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
480 Likewise.
481 (aarch64_fbsd_store_inferior_registers): Likewise.
482 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
483 (store_gregs_to_thread): Likewise.
484 (fetch_fpregs_from_thread): Likewise.
485 (store_fpregs_to_thread): Likewise.
486 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
487 (aarch64_store_return_value): Likewise.
488 (aarch64_software_single_step): Likewise.
489 * aix-thread.c (aix_thread_wait): Likewise.
490 (supply_reg32): Likewise.
491 (supply_sprs64): Likewise.
492 (supply_sprs32): Likewise.
493 (fill_gprs64): Likewise.
494 (fill_gprs32): Likewise.
495 (fill_sprs64): Likewise.
496 (fill_sprs32): Likewise.
497 (store_regs_user_thread): Likewise.
498 (store_regs_kernel_thread): Likewise.
499 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
500 (alphabsd_store_inferior_registers): Likewise.
501 * alpha-tdep.c (alpha_extract_return_value): Likewise.
502 (alpha_store_return_value): Likewise.
503 (alpha_deal_with_atomic_sequence): Likewise.
504 (alpha_next_pc): Likewise.
505 (alpha_software_single_step): Likewise.
506 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
507 (amd64bsd_store_inferior_registers): Likewise.
508 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
509 Likewise.
510 (amd64_linux_store_inferior_registers): Likewise.
511 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
512 (amd64_collect_native_gregset): Likewise.
513 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
514 (amd64obsd_collect_uthread): Likewise.
515 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
516 (amd64_collect_fpregset): Likewise.
517 (amd64_supply_fxsave): Likewise.
518 (amd64_supply_xsave): Likewise.
519 (amd64_collect_fxsave): Likewise.
520 (amd64_collect_xsave): Likewise.
521 * arc-tdep.c (arc_write_pc): Likewise.
522 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
523 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
524 (arm_fbsd_store_inferior_registers): Likewise.
525 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
526 (store_vfp_regs): Likewise.
527 (arm_linux_fetch_inferior_registers): Likewise.
528 (arm_linux_store_inferior_registers): Likewise.
529 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
530 (arm_linux_sigreturn_next_pc): Likewise.
531 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
532 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
533 (fetch_register): Likewise.
534 (store_register): Likewise.
535 * arm-tdep.c (arm_is_thumb): Likewise.
536 (displaced_in_arm_mode): Likewise.
537 (bx_write_pc): Likewise.
538 (arm_get_next_pcs_addr_bits_remove): Likewise.
539 (arm_software_single_step): Likewise.
540 (arm_extract_return_value): Likewise.
541 (arm_store_return_value): Likewise.
542 (arm_write_pc): Likewise.
543 * bfin-tdep.c (bfin_extract_return_value): Likewise.
544 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
545 (bsd_uthread_store_registers): Likewise.
546 * core-regset.c (fetch_core_registers): Likewise.
547 * corelow.c (get_core_registers): Likewise.
548 * cris-tdep.c (cris_store_return_value): Likewise.
549 (cris_extract_return_value): Likewise.
550 (find_step_target): Likewise.
551 (find_step_target): Likewise.
552 (cris_software_single_step): Likewise.
553 * ctf.c (ctf_fetch_registers): Likewise.
554 * darwin-nat.c (cancel_breakpoint): Likewise.
555 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
556 * frv-tdep.c (frv_extract_return_value): Likewise.
557 * ft32-tdep.c (ft32_store_return_value): Likewise.
558 (ft32_extract_return_value): Likewise.
559 * go32-nat.c (fetch_register): Likewise.
560 (go32_fetch_registers): Likewise.
561 (go32_store_registers): Likewise.
562 (store_register): Likewise.
563 * h8300-tdep.c (h8300_extract_return_value): Likewise.
564 (h8300_store_return_value): Likewise.
565 * hppa-linux-nat.c (fetch_register): Likewise.
566 (store_register): Likewise.
567 (hppa_linux_fetch_inferior_registers): Likewise.
568 (hppa_linux_store_inferior_registers): Likewise.
569 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
570 (i386_darwin_store_inferior_registers): Likewise.
571 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
572 (gnu_store_registers): Likewise.
573 * i386-linux-nat.c (fetch_register): Likewise.
574 (store_register): Likewise.
575 (supply_gregset): Likewise.
576 (fill_gregset): Likewise.
577 (i386_linux_fetch_inferior_registers): Likewise.
578 (i386_linux_store_inferior_registers): Likewise.
579 (i386_linux_resume): Likewise.
580 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
581 Likewise.
582 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
583 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
584 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
585 (i386obsd_collect_uthread): Likewise.
586 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
587 (i386_supply_gregset): Likewise.
588 (i386_collect_gregset): Likewise.
589 (i386_supply_fpregset): Likewise.
590 (i386_collect_fpregset): Likewise.
591 (i386_mpx_bd_base): Likewise.
592 * i386-v4-nat.c (supply_fpregset): Likewise.
593 (fill_fpregset): Likewise.
594 * i387-tdep.c (i387_supply_fsave): Likewise.
595 (i387_collect_fsave): Likewise.
596 (i387_supply_fxsave): Likewise.
597 (i387_collect_fxsave): Likewise.
598 (i387_supply_xsave): Likewise.
599 (i387_collect_xsave): Likewise.
600 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
601 (ia64_linux_store_registers): Likewise.
602 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
603 (ia64_extract_return_value): Likewise.
604 (ia64_store_return_value): Likewise.
605 (find_func_descr): Likewise.
606 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
607 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
608 (inf_ptrace_store_registers): Likewise.
609 * infrun.c (use_displaced_stepping): Likewise.
610 (displaced_step_prepare_throw): Likewise.
611 (resume): Likewise.
612 (proceed): Likewise.
613 (do_target_wait): Likewise.
614 (adjust_pc_after_break): Likewise.
615 (handle_inferior_event_1): Likewise.
616 (handle_signal_stop): Likewise.
617 (save_infcall_suspend_state): Likewise.
618 (restore_infcall_suspend_state): Likewise.
619 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
620 * jit.c (jit_frame_prev_register): Likewise.
621 * linux-nat.c (save_stop_reason): Likewise.
622 (linux_nat_wait_1): Likewise.
623 (resume_stopped_resumed_lwps): Likewise.
624 * linux-record.c (record_linux_sockaddr): Likewise.
625 (record_linux_msghdr): Likewise.
626 (record_linux_system_call): Likewise.
627 * linux-tdep.c (linux_collect_thread_registers): Likewise.
628 * lm32-tdep.c (lm32_extract_return_value): Likewise.
629 (lm32_store_return_value): Likewise.
630 * m32c-tdep.c (m32c_read_flg): Likewise.
631 (m32c_pseudo_register_read): Likewise.
632 (m32c_pseudo_register_write): Likewise.
633 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
634 (m32r_linux_collect_gregset): Likewise.
635 * m32r-tdep.c (m32r_store_return_value): Likewise.
636 (m32r_extract_return_value): Likewise.
637 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
638 (m68kbsd_collect_fpregset): Likewise.
639 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
640 * m68k-linux-nat.c (fetch_register): Likewise.
641 (old_fetch_inferior_registers): Likewise.
642 (old_store_inferior_registers): Likewise.
643 (store_regs): Likewise.
644 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
645 (m68k_svr4_store_return_value): Likewise.
646 * m88k-tdep.c (m88k_store_arguments): Likewise.
647 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
648 (mi_cmd_data_write_register_values): Likewise.
649 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
650 (mips_fbsd_store_inferior_registers): Likewise.
651 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
652 (mips_fbsd_supply_gregs): Likewise.
653 (mips_fbsd_collect_fpregs): Likewise.
654 (mips_fbsd_collect_gregs): Likewise.
655 (mips_fbsd_supply_fpregset): Likewise.
656 (mips_fbsd_collect_fpregset): Likewise.
657 (mips_fbsd_supply_gregset): Likewise.
658 (mips_fbsd_collect_gregset): Likewise.
659 * mips-linux-nat.c (supply_gregset): Likewise.
660 (fill_gregset): Likewise.
661 (supply_fpregset): Likewise.
662 (fill_fpregset): Likewise.
663 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
664 (mips_fill_gregset): Likewise.
665 (mips_supply_fpregset): Likewise.
666 (mips_fill_fpregset): Likewise.
667 (mips64_supply_gregset): Likewise.
668 (micromips_linux_sigframe_validate): Likewise.
669 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
670 (mipsnbsd_fetch_inferior_registers): Likewise.
671 (mipsnbsd_store_inferior_registers): Likewise.
672 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
673 (mipsnbsd_supply_gregset): Likewise.
674 (mipsnbsd_iterate_over_regset_sections): Likewise.
675 (mipsnbsd_supply_reg): Likewise.
676 (mipsnbsd_supply_fpreg): Likewise.
677 * mips-tdep.c (mips_in_frame_stub): Likewise.
678 (mips_dummy_id): Likewise.
679 (is_octeon_bbit_op): Likewise.
680 (micromips_bc1_pc): Likewise.
681 (extended_mips16_next_pc): Likewise.
682 (mips16_next_pc): Likewise.
683 (deal_with_atomic_sequence): Likewise.
684 * moxie-tdep.c (moxie_process_readu): Likewise.
685 * nios2-tdep.c (nios2_get_next_pc): Likewise.
686 * nto-procfs.c (procfs_store_registers): Likewise.
687 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
688 (ppcfbsd_store_inferior_registers): Likewise.
689 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
690 (fetch_altivec_register): Likewise.
691 (get_spe_registers): Likewise.
692 (fetch_spe_register): Likewise.
693 (fetch_altivec_registers): Likewise.
694 (fetch_all_gp_regs): Likewise.
695 (fetch_all_fp_regs): Likewise.
696 (store_vsx_register): Likewise.
697 (store_altivec_register): Likewise.
698 (set_spe_registers): Likewise.
699 (store_spe_register): Likewise.
700 (store_altivec_registers): Likewise.
701 (store_all_gp_regs): Likewise.
702 (store_all_fp_regs): Likewise.
703 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
704 (ppc_linux_collect_gregset): Likewise.
705 (ppc_canonicalize_syscall): Likewise.
706 (ppc_linux_record_signal): Likewise.
707 (ppu2spu_prev_register): Likewise.
708 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
709 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
710 (ppcobsd_store_registers): Likewise.
711 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
712 Likewise.
713 (ppc_ravenscar_generic_store_registers): Likewise.
714 * procfs.c (procfs_fetch_registers): Likewise.
715 (procfs_store_registers): Likewise.
716 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
717 (ravenscar_store_registers): Likewise.
718 (ravenscar_prepare_to_store): Likewise.
719 * record-btrace.c (record_btrace_fetch_registers): Likewise.
720 * record-full.c (record_full_wait_1): Likewise.
721 (record_full_registers_change): Likewise.
722 (record_full_store_registers): Likewise.
723 (record_full_core_fetch_registers): Likewise.
724 (record_full_save): Likewise.
725 (record_full_goto_insn): Likewise.
726 * regcache.c (regcache_register_size): Likewise.
727 (get_regcache_arch): Remove.
728 (regcache_read_pc): Likewise.
729 * regcache.h (get_regcache_arch): Remove.
730 * remote-sim.c (gdbsim_fetch_register): Likewise.
731 (gdbsim_store_register): Likewise.
732 * remote.c (fetch_register_using_p): Likewise.
733 (send_g_packet): Likewise.
734 (remote_prepare_to_store): Likewise.
735 (store_registers_using_G): Likewise.
736 * reverse.c (save_bookmark_command): Likewise.
737 (goto_bookmark_command): Likewise.
738 * rs6000-aix-tdep.c (branch_dest): Likewise.
739 * rs6000-nat.c (rs6000_ptrace64): Likewise.
740 (fetch_register): Likewise.
741 * rs6000-tdep.c (ppc_supply_reg): Likewise.
742 (ppc_collect_reg): Likewise.
743 (ppc_collect_gregset): Likewise.
744 (ppc_collect_fpregset): Likewise.
745 (ppc_collect_vsxregset): Likewise.
746 (ppc_collect_vrregset): Likewise.
747 (ppc_displaced_step_hw_singlestep): Likewise.
748 (rs6000_pseudo_register_read): Likewise.
749 (rs6000_pseudo_register_write): Likewise.
750 * s390-linux-nat.c (supply_gregset): Likewise.
751 (fill_gregset): Likewise.
752 (s390_linux_fetch_inferior_registers): Likewise.
753 * s390-linux-tdep.c (s390_write_pc): Likewise.
754 (s390_software_single_step): Likewise.
755 (s390_all_but_pc_registers_record): Likewise.
756 (s390_linux_syscall_record): Likewise.
757 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
758 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
759 (shnbsd_store_inferior_registers): Likewise.
760 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
761 (sh_extract_return_value_fpu): Likewise.
762 (sh_store_return_value_nofpu): Likewise.
763 (sh_corefile_supply_regset): Likewise.
764 (sh_corefile_collect_regset): Likewise.
765 * sh64-tdep.c (sh64_extract_return_value): Likewise.
766 (sh64_store_return_value): Likewise.
767 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
768 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
769 (sparc_store_inferior_registers): Likewise.
770 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
771 (sparc_ravenscar_prepare_to_store): Likewise.
772 * sparc-tdep.c (sparc32_store_arguments): Likewise.
773 (sparc_analyze_control_transfer): Likewise.
774 (sparc_step_trap): Likewise.
775 (sparc_software_single_step): Likewise.
776 (sparc32_gdbarch_init): Likewise.
777 (sparc_supply_rwindow): Likewise.
778 (sparc_collect_rwindow): Likewise.
779 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
780 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
781 (sparc64nbsd_collect_gregset): Likewise.
782 (sparc64nbsd_supply_fpregset): Likewise.
783 (sparc64nbsd_collect_fpregset): Likewise.
784 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
785 (sparc64_supply_gregset): Likewise.
786 (sparc64_collect_gregset): Likewise.
787 (sparc64_supply_fpregset): Likewise.
788 (sparc64_collect_fpregset): Likewise.
789 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
790 * spu-tdep.c (spu_unwind_sp): Likewise.
791 (spu2ppu_prev_register): Likewise.
792 (spu_memory_remove_breakpoint): Likewise.
793 * stack.c (return_command): Likewise.
794 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
795 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
796 * tracefile.c (trace_save_ctf): Likewise.
797 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
798 (do_windows_store_inferior_registers): Likewise.
799 (windows_resume): Likewise.
800 * xtensa-linux-nat.c (fill_gregset): Likewise.
801 (supply_gregset_reg): Likewise.
802 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
803 (xtensa_register_read_masked): Likewise.
804 (xtensa_supply_gregset): Likewise.
805 (xtensa_extract_return_value): Likewise.
806 (xtensa_store_return_value): Likewise.
807
808 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
809
810 * doublest.c (floatformat_from_string): New function.
811 * doublest.h (floatformat_from_string): Add prototype.
812
813 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
814 (OP_FLOAT): ... this.
815 * expression.h: Do not include "doublest.h".
816 (union exp_element): Replace doubleconst and decfloatconst by
817 new element floatconst.
818 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
819 (ada_evaluate_subexp): Likewise.
820 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
821 OP_DOUBLE and OP_DECFLOAT.
822 * expprint.c (print_subexp_standard): Likewise.
823 (dump_subexp_body_standard): Likewise.
824 * breakpoint.c (watchpoint_exp_is_const): Likewise.
825
826 * parse.c: Include "dfp.h".
827 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
828 (write_exp_elt_floatcst): New function.
829 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
830 and OP_DECFLOAT.
831 (operator_check_standard): Likewise.
832 (parse_float): Do not accept suffix. Take type as input. Return bool.
833 Return target format buffer instead of host DOUBLEST.
834 Use floatformat_from_string and decimal_from_string to parse
835 either binary or decimal floating-point types.
836 (parse_c_float): Remove.
837 * parser-defs.h: Do not include "doublest.h".
838 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
839 (write_exp_elt_floatcst): Add prototype.
840 (parse_float): Update prototype.
841 (parse_c_float): Remove.
842
843 * c-exp.y: Do not include "dfp.h".
844 (typed_val_float): Use byte buffer instead of DOUBLEST.
845 (typed_val_decfloat): Remove.
846 (DECFLOAT): Remove.
847 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
848 (parse_number): Update to new parse_float interface.
849 Parse suffixes and determine type before calling parse_float.
850 Handle decimal and binary FP types the same way.
851
852 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
853 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
854 (parse_number): Update to new parse_float interface.
855 Parse suffixes and determine type before calling parse_float.
856
857 * f-exp.y: Replace dval by typed_val_float.
858 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
859 (parse_number): Use parse_float instead of atof.
860
861 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
862 (parse_go_float): Remove.
863 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
864 (parse_number): Call parse_float instead of parse_go_float.
865 Parse suffixes and determine type before calling parse_float.
866
867 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
868 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
869 (parse_number): Update to new parse_float interface.
870 Parse suffixes and determine type before calling parse_float.
871
872 * m2-exp.y: Replace dval by byte buffer val.
873 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
874 (parse_number): Call parse_float instead of atof.
875
876 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
877 (lex_number): Call parse_float instead of strtod.
878 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
879 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
880 Use write_exp_elt_floatcst.
881 (unit_testing): Remove static variable.
882 (rust_type): Do not check unit_testing.
883 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
884
885 * ada-exp.y (type_float, type_double): Remove.
886 (typed_val_float): Use byte buffer instead of DOUBLEST.
887 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
888 * ada-lex.l (processReal): Use parse_float instead of sscanf.
889
890 2017-10-25 Alan Hayward <alan.hayward@arm.com>
891
892 * aarch64-tdep.h (enum aarch64_regnum): Remove.
893 * arch/aarch64.h: New file.
894
895 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
896
897 * dfp.h (decimal_from_string): Use const reference for argument.
898 * dfp.c (decimal_from_string): Likewise.
899
900 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
901
902 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
903 * sh64-tdep.c (sh64_do_fp_register): Likewise.
904 * mips-tdep.c (mips_print_fp_register): Likewise.
905
906 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
907
908 * common/format.h (enum argclass): Replace decfloat_arg by
909 dec32float_arg, dec64float_arg, and dec128float_arg.
910 * common/format.c (parse_format_string): Update to return
911 new decimal float argument classes.
912
913 * printcmd.c (printf_decfloat): Rename to ...
914 (printf_floating): ... this. Add argclass argument, and use it
915 instead of parsing the format string again. Add support for
916 binary floating-point values, using floatformat_to_string.
917 Convert value to the target format if it doesn't already match.
918 (ui_printf): Call printf_floating instead of printf_decfloat,
919 also for double_arg / long_double_arg. Pass argclass.
920
921 * dfp.c (decimal_to_string): Add format string argument.
922 * dfp.h (decimal_to_string): Likewise.
923
924 * doublest.c (floatformat_to_string): Add format string argument.
925 * doublest.h (floatformat_to_string): Likewise.
926
927 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
928
929 * doublest.c (floatformat_precision): New routine.
930 (floatformat_to_string): Likewise.
931 * doublest.c (floatformat_to_string): Add prototype.
932
933 * printcmd.c (print_scalar_formatted): Only call print_floating
934 on floating-point types.
935 * valprint.c: Do not include "floatformat.h".
936 (generic_val_print_decfloat): Remove.
937 (generic_val_print): Call generic_val_print_float for both
938 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
939 (print_floating): Use floatformat_to_string. Handle decimal float.
940 (print_decimal_floating): Remove, merge into floatformat_to_string.
941 * value.h (print_decimal_floating): Remove.
942
943 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
944
945 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
946
947 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
948
949 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
950
951 * memattr.h: Don't include vec.h.
952 (struct mem_attrib): Initialize fields.
953 <unknown>: New static method.
954 (struct mem_region): Add constructors, operator<, initialize
955 fields.
956 * memattr.c: Include algorithm.
957 (default_mem_attrib, unknown_mem_attrib): Remove.
958 (user_mem_region_list): New global.
959 (target_mem_region_list, mem_region_list): Change type to
960 std::vector<mem_region>.
961 (mem_use_target): Now a function.
962 (target_mem_regions_valid): Change type to bool.
963 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
964 (require_user_regions): Adjust.
965 (require_target_regions): Adjust.
966 (create_mem_region): Adjust.
967 (lookup_mem_region): Adjust.
968 (invalidate_target_mem_regions): Adjust.
969 (mem_clear): Rename to...
970 (user_mem_clear): ... this, and adjust.
971 (mem_command): Adjust.
972 (info_mem_command): Adjust.
973 (mem_enable, enable_mem_command, mem_disable,
974 disable_mem_command): Adjust.
975 (mem_delete): Adjust.
976 (delete_mem_command): Adjust.
977 * memory-map.h (parse_memory_map): Return an std::vector.
978 * memory-map.c (parse_memory_map): Likewise.
979 (struct memory_map_parsing_data): Add constructor.
980 <memory_map>: Point to std::vector.
981 (memory_map_start_memory): Adjust.
982 (memory_map_end_memory): Adjust.
983 (memory_map_end_property): Adjust.
984 (clear_result): Remove.
985 * remote.c (remote_memory_map): Return an std::vector.
986 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
987 Remove.
988 (target_debug_print_mem_region_vector): New.
989 * target-delegates.c: Regenerate.
990 * target.h (mem_region_vector): New typedef.
991 (to_memory_map): Return mem_region_vector.
992 (target_memory_map): Return an std::vector.
993 * target.c (target_memory_map): Return an std::vector.
994 (flash_erase_command): Adjust.
995
996 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
997
998 * memory-map.c (struct memory_map_parsing_data) <property_name>:
999 Change type to std::string.
1000 (memory_map_start_property): Adjust.
1001 (memory_map_end_property): Adjust.
1002
1003 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1004
1005 * infrun.h: Include common/byte-vector.h.
1006 (struct displaced_step_closure): New struct.
1007 (struct buf_displaced_step_closure): New struct.
1008 * infrun.c (displaced_step_closure::~displaced_step_closure):
1009 Provide default implementation.
1010 (displaced_step_clear): Deallocate step closure with delete.
1011 * aarch64-tdep.c (displaced_step_closure): Rename to ...
1012 (aarch64_displaced_step_closure): ... this, extend
1013 displaced_step_closure.
1014 (aarch64_displaced_step_data) <dsc>: Change type to
1015 aarch64_displaced_step_closure.
1016 (aarch64_displaced_step_copy_insn): Adjust to type change, use
1017 unique_ptr.
1018 (aarch64_displaced_step_fixup): Add cast for displaced step
1019 closure.
1020 * amd64-tdep.c (displaced_step_closure): Rename to ...
1021 (amd64_displaced_step_closure): ... this, extend
1022 displaced_step_closure.
1023 <insn_buf>: Change type to std::vector<gdb_byte>.
1024 <max_len>: Remove.
1025 (fixup_riprel): Change type of DSC parameter, adjust to type
1026 change of insn_buf.
1027 (fixup_displaced_copy): Change type of DSC parameter.
1028 (amd64_displaced_step_copy_insn): Instantiate
1029 amd64_displaced_step_closure.
1030 (amd64_displaced_step_fixup): Add cast for closure type, adjust
1031 to type change of insn_buf.
1032 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
1033 parameter DSC.
1034 (arm_linux_copy_svc): Likewise.
1035 (cleanup_kernel_helper_return): Likewise.
1036 (arm_catch_kernel_helper_return): Likewise.
1037 (arm_linux_displaced_step_copy_insn): Instantiate
1038 arm_displaced_step_closure.
1039 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
1040 (displaced_read_reg): Change type of parameter DSC.
1041 (branch_write_pc): Likewise.
1042 (load_write_pc): Likewise.
1043 (alu_write_pc): Likewise.
1044 (displaced_write_reg): Likewise.
1045 (arm_copy_unmodified): Likewise.
1046 (thumb_copy_unmodified_32bit): Likewise.
1047 (thumb_copy_unmodified_16bit): Likewise.
1048 (cleanup_preload): Likewise.
1049 (install_preload): Likewise.
1050 (arm_copy_preload): Likewise.
1051 (thumb2_copy_preload): Likewise.
1052 (install_preload_reg): Likewise.
1053 (arm_copy_preload_reg): Likewise.
1054 (cleanup_copro_load_store): Likewise.
1055 (install_copro_load_store): Likewise.
1056 (arm_copy_copro_load_store) Likewise.
1057 (thumb2_copy_copro_load_store): Likewise.
1058 (cleanup_branch): Likewise.
1059 (install_b_bl_blx): Likewise.
1060 (arm_copy_b_bl_blx): Likewise.
1061 (thumb2_copy_b_bl_blx): Likewise.
1062 (thumb_copy_b): Likewise.
1063 (install_bx_blx_reg): Likewise.
1064 (arm_copy_bx_blx_reg): Likewise.
1065 (thumb_copy_bx_blx_reg): Likewise.
1066 (cleanup_alu_imm): Likewise.
1067 (arm_copy_alu_imm): Likewise.
1068 (thumb2_copy_alu_imm): Likewise.
1069 (cleanup_alu_reg): Likewise.
1070 (install_alu_reg): Likewise.
1071 (arm_copy_alu_reg): Likewise.
1072 (thumb_copy_alu_reg): Likewise.
1073 (cleanup_alu_shifted_reg): Likewise.
1074 (install_alu_shifted_reg): Likewise.
1075 (arm_copy_alu_shifted_reg): Likewise.
1076 (cleanup_load): Likewise.
1077 (cleanup_store): Likewise.
1078 (arm_copy_extra_ld_st): Likewise.
1079 (install_load_store): Likewise.
1080 (thumb2_copy_load_literal): Likewise.
1081 (thumb2_copy_load_reg_imm): Likewise.
1082 (arm_copy_ldr_str_ldrb_strb): Likewise.
1083 (cleanup_block_load_all): Likewise.
1084 (cleanup_block_store_pc): Likewise.
1085 (cleanup_block_load_pc): Likewise.
1086 (arm_copy_block_xfer): Likewise.
1087 (thumb2_copy_block_xfer): Likewise.
1088 (cleanup_svc): Likewise.
1089 (install_svc): Likewise.
1090 (arm_copy_svc): Likewise.
1091 (thumb_copy_svc): Likewise.
1092 (arm_copy_undef): Likewise.
1093 (thumb_32bit_copy_undef): Likewise.
1094 (arm_copy_unpred): Likewise.
1095 (arm_decode_misc_memhint_neon): Likewise.
1096 (arm_decode_unconditional): Likewise.
1097 (arm_decode_miscellaneous): Likewise.
1098 (arm_decode_dp_misc): Likewise.
1099 (arm_decode_ld_st_word_ubyte): Likewise.
1100 (arm_decode_media): Likewise.
1101 (arm_decode_b_bl_ldmstm): Likewise.
1102 (arm_decode_ext_reg_ld_st): Likewise.
1103 (thumb2_decode_dp_shift_reg): Likewise.
1104 (thumb2_decode_ext_reg_ld_st): Likewise.
1105 (arm_decode_svc_copro): Likewise.
1106 (thumb2_decode_svc_copro): Likewise.
1107 (install_pc_relative): Likewise.
1108 (thumb_copy_pc_relative_16bit): Likewise.
1109 (thumb_decode_pc_relative_16bit): Likewise.
1110 (thumb_copy_pc_relative_32bit): Likewise.
1111 (thumb_copy_16bit_ldr_literal): Likewise.
1112 (thumb_copy_cbnz_cbz): Likewise.
1113 (thumb2_copy_table_branch): Likewise.
1114 (cleanup_pop_pc_16bit_all): Likewise.
1115 (thumb_copy_pop_pc_16bit): Likewise.
1116 (thumb_process_displaced_16bit_insn): Likewise.
1117 (decode_thumb_32bit_ld_mem_hints): Likewise.
1118 (thumb_process_displaced_32bit_insn): Likewise.
1119 (thumb_process_displaced_insn): Likewise.
1120 (arm_process_displaced_insn): Likewise.
1121 (arm_displaced_init_closure): Likewise.
1122 (arm_displaced_step_fixup): Add cast for closure.
1123 * arm-tdep.h: Include infrun.h.
1124 (displaced_step_closure): Rename to ...
1125 (arm_displaced_step_closure): ... this, extend
1126 displaced_step_closure.
1127 <u::svc::copy_svc_os>: Change type of parameter DSC.
1128 <cleanup>: Likewise.
1129 (arm_process_displaced_insn): Likewise.
1130 (arm_displaced_init_closure): Likewise.
1131 (displaced_read_reg): Likewise.
1132 (displaced_write_reg): Likewise.
1133 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1134 Adjust.
1135 * i386-tdep.h: Include infrun.h.
1136 (i386_displaced_step_closure): New typedef.
1137 * i386-tdep.c (i386_displaced_step_copy_insn): Use
1138 i386_displaced_step_closure.
1139 (i386_displaced_step_fixup): Adjust.
1140 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
1141 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
1142 and unique_ptr.
1143 (ppc_displaced_step_fixup): Adjust.
1144 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
1145 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
1146 and unique_ptr.
1147 (s390_displaced_step_fixup): Adjust.
1148
1149 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
1150
1151 * interps.h (interp_resume, interp_suspend, interp_set_temp):
1152 Remove declarations.
1153
1154 2017-10-20 Tom Tromey <tom@tromey.com>
1155
1156 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
1157 std::vector.
1158 (gdb_bfd_record_inclusion): Update.
1159 (bfdp): Remove typedef.
1160
1161 2017-10-20 Tom Tromey <tom@tromey.com>
1162
1163 * gdb_bfd.c (gdb_bfd_ref): Use new.
1164 (struct gdb_bfd_data): Add constructor, destructor, and member
1165 initializers.
1166 (gdb_bfd_unref): Use delete.
1167
1168 2017-10-20 Tom Tromey <tom@tromey.com>
1169
1170 * exec.c (exec_file_attach): Use new_bfd_ref.
1171 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
1172 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
1173 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
1174 new_bfd_ref.
1175 * gdb_bfd.h (new_bfd_ref): New function.
1176
1177 2017-10-20 Pedro Alves <palves@redhat.com>
1178
1179 * main.c (captured_command_loop): Add attribute noinline.
1180
1181 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * interps.c (struct interp_factory): Add constructor.
1184 (interp_factory_p): Remove typedef.
1185 (DEF_VEC_P(interp_factory_p)): Remove.
1186 (interpreter_factories): Change type to std::vector.
1187 (interp_factory_register): Adjust.
1188 (interp_lookup): Adjust.
1189 (interpreter_completer): Adjust.
1190
1191 2017-10-19 Tom Tromey <tom@tromey.com>
1192
1193 * break-catch-syscall.c (catch_syscall_completer): Use
1194 std::string, gdb::unique_xmalloc_ptr.
1195
1196 2017-10-19 Tom Tromey <tom@tromey.com>
1197
1198 * infcall.c (call_function_by_hand_dummy): Use std::string.
1199
1200 2017-10-19 Tom Tromey <tom@tromey.com>
1201
1202 * mi/mi-main.c (mi_cmd_execute): Update.
1203 * top.h (prepare_execute_command): Return scoped_value_mark.
1204 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
1205 Add move constructor.
1206 * top.c (prepare_execute_command): Return scoped_value_mark.
1207 (execute_command): Update.
1208
1209 2017-10-19 Pedro Alves <palves@redhat.com>
1210
1211 * xml-support.c (xml_fetch_content_from_file): Check fread's
1212 return.
1213
1214 2017-10-19 Pedro Alves <palves@redhat.com>
1215
1216 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
1217 async.
1218 (handle_error_fd): New function.
1219 (ser_base_async): Add/delete an event loop file handler for
1220 error_fd.
1221
1222 2017-10-19 Pedro Alves <palves@redhat.com>
1223
1224 * xml-support.c (xml_fetch_content_from_file): Don't read in
1225 chunks. Instead use fseek to determine the file's size, and read
1226 it in one go.
1227
1228 2017-11-18 Keith Seitz <keiths@redhat.com>
1229
1230 * c-exp.y (oper): Canonicalize conversion operators of user-defined
1231 types.
1232 Add whitespace to front of type name.
1233
1234 2017-10-18 Keith Seitz <keiths@redhat.com>
1235
1236 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
1237 DW_AT_accessibility.
1238
1239 2017-10-18 Yao Qi <yao.qi@linaro.org>
1240
1241 * features/tic6x-c62x-linux.c: Remove.
1242
1243 2017-10-17 Tom Tromey <tom@tromey.com>
1244
1245 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
1246 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
1247 (do_mixed_source_and_assembly): Likewise.
1248
1249 2017-10-17 Tom Tromey <tom@tromey.com>
1250
1251 * regcache.c (regcache::xfer_part): Remove assertion.
1252
1253 2017-10-17 Pedro Alves <palves@redhat.com>
1254
1255 * xml-support.c (xml_fetch_content_from_file): Call
1256 unique_ptr::release() instead unique_ptr::get() when passing
1257 through xrealloc.
1258
1259 2017-10-17 Yao Qi <yao.qi@linaro.org>
1260
1261 * regcache.c (regcache::xfer_part): Remove parameters read and
1262 write, add parameter is_raw. All callers are updated.
1263
1264 2017-10-16 Keith Seitz <keiths@redhat.com>
1265
1266 * c-typeprint.c (enum access_specifier): Moved here from
1267 c_type_print_base.
1268 (output_access_specifier): New function.
1269 (c_type_print_base): Consider typedefs when assessing
1270 whether access labels are needed.
1271 Use output_access_specifier as needed.
1272 Output access specifier for typedefs, if needed.
1273 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
1274 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
1275 fields.
1276 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
1277 accessor macros.
1278
1279 2017-10-16 Tom Tromey <tom@tromey.com>
1280
1281 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
1282 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
1283 * target.c (target_fileio_read_stralloc): Update.
1284 * sparc64-tdep.c (adi_is_addr_mapped): Update.
1285 * target.h (target_fileio_read_stralloc): Return
1286 unique_xmalloc_ptr.
1287
1288 2017-10-16 Tom Tromey <tom@tromey.com>
1289
1290 * xml-syscall.c (xml_init_syscalls_info): Update.
1291 * xml-support.c (xinclude_start_include): Update.
1292 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
1293 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
1294 (xml_fetch_content_from_file): Likewise.
1295 * osdata.c (get_osdata): Update.
1296 * target.h (target_read_stralloc, target_get_osdata): Return
1297 unique_xmalloc_ptr.
1298 * solib-aix.c (solib_aix_get_library_list): Update.
1299 * solib-target.c (solib_target_current_sos): Update.
1300 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
1301 * xml-tdesc.c (fetch_available_features_from_target): Update.
1302 (target_fetch_description_xml): Update.
1303 (file_read_description_xml): Update.
1304 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
1305 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
1306 (remote_pid_to_exec_file): Update.
1307 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
1308 (target_get_osdata): Likewise.
1309
1310 2017-10-16 Tom Tromey <tom@tromey.com>
1311
1312 * remote.c (remote_register_number_and_offset): Use std::vector.
1313 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
1314 (putpkt_binary): Use gdb::def_vector.
1315 (compare_sections_command): Use gdb::byte_vector.
1316
1317 2017-10-16 Tom Tromey <tom@tromey.com>
1318
1319 * ppc-linux-nat.c (hwdebug_insert_point): Use
1320 gdb::unique_xmalloc_ptr, XDUP.
1321
1322 2017-10-16 Tom Tromey <tom@tromey.com>
1323
1324 * probe.c (parse_probes): Use std::string.
1325 (info_probes_for_ops, enable_probes_command)
1326 (disable_probes_command): Remove cleanups.
1327
1328 2017-10-16 Tom Tromey <tom@tromey.com>
1329
1330 * buildsym.c (block_compar): Remove.
1331 (end_symtab_get_static_block): Use std::vector.
1332
1333 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
1334
1335 * memrange.h (struct mem_range): Define operator< and operator==.
1336 (mem_range_s): Remove.
1337 (DEF_VEC_O (mem_range_s)): Remove.
1338 (normalize_mem_ranges): Change parameter type to std::vector.
1339 * memrange.c (compare_mem_ranges): Remove.
1340 (normalize_mem_ranges): Change parameter type to std::vector,
1341 adjust to vector change.
1342 * exec.c (section_table_available_memory): Return vector, remove
1343 parameter.
1344 (section_table_read_available_memory): Adjust to std::vector
1345 change.
1346 * remote.c (remote_read_bytes): Adjust to std::vector
1347 change.
1348 * tracepoint.h (traceframe_available_memory): Change parameter
1349 type to std::vector.
1350 * tracepoint.c (traceframe_available_memory): Change parameter
1351 type to std::vector, adjust.
1352 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
1353 std::vector change.
1354 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1355 unittests/memrange-selftests.c.
1356 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
1357 * gdb/unittests/memrange-selftests.c: New file.
1358
1359 2017-10-16 Pedro Alves <palves@redhat.com>
1360
1361 * elfread.c (probe_key_free): Rename range-for variable.
1362 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
1363 (find_probe_by_pc, collect_probes): Rename range-for variable.
1364
1365 2017-10-16 Yao Qi <yao.qi@linaro.org>
1366
1367 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
1368 * features/tic6x-c62x.c: Remove.
1369 * features/tic6x-c64x-linux.c: Remove.
1370 * features/tic6x-c64x.c: Remove.
1371 * features/tic6x-c64xp-linux.c: Remove.
1372 * features/tic6x-c64xp.c: Remove.
1373 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
1374 initialize_tdesc_tic6x_*_linux functions.
1375 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
1376 initialize_tdesc_tic6x_* functions.
1377
1378 2017-10-16 Yao Qi <yao.qi@linaro.org>
1379
1380 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
1381 tic6x-c62x.
1382 * regformats/tic6x-c62x.dat: Remove.
1383 * regformats/tic6x-c64x.dat: Remove.
1384 * regformats/tic6x-c64xp.dat: Remove.
1385
1386 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
1387
1388 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
1389 (the !HAVE_LIBEXPAT version).
1390
1391 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1392
1393 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
1394 const.
1395
1396 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * target.h: Include tracepoint.h.
1399 (enum trace_find_type): Move to tracepoint.h.
1400 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
1401 * tracepoint.h: Don't include target.h
1402 (enum trace_find_type): Move from target.h.
1403 (parse_traceframe_info): Return a unique ptr.
1404 * tracepoint.c (current_traceframe_info): Change type to unique
1405 ptr.
1406 (free_traceframe_info): Remove.
1407 (clear_traceframe_info): Don't manually free
1408 current_traceframe_info.
1409 (free_result): Remove.
1410 (parse_traceframe_info): Return a unique ptr.
1411 (get_traceframe_info): Adjust to unique ptr.
1412 * ctf.c (ctf_traceframe_info): Return a unique ptr.
1413 * remote.c (remote_traceframe_info): Return a unique ptr.
1414 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
1415 ptr.
1416 * target-debug.h (target_debug_print_traceframe_info_up): New
1417 macro.
1418 * target-delegates.c: Regenerate.
1419
1420 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1421
1422 * memrange.h (struct mem_range): Add constructors.
1423 * tracepoint.h (struct traceframe_info) <memory>: Change type to
1424 std::vector<mem_range>.
1425 * tracepoint.c (free_traceframe_info): Don't manually free
1426 vector.
1427 (traceframe_info_start_memory): Adjust to vector change.
1428 (traceframe_available_memory): Likewise.
1429 * tracefile-tfile.c (build_traceframe_info): Likewise.
1430 * ctf.c (ctf_traceframe_info): Likewise.
1431
1432 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1433
1434 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
1435 std::vector<int>.
1436 * tracepoint.c (free_traceframe_info): Deallocate with delete.
1437 (traceframe_info_start_tvar): Adjust to vector change.
1438 (parse_traceframe_info): Allocate with new.
1439 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
1440 vector change.
1441 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
1442 change.
1443 tfile_traceframe_info): Allocate with new.
1444 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
1445 change.
1446
1447 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1448
1449 * tracepoint.c (traceframe_info): Rename to...
1450 (current_traceframe_info): ...this.
1451 (clear_traceframe_info): Adjust.
1452 (get_traceframe_info): Adjust.
1453
1454 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1455
1456 * nat/linux-osdata.c: Include algorithm.
1457 (compare_processes): Remove.
1458 (struct pid_pgid_entry): New struct.
1459 (linux_xfer_osdata_processgroups): Use std::vector instead of
1460 XNEWVEC.
1461
1462 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
1463
1464 * objfiles.h: Don't include symfile.h.
1465 (struct partial_symbol): Remove forward-declaration.
1466 (struct objfile) <global_psymbols, static_psymbols>: Change type
1467 to std::vector<partial_symbol *>.
1468 * objfiles.c (objfile::objfile): Don't memset those fields.
1469 (objfile::~objfile): Don't free those fields.
1470 * psympriv.h (struct psymbol_allocation_list): Remove
1471 forward-declaration.
1472 (add_psymbol_to_list): Change psymbol_allocation_list parameter
1473 to std::vector.
1474 (start_psymtab_common): Change parameters to std::vector.
1475 * psymtab.c: Include algorithm.
1476 (require_partial_symbols): Call shrink_to_fit.
1477 (find_pc_sect_psymbol): Adjust to vector change.
1478 (match_partial_symbol): Likewise.
1479 (lookup_partial_symbol): Likewise.
1480 (psym_relocate): Likewise.
1481 (dump_psymtab): Likewise.
1482 (recursively_search_psymtabs): Likewise.
1483 (compare_psymbols): Remove.
1484 (sort_pst_symbols): Adjust to vector change.
1485 (start_psymtab_common): Likewise.
1486 (end_psymtab_common): Likewise.
1487 (psymbol_bcache_full): De-constify return value.
1488 (add_psymbol_to_bcache): Likewise.
1489 (extend_psymbol_list): Remove.
1490 (append_psymbol_to_list): Adjust to vector change.
1491 (add_psymbol_to_list): Likewise.
1492 (init_psymbol_list): Likewise.
1493 (maintenance_info_psymtabs): Likewise.
1494 (maintenance_check_psymtabs): Likewise.
1495 * symfile.h (struct psymbol_allocation_list): Remove.
1496 * symfile.c (reread_symbols): Adjust to vector change.
1497 * dbxread.c (start_psymtab): Change type of parameters.
1498 (dbx_symfile_read): Adjust to vector change.
1499 (read_dbx_symtab): Likewise.
1500 (start_psymtab): Change type of parameters.
1501 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
1502 (create_partial_symtab): Likewise.
1503 (add_partial_symbol): Likewise.
1504 (write_one_signatured_type): Likewise.
1505 (recursively_write_psymbols): Likewise.
1506 * mdebugread.c (parse_partial_symbols): Likewise.
1507 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
1508 (scan_xcoff_symtab): Adjust to vector change.
1509 (xcoff_initial_scan): Likewise.
1510
1511 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
1512
1513 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
1514
1515 2017-10-13 Yao Qi <yao.qi@linaro.org>
1516
1517 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
1518 Remove s390x-*-expedite, add s390x-expedite.
1519
1520 2017-10-13 Yao Qi <yao.qi@linaro.org>
1521
1522 * features/s390-gs-linux64.c: Regenerated.
1523 * features/s390x-gs-linux64.c: Regenerated.
1524
1525 2017-10-13 Tom Tromey <tom@tromey.com>
1526
1527 * compile/compile-object-run.c (do_module_cleanup): Use delete.
1528 * solib.c (update_solib_list, reload_shared_libraries_1): Use
1529 delete.
1530 * symfile.c (symbol_file_add_with_addrs): Use new.
1531 (symbol_file_add_separate): Update comment.
1532 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
1533 * jit.c (jit_object_close_impl): Use new.
1534 (jit_unregister_code): Use delete.
1535 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
1536 (~objfile): Rename from free_objfile.
1537 (free_objfile_separate_debug, do_free_objfile_cleanup)
1538 (free_all_objfiles, objfile_purge_solibs): Use delete.
1539 * objfiles.h (struct objfile): Add constructor and destructor.
1540 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
1541 (allocate_objfile, free_objfile): Don't declare.
1542 (struct objstats): Add initializers.
1543
1544 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1545
1546 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
1547 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
1548 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
1549 * gdbarch.h: Regenerate.
1550 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
1551 Adjust comment.
1552 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
1553 (i386_displaced_step_fixup): Adjust comment.
1554 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
1555
1556 2017-10-12 Tom Tromey <tom@tromey.com>
1557
1558 * prologue-value.h (pv_area::store_would_trash): Return bool.
1559 (pv_area::find_reg): Likewise.
1560 * prologue-value.c (pv_area::store_would_trash): Return bool.
1561 (pv_area::find_reg): Likewise.
1562
1563 2017-10-12 Tom Tromey <tom@tromey.com>
1564
1565 * s390-linux-tdep.c (s390_store, s390_load)
1566 (s390_check_for_saved, s390_analyze_prologue): Update.
1567 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
1568 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
1569 * prologue-value.h (class pv_area): Move from prologue-value.c.
1570 Change names of members. Add constructor, destructor, member
1571 functions.
1572 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
1573 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
1574 (pv_area_fetch, pv_area_scan): Don't declare.
1575 * prologue-value.c (struct pv_area::area_entry): Now member of
1576 pv_area.
1577 (struct pv_area): Move to prologue-value.h.
1578 (pv_area::pv_area): Rename from make_pv_area.
1579 (pv_area::~pv_area): Rename from free_pv_area.
1580 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
1581 (clear_entries, find_entry, overlaps, store_would_trash, store)
1582 (fetch, find_reg, scan): Now member of pv_area.
1583 Remove "area" argument. Update.
1584 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
1585 Update.
1586 * mn10300-tdep.c (push_reg, check_for_saved)
1587 (mn10300_analyze_prologue): Update.
1588 * mep-tdep.c (is_arg_spill, check_for_saved)
1589 (mep_analyze_prologue): Update.
1590 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
1591 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
1592 (m32c_is_struct_return, m32c_analyze_prologue): Update.
1593 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
1594 Update.
1595 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
1596 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
1597
1598 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1599
1600 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
1601 * linux-nat.c (linux_nat_delete_thread): New variable.
1602 (lwp_free): Invoke linux_nat_delete_thread if set.
1603 (linux_nat_set_delete_thread): New function.
1604 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
1605 thread delete callback.
1606 * arm-linux-nat.c (arm_linux_delete_thread): New function.
1607 (_initialize_arm_linux_nat): Assign thread delete callback.
1608 * s390-linux-nat.c (s390_delete_thread): New function.
1609 (_initialize_s390_nat): Assign thread delete callback.
1610 * x86-linux-nat.c (x86_linux_add_target): Likewise.
1611 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
1612 function.
1613 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
1614 declaration.
1615 * nat/x86-linux.c (x86_linux_delete_thread): New function.
1616 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
1617
1618 2017-10-09 Tom Tromey <tom@tromey.com>
1619
1620 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
1621 std::string.
1622 * tui/tui-layout.c (enum tui_status): Use std::string.
1623
1624 2017-10-11 Tom Tromey <tom@tromey.com>
1625
1626 * gdbthread.h (thread_command): Constify.
1627 * inferior.h (detach_command): Constify.
1628 * top.h (set_history, show_history): Constify.
1629 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
1630 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
1631 * bsd-kvm.c (bsd_kvm_cmd): Constify.
1632 * printcmd.c (set_command): Constify.
1633 (non_const_set_command): New function.
1634 * dcache.c (set_dcache_command, show_dcache_command): Constify.
1635 * breakpoint.c (enable_command, disable_command, delete_command)
1636 (catch_command, tcatch_command, set_breakpoint_cmd)
1637 (show_breakpoint_cmd): Constify.
1638 * macrocmd.c (macro_command): Constify.
1639 * infcmd.c (unset_command, kill_command, detach_command)
1640 (info_proc_cmd): Constify.
1641 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
1642 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
1643 (info_auto_load_cmd): Constify.
1644 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
1645 (unset_tdesc_cmd): Constify.
1646 * ada-lang.c (set_ada_command, show_ada_command)
1647 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
1648 * guile/guile.c (set_guile_command, show_guile_command)
1649 (info_guile_command): Constify.
1650 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
1651 Constify.
1652 * skip.c (skip_command): Constify.
1653 * compile/compile.c (_initialize_compile): Constify.
1654 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
1655 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
1656 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
1657 (maint_btrace_pt_show_cmd): Constify.
1658 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
1659 Constify.
1660 * python/python.c (user_show_python, user_set_python): Constify.
1661 * mips-tdep.c (set_mips_command, show_mips_command)
1662 (set_mipsfpu_command): Constify.
1663 * record-btrace.c (cmd_record_btrace_start)
1664 (cmd_set_record_btrace, cmd_show_record_btrace)
1665 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
1666 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
1667 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
1668 Constify.
1669 * symfile.c (overlay_command): Constify.
1670 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
1671 * cli/cli-logging.c (set_logging_command, show_logging_command):
1672 Constify.
1673 * cli/cli-dump.c (dump_command, append_command)
1674 (srec_dump_command, ihex_dump_command, verilog_dump_command)
1675 (tekhex_dump_command, binary_dump_command)
1676 (binary_append_command): Constify.
1677 * cli/cli-decode.c (struct cmd_list_element): Change type of
1678 "fun".
1679 * cli/cli-cmds.c (info_command, show_command, set_debug)
1680 (show_debug): Constify.
1681 (show_command): Add non-const overload.
1682 * top.c (set_history, show_history): Constify.
1683 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
1684 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
1685 * target.c (target_command): Constify.
1686 * sparc64-tdep.c (info_adi_command): Constify.
1687 * record-full.c (cmd_record_full_start): Constify.
1688 (set_record_full_command): Constify. Fix typo.
1689 (show_record_full_command): Constify.
1690 * thread.c (thread_command, thread_apply_command): Constify.
1691 * memattr.c (dummy_cmd): Constify.
1692 * value.c (function_command): Constify.
1693 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
1694 * probe.c (info_probes_command): Constify.
1695 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
1696 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
1697 (show_thread_cmd, set_thread_default_cmd)
1698 (show_thread_default_cmd): Constify.
1699 (check_empty): Constify.
1700 * tracepoint.c (tfind_command): Constify.
1701 * cp-support.c (maint_cplus_command): Constify.
1702 * windows-tdep.c (info_w32_command): Constify.
1703 * record.c (cmd_record_start, set_record_command)
1704 (show_record_command, info_record_command, cmd_record_goto):
1705 Constify.
1706 * ravenscar-thread.c (set_ravenscar_command)
1707 (show_ravenscar_command): Constify.
1708 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
1709 Constify.
1710 (add_internal_problem_command): Remove casts.
1711 * arc-tdep.c (maintenance_print_arc_command): Constify.
1712 * valprint.c (set_print, show_print, set_print_raw)
1713 (show_print_raw): Constify.
1714 * maint.c (maintenance_command, maintenance_info_command)
1715 (maintenance_print_command, maintenance_set_cmd)
1716 (maintenance_show_cmd, set_per_command_cmd)
1717 (show_per_command_cmd, maintenance_check_command): Constify.
1718 * language.c (set_check, show_check): Constify.
1719 * typeprint.c (show_print_type, set_print_type): Constify.
1720 * go32-nat.c (go32_info_dos_command): Constify.
1721
1722 2017-10-11 Tom Tromey <tom@tromey.com>
1723
1724 * breakpoint.c (prepare_re_set_context): Remove.
1725 (breakpoint_re_set_one): Update. Don't use cleanups.
1726 (breakpoint_re_set): Use scoped_restore, std::string, and
1727 scoped_restore_current_language.
1728
1729 2017-10-11 Tom Tromey <tom@tromey.com>
1730
1731 * breakpoint.c (commands_command_1): Use std::string.
1732 (cleanup_executing_breakpoints): Remove.
1733 (bpstat_do_actions_1): Use scoped_restore.
1734 (bpstat_check_watchpoint): Use std::string.
1735 (decode_static_tracepoint_spec): Likewise.
1736 (break_range_command): Likewise.
1737 (watch_command_1): Likewise.
1738 (compare_breakpoints): Change argument types.
1739 (clear_command): Use std::vector.
1740 (cleanup_executing_breakpoints): Remove.
1741 (update_global_location_list): Use unique_xmalloc_ptr.
1742 (strace_command): Remove unused declaration.
1743
1744 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1745
1746 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
1747 * NEWS: Mention new FreeBSD/arm native configuration.
1748 * configure.host: Add arm*-*-freebsd*.
1749 * configure.nat: Likewise.
1750 * arm-fbsd-nat.c: New file.
1751
1752 2017-10-11 John Baldwin <jhb@FreeBSD.org>
1753
1754 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
1755 (ALLDEPFILES): Add arm-fbsd-tdep.c.
1756 * NEWS: Mention new FreeBSD/arm target.
1757 * configure.tgt: Add arm*-*-freebsd*.
1758 * arm-fbsd-tdep.c: New file.
1759 * arm-fbsd-tdep.h: New file.
1760
1761 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1762
1763 * linux-tdep.c (linux_make_corefile_notes): Remove call to
1764 `gdbarch_elfcore_write_linux_prpsinfo'.
1765 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
1766 method.
1767 (elf_internal_linux_prpsinfo): Remove declaration.
1768 * gdbarch.h: Regenerate.
1769 * gdbarch.c: Regenerate.
1770
1771 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
1772
1773 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
1774 `set_gdbarch_elfcore_write_linux_prpsinfo'.
1775
1776 2017-10-11 Pedro Alves <palves@redhat.com>
1777
1778 * breakpoint.c (reattach_breakpoints): Delete.
1779 * breakpoint.h (reattach_breakpoints): Delete.
1780
1781 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
1782
1783 * symfile.c (registered_sym_fns): Make struct, not typedef.
1784 (DEF_VEC_O (registered_sym_fns)): Remove.
1785 (symtab_fns): Change type to std::vector.
1786 (add_symtab_fns): Adjust.
1787 (find_sym_fns): Adjust.
1788
1789 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
1790
1791 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
1792 * arc-tdep.h (arc_arch_is_em): New function.
1793 (arc_arch_is_hs): Likewise.
1794
1795 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
1796
1797 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
1798 parentheses in the declaration.
1799 (macro_lookup_inclusion): Likewise.
1800 (macro_lookup_definition): Likewise.
1801 * p-lang.h (pascal_builtin_types): Likewise.
1802 * tui/tui-data.c (tui_win_list): Likewise.
1803 * tui/tui-data.h (tui_win_list): Likewise.
1804 * utils.h (make_cleanup_free_section_addr_info): Likewise.
1805
1806 2017-10-11 Mark Rages <markrages@gmail.com>
1807
1808 * target-memory.c (block_boundaries): Fix for block address not
1809 aligned on block size.
1810
1811 2017-10-10 Pedro Alves <palves@redhat.com>
1812 Tom Tromey <tom@tromey.com>
1813
1814 * breakpoint.c (struct captured_breakpoint_query_args)
1815 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
1816 (print_breakpoint): New.
1817 * breakpoint.h (print_breakpoint): Declare.
1818 * common/common-exceptions.h (enum return_reason): Remove
1819 references to catch_exceptions.
1820 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
1821 Delete.
1822 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
1823 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
1824 * gdb.h: Delete.
1825 * gdbthread.h (thread_select): Declare.
1826 * mi/mi-cmd-break.c: Don't include gdb.h.
1827 (breakpoint_notify): Use print_breakpoint.
1828 * mi/mi-cmd-catch.c: Don't include gdb.h.
1829 * mi/mi-interp.c: Don't include gdb.h.
1830 (mi_print_breakpoint_for_event): New.
1831 (mi_breakpoint_created, mi_breakpoint_modified): Use
1832 mi_print_breakpoint_for_event.
1833 * mi/mi-main.c: Don't include gdb.h.
1834 (mi_cmd_thread_select): Parse the global thread ID here. Use
1835 thread_select instead of gdb_thread_select.
1836 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
1837 of using gdb_list_thread_ids.
1838 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
1839 FILEIO_ENOSYS here.
1840 (remote_fileio_request): Use TRY/CATCH instead of
1841 catch_exceptions.
1842 * symfile-mem.c (struct symbol_file_add_from_memory_args)
1843 (symbol_file_add_from_memory_wrapper): Delete.
1844 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
1845 * thread.c: Don't include gdb.h.
1846 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
1847 (thread_alive): Use thread_select.
1848 (do_captured_thread_select): Delete, parts salvaged as ...
1849 (thread_select): ... this new function.
1850 (gdb_thread_select): Delete.
1851
1852 2017-10-10 Pedro Alves <palves@redhat.com>
1853 Tom Tromey <tom@tromey.com>
1854
1855 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
1856 and reverse logic.
1857 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
1858 No longer macros. Instead ...
1859 (enum wp_check_result): They're now values of this new
1860 enumeration.
1861 (watchpoint_check): Change return type to wp_check_result and
1862 parameter type to bpstat.
1863 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
1864 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
1865 catch_errors. Reverse logic of watchpoint_check call.
1866 (breakpoint_re_set_one): Now returns void and takes a breakpoint
1867 pointer as parameter.
1868 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
1869 * common/common-exceptions.c (throw_exception_sjlj): Update
1870 comments to avoid mentioning catch_errors.
1871 * exceptions.c (catch_errors): Delete.
1872 * exceptions.h: Update comments to avoid mentioning catch_errors.
1873 (catch_errors_ftype, catch_errors): Delete.
1874 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
1875 (hook_stop_stub): Delete.
1876 (restore_selected_frame): Change return type to void, and
1877 parameter type to const frame_id &.
1878 (restore_infcall_control_state): Use TRY/CATCH instead of
1879 catch_errors.
1880 * main.c (captured_command_loop): Return void and remove
1881 parameter. Remove references to catch_errors.
1882 (captured_main): Use TRY/CATCH instead of catch_errors.
1883 * objc-lang.c (objc_submethod_helper_data)
1884 (find_objc_msgcall_submethod_helper): Delete.
1885 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
1886 catch_errors.
1887 * record-full.c (record_full_message): Return void.
1888 (record_full_message_args, record_full_message_wrapper): Delete.
1889 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
1890 instead of catch_errors.
1891 * solib-aix.c (solib_aix_open_symbol_file_object): Change
1892 parameter type to int.
1893 * solib-darwin.c (open_symbol_file_object): Ditto.
1894 * solib-dsbt.c (open_symbol_file_object): Ditto.
1895 * solib-frv.c (open_symbol_file_object): Ditto.
1896 * solib-svr4.c (open_symbol_file_object): Ditto.
1897 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
1898 * solib.c (update_solib_list): Use TRY/CATCH instead of
1899 catch_errors.
1900 * solist.h (struct target_so_ops) <open_symbol_file_object>:
1901 Change type.
1902 * symmisc.c (struct print_symbol_args): Remove.
1903 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
1904 (print_symbol): Change type.
1905 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
1906 and remove parameters.
1907 (catch_errors): New.
1908 (get_windows_debug_event): Adjust.
1909
1910 2017-10-09 Tom Tromey <tom@tromey.com>
1911
1912 * mi/mi-main.c (free_splay_tree): Remove.
1913 (list_available_thread_groups): Use splay_tree_up.
1914 * common/gdb_splay_tree.h: New file.
1915
1916 2017-10-09 Tom Tromey <tom@tromey.com>
1917
1918 * mi/mi-main.c (do_nothing): Remove.
1919 (list_available_thread_groups): Update.
1920
1921 2017-10-09 Pedro Alves <palves@redhat.com>
1922
1923 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
1924 reading registers when switching context.
1925
1926 2017-10-09 John Baldwin <jhb@FreeBSD.org>
1927
1928 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
1929 (fbsd_convert_siginfo): Likewise.
1930 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
1931
1932 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
1933
1934 * configure.ac (try_guile_versions): Remove guile-2.2.
1935 * configure: Regenerate.
1936
1937 2017-10-09 Tom Tromey <tom@tromey.com>
1938
1939 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
1940 (COMPILE.pre): Use $(CXX).
1941
1942 2017-10-09 Pedro Alves <palves@redhat.com>
1943
1944 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
1945 Use bool.
1946 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1947 * cp-support.h (cp_remove_params): Now returns a
1948 gdb::unique_xmalloc_ptr.
1949 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
1950 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
1951 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
1952 returning a gdb::unique_xmalloc_ptr.
1953 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
1954 * stack.c (find_frame_funname): Adjust to cp_remove_params
1955 returning a gdb::unique_xmalloc_ptr.
1956
1957 2017-10-08 Tom Tromey <tom@tromey.com>
1958
1959 * dwarf2read.c (dwarf2_get_dwz_file): Use
1960 gdb::unique_xmalloc_ptr.
1961 (find_slot_in_mapped_hash): Likewise.
1962 (dwarf2_physname): Likewise.
1963 (create_dwo_unit_in_dwp_v1): Use std::string.
1964 (create_dwo_unit_in_dwp_v2): Likewise.
1965 (lookup_dwo_cutu): Likewise.
1966 (inherit_abstract_dies): Use std::vector.
1967 (read_array_type): Likewise.
1968 (dwarf_decode_macros): Remove unused declaration.
1969 (unsigned_int_compar): Remove.
1970 (dwarf2_build_psymtabs_hard): Use scoped_restore.
1971 (psymtabs_addrmap_cleanup): Remove.
1972
1973 2017-10-08 Tom Tromey <tom@tromey.com>
1974
1975 * frame-unwind.c (frame_unwind_try_unwinder): Update.
1976 * frame.h (frame_cleanup_after_sniffer): Declare.
1977 (frame_prepare_for_sniffer): Return void.
1978 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
1979 type of argument.
1980 (frame_prepare_for_sniffer): Return void.
1981
1982 2017-10-08 Tom Tromey <tom@tromey.com>
1983
1984 * utils.h (make_cleanup_value_free): Remove.
1985 * utils.c (do_value_free, struct cleanup): Remove.
1986 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
1987 Use gdb_value_up.
1988 * value.h (struct value_deleter): New.
1989 (gdb_value_up): New typedef.
1990
1991 2017-10-08 Tom Tromey <tom@tromey.com>
1992
1993 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
1994 (make_cleanup_free_search_symbols): Remove.
1995 (search_symbols): Return std::vector.
1996 (symbol_search::compare_search_syms): Now member of
1997 symbol_search. Change arguments.
1998 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
1999 (symtab_symbol_info, rbreak_command): Update.
2000 * symtab.h (struct symbol_search) <next>: Remove.
2001 Add constructors.
2002 (symbol_search::operator<): New function.
2003 (symbol_search::operator==): New function.
2004 (search_symbols): Remove std::vector.
2005 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
2006 (symbol_search::compare_search_syms): Declare.
2007
2008 2017-10-06 Yao Qi <yao.qi@linaro.org>
2009
2010 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
2011 arch/aarch64-insn.o.
2012 Remove one rule.
2013 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
2014
2015 2017-10-06 Yao Qi <yao.qi@linaro.org>
2016
2017 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
2018 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
2019 arch/arm-linux.o respectively.
2020 * configure.tgt: Likewise.
2021
2022 2017-10-06 Yao Qi <yao.qi@linaro.org>
2023
2024 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
2025 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
2026
2027 2017-10-06 Pedro Alves <palves@redhat.com>
2028
2029 * windows-nat.c: Include <algorithm>.
2030
2031 2017-10-06 Yao Qi <yao.qi@linaro.org>
2032
2033 * configure.tgt (i386_tobjs): New variable.
2034 (amd64_tobjs): New variable.
2035 Set $cpu_obs and $os_obs.
2036
2037 2017-10-06 Yao Qi <yao.qi@linaro.org>
2038
2039 * Makefile.in (CONFIG_SRC_SUBDIR): New.
2040 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
2041 (clean): Remove object files and dependency files.
2042 (distclean): Remove the directory.
2043 * configure.ac: Invoke AC_CONFIG_COMMANDS.
2044 * configure: Re-generated.
2045 * configure.tgt: Replace amd64.o with arch/amd64.o.
2046
2047 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
2048
2049 PR build/22188
2050 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
2051 and SETEND.
2052
2053 2017-10-05 Pedro Alves <palves@redhat.com>
2054
2055 * linux-nat.c (linux_child_follow_fork): When following the parent
2056 and detaching the child, consult the parent thread's architecture
2057 instead of the child's.
2058
2059 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2060
2061 * ax.h: Do not include "doublest.h".
2062 (union agent_val): Remove.
2063
2064 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2065
2066 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
2067 (decimal_to_string): Return std::string object.
2068 (decimal_from_string): Accept std::string object. Return bool.
2069 (decimal_from_integral, decimal_from_doublest): Remove.
2070 (decimal_from_longest): Add prototype.
2071 (decimal_from_ulongest): Likewise.
2072 (decimal_to_longest): Likewise.
2073 (decimal_from_doublest): Likewise.
2074 * dfp.c: Do not include "gdbtypes.h" or "value.h".
2075 (MAX_DECIMAL_STRING): Move here.
2076 (decimal_to_string): Return std::string object.
2077 (decimal_from_string): Accept std::string object. Return bool.
2078 (decimal_from_integral): Remove, replace by ...
2079 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
2080 (decimal_to_longest): New function.
2081 (decimal_from_floating): Remove, replace by ...
2082 (decimal_from_doublest): ... this new function.
2083 (decimal_to_doublest): Update to new decimal_to_string interface.
2084
2085 * value.c (unpack_long): Use decimal_to_longest.
2086 * valops.c (value_cast): Use decimal_from_doublest instead of
2087 decimal_from_floating. Use decimal_from_[u]longest isntead of
2088 decimal_from_integral.
2089 * valarith.c (value_args_as_decimal): Likewise.
2090 * valprint.c (print_decimal_floating): Update to new
2091 decimal_to_string interface.
2092 * printcmd.c (printf_decfloat): Likewise.
2093 * c-exp.y (parse_number): Update to new decimal_from_string interface.
2094
2095 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
2096
2097 * doublest.h: Do not include "floatformat.h". Remove stale comments.
2098 * gdbtypes.c: Include "floatformat.h".
2099 * value.c: Likewise.
2100 * m68k-tdep.c: Likewise.
2101
2102 * findvar.c: Do not include "floatformat.h".
2103 * amd64-darwin-tdep.c: Likewise.
2104 * arm-linux-tdep.c: Likewise.
2105 * i386-darwin-tdep.c: Likewise.
2106 * i387-tdep.c: Likewise.
2107 * m68k-linux-tdep.c: Likewise.
2108 * mep-tdep.c: Likewise.
2109 * mips-tdep.c: Likewise.
2110 * nios2-tdep.c: Likewise.
2111 * s390-linux-tdep.c: Likewise.
2112 * sparc-obsd-tdep.c: Likewise.
2113 * sparc-tdep.c: Likewise.
2114 * sparc64-tdep.c: Likewise.
2115 * spu-tdep.c: Likewise.
2116 * tic6x-tdep.c: Likewise.
2117 * tilegx-tdep.c: Likewise.
2118 * vax-tdep.c: Likewise.
2119 * xstormy16-tdep.c: Likewise.
2120 * xtensa-tdep.c: Likewise.
2121
2122 * top.c: Do not include "doublest.h".
2123 * aarch64-tdep.c: Likewise.
2124 * alpha-tdep.c: Likewise.
2125 * arm-linux-tdep.c: Likewise.
2126 * m68k-linux-tdep.c: Likewise.
2127 * tilegx-tdep.c: Likewise.
2128 * xstormy16-tdep.c: Likewise.
2129
2130 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2131
2132 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
2133 (mipsn32_fbsd_sigframe): Define.
2134 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
2135 for FreeBSD/mipsn32.
2136
2137 2017-10-05 John Baldwin <jhb@FreeBSD.org>
2138
2139 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
2140 AT_HWCAP.
2141
2142 2017-10-05 Tristan Gingold <tgingold@free.fr>
2143
2144 * MAINTAINERS (Misc): Update my email address.
2145
2146 2017-10-04 Pedro Alves <palves@redhat.com>
2147
2148 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
2149 it instead of target_gdbarch.
2150 (get_remote_state, get_remote_packet_size): Adjust
2151 get_remote_arch_state calls, passing down target_gdbarch
2152 explicitly.
2153 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
2154 'gdbarch' and use it instead of target_gdbarch.
2155 (get_memory_packet_size): Adjust get_remote_arch_state calls,
2156 passing down target_gdbarch explicitly.
2157 (struct stop_reply) <arch>: New field.
2158 (remote_parse_stop_reply): Use the stopped thread's architecture,
2159 not the current inferior's. Save the architecture in the
2160 stop_reply.
2161 (process_stop_reply): Use the stop reply's architecture.
2162 (process_g_packet, remote_fetch_registers)
2163 (remote_prepare_to_store, store_registers_using_G)
2164 (remote_store_registers): Adjust get_remote_arch_state calls,
2165 using the regcache's architecture.
2166 (remote_get_trace_status): Adjust get_remote_arch_state calls,
2167 passing down target_gdbarch explicitly.
2168 * spu-multiarch.c (spu_thread_architecture): Defer to the target
2169 beneath instead of calling target_gdbarch.
2170 * target.c (default_thread_architecture): Use the specified
2171 inferior's architecture, instead of the current inferior's
2172 architecture (via target_gdbarch).
2173
2174 2017-10-04 Pedro Alves <palves@redhat.com>
2175
2176 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
2177 case.
2178 (regcache_print): Handle !target_has_registers here instead.
2179
2180 2017-10-04 Pedro Alves <palves@redhat.com>
2181
2182 * frame.c (create_test_frame): Delete.
2183 * frame.h (create_test_frame): Delete.
2184 * gdbarch-selftests.c: Include gdbthread.h and target.h.
2185 (class regcache_test): Delete.
2186 (test_target_has_registers, test_target_has_stack)
2187 (test_target_has_memory, test_target_prepare_to_store)
2188 (test_target_store_registers): New functions.
2189 (test_target_ops): New class.
2190 (register_to_value_test): Error out if there's already a
2191 process_stratum (or higher) target pushed. Create a fuller mock
2192 environment, with mock target_ops, inferior, address space, thread
2193 and inferior_ptid.
2194 * progspace.c (struct address_space): Move to ...
2195 * progspace.h (struct address_space): ... here.
2196 * regcache.h (regcache::~regcache, regcache::raw_write)
2197 [GDB_SELF_TEST]: No longer virtual.
2198
2199 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
2200
2201 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
2202
2203 2017-10-04 Pedro Alves <palves@redhat.com>
2204
2205 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
2206 out of 'between TRY and CATCH'.
2207
2208 2017-10-04 Pedro Alves <palves@redhat.com>
2209
2210 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
2211 * common/common-exceptions.h (TRY): Open an outermost scope.
2212 Expand intro comment.
2213 (CATCH): Reindent.
2214 (END_CATCH): Close the outermost scope.
2215 * completer.c (complete_line_internal): Add missing END_CATCH.
2216
2217 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2218
2219 * NEWS (Changes since GDB 8.0): Add entry about new
2220 'set-cwd-on-gdbserver' feature.
2221 (New remote packets): Add entry for QSetWorkingDir.
2222 * common/common-inferior.h (set_inferior_cwd): New prototype.
2223 * infcmd.c (set_inferior_cwd): Remove "static".
2224 (show_cwd_command): Expand text to include remote debugging.
2225 * remote.c: Add PACKET_QSetWorkingDir.
2226 (remote_protocol_features) <QSetWorkingDir>: New entry for
2227 PACKET_QSetWorkingDir.
2228 (extended_remote_set_inferior_cwd): New function.
2229 (extended_remote_create_inferior): Call
2230 "extended_remote_set_inferior_cwd".
2231 (_initialize_remote): Call "add_packet_config_cmd" for
2232 QSetWorkingDir.
2233
2234 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2235
2236 * NEWS (New commands): Mention "set/show cwd".
2237 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
2238 "cd" command's help text.
2239 * common/common-inferior.h (get_inferior_cwd): New prototype.
2240 * infcmd.c (inferior_cwd_scratch): New global variable.
2241 (set_inferior_cwd): New function.
2242 (get_inferior_cwd): Likewise.
2243 (set_cwd_command): Likewise.
2244 (show_cwd_command): Likewise.
2245 (_initialize_infcmd): Add "set/show cwd" commands.
2246 * inferior.h (class inferior) <cwd>: New field.
2247 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
2248 (fork_inferior): Change inferior's cwd before its execution.
2249 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
2250 to CreateProcess.
2251
2252 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
2253
2254 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
2255 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
2256 (COMMON_OBS): Add gdb_tilde_expand.o.
2257 * common/gdb_tilde_expand.c: New file.
2258 * common/gdb_tilde_expand.h: Likewise.
2259
2260 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
2261
2262 * gdbarch.sh (objfile): Remove duplicate declaration.
2263 * gdbarch.h: Regenerate.
2264
2265 2017-10-03 Tom Tromey <tom@tromey.com>
2266
2267 * utils.c (internal_vproblem): Use string_vprintf.
2268
2269 2017-10-03 Tom Tromey <tom@tromey.com>
2270
2271 * printcmd.c (info_symbol_command): Use std::string.
2272
2273 2017-10-03 Tom Tromey <tom@tromey.com>
2274
2275 * top.c (gdb_safe_append_history): Use std::string.
2276
2277 2017-10-03 Tom Tromey <tom@tromey.com>
2278
2279 * event-top.c (stdin_event_handler): Update.
2280 * main.c (captured_main_1): Update.
2281 * top.h (make_delete_ui_cleanup): Remove.
2282 (struct ui): Add constructor and destructor.
2283 (new_ui, delete_ui): Remove.
2284 * top.c (make_delete_ui_cleanup): Remove.
2285 (new_ui_command): Use std::unique_ptr.
2286 (delete_ui_cleanup): Remove.
2287 (ui::ui): Rename from new_ui. Update.
2288 (free_ui): Remove.
2289 (ui::~ui): Rename from delete_ui. Update.
2290
2291 2017-10-03 Tom Tromey <tom@tromey.com>
2292
2293 * symfile.c (load_progress): Use gdb::byte_vector.
2294
2295 2017-10-03 Tom Tromey <tom@tromey.com>
2296
2297 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
2298 declaration.
2299 * printcmd.c (x_command): Remove unused declaration.
2300 * symfile.c (symbol_file_command): Remove unused declaration.
2301
2302 2017-10-03 Tom Tromey <tom@tromey.com>
2303
2304 * utils.c (internal_vproblem): Use std::string.
2305 (defaulted_query): Likewise.
2306
2307 2017-10-03 Tom Tromey <tom@tromey.com>
2308
2309 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
2310 * top.c (execute_command_to_string): Update.
2311 * utils.c (make_cleanup_restore_page_info): Remove.
2312 (do_restore_page_info_cleanup): Remove.
2313 (set_batch_flag_and_restore_page_info):
2314 New.
2315 (make_cleanup_restore_page_info): Remove.
2316 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2317 (~set_batch_flag_and_restore_page_info): New
2318 (make_cleanup_restore_uinteger): Remove.
2319 (make_cleanup_restore_integer): Remove.
2320 (struct restore_integer_closure): Remove.
2321 (restore_integer): Remove.
2322 * utils.h (struct set_batch_flag_and_restore_page_info): New
2323 class.
2324 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
2325 (make_cleanup_restore_page_info): Remove.
2326 (make_cleanup_restore_uinteger) Remove.
2327 (make_cleanup_restore_integer) Remove.
2328
2329 2017-10-03 Tom Tromey <tom@tromey.com>
2330
2331 * record-full.h (record_full_gdb_operation_disable_set): Return
2332 scoped_restore_tmpl<int>.
2333 * infrun.c (adjust_pc_after_break): Update.
2334 (handle_signal_stop): Update.
2335 * record-full.c (record_full_gdb_operation_disable_set): Return
2336 scoped_restore_tmpl<int>.
2337 (record_full_wait_1, record_full_insert_breakpoint)
2338 (record_full_remove_breakpoint, record_full_save)
2339 (record_full_goto_insn): Update.
2340
2341 2017-10-02 Tom Tromey <tom@tromey.com>
2342
2343 PR rust/22236:
2344 * rust-lang.c (rust_val_print_str): New function.
2345 (val_print_struct): Call it.
2346 (rust_subscript): Preserve name of slice type.
2347
2348 2017-10-02 Tom Tromey <tom@tromey.com>
2349
2350 * rust-lang.c (rust_subscript): Handle slices in
2351 EVAL_AVOID_SIDE_EFFECTS case.
2352
2353 2017-10-02 Tom Tromey <tom@tromey.com>
2354
2355 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
2356
2357 2017-10-02 Tom Tromey <tom@tromey.com>
2358
2359 * rust-lang.h (rust_slice_type): Add "extern".
2360
2361 2017-10-02 Tom Tromey <tom@tromey.com>
2362 Pedro Alves <palves@redhat.com>
2363
2364 * ada-lang.h (ada_exc_info::operator<): Make const.
2365 (ada_exc_info::operator==): Make const.
2366 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
2367 Make const.
2368
2369 2017-09-29 Tom Tromey <tom@tromey.com>
2370
2371 * target.c (read_whatever_is_readable): Change type of "result".
2372 Update.
2373 (free_memory_read_result_vector): Remove.
2374 (read_memory_robust): Change return type. Update.
2375 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
2376 bin2hex, std::string.
2377 * target.h (memory_read_result_s): Remove typedef.
2378 (free_memory_read_result_vector): Remove.
2379 (read_memory_robust): Return std::vector.
2380
2381 2017-09-29 Tom Tromey <tom@tromey.com>
2382
2383 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
2384
2385 2017-09-29 Tom Tromey <tom@tromey.com>
2386
2387 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
2388 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
2389 operator< and operator==.
2390 (ada_exceptions_list): Return a std::vector.
2391 * ada-lang.c (ada_exc_info::operator<): Rename from
2392 compare_ada_exception_info.
2393 (ada_exc_info::operator==): New.
2394 (sort_remove_dups_ada_exceptions_list): Change type of
2395 "exceptions".
2396 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
2397 (ada_add_global_exceptions): Likewise.
2398 (ada_exceptions_list_1): Return a std::vector.
2399 (ada_exceptions_list): Likewise.
2400
2401 2017-09-29 Tom Tromey <tom@tromey.com>
2402
2403 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
2404 'std::set *'.
2405 (print_one_inferior): Update.
2406 (free_vector_of_ints): Remove.
2407 (list_available_thread_groups): Change "ids" to std::set.
2408 (mi_cmd_list_thread_groups): Update.
2409 (struct collect_cores_data) <core>: Now a std::set.
2410 (collect_cores): Update.
2411 (unique): Remove.
2412 (print_one_inferior): Update.
2413
2414 2017-09-29 Tom Tromey <tom@tromey.com>
2415
2416 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
2417 (mi_execute_async_cli_command): Likewise.
2418 (mi_cmd_trace_frame_collected): Use field_fmt.
2419
2420 2017-09-29 Tom Tromey <tom@tromey.com>
2421
2422 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
2423 gdb::byte_vector.
2424
2425 2017-09-29 Tom Tromey <tom@tromey.com>
2426
2427 * mi/mi-parse.c (mi_parse): Remove unused declaration.
2428
2429 2017-09-29 Tom Tromey <tom@tromey.com>
2430
2431 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
2432
2433 2017-09-29 Tom Tromey <tom@tromey.com>
2434
2435 * varobj.h (varobj_gen_name): Return std::string.
2436 * varobj.c (varobj_gen_name): Return std::string.
2437 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
2438 (mi_cmd_var_delete): Don't copy "name".
2439
2440 2017-09-29 Tom Tromey <tom@tromey.com>
2441
2442 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
2443 (mi_cmd_break_insert_1): Update.
2444
2445 2017-09-29 Tom Tromey <tom@tromey.com>
2446
2447 * target.h (make_scoped_defer_target_commit_resume): Update.
2448 * target.c (make_scoped_defer_target_commit_resume): Rename from
2449 make_cleanup_defer_target_commit_resume. Return a
2450 scoped_restore.
2451 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
2452
2453 2017-09-29 Tom Tromey <tom@tromey.com>
2454
2455 * main.c (captured_main_1): Remove unused declaration.
2456 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
2457
2458 2017-09-29 Tom Tromey <tom@tromey.com>
2459
2460 * symtab.c (search_symbols): Remove unused outer cleanup.
2461 (make_source_files_completion_list): Remove unused declaration.
2462
2463 2017-09-29 Tom Tromey <tom@tromey.com>
2464
2465 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
2466
2467 2017-09-29 Tom Tromey <tom@tromey.com>
2468
2469 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
2470 gdb::byte_vector.
2471
2472 2017-09-29 Tom Tromey <tom@tromey.com>
2473
2474 * complaints.c (vcomplaint): Use std::string.
2475
2476 2017-09-29 Tom Tromey <tom@tromey.com>
2477
2478 * tracepoint.c (trace_variable_command): Use std::string.
2479 (encode_actions_1): Remove unused declarations.
2480 (create_tsv_from_upload): Use std::string.
2481
2482 2017-09-29 Tom Tromey <tom@tromey.com>
2483
2484 * cp-support.c (gdb_demangle): Use std::string.
2485
2486 2017-09-29 Tom Tromey <tom@tromey.com>
2487
2488 * stack.c (parse_frame_specification): Use std::string
2489 (info_frame_command): Use gdb::unique_xmalloc_ptr.
2490
2491 2017-09-29 Tom Tromey <tom@tromey.com>
2492
2493 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
2494
2495 2017-09-29 Tom Tromey <tom@tromey.com>
2496
2497 * utils.c (vfprintf_maybe_filtered): Use std::string.
2498 (vfprintf_unfiltered): Likewise.
2499
2500 2017-09-29 Tom Tromey <tom@tromey.com>
2501
2502 * event-top.c (top_level_prompt): Return std::string.
2503 (display_gdb_prompt): Update.
2504
2505 2017-09-29 Tom Tromey <tom@tromey.com>
2506
2507 * unittests/common-utils-selftests.c (format): New function.
2508 (string_vprintf_tests): New function.
2509 (_initialize_common_utils_selftests): Register new tests.
2510 * common/common-utils.c (string_vprintf): New function.
2511 * common/common-utils.h (string_vprintf): Declare.
2512
2513 2017-09-29 Pedro Alves <palves@redhat.com>
2514
2515 * common/rsp-low.c (unpack_varlen_hex): Constify.
2516 * common/rsp-low.h (unpack_varlen_hex): Constify.
2517 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
2518 Constify.
2519 * remote.c (remote_set_permissions, read_ptid)
2520 (remote_current_thread, remote_get_threads_with_qthreadinfo)
2521 (remote_static_tracepoint_marker_at)
2522 (remote_static_tracepoint_markers_by_strid)
2523 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
2524 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
2525 (parse_tracepoint_definition, parse_tsv_definition)
2526 (parse_static_tracepoint_marker_definition): Constify.
2527 * tracepoint.h (parse_static_tracepoint_marker_definition)
2528 (parse_trace_status, parse_tracepoint_status)
2529 (parse_tracepoint_definition, parse_tsv_definition): Constify.
2530
2531 2017-09-29 Pedro Alves <palves@redhat.com>
2532
2533 * remote.c (target_buf, target_buf_size): Delete.
2534 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
2535 Use the connection's packet buffer instead.
2536 All callers adjusted.
2537 (_initialize_remote): Remove references to target_buf and
2538 target_buf_size.
2539
2540 2017-09-28 Pedro Alves <palves@redhat.com>
2541
2542 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2543 unittests/common-utils-selftests.c.
2544 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
2545 (COMMON_OBS): Remove utils-selftests.o.
2546 * utils-selftests.c: Move to ...
2547 * unittests/common-utils-selftests.c: ... here and rename self
2548 test to "string_printf".
2549
2550 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
2551
2552 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
2553 having NULL cus or tus.
2554
2555 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2556
2557 * arm-tdep.c: (convert_from_extended): Remove.
2558 (convert_to_extended): Likewise.
2559 (arm_extract_return_value): Use convert_typed_floating.
2560 (arm_store_return_value): Likewise.
2561
2562 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2563 * sh-tdep.c: Do not include "floatformat.h".
2564 (sh_littlebyte_bigword_type): New function.
2565 (sh_register_convert_to_virtual): Use convert_typed_floating.
2566 (sh_register_convert_to_raw): Likewise.
2567 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
2568 (sh64_littlebyte_bigword_type): New function.
2569 (sh64_extract_return_value): Use convert_typed_floating.
2570 (sh64_register_convert_to_virtual): Likewise.
2571 (sh64_register_convert_to_raw): Likewise.
2572
2573 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2574
2575 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
2576 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
2577
2578 * gdbtypes.h (union type_specific): Make field floatformat hold
2579 just a single struct floatformat, not an array.
2580 (floatformat_from_type): Move here.
2581 * gdbtypes.c (floatformat_from_type): Move here. Update to
2582 changed TYPE_FLOATFORMAT definition.
2583 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
2584 (recursive_dump_type): Likewise.
2585 (init_float_type): Install correct floatformat for byte order.
2586 (arch_float_type): Likewise.
2587
2588 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
2589
2590 * gdbtypes.c (init_type): Change incoming argument from
2591 length-in-bytes to length-in-bits. Assert length is a
2592 multiple of TARGET_CHAR_BITS.
2593 (arch_type, arch_flags_type): Likewise.
2594 (init_integer_type): Update call to init_type.
2595 (init_character_type): Likewise.
2596 (init_boolean_type): Likewise.
2597 (init_float_type): Likewise.
2598 (init_decfloat_type): Likewise.
2599 (init_complex_type): Likewise.
2600 (init_pointer_type): Likewise.
2601 (objfile_type): Likewise.
2602 (arch_integer_type): Update call to arch_type.
2603 (arch_character_type): Likewise.
2604 (arch_boolean_type): Likewise.
2605 (arch_float_type): Likewise.
2606 (arch_decfloat_type): Likewise.
2607 (arch_complex_type): Likewise.
2608 (arch_pointer_type): Likewise.
2609 (gdbtypes_post_init): Likewise.
2610
2611 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
2612 (read_base_type): Likewise.
2613 * mdebugread.c (basic_type): Likewise.
2614 * stabsread.c (dbx_init_float_type): Likewise.
2615 (rs6000_builtin_type): Likewise.
2616 (read_range_type): Likewise. Also, fix call to init_integer_type
2617 with erroneous length argument.
2618
2619 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
2620 * d-lang.c (build_d_types): Likewise.
2621 * f-lang.c (build_fortran_types): Likewise.
2622 * go-lang.c (build_go_types): Likewise.
2623 * opencl-lang.c (build_opencl_types): Likewise.
2624 * jit.c (finalize_symtab): Likewise.
2625 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
2626 (build_std_type_info_type): Likewise.
2627 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
2628 update call to arch_flags_type.
2629
2630 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
2631 arch_type.
2632 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
2633 * windows-tdep.c (windows_get_tlb_type): Likewise.
2634
2635 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
2636 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2637 * m32c-tdep.c (make_types): Likewise.
2638 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
2639 (rl78_psw_type): Update call to arch_flags_type.
2640 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
2641 * rx-tdep.c (rx_psw_type): Likewise.
2642 (rx_fpsw_type): Likewise.
2643 * sparc-tdep.c (sparc_psr_type): Likewise.
2644 (sparc_fsr_type): Likewise.
2645 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
2646 (sparc64_ccr_type): Likewise.
2647 (sparc64_fsr_type): Likewise.
2648 (sparc64_fprs_type): Likewise.
2649
2650 2017-09-27 Tom Tromey <tom@tromey.com>
2651
2652 * findcmd.c (find_command): Constify.
2653
2654 2017-09-27 Tom Tromey <tom@tromey.com>
2655
2656 * ada-tasks.c (task_command_1, task_command): Constify.
2657
2658 2017-09-27 Tom Tromey <tom@tromey.com>
2659
2660 * symtab.c (maintenance_print_symbol_cache)
2661 (maintenance_flush_symbol_cache)
2662 (maintenance_print_symbol_cache_statistics): Constify.
2663
2664 2017-09-27 Tom Tromey <tom@tromey.com>
2665
2666 * inferior.c (detach_inferior_command, kill_inferior_command)
2667 (inferior_command): Constify.
2668
2669 2017-09-27 Tom Tromey <tom@tromey.com>
2670
2671 * regcache.c (regcache_print, maintenance_print_registers)
2672 (maintenance_print_raw_registers)
2673 (maintenance_print_cooked_registers)
2674 (maintenance_print_register_groups)
2675 (maintenance_print_remote_registers): Constify.
2676
2677 2017-09-27 Tom Tromey <tom@tromey.com>
2678
2679 * printcmd.c (map_display_numbers, undisplay_command)
2680 (enable_disable_display_command, enable_display_command)
2681 (disable_display_command): Constify.
2682
2683 2017-09-27 Tom Tromey <tom@tromey.com>
2684
2685 * breakpoint.h (delete_command): Don't declare.
2686 * breakpoint.c (delete_command, enable_once_command)
2687 (enable_count_command, enable_delete_command, breakpoint_1)
2688 (maintenance_info_breakpoints, stopin_command, stopat_command)
2689 (delete_command, delete_trace_command, save_breakpoints)
2690 (save_breakpoints_command, save_tracepoints_command): Constify.
2691
2692 2017-09-27 Tom Tromey <tom@tromey.com>
2693
2694 * macrocmd.c (macro_expand_command, macro_expand_once_command)
2695 (skip_ws, extract_identifier, macro_define_command)
2696 (macro_undef_command, macro_list_command): Constify.
2697
2698 2017-09-27 Tom Tromey <tom@tromey.com>
2699
2700 * infcmd.c (environment_info, set_environment_command)
2701 (unset_environment_command, path_info, info_proc_cmd_1)
2702 (info_proc_cmd_mappings, info_proc_cmd_stat)
2703 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
2704 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
2705
2706 2017-09-27 Tom Tromey <tom@tromey.com>
2707
2708 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
2709 Constify.
2710
2711 2017-09-27 Tom Tromey <tom@tromey.com>
2712
2713 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
2714
2715 2017-09-27 Tom Tromey <tom@tromey.com>
2716
2717 * demangle.c (demangle_command): Constify.
2718
2719 2017-09-27 Tom Tromey <tom@tromey.com>
2720
2721 * progspace.c (maintenance_info_program_spaces_command):
2722 Constify.
2723
2724 2017-09-27 Tom Tromey <tom@tromey.com>
2725
2726 * compile/compile.c (check_raw_argument, compile_file_command)
2727 (compile_code_command, compile_print_command): Constify.
2728
2729 2017-09-27 Tom Tromey <tom@tromey.com>
2730
2731 * reggroups.c (maintenance_print_reggroups): Constify.
2732
2733 2017-09-27 Tom Tromey <tom@tromey.com>
2734
2735 * dwarf2read.c (save_gdb_index_command): Constify.
2736
2737 2017-09-27 Tom Tromey <tom@tromey.com>
2738
2739 * stap-probe.c (info_probes_stap_command): Constify.
2740
2741 2017-09-27 Tom Tromey <tom@tromey.com>
2742
2743 * fork-child.c (unset_exec_wrapper_command): Constify.
2744
2745 2017-09-27 Tom Tromey <tom@tromey.com>
2746
2747 * btrace.c (get_uint, get_context_size, no_chunk)
2748 (maint_btrace_packet_history_cmd)
2749 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
2750 (maint_info_btrace_cmd): Constify.
2751
2752 2017-09-27 Tom Tromey <tom@tromey.com>
2753
2754 * reverse.c (delete_bookmark_command): Constify.
2755
2756 2017-09-27 Tom Tromey <tom@tromey.com>
2757
2758 * remote.c (set_memory_packet_size)
2759 (set_memory_write_packet_size, show_memory_write_packet_size)
2760 (set_memory_read_packet_size, show_memory_read_packet_size)
2761 (compare_sections_command, packet_command, remote_put_command)
2762 (remote_get_command, remote_delete_command): Constify.
2763
2764 2017-09-27 Tom Tromey <tom@tromey.com>
2765
2766 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
2767 (set_mipsfpu_double_command, set_mipsfpu_none_command)
2768 (set_mipsfpu_auto_command): Constify.
2769
2770 2017-09-27 Tom Tromey <tom@tromey.com>
2771
2772 * cli/cli-cmds.h (cd_command): Constify.
2773 * cli/cli-cmds.c (cd_command): Constify.
2774
2775 2017-09-27 Tom Tromey <tom@tromey.com>
2776
2777 * thread.c (thread_name_command, thread_find_command): Constify.
2778
2779 2017-09-27 Tom Tromey <tom@tromey.com>
2780
2781 * probe.c (enable_probes_command, disable_probes_command):
2782 Constify.
2783
2784 2017-09-27 Tom Tromey <tom@tromey.com>
2785
2786 * symfile.c (symbol_file_command): Constify.
2787 * gdbcore.h (deprecated_file_changed_hook): Constify.
2788 * exec.c (deprecated_file_changed_hook, exec_file_command)
2789 (file_command): Constify.
2790 * defs.h (symbol_file_command): Constify.
2791
2792 2017-09-27 Tom Tromey <tom@tromey.com>
2793
2794 * remote-fileio.c (set_system_call_allowed)
2795 (show_system_call_allowed): Constify.
2796
2797 2017-09-27 Tom Tromey <tom@tromey.com>
2798
2799 * tracepoint.c (delete_trace_variable_command)
2800 (tfind_end_command, tfind_start_command, tfind_pc_command)
2801 (tfind_tracepoint_command, tfind_line_command)
2802 (tfind_range_command, tfind_outside_command): Constify.
2803
2804 2017-09-27 Tom Tromey <tom@tromey.com>
2805
2806 * ax-gdb.c (maint_agent_printf_command, agent_command)
2807 (agent_eval_command): Constify.
2808
2809 2017-09-27 Tom Tromey <tom@tromey.com>
2810
2811 * tracepoint.c (info_scope_command): Constify.
2812 * python/python.c (gdbpy_decode_line): Constify.
2813 * python/py-breakpoint.c (bppy_init): Constify.
2814 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
2815 * location.h: (new_linespec_location)
2816 (string_to_event_location_basic, string_to_event_location):
2817 Constify.
2818 * location.c (new_linespec_location)
2819 (string_to_event_location_basic, string_to_event_location):
2820 Constify.
2821 * linespec.h (decode_line_with_current_source)
2822 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
2823 * linespec.c (linespec_lex_to_end)
2824 (decode_line_with_current_source)
2825 (decode_line_with_last_displayed): Constify.
2826 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
2827 Constify.
2828 * cli/cli-cmds.c (edit_command, list_command): Constify.
2829 * breakpoint.h (until_break_command, watch_command_wrapper)
2830 (awatch_command_wrapper, rwatch_command_wrapper)
2831 (init_ada_exception_breakpoint): Constify.
2832 * breakpoint.c (break_command_1, dprintf_command)
2833 (break_range_command, watch_command_wrapper)
2834 (rwatch_command_wrapper, awatch_command_wrapper)
2835 (until_break_command, init_ada_exception_breakpoint)
2836 (strace_marker_create_sals_from_location, trace_command)
2837 (ftrace_command, strace_command, struct tracepoint): Constify.
2838 * ax-gdb.c (agent_command_1): Constify.
2839 * ada-lang.c (ada_exception_sal): Constify.
2840
2841 2017-09-27 Tom Tromey <tom@tromey.com>
2842
2843 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
2844 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
2845 (get_context_size, no_chunk, get_insn_history_modifiers)
2846 (cmd_record_insn_history, get_call_history_modifiers)
2847 (cmd_record_call_history): Constify.
2848
2849 2017-09-27 Tom Tromey <tom@tromey.com>
2850
2851 * source.c (show_substitute_path_command)
2852 (unset_substitute_path_command, set_substitute_path_command):
2853 Constify.
2854
2855 2017-09-27 Tom Tromey <tom@tromey.com>
2856
2857 * typeprint.c (maintenance_print_type): Constify.
2858 * maint.c (maintenance_dump_me, maintenance_demangle)
2859 (maintenance_time_display, maintenance_info_sections)
2860 (maintenance_print_statistics, maintenance_deprecate)
2861 (maintenance_undeprecate): Constify.
2862 (maintenance_do_deprecate): Constify. Use std::string.
2863 (maintenance_selftest): Constify.
2864 * gdbtypes.h (maintenance_print_type): Constify.
2865
2866 2017-09-27 Tom Tromey <tom@tromey.com>
2867
2868 * hppa-tdep.c (unwind_command): Constify.
2869
2870 2017-09-27 Tom Tromey <tom@tromey.com>
2871
2872 * target-descriptions.c (unset_tdesc_filename_cmd)
2873 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
2874 Constify.
2875
2876 2017-09-27 Tom Tromey <tom@tromey.com>
2877
2878 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
2879
2880 2017-09-27 Tom Tromey <tom@tromey.com>
2881
2882 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
2883
2884 2017-09-27 Tom Tromey <tom@tromey.com>
2885
2886 * tui/tui-regs.c (tui_reg_command): Constify.
2887
2888 2017-09-27 Tom Tromey <tom@tromey.com>
2889
2890 * skip.c (skip_file_command, skip_function_command)
2891 (skip_enable_command, skip_disable_command, skip_delete_command):
2892 Constify.
2893
2894 2017-09-27 Tom Tromey <tom@tromey.com>
2895
2896 * record-btrace.c (cmd_record_btrace_bts_start)
2897 (cmd_record_btrace_pt_start): Constify.
2898
2899 2017-09-27 Tom Tromey <tom@tromey.com>
2900
2901 * symmisc.c (maintenance_print_symbols)
2902 (maintenance_print_msymbols, maintenance_print_objfiles)
2903 (maintenance_info_symtabs, maintenance_check_symtabs)
2904 (maintenance_expand_symtabs, maintenance_info_line_tables):
2905 Constify.
2906
2907 2017-09-27 Tom Tromey <tom@tromey.com>
2908
2909 * top.c (new_ui_command): Constify.
2910
2911 2017-09-27 Tom Tromey <tom@tromey.com>
2912
2913 * symfile.c (add_symbol_file_command)
2914 (remove_symbol_file_command, list_overlays_command)
2915 (map_overlay_command, unmap_overlay_command)
2916 (overlay_auto_command, overlay_manual_command)
2917 (overlay_off_command, overlay_load_command): Constify.
2918
2919 2017-09-27 Tom Tromey <tom@tromey.com>
2920
2921 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
2922 (info_spu_mailbox_command, info_spu_dma_command)
2923 (info_spu_proxydma_command): Constify.
2924
2925 2017-09-27 Tom Tromey <tom@tromey.com>
2926
2927 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
2928
2929 2017-09-27 Tom Tromey <tom@tromey.com>
2930
2931 * cli/cli-script.c (user_defined_command): Constify.
2932
2933 2017-09-27 Tom Tromey <tom@tromey.com>
2934
2935 * cli/cli-dump.c (dump_memory_command, dump_value_command)
2936 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
2937 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
2938 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
2939 (dump_binary_value, append_binary_memory, append_binary_value):
2940 Constify.
2941 (struct dump_context) <func>: Constify.
2942 (add_dump_command): Update.
2943
2944 2017-09-27 Tom Tromey <tom@tromey.com>
2945
2946 * cli/cli-cmds.c (show_version, show_configuration)
2947 (source_command, show_user): Constify.
2948
2949 2017-09-27 Tom Tromey <tom@tromey.com>
2950
2951 * target.c (maintenance_print_target_stack): Constify.
2952
2953 2017-09-27 Tom Tromey <tom@tromey.com>
2954
2955 * interps.c (interpreter_exec_cmd): Constify.
2956
2957 2017-09-27 Tom Tromey <tom@tromey.com>
2958
2959 * record-full.c (cmd_record_full_restore): Constify.
2960
2961 2017-09-27 Tom Tromey <tom@tromey.com>
2962
2963 * memattr.c (enable_mem_command, disable_mem_command)
2964 (delete_mem_command): Constify.
2965
2966 2017-09-27 Tom Tromey <tom@tromey.com>
2967
2968 * value.c (show_convenience): Constify.
2969
2970 2017-09-27 Tom Tromey <tom@tromey.com>
2971
2972 * gdbcore.h (core_file_command): Update.
2973 * corefile.c (core_file_command): Constify.
2974
2975 2017-09-27 Tom Tromey <tom@tromey.com>
2976
2977 * user-regs.c (maintenance_print_user_registers): Constify.
2978
2979 2017-09-27 Tom Tromey <tom@tromey.com>
2980
2981 * cp-namespace.c (maintenance_cplus_namespace): Constify.
2982
2983 2017-09-27 Tom Tromey <tom@tromey.com>
2984
2985 * cp-support.c (first_component_command): Constify.
2986
2987 2017-09-27 Tom Tromey <tom@tromey.com>
2988
2989 * psymtab.c (maintenance_print_psymbols)
2990 (maintenance_info_psymtabs, maintenance_check_psymtabs):
2991 Constify.
2992
2993 2017-09-27 Tom Tromey <tom@tromey.com>
2994
2995 * windows-tdep.c (display_tib): Constify.
2996
2997 2017-09-27 Tom Tromey <tom@tromey.com>
2998
2999 * linux-fork.c (delete_checkpoint_command)
3000 (detach_checkpoint_command): Constify.
3001
3002 2017-09-27 Tom Tromey <tom@tromey.com>
3003
3004 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
3005
3006 2017-09-27 Tom Tromey <tom@tromey.com>
3007
3008 * arc-tdep.c (dump_arc_instruction_command): Constify.
3009
3010 2017-09-27 Tom Tromey <tom@tromey.com>
3011
3012 * valprint.c (set_radix, show_radix): Constify.
3013
3014 2017-09-27 Tom Tromey <tom@tromey.com>
3015
3016 * dtrace-probe.c (info_probes_dtrace_command): Constify.
3017
3018 2017-09-27 Tom Tromey <tom@tromey.com>
3019
3020 * command.h (not_just_help_class_command): Update.
3021 * cli/cli-decode.h (not_just_help_class_command): Update.
3022 * cli/cli-decode.c (not_just_help_class_command): Constify.
3023
3024 2017-09-27 Tom Tromey <tom@tromey.com>
3025
3026 * gdb_bfd.c (maintenance_info_bfds): Constify.
3027
3028 2017-09-27 Tom Tromey <tom@tromey.com>
3029
3030 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
3031 overloads.
3032 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
3033 (do_const_cfunc): New function.
3034 (cmd_cfunc_eq): New overload.
3035 (cli_user_command_p): Check do_const_cfunc.
3036 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
3037 const_cfunc.
3038 * command.h (add_cmd): Add const overload and no-function
3039 overload.
3040 (set_cmd_cfunc): Add const overload.
3041 (cmd_const_cfunc_ftype): Declare.
3042 (cmd_cfunc_eq): Add const overload.
3043 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
3044 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
3045 overload.
3046
3047 2017-09-27 Tom Tromey <tom@tromey.com>
3048
3049 * macroexp.c (get_next_token_for_substitution): New function.
3050 (substitute_args): Call it. Check for __VA_OPT__.
3051
3052 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3053 Pedro Alves <palves@redhat.com>
3054
3055 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
3056 producer_is_icc_lt_14.
3057 (producer_is_icc_lt_14): New function.
3058 (check_producer): Add code for checking version of ICC.
3059 (producer_is_icc): Move to producer.c.
3060 (read_structure_type): Restrict ICC workaround to ICC<14.
3061 * producer.c: Include selftest.h.
3062 (producer_is_icc, producer_parsing_tests, _initialize_producer):
3063 New functions.
3064 * producer.h (producer_is_icc): New declaration.
3065
3066 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
3067
3068 * Makefile.in (SFILES): Add producer.c.
3069 (COMMON_OBS): Add producer.o
3070 * amd64-tdep.c (producer.h): Add new include.
3071 * dwarf2read.c (producer.h): Add new include.
3072 * producer.c: New file.
3073 * producer.h: New file.
3074 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
3075 producer.c.
3076 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
3077 producer.h.
3078
3079 2017-09-26 Matthias Klose <doko@ubuntu.com>
3080
3081 * configure.ac: Search ncursesw before ncurses.
3082 Check ncursesw/ncurses.h before ncurses/ncurses.h.
3083 * gdb_curses.h: Include <ncursesw/ncurses.h>
3084 * config.in, configure: Regenerate.
3085
3086 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3087
3088 PR gdb/22185
3089 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
3090 obsolete.
3091 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
3092 Remove i386sol2 support.
3093 * configure.nat <i386sol2>: Remove.
3094 <sol2-64>: Fold into ...
3095 <sol2>: ... this.
3096 Move common settings to default section.
3097 Add sol-thread.o.
3098 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
3099 x86_64-*-solaris2.1[0-9]*>: Rename to ...
3100 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
3101 <i[34567]86-*-solaris*>: Remove.
3102 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
3103
3104 * configure.ac: Remove wctype in libw check.
3105 (_MSE_INT_H): Don't define on Solaris 7-9.
3106 <solaris*>: Remove libthread_db.so.1 check.
3107 * configure: Regenerate.
3108 * config.in: Regenerate.
3109
3110 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
3111 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
3112 (gdb_ps_size_t): Remove.
3113 Use base types in users.
3114 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
3115
3116 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
3117
3118 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3119
3120 PR build/22206
3121 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
3122 (adi_is_addr_mapped): Likewise.
3123 (PSR_ICC): Don't redefine.
3124 (PSR_IMPL): Likewise.
3125
3126 2017-09-25 Tom Tromey <tom@tromey.com>
3127
3128 * regcache.c (regcache::dump): Use string_printf.
3129
3130 2017-09-25 Tom Tromey <tom@tromey.com>
3131
3132 * regcache.c (class regcache_invalidator): New.
3133 (struct register_to_invalidate): Remove.
3134 (make_cleanup_regcache_invalidate): Remove.
3135 (regcache::raw_write): Use regcache_invalidator.
3136
3137 2017-09-25 Tom Tromey <tom@tromey.com>
3138
3139 * spu-tdep.c (spu2ppu_sniffer): Update.
3140 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
3141 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
3142 Remove.
3143 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
3144 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
3145 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
3146 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
3147 (frame_pop): Update.
3148
3149 2017-09-25 Tom Tromey <tom@tromey.com>
3150
3151 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
3152 * regcache.h (regcache_xfree): Don't declare.
3153 * regcache.c (regcache_xfree): Remove.
3154 (do_regcache_xfree): Use delete.
3155 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
3156 * linux-fork.c (free_fork): Use delete.
3157 (fork_save_infrun_state): Likewise.
3158 * jit.c (jit_dealloc_cache): Use delete.
3159 * infrun.c (discard_infcall_suspend_state): Use delete.
3160
3161 2017-09-25 Tom Tromey <tom@tromey.com>
3162
3163 * regcache.h (regcache_xmalloc): Don't declare.
3164 (regcache_raw_set_cached_value): Update comment.
3165 * regcache.c (regcache_xmalloc): Remove.
3166 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
3167 * jit.c (jit_frame_sniffer): Use new.
3168 * frame.c (frame_save_as_regcache): Use new.
3169
3170 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3171
3172 * NEWS: Advertise support for guarded-storage registers on IBM z.
3173
3174 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3175
3176 * s390-linux-nat.c (have_regset_gs): New static variable.
3177 (s390_linux_fetch_inferior_registers): Handle guarded-storage
3178 control block and guarded-storage broadcast control regsets.
3179 (s390_read_description): Detect whether the target has
3180 guarded-storage support, return appropriate tdesc.
3181 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
3182 (features/s390x-gs-linux64.c): Likewise.
3183 (struct gdbarch_tdep) <have_gs>: New field.
3184 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
3185 (s390_gsbc_regset): New variables.
3186 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
3187 and s390_gsbc_regset, if applicable.
3188 (s390_core_read_description): Check whether core file was from a
3189 target with guarded-storage support; include appropriate regsets.
3190 (s390_gdbarch_init): Add registers for guarded-storage support.
3191 (_initialize_s390_tdep): Initialize new target descriptions that
3192 include registers for guarded-storage support.
3193 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
3194 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
3195 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
3196 (S390_NUM_REGS): Adjust macro definition.
3197 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
3198 (tdesc_s390x_gs_linux64): New declarations.
3199
3200 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
3201
3202 * features/s390-gs-linux64.xml: New file.
3203 * features/s390-gs.xml: New file.
3204 * features/s390-gsbc.xml: New file.
3205 * features/s390x-gs-linux64.xml: New file.
3206 * features/Makefile (WHICH): Add s390-gs-linux64 and
3207 s390x-gs-linux64.
3208 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
3209 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
3210 * features/s390-gs-linux64.c: New generated file.
3211 * features/s390x-gs-linux64.c: New file.
3212 * regformats/s390-gs-linux64.dat: New file.
3213 * regformats/s390x-gs-linux64.dat: New file.
3214
3215 2017-09-23 Tom Tromey <tom@tromey.com>
3216
3217 * defs.h (make_cleanup_override_quit_handler): Don't declare.
3218
3219 2017-09-22 Tom Tromey <tom@tromey.com>
3220
3221 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
3222 type to scoped_restore_tmpl.
3223 <scoped_input_handler>: Initialize m_quit_handler directly.
3224
3225 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3226
3227 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
3228 (cd_command): Likewise. Free "current_directory" before
3229 assigning to it.
3230 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
3231 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
3232 * top.c (gdb_dirbuf): Remove global declaration.
3233 * top.h (gdb_dirbuf): Likewise.
3234
3235 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
3236
3237 * gnulib/aclocal.m4: Regenerate.
3238 * gnulib/config.in: Regenerate.
3239 * gnulib/configure: Regenerate.
3240 * gnulib/import/Makefile.am: Regenerate.
3241 * gnulib/import/Makefile.in: Regenerate.
3242 * gnulib/import/assure.h: New file.
3243 * gnulib/import/at-func.c: Likewise
3244 * gnulib/import/chdir-long.c: New file.
3245 * gnulib/import/chdir-long.h: New file.
3246 * gnulib/import/cloexec.c: New file.
3247 * gnulib/import/cloexec.h: New file.
3248 * gnulib/import/close.c: New file.
3249 * gnulib/import/closedir.c: New file.
3250 * gnulib/import/dirent-private.h: New file.
3251 * gnulib/import/dup-safer.c: New file.
3252 * gnulib/import/dup.c: New file.
3253 * gnulib/import/dup2.c: New file.
3254 * gnulib/import/error.c: New file.
3255 * gnulib/import/error.h: New file.
3256 * gnulib/import/exitfail.c: New file.
3257 * gnulib/import/exitfail.h: New file.
3258 * gnulib/import/fchdir.c: New file.
3259 * gnulib/import/fcntl.c: New file.
3260 * gnulib/import/fcntl.in.h: New file.
3261 * gnulib/import/fd-hook.c: New file.
3262 * gnulib/import/fd-hook.h: New file.
3263 * gnulib/import/fd-safer.c: New file.
3264 * gnulib/import/fdopendir.c: New file.
3265 * gnulib/import/filename.h: New file.
3266 * gnulib/import/filenamecat-lgpl.c: New file.
3267 * gnulib/import/filenamecat.h: New file.
3268 * gnulib/import/fstat.c: New file.
3269 * gnulib/import/fstatat.c: New file.
3270 * gnulib/import/getcwd-lgpl.c: New file.
3271 * gnulib/import/getcwd.c: New file.
3272 * gnulib/import/getdtablesize.c: New file.
3273 * gnulib/import/getlogin_r.c: New file.
3274 * gnulib/import/getprogname.c: New file.
3275 * gnulib/import/getprogname.h: New file.
3276 * gnulib/import/gettext.h: New file.
3277 * gnulib/import/glob-libc.h: New file.
3278 * gnulib/import/glob.c: New file.
3279 * gnulib/import/glob.in.h: New file.
3280 * gnulib/import/intprops.h: New file.
3281 * gnulib/import/m4/chdir-long.m4: New file.
3282 * gnulib/import/m4/close.m4: New file.
3283 * gnulib/import/m4/closedir.m4: New file.
3284 * gnulib/import/m4/d-ino.m4: New file.
3285 * gnulib/import/m4/d-type.m4: New file.
3286 * gnulib/import/m4/dup.m4: New file.
3287 * gnulib/import/m4/dup2.m4: New file.
3288 * gnulib/import/m4/error.m4: New file.
3289 * gnulib/import/m4/fchdir.m4: New file.
3290 * gnulib/import/m4/fcntl.m4: New file.
3291 * gnulib/import/m4/fcntl_h.m4: New file.
3292 * gnulib/import/m4/fdopendir.m4: New file.
3293 * gnulib/import/m4/filenamecat.m4: New file.
3294 * gnulib/import/m4/fstat.m4: New file.
3295 * gnulib/import/m4/fstatat.m4: New file.
3296 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
3297 * gnulib/import/m4/getcwd-path-max.m4: New file.
3298 * gnulib/import/m4/getcwd.m4: New file.
3299 * gnulib/import/m4/getdtablesize.m4: New file.
3300 * gnulib/import/m4/getlogin_r.m4: New file.
3301 * gnulib/import/m4/getprogname.m4: New file.
3302 * gnulib/import/m4/glob.m4: New file.
3303 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
3304 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
3305 * gnulib/import/m4/mempcpy.m4: New file.
3306 * gnulib/import/m4/memrchr.m4: New file.
3307 * gnulib/import/m4/mode_t.m4: New file.
3308 * gnulib/import/m4/msvc-inval.m4: New file.
3309 * gnulib/import/m4/msvc-nothrow.m4: New file.
3310 * gnulib/import/m4/open.m4: New file.
3311 * gnulib/import/m4/openat.m4: New file.
3312 * gnulib/import/m4/opendir.m4: New file.
3313 * gnulib/import/m4/readdir.m4: New file.
3314 * gnulib/import/m4/realloc.m4: New file.
3315 * gnulib/import/m4/rewinddir.m4: New file.
3316 * gnulib/import/m4/save-cwd.m4: New file.
3317 * gnulib/import/m4/strdup.m4: New file.
3318 * gnulib/import/m4/strerror.m4: New file.
3319 * gnulib/import/m4/unistd-safer.m4: New file.
3320 * gnulib/import/mempcpy.c: New file.
3321 * gnulib/import/memrchr.c: New file.
3322 * gnulib/import/msvc-inval.c: New file.
3323 * gnulib/import/msvc-inval.h: New file.
3324 * gnulib/import/msvc-nothrow.c: New file.
3325 * gnulib/import/msvc-nothrow.h: New file.
3326 * gnulib/import/open.c: New file.
3327 * gnulib/import/openat-die.c: New file.
3328 * gnulib/import/openat-priv.h: New file.
3329 * gnulib/import/openat-proc.c: New file.
3330 * gnulib/import/openat.c: New file.
3331 * gnulib/import/openat.h: New file.
3332 * gnulib/import/opendir.c: New file.
3333 * gnulib/import/pipe-safer.c: New file.
3334 * gnulib/import/readdir.c: New file.
3335 * gnulib/import/realloc.c: New file.
3336 * gnulib/import/rewinddir.c: New file.
3337 * gnulib/import/save-cwd.c: New file.
3338 * gnulib/import/save-cwd.h: New file.
3339 * gnulib/import/strdup.c: New file.
3340 * gnulib/import/strerror-override.c: New file.
3341 * gnulib/import/strerror-override.h: New file.
3342 * gnulib/import/strerror.c: New file.
3343 * gnulib/import/unistd--.h: New file.
3344 * gnulib/import/unistd-safer.h: New file.
3345 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
3346 "getcwd" and "glob".
3347 * ser-tcp.c: Undefine "close" before redefining it.
3348
3349 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3350
3351 * guile/scm-value.c (gdbscm_value_address): Initialize address,
3352 get rid of res_val.
3353
3354 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3355
3356 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
3357 <sol2,sparc>: Likewise.
3358 <sol2-64,i386>: Likewise.
3359
3360 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
3361 -Wdeprecated-declarations on *-*-solaris*.
3362 * configure: Regenerate.
3363
3364 * procfs.c: Include "nat/inferior.h".
3365 (procfs_info_proc): Fix typo.
3366
3367 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3368
3369 * remote.c (vector): Include.
3370 (struct private_thread_info): Add field, thread_handle.
3371 (free_private_thread_info): Deallocate storage associated with
3372 thread handle.
3373 (get_private_info_thread): Initialize `thread_handle' field.
3374 (struct thread_item): Add field, thread_handle.
3375 (clear_threads_listing_context): Deallocate storage associated
3376 with thread handle.
3377 (start_thread): Add support for "handle" attribute.
3378 (thread_attributes): Add "handle".
3379 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
3380 field.
3381 (remote_update_thread_list): Update thread_handle.
3382 (remote_thread_handle_to_thread_info): New function.
3383 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
3384
3385 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3386
3387 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
3388 function.
3389 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
3390 * python/python-internal.h (thread_object_type): Declare.
3391
3392 2017-09-21 Kevin Buettner <kevinb@redhat.com>
3393
3394 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
3395 (target_thread_handle_to_thread_info): Declare.
3396 * target.c (target_thread_handle_to_thread_info): New function.
3397 * target-delegates.c: Regenerate.
3398 * gdbthread.h (find_thread_by_handle): Declare.
3399 * thread.c (find_thread_by_handle): New function.
3400 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
3401 function.
3402 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
3403
3404 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3405
3406 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
3407
3408 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
3409
3410 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
3411
3412 2017-09-21 Yao Qi <yao.qi@linaro.org>
3413
3414 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
3415 to gdb_target_obs.
3416
3417 2017-09-20 Tom Tromey <tom@tromey.com>
3418
3419 * breakpoint.c (struct counted_command_line): Remove.
3420 (breakpoint_commands): Update.
3421 (alloc_counted_command_line, incref_counted_command_line)
3422 (decref_counted_command_line, do_cleanup_counted_command_line)
3423 (make_cleanup_decref_counted_command_line): Remove.
3424 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
3425 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
3426 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
3427 (save_breakpoints): Update.
3428 * breakpoint.h (counted_command_line): Now a typedef to
3429 shared_ptr.
3430 (struct breakpoint) <commands>: Now a counted_command_line.
3431 (struct bpstats) <command>: Likewise.
3432
3433 2017-09-20 Tom Tromey <tom@tromey.com>
3434
3435 * breakpoint.c (struct commands_info, do_map_commands_command):
3436 Remove.
3437 (commands_command_1): Update.
3438 (iterate_over_related_breakpoints): Take a function_view.
3439 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
3440 (delete_command): Update.
3441 (map_breakpoint_numbers): Take a function_view.
3442 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
3443 (disable_command): Update.
3444 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
3445 (enable_command): Update.
3446 (struct disp_data, do_enable_breakpoint_disp)
3447 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
3448 (do_map_enable_delete_breakpoint): Remove.
3449 (enable_once_command, enable_count_command, enable_delete_command)
3450 (delete_trace_variable_command): Update.
3451
3452 2017-09-20 Tom Tromey <tom@tromey.com>
3453
3454 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
3455 (bpstat_clear): Use delete.
3456 (bpstats): New constructors.
3457 (bpstat_copy, bpstat_stop_status): Use new.
3458 (dprintf_after_condition_true): Update.
3459 * breakpoint.h (bpstats::bpstats): Add constructors.
3460 (bpstats::~bpstats): Add destructor.
3461
3462 2017-09-20 Pedro Alves <palves@redhat.com>
3463
3464 * eval.c (make_params): Delete, refactored as ...
3465 (class fake_method): ... this new type's ctor.
3466 (fake_method::~fake_method): New.
3467 (evaluate_subexp_standard): Use 'fake_method'.
3468
3469 2017-09-20 Tom Tromey <tom@tromey.com>
3470
3471 * windows-nat.c (get_windows_debug_event, windows_wait)
3472 (do_initial_windows_stuff, windows_attach): Update.
3473 * utils.c (vwarning, internal_vproblem): Update.
3474 (ui_unregister_input_event_handler_cleanup)
3475 (prepare_to_handle_input): Remove.
3476 (class scoped_input_handler): New.
3477 (defaulted_query, prompt_for_continue): Update.
3478 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
3479 Update.
3480 * top.c (undo_terminal_modifications_before_exit): Update.
3481 * target/target.h (target_terminal_init, target_terminal_inferior)
3482 (target_terminal_ours): Don't declare.
3483 (class target_terminal): New.
3484 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
3485 (target_terminal_ours_for_output)
3486 (make_cleanup_restore_target_terminal): Don't declare.
3487 (target_terminal_info): Remove.
3488 * target.c (enum terminal_state, terminal_state): Remove.
3489 (target_terminal::terminal_state): Define.
3490 (target_terminal::init): Rename from target_terminal_init.
3491 (target_terminal::inferior): Rename from
3492 target_terminal_inferior.
3493 (target_terminal::ours): Rename from target_terminal_ours.
3494 (target_terminal::ours_for_output): Rename from
3495 target_terminal_ours_for_output.
3496 (target_terminal::info): New method.
3497 (cleanup_restore_target_terminal)
3498 (make_cleanup_restore_target_terminal): Remove.
3499 * solib.c (handle_solib_event): Update.
3500 * remote.c (remote_serial_quit_handler): Update.
3501 (remote_terminal_inferior, remote_wait_as): Update.
3502 * record-full.c (record_full_wait_1): Update.
3503 * nto-procfs.c (procfs_create_inferior): Update.
3504 * nat/fork-inferior.c (startup_inferior): Update.
3505 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
3506 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
3507 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
3508 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
3509 (mi_breakpoint_created, mi_breakpoint_deleted)
3510 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
3511 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
3512 (mi_user_selected_context_changed, report_initial_inferior):
3513 Update.
3514 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
3515 (linux_nat_terminal_inferior): Update.
3516 * infrun.c (follow_fork_inferior)
3517 (handle_vfork_child_exec_or_exit, do_target_resume)
3518 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
3519 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
3520 Update.
3521 * inflow.c (child_terminal_init, info_terminal_command): Update.
3522 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
3523 (attach_command): Update.
3524 * infcall.c (call_thread_fsm_should_stop): Update.
3525 * gnu-nat.c (gnu_attach): Update.
3526 * extension.c (struct active_ext_lang_state)
3527 (restore_active_ext_lang): Update.
3528 * exceptions.c (print_flush): Update.
3529 * event-top.c (async_enable_stdin, default_quit_handler): Update.
3530 (struct quit_handler_cleanup_data, restore_quit_handler)
3531 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
3532 Remove.
3533 * cp-support.c (gdb_demangle): Update.
3534 * breakpoint.c (update_inserted_breakpoint_locations)
3535 (insert_breakpoint_locations, handle_jit_event)
3536 (disable_breakpoints_in_unloaded_shlib): Update.
3537 * annotate.c (annotate_breakpoints_invalid)
3538 (annotate_frames_invalid): Update.
3539
3540 2017-09-20 Tom Tromey <tom@tromey.com>
3541
3542 * main.c (catch_command_errors): Rename from
3543 catch_command_errors_const.
3544 (captured_main_1): Update.
3545
3546 2017-09-20 Pedro Alves <palves@redhat.com>
3547
3548 * cli/cli-cmds.c (list_command): Use print_sal_location.
3549 (print_sal_location): New function.
3550 (ambiguous_line_spec): Use print_sal_location.
3551 * linespec.c (symbol_to_sal): Record the symbol in the sal.
3552 * symtab.c (find_function_start_sal): Likewise.
3553 * symtab.h (symtab_and_line::symbol): New field.
3554
3555 2017-09-20 Pedro Alves <palves@redhat.com>
3556
3557 * linespec.c (minsym_found): Handle non-text minsyms.
3558 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
3559
3560 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3561
3562 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
3563 backslash.
3564
3565 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3566
3567 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
3568 vmovups instead vmovaps.
3569 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
3570
3571 2017-09-19 John Baldwin <jhb@FreeBSD.org>
3572
3573 * NEWS (Changes since GDB 8.0): Add starti.
3574 * infcmd.c (enum run_break): New.
3575 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
3576 case.
3577 (run_command): Use enum run_how.
3578 (start_command): Likewise.
3579 (starti_command): New function.
3580 (RUN_ARGS_HELP): New macro.
3581 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
3582 commands. Add starti command.
3583
3584 2017-09-19 Yao Qi <yao.qi@linaro.org>
3585
3586 * Makefile.in (monitor.o): Remove the rule.
3587
3588 2017-09-19 Yao Qi <yao.qi@linaro.org>
3589
3590 * annotate.h (struct annotate_arg_emitter): Use
3591 DISABLE_COPY_AND_ASSIGN.
3592 * common/refcounted-object.h (refcounted_object): Likewise.
3593 * completer.h (struct completion_result): Likewise.
3594 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
3595 * filename-seen-cache.h (filename_seen_cache): Likewise.
3596 * gdbcore.h (thread_section_name): Likewise.
3597 * gdb_regex.h (compiled_regex): Likewise.
3598 * gdbthread.h (scoped_restore_current_thread): Likewise.
3599 * inferior.h (scoped_restore_current_inferior): Likewise.
3600 * jit.c (jit_reader): Likewise.
3601 * linespec.h (struct linespec_result): Likewise.
3602 * mi/mi-parse.h (struct mi_parse): Likewise.
3603 * nat/fork-inferior.c (execv_argv): Likewise.
3604 * progspace.h (scoped_restore_current_program_space): Likewise.
3605 * python/python-internal.h (class gdbpy_enter): Likewise.
3606 * regcache.h (regcache): Likewise.
3607 * target-descriptions.c (struct tdesc_reg): Likewise.
3608 (struct tdesc_type): Likewise.
3609 (struct tdesc_feature): Likewise.
3610 * ui-out.h (ui_out_emit_type): Likewise.
3611
3612 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
3613
3614 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
3615 label abort_expression.
3616
3617 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3618
3619 * common/buffer.c (buffer_xml_printf): Adjust.
3620 * common/xml-utils.c (xml_escape_text): Change return type to
3621 std::string, update code accordingly.
3622 * common/xml-utils.h (xml_escape_text): Change return type to
3623 std::string.
3624 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
3625 * windows-tdep.c (windows_xfer_shared_library): Adjust.
3626 * unittests/xml-utils-selftests.c (test_xml_escape_text):
3627 Adjust.
3628
3629 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3630
3631 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
3632 (SUBDIR_UNITTESTS_OBS): Add new object file.
3633 * unittests/xml-utils-selftests.c: New file.
3634
3635 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3636
3637 * common/selftest.h (selftest): New struct/interface.
3638 (register_test): Add name parameter, add new overload.
3639 (run_tests): Add filter parameter.
3640 (for_each_selftest_ftype): New typedef.
3641 (for_each_selftest): New declaration.
3642 * common/selftest.c (tests): Change type to
3643 map<string, unique_ptr<selftest>>.
3644 (simple_selftest): New struct.
3645 (register_test): New function.
3646 (register_test): Add name parameter and use it.
3647 (run_tests): Add filter parameter and use it. Add prints.
3648 Adjust to vector -> map change.
3649 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
3650 registering selftests.
3651 * arm-tdep.c (_initialize_arm_tdep): Likewise.
3652 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
3653 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
3654 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
3655 * findvar.c (_initialize_findvar): Likewise.
3656 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
3657 * maint.c (maintenance_selftest): Update call to run_tests.
3658 (maintenance_info_selftests): New function.
3659 (_initialize_maint_cmds): Register "maintenance info selftests"
3660 command. Update "maintenance selftest" doc.
3661 * regcache.c (_initialize_regcache): Add names when registering
3662 selftests.
3663 * rust-exp.y (_initialize_rust_exp): Likewise.
3664 * selftest-arch.c (gdbarch_selftest): New struct.
3665 (gdbarch_tests): Remove.
3666 (register_test_foreach_arch): Add name parameter. Call
3667 register_test.
3668 (tests_with_arch): Remove, move most content to
3669 gdbarch_selftest::operator().
3670 (_initialize_selftests_foreach_arch): Remove.
3671 * selftest-arch.h (register_test_foreach_arch): Add name
3672 parameter.
3673 (run_tests_with_arch): New declaration.
3674 * utils-selftests.c (_initialize_utils_selftests): Add names
3675 when registering selftests.
3676 * utils.c (_initialize_utils): Likewise.
3677 * unittests/array-view-selftests.c
3678 (_initialize_array_view_selftests): Likewise.
3679 * unittests/environ-selftests.c (_initialize_environ_selftests):
3680 Likewise.
3681 * unittests/function-view-selftests.c
3682 (_initialize_function_view_selftests): Likewise.
3683 * unittests/offset-type-selftests.c
3684 (_initialize_offset_type_selftests): Likewise.
3685 * unittests/optional-selftests.c
3686 (_initialize_optional_selftests): Likewise.
3687 * unittests/scoped_restore-selftests.c
3688 (_initialize_scoped_restore_selftests): Likewise.
3689 * NEWS: Document "maintenance selftest" and "maint info
3690 selftests".
3691
3692 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3693
3694 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
3695 scoped_restore.
3696
3697 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
3698
3699 * mi/mi-main.c (mi_load_progress): Make uiout variable
3700 a unique_ptr.
3701
3702 2017-09-15 Pedro Alves <palves@redhat.com>
3703
3704 * compile/compile-c-types.c (convert_enum, convert_int)
3705 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
3706
3707 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
3708
3709 * dwarf2read.c (copy_string): Remove.
3710 (parse_macro_definition): Replace copy_string with savestring.
3711
3712 2017-09-15 Yao Qi <yao.qi@linaro.org>
3713
3714 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
3715 gdb_target_obs.
3716 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
3717 Likewise.
3718 (i[34567]86-*-linux*): Likewise.
3719
3720 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3721
3722 * dwarf2expr.h (dwarf_stack_value): Add constructor.
3723 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
3724 <stack>: Change type to std::vector.
3725 <stack_len, stack_allocated>: Remove.
3726 <grow_stack>: Remove.
3727 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3728 (dwarf_expr_context::~dwarf_expr_context): Remove.
3729 (dwarf_expr_context::grow_stack): Remove.
3730 (dwarf_expr_context::push): Adjust.
3731 (dwarf_expr_context::pop): Adjust.
3732 (dwarf_expr_context::fetch): Adjust.
3733 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
3734 (dwarf_expr_context::stack_empty_p): Adjust.
3735 (dwarf_expr_context::execute_stack_op): Adjust.
3736
3737 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3738
3739 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
3740 return type to bool.
3741 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
3742
3743 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3744
3745 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
3746 Change type to bool.
3747 (dwarf_stack_value) <in_stack_memory>: Likewise.
3748 (dwarf_expr_context) <push_address>: Change parameter type to
3749 bool.
3750 <fetch_in_stack_memory>: Change return type to bool.
3751 <push>: Change parameter type to bool.
3752 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
3753 to bool.
3754 (dwarf_expr_context::push_address): Likewise.
3755 (dwarf_expr_context::fetch_in_stack_memory): Change return type
3756 to bool.
3757 (dwarf_expr_context::execute_stack_op): Adjust.
3758 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
3759
3760 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
3761
3762 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
3763 (struct dwarf_expr_context) <n_pieces>: Remove.
3764 <pieces>: Change type to std::vector.
3765 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
3766 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
3767 pieces.
3768 (dwarf_expr_context::add_piece): Adjust.
3769 * dwarf2loc.c (struct piece_closure): Initialize fields.
3770 <n_pieces>: Remove.
3771 <pieces>: Change type to std::vector.
3772 (allocate_piece_closure): Adjust, change parameter to
3773 std::vector rvalue and std::move it to piece_closure.
3774 (rw_pieced_value): Adjust.
3775 (check_pieced_synthetic_pointer): Adjust.
3776 (indirect_synthetic_pointer): Adjust.
3777 (coerce_pieced_ref): Adjust.
3778 (free_pieced_value_closure): Adjust. Use delete to free
3779 piece_closure.
3780 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
3781 to allocate_piece_closure.
3782 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
3783
3784 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3785
3786 * probe.h (probe_ops_cp): Remove typedef.
3787 (DEF_VEC_P (probe_ops_cp)): Remove.
3788 (all_probe_ops): Change type to std::vector.
3789 * probe.c (info_probes_for_ops): Adjust to vector change.
3790 (probe_linespec_to_ops): Likewise.
3791 (all_probe_ops): Change type to std::vector.
3792 (_initialize_probe): Adjust to vector change.
3793 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
3794 * elfread.c (elf_get_probes): Likewise.
3795 * stap-probe.c (_initialize_stap_probe): Likewise.
3796
3797 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3798
3799 * probe.h (struct bound_probe): Define constructors.
3800 * probe.c (bound_probe_s): Remove typedef.
3801 (DEF_VEC_O (bound_probe_s)): Remove VEC.
3802 (collect_probes): Change return type to std::vector, remove
3803 cleanup.
3804 (compare_probes): Return bool, change parameter type. Change
3805 semantic to "less than".
3806 (gen_ui_out_table_header_info): Change parameter to std::vector
3807 and update.
3808 (exists_probe_with_pops): Likewise.
3809 (info_probes_for_ops): Update to std::vector change.
3810 (enable_probes_command): Likewise.
3811 (disable_probes_command): Likewise.
3812
3813 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
3814
3815 * probe.h (struct probe_ops) <get_probes>: Change parameter from
3816 vec to std::vector.
3817 * probe.c (parse_probes_in_pspace): Update.
3818 (find_probes_in_objfile): Update.
3819 (find_probe_by_pc): Update.
3820 (collect_probes): Update.
3821 (probe_any_get_probes): Update.
3822 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
3823 return type to reference to std::vector.
3824 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
3825 std::vector and update.
3826 (dtrace_process_dof): Likewise.
3827 (dtrace_get_probes): Likewise.
3828 * elfread.c (elf_get_probes): Change return type to std::vector,
3829 store an std::vector in bfd_data.
3830 (probe_key_free): Update to std::vector.
3831 * stap-probe.c (handle_stap_probe): Change parameter to
3832 std::vector and update.
3833 (stap_get_probes): Likewise.
3834 * symfile-debug.c (debug_sym_get_probes): Change return type to
3835 std::vector and update.
3836
3837 2017-09-11 Tom Tromey <tom@tromey.com>
3838
3839 * breakpoint.c (program_breakpoint_here_p): Update.
3840 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
3841 from make_show_memory_breakpoints_cleanup. Return a
3842 scoped_restore_tmpl<int>.
3843 (restore_show_memory_breakpoints): Remove.
3844 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
3845 * mem-break.c (memory_validate_breakpoint): Update.
3846 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
3847 (ia64_memory_remove_breakpoint): Update.
3848 (ia64_breakpoint_from_pc): Update.
3849 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
3850 from make_show_memory_breakpoints_cleanup.
3851
3852 2017-09-11 Tom Tromey <tom@tromey.com>
3853
3854 * d-namespace.c (d_lookup_symbol): Use std::string.
3855 (find_symbol_in_baseclass): Likewise.
3856
3857 2017-09-11 Tom Tromey <tom@tromey.com>
3858
3859 * ctf.c (ctf_start): Use std::string.
3860
3861 2017-09-11 Tom Tromey <tom@tromey.com>
3862
3863 * ada-lang.c (is_known_support_routine): Update.
3864 (ada_unhandled_exception_name_addr_from_raise): Update.
3865 * guile/scm-frame.c (gdbscm_frame_name): Update.
3866 * python/py-frame.c (frapy_name): Update.
3867 (frapy_function): Update.
3868 * stack.h (find_frame_funname): Update.
3869 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
3870 (print_frame): Update.
3871
3872 2017-09-11 Tom Tromey <tom@tromey.com>
3873
3874 * findcmd.c (put_bits): Take a gdb::byte_vector.
3875 (parse_find_args): Return gdb::byte_vector. "args" now const.
3876 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
3877 cleanups.
3878 (find_command): Update.
3879
3880 2017-09-11 Tom Tromey <tom@tromey.com>
3881
3882 * cli/cli-script.c (class scoped_restore_hook_in): New.
3883 (clear_hook_in_cleanup): Remove.
3884 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
3885 scoped_restore_hook_in.
3886
3887 2017-09-11 Tom Tromey <tom@tromey.com>
3888
3889 * cli/cli-script.c (restore_interp): Remove.
3890 (read_command_lines): Use scoped_restore_interp.
3891 * interps.c (scoped_restore_interp::set_temp): Rename from
3892 interp_set_temp.
3893 * interps.h (class scoped_restore_interp): New.
3894 (interp_set_temp): Remove.
3895
3896 2017-09-11 Tom Tromey <tom@tromey.com>
3897
3898 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3899 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
3900 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
3901 scoped_restore.
3902 (mi_cmd_break_insert_1): Update.
3903 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
3904 scoped_restore.
3905
3906 2017-09-11 Tom Tromey <tom@tromey.com>
3907
3908 * demangle.c (demangle_command): Update.
3909 * breakpoint.c (disable_command): Update.
3910 (enable_command): Update.
3911 (find_location_by_number): Make "number" const. Use
3912 get_number_trailer.
3913 * cli/cli-utils.c (extract_arg): Return std::string.
3914 * probe.c (parse_probe_linespec): Update. Change types.
3915 (collect_probes): Take string arguments.
3916 (parse_probe_linespec): Likewise.
3917 (info_probes_for_ops): Update.
3918 (enable_probes_command): Update.
3919 (disable_probes_command): Update.
3920 * break-catch-sig.c (catch_signal_split_args): Update.
3921 * mi/mi-parse.c (mi_parse): Update.
3922
3923 2017-09-11 Tom Tromey <tom@tromey.com>
3924
3925 * language.h (language_enum): Make argument const.
3926 * language.c (language_enum): Make argument const.
3927
3928 2017-09-11 Tom Tromey <tom@tromey.com>
3929
3930 * common/common-utils.h (skip_to_space): Remove macro, redeclare
3931 as function.
3932 (skip_to_space): Rename from skip_to_space_const.
3933 * common/common-utils.c (skip_to_space): New function.
3934 (skip_to_space): Rename from skip_to_space_const.
3935 * cli/cli-utils.h (get_number): Rename from get_number_const.
3936 (extract_arg): Rename from extract_arg_const.
3937 * cli/cli-utils.c (get_number): Rename from get_number_const.
3938 (extract_arg): Rename from extract_arg_const.
3939 (number_or_range_parser::get_number): Use ::get_number.
3940 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
3941 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
3942 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
3943 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
3944 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
3945 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
3946 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
3947 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
3948
3949 2017-09-11 Tom Tromey <tom@tromey.com>
3950
3951 * python/python.c (do_start_initialization): Use
3952 py-event-types.def to initialize types.
3953 Define all object type structures.
3954 * python/python-internal.h: Don't declare event initialization
3955 functions.
3956 * python/py-threadevent.c (thread_event_object_type): Don't
3957 define.
3958 * python/py-stopevent.c (stop_event_object_type): Don't define.
3959 * python/py-signalevent.c (signal_event_object_type): Don't
3960 declare or define.
3961 * python/py-newobjfileevent.c (new_objfile_event_object_type)
3962 (clear_objfiles_event_object_type): Don't declare or define.
3963 * python/py-infevents.c (inferior_call_pre_event_object_type)
3964 (inferior_call_post_event_object_type)
3965 (register_changed_event_object_type)
3966 (memory_changed_event_object_type): Don't declare or define.
3967 * python/py-inferior.c (new_thread_event_object_type)
3968 (new_inferior_event_object_type)
3969 (inferior_deleted_event_object_type): Don't declare or define.
3970 * python/py-exitedevent.c (exited_event_object_type): Don't
3971 declare or define.
3972 * python/py-evts.c (gdbpy_initialize_py_events): Use
3973 py-all-events.def.
3974 * python/py-events.h (thread_event_object_type): Don't declare.
3975 (events_object): Use py-all-events.def.
3976 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
3977 py-event-types.def.
3978 * python/py-event-types.def: New file.
3979 * python/py-continueevent.c (create_continue_event_object): Don't
3980 declare or define.
3981 * python/py-bpevent.c (breakpoint_event_object_type): Don't
3982 declare or define.
3983 * python/py-all-events.def: New file.
3984
3985 2017-09-11 Tom Tromey <tom@tromey.com>
3986
3987 * python/py-threadevent.c (create_thread_event_object): Return
3988 gdbpy_ref.
3989 * python/py-stopevent.h (create_stop_event_object)
3990 (create_breakpoint_event_object, create_signal_event_object):
3991 Update.
3992 * python/py-stopevent.c (create_stop_event_object): Return
3993 gdbpy_ref.
3994 (emit_stop_event): Update.
3995 * python/py-signalevent.c (create_signal_event_object): Return
3996 gdbpy_ref.
3997 * python/py-infevents.c (create_inferior_call_event_object):
3998 Update.
3999 * python/py-event.h (create_event_object)
4000 (create_thread_event_object): Update.
4001 * python/py-event.c (create_event_object): Return gdbpy_ref.
4002 * python/py-continueevent.c: Return gdbpy_ref.
4003 * python/py-bpevent.c (create_breakpoint_event_object): Return
4004 gdbpy_ref.
4005
4006 2017-09-11 Tom Tromey <tom@tromey.com>
4007
4008 PR python/15622:
4009 * NEWS: Add entry.
4010 * python/python.c (do_start_initialization): Initialize new event
4011 types.
4012 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
4013 (gdbpy_initialize_inferior_deleted_event)
4014 (gdbpy_initialize_new_thread_event): Declare.
4015 * python/py-threadevent.c (create_thread_event_object): Add option
4016 "thread" parameter.
4017 * python/py-inferior.c (new_thread_event_object_type)
4018 (new_inferior_event_object_type)
4019 (inferior_deleted_event_object_type): Declare.
4020 (python_new_inferior, python_inferior_deleted): New functions.
4021 (add_thread_object): Emit new_thread event.
4022 (gdbpy_initialize_inferior): Attach new functions to corresponding
4023 observers.
4024 (new_thread, new_inferior, inferior_deleted): Define new event
4025 types.
4026 * python/py-evts.c (gdbpy_initialize_py_events): Add new
4027 registries.
4028 * python/py-events.h (events_object) <new_inferior,
4029 inferior_deleted, new_thread>: New fields.
4030 * python/py-event.h (create_thread_event_breakpoint): Add optional
4031 "thread" parameter.
4032
4033 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
4034
4035 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
4036 check current_ui instead.
4037 (internal_vproblem): Likewise.
4038
4039 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
4040
4041 * thread.c (print_thread_info_1): Remove unnecessary calls to
4042 uiout->is_mi_like_p.
4043
4044 2017-09-09 Tom Tromey <tom@tromey.com>
4045
4046 * namespace.h (add_using_directive): Update.
4047 * namespace.c (add_using_directive): Change type of excludes to
4048 std::vector.
4049 * dwarf2read.c (read_import_statement): Use std::vector.
4050 (read_namespace): Update.
4051 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4052
4053 2017-09-09 Tom Tromey <tom@tromey.com>
4054
4055 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
4056
4057 2017-09-09 Tom Tromey <tom@tromey.com>
4058
4059 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
4060
4061 2017-09-09 Tom Tromey <tom@tromey.com>
4062
4063 * stack.c (func_command): Use gdb::def_vector.
4064
4065 2017-09-09 Tom Tromey <tom@tromey.com>
4066
4067 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
4068 ui_out_emit_list, ui_out_emit_tuple.
4069 (mi_cmd_var_update): Likewise.
4070
4071 2017-09-09 Tom Tromey <tom@tromey.com>
4072
4073 * mi/mi-interp.c (mi_user_selected_context_changed): Use
4074 ui_out_redirect_pop.
4075 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4076 ui_out_redirect_pop.
4077 * utils.c (do_ui_out_redirect_pop)
4078 (make_cleanup_ui_out_redirect_pop): Remove.
4079 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
4080 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
4081 * ui-out.h (ui_out_redirect_pop): New class.
4082
4083 2017-09-09 Tom Tromey <tom@tromey.com>
4084
4085 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
4086 (list_available_thread_groups, mi_cmd_list_thread_groups)
4087 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
4088 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
4089 Likewise.
4090
4091 2017-09-09 Tom Tromey <tom@tromey.com>
4092
4093 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
4094 ui_out_emit_tuple.
4095
4096 2017-09-09 Tom Tromey <tom@tromey.com>
4097
4098 * target.c (flash_erase_command): Use ui_out_emit_tuple.
4099 * stack.c (print_frame): Use ui_out_emit_tuple.
4100 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
4101 (info_spu_mailbox_command, info_spu_dma_command)
4102 (info_spu_proxydma_command): Likewise.
4103 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
4104 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
4105 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
4106 ui_out_emit_tuple.
4107 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
4108
4109 2017-09-09 Tom Tromey <tom@tromey.com>
4110
4111 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
4112 (class ui_out_emit_table): Update comment.
4113 * ui-out.c (do_cleanup_table_end)
4114 (make_cleanup_ui_out_table_begin_end): Remove.
4115 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
4116 (info_spu_dma_cmdlist): Likewise.
4117 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
4118 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
4119 ui_out_emit_table.
4120
4121 2017-09-09 Tom Tromey <tom@tromey.com>
4122
4123 * thread.c (print_thread_info_1): Use ui_out_emit_table,
4124 ui_out_emit_list, gdb::optional.
4125
4126 2017-09-09 John Baldwin <jhb@FreeBSD.org>
4127
4128 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
4129 prototype.
4130 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
4131 prototype.
4132 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
4133 prototype.
4134 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
4135 * ada-exp.y: Remove _initialize_ada_exp prototype.
4136 * ada-lang.c: Remove _initialize_ada_language prototype.
4137 * ada-tasks.c: Remove _initialize_tasks prototype.
4138 * addrmap.c: Remove _initialize_addrmap prototype.
4139 * agent.c: Remove _initialize_agent prototype.
4140 * aix-thread.c: Remove _initialize_aix_thread prototype.
4141 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
4142 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
4143 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
4144 prototype.
4145 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
4146 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
4147 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
4148 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
4149 prototype.
4150 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
4151 prototype.
4152 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
4153 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
4154 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
4155 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
4156 prototype.
4157 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
4158 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
4159 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
4160 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
4161 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4162 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
4163 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
4164 prototype.
4165 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
4166 prototype.
4167 * annotate.c: Remove _initialize_annotate prototype.
4168 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
4169 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
4170 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
4171 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
4172 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
4173 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
4174 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
4175 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
4176 prototype.
4177 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
4178 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
4179 * auto-load.c: Remove _initialize_auto_load prototype.
4180 * auxv.c: Remove _initialize_auxv prototype.
4181 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
4182 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
4183 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
4184 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
4185 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
4186 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
4187 prototype.
4188 * break-catch-throw.c: Remove _initialize_break_catch_throw
4189 prototype.
4190 * breakpoint.c: Remove _initialize_breakpoint prototype.
4191 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
4192 * btrace.c: Remove _initialize_btrace prototype.
4193 * charset.c: Remove _initialize_charset prototype.
4194 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
4195 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
4196 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
4197 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
4198 * cli/cli-script.c: Remove _initialize_cli_script prototype.
4199 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
4200 * coffread.c: Remove _initialize_coffread prototype.
4201 * compile/compile.c: Remove _initialize_compile prototype.
4202 * complaints.c: Remove _initialize_complaints prototype.
4203 * completer.c: Remove _initialize_completer prototype.
4204 * copying.awk: Remove _initialize_copying prototype.
4205 * copying.c: Regenerate.
4206 * core-regset.c: Remove _initialize_core_regset prototype.
4207 * corefile.c: Remove _initialize_core prototype.
4208 * corelow.c: Remove _initialize_corelow prototype.
4209 * cp-abi.c: Remove _initialize_cp_abi prototype.
4210 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
4211 * cp-support.c: Remove _initialize_cp_support prototype.
4212 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
4213 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
4214 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
4215 * ctf.c: Remove _initialize_ctf prototype.
4216 * d-lang.c: Remove _initialize_d_language prototype.
4217 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
4218 prototype.
4219 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
4220 * dbxread.c: Remove _initialize_dbxread prototype.
4221 * dcache.c: Remove _initialize_dcache prototype.
4222 * demangle.c: Remove _initialize_demangler prototype.
4223 * disasm-selftests.c: Remove _initialize_disasm_selftests
4224 prototype.
4225 * disasm.c: Remove _initialize_disasm prototype.
4226 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
4227 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
4228 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
4229 prototype.
4230 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
4231 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
4232 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
4233 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
4234 * elfread.c: Remove _initialize_elfread prototype.
4235 * exec.c: Remove _initialize_exec prototype.
4236 * extension.c: Remove _initialize_extension prototype.
4237 * f-lang.c: Remove _initialize_f_language prototype.
4238 * f-valprint.c: Remove _initialize_f_valprint prototype.
4239 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
4240 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
4241 * filesystem.c: Remove _initialize_filesystem prototype.
4242 * findcmd.c: Remove _initialize_mem_search prototype.
4243 * fork-child.c: Remove _initialize_fork_child prototype.
4244 * frame-base.c: Remove _initialize_frame_base prototype.
4245 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
4246 * frame.c: Remove _initialize_frame prototype.
4247 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
4248 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
4249 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
4250 * gcore.c: Remove _initialize_gcore prototype.
4251 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
4252 * gdbarch.c: Regenerate.
4253 * gdbarch.sh: Remove _initialize_gdbarch prototype.
4254 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
4255 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
4256 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
4257 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
4258 * go-lang.c: Remove _initialize_go_language prototype.
4259 * go32-nat.c: Remove _initialize_go32_nat prototype.
4260 * guile/guile.c: Remove _initialize_guile prototype.
4261 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
4262 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
4263 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
4264 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
4265 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
4266 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
4267 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
4268 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
4269 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
4270 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
4271 prototype.
4272 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
4273 prototype.
4274 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
4275 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
4276 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
4277 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
4278 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
4279 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
4280 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
4281 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
4282 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
4283 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
4284 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
4285 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
4286 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
4287 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
4288 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
4289 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
4290 prototype.
4291 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
4292 prototype.
4293 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
4294 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
4295 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
4296 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
4297 * infcall.c: Remove _initialize_infcall prototype.
4298 * infcmd.c: Remove _initialize_infcmd prototype.
4299 * inferior.c: Remove _initialize_inferiors prototype.
4300 * inflow.c: Remove _initialize_inflow prototype.
4301 * infrun.c: Remove _initialize_infrun prototype.
4302 * interps.c: Remove _initialize_interpreter prototype.
4303 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
4304 * jit.c: Remove _initialize_jit prototype.
4305 * language.c: Remove _initialize_language prototype.
4306 * linux-fork.c: Remove _initialize_linux_fork prototype.
4307 * linux-nat.c: Remove _initialize_linux_nat prototype.
4308 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
4309 * linux-thread-db.c: Remove _initialize_thread_db prototype.
4310 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
4311 * m2-lang.c: Remove _initialize_m2_language prototype.
4312 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
4313 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
4314 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
4315 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
4316 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
4317 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4318 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4319 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
4320 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
4321 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
4322 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
4323 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
4324 * machoread.c: Remove _initialize_machoread prototype.
4325 * macrocmd.c: Remove _initialize_macrocmd prototype.
4326 * macroscope.c: Remove _initialize_macroscope prototype.
4327 * maint.c: Remove _initialize_maint_cmds prototype.
4328 * mdebugread.c: Remove _initialize_mdebugread prototype.
4329 * memattr.c: Remove _initialize_mem prototype.
4330 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
4331 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
4332 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
4333 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
4334 * mi/mi-main.c: Remove _initialize_mi_main prototype.
4335 * microblaze-linux-tdep.c: Remove
4336 _initialize_microblaze_linux_tdep prototype.
4337 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
4338 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
4339 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
4340 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
4341 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
4342 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
4343 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
4344 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
4345 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
4346 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
4347 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
4348 prototype.
4349 * mipsread.c: Remove _initialize_mipsread prototype.
4350 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
4351 prototype.
4352 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
4353 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
4354 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
4355 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
4356 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
4357 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
4358 prototype.
4359 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
4360 * nto-procfs.c: Remove _initialize_procfs prototype.
4361 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
4362 * objc-lang.c: Remove _initialize_objc_language prototype.
4363 * objfiles.c: Remove _initialize_objfiles prototype.
4364 * observer.c: Remove observer_test_first_notification_function,
4365 observer_test_second_notification_function,
4366 observer_test_third_notification_function, and
4367 _initialize_observer prototypes.
4368 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
4369 * osabi.c: Remove _initialize_gdb_osabi prototype.
4370 * osdata.c: Remove _initialize_osdata prototype.
4371 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
4372 * parse.c: Remove _initialize_parse prototype.
4373 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
4374 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
4375 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
4376 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
4377 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
4378 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
4379 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
4380 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
4381 * printcmd.c: Remove _initialize_printcmd prototype.
4382 * probe.c: Remove _initialize_probe prototype.
4383 * proc-api.c: Remove _initialize_proc_api prototype.
4384 * proc-events.c: Remove _initialize_proc_events prototype.
4385 * proc-service.c: Remove _initialize_proc_service prototype.
4386 * procfs.c: Remove _initialize_procfs prototype.
4387 * psymtab.c: Remove _initialize_psymtab prototype.
4388 * python/python.c: Remove _initialize_python prototype.
4389 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
4390 * record-btrace.c: Remove _initialize_record_btrace prototype.
4391 * record-full.c: Remove _initialize_record_full prototype.
4392 * record.c: Remove _initialize_record prototype.
4393 * regcache.c: Remove _initialize_regcache prototype.
4394 * reggroups.c: Remove _initialize_reggroup prototype.
4395 * remote-notif.c: Remove _initialize_notif prototype.
4396 * remote-sim.c: Remove _initialize_remote_sim prototype.
4397 * remote.c: Remove _initialize_remote prototype.
4398 * reverse.c: Remove _initialize_reverse prototype.
4399 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
4400 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
4401 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
4402 prototype.
4403 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
4404 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
4405 * rust-exp.y: Remove _initialize_rust_exp prototype.
4406 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
4407 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
4408 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
4409 * score-tdep.c: Remove _initialize_score_tdep prototype.
4410 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
4411 prototype.
4412 * ser-go32.c: Remove _initialize_ser_dos prototype.
4413 * ser-mingw.c: Remove _initialize_ser_windows prototype.
4414 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
4415 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
4416 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
4417 * serial.c: Remove _initialize_serial prototype.
4418 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
4419 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
4420 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
4421 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
4422 * skip.c: Remove _initialize_step_skip prototype.
4423 * sol-thread.c: Remove _initialize_sol_thread prototype.
4424 * solib-aix.c: Remove _initialize_solib_aix prototype.
4425 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
4426 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
4427 * solib-frv.c: Remove _initialize_frv_solib prototype.
4428 * solib-spu.c: Remove _initialize_spu_solib prototype.
4429 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
4430 * solib-target.c: Remove _initialize_solib_target prototype.
4431 * solib.c: Remove _initialize_solib prototype.
4432 * source.c: Remove _initialize_source prototype.
4433 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
4434 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
4435 prototype.
4436 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
4437 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
4438 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
4439 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
4440 prototype.
4441 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
4442 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
4443 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
4444 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
4445 prototype.
4446 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
4447 prototype.
4448 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
4449 prototype.
4450 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
4451 prototype.
4452 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
4453 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
4454 prototype.
4455 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
4456 prototype.
4457 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
4458 prototype.
4459 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
4460 prototype.
4461 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
4462 prototype.
4463 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
4464 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
4465 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
4466 * stabsread.c: Remove _initialize_stabsread prototype.
4467 * stack.c: Remove _initialize_stack prototype.
4468 * stap-probe.c: Remove _initialize_stap_probe prototype.
4469 * std-regs.c: Remove _initialize_frame_reg prototype.
4470 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
4471 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
4472 * symfile.c: Remove _initialize_symfile prototype.
4473 * symmisc.c: Remove _initialize_symmisc prototype.
4474 * symtab.c: Remove _initialize_symtab prototype.
4475 * target-dcache.c: Remove _initialize_target_dcache prototype.
4476 * target-descriptions.c: Remove _initialize_target_descriptions
4477 prototype.
4478 * thread.c: Remove _initialize_thread prototype.
4479 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
4480 prototype.
4481 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
4482 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
4483 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
4484 prototype.
4485 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
4486 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
4487 * tracefile.c: Remove _initialize_tracefile prototype.
4488 * tracepoint.c: Remove _initialize_tracepoint prototype.
4489 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
4490 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
4491 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
4492 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
4493 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
4494 * tui/tui-win.c: Remove _initialize_tui_win prototype.
4495 * tui/tui.c: Remove _initialize_tui prototype.
4496 * typeprint.c: Remove _initialize_typeprint prototype.
4497 * user-regs.c: Remove _initialize_user_regs prototype.
4498 * utils.c: Remove _initialize_utils prototype.
4499 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
4500 * valarith.c: Remove _initialize_valarith prototype.
4501 * valops.c: Remove _initialize_valops prototype.
4502 * valprint.c: Remove _initialize_valprint prototype.
4503 * value.c: Remove _initialize_values prototype.
4504 * varobj.c: Remove _initialize_varobj prototype.
4505 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
4506 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
4507 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
4508 * windows-nat.c: Remove _initialize_windows_nat,
4509 _initialize_check_for_gdb_ini, and _initialize_loadable
4510 prototypes.
4511 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
4512 * xcoffread.c: Remove _initialize_xcoffread prototype.
4513 * xml-support.c: Remove _initialize_xml_support prototype.
4514 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
4515 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
4516 prototype.
4517 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
4518 prototype.
4519 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
4520
4521 2017-09-08 Keith Seitz <keiths@redhat.com>
4522
4523 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
4524 field.
4525
4526 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
4527
4528 * f-valprint.c (f_val_print): Remove check for one byte
4529 sized integers. Remove printing of character type.
4530
4531 2017-09-08 Frank Penczek <frank.penczek@intel.com>
4532 Christoph Weinmann <christoph.t.weinmann@intel.com>
4533 Bernhard Heckel <bernhard.heckel@intel.com>
4534
4535 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
4536 to maintain proper indentation when printing pointers/refs.
4537
4538 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4539
4540 GDB 8.0.1 released.
4541
4542 2017-09-07 Joel Brobecker <brobecker@adacore.com>
4543
4544 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
4545
4546 2017-09-05 Tom Tromey <tom@tromey.com>
4547
4548 * parse.c (funcall_chain): Now a std::vector.
4549 (start_arglist, end_arglist): Simplify.
4550 (free_funcalls): Remove.
4551 (parse_exp_in_context_1): Remove cleanup.
4552
4553 2017-09-05 Tom Tromey <tom@tromey.com>
4554
4555 * go-exp.y (go_parse): Don't create a cleanup.
4556
4557 2017-09-05 Tom Tromey <tom@tromey.com>
4558
4559 * d-exp.y (PrimaryExpression): Use std::string.
4560 (d_parse): Don't create a cleanup.
4561
4562 2017-09-05 Tom Tromey <tom@tromey.com>
4563
4564 * utils.c (do_clear_parser_state): Remove.
4565 (make_cleanup_clear_parser_state): Remove.
4566 * p-exp.y (pascal_parse): Use scoped_restore.
4567 * m2-exp.y (m2_parse): Use scoped_restore.
4568 * f-exp.y (f_parse): Use scoped_restore.
4569 * d-exp.y (d_parse): Use scoped_restore.
4570 * c-exp.y (c_parse): Use scoped_restore.
4571 * ada-exp.y (ada_parse): Use scoped_restore.
4572 * utils.h (make_cleanup_clear_parser_state): Remove.
4573
4574 2017-09-06 Keith Seitz <keiths@redhat.com>
4575
4576 * dwarf2read.c (dw2_linkage_name_attr): New function.
4577 (dw2_linkage_name): New function.
4578 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
4579 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
4580 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
4581
4582 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4583
4584 * config/djgpp/djconfig.sh: Correct shell portability issue.
4585
4586 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4587
4588 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
4589
4590 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4591
4592 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4593 * NEWS: Mention new FreeBSD/mips native configuration.
4594 * configure.host: Add aarch64*-*-freebsd*.
4595 * configure.nat: Likewise.
4596 * aarch64-fbsd-nat.c: New file.
4597
4598 2017-09-06 John Baldwin <jhb@FreeBSD.org>
4599
4600 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
4601 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
4602 * NEWS: Mention new FreeBSD/aarch64 target.
4603 * configure.tgt: Add aarch64*-*-freebsd*.
4604 * aarch64-fbsd-tdep.c: New file.
4605 * aarch64-fbsd-tdep.h: New file.
4606
4607 2017-09-06 Kamil Rytarowski <n54@gmx.com>
4608
4609 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
4610
4611 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
4612
4613 * parse.c (find_minsym_type_and_address): Don't relocate addresses
4614 of TLS symbols.
4615
4616 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4617
4618 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
4619 call.
4620
4621 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4622
4623 * infrun.c (follow_exec): Call add_thread after
4624 target_find_description.
4625
4626 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4627
4628 * infrun.c (handle_inferior_event_1): When exec'ing, read
4629 stop_pc after follow_exec.
4630
4631 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4632
4633 * remote.c (process_g_packet): Update error message.
4634
4635 2017-09-05 Yao Qi <yao.qi@linaro.org>
4636
4637 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
4638 targets.
4639
4640 2017-09-05 Pedro Alves <palves@redhat.com>
4641
4642 * eval.c (eval_call, evaluate_funcall): New functions, factored
4643 out from ...
4644 (evaluate_subexp_standard): ... this.
4645
4646 2017-09-05 Yao Qi <yao.qi@linaro.org>
4647
4648 * amd64-tdep.c (amd64_target_description): Create target
4649 descriptions.
4650 (_initialize_amd64_tdep): Don't call functions
4651 initialize_tdesc_amd64_*. Add self tests.
4652 * arch/amd64.c (amd64_create_target_description): Add parameter
4653 is_linux. Call set_tdesc_osabi if is_linux is true.
4654 * arch/amd64.h (amd64_create_target_description): Update the
4655 declaration.
4656 * arch/i386.c (i386_create_target_description): Add parameter
4657 is_linux. Call set_tdesc_osabi if is_linux is true.
4658 * arch/i386.h (i386_create_target_description): Update
4659 declaration.
4660 * configure.tgt: Add i386.o to gdb_target_obs.
4661 * features/Makefile (XMLTOC): Remove i386/*.xml.
4662 * features/i386/amd64-avx-avx512.c: Remove.
4663 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
4664 * features/i386/amd64-avx-mpx.c: Remove.
4665 * features/i386/amd64-avx.c: Remove.
4666 * features/i386/amd64-mpx.c: Remove.
4667 * features/i386/amd64.c: Remove.
4668 * features/i386/i386-avx-avx512.c: Remove.
4669 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
4670 * features/i386/i386-avx-mpx.c: Remove.
4671 * features/i386/i386-avx.c: Remove.
4672 * features/i386/i386-mmx.c: Remove.
4673 * features/i386/i386-mpx.c: Remove.
4674 * features/i386/i386.c: Remove.
4675 * i386-tdep.c: Don't include features/i386/i386*.c., include
4676 target-descriptions.h and arch/i386.h.
4677 (i386_target_description): Create target descriptions.
4678 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
4679 functions. Do self tests.
4680
4681 2017-09-05 Yao Qi <yao.qi@linaro.org>
4682
4683 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
4684 * features/i386/amd64-avx-avx512-linux.c: Removed.
4685 * features/i386/amd64-avx-linux.c: Removed.
4686 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
4687 * features/i386/amd64-avx-mpx-linux.c: Removed.
4688 * features/i386/amd64-linux.c: Removed.
4689 * features/i386/amd64-mpx-linux.c: Removed.
4690 * features/i386/x32-avx-avx512-linux.c: Removed.
4691 * features/i386/x32-avx-linux.c: Removed.
4692 * features/i386/x32-linux.c: Removed.
4693
4694 2017-09-05 Yao Qi <yao.qi@linaro.org>
4695
4696 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
4697 features/i386/*.c.
4698 (amd64_linux_read_description): Call
4699 amd64_create_target_description.
4700 * arch/amd64.c: New file.
4701 * arch/amd64.h: New file.
4702 * configure.tgt (x86_64-*-linux*): Append amd64.o.
4703 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
4704
4705 2017-09-05 Yao Qi <yao.qi@linaro.org>
4706
4707 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
4708 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
4709 (amd64_linux_read_description): Create target descriptions.
4710 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
4711 functions. Add unit tests.
4712 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
4713 x32-core.xml.
4714 * features/i386/64bit-avx.c: Generated.
4715 * features/i386/64bit-avx512.c: Generated.
4716 * features/i386/64bit-core.c: Generated.
4717 * features/i386/64bit-linux.c: Generated.
4718 * features/i386/64bit-mpx.c: Generated.
4719 * features/i386/64bit-pkeys.c: Generated.
4720 * features/i386/64bit-segments.c: Generated.
4721 * features/i386/64bit-sse.c: Generated.
4722 * features/i386/x32-core.c: Generated.
4723 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
4724 c files for amd64-linux and x32-linux.
4725
4726 2017-09-05 Yao Qi <yao.qi@linaro.org>
4727
4728 * amd64-linux-tdep.c (amd64_linux_read_description): New
4729 function.
4730 (amd64_linux_core_read_description): Call
4731 amd64_linux_read_description.
4732 (amd64_linux_init_abi): Likewise.
4733 (amd64_x32_linux_init_abi): Likewise.
4734 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
4735 * x86-linux-nat.c (x86_linux_read_description): Call
4736 amd64_linux_read_description.
4737
4738 2017-09-05 Yao Qi <yao.qi@linaro.org>
4739
4740 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
4741 comments.
4742
4743 2017-09-05 Yao Qi <yao.qi@linaro.org>
4744
4745 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
4746 * features/i386/i386-avx-avx512-linux.c: Remove.
4747 * features/i386/i386-avx-linux.c: Remove.
4748 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
4749 * features/i386/i386-avx-mpx-linux.c: Remove.
4750 * features/i386/i386-linux.c: Remove.
4751 * features/i386/i386-mmx-linux.c: Remove.
4752 * features/i386/i386-mpx-linux.c: Remove.
4753
4754 2017-09-05 Yao Qi <yao.qi@linaro.org>
4755
4756 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
4757 (SFILES): Add arch/i386.c.
4758 (HFILES_NO_SRCDIR): Add arch/i386.h.
4759 * arch/i386.c: New file.
4760 * arch/i386.h: New file.
4761 * arch/tdesc.h (allocate_target_description): Declare.
4762 (set_tdesc_architecture): Declare.
4763 (set_tdesc_osabi): Declare.
4764 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
4765 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
4766 include arch/i386.h.
4767 (i386_linux_read_description): Remove code and call
4768 i386_create_target_description.
4769 (set_tdesc_architecture): New function.
4770 (set_tdesc_osabi): New function.
4771 * target-descriptions.h (allocate_target_description): Remove.
4772
4773 2017-09-05 Yao Qi <yao.qi@linaro.org>
4774
4775 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
4776 * target-descriptions.c (tdesc_create_feature): Likewise, and
4777 adjust code.
4778 * features/i386/32bit-avx.c: Re-generated.
4779 * features/i386/32bit-avx512.c: Re-generated.
4780 * features/i386/32bit-core.c: Re-generated.
4781 * features/i386/32bit-linux.c: Re-generated.
4782 * features/i386/32bit-mpx.c: Re-generated.
4783 * features/i386/32bit-pkeys.c: Re-generated.
4784 * features/i386/32bit-sse.c: Re-generated.
4785
4786 2017-09-05 Yao Qi <yao.qi@linaro.org>
4787
4788 * regformats/regdef.h (struct reg): Override operator == and !=.
4789
4790 2017-09-05 Yao Qi <yao.qi@linaro.org>
4791
4792 * arch/tdesc.h: New file.
4793 * regformats/regdat.sh: Generate code using tdesc_create_reg.
4794 * target-descriptions.c: Update comments.
4795 * target-descriptions.h: Include "arch/tdesc.h". Remove the
4796 declarations.
4797 * features/i386/32bit-avx.c: Re-generated.
4798 * features/i386/32bit-avx512.c: Re-generated.
4799 * features/i386/32bit-core.c: Re-generated.
4800 * features/i386/32bit-linux.c: Re-generated.
4801 * features/i386/32bit-mpx.c: Re-generated.
4802 * features/i386/32bit-pkeys.c: Re-generated.
4803 * features/i386/32bit-sse.c: Re-generated.
4804
4805 2017-09-05 Yao Qi <yao.qi@linaro.org>
4806
4807 * regformats/regdat.sh: Update generated code.
4808
4809 2017-09-05 Yao Qi <yao.qi@linaro.org>
4810
4811 * regformats/regdat.sh: Adjust code order.
4812
4813 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
4814
4815 * expprint.c (dump_subexp_body_standard): Use constant format
4816 string in fprintf_filtered call.
4817
4818 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4819
4820 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
4821 NetBSD/i386.
4822 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
4823
4824 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4825
4826 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
4827
4828 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4829
4830 * bsd-kvm.o: Define _KMEMUSER.
4831 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
4832 * configure: Regenerate.
4833
4834 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4835
4836 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
4837 * i386-fbsd-nat.c: Likewise.
4838
4839 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4840
4841 * unittests/array-view-selftests.c: Add include of <array>.
4842
4843 2017-09-04 John Baldwin <jhb@FreeBSD.org>
4844
4845 * spu-tdep.c (flush_ea_cache): Add missing argument to
4846 call_function_by_hand.
4847
4848 2017-09-04 Pedro Alves <palves@redhat.com>
4849
4850 * NEWS (Safer support for debugging with no debug info): New.
4851
4852 2017-09-04 Pedro Alves <palves@redhat.com>
4853
4854 * c-exp.y (function_method, function_method_void): Add current
4855 instance flags to TYPE_INSTANCE.
4856 * dwarf2read.c (check_modifier): New.
4857 (compute_delayed_physnames): Assert that only C++ adds delayed
4858 physnames. Mark fn_fields as const/volatile depending on
4859 physname.
4860 * eval.c (make_params): New type_instance_flags parameter. Use
4861 it as the new type's instance flags.
4862 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
4863 flags element and pass it to make_params.
4864 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
4865 instance flags element.
4866 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
4867 * gdbtypes.h: Include "enum-flags.h".
4868 (type_instance_flags): New enum-flags type.
4869 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
4870 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
4871 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
4872 (follow_type_instance_flags): New function.
4873 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
4874 * parser-defs.h (follow_type_instance_flags): Declare.
4875 * valops.c (value_struct_elt_for_reference): const/volatile must
4876 match too.
4877
4878 2017-09-04 Pedro Alves <palves@redhat.com>
4879
4880 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
4881 function/method scopes; lookup the nested name as a function local
4882 static variable.
4883
4884 2017-09-04 Pedro Alves <palves@redhat.com>
4885
4886 (%type <voidval>): Add function_method.
4887 * c-exp.y (exp): New production for calls with no arguments.
4888 (function_method, function_method_void_or_typelist): New
4889 productions.
4890 (exp): New production for "method()::static_var".
4891 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
4892 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4893 Handle OP_FUNC_STATIC_VAR.
4894 * parse.c (operator_length_standard):
4895 Handle OP_FUNC_STATIC_VAR.
4896
4897 2017-09-04 Pedro Alves <palves@redhat.com>
4898
4899 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
4900 handling.
4901 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4902 Ditto.
4903 * parse.c (operator_length_standard, operator_check_standard):
4904 Ditto.
4905 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
4906
4907 2017-09-04 Pedro Alves <palves@redhat.com>
4908
4909 * ax-gdb.c: Include "typeprint.h".
4910 (gen_expr_for_cast): New function.
4911 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
4912 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
4913 type is unknown.
4914 * dwarf2read.c (new_symbol_full): Fallback to int instead of
4915 nodebug_data_symbol.
4916 * eval.c: Include "typeprint.h".
4917 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
4918 Error out if symbol has unknown type.
4919 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
4920 evaluate_subexp_for_cast.
4921 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
4922 OP_VAR_MSYM_VALUE.
4923 (evaluate_subexp_for_cast): New function.
4924 * gdbtypes.c (init_nodebug_var_type): New function.
4925 (objfile_type): Use it to initialize types of variables with no
4926 debug info.
4927 * typeprint.c (error_unknown_type): New.
4928 * typeprint.h (error_unknown_type): New declaration.
4929 * compile/compile-c-types.c (convert_type_basic): Handle
4930 TYPE_CODE_ERROR; warn and fallback to int for variables with
4931 unknown type.
4932
4933 2017-09-04 Pedro Alves <palves@redhat.com>
4934
4935 * eval.c (evaluate_var_value): New function, factored out from ...
4936 (evaluate_subexp_standard): ... here.
4937
4938 2017-09-04 Pedro Alves <palves@redhat.com>
4939
4940 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
4941 Remove useless assignments to 'op'.
4942
4943 2017-09-04 Pedro Alves <palves@redhat.com>
4944
4945 * eval.c (eval_skip_value): New function.
4946 (evaluate_subexp_standard): Use it.
4947
4948 2017-09-04 Pedro Alves <palves@redhat.com>
4949
4950 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
4951 function name from symbol/minsym and pass it to
4952 error_call_unknown_return_type.
4953
4954 2017-09-04 Pedro Alves <palves@redhat.com>
4955
4956 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
4957 * ax-gdb.c (gen_msym_var_ref): New function.
4958 (gen_expr): Handle OP_VAR_MSYM_VALUE.
4959 * eval.c (evaluate_var_msym_value): New function.
4960 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
4961 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
4962 to call_function_by_hand.
4963 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
4964 Handle OP_VAR_MSYM_VALUE.
4965 (union exp_element) <msymbol>: New field.
4966 * minsyms.h (struct type): Forward declare.
4967 (find_minsym_type_and_address): Declare.
4968 * parse.c (write_exp_elt_msym): New function.
4969 (write_exp_msymbol): Delete, refactored as ...
4970 (find_minsym_type_and_address): ... this new function.
4971 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
4972 (operator_length_standard, operator_check_standard): Handle
4973 OP_VAR_MSYM_VALUE.
4974 * std-operator.def (OP_VAR_MSYM_VALUE): New.
4975
4976 2017-09-04 Pedro Alves <palves@redhat.com>
4977
4978 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
4979 TYPE_GNU_IFUNC specially here. Throw error if return type is
4980 unknown.
4981 * ada-typeprint.c (print_func_type): Handle functions with unknown
4982 return type.
4983 * c-typeprint.c (c_type_print_base): Handle functions and methods
4984 with unknown return type.
4985 * compile/compile-c-symbols.c (convert_symbol_bmsym)
4986 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
4987 * compile/compile-c-types.c: Include "objfiles.h".
4988 (convert_func): For functions with unknown return type, warn and
4989 default to int.
4990 * compile/compile-object-run.c (compile_object_run): Adjust call
4991 to call_function_by_hand_dummy.
4992 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
4993 call_function_by_hand.
4994 * eval.c (evaluate_subexp_standard): Adjust calls to
4995 call_function_by_hand. Handle functions and methods with unknown
4996 return type. Pass expect_type to call_function_by_hand.
4997 * f-typeprint.c (f_type_print_base): Handle functions with unknown
4998 return type.
4999 * gcore.c (call_target_sbrk): Adjust call to
5000 call_function_by_hand.
5001 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
5002 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
5003 an integer address type instead of nodebug.
5004 * guile/scm-value.c (gdbscm_value_call): Adjust call to
5005 call_function_by_hand.
5006 * infcall.c (error_call_unknown_return_type): New function.
5007 (call_function_by_hand): New "default_return_type" parameter.
5008 Pass it down.
5009 (call_function_by_hand_dummy): New "default_return_type"
5010 parameter. Use it instead of defaulting to int. If there's no
5011 default and the return type is unknown, throw an error. If
5012 there's a default return type, and the called function has no
5013 debug info, then assume the function is prototyped.
5014 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
5015 New "default_return_type" parameter.
5016 (error_call_unknown_return_type): New declaration.
5017 * linux-fork.c (call_lseek): Cast return type of lseek.
5018 (inferior_call_waitpid, checkpoint_command): Adjust calls to
5019 call_function_by_hand.
5020 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
5021 calls to call_function_by_hand.
5022 * m2-typeprint.c (m2_procedure): Handle functions with unknown
5023 return type.
5024 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5025 (value_nsstring, print_object_command): Adjust calls to
5026 call_function_by_hand.
5027 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
5028 functions with unknown return type.
5029 (pascal_type_print_func_varspec_suffix): New function.
5030 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
5031 TYPE_CODE_METHOD>: Use it.
5032 * python/py-value.c (valpy_call): Adjust call to
5033 call_function_by_hand.
5034 * rust-lang.c (rust_evaluate_funcall): Adjust call to
5035 call_function_by_hand.
5036 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
5037 call_function_by_hand.
5038 * valops.c (value_allocate_space_in_inferior): Adjust call to
5039 call_function_by_hand.
5040 * typeprint.c (type_print_unknown_return_type): New function.
5041 * typeprint.h (type_print_unknown_return_type): New declaration.
5042
5043 2017-09-04 Pedro Alves <palves@redhat.com>
5044
5045 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
5046 types with more than one parameter as prototyped.
5047
5048 2017-09-04 Pedro Alves <palves@redhat.com>
5049
5050 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
5051 (disassemble_command): Use gdb_disassembly_flags instead of bare
5052 int.
5053 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
5054 (dump_insns, do_mixed_source_and_assembly_deprecated)
5055 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
5056 Use gdb_disassembly_flags instead of bare int.
5057 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
5058 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
5059 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
5060 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
5061 (enum gdb_disassembly_flag): ... values of this new enumeration.
5062 (gdb_disassembly_flags): Define.
5063 (gdb_disassembly)
5064 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
5065 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
5066 gdb_disassembly_flags instead of bare int.
5067 * record-btrace.c (btrace_insn_history)
5068 (record_btrace_insn_history, record_btrace_insn_history_range)
5069 (record_btrace_insn_history_from): Use gdb_disassembly_flags
5070 instead of bare int.
5071 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
5072 Use gdb_disassembly_flags instead of bare int.
5073 * target-debug.h (target_debug_print_gdb_disassembly_flags):
5074 Define.
5075 * target-delegates.c: Regenerate.
5076 * target.c (target_insn_history, target_insn_history_from)
5077 (target_insn_history_range): Use gdb_disassembly_flags instead of
5078 bare int.
5079 * target.h: Include "disasm.h".
5080 (struct target_ops) <to_insn_history, to_insn_history_from,
5081 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
5082 int.
5083 (target_insn_history, target_insn_history_from)
5084 (target_insn_history_range): Use gdb_disassembly_flags instead of
5085 bare int.
5086
5087 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5088
5089 * cli/cli-script.c (build_command_line): For if/while commands,
5090 check whether args is empty.
5091
5092 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5093
5094 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
5095 (enum command_control_type): Likewise.
5096 (struct command_line): Likewise.
5097 (free_command_lines): Likewise.
5098 (struct command_lines_deleter): Likewise.
5099 (command_line_up): Likewise.
5100 (read_command_lines): Likewise.
5101 (read_command_lines_1): Likewise.
5102 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
5103 (enum command_control_type): Likewise.
5104 (struct command_line): Likewise.
5105 (free_command_lines): Likewise.
5106 (struct command_lines_deleter): Likewise.
5107 (command_line_up): Likewise.
5108 (read_command_lines): Likewise.
5109 (read_command_lines_1): Likewise.
5110 * breakpoint.h: Include cli/cli-script.h.
5111 * extension-priv.h: Likewise.
5112 * gdbcmd.h: Likewise.
5113
5114 2017-09-04 Pedro Alves <palves@redhat.com>
5115
5116 * ada-lang.c (is_known_support_routine): Move sal declaration to
5117 where it is initialized.
5118 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
5119 (parse_breakpoint_sals, decode_static_tracepoint_spec)
5120 (clear_command, update_static_tracepoint): Remove init_sal
5121 references. Move declarations closer to initializations.
5122 * cli/cli-cmds.c (list_command): Move sal declarations closer to
5123 initializations.
5124 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
5125 references. Move sal declarations closer to initializations.
5126 * frame.c (find_frame_sal): Return a symtab_and_line via function
5127 return instead of output parameter. Remove init_sal references.
5128 * frame.h (find_frame_sal): Return a symtab_and_line via function
5129 return instead of output parameter.
5130 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
5131 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
5132 instead of memset.
5133 (gdbscm_find_pc_line): Remove init_sal reference.
5134 * infcall.c (call_function_by_hand_dummy): Remove init_sal
5135 references. Move declarations closer to initializations.
5136 * infcmd.c (set_step_frame): Update. Move declarations closer to
5137 initializations.
5138 (finish_backward): Remove init_sal references. Move declarations
5139 closer to initializations.
5140 * infrun.c (process_event_stop_test, handle_step_into_function)
5141 (insert_hp_step_resume_breakpoint_at_frame)
5142 (insert_step_resume_breakpoint_at_caller): Likewise.
5143 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
5144 (symbol_to_sal): Likewise.
5145 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
5146 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
5147 to its initialization.
5148 * reverse.c (save_bookmark_command): Use new/delete. Remove
5149 init_sal references. Move declarations closer to initializations.
5150 * source.c (get_current_source_symtab_and_line): Remove brace
5151 initialization.
5152 (set_current_source_symtab_and_line): Now takes the sal by const
5153 reference. Remove brace initialization.
5154 (line_info): Remove init_sal reference.
5155 * source.h (set_current_source_symtab_and_line): Now takes a
5156 symtab_and_line via const reference.
5157 * stack.c (set_current_sal_from_frame): Adjust.
5158 (print_frame_info): Adjust.
5159 (get_last_displayed_sal): Return the sal via function return
5160 instead of via output parameter. Simplify.
5161 (frame_info): Adjust.
5162 * stack.h (get_last_displayed_sal): Return the sal via function
5163 return instead of via output parameter.
5164 * symtab.c (init_sal): Delete.
5165 (find_pc_sect_line): Remove init_sal references. Move
5166 declarations closer to initializations.
5167 (find_function_start_sal): Remove init_sal references. Move
5168 declarations closer to initializations.
5169 * symtab.h (struct symtab_and_line): In-class initialize all
5170 fields.
5171 * tracepoint.c (set_traceframe_context)
5172 (print_one_static_tracepoint_marker): Remove init_sal references.
5173 Move declarations closer to initializations.
5174 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
5175 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
5176 declarations closer to initializations.
5177 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
5178 init_sal references. Adjust.
5179
5180 2017-09-04 Pedro Alves <palves@redhat.com>
5181
5182 * ax-gdb.c (agent_command_1): Use range-for.
5183 * break-catch-throw.c (re_set_exception_catchpoint): Update.
5184 * breakpoint.c: Include "common/array-view.h".
5185 (init_breakpoint_sal, create_breakpoint_sal): Change sals
5186 parameter from struct symtabs_and_lines to
5187 array_view<symtab_and_line>. Adjust. Use range-for. Update.
5188 (breakpoint_sals_to_pc): Change sals parameter from struct
5189 symtabs_and_lines to std::vector reference.
5190 (check_fast_tracepoint_sals): Change sals parameter from struct
5191 symtabs_and_lines to std::array_view. Use range-for.
5192 (decode_static_tracepoint_spec): Return a std::vector instead of
5193 symtabs_and_lines. Update.
5194 (create_breakpoint): Update.
5195 (break_range_command, until_break_command, clear_command): Update.
5196 (base_breakpoint_decode_location, bkpt_decode_location)
5197 (bkpt_probe_create_sals_from_location)
5198 (bkpt_probe_decode_location, tracepoint_decode_location)
5199 (tracepoint_probe_decode_location)
5200 (strace_marker_create_sals_from_location): Return a std::vector
5201 instead of symtabs_and_lines.
5202 (strace_marker_create_breakpoints_sal): Update.
5203 (strace_marker_decode_location): Return a std::vector instead of
5204 symtabs_and_lines. Update.
5205 (update_breakpoint_locations): Change struct symtabs_and_lines
5206 parameters to gdb::array_view. Adjust.
5207 (location_to_sals): Return a std::vector instead of
5208 symtabs_and_lines. Update.
5209 (breakpoint_re_set_default): Use std::vector instead of struct
5210 symtabs_and_lines.
5211 (decode_location_default): Return a std::vector instead of
5212 symtabs_and_lines. Update.
5213 * breakpoint.h: Include "common/array-view.h".
5214 (struct breakpoint_ops) <decode_location>: Now returns a
5215 std::vector instead of returning a symtabs_and_lines via output
5216 parameter.
5217 (update_breakpoint_locations): Change sals parameters to use
5218 gdb::array_view.
5219 * cli/cli-cmds.c (edit_command, list_command): Update to use
5220 std::vector and gdb::array_view.
5221 (ambiguous_line_spec): Adjust to use gdb::array_view and
5222 range-for.
5223 (compare_symtabs): Rename to ...
5224 (cmp_symtabs): ... this. Change parameters to symtab_and_line
5225 const reference and adjust.
5226 (filter_sals): Rewrite using std::vector and standard algorithms.
5227 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
5228 (jump_command): Update to use std::vector.
5229 * linespec.c (struct linespec_state) <canonical_names>: Update
5230 comment.
5231 (add_sal_to_sals_basic): Delete.
5232 (add_sal_to_sals, filter_results, convert_results_to_lsals)
5233 (decode_line_2, create_sals_line_offset)
5234 (convert_address_location_to_sals, convert_linespec_to_sals)
5235 (convert_explicit_location_to_sals, parse_linespec)
5236 (event_location_to_sals, decode_line_full, decode_line_1)
5237 (decode_line_with_current_source)
5238 (decode_line_with_last_displayed, decode_objc)
5239 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
5240 (linespec_result::~linespec_result): Adjust to use std::vector
5241 instead of symtabs_and_lines.
5242 * linespec.h (linespec_sals::sals): Now a std::vector.
5243 (struct linespec_result): Use std::vector, bool, and in-class
5244 initialization.
5245 (decode_line_1, decode_line_with_current_source)
5246 (decode_line_with_last_displayed): Return std::vector.
5247 * macrocmd.c (info_macros_command): Use std::vector.
5248 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
5249 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
5250 std::vector.
5251 * probe.h (parse_probes): Return a std::vector.
5252 * python/python.c (gdbpy_decode_line): Use std::vector and
5253 gdb::array_view.
5254 * source.c (select_source_symtab, line_info): Use std::vector.
5255 * stack.c (func_command): Use std::vector.
5256 * symtab.h (struct symtabs_and_lines): Delete.
5257 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
5258
5259 2017-09-04 Pedro Alves <palves@redhat.com>
5260
5261 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5262 unittests/array-view-selftests.c.
5263 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
5264 * common/array-view.h: New file.
5265 * unittests/array-view-selftests.c: New file.
5266
5267 2017-09-04 Pedro Alves <palves@redhat.com>
5268
5269 * cli/cli-cmds.c (edit_command): Pass message to
5270 ambiguous_line_spec.
5271 (list_command): Pass message to ambiguous_line_spec. Say
5272 "first"/"last" instead of "start" and "end" to be consistent with
5273 the manual.
5274 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
5275 them to print formatted message.
5276
5277 2017-09-04 Pedro Alves <palves@redhat.com>
5278
5279 * btrace.c (ftrace_add_pt): Pass btrace_insn to
5280 ftrace_update_insns by reference instead of pointer.
5281
5282 2017-09-04 Yao Qi <yao.qi@linaro.org>
5283
5284 * i386-go32-tdep.c: Include x86-xstate.h.
5285 (i386_go32_init_abi): Call i386_target_description.
5286 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
5287 if xcr0 is X86_XSTATE_X87_MASK.
5288 * i386-tdep.h (tdesc_i386): Remove the declaration.
5289 (tdesc_i386_mmx): Likewise.
5290
5291 2017-09-04 Yao Qi <yao.qi@linaro.org>
5292
5293 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
5294 X86_XSTATE_SSE_MASK instead of 0.
5295
5296 2017-09-04 Yao Qi <yao.qi@linaro.org>
5297
5298 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
5299 i386_target_description.
5300 * i386-fbsd-nat.c (i386fbsd_read_description): Call
5301 i386_target_description.
5302 * i386-tdep.c (i386_gdbarch_init): Likewise.
5303
5304 2017-09-04 Yao Qi <yao.qi@linaro.org>
5305
5306 * amd64-darwin-tdep.c: Include "x86-xstate.h".
5307 (x86_darwin_init_abi_64): Call amd64_target_description.
5308 * amd64-dicos-tdep.c: Likewise.
5309 * amd64-fbsd-nat.c: Likewise.
5310 * amd64-fbsd-tdep.c: Likewise.
5311 * amd64-nbsd-tdep.c: Likewise.
5312 * amd64-obsd-tdep.c: Likewise.
5313 * amd64-sol2-tdep.c: Likewise.
5314 * amd64-windows-tdep.c: Likewise.
5315 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
5316
5317 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
5318
5319 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
5320 (btrace_function) <insn>: Change type to use std::vector.
5321 * btrace.c (ftrace_debug, ftrace_call_num_insn,
5322 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
5323 ftrace_update_insns, ftrace_compute_global_level_offset,
5324 btrace_stitch_bts, btrace_clear, btrace_insn_get,
5325 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
5326 change to std::vector.
5327 (ftrace_update_insns): Adjust to change to std::vector, change
5328 type of INSN parameter.
5329 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
5330 * record-btrace.c (btrace_call_history_insn_range,
5331 btrace_compute_src_line_range,
5332 record_btrace_frame_prev_register): Adjust to change to
5333 std::vector.
5334 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
5335 to change to std::vector.
5336
5337 2017-09-03 Tom Tromey <tom@tromey.com>
5338
5339 * corefile.c (reopen_exec_file): Use std::string.
5340
5341 2017-09-03 Tom Tromey <tom@tromey.com>
5342
5343 * compile/compile.c (compile_register_name_mangled): Return
5344 std::string.
5345 * compile/compile-loc2c.c (pushf_register_address): Update.
5346 (pushf_register): Update.
5347 * compile/compile-c-types.c (convert_array): Update.
5348 * compile/compile-c-symbols.c (generate_vla_size): Update.
5349 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
5350 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
5351 (convert_one_symbol): Update.
5352 (generate_c_for_for_one_variable): Update.
5353 * compile/compile-c-support.c (c_get_range_decl_name): Return a
5354 std::string.
5355 (generate_register_struct): Update.
5356 * compile/compile-internal.h (c_get_range_decl_name): Return a
5357 std::string.
5358 (compile_register_name_mangled): Return std::string.
5359
5360 2017-09-03 Tom Tromey <tom@tromey.com>
5361
5362 * utils.c (perror_string): Return a std::string.
5363 (throw_perror_with_name, perror_warning_with_name): Update.
5364
5365 2017-09-03 Tom Tromey <tom@tromey.com>
5366
5367 * demangle.c (demangle_command): Use std::string,
5368 unique_xmalloc_ptr.
5369
5370 2017-09-03 Tom Tromey <tom@tromey.com>
5371
5372 * cli/cli-setshow.c (do_set_command): Use std::string.
5373
5374 2017-09-03 Tom Tromey <tom@tromey.com>
5375
5376 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
5377
5378 2017-09-03 Tom Tromey <tom@tromey.com>
5379
5380 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
5381
5382 2017-09-03 Tom Tromey <tom@tromey.com>
5383
5384 * mi/mi-cmd-env.c (env_execute_cli_command): Use
5385 gdb::unique_xmalloc_ptr.
5386
5387 2017-09-03 Tom Tromey <tom@tromey.com>
5388
5389 * thread.c (print_thread_info_1): Use string_printf.
5390 (thread_apply_command, thread_apply_all_command): Use
5391 std::string.
5392
5393 2017-09-03 Tom Tromey <tom@tromey.com>
5394
5395 * valprint.c (val_print_string): Update.
5396 * gdbcore.h (memory_error_message): Return std::string.
5397 * corefile.c (memory_error_message): Return std::string.
5398 (memory_error): Update.
5399 * breakpoint.c (insert_bp_location): Update.
5400
5401 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
5402
5403 * target/waitstatus.h (target_waitstatus_to_string): Change
5404 return type to std::string.
5405 * target/waitstatus.c (target_waitstatus_to_string): Return
5406 std::string.
5407 * target.h (target_waitstatus_to_string): Remove declaration.
5408 * infrun.c (resume, clear_proceed_status_thread,
5409 print_target_wait_results, do_target_wait, save_waitstatus,
5410 stop_all_threads): Adjust.
5411 * record-btrace.c (record_btrace_wait): Adjust.
5412 * target-debug.h
5413 (target_debug_print_struct_target_waitstatus_p): Adjust.
5414
5415 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5416
5417 PR gdb/22046
5418 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
5419 detection.
5420
5421 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
5422
5423 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
5424 for setting/unsetting environment variables on the remote target.
5425 (New remote packets): Add entries for QEnvironmentHexEncoded,
5426 QEnvironmentUnset and QEnvironmentReset.
5427 * common/environ.c (gdb_environ::operator=): Extend method to
5428 handle m_user_set_env_list and m_user_unset_env_list.
5429 (gdb_environ::clear): Likewise.
5430 (match_var_in_string): Change type of first parameter from 'char
5431 *' to 'const char *'.
5432 (gdb_environ::set): Extend method to handle
5433 m_user_set_env_list and m_user_unset_env_list.
5434 (gdb_environ::unset): Likewise.
5435 (gdb_environ::clear_user_set_env): New method.
5436 (gdb_environ::user_set_envp): Likewise.
5437 (gdb_environ::user_unset_envp): Likewise.
5438 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
5439 m_user_unset_env_list on move constructor/assignment.
5440 (unset): Add new default parameter 'update_unset_list = true'.
5441 (clear_user_set_env): New method.
5442 (user_set_envp): Likewise.
5443 (user_unset_envp): Likewise.
5444 (m_user_set_env_list): New std::set.
5445 (m_user_unset_env_list): Likewise.
5446 * common/rsp-low.c (hex2str): New function.
5447 (bin2hex): New overload for bin2hex function.
5448 * common/rsp-low.c (hex2str): New prototype.
5449 (str2hex): New overload prototype.
5450 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
5451 QEnvironmentUnset and QEnvironmentReset.
5452 (remote_protocol_features): Add QEnvironmentHexEncoded,
5453 QEnvironmentUnset and QEnvironmentReset packets.
5454 (send_environment_packet): New function.
5455 (extended_remote_environment_support): Likewise.
5456 (extended_remote_create_inferior): Call
5457 extended_remote_environment_support.
5458 (_initialize_remote): Add QEnvironmentHexEncoded,
5459 QEnvironmentUnset and QEnvironmentReset packet configs.
5460 * unittests/environ-selftests.c (gdb_selftest_env_var):
5461 New variable.
5462 (test_vector_initialization): New function.
5463 (test_init_from_host_environ): Likewise.
5464 (test_reinit_from_host_environ): Likewise.
5465 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
5466 Likewise.
5467 (test_unset_set_empty_vector): Likewise.
5468 (test_vector_clear): Likewise.
5469 (test_std_move): Likewise.
5470 (test_move_constructor):
5471 (test_self_move): Likewise.
5472 (test_set_unset_reset): Likewise.
5473 (run_tests): Rewrite in terms of the functions above.
5474
5475 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
5476
5477 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
5478 (adi_available): Use a temp variable of type CORE_ADDR as argument
5479 3 when calling target_auxv_search.
5480 (adi_normalize_address): Use masks and xor operators to calculate
5481 normalized address.
5482 (adi_read_versions, adi_write_versions, adi_print_versions)
5483 (do_examine, do_assign): Use paddress.
5484
5485 2017-08-29 John Baldwin <jhb@FreeBSD.org>
5486
5487 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
5488 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
5489 out of loop and add supply of FIR.
5490 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
5491 add collect of FIR.
5492
5493 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
5494
5495 PR gdb/21827
5496 * cli/cli-script.c (define_command): Don't convert command name
5497 to lower case.
5498
5499 2017-08-25 Joel Brobecker <brobecker@adacore.com>
5500
5501 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
5502 Update all callers accordingly. Remove all code blocks handling
5503 the case where DISPP is not NULL.
5504
5505 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5506
5507 PR symtab/22003
5508 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
5509 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5510 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
5511
5512 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5513
5514 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
5515 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
5516 (read_comp_units_from_section): New parameter abbrev_section, use
5517 read_and_check_comp_unit_head, allocate signatured_type if needed.
5518 (create_all_comp_units): Update read_comp_units_from_section caller.
5519
5520 2017-08-23 Pedro Alves <palves@redhat.com>
5521
5522 PR remote/21852
5523 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
5524 to null_ptid and switch to thread without reading the registers
5525 after adding the inferior.
5526
5527 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5528
5529 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
5530 compile-gcc.
5531 * compile/compile.c (compile_gcc, show_compile_gcc): New.
5532 (compile_to_object): Implement compile_gcc.
5533 (_initialize_compile): Install "set compile-gcc". Initialize
5534 compile_gcc.
5535
5536 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
5537
5538 * compile/compile.c (compile_to_object): Conditionally call
5539 set_verbose. Conditionally call compile or compile_v0.
5540
5541 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
5542
5543 * sparc64-tdep.h: (adi_normalize_address): New export.
5544 * sparc-nat.h: (open_adi_tag_fd): New export.
5545 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
5546 * sparc64-linux-tdep.c:
5547 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
5548 (sparc64_linux_handle_segmentation_fault): New function.
5549 (sparc64_linux_init_abi): Register
5550 sparc64_linux_handle_segmentation_fault
5551 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
5552 (sparc64_addr_bits_remove): New function.
5553 (sparc64_init_abi): Register sparc64_addr_bits_remove.
5554 (MAX_PROC_NAME_SIZE): New macro.
5555 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
5556 (sparc64adilist): New variable.
5557 (adi_proc_list): New variable.
5558 (find_adi_info): New function.
5559 (add_adi_info): New function.
5560 (get_adi_info_proc): New function.
5561 (get_adi_info): New function.
5562 (info_adi_command): New function.
5563 (read_maps_entry): New function.
5564 (adi_available): New function.
5565 (adi_normalize_address): New function.
5566 (adi_align_address): New function.
5567 (adi_convert_byte_count): New function.
5568 (adi_tag_fd): New function.
5569 (adi_is_addr_mapped): New function.
5570 (adi_read_versions): New function.
5571 (adi_write_versions): New function.
5572 (adi_print_versions): New function.
5573 (do_examine): New function.
5574 (do_assign): New function.
5575 (adi_examine_command): New function.
5576 (adi_assign_command): New function.
5577 (_initialize_sparc64_adi_tdep): New function.
5578
5579 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
5580
5581 * breakpoint.c (breakpoints_info): Rename to ...
5582 (info_breakpoints_command): ... this.
5583 (watchpoints_info): Rename to ...
5584 (info_watchpoints_command): ... this.
5585 (tracepoints_info): Rename to ...
5586 (info_tracepoints_command): ... this.
5587 (_initialize_breakpoint): Adjust.
5588 * dcache.c (dcache_info): Rename to ...
5589 (info_display_command): ... this.
5590 (_initialize_dcache): Adjust.
5591 * frame.h (args_info): Rename to ...
5592 (info_args_command): ... this.
5593 (locals_info): Rename to ...
5594 (info_locals_command): ... this.
5595 * infcmd.c (nofp_registers_info): Rename to ...
5596 (info_registers_command): ... this.
5597 (float_info): Rename to ...
5598 (info_float_command): ... this.
5599 (program_info): Rename to ...
5600 (info_program_command): ... this.
5601 (all_registers_info): Rename to ...
5602 (info_all_registers_command): ... this.
5603 (vector_info): Rename to ...
5604 (info_vector_command): ... this.
5605 (float_info): Rename to ...
5606 (info_float_command): ... this.
5607 (_initialize_infcmd): Adjust.
5608 * inferior.h (term_info): Rename to ...
5609 (info_terminal_command): ... this.
5610 * inflow.c (term_info): Rename to ...
5611 (info_terminal_command): ... this.
5612 (_initialize_inflow): Adjust.
5613 * infrun.c (signals_info): Rename to ...
5614 (info_signals_command): ... this.
5615 (_initialize_infrun): Adjust.
5616 * objc-lang.c (classes_info): Rename to ...
5617 (info_classes_command): ... this.
5618 (selectors_info): Rename to ...
5619 (info_selectors_command): ... this.
5620 (_initialize_objc_language): Adjust.
5621 * printcmd.c (sym_info): Rename to ...
5622 (info_symbol_command): ... this.
5623 (address_info): Rename to ...
5624 (info_address_command): ... this.
5625 (display_info): Rename to ...
5626 (info_display_command): ... this.
5627 (_initialize_printcmd): Adjust.
5628 * reverse.c (bookmarks_info): Rename to ...
5629 (info_breakpoints_command): ... this.
5630 (_initialize_reverse): Adjust.
5631 * ser-go32.c (dos_info): Rename to ...
5632 (info_serial_command): ... this.
5633 (_initialize_ser_dos): Adjust.
5634 * skip.c (skip_info): Rename to ...
5635 (info_skip_command): ... this.
5636 (_initialize_step_skip): Adjust.
5637 * source.c (line_info): Rename to ...
5638 (info_line_command): ... this.
5639 (source_info): Rename to ...
5640 (info_source_command)
5641 * stack.c (frame_info): Rename to ...
5642 (info_frame_command): ... this.
5643 (locals_info): Rename to ...
5644 (info_locals_command): ... this.
5645 (args_info): Rename to ...
5646 (info_args_command): ... this.
5647 (_initialize_stack): Adjust.
5648 * symtab.c (sources_info): Rename to ...
5649 (info_sources_command): ... this.
5650 (variables_info): Rename to ...
5651 (info_variables_command): ... this.
5652 (functions_info): Rename to ...
5653 (info_functions_command): ... this.
5654 (types_info): Rename to ...
5655 (info_types_command): ... this.
5656 (_initialize_symtab): Adjust.
5657 * target.c (target_info): Rename to ...
5658 (info_target_command): ... this.
5659 (initialize_targets): Adjust.
5660 * tracepoint.c (tvariables_info): Rename to ...
5661 (info_tvariables_command): ... this.
5662 (scope_info): Rename to ...
5663 (info_scope_command): ... this.
5664 (trace_dump_actions): Adjust.
5665 (_initialize_tracepoint): Adjust.
5666
5667 2017-08-22 Tom Tromey <tom@tromey.com>
5668
5669 * breakpoint.h (install_breakpoint): Update.
5670 * breakpoint.c (add_solib_catchpoint): Update.
5671 (install_breakpoint): Change argument to a std::unique_ptr.
5672 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
5673 (create_breakpoint_sal, create_breakpoint): Update.
5674 (watch_command_1, catch_exec_command_1)
5675 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
5676 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
5677 Return the breakpoint.
5678 (set_raw_breakpoint_without_location, set_raw_breakpoint)
5679 (new_single_step_breakpoint): Update.
5680 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
5681 std::unique_ptr.
5682 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5683 std::unique_ptr.
5684 * break-catch-sig.c (create_signal_catchpoint): Use
5685 std::unique_ptr.
5686 * ada-lang.c (create_ada_exception_catchpoint): Use
5687 std::unique_ptr.
5688
5689 2017-08-22 Tom Tromey <tom@tromey.com>
5690
5691 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
5692
5693 2017-08-22 Tom Tromey <tom@tromey.com>
5694
5695 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
5696 (lookup_partial_symbol): Update.
5697
5698 2017-08-22 Tom Tromey <tom@tromey.com>
5699
5700 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
5701 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
5702 (find_and_open_source, symtab_to_fullname): Update.
5703 * psymtab.c (psymtab_to_fullname): Update.
5704
5705 2017-08-22 Tom Tromey <tom@tromey.com>
5706
5707 * exec.c (exec_file_attach): Update.
5708 * linux-thread-db.c (try_thread_db_load): Update.
5709 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
5710 * utils.c (gdb_realpath): Change return type.
5711 (gdb_realpath_keepfile): Update.
5712 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
5713 (_initialize_utils): Register the new self test.
5714 * source.c (openp): Update.
5715 (find_and_open_source): Update.
5716 * nto-tdep.c (nto_find_and_open_solib): Update.
5717 * main.c (set_gdb_data_directory): Update.
5718 (captured_main_1): Update.
5719 * dwarf2read.c (dwarf2_get_dwz_file): Update
5720 (dw2_map_symbol_filenames): Update.
5721 * auto-load.c (auto_load_safe_path_vec_update): Update.
5722 (filename_is_in_auto_load_safe_path_vec): Change type of
5723 "filename_realp".
5724 (auto_load_objfile_script): Update.
5725 (file_is_auto_load_safe): Update. Use std::string.
5726 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
5727
5728 2017-08-22 Tom Tromey <tom@tromey.com>
5729
5730 * utils.c (gdb_realpath_keepfile): Return a
5731 gdb::unique_xmalloc_ptr.
5732 * exec.c (exec_file_attach): Update.
5733 * utils.h (gdb_realpath_keepfile): Return a
5734 gdb::unique_xmalloc_ptr.
5735
5736 2017-08-22 Tom Tromey <tom@tromey.com>
5737
5738 * compile/compile.c (compile_file_command): Use
5739 gdb::unique_xmalloc_ptr, std::string.
5740 * utils.c (gdb_abspath): Change return type.
5741 * source.c (openp): Update.
5742 * objfiles.c (allocate_objfile): Update.
5743 * main.c (set_gdb_data_directory): Update.
5744 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
5745
5746 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
5747
5748 * cli-cmds.c (list_commands): List actual code around more than
5749 one location.
5750
5751 2017-08-21 John Baldwin <jhb@FreeBSD.org>
5752
5753 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
5754
5755 2017-08-21 Pedro Alves <palves@redhat.com>
5756
5757 PR gdb/19487
5758 * c-exp.y (variable production): Handle function aliases.
5759 * minsyms.c (msymbol_is_text): New function.
5760 * minsyms.h (msymbol_is_text): Declare.
5761 * symtab.c (find_function_alias_target): New function.
5762 * symtab.h (find_function_alias_target): Declare.
5763
5764 2017-08-21 Pedro Alves <palves@redhat.com>
5765
5766 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
5767 typedefs.
5768 * typeprint.c (whatis_exp): If handling "whatis", and expression
5769 is OP_TYPE, strip one typedef level. Otherwise don't strip
5770 typedefs here.
5771 * valops.c (value_cast): Save "to" type before resolving
5772 stubs/typedefs. Use that type as resulting value's type.
5773
5774 2017-08-18 Tom Tromey <tom@tromey.com>
5775 Pedro Alves <palves@redhat.com>
5776
5777 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
5778 * sol-thread.c (sol_thread_resume, sol_thread_wait)
5779 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
5780 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
5781 * proc-service.c (ps_xfer_memory): Use scoped_restore.
5782 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
5783 (linux_get_siginfo_data): Add "thread" argument. Use
5784 scoped_restore.
5785 * linux-nat.c (linux_child_follow_fork)
5786 (check_stopped_by_watchpoint): Use scoped_restore.
5787 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
5788 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
5789 (restore_inferior_ptid, save_inferior_ptid): Remove.
5790 * btrace.c (btrace_fetch): Use scoped_restore.
5791 * bsd-uthread.c (bsd_uthread_fetch_registers)
5792 (bsd_uthread_store_registers): Use scoped_restore.
5793 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
5794 scoped_restore.
5795 * aix-thread.c (aix_thread_resume, aix_thread_wait)
5796 (aix_thread_xfer_partial): Use scoped_restore.
5797 * inferior.h (save_inferior_ptid): Remove.
5798
5799 2017-08-18 Yao Qi <yao.qi@linaro.org>
5800
5801 PR tdep/21818
5802 * arm-tdep.c (gdb_print_insn_arm): Mark
5803 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
5804
5805 2017-08-18 Yao Qi <yao.qi@linaro.org>
5806
5807 * NEWS: Mention GDBserver's new option "--selftest".
5808 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
5809 * selftest.c: Move it to common/selftest.c.
5810 * selftest.h: Move it to common/selftest.h.
5811 * selftest-arch.c (reset): New function.
5812 (tests_with_arch): Call reset.
5813
5814 2017-08-18 Yao Qi <yao.qi@linaro.org>
5815
5816 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
5817 instead of exception_fprintf and printf_filtered.
5818
5819 2017-08-18 Yao Qi <yao.qi@linaro.org>
5820
5821 * selftest.c (register_self_test): Rename it to
5822 selftests::register_test.
5823 (run_self_tests): selftest::run_tests.
5824 * selftest.h: Update declarations.
5825 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
5826 selftests::register_test_foreach_arch.
5827 * selftest-arch.h: Update declaration.
5828 * aarch64-tdep.c: Update.
5829 * arm-tdep.c: Likewise.
5830 * disasm-selftests.c: Likewise.
5831 * dwarf2loc.c: Likewise.
5832 * dwarf2-frame.c: Likewise.
5833 * findvar.c: Likewise.
5834 * gdbarch-selftests.c: Likewise.
5835 * maint.c (maintenance_selftest): Likewise.
5836 * regcache.c: Likewise.
5837 * rust-exp.y: Likewise.
5838 * selftest-arch.c: Likewise.
5839 * unittests/environ-selftests.c: Likewise.
5840 * unittests/function-view-selftests.c: Likewise.
5841 * unittests/offset-type-selftests.c: Likewise.
5842 * unittests/optional-selftests.c: Likewise.
5843 * unittests/scoped_restore-selftests.c: Likewise.
5844 * utils-selftests.c: Likewise.
5845
5846 2017-08-17 Pedro Alves <palves@redhat.com>
5847
5848 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
5849 local.
5850
5851 2017-08-17 Pedro Alves <palves@redhat.com>
5852
5853 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
5854 field.
5855 (reset_die_in_process): Delete, replaced by ...
5856 (process_die_scope): ... this new class. Make it responsible for
5857 freeing cu->line_header too.
5858 (process_die): Use process_die_scope.
5859 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
5860 cu->line_header_die_owner. Don't release the line header if it's
5861 owned by the CU.
5862 (setup_type_unit_groups): Make the CU/DIE own the line header.
5863 Don't release the line header here.
5864
5865 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
5866
5867 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
5868
5869 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
5870
5871 * NEWS: Mention new shortcuts for nexti and stepi in TUI
5872 Single-Key mode
5873
5874 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
5875
5876 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
5877 mode command list.
5878
5879 2017-08-15 Stafford Horne <shorne@gmail.com>
5880
5881 * MAINTAINERS (Write After Approval): Add Stafford Horne.
5882
5883 2017-08-15 Stafford Horne <shorne@gmail.com>
5884
5885 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
5886
5887 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
5888
5889 PR gdb/21954
5890 * infcmd.c (unset_environment_command): Use the 'clear' method on
5891 the environment instead of resetting it.
5892
5893 2017-08-15 John Baldwin <jhb@FreeBSD.org>
5894
5895 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
5896 platforms.
5897
5898 2017-08-14 Tom Tromey <tom@tromey.com>
5899
5900 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
5901 (print_binary_chars): Likewise.
5902 (BITS_IN_BYTES): Remove.
5903
5904 2017-08-14 Tom Tromey <tom@tromey.com>
5905
5906 PR gdb/21675
5907 * valprint.c (LOW_ZERO): Change value to 034.
5908 (print_octal_chars): Add static_asserts for octal constants.
5909 * printcmd.c (print_scalar_formatted): Add 'd' case.
5910
5911 2017-08-11 Tom Tromey <tom@tromey.com>
5912
5913 * symfile.c (add_symbol_file_command): Use std::vector.
5914
5915 2017-08-14 Tom Tromey <tom@tromey.com>
5916
5917 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
5918 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
5919 std::move.
5920 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
5921
5922 2017-08-11 Pedro Alves <palves@redhat.com>
5923
5924 * infrun.c (process_event_stop_test): Adjust
5925 function_name_is_marked_for_skip call.
5926 * skip.c: Include <list>.
5927 (skiplist_entry): Make it a class with private fields, and
5928 getters/setters.
5929 (skiplist_entry_chain): Delete.
5930 (skiplist_entries): New.
5931 (skiplist_entry_count): Delete.
5932 (highest_skiplist_entry_num): New.
5933 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
5934 (add_skiplist_entry): Delete.
5935 (skiplist_entry::skiplist_entry): New.
5936 (skiplist_entry::add_entry): New.
5937 (skip_file_command, skip_function): Adjust.
5938 (compile_skip_regexp): Delete.
5939 (skip_command): Don't compile regexp here. Adjust to use
5940 skiplist_entry::add_entry.
5941 (skip_info): Adjust to use range-for and getters.
5942 (skip_enable_command, skip_disable_command): Adjust to use
5943 range-for and setters.
5944 (skip_delete_command): Adjust to use std::list.
5945 (add_skiplist_entry): Delete.
5946 (skip_file_p): Delete, refactored as ...
5947 (skiplist_entry::do_skip_file_p): ... this new method.
5948 (skip_gfile_p): Delete, refactored as ...
5949 (skiplist_entry::do_gskip_file_p): ... this new method.
5950 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
5951 (skiplist_entry::skip_function_p): ... this new method.
5952 (function_name_is_marked_for_skip): Now returns bool, and takes
5953 the function sal by const reference. Adjust to use range-for and
5954 skiplist_entry methods.
5955 (_initialize_step_skip): Remove references to
5956 skiplist_entry_chain, skiplist_entry_count.
5957 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
5958 takes the function sal by const reference.
5959
5960 2017-08-11 Yao Qi <yao.qi@linaro.org>
5961
5962 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
5963 (dwarf2_frame_cache): Remove reset_cache_cleanup.
5964 (dwarf2_frame_cache):
5965 * frame-unwind.c (frame_unwind_try_unwinder): Catch
5966 RETURN_MASK_ALL and set *this_case to NULL.
5967 * frame-unwind.h: Update comments.
5968
5969 2017-08-11 Yao Qi <yao.qi@linaro.org>
5970
5971 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
5972 (dwarf2_frame_state_copy_regs): Remove.
5973 (dwarf2_frame_state_free_regs): Remove.
5974 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
5975 (dwarf2_restore_rule): Call method .alloc_regs instead of
5976 dwarf2_frame_state_alloc_regs.
5977 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
5978 constructor. Call std::move.
5979 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
5980 (dwarf2_frame_cache): Likewise.
5981
5982 [GDB_SELF_TEST]: Include selftest.h and
5983 selftest-arch.h.
5984 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
5985 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
5986 execute_cfa_program_test.
5987
5988 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
5989 copy ctor, assignment operator, move assignment.
5990 <alloc_regs>: New method.
5991 <swap>: New method.
5992 (struct dwarf2_frame_state): Delete dtor.
5993 (dwarf2_frame_state_alloc_regs): Remove declaration.
5994 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
5995 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
5996
5997 2017-08-11 Yao Qi <yao.qi@linaro.org>
5998
5999 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
6000 (dwarf2_frame_state::dwarf2_frame_state): New.
6001 (dwarf2_frame_state::~dwarf2_frame_state): New.
6002 (dwarf2_fetch_cfa_info): Update.
6003 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
6004 rather than a pointer. Update code.
6005 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
6006 dtor.
6007 <data_align, code_align, retaddr_column>: Change them to const.
6008 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
6009 to bool.
6010
6011 2017-08-11 Yao Qi <yao.qi@linaro.org>
6012
6013 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
6014 <loc.exp>: New field.
6015 * dwarf2-frame.c (execute_cfa_program): Update.
6016 (dwarf2_frame_prev_register): Update.
6017
6018 2017-08-10 Pedro Alves <palves@redhat.com>
6019
6020 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
6021
6022 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6023
6024 * fbsd-nat.c (struct fbsd_fork_info): Remove.
6025 (fbsd_pending_children): Use std::list.
6026 (fbsd_remember_child): Likewise.
6027 (fbsd_is_child_pending): Likewise.
6028 (fbsd_pending_vfork_done): Use std::forward_list.
6029 (fbsd_add_vfork_done): Likewise.
6030 (fbsd_is_vfork_done_pending): Likewise.
6031 (fbsd_next_vfork_done): Likewise.
6032
6033 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6034
6035 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
6036 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
6037 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
6038 for `mapfilename'.
6039 (fbsd_xfer_partial): Use gdb::byte_vector.
6040 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
6041
6042 2017-08-09 John Baldwin <jhb@FreeBSD.org>
6043
6044 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
6045 "filestuff.h".
6046 (fbsd_find_memory_regions): Fix `mapfile' initialization.
6047
6048 2017-08-09 Tom Tromey <tom@tromey.com>
6049
6050 * skip.c (skiplist_entry): New constructor.
6051 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
6052 (skiplist_entry::file_is_glob): Now bool.
6053 (skiplist_entry::file, skiplist_entry::function): Now
6054 std::string.
6055 (make_skip_entry): Return a unique_ptr. Use new.
6056 (free_skiplist_entry, free_skiplist_entry_cleanup)
6057 (make_free_skiplist_entry_cleanup): Remove.
6058 (skip_command, skip_disable_command, add_skiplist_entry)
6059 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
6060 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
6061 (function_name_is_marked_for_skip): Update.
6062 (skip_delete_command): Update. Use delete.
6063
6064 2017-08-09 Jiong Wang <jiong.wang@arm.com>
6065
6066 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
6067 (aarch64_linux_core_read_description): New function.
6068 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
6069
6070 2017-08-09 Pedro Alves <palves@redhat.com>
6071
6072 * cp-name-parser.y (cp_comp_to_string): Return a
6073 gdb::unique_xmalloc_ptr<char>.
6074 * cp-support.c (replace_typedefs_qualified_name)
6075 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
6076 (cp_canonicalize_string_full): Use op= instead of explicit
6077 convertion.
6078 (cp_class_name_from_physname, method_name_from_physname)
6079 (cp_func_name, cp_remove_params): Adjust to use
6080 gdb::unique_xmalloc_ptr<char>.
6081 * cp-support.h (cp_comp_to_string): Return a
6082 gdb::unique_xmalloc_ptr<char>.
6083 * python/py-type.c (typy_lookup_type): Adjust to use
6084 gdb::unique_xmalloc_ptr<char>.
6085
6086 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
6087
6088 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
6089
6090 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6091 Yao Qi <yao.qi@linaro.org>
6092
6093 * cp-support.c (cp_canonicalize_string_full): Use
6094 gdb::unique_xmalloc_ptr<char>.
6095 (cp_canonicalize_string): Likewise.
6096
6097 2017-08-09 Yao Qi <yao.qi@linaro.org>
6098
6099 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
6100 * regformats/i386/amd64-avx-avx512.dat: Remove.
6101 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
6102 * regformats/i386/amd64-avx-mpx.dat:Remove.
6103 * regformats/i386/amd64-avx.dat: Remove.
6104 * regformats/i386/amd64-mpx.dat: Remove.
6105 * regformats/i386/i386-avx-avx512.dat: Remove.
6106 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
6107 * regformats/i386/i386-avx-mpx.dat: Remove.
6108 * regformats/i386/i386-mmx.dat: Remove.
6109 * regformats/i386/i386-mpx.dat: Remove.
6110
6111 2017-08-09 Yao Qi <yao.qi@linaro.org>
6112
6113 * amd64-tdep.h (tdesc_x32): Remove the declaration.
6114 * amd64-tdep.c: Don't include features/i386/x32*.c.
6115 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
6116 functions.
6117 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
6118 and i386/x32-avx-avx512.
6119 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
6120 and i386/x32.xml.
6121 * features/i386/x32-avx-avx512.c: Removed.
6122 * features/i386/x32-avx-avx512.xml: Removed.
6123 * features/i386/x32-avx.c: Removed.
6124 * features/i386/x32-avx.xml: Removed.
6125 * features/i386/x32.c: Removed.
6126 * features/i386/x32.xml: Removed.
6127 * regformats/i386/x32-avx-avx512.dat: Removed.
6128 * regformats/i386/x32-avx.dat: Removed.
6129 * regformats/i386/x32.dat: Removed.
6130
6131 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6132
6133 PR breakpoints/21886
6134 * mem-break.c (default_memory_insert_breakpoint): Use
6135 `->placed_address' rather than `->reqstd_address' for the
6136 breakpoint location.
6137
6138 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6139
6140 * arch-utils.c (default_print_insn): Remove arch/mach/endian
6141 assertions.
6142
6143 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
6144
6145 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
6146 a union of `tdep_info', `tdesc_data' and `id'.
6147 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
6148 rather than `info.tdep_info'.
6149 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
6150 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
6151 * i386-tdep.c (i386_gdbarch_init): Likewise.
6152 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
6153 * mips-tdep.c (mips_gdbarch_init): Likewise.
6154 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
6155 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
6156 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
6157 `info.tdep_info'.
6158 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
6159 `info.tdep_info'.
6160 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
6161 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
6162 `info.tdep_info'.
6163 * spu-tdep.c (spu_gdbarch_init): Likewise.
6164 * gdbarch.h: Regenerate.
6165
6166 2017-08-07 Leszek Swirski <leszeks@google.com>
6167
6168 PR symtab/20899
6169 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
6170
6171 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
6172
6173 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
6174 (gdbsim_open): Rename gdb_argv args object to argv.
6175
6176 2017-08-05 Tom Tromey <tom@tromey.com>
6177
6178 * compile/compile-object-load.c (compile_object_load): Use
6179 gdb::unique_xmalloc_ptr.
6180 * cli/cli-dump.c (scan_filename): Rename from
6181 scan_filename_with_cleanup. Change return type.
6182 (scan_expression): Rename from scan_expression_with_cleanup.
6183 Change return type.
6184 (dump_memory_to_file, dump_value_to_file, restore_command):
6185 Use gdb::unique_xmalloc_ptr. Update.
6186 * cli/cli-cmds.c (find_and_open_script): Use
6187 gdb::unique_xmalloc_ptr.
6188 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
6189 * symmisc.c (maintenance_print_symbols)
6190 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
6191 * symfile.c (symfile_bfd_open, generic_load)
6192 (add_symbol_file_command, remove_symbol_file_command): Use
6193 gdb::unique_xmalloc_ptr.
6194 * source.c (openp): Use gdb::unique_xmalloc_ptr.
6195 * psymtab.c (maintenance_print_psymbols): Use
6196 gdb::unique_xmalloc_ptr.
6197 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
6198 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
6199 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
6200 (reload_shared_libraries_1): Likewise.
6201
6202 2017-08-05 Tom Tromey <tom@tromey.com>
6203
6204 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
6205 (rust_op_vector, rust_set_vector): New typedefs.
6206 (current_parser): New global.
6207 (work_obstack): Change to pointer type. Update all users.
6208 (rust_ast, pstate): Remove globals.
6209 (struct rust_parser): New.
6210 (%union) <params, field_inits>: Change type.
6211 (start, tuple_expr, unit_expr, struct_expr_list, literal)
6212 (field_expr, expr_list, maybe_expr_list, type_list): Update.
6213 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
6214 (convert_params_to_types, convert_params_to_expression): Change
6215 type of "params".
6216 (ast_string): Change type of "fields".
6217 (rust_parse): Make a rust_parser. Remove cleanups.
6218 (rust_lex_tests): Make and install an auto_obstack.
6219
6220 2017-08-04 Yao Qi <yao.qi@linaro.org>
6221
6222 * configure.srv (ipa_x32_linux_regobj): New.
6223 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
6224 instead of X86_TDESC_AVX512.
6225 (initialize_low_tracepoint): Call
6226 init_registers_x32_avx_avx512_linux.
6227
6228 2017-08-04 Yao Qi <yao.qi@linaro.org>
6229
6230 * utils.h (gdb_argv): Add namespace std for nullptr_t.
6231
6232 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
6233
6234 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
6235
6236 2017-08-03 Tom Tromey <tom@tromey.com>
6237
6238 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
6239 Remove.
6240 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
6241
6242 2017-08-03 Tom Tromey <tom@tromey.com>
6243
6244 * python/py-param.c (compute_enum_values): Use gdb_argv.
6245
6246 2017-08-03 Tom Tromey <tom@tromey.com>
6247
6248 * utils.h (struct gdb_argv_deleter): New.
6249 (gdb_argv): New class.
6250 * utils.c (gdb_argv::reset): New method.
6251 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
6252 * tracefile.c (tsave_command): Use gdb_argv.
6253 * top.c (new_ui_command): Use gdb_argv.
6254 * symmisc.c (maintenance_print_symbols)
6255 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
6256 * symfile.c (symbol_file_command, generic_load)
6257 (remove_symbol_file_command): Use gdb_argv.
6258 * stack.c (backtrace_command): Use gdb_argv.
6259 * source.c (add_path, show_substitute_path_command)
6260 (unset_substitute_path_command, set_substitute_path_command):
6261 Use gdb_argv.
6262 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
6263 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
6264 * remote.c (extended_remote_run, remote_put_command)
6265 (remote_get_command, remote_delete_command): Use gdb_argv.
6266 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
6267 (gdbsim_open): Use gdb_argv.
6268 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
6269 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
6270 * procfs.c (procfs_info_proc): Use gdb_argv.
6271 * interps.c (interpreter_exec_cmd): Use gdb_argv.
6272 * infrun.c (handle_command): Use gdb_argv.
6273 * inferior.c (add_inferior_command, clone_inferior_command):
6274 Use gdb_argv.
6275 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
6276 * exec.c (exec_file_command): Use gdb_argv.
6277 * cli/cli-cmds.c (alias_command): Use gdb_argv.
6278 * compile/compile.c (build_argc_argv): Use gdb_argv.
6279
6280 2017-08-03 Tom Tromey <tom@tromey.com>
6281
6282 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
6283
6284 2017-08-03 Tom Tromey <tom@tromey.com>
6285
6286 * python/python.c (compute_python_string): Return std::string.
6287 (gdbpy_eval_from_control_command): Update.
6288 (do_start_initialization): Use std::string.
6289 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
6290 xstrprintf.
6291 * python/py-breakpoint.c (local_setattro): Use string_printf, not
6292 xstrprintf.
6293
6294 2017-08-03 Tom Tromey <tom@tromey.com>
6295
6296 * top.h (do_restore_instream_cleanup): Remove.
6297 * top.c (do_restore_instream_cleanup): Remove.
6298 (read_command_file): Use scoped_restore.
6299 * cli/cli-script.c (execute_user_command): Use scoped_restore.
6300
6301 2017-08-03 Tom Tromey <tom@tromey.com>
6302
6303 * cli/cli-script.c (execute_user_command)
6304 (execute_control_command): Use scoped_restore.
6305
6306 2017-08-03 Tom Tromey <tom@tromey.com>
6307
6308 * cli/cli-script.c (do_restore_user_call_depth): Remove.
6309 (execute_user_command): Remove user_call_depth; use
6310 user_args_stack's size instead.
6311
6312 2017-08-03 Tom Tromey <tom@tromey.com>
6313
6314 * top.h (in_user_command): Remove.
6315 * top.c (in_user_command): Remove.
6316 * cli/cli-script.c (do_restore_user_call_depth)
6317 (execute_user_command): Update.
6318
6319 2017-08-03 Tom Tromey <tom@tromey.com>
6320
6321 * valops.c (search_struct_method): Use gdb::byte_vector.
6322 * valarith.c (value_concat): Use std::vector.
6323 * target.c (memory_xfer_partial): Use gdb::byte_vector.
6324 (simple_search_memory): Likewise.
6325 * printcmd.c (find_string_backward): Use gdb::byte_vector.
6326 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
6327 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
6328 * elfread.c (elf_rel_plt_read): Use std::string.
6329 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
6330 * cli/cli-dump.c (restore_section_callback): Use
6331 gdb::byte_vector.
6332
6333 2017-08-03 Tom Tromey <tom@tromey.com>
6334
6335 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
6336
6337 2017-08-03 Tom Tromey <tom@tromey.com>
6338
6339 * tui/tui-regs.c (tui_restore_gdbout): Remove.
6340 (tui_register_format): Use scoped_restore.
6341
6342 2017-08-03 Tom Tromey <tom@tromey.com>
6343
6344 * reverse.c (exec_direction_default): Remove.
6345 (exec_reverse_once): Use scoped_restore.
6346 * remote.c (restore_remote_timeout): Remove.
6347 (remote_flash_erase, remote_flash_write, remote_flash_done)
6348 (readchar, remote_serial_write): Use scoped_restore.
6349 * cli/cli-script.c (struct source_cleanup_lines_args)
6350 (source_cleanup_lines): Remove.
6351 (script_from_file): Use scoped_restore.
6352 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
6353 (source_command): Use scoped_restore.
6354
6355 2017-08-03 Tom Tromey <tom@tromey.com>
6356
6357 * utils.h (make_cleanup_free_so): Remove.
6358 * utils.c (do_free_so, make_cleanup_free_so): Remove.
6359 * solist.h (struct so_deleter): New.
6360 (so_list_up): New typedef.
6361 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
6362
6363 2017-08-03 Tom Tromey <tom@tromey.com>
6364
6365 * utils.h (make_cleanup_restore_current_language): Remove.
6366 * utils.c (do_restore_current_language)
6367 (make_cleanup_restore_current_language): Remove.
6368 * parse.c (parse_exp_in_context_1)
6369 (parse_expression_with_language): Use
6370 scoped_restore_current_language.
6371 * mi/mi-main.c (mi_cmd_execute): Use
6372 scoped_restore_current_language.
6373 * language.h (scoped_restore_current_language): New class.
6374
6375 2017-08-03 Tom Tromey <tom@tromey.com>
6376
6377 * compile/compile.c (cleanup_unlink_file): Remove.
6378 (compile_to_object): Use gdb::unlinker.
6379 (eval_compile_command): Likewise.
6380
6381 2017-08-03 Tom Tromey <tom@tromey.com>
6382
6383 * utils.h (make_cleanup_fclose): Remove.
6384 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
6385
6386 2017-08-03 Tom Tromey <tom@tromey.com>
6387
6388 * top.c (open_terminal_stream): Return gdb_file_up.
6389 (new_ui_command): Update.
6390
6391 2017-08-03 Tom Tromey <tom@tromey.com>
6392
6393 * source.c (print_source_lines_base, forward_search_command)
6394 (reverse_search_command): Use gdb_file_up.
6395
6396 2017-08-03 Tom Tromey <tom@tromey.com>
6397
6398 * fbsd-nat.c (fbsd_find_memory_regions): Update.
6399
6400 2017-08-03 Tom Tromey <tom@tromey.com>
6401
6402 * cli/cli-cmds.c (find_and_open_script): Change return type.
6403 Remove "streamp" and "full_path" parameters.
6404 (source_script_with_search): Update.
6405 * auto-load.c (source_script_file): Update.
6406 * cli/cli-cmds.h (find_and_open_script): Change type.
6407 (open_script): New struct.
6408
6409 2017-08-03 Tom Tromey <tom@tromey.com>
6410
6411 * xml-support.c (xml_fetch_content_from_file): Update.
6412 * ui-file.c (stdio_file::open): Update.
6413 * tracefile-tfile.c (tfile_start): Update.
6414 * remote.c (remote_file_put, remote_file_get): Update.
6415 * nat/linux-procfs.c (linux_proc_get_int)
6416 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
6417 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
6418 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
6419 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
6420 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
6421 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
6422 * linux-nat.c (linux_proc_pending_signals): Update.
6423 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
6424 (file_closer): Remove.
6425 * compile/compile.c (compile_to_object): Update.
6426 * common/filestuff.h (struct gdb_file_deleter): New.
6427 (gdb_file_up): New typedef.
6428 (gdb_fopen_cloexec): Change return type.
6429 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
6430 * cli/cli-dump.c (fopen_with_cleanup): Remove.
6431 (dump_binary_file, restore_binary_file): Update.
6432 * auto-load.c (auto_load_objfile_script_1): Update.
6433
6434 2017-08-03 Tom Tromey <tom@tromey.com>
6435
6436 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
6437 (info_static_tracepoint_markers_command): Likewise.
6438 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
6439 * skip.c (skip_info): Use ui_out_emit_table.
6440 * progspace.c (print_program_space): Use ui_out_emit_table.
6441 * osdata.c (info_osdata): Use ui_out_emit_table.
6442 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
6443 ui_out_emit_table.
6444 * linux-thread-db.c (info_auto_load_libthread_db): Use
6445 ui_out_emit_table.
6446 * inferior.c (print_inferior): Use ui_out_emit_table.
6447 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
6448 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
6449 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
6450 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
6451 * ui-out.h (class ui_out_emit_table): New.
6452
6453 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
6454
6455 * mips-tdep.c (mips_fpu_type_str): New function.
6456 (mips_dump_tdep): Call it.
6457
6458 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
6459
6460 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
6461 `->mips_fpu_type'.
6462
6463 2017-07-31 Xavier Roirand <roirand@adacore.com>
6464
6465 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
6466
6467 2017-07-27 Xavier Roirand <roirand@adacore.com>
6468
6469 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
6470
6471 2017-07-26 Yao Qi <yao.qi@linaro.org>
6472
6473 * cli/cli-cmds.c (maintenancechecklist): New variable.
6474 * gdbcmd.h (maintenancechecklist): Declare it.
6475 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
6476 Call i386_linux_read_description with different masks.
6477 * maint.c (maintenance_check_command): New function.
6478 (_initialize_maint_cmds): Call add_prefix_cmd.
6479 * target-descriptions.c (tdesc_reg): override operator != and ==.
6480 (tdesc_type): Likewise.
6481 (tdesc_feature): Likewise.
6482 (target_desc): Likewise.
6483 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
6484 (maintenance_check_xml_descriptions): New function.
6485 (_initialize_target_descriptions) Add command "xml-descriptions".
6486 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
6487
6488 2017-07-26 Yao Qi <yao.qi@linaro.org>
6489
6490 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
6491 Include features/i386/32bit-*.c.
6492 (i386_linux_read_description): Generate target description if it
6493 doesn't exist.
6494 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
6495 functions.
6496 * features/i386/32bit-linux.c: Re-generated.
6497 * features/i386/32bit-sse.c: Likewise.
6498 * target-descriptions.c (print_c_feature::visit): Print code to
6499 set register number if needed.
6500 (print_c_feature) <m_next_regnum>: New field.
6501
6502 2017-07-26 Yao Qi <yao.qi@linaro.org>
6503
6504 * features/Makefile (CFILES): Rename with TDESC_CFILES.
6505 (FEATURE_XMLFILES): New.
6506 (FEATURE_CFILES): New.
6507 New rules.
6508 (clean-cfiles): Remove generated c files.
6509 * features/i386/32bit-avx.c: Generated.
6510 * features/i386/32bit-avx512.c: Generated.
6511 * features/i386/32bit-core.c: Generated.
6512 * features/i386/32bit-linux.c: Generated.
6513 * features/i386/32bit-mpx.c: Generated.
6514 * features/i386/32bit-pkeys.c: Generated.
6515 * features/i386/32bit-sse.c: Generated.
6516 * target-descriptions.c: Include algorithm.
6517 (tdesc_element_visitor): Add method visit_end.
6518 (print_c_tdesc): Implement visit_end.
6519 (print_c_tdesc:: m_filename_after_features): Move it to
6520 protected.
6521 (print_c_feature): New class.
6522 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
6523 name starts with "i386/32bit-".
6524
6525 2017-07-26 Yao Qi <yao.qi@linaro.org>
6526
6527 * target-descriptions.c (tdesc_element_visitor): New class.
6528 (tdesc_element): New class.
6529 (tdesc_reg): Inherit from tdesc_element.
6530 (tdesc_reg::accept): New function.
6531 (tdesc_type): Inherit from tdesc_element.
6532 (tdesc_type::accept): New function.
6533 (tdesc_feature): Inherit from tdesc_element.
6534 (tdesc_feature::accept): New function.
6535 (target_desc): Inherit from tdesc_element.
6536 (target_desc::target_desc): New.
6537 (target_desc::~target_desc): New.
6538 (target_desc::accept): New.
6539 (allocate_target_description): Use new.
6540 (free_target_description): Use delete.
6541 (print_c_tdesc): New class.
6542 (maint_print_c_tdesc_cmd): Adjust.
6543
6544 * features/aarch64.c: Re-generated.
6545 * features/arc-arcompact.c: Re-generated.
6546 * features/arc-v2.c: Re-generated.
6547 * features/arm/arm-with-iwmmxt.c: Re-generated.
6548 * features/arm/arm-with-m.c: Re-generated.
6549 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
6550 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
6551 * features/arm/arm-with-neon.c: Re-generated.
6552 * features/arm/arm-with-vfpv2.c: Re-generated.
6553 * features/arm/arm-with-vfpv3.c: Re-generated.
6554 * features/i386/amd64-avx-avx512.c: Re-generated.
6555 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
6556 * features/i386/amd64-avx.c: Re-generated.
6557 * features/i386/amd64-avx-linux.c: Re-generated.
6558 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
6559 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
6560 * features/i386/amd64-avx-mpx.c: Re-generated.
6561 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
6562 * features/i386/amd64.c: Re-generated.
6563 * features/i386/amd64-linux.c: Re-generated.
6564 * features/i386/amd64-mpx.c: Re-generated.
6565 * features/i386/amd64-mpx-linux.c: Re-generated.
6566 * features/i386/i386-avx-avx512.c: Re-generated.
6567 * features/i386/i386-avx-avx512-linux.c: Re-generated.
6568 * features/i386/i386-avx.c: Re-generated.
6569 * features/i386/i386-avx-linux.c: Re-generated.
6570 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
6571 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
6572 * features/i386/i386-avx-mpx.c: Re-generated.
6573 * features/i386/i386-avx-mpx-linux.c: Re-generated.
6574 * features/i386/i386.c: Re-generated.
6575 * features/i386/i386-linux.c: Re-generated.
6576 * features/i386/i386-mmx.c: Re-generated.
6577 * features/i386/i386-mmx-linux.c: Re-generated.
6578 * features/i386/i386-mpx.c: Re-generated.
6579 * features/i386/i386-mpx-linux.c: Re-generated.
6580 * features/i386/x32-avx-avx512.c: Re-generated.
6581 * features/i386/x32-avx-avx512-linux.c: Re-generated.
6582 * features/i386/x32-avx.c: Re-generated.
6583 * features/i386/x32-avx-linux.c: Re-generated.
6584 * features/i386/x32.c: Re-generated.
6585 * features/i386/x32-linux.c: Re-generated.
6586 * features/microblaze.c: Re-generated.
6587 * features/microblaze-with-stack-protect.c: Re-generated.
6588 * features/mips64-dsp-linux.c: Re-generated.
6589 * features/mips64-linux.c: Re-generated.
6590 * features/mips-dsp-linux.c: Re-generated.
6591 * features/mips-linux.c: Re-generated.
6592 * features/nds32.c: Re-generated.
6593 * features/nios2.c: Re-generated.
6594 * features/nios2-linux.c: Re-generated.
6595 * features/rs6000/powerpc-32.c: Re-generated.
6596 * features/rs6000/powerpc-32l.c: Re-generated.
6597 * features/rs6000/powerpc-403.c: Re-generated.
6598 * features/rs6000/powerpc-403gc.c : Re-generated.
6599 * features/rs6000/powerpc-405.c: Re-generated.
6600 * features/rs6000/powerpc-505.c: Re-generated.
6601 * features/rs6000/powerpc-601.c: Re-generated.
6602 * features/rs6000/powerpc-602.c: Re-generated.
6603 * features/rs6000/powerpc-603.c: Re-generated.
6604 * features/rs6000/powerpc-604.c: Re-generated.
6605 * features/rs6000/powerpc-64.c: Re-generated.
6606 * features/rs6000/powerpc-64l.c: Re-generated.
6607 * features/rs6000/powerpc-7400.c: Re-generated.
6608 * features/rs6000/powerpc-750.c: Re-generated.
6609 * features/rs6000/powerpc-860.c: Re-generated.
6610 * features/rs6000/powerpc-altivec32.c: Re-generated.
6611 * features/rs6000/powerpc-altivec32l.c: Re-generated.
6612 * features/rs6000/powerpc-altivec64.c: Re-generated.
6613 * features/rs6000/powerpc-altivec64l.c: Re-generated.
6614 * features/rs6000/powerpc-cell32l.c: Re-generated.
6615 * features/rs6000/powerpc-cell64l.c: Re-generated.
6616 * features/rs6000/powerpc-e500.c: Re-generated.
6617 * features/rs6000/powerpc-e500l.c: Re-generated.
6618 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
6619 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
6620 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
6621 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
6622 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
6623 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
6624 * features/rs6000/powerpc-vsx32.c: Re-generated.
6625 * features/rs6000/powerpc-vsx32l.c: Re-generated.
6626 * features/rs6000/powerpc-vsx64.c: Re-generated.
6627 * features/rs6000/powerpc-vsx64l.c: Re-generated.
6628 * features/rs6000/rs6000.c: Re-generated.
6629 * features/s390-linux32.c: Re-generated.
6630 * features/s390-linux32v1.c: Re-generated.
6631 * features/s390-linux32v2.c: Re-generated.
6632 * features/s390-linux64.c: Re-generated.
6633 * features/s390-linux64v1.c: Re-generated.
6634 * features/s390-linux64v2.c: Re-generated.
6635 * features/s390-te-linux64.c: Re-generated.
6636 * features/s390-tevx-linux64.c: Re-generated.
6637 * features/s390-vx-linux64.c: Re-generated.
6638 * features/s390x-linux64.c: Re-generated.
6639 * features/s390x-linux64v1.c: Re-generated.
6640 * features/s390x-linux64v2.c: Re-generated.
6641 * features/s390x-te-linux64.c: Re-generated.
6642 * features/s390x-tevx-linux64.c: Re-generated.
6643 * features/s390x-vx-linux64.c: Re-generated.
6644 * features/sparc/sparc32-solaris.c: Re-generated.
6645 * features/sparc/sparc64-solaris.c: Re-generated.
6646 * features/tic6x-c62x.c: Re-generated.
6647 * features/tic6x-c62x-linux.c: Re-generated.
6648 * features/tic6x-c64x.c: Re-generated.
6649 * features/tic6x-c64x-linux.c: Re-generated.
6650 * features/tic6x-c64xp.c: Re-generated.
6651 * features/tic6x-c64xp-linux.c: Re-generated.
6652
6653 2017-07-26 Yao Qi <yao.qi@linaro.org>
6654
6655 * i386-linux-tdep.c (i386_linux_read_description): New function.
6656 (i386_linux_core_read_description): Call
6657 i386_linux_read_description.
6658 * i386-linux-tdep.h (i386_linux_read_description): Declare.
6659 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
6660 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
6661 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
6662 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
6663 * x86-linux-nat.c (x86_linux_read_description): Call
6664 i386_linux_read_description.
6665
6666 2017-07-26 Yao Qi <yao.qi@linaro.org>
6667
6668 * NEWS: Mention it.
6669 * features/Makefile (%.c: %.xml): Pass the xml file name to
6670 command "maint print c-tdesc".
6671 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
6672 name from 'arg'.
6673
6674 2017-07-26 Yao Qi <yao.qi@linaro.org>
6675
6676 * target-descriptions.c (target_desc): Add ctor and dtor. Do
6677 in-class initialization.
6678 (tdesc_create_feature): Call new instead of XCNEW.
6679 (free_target_description): Ue delete.
6680
6681 2017-07-25 John Baldwin <jhb@FreeBSD.org>
6682
6683 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
6684
6685 2017-07-25 Yao Qi <yao.qi@linaro.org>
6686
6687 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
6688 constant.
6689 (amd64_x32_init_abi): Likewise.
6690 * amd64-tdep.h (amd64_init_abi): Update declaration.
6691 (amd64_x32_init_abi): Likewise.
6692
6693 2017-07-25 Yao Qi <yao.qi@linaro.org>
6694
6695 PR tdep/21717
6696 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
6697 condition for FPSCR.
6698 (arm_linux_store_inferior_registers): Likewise.
6699
6700 2017-07-22 Tom Tromey <tom@tromey.com>
6701
6702 * break-catch-syscall.c (struct catch_syscall_inferior_data)
6703 <syscalls_counts>: Now a std::vector.
6704 (get_catch_syscall_inferior_data): Use "new".
6705 (catch_syscall_inferior_data_cleanup): Use "delete".
6706 (insert_catch_syscall, remove_catch_syscall)
6707 (clear_syscall_counts): Update.
6708
6709 2017-07-22 Tom Tromey <tom@tromey.com>
6710
6711 * break-catch-syscall.c (syscall_catchpoint)
6712 <syscalls_to_be_caught>: Now a std::vector<int>
6713 (~syscall_catchpoint): Remove.
6714 (insert_catch_syscall, remove_catch_syscall)
6715 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
6716 (print_mention_catch_syscall, print_recreate_catch_syscall):
6717 Update.
6718 (create_syscall_event_catchpoint): Change type of "filter"
6719 parameter.
6720 (catch_syscall_split_args): Return a std::vector.
6721 (catch_syscall_command_1, catching_syscall_number_1): Update.
6722
6723 2017-07-22 Tom Tromey <tom@tromey.com>
6724
6725 * break-catch-throw.c (struct exception_catchpoint)
6726 <exception_rx>: Now a std::string.
6727 (~exception_catchpoint): Remove.
6728 (print_one_detail_exception_catchpoint): Update.
6729 (handle_gnu_v3_exceptions): Change type of except_rx.
6730 (extract_exception_regexp): Return a std::string.
6731 (catch_exception_command_1): Update.
6732
6733 2017-07-22 Tom Tromey <tom@tromey.com>
6734
6735 * break-catch-sig.c (gdb_signal_type): Remove typedef.
6736 (struct signal_catchpoint) <signals_to_be_caught>: Now a
6737 std::vector.
6738 <catch_all>: Now a bool.
6739 (~signal_catchpoint): Remove.
6740 (signal_catchpoint_insert_location)
6741 (signal_catchpoint_remove_location)
6742 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
6743 (signal_catchpoint_print_mention)
6744 (signal_catchpoint_print_recreate)
6745 (signal_catchpoint_explains_signal): Update.
6746 (create_signal_catchpoint): Change type of "filter" and
6747 "catch_all".
6748 (catch_signal_split_args): Return a std::vector. Change type of
6749 "catch_all".
6750 (catch_signal_command): Update.
6751
6752 2017-07-20 Pedro Alves <palves@redhat.com>
6753
6754 * ada-lang.c (ada_language_defn): Make extern.
6755 (_initialize_ada_language): Remove add_language call.
6756 * c-lang.c (c_language_defn, cplus_language_defn)
6757 (asm_language_defn, minimal_language_defn): Make extern.
6758 (_initialize_c_language): Delete.
6759 * completer.c (compare_cstrings): Delete, moved to utils.h.
6760 * d-lang.c (d_language_defn): Make extern.
6761 (_initialize_d_language): Remove add_language calls.
6762 * defs.h (enum language): Add comment.
6763 * f-lang.c (f_language_defn): Make extern.
6764 (_initialize_f_language): Remove add_language call.
6765 * go-lang.c (go_language_defn): Make extern.
6766 (_initialize_go_language): Remove add_language call.
6767 * language.c: Include <algorithm>.
6768 (languages): Redefine as const array.
6769 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
6770 (set_language_command): Handle "local". Use for-range loop.
6771 (set_language): Remove loop.
6772 (language_enum): Rewrite.
6773 (language_def, language_str): Remove loops.
6774 (add_language): Delete.
6775 (add_set_language_command): New, based on add_languages.
6776 (skip_language_trampoline): Adjust.
6777 (local_language_defn): Delete.
6778 (language_gdbarch_post_init): Adjust.
6779 (_initialize_language): Remove add_language calls. Call
6780 add_set_language_command.
6781 * language.h (add_language): Delete.
6782 (auto_language_defn)
6783 (unknown_language_defn, minimal_language_defn, ada_language_defn)
6784 (asm_language_defn, c_language_defn, cplus_language_defn)
6785 (d_language_defn, f_language_defn, go_language_defn)
6786 (m2_language_defn, objc_language_defn, opencl_language_defn)
6787 (pascal_language_defn, rust_language_defn): Declare.
6788 * m2-lang.c (m2_language_defn): Make extern.
6789 (_initialize_m2_language): Remove add_language call.
6790 * objc-lang.c (objc_language_defn): Make extern.
6791 (_initialize_objc_language): Remove add_language call.
6792 * opencl-lang.c (opencl_language_defn): Make extern.
6793 (_initialize_opencl_language): Remove add_language call.
6794 * p-lang.c (pascal_language_defn): Make extern.
6795 (_initialize_pascal_language): Delete.
6796 * rust-lang.c (rust_language_defn): Make extern.
6797 (_initialize_rust_language): Delete.
6798 * utils.h (compare_cstrings): New static inline function.
6799
6800 2017-07-20 Pedro Alves <palves@redhat.com>
6801
6802 * ada-lang.c (ada_to_fixed_type_1): Adjust.
6803 (get_var_value): Constify parameters.
6804 (get_int_var_value): Change prototype.
6805 (to_fixed_range_type): Adjust.
6806 * ada-lang.h (get_int_var_value): Change prototype.
6807
6808 2017-07-20 Pedro Alves <palves@redhat.com>
6809
6810 * dwarf2read.c (dw2_lookup_symbol): Use
6811 SYMBOL_MATCHES_SEARCH_NAME.
6812 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
6813
6814 2017-07-20 Pedro Alves <palves@redhat.com>
6815
6816 * block.c (block_iter_name_step, block_iter_name_first)
6817 (block_iter_name_next): Delete.
6818 (block_lookup_symbol_primary): Adjust to use
6819 dict_iter_match_first/dict_iter_match_next.
6820 * block.h (block_iter_name_first, block_iter_name_next): Delete
6821 declarations.
6822 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
6823 dict_iter_match_first/dict_iter_match_next.
6824
6825 2017-07-20 Pedro Alves <palves@redhat.com>
6826
6827 * cp-support.c (cp_find_first_component_aux): Add missing case for
6828 end of string.
6829
6830 2017-07-18 David Blaikie <dblaikie@gmail.com>
6831
6832 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
6833 of dwo_cu's dwo_file.
6834
6835 2017-07-18 Yao Qi <yao.qi@linaro.org>
6836
6837 * remote.c (store_registers_using_G): Remove one line comment.
6838
6839 2017-07-18 Yao Qi <yao.qi@linaro.org>
6840
6841 * regcache.c (regcache_cpy): Simplify it.
6842 (regcache::cpy_no_passthrough): Remove it.
6843 * regcache.h (cpy_no_passthrough): Remove it.
6844 (regcache_dup, regcache_cpy): Update comments.
6845
6846 2017-07-18 Pedro Alves <palves@redhat.com>
6847
6848 * remote-sim.c (sim_command_completer): Adjust to work with a
6849 completion_tracker instead of a VEC.
6850
6851 2017-07-17 Pedro Alves <palves@redhat.com>
6852
6853 * completer.c (complete_source_filenames): New function.
6854 (complete_address_and_linespec_locations): New function.
6855 (location_completer): Use complete_address_and_linespec_locations.
6856 (completion_tracker::build_completion_result): Honor the tracker's
6857 request to suppress append.
6858 * completer.h (completion_tracker::suppress_append_ws)
6859 (completion_tracker::set_suppress_append_ws): New methods.
6860 (completion_tracker::m_suppress_append_ws): New field.
6861 (complete_source_filenames): New declaration.
6862 * linespec.c (linespec_complete_what): New.
6863 (struct ls_parser) <complete_what, completion_word,
6864 completion_quote_char, completion_quote_end, completion_tracker>:
6865 New fields.
6866 (string_find_incomplete_keyword_at_end): New.
6867 (linespec_lexer_lex_string): Record quote char. If in completion
6868 mode, don't throw.
6869 (linespec_lexer_consume_token): Advance the completion word point.
6870 (linespec_lexer_peek_token): Save/restore completion info.
6871 (save_stream_and_consume_token): New.
6872 (set_completion_after_number): New.
6873 (linespec_parse_basic): Set what to complete next depending on
6874 token. Handle function and label completions specially.
6875 (parse_linespec): Disable objc shortcut in completion mode. Set
6876 what to complete next depending on token type. Skip keyword if in
6877 completion mode.
6878 (complete_linespec_component, linespec_complete): New.
6879 * linespec.h (linespec_complete): Declare.
6880
6881 2017-07-17 Pedro Alves <palves@redhat.com>
6882
6883 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
6884 Handle 'operator<' / 'operator<<'.
6885
6886 2017-07-17 Pedro Alves <palves@redhat.com>
6887
6888 * completer.c (collect_explicit_location_matches): Handle
6889 MATCH_LABEL.
6890 (convert_explicit_location_to_linespec): New, factored out from
6891 ...
6892 (convert_explicit_location_to_sals): ... this.
6893 (complete_label): New.
6894 (linespec_complete_label, find_label_symbols_in_block): New.
6895 (find_label_symbols): Add completion_mode parameter and adjust to
6896 call find_label_symbols_in_block.
6897 * linespec.h (linespec_complete_label): Declare.
6898
6899 2017-07-17 Pedro Alves <palves@redhat.com>
6900
6901 * ada-lang.c (ada_collect_symbol_completion_matches): Add
6902 complete_symbol_mode parameter.
6903 * cli/cli-cmds.c (complete_command): Get the completion result out
6904 of the handle_brkchars tracker if used a custom word point.
6905 * completer.c: Include "linespec.h".
6906 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
6907 (advance_to_expression_complete_word_point): New.
6908 (completion_tracker::completes_to_completion_word): New.
6909 (complete_files_symbols): Pass down
6910 complete_symbol_mode::EXPRESSION.
6911 (explicit_options, probe_options): New.
6912 (collect_explicit_location_matches): Complete on the
6913 explictit_loc->foo instead of word. Use
6914 linespec_complete_function. Handle MATCH_LINE. Handle offering
6915 keyword and options completions.
6916 (backup_text_ptr): Delete.
6917 (skip_keyword): New.
6918 (complete_explicit_location): Remove 'word' parameter. Add
6919 language, quoted_arg_start and quoted_arg_end parameters.
6920 Rewrite, parsing left to right.
6921 (location_completer): Rewrite.
6922 (location_completer_handle_brkchars): New function.
6923 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
6924 (enum complete_line_internal_reason): Adjust comments.
6925 (completion_tracker::discard_completions): New.
6926 (completer_handle_brkchars_func_for_completer): Handle
6927 location_completer.
6928 (gdb_custom_word_point_brkchars)
6929 (gdb_org_rl_basic_quote_characters): New.
6930 (gdb_completion_word_break_characters_throw)
6931 (completion_find_completion_word): Handle trackers that use a
6932 custom word point.
6933 (completion_tracker::advance_custom_word_point_by): New.
6934 (completion_tracker::build_completion_result): Don't rely on
6935 readline appending the quote char.
6936 (gdb_rl_attempted_completion_function_throw): Handle trackers that
6937 use a custom word point.
6938 (gdb_rl_attempted_completion_function): Restore
6939 rl_basic_quote_characters.
6940 * completer.h (class completion_tracker): Extend intro comment.
6941 (completion_tracker::set_quote_char)
6942 (completion_tracker::quote_char)
6943 (completion_tracker::set_use_custom_word_point)
6944 (completion_tracker::use_custom_word_point)
6945 (completion_tracker::custom_word_point)
6946 (completion_tracker::set_custom_word_point)
6947 (completion_tracker::advance_custom_word_point_by)
6948 (completion_tracker::completes_to_completion_word)
6949 (completion_tracker::discard_completions): New methods.
6950 (completion_tracker::m_quote_char)
6951 (completion_tracker::m_use_custom_word_point)
6952 (completion_tracker::m_custom_word_point): New fields.
6953 (advance_to_expression_complete_word_point): Declare.
6954 * f-lang.c (f_collect_symbol_completion_matches): Add
6955 complete_symbol_mode parameter.
6956 * language.h (struct language_defn)
6957 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
6958 parameter.
6959 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
6960 (linespec_complete_function): New function.
6961 (linespec_lexer_lex_keyword): Adjust.
6962 * linespec.h (linespec_keywords, linespec_complete_function): New
6963 declarations.
6964 * location.c (find_end_quote): New function.
6965 (explicit_location_lex_one): Add explicit_completion_info
6966 parameter. Save quoting info. Don't throw if being called for
6967 completion. Don't handle Ada operators here.
6968 (is_cp_operator, skip_op_false_positives, first_of)
6969 (explicit_location_lex_one_function): New function.
6970 (string_to_explicit_location): Replace 'dont_throw' parameter with
6971 an explicit_completion_info pointer parameter. Handle it. Don't
6972 use explicit_location_lex_one to lex function names. Use
6973 explicit_location_lex_one_function instead.
6974 * location.h (struct explicit_completion_info): New.
6975 (string_to_explicit_location): Replace 'dont_throw' parameter with
6976 an explicit_completion_info pointer parameter.
6977 * symtab.c (default_collect_symbol_completion_matches_break_on):
6978 Add complete_symbol_mode parameter. Handle LINESPEC mode.
6979 (default_collect_symbol_completion_matches)
6980 (collect_symbol_completion_matches): Add complete_symbol_mode
6981 parameter.
6982 (collect_symbol_completion_matches_type): Pass down
6983 complete_symbol_mode::EXPRESSION.
6984 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6985 parameter. Handle LINESPEC mode.
6986 * symtab.h (complete_symbol_mode): New.
6987 (default_collect_symbol_completion_matches_break_on)
6988 (default_collect_symbol_completion_matches)
6989 (collect_symbol_completion_matches)
6990 (collect_file_symbol_completion_matches): Add complete_symbol_mode
6991 parameter.
6992
6993 2017-07-17 Pedro Alves <palves@redhat.com>
6994
6995 * utils.c (enum class strncmp_iw_mode): New.
6996 (strcmp_iw): Rename to ...
6997 (strncmp_iw_with_mode): ... this. Add string2_len and mode
6998 parameters. Handle them.
6999 (strncmp_iw): New.
7000 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
7001 * utils.h (strncmp_iw): Declare.
7002 (strcmp_iw): Move describing comments here.
7003
7004 2017-07-17 Pedro Alves <palves@redhat.com>
7005
7006 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
7007 CP_OPERATOR_STR.
7008 * c-typeprint.c (is_type_conversion_operator): Use
7009 CP_OPERATOR_STR.
7010 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
7011 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
7012 CP_OPERATOR_LEN.
7013 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
7014 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
7015 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
7016 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
7017 CP_OPERATOR_STR.
7018 * location.c: Include "cp-support.h".
7019 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
7020 CP_OPERATOR_STR.
7021 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
7022 CP_OPERATOR_LEN.
7023
7024 2017-07-17 Pedro Alves <palves@redhat.com>
7025
7026 * cli/cli-cmds.c (complete_command): Use a completion tracker
7027 along with completion_find_completion_word for handle_brkchars
7028 phase.
7029 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
7030 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
7031 (struct gdb_rl_completion_word_info): New.
7032 (gdb_rl_find_completion_word): New.
7033 (completion_find_completion_word): New.
7034 * completer.h (completion_find_completion_word): Declare.
7035
7036 2017-07-17 Pedro Alves <palves@redhat.com>
7037
7038 * ada-lang.c (symbol_completion_match): Adjust comments.
7039 (symbol_completion_add): Replace vector parameter with
7040 completion_tracker parameter. Use it.
7041 (ada_make_symbol_completion_list): Rename to...
7042 (ada_collect_symbol_completion_matches): ... this. Add
7043 completion_tracker parameter and use it.
7044 (ada_language_defn): Adjust.
7045 * break-catch-syscall.c (catch_syscall_completer): Adjust
7046 prototype and work with completion_tracker instead of VEC.
7047 * breakpoint.c (condition_completer): Adjust prototype and work
7048 with completion_tracker instead of VEC.
7049 * c-lang.c (c_language_defn, cplus_language_defn)
7050 (asm_language_defn, minimal_language_defn): Adjust to renames.
7051 * cli/cli-cmds.c (complete_command): Rework using
7052 completion_tracker. Catch exceptions when completing.
7053 * cli/cli-decode.c (integer_unlimited_completer)
7054 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
7055 with completion_tracker instead of VEC.
7056 * command.h (struct completion_tracker): Forward declare.
7057 (completer_ftype, completer_handle_brkchars_ftype): Change
7058 types.
7059 (complete_on_cmdlist, complete_on_enum): Adjust.
7060 * completer.c: Include <algorithm>.
7061 (struct gdb_completer_state): New.
7062 (current_completion): New global.
7063 (readline_line_completion_function): Delete.
7064 (noop_completer, filename_completer)
7065 (filename_completer_handle_brkchars, complete_files_symbols)
7066 (linespec_location_completer): Adjust to work with a
7067 completion_tracker instead of a VEC.
7068 (string_or_empty): New.
7069 (collect_explicit_location_matches): Adjust to work with a
7070 completion_tracker instead of a VEC.
7071 (explicit_location_completer): Rename to ...
7072 (complete_explicit_location): ... this and adjust to work with a
7073 completion_tracker instead of a VEC.
7074 (location_completer): Adjust to work with a completion_tracker
7075 instead of a VEC.
7076 (add_struct_fields): Adjust to work with a completion_list instead
7077 of VEC.
7078 (expression_completer): Rename to ...
7079 (complete_expression): ... this and adjust to work with a
7080 completion_tracker instead of a VEC. Use complete_files_symbols.
7081 (expression_completer): Reimplement on top of complete_expression.
7082 (symbol_completer): Adjust to work with a completion_tracker
7083 instead of a VEC.
7084 (enum complete_line_internal_reason): Add describing comments.
7085 (complete_line_internal_normal_command): Adjust to work with a
7086 completion_tracker instead of a VEC.
7087 (complete_line_internal): Rename to ...
7088 (complete_line_internal_1): ... this and adjust to work with a
7089 completion_tracker instead of a VEC. Assert TEXT is NULL in the
7090 handle_brkchars phase.
7091 (new_completion_tracker): Delete.
7092 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
7093 complete_line_internal_1.
7094 (free_completion_tracker): Delete.
7095 (INITIAL_COMPLETION_HTAB_SIZE): New.
7096 (completion_tracker::completion_tracker)
7097 (completion_tracker::~completion_tracker): New.
7098 (maybe_add_completion): Delete.
7099 (completion_tracker::maybe_add_completion)
7100 (completion_tracker::add_completion)
7101 (completion_tracker::add_completions): New.
7102 (throw_max_completions_reached_error): Delete.
7103 (complete_line): Adjust to work with a completion_tracker instead
7104 of a VEC. Don't create a completion_tracker_t or check for max
7105 completions here.
7106 (command_completer, command_completer_handle_brkchars)
7107 (signal_completer, reg_or_group_completer_1)
7108 (reg_or_group_completer, default_completer_handle_brkchars):
7109 Adjust to work with a completion_tracker.
7110 (gdb_completion_word_break_characters_throw): New.
7111 (gdb_completion_word_break_characters): Reimplement.
7112 (line_completion_function): Delete.
7113 (completion_tracker::recompute_lowest_common_denominator)
7114 (expand_preserving_ws)
7115 (completion_tracker::build_completion_result)
7116 (completion_result::completion_result)
7117 (completion_result::completion_result)
7118 (completion_result::~completion_result)
7119 (completion_result::completion_result)
7120 (completion_result::release_match_list, compare_cstrings)
7121 (completion_result::sort_match_list)
7122 (completion_result::reset_match_list)
7123 (gdb_rl_attempted_completion_function_throw)
7124 (gdb_rl_attempted_completion_function): New.
7125 * completer.h (completion_list, struct completion_result)
7126 (class completion_tracker): New.
7127 (complete_line): Add completion_tracker parameter.
7128 (readline_line_completion_function): Delete.
7129 (gdb_rl_attempted_completion_function): New.
7130 (noop_completer, filename_completer, expression_completer)
7131 (location_completer, symbol_completer, command_completer)
7132 (signal_completer, reg_or_group_completer): Update prototypes.
7133 (completion_tracker_t, new_completion_tracker)
7134 (make_cleanup_free_completion_tracker): Delete.
7135 (enum maybe_add_completion_enum): Delete.
7136 (maybe_add_completion): Delete.
7137 (throw_max_completions_reached_error): Delete.
7138 * corefile.c (complete_set_gnutarget): Adjust to work with a
7139 completion_tracker instead of a VEC.
7140 * cp-abi.c (cp_abi_completer): Adjust to work with a
7141 completion_tracker instead of a VEC.
7142 * d-lang.c (d_language_defn): Adjust.
7143 * disasm.c (disassembler_options_completer): Adjust to work with a
7144 completion_tracker instead of a VEC.
7145 * f-lang.c (f_make_symbol_completion_list): Rename to ...
7146 (f_collect_symbol_completion_matches): ... this. Adjust to work
7147 with a completion_tracker instead of a VEC.
7148 (f_language_defn): Adjust.
7149 * go-lang.c (go_language_defn): Adjust.
7150 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
7151 Adjust to work with a completion_tracker instead of a VEC.
7152 * infrun.c (handle_completer): Likewise.
7153 * interps.c (interpreter_completer): Likewise.
7154 * interps.h (interpreter_completer): Likewise.
7155 * language.c (unknown_language_defn, auto_language_defn)
7156 (local_language_defn): Adjust.
7157 * language.h (language_defn::la_make_symbol_completion_list):
7158 Rename to ...
7159 (language_defn::la_collect_symbol_completion_matches): ... this
7160 and adjust to work with a completion_tracker instead of a VEC.
7161 * m2-lang.c (m2_language_defn): Adjust.
7162 * objc-lang.c (objc_language_defn): Adjust.
7163 * opencl-lang.c (opencl_language_defn): Adjust.
7164 * p-lang.c (pascal_language_defn): Adjust.
7165 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
7166 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
7167 with a completion_tracker.
7168 * rust-lang.c (rust_language_defn): Adjust.
7169 * symtab.c (free_completion_list, do_free_completion_list)
7170 (return_val, completion_tracker): Delete.
7171 (completion_list_add_name, completion_list_add_symbol)
7172 (completion_list_add_msymbol, completion_list_objc_symbol)
7173 (completion_list_add_fields, add_symtab_completions): Add
7174 completion_tracker parameter and use it.
7175 (default_make_symbol_completion_list_break_on_1): Rename to...
7176 (default_collect_symbol_completion_matches_break_on): ... this.
7177 Add completion_tracker parameter and use it instead of allocating
7178 a completion tracker here.
7179 (default_make_symbol_completion_list_break_on): Delete old
7180 implementation.
7181 (default_make_symbol_completion_list): Delete.
7182 (default_collect_symbol_completion_matches): New.
7183 (make_symbol_completion_list): Delete.
7184 (collect_symbol_completion_matches): New.
7185 (make_symbol_completion_type): Rename to ...
7186 (collect_symbol_completion_matches_type): ... this. Add
7187 completion_tracker parameter and use it instead of VEC.
7188 (make_file_symbol_completion_list_1): Rename to...
7189 (collect_file_symbol_completion_matches): ... this. Add
7190 completion_tracker parameter and use it instead of VEC.
7191 (make_file_symbol_completion_list): Delete.
7192 (add_filename_to_list): Use completion_list instead of a VEC.
7193 (add_partial_filename_data::list): Now a completion_list.
7194 (make_source_files_completion_list): Work with a completion_list
7195 instead of a VEC.
7196 * symtab.h: Include "completer.h".
7197 (default_make_symbol_completion_list_break_on)
7198 (default_make_symbol_completion_list, make_symbol_completion_list)
7199 (make_symbol_completion_type, make_file_symbol_completion_list)
7200 (make_source_files_completion_list): Delete.
7201 (default_collect_symbol_completion_matches_break_on)
7202 (default_collect_symbol_completion_matches)
7203 (collect_symbol_completion_matches)
7204 (collect_symbol_completion_matches_type)
7205 (collect_file_symbol_completion_matches)
7206 (make_source_files_completion_list): New.
7207 * top.c (init_main): Don't install a rl_completion_entry_function
7208 hook. Install a rl_attempted_completion_function hook instead.
7209 * tui/tui-layout.c (layout_completer): Adjust to work with a
7210 completion_tracker.
7211 * tui/tui-regs.c (tui_reggroup_completer):
7212 * tui/tui-win.c (window_name_completer, focus_completer)
7213 (winheight_completer): Adjust to work with a completion_tracker.
7214 * value.c: Include "completer.h".
7215 (complete_internalvar): Adjust to work with a completion_tracker.
7216 * value.h (complete_internalvar): Likewise.
7217
7218 2017-07-17 Pedro Alves <palves@redhat.com>
7219
7220 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
7221 renames.
7222 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
7223 comments to completer_ftype's declaration.
7224 <completer_handle_brkchars>: Change type to
7225 completer_handle_brkchars_ftype.
7226 * command.h (completer_ftype): Add describing comment and give
7227 names to parameters.
7228 (completer_ftype_void): Rename to ...
7229 (completer_handle_brkchars_ftype) ... this. Add describing comment.
7230 (set_cmd_completer_handle_brkchars): Adjust.
7231 * completer.c (filename_completer_handle_brkchars): New function.
7232 (complete_line_internal_normal_command): New function, factored
7233 out from ...
7234 (complete_line_internal): ... here.
7235 (command_completer_handle_brkchars)
7236 (default_completer_handle_brkchars)
7237 (completer_handle_brkchars_func_for_completer): New functions.
7238 * completer.h (set_gdb_completion_word_break_characters): Delete
7239 declaration.
7240 (completer_handle_brkchars_func_for_completer): New declaration.
7241 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
7242 completer_handle_brkchars_func_for_completer.
7243
7244 2017-07-17 Pedro Alves <palves@redhat.com>
7245
7246 * completer.c (symbol_completer): New function, based on
7247 make_symbol_completion_list_fn.
7248 * completer.h (symbol_completer): New declaration.
7249 * guile/scm-cmd.c (cmdscm_completers): Adjust.
7250 * python/py-cmd.c (completers): Adjust.
7251 * symtab.c (make_symbol_completion_list_fn): Delete.
7252 * symtab.h (make_symbol_completion_list_fn): Delete.
7253 * cli/cli-decode.c (add_cmd): Adjust.
7254
7255 2017-07-17 Pedro Alves <palves@redhat.com>
7256
7257 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
7258 * dwarf2read.c: Include "filename-seen-cache.h".
7259 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
7260 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
7261 * filename-seen-cache.c: New file.
7262 * filename-seen-cache.h: New file.
7263 * symtab.c: Include "filename-seen-cache.h".
7264 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
7265 (create_filename_seen_cache, clear_filename_seen_cache)
7266 (delete_filename_seen_cache, filename_seen): Delete, parts moved
7267 to filename-seen-cache.h/filename-seen-cache.c.
7268 (output_source_filename, sources_info)
7269 (maybe_add_partial_symtab_filename)
7270 (make_source_files_completion_list): Adjust to use
7271 filename_seen_cache.
7272
7273 2017-07-17 Pedro Alves <palves@redhat.com>
7274
7275 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
7276 fields.
7277 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
7278 dwarf2_debug_sections*)): New.
7279 (dwarf2_per_objfile::dwarf2_per_objfile(const
7280 dwarf2_per_objfile&)): Declare as deleted.
7281 (dwarf2_per_objfile::operator=): Declare as deleted.
7282 (dwarf2_per_objfile::dwarf2_per_objfile)
7283 (dwarf2_per_objfile::~dwarf2_per_objfile)
7284 (dwarf2_per_objfile::free_cached_comp_units): New.
7285 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
7286 ctor. Call dwarf2_per_objfile's ctor manually.
7287 (dwarf2_locate_sections): Deleted/refactored as ...
7288 (dwarf2_per_objfile::locate_sections): ... this new method.
7289 (free_cached_comp_units): Defer to
7290 dwarf2_per_objfile::free_cached_comp_units.
7291 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
7292
7293 2017-07-14 Tom Tromey <tom@tromey.com>
7294
7295 PR rust/21764:
7296 * rust-exp.y (convert_ast_to_expression): Add "want_type"
7297 parameter.
7298 <UNOP_SIZEOF>: Split into separate case.
7299 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
7300
7301 2017-07-14 Tom Tromey <tom@tromey.com>
7302
7303 PR rust/21763:
7304 * symtab.c (symbol_matches_domain): Add language_rust to special
7305 case.
7306 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
7307 treat LOC_TYPEDEF symbols as variables.
7308
7309 2017-07-14 Pedro Alves <palves@redhat.com>
7310
7311 * symtab.c (make_file_symbol_completion_list_1): Iterate over
7312 symtabs matching all symtabs with SRCFILE as file name instead of
7313 only considering the first hit, with lookup_symtab.
7314
7315 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7316
7317 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
7318 operator_name parameters.
7319 (gen_expr): Update function call.
7320
7321 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7322
7323 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
7324 parameter.
7325 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
7326 Likewise.
7327 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
7328 parameter, use agent_expr::gdbarch instead, update function
7329 calls.
7330 (locexpr_tracepoint_var_ref): Likewise.
7331 (loclist_tracepoint_var_ref): Likewise.
7332 * ax-gdb.c (gen_trace_static_fields): Likewise.
7333 (gen_traced_pop): Likewise.
7334 (gen_frame_args_address): Likewise.
7335 (gen_frame_locals_address): Likewise.
7336 (gen_var_ref): Likewise.
7337 (gen_struct_ref_recursive): Likewise.
7338 (gen_static_field): Likewise.
7339 (gen_maybe_namespace_elt): Likewise.
7340 (gen_expr): Likewise.
7341 (gen_trace_for_var): Likewise.
7342 (gen_trace_for_expr): Likewise.
7343 (gen_trace_for_return_address): Likewise.
7344
7345 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7346
7347 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
7348 parameter.
7349 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
7350
7351 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
7352
7353 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
7354 from ax, update calls.
7355 (gen_usual_arithmetic): Likewise.
7356 (gen_integral_promotions): Likewise.
7357 (gen_bitfield_ref): Likewise.
7358 (gen_primitive_field): Likewise.
7359 (gen_struct_ref_recursive): Likewise.
7360 (gen_struct_ref): Likewise.
7361 (gen_maybe_namespace_elt): Likewise.
7362 (gen_struct_elt_for_reference): Likewise.
7363 (gen_namespace_elt): Likewise.
7364 (gen_aggregate_elt_ref): Likewise.
7365 (gen_expr): Get gdbarch from ax, update calls.
7366 (gen_expr_binop_rest): Likewise.
7367
7368 2017-07-13 Pedro Alves <palves@redhat.com>
7369
7370 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
7371 as default tdesc.
7372 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
7373 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
7374 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
7375 tdesc_amd64_linux as default tdesc. Get final tdesc from the
7376 tdep.
7377 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
7378 Get final tdesc from the tdep.
7379 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
7380 default tdesc.
7381 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
7382 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
7383 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
7384 Use it as default tdesc.
7385 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
7386 down to amd_init_abi. No longer handle fallback tdesc here.
7387 * amd64-tdep.h (tdesc_x32): Declare.
7388 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
7389 parameter.
7390 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
7391 as default tdesc.
7392
7393 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7394
7395 * s390-linux-tdep.c (s390_process_record): Add support for
7396 instructions new in arch12.
7397
7398 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7399
7400 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
7401 PT_GETFSBASE and PT_GETGSBASE.
7402 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
7403 PT_SETGSBASE.
7404
7405 2017-07-11 John Baldwin <jhb@FreeBSD.org>
7406
7407 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
7408 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
7409 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
7410 those rules.
7411 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
7412 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
7413 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
7414 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
7415 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
7416 * features/i386/amd64.xml: Add 64bit-segments.xml.
7417 * features/i386/amd64-avx-avx512.c: Regenerated.
7418 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
7419 * features/i386/amd64-avx-mpx.c: Regenerated.
7420 * features/i386/amd64-avx.c: Regenerated.
7421 * features/i386/amd64-mpx.c: Regenerated.
7422 * features/i386/amd64.c: Regenerated.
7423 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
7424 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7425 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
7426 * regformats/i386/amd64-avx.dat: Regenerated.
7427 * regformats/i386/amd64-mpx.dat: Regenerated.
7428 * regformats/i386/amd64.dat: Regenerated.
7429
7430 2017-07-10 Yao Qi <yao.qi@linaro.org>
7431
7432 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7433 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7434
7435 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
7436
7437 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
7438 unsetenv.
7439 * gnulib/aclocal.m4: Regenerate.
7440 * gnulib/config.in: Regenerate.
7441 * gnulib/configure: Regenerate.
7442 * gnulib/import/Makefile.am: Regenerate.
7443 * gnulib/import/Makefile.in: Regenerate.
7444 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7445 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7446 * gnulib/import/m4/environ.m4: New file.
7447 * gnulib/import/m4/setenv.m4: New file.
7448 * gnulib/import/setenv.c: New file.
7449 * gnulib/import/unsetenv.c: New file.
7450
7451 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
7452
7453 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
7454 address when op is DW_OP_addr.
7455
7456 2017-07-09 Tom Tromey <tom@tromey.com>
7457
7458 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
7459 check and apply to outer type.
7460
7461 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7462
7463 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
7464 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
7465 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
7466 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
7467
7468 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7469
7470 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
7471
7472 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7473
7474 * corelow.c (get_core_siginfo): Remove.
7475 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
7476 instead of get_core_siginfo.
7477 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
7478 * gdbarch.h: Re-generate.
7479 * gdbarch.c: Re-generate.
7480 * linux-tdep.c (linux_core_xfer_siginfo): New.
7481 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
7482
7483 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7484
7485 * corelow.c (thread_section_name): Move to ...
7486 * gdbcore.h (thread_section_name): ... here.
7487
7488 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7489
7490 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
7491 (struct siginfo32): New.
7492 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
7493 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
7494 via ptrace(PT_LWPINFO).
7495
7496 2017-07-07 John Baldwin <jhb@FreeBSD.org>
7497
7498 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
7499 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
7500 (fbsd_get_siginfo_type): New.
7501 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
7502 (_initialize_fbsd_tdep): New.
7503
7504 2017-07-06 David Blaikie <dblaikie@gmail.com>
7505
7506 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
7507 a singular dwo_unit*) to support multiple CUs in the same way that
7508 multiple TUs are supported.
7509 (create_cus_hash_table): Replace create_dwo_cu with a function for
7510 parsing multiple CUs from a DWO file.
7511 (open_and_init_dwo_file): Use create_cus_hash_table rather than
7512 create_dwo_cu.
7513 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
7514 htab_find, rather than comparing the signature to a singleton CU in
7515 the dwo_file.
7516
7517 2017-07-06 Pedro Alves <palves@redhat.com>
7518
7519 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
7520
7521 2017-07-04 Pedro Alves <palves@redhat.com>
7522
7523 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
7524 * gdbtypes.h (TYPE_STATIC): Delete.
7525 (struct fn_field) <is_public, is_abstract, is_static, is_final,
7526 is_synchronized, is_native>: Delete.
7527 <dummy>: Bump.
7528 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
7529 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
7530 (TYPE_FN_FIELD_ABSTRACT): Delete.
7531
7532 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
7533
7534 * buffer.h (buffer_finish): Fix spelling mistakes.
7535
7536 2017-07-01 Eli Zaretskii <eliz@gnu.org>
7537
7538 * .dir-locals.el: Automatically switch to C-style comments in
7539 versions of Emacs that support the feature.
7540
7541 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7542 Pedro Alves <palves@redhat.com>
7543
7544 PR cli/21688
7545 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
7546 (process_next_line): New variable 'inline_cmd'.
7547 Adjust 'if' clauses for "python", "compile" and "guile" to use
7548 'command_name_equals' and check for '!inline_cmd'.
7549
7550 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
7551
7552 PR cli/21688
7553 * cli/cli-script.c (command_name_equals_not_inline): New function.
7554 (process_next_line): Adjust 'if' clauses for "python", "compile"
7555 and "guile" to use command_name_equals_not_inline.
7556
7557 2017-06-29 Pedro Alves <palves@redhat.com>
7558
7559 * completer.c (expression_completer): Call
7560 linespec_location_completer instead of location_completer.
7561
7562 2017-06-29 Pedro Alves <palves@redhat.com>
7563
7564 * completer.c (expression_completer): Remove code that recomputes
7565 'text' from 'word'.
7566
7567 2017-06-29 Yao Qi <yao.qi@linaro.org>
7568
7569 * regformats/regdat.sh: Generate code with
7570 "ifndef IN_PROCESS_AGENT".
7571
7572 2017-06-28 Pedro Alves <palves@redhat.com>
7573
7574 * command.h: Include "common/scoped_restore.h".
7575
7576 2017-06-28 Yao Qi <yao.qi@linaro.org>
7577
7578 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
7579 instead of obstack_grow.
7580
7581 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
7582
7583 PR gdb/21337
7584 * symfile.c (reread_symbols): Call objfiles_changed just before
7585 read_symbols.
7586
7587 2017-06-27 Pedro Alves <palves@redhat.com>
7588
7589 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
7590 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
7591 (completion_list_add_symbol, completion_list_add_msymbol):
7592 ... these new functions.
7593 (add_symtab_completions)
7594 (default_make_symbol_completion_list_break_on_1): Adjust.
7595
7596 2017-06-27 Pedro Alves <palves@redhat.com>
7597
7598 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
7599 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
7600 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
7601 dtor.
7602 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
7603 'storage_obstack' field an auto_obstack. In-class initialize all
7604 non-bitfield fields. Make minsyms_read bool.
7605 * symfile.c (read_symbols): Adjust.
7606
7607 2017-06-27 Alan Hayward <alan.hayward@arm.com>
7608
7609 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
7610 (gdbsim_store_register): Likewise.
7611
7612 2017-06-27 Pedro Alves <palves@redhat.com>
7613
7614 * c-exp.y (name_obstack): Now an auto_obstack.
7615 (yylex): Use auto_obstack::clear.
7616 (c_parse): Use auto_obstack::clear instead of reinitializing and
7617 freeing the obstack.
7618 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
7619 * d-exp.y (name_obstack): Now an auto_obstack.
7620 (yylex): Use auto_obstack::clear.
7621 (d_parse): Use auto_obstack::clear instead of reinitializing and
7622 freeing the obstack.
7623 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
7624 auto_obstack.
7625 * dwarf2read.c (create_addrmap_from_index)
7626 (dwarf2_build_psymtabs_hard)
7627 (update_enumeration_type_from_children): Likewise.
7628 * gdb_obstack.h (auto_obstack): New type.
7629 * go-exp.y (name_obstack): Now an auto_obstack.
7630 (build_packaged_name): Use auto_obstack::clear.
7631 (go_parse): Use auto_obstack::clear instead of reinitializing and
7632 freeing the obstack.
7633 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
7634 auto_obstack.
7635 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
7636 * rust-exp.y (work_obstack): Now an auto_obstack.
7637 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
7638 reinitializing and freeing the obstack.
7639 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
7640 (host_char_to_target): Use auto_obstack.
7641 * utils.h (make_cleanup_obstack_free): Delete declaration.
7642 * valprint.c (generic_emit_char, generic_printstr): Use
7643 auto_obstack.
7644
7645 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
7646
7647 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
7648 thread.
7649 (darwin_init_thread_list): Don't update dummy thread.
7650 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
7651
7652 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7653
7654 * record-full.c (netorder16): Remove.
7655
7656 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7657
7658 * common/diagnostics.h: Define macros for GCC.
7659 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
7660 * common/vec.h: Include diagnostics.h.
7661 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
7662 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
7663 warning.
7664
7665 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
7666
7667 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
7668 New macro.
7669 * ada-lex.l: Ignore deprecated register warnings.
7670
7671 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7672
7673 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
7674 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
7675
7676 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7677
7678 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
7679 its own line.
7680
7681 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
7682
7683 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
7684
7685 2017-06-23 Alan Hayward <alan.hayward@arm.com>
7686
7687 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
7688 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
7689 (xtensa_register_read_masked): Likewise.
7690
7691 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
7692
7693 * common/environ.c (gdb_environ::unset): Update comment.
7694
7695 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7696
7697 * python/py-unwind.c (pyuw_sniffer): Allocate space for
7698 registers.
7699
7700 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7701
7702 * record-full.c (record_full_exec_insn): Use byte_vector.
7703
7704 2017-06-22 Yao Qi <yao.qi@linaro.org>
7705
7706 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
7707 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
7708
7709 2017-06-22 Alan Hayward <alan.hayward@arm.com>
7710
7711 * remote.c (cached_reg): Move from here...
7712 * regcache.h (cached_reg): ...to here.
7713 * python/py-unwind.c (struct reg_info): Remove.
7714 (cached_frame_info): Use cached_reg_t.
7715 (pyuw_prev_register): Likewise.
7716 (pyuw_sniffer): Use cached_reg_t and allocate registers.
7717 (pyuw_dealloc_cache): Free all registers.
7718
7719 2017-06-22 Pedro Alves <palves@redhat.com>
7720 Simon Marchi <simon.marchi@ericsson.com>
7721
7722 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
7723 warning.
7724 * common/diagnostics.h: New file.
7725
7726 2017-06-22 Pedro Alves <palves@redhat.com>
7727
7728 * common/agent.h: Add include guards.
7729
7730 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
7731
7732 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
7733 talk about addressable units instead of bytes.
7734
7735 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7736
7737 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
7738 of '::const_iterator'.
7739
7740 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7741
7742 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7743 'unittests/environ-selftests.c'.
7744 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
7745 * charset.c (find_charset_names): Declare object 'iconv_env'.
7746 Update code to use 'iconv_env' object. Remove call to
7747 'free_environ'.
7748 * common/environ.c: Include <utility>.
7749 (make_environ): Delete function.
7750 (free_environ): Delete function.
7751 (gdb_environ::clear): New function.
7752 (gdb_environ::operator=): New function.
7753 (gdb_environ::get): Likewise.
7754 (environ_vector): Delete function.
7755 (set_in_environ): Delete function.
7756 (gdb_environ::set): New function.
7757 (unset_in_environ): Delete function.
7758 (gdb_environ::unset): New function.
7759 (gdb_environ::envp): Likewise.
7760 * common/environ.h: Include <vector>.
7761 (struct gdb_environ): Delete; transform into...
7762 (class gdb_environ): ... this class.
7763 (free_environ): Delete prototype.
7764 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
7765 environ_vector): Likewise.
7766 * infcmd.c (run_command_1): Update code to call
7767 'envp' from 'gdb_environ' class.
7768 (environment_info): Update code to call methods from 'gdb_environ'
7769 class.
7770 (unset_environment_command): Likewise.
7771 (path_info): Likewise.
7772 (path_command): Likewise.
7773 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
7774 (inferior::inferior): Initialize 'environment' using the host's
7775 information.
7776 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
7777 Include "environ.h".
7778 (class inferior) <environment>: Change type from 'struct
7779 gdb_environ' to 'gdb_environ'.
7780 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
7781 methods from 'gdb_environ' class.
7782 * solib.c (solib_find_1): Likewise
7783 * unittests/environ-selftests.c: New file.
7784
7785 2017-06-20 Yao Qi <yao.qi@linaro.org>
7786
7787 * features/i386/i386-linux.xml: Exchange the order of including
7788 32bit-linux.xml and 32bit-sse.xml.
7789 * features/i386/i386-linux.c: Regenerated.
7790
7791 2017-06-20 Yao Qi <yao.qi@linaro.org>
7792
7793 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
7794 Delete copy ctor and assignment operator.
7795 (tdesc_type): Likewise.
7796 (tdesc_feature): Likewise.
7797 (tdesc_free_reg): Remove.
7798 (tdesc_create_reg): Use new.
7799 (tdesc_free_type): Remove.
7800 (tdesc_create_vector): Use new.
7801 (tdesc_create_union): Likewise.
7802 (tdesc_create_flags): Likewise.
7803 (tdesc_create_enum): Likewise.
7804 (tdesc_free_feature): Delete.
7805 (free_target_description): Use delete.
7806
7807 2017-06-19 John Baldwin <jhb@FreeBSD.org>
7808
7809 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
7810 registers.
7811
7812 2017-06-19 Pedro Alves <palves@redhat.com>
7813
7814 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
7815 after gdb::unlinker.
7816
7817 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
7818
7819 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
7820 gdb_environ to access an environment variable.
7821
7822 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
7823
7824 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
7825 gdb_byte*.
7826
7827 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7828
7829 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
7830
7831 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7832
7833 * configure: Re-generate.
7834 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
7835
7836 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7837
7838 * configure: Re-generate.
7839 * warning.m4: Pass -Werror to compiler when checking for
7840 supported warning flags.
7841
7842 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7843
7844 * Makefile.in (COMPILE.pre): Add "-x c++".
7845
7846 2017-06-16 Alan Hayward <alan.hayward@arm.com>
7847 Pedro Alves <palves@redhat.com>
7848 Yao Qi <yao.qi@linaro.org>
7849
7850 * defs.h (RequireLongest): New.
7851 (extract_integer): Declare function template.
7852 (extract_signed_integer): Remove the declaration, but define it
7853 static inline.
7854 (extract_unsigned_integer): Likewise.
7855 (store_integer): Declare function template.
7856 (store_signed_integer): Remove the declaration, but define it
7857 static inline.
7858 (store_unsigned_integer): Likewise.
7859 * findvar.c (extract_integer): New function template.
7860 (extract_signed_integer): Remove.
7861 (extract_unsigned_integer): Remove.
7862 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
7863 instantiations.
7864 (store_integer): New function template.
7865 (store_signed_integer): Remove.
7866 (store_unsigned_integer): Remove.
7867 (store_integer): Explicit instantiations.
7868 * regcache.c (regcache_raw_read_signed): Update.
7869 (regcache::raw_read): New function.
7870 (regcache::raw_read_signed): Remove.
7871 (regcache::raw_read_unsigned): Remove.
7872 (regcache_raw_read_unsigned): Update.
7873 (regcache_raw_write_unsigned): Update.
7874 (regcache::raw_write_signed): Remove.
7875 (regcache::raw_write): New function.
7876 (regcache_cooked_read_signed): Update.
7877 (regcache::raw_write_unsigned): Remove.
7878 (regcache::cooked_read_signed): Remove.
7879 (regcache_cooked_read_unsigned): Update.
7880 (regcache::cooked_read_unsigned): Remove.
7881 (regcache_cooked_write_signed): Update.
7882 (regcache_cooked_write_unsigned): Update.
7883 * regcache.h (regcache) <raw_read_signed>: Remove.
7884 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
7885 <raw_read, raw_write>: New.
7886 <cooked_read_signed, cooked_write_signed>: Remove.
7887 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
7888 <cooked_read, cooked_write>: New.
7889 * sh64-tdep.c (sh64_pseudo_register_read): Update.
7890 (sh64_pseudo_register_write): Update.
7891
7892 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
7893
7894 * arc-tdep.c (arc_disassembler_options): New variable.
7895 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
7896 of default_print_insn.
7897 (arc_delayed_print_insn): Set info->section when needed,
7898 use default_print_insn to retrieve a disassembler.
7899
7900 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
7901
7902 PR gdb/21574
7903 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
7904 to mention $SHELL and startup-with-shell.
7905
7906 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
7907
7908 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
7909
7910 2017-06-14 Yao Qi <yao.qi@linaro.org>
7911
7912 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
7913 default_print_insn instead of print_insn_aarch64.
7914 * arm-tdep.c (gdb_print_insn_arm): Call
7915 default_print_insn instead of print_insn_big_arm
7916 and print_insn_little_arm.
7917 * i386-tdep.c (i386_print_insn): Call default_print_insn
7918 instead of print_insn_i386.
7919 * ia64-tdep.c (ia64_print_insn): Call
7920 default_print_insn instead of print_insn_ia64.
7921 * mips-tdep.c (gdb_print_insn_mips): Call
7922 default_print_insn instead of print_insn_big_mips
7923 and print_insn_little_mips.
7924 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
7925 instead of print_insn_spu.
7926
7927 2017-06-14 Pedro Alves <palves@redhat.com>
7928
7929 * ada-lang.c: Include "common/byte-vector.h".
7930 (ada_value_primitive_packed_val): Use gdb::byte_vector.
7931 * charset.c (wchar_iterator::iterate): Resize the vector instead
7932 of reserving it.
7933 * common/byte-vector.h: Include "common/def-vector.h".
7934 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
7935 * cli/cli-dump.c: Include "common/byte-vector.h".
7936 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
7937 * common/byte-vector.h: New file.
7938 * common/def-vector.h: New file.
7939 * common/default-init-alloc.h: New file.
7940 * dwarf2loc.c: Include "common/byte-vector.h".
7941 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
7942 instead of reserving it.
7943 * dwarf2read.c: Include "common/byte-vector.h".
7944 (data_buf::m_vec): Now a gdb::byte_vector.
7945 * gdb_regex.c: Include "common/def-vector.h".
7946 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
7947 * mi/mi-main.c: Include "common/byte-vector.h".
7948 (mi_cmd_data_read_memory): Use gdb::byte_vector.
7949 * printcmd.c: Include "common/byte-vector.h".
7950 (print_scalar_formatted): Use gdb::byte_vector.
7951 * valprint.c: Include "common/byte-vector.h".
7952 (maybe_negate_by_bytes, print_decimal_chars): Use
7953 gdb::byte_vector.
7954
7955 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7956
7957 * darwin-nat.c: Include "nat/fork-inferior.h".
7958
7959 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7960
7961 * configure.nat: Factor out Darwin bits that are not
7962 architecture-specific. Add fork-inferior.o.
7963
7964 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
7965
7966 * configure.nat: Factor out AIX bits that are not
7967 architecture-specific. Add fork-inferior.o.
7968
7969 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7970
7971 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
7972 (read_pieced_value, write_pieced_value): ...here. Reduce to
7973 wrappers that just call rw_pieced_value.
7974
7975 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7976
7977 * dwarf2loc.c (write_pieced_value): When writing the data for a
7978 memory piece, use write_memory_with_notification instead of
7979 write_memory.
7980
7981 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7982
7983 * valops.c (read_value_memory): Change embedded_offset to
7984 represent a bit offset instead of a byte offset.
7985 * value.h (read_value_memory): Adjust comment.
7986
7987 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7988
7989 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
7990 dest_offset_bits and source_offset_bits.
7991 (write_pieced_value): Likewise.
7992
7993 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7994
7995 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
7996 given by DW_OP_bit_piece.
7997 (write_pieced_value): Likewise.
7998
7999 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8000
8001 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
8002 some other preparations to the places where sufficient information
8003 is available.
8004 (write_pieced_value): Likewise.
8005
8006 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8007
8008 * dwarf2loc.c (bits_to_bytes): New function.
8009 (read_pieced_value): Fix offset calculations for register pieces
8010 on big-endian targets.
8011 (write_pieced_value): Likewise.
8012
8013 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8014
8015 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
8016 (write_pieced_value): Likewise.
8017
8018 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8019
8020 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
8021 transfer the source value's least significant bits, instead of its
8022 lowest-addressed ones. Rename type_len to max_offset.
8023 (read_pieced_value): Mirror above changes to write_pieced_value as
8024 applicable.
8025
8026 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8027
8028 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
8029 truncate full bytes from dest_offset_bits before using it as an
8030 offset into the buffer.
8031
8032 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8033
8034 * dwarf2loc.c (write_pieced_value): Include transfer size in
8035 byte-wise check.
8036
8037 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8038
8039 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
8040 calculation of this_size.
8041
8042 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8043
8044 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
8045 when targeting a bit-field.
8046 (write_pieced_value): Likewise.
8047
8048 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8049
8050 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
8051 (allocate_piece_closure): Drop addr_size parameter.
8052 (dwarf2_evaluate_loc_desc_full): Adjust call to
8053 allocate_piece_closure.
8054
8055 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8056
8057 PR gdb/21226
8058 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
8059 the LSB end, independent of endianness.
8060
8061 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8062
8063 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
8064 size capping.
8065
8066 2017-06-13 Yao Qi <yao.qi@linaro.org>
8067
8068 * mips-linux-nat.c: Move include features/mips*-linux.c to
8069 mips-linux-tdep.c.
8070 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
8071 to mips-linux-tdep.c.
8072 * mips-linux-tdep.c: Include features/mips*-linux.c
8073 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
8074 functions.
8075 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
8076 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
8077 (tdesc_mips64_dsp_linux): Declare.
8078
8079 2017-06-12 Tom Tromey <tom@tromey.com>
8080
8081 * valprint.h (val_print_type_code_int): Remove.
8082 * valprint.c (generic_val_print_int): Always call
8083 val_print_scalar_formatted.
8084 (val_print_type_code_int): Remove.
8085 * printcmd.c (print_scalar_formatted): Handle options->format==0.
8086 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
8087 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
8088 * ada-valprint.c (ada_val_print_num): Use
8089 val_print_scalar_formatted.
8090
8091 2017-06-12 Tom Tromey <tom@tromey.com>
8092
8093 * printcmd.c (print_scalar_formatted): Unify the two switches.
8094 Don't convert scalars to LONGEST.
8095
8096 2017-06-12 Tom Tromey <tom@tromey.com>
8097
8098 PR exp/16225:
8099 * valprint.h (print_decimal_chars): Update.
8100 * valprint.c (maybe_negate_by_bytes): New function.
8101 (print_decimal_chars): Add "is_signed" argument.
8102 * printcmd.c (print_scalar_formatted): Update.
8103
8104 2017-06-12 Tom Tromey <tom@tromey.com>
8105
8106 PR exp/16225:
8107 * valprint.h (print_binary_chars, print_hex_chars): Update.
8108 * valprint.c (val_print_type_code_int): Update.
8109 (print_binary_chars): Add "zero_pad" argument.
8110 (emit_octal_digit): New function.
8111 (print_octal_chars): Don't zero-pad.
8112 (print_decimal_chars): Likewise.
8113 (print_hex_chars): Add "zero_pad" argument.
8114 * sh64-tdep.c (sh64_do_fp_register): Update.
8115 * regcache.c (regcache::dump): Update.
8116 * printcmd.c (print_scalar_formatted): Update.
8117 * infcmd.c (default_print_one_register_info): Update.
8118
8119 2017-06-12 Pedro Alves <palves@redhat.com>
8120 Alan Hayward <alan.hayward@arm.com>
8121
8122 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
8123 (mips_eabi_push_dummy_call): Rename local 'regsize' to
8124 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
8125 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
8126 Assert that abi_regsize bytes fit in 'ref_valbuf'.
8127
8128 2017-06-12 Pedro Alves <palves@redhat.com>
8129
8130 * dwarf2read.c (mapped_symtab::data): Now a vector of
8131 symtab_index_entry instead of vector of
8132 std::unique_ptr<symtab_index_entry>. All users adjusted to check
8133 whether an element's name is NULL instead of checking whether the
8134 element itself is NULL.
8135 (find_slot): Change return type. Adjust.
8136 (hash_expand, , add_index_entry, uniquify_cu_indices)
8137 (write_hash_table): Adjust.
8138
8139 2017-06-12 Pedro Alves <palves@redhat.com>
8140
8141 * dwarf2read.c (recursively_count_psymbols): New function.
8142 (write_psymtabs_to_index): Call it to compute number of psyms and
8143 pass estimate size of psyms_seen to unordered_set's ctor.
8144
8145 2017-06-12 Pedro Alves <palves@redhat.com>
8146
8147 * dwarf2read.c (write_hash_table): Check if key already exists
8148 before emplacing.
8149
8150 2017-06-12 Pedro Alves <palves@redhat.com>
8151
8152 * dwarf2read.c (data_buf::append_space): Rename to...
8153 (data_buf::grow): ... this, and make private. Adjust all callers.
8154 (data_buf::append_uint): New method.
8155 (add_address_entry, write_one_signatured_type)
8156 (write_psymtabs_to_index): Use it.
8157
8158 2017-06-12 Pedro Alves <palves@redhat.com>
8159
8160 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
8161 (file_write (FILE *, const std::vector<Elem>&)): Delete.
8162 (data_buf::file_write): Call ::fwrite directly.
8163
8164 2017-06-12 Pedro Alves <palves@redhat.com>
8165
8166 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
8167 std::vector::erase.
8168
8169 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8170
8171 Code cleanup: C++ify .gdb_index producer.
8172 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
8173 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
8174 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
8175 (create_strtab, add_string): Remove.
8176 (file_write, data_buf): New.
8177 (struct symtab_index_entry): Use std::vector for cu_indices.
8178 (struct mapped_symtab): Use std::vector for data.
8179 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
8180 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
8181 Remove.
8182 (find_slot): Change return type. Update it to the new data structures.
8183 (hash_expand, add_index_entry): Update it to the new data structures.
8184 (offset_type_compare): Remove.
8185 (uniquify_cu_indices): Update it to the new data structures.
8186 (c_str_view, c_str_view_hasher, vector_hasher): New.
8187 (add_indices_to_cpool): Remove.
8188 (write_hash_table): Update it to the new data structures.
8189 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
8190 (eq_psymtab_cu_index): Remove.
8191 (psym_index_map): New typedef.
8192 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
8193 reference and std::unordered_map for cu_index_htab.
8194 (add_address_entry, add_address_entry_worker, write_address_map)
8195 (write_psymbols): Update it to the new data structures.
8196 (write_obstack): Remove.
8197 (struct signatured_type_index_data): Change types_list to a data_buf
8198 reference and psyms_seen to a std::unordered_set reference.
8199 (write_one_signatured_type, recursively_write_psymbols)
8200 (write_psymtabs_to_index): Update it to the new data structures.
8201
8202 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
8203
8204 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
8205 separate-debug-file commands.
8206 * symfile.h (separate_debug_file_debug): New global.
8207 * symfile.c (separate_debug_file_debug): New global.
8208 (separate_debug_file_exists, find_separate_debug_file): Add
8209 debug output.
8210 (_initialize_symfile): Add "set debug separate-debug-file"
8211 command.
8212 * build-id.c (build_id_to_debug_bfd,
8213 find_separate_debug_file_by_buildid): Add debug output.
8214
8215 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
8216
8217 * gdbarch.sh (displaced_step_free_closure): Remove.
8218 * gdbarch.h, gdbarch.c: Re-generate.
8219 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
8220 displaced_step_free_closure.
8221 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
8222 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
8223 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
8224 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
8225 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
8226 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8227 * arch-utils.h (simple_displaced_step_free_closure): Remove.
8228 * arch-utils.c (simple_displaced_step_free_closure): Remove.
8229 * infrun.c (displaced_step_clear): Call xfree instead of
8230 gdbarch_displaced_step_free_closure.
8231
8232 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
8233
8234 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
8235 NULL".
8236
8237 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8238
8239 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
8240 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
8241 (mn10300_push_dummy_call): Likewise.
8242
8243 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8244
8245 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
8246
8247 2017-06-08 Alan Hayward <alan.hayward@arm.com>
8248
8249 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
8250
8251 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8252
8253 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
8254 able to start inferiors using a shell.
8255 (New remote packets): Announce new packet "QStartupWithShell".
8256 * remote.c: Add PACKET_QStartupWithShell.
8257 (extended_remote_create_inferior): Handle new
8258 PACKET_QStartupWithShell.
8259 (remote_protocol_features) <QStartupWithShell>: New entry for
8260 PACKET_QStartupWithShell.
8261 (_initialize_remote): Call "add_packet_config_cmd" for
8262 QStartupShell.
8263
8264 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8265 Pedro Alves <palves@redhat.com>
8266
8267 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
8268 and "nat/fork-inferior.h".
8269 * common/common-inferior.h: New file, with contents from
8270 "gdb/inferior.h".
8271 * commom/common-utils.c: Include "common-utils.h".
8272 (stringify_argv): New function.
8273 * common/common-utils.h (stringify_argv): New prototype.
8274 * configure.nat: Add "fork-inferior.o" as a dependency for
8275 "*linux*", "fbsd*" and "nbsd*" hosts.
8276 * corefile.c (get_exec_file): Update comment.
8277 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
8278 instead of "startup_inferior".
8279 (darwin_create_inferior): Call "add_thread_silent" after
8280 "fork_inferior".
8281 * fork-child.c: Cleanup unnecessary includes.
8282 (SHELL_FILE): Move to "common/common-fork-child.c".
8283 (environ): Likewise.
8284 (exec_wrapper): Initialize.
8285 (get_exec_wrapper): New function.
8286 (breakup_args): Move to "common/common-fork-child.c"; rename to
8287 "breakup_args_for_exec".
8288 (escape_bang_in_quoted_argument): Move to
8289 "common/common-fork-child.c".
8290 (saved_ui): New variable.
8291 (prefork_hook): New function.
8292 (postfork_hook): Likewise.
8293 (postfork_child_hook): Likewise.
8294 (gdb_startup_inferior): Likewise.
8295 (fork_inferior): Move to "common/common-fork-child.c". Update
8296 function to support gdbserver.
8297 (startup_inferior): Likewise.
8298 * gdbcore.h (get_exec_file): Remove declaration.
8299 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
8300 instead of "startup_inferior". Call "add_thread_silent" after
8301 "fork_inferior".
8302 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
8303 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
8304 instead of "startup_inferior". Call "add_thread_silent" after
8305 "fork_inferior".
8306 * inferior.h: Include "common-inferior.h".
8307 (trace_start_error): Move to "common/common-utils.h".
8308 (trace_start_error_with_name): Likewise.
8309 (fork_inferior): Move prototype to "nat/fork-inferior.h".
8310 (startup_inferior): Likewise.
8311 (gdb_startup_inferior): New prototype.
8312 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
8313 * nat/fork-inferior.h: New file.
8314 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
8315 instead of "startup_inferior". Call "add_thread_silent" after
8316 "fork_inferior".
8317 * target.h (target_terminal_init): Move prototype to
8318 "target/target.h".
8319 (target_terminal_inferior): Likewise.
8320 (target_terminal_ours): Likewise.
8321 * target/target.h (target_terminal_init): New prototype, moved
8322 from "target.h".
8323 (target_terminal_inferior): Likewise.
8324 (target_terminal_ours): Likewise.
8325 * utils.c (gdb_flush_out_err): New function.
8326
8327 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8328
8329 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
8330 * common/common-gdbthread.h: New file, with parts from
8331 "gdb/gdbthread.h".
8332 * gdbthread.h: Include "common-gdbthread.h".
8333 (switch_to_thread): Moved to "common/common-gdbthread.h".
8334
8335 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
8336
8337 * Makefile.in (SFILES): Add "common/job-control.c".
8338 (HFILES_NO_SRCDIR): Add "common/job-control.h".
8339 (COMMON_OBS): Add "job-control.o".
8340 * common/job-control.c: New file, with contents from
8341 "gdb/inflow.c".
8342 * common/job-control.h: New file, with contents from "terminal.h".
8343 * fork-child.c: Include "job-control.h".
8344 * inflow.c: Include "job-control.h".
8345 (gdb_setpgid): Move to "common/common-inflow.c".
8346 (_initialize_inflow): Move setting of "job_control" to
8347 "handle_job_control".
8348 * terminal.h (job_control): Moved to "common/common-terminal.h".
8349 (gdb_setpgid): Likewise.
8350 * top.c: Include "job_control.h".
8351 * utils.c: Likewise.
8352 (job_control): Moved to "job-control.c".
8353
8354 2017-06-07 Pedro Alves <palves@redhat.com>
8355
8356 * Makefile.in (SFILES): Add gdb_regex.c.
8357 (COMMON_OBS): Add gdb_regex.o.
8358 * ada-lang.c (ada_add_standard_exceptions)
8359 (ada_add_exceptions_from_frame, name_matches_regex)
8360 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
8361 parameter type to compiled_regex. Adjust.
8362 (ada_exceptions_list): Use compiled_regex.
8363 * break-catch-throw.c (exception_catchpoint::pattern): Now a
8364 std::unique_ptr<compiled_regex>.
8365 (exception_catchpoint::~exception_catchpoint): Remove regfree
8366 call.
8367 (check_status_exception_catchpoint): Adjust to use compiled_regex.
8368 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
8369 * breakpoint.c (solib_catchpoint::compiled): Now a
8370 std::unique_ptr<compiled_regex>.
8371 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
8372 (check_status_catch_solib): Adjust to use compiled_regex.
8373 (add_solib_catchpoint): Adjust to use compiled_regex.
8374 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
8375 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
8376 compiled_regex reference. Adjust to use it.
8377 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
8378 declaration. Include "gdb_regex.h".
8379 (apropos_cmd): Change regex parameter to compiled_regex reference.
8380 * gdb_regex.c: New file.
8381 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
8382 declarations.
8383 (class compiled_regex): New.
8384 * linux-tdep.c: Include "common/gdb_optional.h".
8385 (struct mapping_regexes): New, factored out from
8386 mapping_is_anonymous_p, and adjusted to use compiled_regex.
8387 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
8388 gdb::optional and remove cleanups. Adjust to compiled_regex.
8389 * probe.c: Include "common/gdb_optional.h".
8390 (collect_probes): Use compiled_regex and gdb::optional and remove
8391 cleanups.
8392 * skip.c: Include "common/gdb_optional.h".
8393 (skiplist_entry::compiled_function_regexp): Now a
8394 gdb::optional<compiled_regex>.
8395 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
8396 (free_skiplist_entry): Remove regfree call.
8397 (compile_skip_regexp, skip_rfunction_p): Adjust to use
8398 compiled_regex and gdb::optional.
8399 * symtab.c: Include "common/gdb_optional.h".
8400 (search_symbols): Use compiled_regex and gdb::optional.
8401 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
8402 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
8403 to gdb_regex.c.
8404
8405 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8406
8407 * regcache.c (regcache::save): Avoid buffer use.
8408 (regcache::dump): Likewise.
8409
8410 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8411
8412 * sh-tdep.c (sh_pseudo_register_read): Remove
8413 MAX_REGISTER_SIZE.
8414 (sh_pseudo_register_write): Likewise.
8415 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
8416 (sh64_pseudo_register_write): Likewise
8417
8418 2017-06-07 Alan Hayward <alan.hayward@arm.com>
8419
8420 * aarch64-tdep.c (aarch64_store_return_value): Use
8421 V_REGISTER_SIZE.
8422 (aarch64_pseudo_read_value): Likewise.
8423 (aarch64_pseudo_write): Likewise.
8424
8425 2017-06-06 Yao Qi <yao.qi@linaro.org>
8426
8427 * regformats/regdef.h (set_register_cache): Remove the
8428 declaration.
8429
8430 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8431
8432 * frame.c (frame_unwind_register_signed): Use
8433 frame_unwind_register_value.
8434
8435 2017-06-06 Pedro Alves <palves@redhat.com>
8436
8437 PR breakpoints/21553
8438 * breakpoint.c (create_breakpoints_sal_default)
8439 (init_breakpoint_sal, create_breakpoint_sal): Use
8440 gdb::unique_xmalloc_ptr for string parameters.
8441 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8442 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
8443 (base_breakpoint_create_breakpoints_sal)
8444 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
8445 (strace_marker_create_breakpoints_sal)
8446 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
8447 string parameters.
8448 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
8449 gdb::unique_xmalloc_ptr for string parameters.
8450 (create_breakpoint): Constify 'extra_string' and 'cond_string'
8451 parameters.
8452
8453 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8454
8455 * alpha-tdep.c (alpha_register_to_value): Use
8456 get_frame_register_value.
8457 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
8458
8459 2017-06-06 Alan Hayward <alan.hayward@arm.com>
8460
8461 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
8462 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
8463 (ia64_value_to_register): Likewise.
8464 (ia64_extract_return_value): Likewise.
8465 (ia64_store_return_value): Likewise.
8466 (ia64_push_dummy_call): Likewise.
8467
8468 2017-06-04 Joel Brobecker <brobecker@adacore.com>
8469
8470 GDB 8.0 released.
8471
8472 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
8473
8474 * x86-linux-nat.c (struct arch_lwp_info): Remove.
8475
8476 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
8477
8478 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
8479 parameter.
8480 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
8481
8482 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
8483
8484 * event-loop.c (poll_timers): Unallocate timer using delete
8485 instead of xfree.
8486
8487 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8488
8489 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
8490 (struct breakpoint) <~breakpoint>: New.
8491 (struct watchpoint): Inherit from breakpoint.
8492 <~watchpoint>: New.
8493 <base>: Remove.
8494 (struct tracepoint): Inherit from breakpoint.
8495 <base>: Remove.
8496 * breakpoint.c (longjmp_breakpoint_ops): Remove.
8497 (struct longjmp_breakpoint): Inherit from breakpoint.
8498 <~longjmp_breakpoint>: New.
8499 <base>: Remove.
8500 (new_breakpoint_from_type): Remove casts.
8501 (watchpoint_in_thread_scope): Remove reference to base field.
8502 (watchpoint_del_at_next_stop): Likewise.
8503 (update_watchpoint): Likewise.
8504 (watchpoint_check): Likewise.
8505 (bpstat_check_watchpoint): Likewise.
8506 (set_longjmp_breakpoint): Likewise.
8507 (struct fork_catchpoint): Inherit from breakpoint.
8508 <base>: Remove.
8509 (struct solib_catchpoint): Inherit from breakpoint.
8510 <~solib_catchpoint>: New.
8511 <base>: Remove.
8512 (dtor_catch_solib): Change to ...
8513 (solib_catchpoint::~solib_catchpoint): ... this.
8514 (breakpoint_hit_catch_solib): Remove reference to base field.
8515 (add_solib_catchpoint): Likewise.
8516 (create_fork_vfork_event_catchpoint): Likewise.
8517 (struct exec_catchpoint): Inherit from breakpoint.
8518 <~exec_catchpoint>: New.
8519 <base>: Remove.
8520 (dtor_catch_exec): Change to ...
8521 (exec_catchpoint::~exec_catchpoint): ... this.
8522 (dtor_watchpoint): Change to ...
8523 (watchpoint::~watchpoint): ... this.
8524 (watch_command_1): Remove reference to base field.
8525 (catch_exec_command_1): Likewise.
8526 (base_breakpoint_dtor): Change to ...
8527 (breakpoint::~breakpoint): ... this.
8528 (base_breakpoint_ops): Remove dtor field value.
8529 (longjmp_bkpt_dtor): Change to ...
8530 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
8531 (strace_marker_create_breakpoints_sal): Remove reference to base
8532 field.
8533 (delete_breakpoint): Don't manually call breakpoint destructor.
8534 (create_tracepoint_from_upload): Remove reference to base field.
8535 (trace_pass_set_count): Likewise.
8536 (initialize_breakpoint_ops): Don't initialize
8537 momentary_breakpoint_ops, don't set dtors.
8538 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
8539 <~ada_catchpoint>: New.
8540 <base>: Remove.
8541 (create_excep_cond_exprs): Remove reference to base field.
8542 (dtor_exception): Change to ...
8543 (ada_catchpoint::~ada_catchpoint): ... this.
8544 (dtor_catch_exception): Remove.
8545 (dtor_catch_exception_unhandled): Remove.
8546 (dtor_catch_assert): Remove.
8547 (create_ada_exception_catchpoint): Remove reference to base
8548 field.
8549 (initialize_ada_catchpoint_ops): Don't set dtors.
8550 * break-catch-sig.c (struct signal_catchpoint): Inherit from
8551 breakpoint.
8552 <~signal_catchpoint>: New.
8553 <base>: Remove.
8554 (signal_catchpoint_dtor): Change to ...
8555 (signal_catchpoint::~signal_catchpoint): ... this.
8556 (create_signal_catchpoint): Remove reference to base field.
8557 (initialize_signal_catchpoint_ops): Don't set dtor.
8558 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
8559 from breakpoint.
8560 <~syscall_catchpoint>: New.
8561 <base>: Remove.
8562 (dtor_catch_syscall): Change to ...
8563 (syscall_catchpoint::~syscall_catchpoint): ... this.
8564 (create_syscall_event_catchpoint): Remove reference to base
8565 field.
8566 (initialize_syscall_catchpoint_ops): Don't set dtor.
8567 * break-catch-throw.c (struct exception_catchpoint): Inherit
8568 from breakpoint.
8569 <~exception_catchpoint>: New.
8570 <base>: Remove.
8571 (dtor_exception_catchpoint): Change to ...
8572 (exception_catchpoint::~exception_catchpoint): ... this.
8573 (handle_gnu_v3_exceptions): Remove reference to base field.
8574 (initialize_throw_catchpoint_ops): Don't set dtor.
8575 * ctf.c (ctf_get_traceframe_address): Remove reference to base
8576 field.
8577 * remote.c (remote_get_tracepoint_status): Likewise.
8578 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
8579 * tracefile.c (tracefile_fetch_registers): Likewise.
8580 * tracepoint.c (actions_command): Likewise.
8581 (validate_actionline): Likewise.
8582 (tfind_1): Likewise.
8583 (get_traceframe_location): Likewise.
8584 (find_matching_tracepoint_location): Likewise.
8585 (parse_tracepoint_status): Likewise.
8586 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
8587
8588 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8589
8590 * breakpoint.c (struct longjmp_breakpoint): New struct.
8591 (is_tracepoint_type): Change return type to bool.
8592 (is_longjmp_type): New function.
8593 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
8594 (set_raw_breakpoint_without_location): Use
8595 new_breakpoint_from_type.
8596 (set_raw_breakpoint): Likewise.
8597
8598 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
8599
8600 * breakpoint.c (new_breakpoint_from_type): New function.
8601 (create_breakpoint_sal): Use new_breakpoint_from_type and
8602 unique_ptr.
8603 (create_breakpoint): Likewise.
8604
8605 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
8606
8607 * memattr.c (mem_info_command): Rename to ...
8608 (info_mem_command): ... this.
8609 (mem_enable_command): Rename to ...
8610 (enable_mem_command): ... this.
8611 (mem_disable_command): Rename to ...
8612 (disable_mem_command): ... this.
8613 (mem_delete_command): Rename to ...
8614 (delete_mem_command): ... this.
8615 (_initialize_mem): Adjust function names.
8616
8617 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8618
8619 * btrace.c (handle_pt_insn_events): New.
8620 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
8621 STATUS. Split into this and ...
8622 (handle_pt_insn_event_flags): ... this.
8623
8624 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
8625
8626 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
8627 and struct pt_insn.resynced.
8628 * configure: Regenerated.
8629 * config.in: Regenerated.
8630
8631 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8632
8633 * btrace.c (ftrace_find_call_by_number): New function.
8634 (ftrace_new_function): Store objects, not pointers.
8635 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
8636 ftrace_new_gap, ftrace_update_function,
8637 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
8638 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
8639 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
8640 btrace_ends_with_single_insn, btrace_call_get): Account for
8641 btrace_thread_info::functions now storing objects.
8642 * btrace.h (struct btrace_thread_info): Add constructor.
8643 (struct btrace_thread_info) <functions>: Make std::vector.
8644 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
8645 Initialize with default values.
8646 * record-btrace.c (record_btrace_frame_sniffer): Account for
8647 btrace_thread_info::functions now storing objects.
8648
8649 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8650
8651 * btrace.c: Remove typedef bfun_s.
8652 (ftrace_new_gap): Directly add gaps to the list of gaps.
8653 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
8654 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
8655 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
8656 instead of gdb VEC.
8657
8658 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8659
8660 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
8661 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
8662 with btrace_thread_info::next_segment and
8663 btrace_thread_info::prev_segment.
8664 * btrace.h: Remove struct btrace_func_link.
8665 (struct btrace_function): Replace pair of function segment pointers
8666 with pair of indices.
8667 * python/py-record-btrace.c (btpy_call_prev_sibling,
8668 btpy_call_next_sibling): Replace references to
8669 btrace_thread_info::segment with btrace_thread_info::next_segment and
8670 btrace_thread_info::prev_segment.
8671 * record-btrace.c (record_btrace_frame_this_id): Use
8672 btrace_find_call_by_number.
8673
8674 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8675
8676 * btrace.c (ftrace_new_function, ftrace_fixup_level,
8677 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
8678 btrace_insn_next, btrace_insn_prev): Remove references to
8679 btrace_thread_info::flow.
8680 * btrace.h (struct btrace_function): Remove FLOW.
8681
8682 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8683
8684 * btrace.c (ftrace_find_call_by_number): New function.
8685 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
8686 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
8687 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
8688 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
8689 index.
8690 * btrace.h (struct btrace_function): Turn UP into an index.
8691 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
8692 as an index.
8693 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
8694 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
8695 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
8696
8697 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8698
8699 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8700 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8701 ftrace_update_function, ftrace_compute_global_level_offset,
8702 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
8703 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
8704 btrace_insn_end, btrace_is_empty): Remove references to
8705 btrace_thread_info::begin and btrace_thread_info::end.
8706 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
8707 (struct btrace_thread_info) <functions>: Adjust comment.
8708 * record-btrace.c (record_btrace_start_replaying): Remove reference to
8709 btrace_thread_info::begin.
8710
8711 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8712
8713 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
8714 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
8715 ftrace_update_function): Remove arguments that implicitly were always
8716 BTINFO->END.
8717 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
8718 Don't pass BTINFO->END.
8719
8720 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8721
8722 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
8723 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
8724 btrace_find_insn_by_number): Replace function segment pointer with
8725 index.
8726 (btrace_insn_cmp): Simplify.
8727 * btrace.h: (struct btrace_insn_iterator) Rename index to
8728 insn_index. Replace function segment pointer with index into function
8729 segment vector.
8730 * record-btrace.c (record_btrace_call_history): Replace function
8731 segment pointer use with index.
8732 (record_btrace_frame_sniffer): Retrieve function call segment through
8733 vector.
8734 (record_btrace_set_replay): Remove defunc't safety check.
8735
8736 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8737
8738 * btrace.c (btrace_ends_with_single_insn): New function.
8739 (btrace_call_get, btrace_call_number, btrace_call_begin,
8740 btrace_call_end, btrace_call_next, btrace_call_prev,
8741 btrace_find_call_by_number): Use index into call segment vector
8742 instead of pointer.
8743 (btrace_call_cmp): Simplify.
8744 * btrace.h (struct btrace_call_iterator): Replace function call segment
8745 pointer with index into vector.
8746 * record-btrace.c (record_btrace_call_history): Use index instead of
8747 pointer.
8748
8749 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8750
8751 * btrace.c (btrace_insn_begin, btrace_insn_end,
8752 btrace_find_insn_by_number): Add btinfo to iterator.
8753 * btrace.h (struct btrace_insn_iterator): Add btinfo.
8754
8755 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8756
8757 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
8758 and save pointers directly.
8759 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
8760 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
8761 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
8762 changed signature of functions.
8763 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
8764 (btrace_fetch): Remove code that adds btrace_function pointers to
8765 vector of btrace_functions.
8766 (btrace_clear): Simplify freeing vector of btrace_functions.
8767
8768 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
8769
8770 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
8771 Replace VEC_* with std::vector functions.
8772 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
8773 (struct btrace_thread_info)<functions>: Change type to std::vector.
8774
8775 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
8776
8777 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
8778 "Removed targets and native configurations" up. Merge duplicate
8779 "New commands" sub-sections. Add "New options" sub-sections.
8780
8781 2017-05-26 Alan Hayward <alan.hayward@arm.com>
8782
8783 * defs.h (copy_integer_to_size): New declaration.
8784 * findvar.c (copy_integer_to_size): New function.
8785 (do_cint_test): New selftest function.
8786 (copy_integer_to_size_test): Likewise.
8787 (_initialize_findvar): Likewise.
8788 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
8789 (mips_fbsd_collect_reg): Use raw_collect_integer.
8790 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
8791 (mips64_fill_gregset): Use raw_collect_integer
8792 (mips64_fill_fpregset): Use raw_supply_integer.
8793 * regcache.c (regcache::raw_supply_integer): New function.
8794 (regcache::raw_collect_integer): Likewise.
8795 * regcache.h: (regcache::raw_supply_integer): New declaration.
8796 (regcache::raw_collect_integer): Likewise.
8797
8798 2017-05-24 Yao Qi <yao.qi@linaro.org>
8799
8800 * Makefile.in (SFILES): Add gdbarch-selftests.c.
8801 (COMMON_OBS): Add gdbarch-selftests.o.
8802 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
8803 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
8804 * gdbarch-selftests.c: New file.
8805 * regcache.h (regcache) <~regcache>: Mark it virtual if
8806 GDB_SELF_TEST.
8807 <raw_write>: Likewise.
8808
8809 2017-05-24 Yao Qi <yao.qi@linaro.org>
8810
8811 * regcache.c (current_regcache): Change it to
8812 regcache::current_regcache.
8813 (regcache_observer_target_changed): Update.
8814 (regcache_thread_ptid_changed): Make it a regcache static
8815 method.
8816 (regcache_thread_ptid_changed): Update.
8817 (class regcache_access): New.
8818 (current_regcache_test): Update.
8819 (_initialize_regcache): Update.
8820 * regcache.h: Include forward_list.
8821 (regcache): Declare regcache_thread_ptid_changed and declare
8822 registers_changed_ptid as friend.
8823
8824 2017-05-24 Yao Qi <yao.qi@linaro.org>
8825
8826 * i387-tdep.c (i387_register_to_value): Use register_size
8827 instead of TYPE_LENGTH.
8828 * m68k-tdep.c (m68k_register_to_value): Likewise.
8829
8830 2017-05-24 Yao Qi <yao.qi@linaro.org>
8831
8832 * i387-tdep.c (i387_convert_register_p): Return false if type
8833 code isn't TYPE_CODE_FLT.
8834
8835 2017-05-24 Yao Qi <yao.qi@linaro.org>
8836
8837 * alpha-tdep.c (alpha_convert_register_p): Return true if type
8838 length is 4.
8839 (alpha_register_to_value): Remove type length check.
8840 (alpha_value_to_register): Likewise.
8841
8842 2017-05-24 Yao Qi <yao.qi@linaro.org>
8843
8844 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
8845 TYPE_CODE_FLT.
8846
8847 2017-05-24 Yao Qi <yao.qi@linaro.org>
8848
8849 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
8850 TYPE_CODE_FLT or not.
8851
8852 2017-05-24 Yao Qi <yao.qi@linaro.org>
8853
8854 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
8855 * avr-tdep.c (avr_gdbarch_init): Likewise.
8856 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8857 * cris-tdep.c (cris_gdbarch_init): Likewise.
8858 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8859 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8860 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8861 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
8862 * mep-tdep.c (mep_gdbarch_init): Likewise.
8863 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8864 * mips-tdep.c (mips_gdbarch_init): Likewise.
8865 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8866 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8867 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8868 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8869 * v850-tdep.c (v850_gdbarch_init): Likewise.
8870
8871 2017-05-24 Yao Qi <yao.qi@linaro.org>
8872
8873 * selftest-arch.c (tests_with_arch): Call registers_changed
8874 and reinit_frame_cache.
8875 * selftest.c (run_self_tests): Likewise.
8876
8877 2017-05-24 Yao Qi <yao.qi@linaro.org>
8878
8879 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
8880 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
8881
8882 2017-05-24 Yao Qi <yao.qi@linaro.org>
8883
8884 * rl78-tdep.c (rl78_gdbarch_init): Don't call
8885 set_gdbarch_print_insn.
8886
8887 2017-05-24 Yao Qi <yao.qi@linaro.org>
8888
8889 * h8300-tdep.c (h8300_gdbarch_init): Don't call
8890 set_gdbarch_print_insn.
8891
8892 2017-05-24 Yao Qi <yao.qi@linaro.org>
8893
8894 * alpha-tdep.c (alpha_gdbarch_init): Don't call
8895 set_gdbarch_print_insn.
8896 * arc-tdep.c (arc_gdbarch_init): Likewise.
8897 * arch-utils.c: include dis-asm.h.
8898 (default_print_insn): New function.
8899 * arch-utils.h (default_print_insn): Declare.
8900 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
8901 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
8902 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
8903 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
8904 * frv-tdep.c (frv_gdbarch_init): Likewise.
8905 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
8906 * gdbarch.sh (print_insn): Use default_print_insn.
8907 * gdbarch.c: Regenerated.
8908 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
8909 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
8910 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
8911 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
8912 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
8913 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
8914 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
8915 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
8916 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
8917 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
8918 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
8919 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
8920 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
8921 * mt-tdep.c (mt_gdbarch_init): Likewise.
8922 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
8923 * nios2-tdep.c (nios2_print_insn): Remove.
8924 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
8925 * rx-tdep.c (rx_gdbarch_init): Likewise.
8926 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
8927 * score-tdep.c (score_print_insn): Remove.
8928 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
8929 * sh-tdep.c (sh_gdbarch_init): Likewise.
8930 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
8931 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
8932 * tic6x-tdep.c (tic6x_print_insn): Remove.
8933 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
8934 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
8935 * v850-tdep.c (v850_gdbarch_init): Likewise.
8936 * vax-tdep.c (vax_gdbarch_init): Likewise.
8937 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
8938 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
8939
8940 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8941
8942 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
8943 (MIPS_FP0_REGNUM): Remove.
8944 (MIPS_FSR_REGNUM): Remove.
8945 (mips_fbsd_supply_fpregs): Use mips_regnum.
8946 (mips_fbsd_supply_gregs): Likewise.
8947 (mips_fbsd_collect_fpregs): Likewise.
8948 (mips_fbsd_collect_gregs): Likewise.
8949
8950 2017-05-23 John Baldwin <jhb@FreeBSD.org>
8951
8952 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
8953 (getpfpregs_supplies): New function.
8954 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
8955 getfpregs_supplies.
8956 (mips_fbsd_store_inferior_registers): Likewise.
8957
8958 2017-05-22 Pedro Alves <palves@redhat.com>
8959
8960 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
8961 maintainer.
8962
8963 2017-05-22 Alan Hayward <alan.hayward@arm.com>
8964
8965 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
8966 (store_register): Likewise.
8967 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
8968 (get_decimal_float_return_value): Likewise.
8969 (do_ppc_sysv_return_value): Likewise.
8970 (ppc64_sysv_abi_push_integer): Likewise.
8971 (ppc64_sysv_abi_push_freg): Likewise.
8972 (ppc64_sysv_abi_return_value_base): Likewise.
8973 (ppc64_sysv_abi_return_value): Likewise.
8974 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
8975 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
8976 * rs6000-nat.c: Likewise.
8977 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
8978 (rs6000_value_to_register): Likewise.
8979 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
8980
8981 2017-05-21 Tom Tromey <tom@tromey.com>
8982
8983 PR rust/21466:
8984 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
8985 arrays as "[T]", not "[T; ]".
8986
8987 2017-05-19 Tom Tromey <tom@tromey.com>
8988
8989 PR rust/21484:
8990 * rust-lang.c (exp_descriptor_rust): New function.
8991 (rust_language_defn): Use it.
8992 * p-lang.c (pascal_language_defn): Update.
8993 * opencl-lang.c (opencl_language_defn): Update.
8994 * objc-lang.c (objc_language_defn): Update.
8995 * m2-lang.c (m2_language_defn): Update.
8996 * language.h (struct language_defn)
8997 <la_watch_location_expression>: New member.
8998 * language.c (unknown_language_defn, auto_language_defn)
8999 (local_language_defn): Update.
9000 * go-lang.c (go_language_defn): Update.
9001 * f-lang.c (f_language_defn): Update.
9002 * d-lang.c (d_language_defn): Update.
9003 * c-lang.h (c_watch_location_expression): Declare.
9004 * c-lang.c (c_watch_location_expression): New function.
9005 (c_language_defn, cplus_language_defn, asm_language_defn)
9006 (minimal_language_defn): Use it.
9007 * breakpoint.c (watch_command_1): Call
9008 la_watch_location_expression.
9009 * ada-lang.c (ada_language_defn): Update.
9010
9011 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9012
9013 PR tui/21482
9014 * gdb_curses.h (NOMACROS): Define.
9015 (NCURSES_NOMACROS): Define.
9016
9017 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9018
9019 PR tui/21482
9020 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
9021 arg to char *.
9022 * tui/tui-wingeneral.c (box_win): Likewise.
9023 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
9024 (tui_show_source_line): Likewise.
9025 (tui_show_exec_info_content): Likewise.
9026
9027 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
9028
9029 * sparc-tdep.c (sparc_structure_return_p)
9030 (sparc_arg_on_registers_p): New functions.
9031 (sparc32_store_arguments): Use them.
9032 * sparc64-tdep.c (sparc64_16_byte_align_p)
9033 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
9034 Handle TYPE_CODE_ARRAY.
9035
9036 2017-05-17 Yao Qi <yao.qi@linaro.org>
9037
9038 * cli/cli-decode.c (add_alias_cmd): New function.
9039 * command.h (add_alias_cmd): Declare.
9040 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
9041 instead call add_alias_cmd.
9042
9043 2017-05-17 Pedro Alves <palves@redhat.com>
9044
9045 * Makefile.in (nat_extra_makefile_frag): Rename to ...
9046 (nat_makefile_frag): ... this. All references updated.
9047 * configure.ac: Likewise.
9048 * configure.nat: Likewise. Enhance comments.
9049 * configure: Regenerate.
9050
9051 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9052
9053 * procfs.c (procfs_create_inferior): Change prototype to match
9054 definition.
9055
9056 2017-05-13 Eli Zaretskii <eliz@gnu.org>
9057
9058 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
9059 C++ compiler warning.
9060
9061 2017-05-12 Tom Tromey <tom@tromey.com>
9062
9063 PR rust/21483:
9064 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
9065 recurse, just call value_struct_elt directly.
9066
9067 2017-05-12 Tom Tromey <tom@tromey.com>
9068
9069 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
9070 OP_RUST_ARRAY>: Fix.
9071
9072 2017-05-12 Tom Tromey <tom@tromey.com>
9073
9074 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
9075
9076 2017-05-09 Yao Qi <yao.qi@linaro.org>
9077
9078 * regcache.c: Include <forward_list>.
9079 (struct regcache_list): Remove.
9080 (current_regcache): Update.
9081 (get_thread_arch_aspace_regcache): Update for std::forward_list.
9082 (regcache_thread_ptid_changed): Likewise.
9083 (registers_changed_ptid): Likewise.
9084 (current_regcache_size): Likewise.
9085
9086 2017-05-09 Yao Qi <yao.qi@linaro.org>
9087
9088 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
9089 (current_regcache_size): New function.
9090 (current_regcache_test): New function.
9091 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
9092
9093 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9094
9095 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
9096 (print_gp_register_row): Use get_frame_register_value.
9097
9098 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9099
9100 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
9101 (mips_supply_fpregset): Likewise.
9102 (mips64_supply_gregset): Likewise.
9103
9104 2017-05-08 Alan Hayward <alan.hayward@arm.com>
9105
9106 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
9107 regcache->raw_supply_zeroed.
9108
9109 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9110
9111 * configure.nat: Rearrange 'case' statements to match
9112 host before cpu.
9113
9114 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
9115
9116 * Makefile.in: Remove "@host_makefile_frag@". Add variables
9117 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
9118 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
9119 "@nat_extra_makefile_frag@".
9120 (Makefile): Remove dependency on "@frags@".
9121 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
9122 (data-directory/Makefile): Likewise.
9123 * config/aarch64/linux.mh: Deleted; moved contents to
9124 "gdb/configure.nat".
9125 * config/alpha/alpha-linux.mh: Likewise.
9126 * config/alpha/nbsd.mh: Likewise.
9127 * config/arm/linux.mh: Likewise.
9128 * config/arm/nbsdelf.mh: Likewise.
9129 * config/i386/cygwin.mh: Likewise.
9130 * config/i386/cygwin64.mh: Likewise.
9131 * config/i386/darwin.mh: Likewise.
9132 * config/i386/fbsd.mh: Likewise.
9133 * config/i386/fbsd64.mh: Likewise.
9134 * config/i386/go32.mh: Likewise.
9135 * config/i386/i386gnu.mh: Likewise.
9136 * config/i386/i386sol2.mh: Likewise.
9137 * config/i386/linux.mh: Likewise.
9138 * config/i386/linux64.mh: Likewise.
9139 * config/i386/mingw.mh: Likewise.
9140 * config/i386/mingw64.mh: Likewise.
9141 * config/i386/nbsd64.mh: Likewise.
9142 * config/i386/nbsdelf.mh: Likewise.
9143 * config/i386/nto.mh: Likewise.
9144 * config/i386/obsd.mh: Likewise.
9145 * config/i386/obsd64.mh: Likewise.
9146 * config/i386/sol2-64.mh: Likewise.
9147 * config/ia64/linux.mh: Likewise.
9148 * config/m32r/linux.mh: Likewise.
9149 * config/m68k/linux.mh: Likewise.
9150 * config/m68k/nbsdelf.mh: Likewise.
9151 * config/m68k/obsd.mh: Likewise.
9152 * config/m88k/obsd.mh: Likewise.
9153 * config/mips/fbsd.mh: Likewise.
9154 * config/mips/linux.mh: Likewise.
9155 * config/mips/nbsd.mh: Likewise.
9156 * config/mips/obsd64.mh: Likewise.
9157 * config/pa/linux.mh: Likewise.
9158 * config/pa/nbsd.mh: Likewise.
9159 * config/pa/obsd.mh: Likewise.
9160 * config/powerpc/aix.mh: Likewise.
9161 * config/powerpc/fbsd.mh: Likewise.
9162 * config/powerpc/linux.mh: Likewise.
9163 * config/powerpc/nbsd.mh: Likewise.
9164 * config/powerpc/obsd.mh: Likewise.
9165 * config/powerpc/ppc64-linux.mh: Likewise.
9166 * config/powerpc/spu-linux.mh: Likewise.
9167 * config/s390/linux.mh: Likewise.
9168 * config/sh/nbsd.mh: Likewise.
9169 * config/sparc/fbsd.mh: Likewise.
9170 * config/sparc/linux.mh: Likewise.
9171 * config/sparc/linux64.mh: Likewise.
9172 * config/sparc/nbsd64.mh: Likewise.
9173 * config/sparc/nbsdelf.mh: Likewise.
9174 * config/sparc/obsd64.mh: Likewise.
9175 * config/sparc/sol2.mh: Likewise.
9176 * config/tilegx/linux.mh: Likewise.
9177 * config/vax/nbsdelf.mh: Likewise.
9178 * config/vax/obsd.mh: Likewise.
9179 * config/xtensa/linux.mh: Likewise.
9180 * config/i386/i386gnu.mn: New file, with excerpts from
9181 "config/i386/i386gnu.mh".
9182 * configure: Regenerate.
9183 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
9184 *.mh files under "gdb/config".
9185 * configure.nat: New file, with contents from the
9186 "gdb/config/*/*.mh" files.
9187
9188 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
9189
9190 * btrace.c (btrace_clear): Free insn vector.
9191
9192 2017-05-05 Pedro Alves <palves@redhat.com>
9193
9194 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
9195 * configure: Regenerate.
9196
9197 2017-05-04 Pedro Alves <palves@redhat.com>
9198
9199 * Makefile.in (SFILES): Add progspace-and-thread.c.
9200 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
9201 (COMMON_OBS): Add progspace-and-thread.o.
9202 * breakpoint.c: Include "progspace-and-thread.h".
9203 (update_inserted_breakpoint_locations)
9204 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
9205 Use scoped_restore_current_pspace_and_thread.
9206 (create_std_terminate_master_breakpoint): Use
9207 scoped_restore_current_program_space.
9208 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
9209 (print_breakpoint_location): Use
9210 scoped_restore_current_program_space.
9211 (bp_loc_is_permanent): Use
9212 scoped_restore_current_pspace_and_thread.
9213 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
9214 (download_tracepoint_locations): Use
9215 scoped_restore_current_pspace_and_thread.
9216 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
9217 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
9218 (enum step_over_calls_kind): Moved from inferior.h.
9219 (class scoped_restore_current_thread): New class.
9220 * gdbthread.h (make_cleanup_restore_current_thread): Delete
9221 declaration.
9222 (scoped_restore_current_thread): New class.
9223 * infcmd.c: Include "common/gdb_optional.h".
9224 (continue_1, proceed_after_attach): Use
9225 scoped_restore_current_thread.
9226 (notice_new_inferior): Use scoped_restore_current_thread.
9227 * inferior.c: Include "progspace-and-thread.h".
9228 (restore_inferior, save_current_inferior): Delete.
9229 (add_inferior_command, clone_inferior_command): Use
9230 scoped_restore_current_pspace_and_thread.
9231 * inferior.h (scoped_restore_current_inferior): New class.
9232 * infrun.c: Include "progspace-and-thread.h" and
9233 "common/gdb_optional.h".
9234 (follow_fork_inferior): Use
9235 scoped_restore_current_pspace_and_thread.
9236 (scoped_restore_exited_inferior): New class.
9237 (handle_vfork_child_exec_or_exit): Use
9238 scoped_restore_exited_inferior,
9239 scoped_restore_current_pspace_and_thread,
9240 scoped_restore_current_thread and scoped_restore.
9241 (fetch_inferior_event): Use scoped_restore_current_thread.
9242 * linespec.c (decode_line_full, decode_line_1): Use
9243 scoped_restore_current_program_space.
9244 * mi/mi-main.c: Include "progspace-and-thread.h".
9245 (exec_continue): Use scoped_restore_current_thread.
9246 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
9247 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
9248 * proc-service.c (ps_pglobal_lookup): Use
9249 scoped_restore_current_program_space.
9250 * progspace-and-thread.c: New file.
9251 * progspace-and-thread.h: New file.
9252 * progspace.c (release_program_space, clone_program_space): Use
9253 scoped_restore_current_program_space.
9254 (restore_program_space, save_current_program_space)
9255 (save_current_space_and_thread): Delete.
9256 (switch_to_program_space_and_thread): Moved to
9257 progspace-and-thread.c.
9258 * progspace.h (save_current_program_space)
9259 (save_current_space_and_thread): Delete declarations.
9260 (scoped_restore_current_program_space): New class.
9261 * remote.c (remote_btrace_maybe_reopen): Use
9262 scoped_restore_current_thread.
9263 * symtab.c: Include "progspace-and-thread.h".
9264 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
9265 * thread.c (print_thread_info_1): Use
9266 scoped_restore_current_thread.
9267 (struct current_thread_cleanup): Delete.
9268 (do_restore_current_thread_cleanup)
9269 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
9270 (scoped_restore_current_thread::~scoped_restore_current_thread):
9271 ... this new dtor.
9272 (make_cleanup_restore_current_thread): Rename/convert to ...
9273 (scoped_restore_current_thread::scoped_restore_current_thread):
9274 ... this new ctor.
9275 (thread_apply_all_command): Use scoped_restore_current_thread.
9276 (thread_apply_command): Use scoped_restore_current_thread.
9277 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
9278 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
9279
9280 2017-05-04 Pedro Alves <palves@redhat.com>
9281
9282 * thread.c (make_cleanup_restore_current_thread): Move
9283 find_thread_ptid call before the is_stopped call. Assert that the
9284 thread is found. Replace is_stopped call by checking the thread's
9285 state directly. Remove unnecessary NULL-thread check.
9286
9287 2017-05-04 Pedro Alves <palves@redhat.com>
9288
9289 * corelow.c (thread_section_name): New class.
9290 (get_core_register_section, get_core_siginfo): Use it.
9291
9292 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
9293
9294 * corelow.c (sniff_core_bfd): Remove extra semicolon.
9295 (get_core_register_section): Remove xfree of NULL pointer.
9296
9297 2017-05-03 Alan Hayward <alan.hayward@arm.com>
9298
9299 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
9300 * regcache.c (regcache::raw_supply_zeroed): New function.
9301 * regcache.h (regcache::raw_supply_zeroed): New declaration.
9302
9303 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
9304
9305 * gdbarch.sh: Remove commented out definition of
9306 TARGET_CHAR_BIT.
9307 * gdbarch.h: Re-generate.
9308
9309 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
9310
9311 * configure: Regenerate.
9312
9313 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
9314
9315 * solib-target.c (solib_target_relocate_section_addresses):
9316 Remove num_section_bases, num_bases, segment_bases variables.
9317
9318 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9319
9320 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
9321
9322 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9323
9324 * solib-target.c: Include <vector>
9325 (struct lm_info_target) <~lm_info_target>: Remove.
9326 <segment_bases, section_bases>: Change type to
9327 std::vector<CORE_ADDR>.
9328 (library_list_start_segment, library_list_start_section,
9329 library_list_end_library,
9330 solib_target_relocate_section_addresses): Adjust.
9331
9332 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9333
9334 * gdbarch.sh (software_single_step): Change return type to
9335 std::vector<CORE_ADDR>.
9336 * gdbarch.c, gdbarch.h: Re-generate.
9337 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
9338 Adjust.
9339 (arm_deal_with_atomic_sequence_raw): Adjust.
9340 (thumb_get_next_pcs_raw): Adjust.
9341 (arm_get_next_pcs_raw): Adjust.
9342 (arm_get_next_pcs): Adjust.
9343 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
9344 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
9345 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
9346 (alpha_software_single_step): Adjust.
9347 * alpha-tdep.h (alpha_software_single_step): Adjust.
9348 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
9349 * arm-tdep.c (arm_software_single_step): Adjust.
9350 (arm_breakpoint_kind_from_current_state): Adjust.
9351 * arm-tdep.h (arm_software_single_step): Adjust.
9352 * breakpoint.c (insert_single_step_breakpoint): Adjust.
9353 * cris-tdep.c (cris_software_single_step): Adjust.
9354 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
9355 (micromips_deal_with_atomic_sequence): Adjust.
9356 (deal_with_atomic_sequence): Adjust.
9357 (mips_software_single_step): Adjust.
9358 * mips-tdep.h (mips_software_single_step): Adjust.
9359 * moxie-tdep.c (moxie_software_single_step): Adjust.
9360 * nios2-tdep.c (nios2_software_single_step): Adjust.
9361 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
9362 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
9363 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
9364 * s390-linux-tdep.c (s390_software_single_step): Adjust.
9365 * sparc-tdep.c (sparc_software_single_step): Adjust.
9366 * spu-tdep.c (spu_software_single_step): Adjust.
9367 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
9368
9369 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
9370
9371 * gdbarch.sh: Use semi-colon as field separator instead of colon.
9372 * gdbarch.h: Re-generate.
9373
9374 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9375
9376 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
9377 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
9378 * python/py-instruction.c, python/py-instruction.h: New file.
9379 * python/py-record.c: Add py-instruction.h include.
9380 (gdbpy_initialize_record): Make gdb.Instruction a super class of
9381 gdb.RecordInstruction.
9382 * python/python-internal.h: Add gdbpy_initialize_instruction
9383 declaration.
9384 * python/python.c (do_start_initialization): Add
9385 gdbpy_initialize_instruction.
9386
9387 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9388
9389 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
9390 Remove.
9391 (btrace_func_from_recpy_func): New function.
9392 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
9393 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
9394 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
9395 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
9396 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
9397 Also, use new helper functions.
9398 (btpy_list_item): Use new helper functions.
9399 (recpy_bt_function_call_history): Use new type name.
9400 (btpy_call_getset): Remove.
9401 (gdbpy_initialize_btrace): Remove code to initialize
9402 gdb.BtraceFunctionCall.
9403 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
9404 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
9405 recpy_bt_func_prev, recpy_bt_func_next): New export.
9406 * python/py-record.c (recpy_func_type): New static object.
9407 (recpy_func_new, recpy_func_level, recpy_func_symbol,
9408 recpy_func_instructions, recpy_func_up, recpy_func_prev,
9409 recpy_func_next): New function.
9410 (recpy_element_hash, recpy_element_richcompare): Updated comment.
9411 (recpy_func_getset): New static object.
9412 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
9413 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
9414
9415 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9416
9417 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
9418 (btpy_object, btpy_insn_type, btpy_new): Remove.
9419 (btpy_list_object): Use gdb.RecordInstruction type instead of
9420 gdb.BtraceInstruction type.
9421 (btrace_insn_from_recpy_insn): New function.
9422 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
9423 btpy_new.
9424 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
9425 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
9426 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
9427 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
9428 instead of btpy_object.
9429 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9430 btpy_insn_data, btpy_insn_decode): Rename to ...
9431 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
9432 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
9433 recpy_bt_insn_decode): This. Also, use new helper functions.
9434 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
9435 recpy_insn_type.
9436 (btpy_insn_getset): Remove.
9437 (gdbpy_initialize_btrace): Remove code to initialize
9438 gdb.BtraceInstruction. Use recpy_element_object.
9439 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
9440 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
9441 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
9442 * python/py-record.c (recpy_insn_type): New static object.
9443 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
9444 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
9445 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
9446 New function.
9447 (recpy_insn_getset): New static object.
9448 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
9449 * python/py-record.h (recpy_element_object): New typedef.
9450 (recpy_insn_type, recpy_insn_new): New export.
9451
9452 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9453
9454 * py-record-btrace.c (btpy_insn_new): Removed.
9455 (btpy_insn_or_gap_new): New function.
9456 (btpy_insn_error): Removed.
9457 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
9458 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
9459 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
9460 btpy_insn_or_gap_new instead of btpy_insn_new.
9461 (btpy_insn_getset): Remove btpy_insn_error.
9462 * py-record.c (recpy_gap_type): New static object.
9463 (recpy_gap_object): New typedef.
9464 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
9465 recpy_gap_reason_string): New function.
9466 (recpy_gap_getset): New static object.
9467 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
9468 * py-record.h (recpy_gap_new): New export.
9469
9470 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9471
9472 * python/py-record.c (recpy_ptid): Remove.
9473 (recpy_record_getset): Remove recpy_ptid.
9474
9475 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9476
9477 * btrace.c (btrace_fetch): Set inferior_ptid.
9478 * python/py-record-btrace.c: Add "py-record.h" include.
9479 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
9480 recpy_bt_end, recpy_bt_instruction_history,
9481 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
9482 in gdb.Record object instead of current ptid.
9483 * python/py-record.c: Include new "py-record.h" file.
9484 (recpy_record_object): Moved to py-record.h.
9485 * python/py-record.h: New file.
9486
9487 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
9488
9489 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
9490 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
9491 indentation.
9492
9493 2017-05-01 Joel Brobecker <brobecker@adacore.com>
9494
9495 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
9496 the past maintainers section.
9497
9498 2017-04-28 Yao Qi <yao.qi@linaro.org>
9499
9500 * infcmd.c (get_return_value): Use regcache ctor, and remove
9501 cleanup.
9502
9503 2017-04-28 Yao Qi <yao.qi@linaro.org>
9504 Pedro Alves <palves@redhat.com>
9505
9506 * regcache.c (regcache::regcache): New tag dispatch ctor.
9507 (do_cooked_read): Moved above.
9508 (regcache_dup): Use the tag dispatch ctor..
9509 * regcache.h (regcache): Declare ctor, delete copy ctor and
9510 assignment operator, remove friend regcache_dup.
9511
9512 2017-04-28 Yao Qi <yao.qi@linaro.org>
9513
9514 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
9515 call method save instead of regcache_cpy.
9516 * regcache.h (struct regcache): Make regcache_dup a friend.
9517
9518 2017-04-28 Yao Qi <yao.qi@linaro.org>
9519
9520 * regcache.c (struct regcache): Move to regcache.h
9521 (regcache::arch): New method.
9522 (regcache_get_ptid): Update.
9523 (get_regcache_arch): Call arch method.
9524 (get_regcache_aspace): Call method aspace.
9525 (register_buffer): Change it to method.
9526 (regcache_save): Change it to regcache::save.
9527 (regcache_restore): Likewise.
9528 (regcache_cpy_no_passthrough): Remove the declaration.
9529 (regcache_cpy): Call methods restore and cpy_no_passthrough.
9530 (regcache_cpy_no_passthrough): Change it to method
9531 cpy_no_passthrough.
9532 (regcache_register_status): Change it to method
9533 get_register_status.
9534 (regcache_invalidate): Change it to method invalidate.
9535 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
9536 (regcache_raw_update): Change it to method raw_update.
9537 (regcache_raw_read): Likewise.
9538 (regcache_raw_read_signed): Likewise.
9539 (regcache_raw_read_unsigned): Likewise.
9540 (regcache_raw_write_signed): Likewise.
9541 (regcache_raw_write_unsigned): Likewise.
9542 (regcache_cooked_read): Likewise.
9543 (regcache_cooked_read_value): Likewise.
9544 (regcache_cooked_read_signed): Likewise.
9545 (regcache_cooked_read_unsigned): Likewise.
9546 (regcache_cooked_write_signed): Likewise.
9547 (regcache_cooked_write_unsigned): Likewise.
9548 (regcache_raw_set_cached_value): Likewise.
9549 (regcache_raw_write): Likewise.
9550 (regcache_cooked_write): Likewise.
9551 (regcache_xfer_part): Likewise.
9552 (regcache_raw_read_part): Likewise.
9553 (regcache_raw_write_part): Likewise.
9554 (regcache_cooked_read_part): Likewise.
9555 (regcache_cooked_write_part): Likewise.
9556 (regcache_raw_supply): Likewise.
9557 (regcache_raw_collect): Likewise.
9558 (regcache_transfer_regset): Likewise.
9559 (regcache_supply_regset): Likewise.
9560 (regcache_collect_regset): Likewise.
9561 (regcache_debug_print_register): Likewise.
9562 (enum regcache_dump_what): Move it to regcache.h.
9563 (regcache_dump): Change it to method dump.
9564 * regcache.h (enum regcache_dump_what): New.
9565 (class regcache): New.
9566 * target.c (target_fetch_registers): Call method
9567 debug_print_register.
9568 (target_store_registers): Likewise.
9569
9570 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9571
9572 * windows-nat.c (struct lm_info_windows): Initialize field.
9573 (windows_make_so): Allocate lm_info_windows with new.
9574 (windows_free_so): Free lm_info_windows with delete.
9575
9576 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9577
9578 * solib-darwin.c (struct lm_info_darwin): Initialize field.
9579 (darwin_current_sos): Allocate lm_info_darwin with new, remove
9580 cleanup.
9581 (darwin_free_so): Free lm_info_darwin with delete.
9582
9583 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9584
9585 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
9586 <l_addr_p>: Change type to bool.
9587 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
9588 (svr4_free_so): Free lm_info_svr4 with delete.
9589 (svr4_copy_library_list): Replace memcpy with call to copy
9590 constructor.
9591 (library_list_start_library, svr4_default_sos): Allocate
9592 lm_info_svr4 with new.
9593
9594 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9595
9596 * solib-target.c (struct lm_info_target): Add destructor,
9597 initialize fields.
9598 <name>: Change type to std::string.
9599 (library_list_start_library): Allocate lm_info_target with new.
9600 (solib_target_free_library_list): Free lm_info_target with
9601 delete.
9602 (solib_target_current_sos): Adapt to std::string.
9603 (solib_target_free_so): Free lm_info_target with delete.
9604
9605 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9606
9607 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
9608 fields.
9609 (frv_current_sos): Allocate lm_info_frv with new.
9610 (frv_relocate_main_executable): Free lm_info_frv with delete,
9611 allocate with new.
9612 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
9613
9614 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9615
9616 * solib-frv.c (struct lm_info_frv): Fix indentation.
9617
9618 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9619
9620 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
9621 map field.
9622 (dsbt_current_sos): Allocate lm_info_dsbt with new.
9623 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
9624 and allocate with new.
9625 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
9626
9627 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9628
9629 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
9630 <filename, member_name>: Change type to std::string.
9631 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
9632 (library_list_start_library): Allocate lm_info_aix with new.
9633 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
9634 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
9635 with copy constructor.
9636
9637 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9638
9639 * solist.h (struct lm_info): Remove.
9640 (struct lm_info_base): New class.
9641 (struct so_list) <lm_info>: Change type to lm_info_base *.
9642 * nto-tdep.c (struct lm_info): Remove.
9643 (lm_addr): Adjust.
9644 * solib-aix.c (struct lm_info): Rename to ...
9645 (struct lm_info_aix): ... this. Extend lm_info_base.
9646 (lm_info_p): Rename to ...
9647 (lm_info_aix_p): ... this, and adjust.
9648 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
9649 solib_aix_parse_libraries, library_list_start_library,
9650 solib_aix_free_library_list, solib_aix_parse_libraries,
9651 solib_aix_get_library_list,
9652 solib_aix_relocate_section_addresses, solib_aix_free_so,
9653 solib_aix_get_section_offsets,
9654 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
9655 Adjust.
9656 (struct solib_aix_inferior_data) <library_list>: Adjust.
9657 * solib-darwin.c (struct lm_info): Rename to ...
9658 (struct lm_info_darwin): ... this. Extend lm_info_base.
9659 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
9660 * solib-dsbt.c (struct lm_info): Rename to ...
9661 (struct lm_info_dsbt): ... this. Extend lm_info_base.
9662 (struct dsbt_info) <main_executable_lm_info): Adjust.
9663 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
9664 dsbt_relocate_section_addresses): Adjust.
9665 * solib-frv.c (struct lm_info): Rename to ...
9666 (struct lm_info_frv): ... this. Extend lm_info_base.
9667 (main_executable_lm_info): Adjust.
9668 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
9669 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
9670 find_canonical_descriptor_in_load_object,
9671 frv_fdpic_find_canonical_descriptor): Adjust.
9672 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
9673 to lm_info_svr4.
9674 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
9675 svr4_clear_so, svr4_copy_library_list,
9676 library_list_start_library, svr4_default_sos, svr4_read_so_list,
9677 svr4_current_sos, svr4_fetch_objfile_link_map,
9678 solist_update_incremental): Adjust.
9679 * solib-svr4.h (struct lm_info_svr4): Move here from
9680 solib-svr4.c.
9681 * solib-target.c (struct lm_info): Rename to ...
9682 (struct lm_info_target): ... this. Extend lm_info_base.
9683 (lm_info_p): Rename to ...
9684 (lm_info_target_p): ... this.
9685 (solib_target_parse_libraries, library_list_start_segment,
9686 library_list_start_section, library_list_start_library,
9687 library_list_end_library, solib_target_free_library_list,
9688 solib_target_current_sos, solib_target_free_so,
9689 solib_target_relocate_section_addresses): Adjust.
9690 * windows-nat.c (struct lm_info): Rename to ...
9691 (struct lm_info_windows): ... this. Extend lm_info_base.
9692 (windows_make_so, handle_load_dll, handle_unload_dll,
9693 windows_xfer_shared_libraries): Adjust.
9694
9695 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
9696
9697 * solib-darwin.c (struct darwin_so_list): Remove.
9698 (darwin_current_sos): Allocate an so_list object instead of a
9699 darwin_so_list, separately allocate an lm_info object.
9700 (darwin_free_so): Free lm_info.
9701
9702 2017-04-28 John Baldwin <jhb@FreeBSD.org>
9703
9704 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
9705 with fprintf_filtered.
9706
9707 2017-04-28 Yao Qi <yao.qi@linaro.org>
9708
9709 * regcache.c (regcache::regcache): New function.
9710 (regcache::~regcache): New function.
9711 (regcache_xmalloc_1): Remove.
9712 (regcache_xmalloc): Call new regcache.
9713 (regcache_xfree): Call delete regcache.
9714 (get_thread_arch_aspace_regcache): Call new regcache.
9715
9716 2017-04-28 Yao Qi <yao.qi@linaro.org>
9717
9718 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
9719 lwp instead of ptid_get_lwp.
9720
9721 2017-04-28 Yao Qi <yao.qi@linaro.org>
9722
9723 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
9724 lwp_info instead of getting from inferior_ptid.
9725
9726 2017-04-27 Keith Seitz <keiths@redhat.com>
9727
9728 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
9729 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
9730 (CV_CONVERSION_BADNESS): Define.
9731 (rank_one_type): Remove overly restrictive rvalue reference
9732 rank checks.
9733 Add cv-qualifier checks and subranks for type equality.
9734 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
9735 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
9736 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
9737
9738 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
9739
9740 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
9741 count when creating the object.
9742
9743 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
9744 Ulrich Weigand <uweigand@de.ibm.com>
9745
9746 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
9747 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
9748 is used in AIX.
9749 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
9750 (process_xcoff_symbol): Likewise.
9751 (scan_xcoff_symtab): Likewise.
9752
9753 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9754
9755 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
9756 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
9757 (ia64_access_reg): Use get_frame_register_unsigned.
9758 (ia64_access_rse_reg): Likewise.
9759 (ia64_libunwind_frame_prev_register): Likewise.
9760
9761 2017-04-26 Jiong Wang <jiong.wang@arm.com>
9762
9763 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
9764 * gdbarch.c: Regenerated.
9765 * gdbarch.h: Regenerated.
9766 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
9767 visibility external.
9768 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
9769 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
9770 (enum cfa_how_kind): Move to ...
9771 (struct dwarf2_frame_state_reg_info): Likewise.
9772 (struct dwarf2_frame_state): Likewise.
9773 * dwarf2-frame.h: ... here.
9774 (dwarf2_frame_state_alloc_regs): New declaration.
9775 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
9776 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
9777
9778 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9779
9780 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
9781 regcache_raw_read_unsigned.
9782 (xtensa_pseudo_register_write): Likewise.
9783
9784 2017-04-26 Alan Hayward <alan.hayward@arm.com>
9785
9786 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
9787 (nds32_pseudo_register_write): Likewise.
9788
9789 2017-04-25 Yao Qi <yao.qi@linaro.org>
9790
9791 * regcache.c (struct regcache) <readonly_p>: Change its type
9792 to bool.
9793 (regcache_xmalloc_1): Update parameter type and callers update.
9794
9795 2017-04-25 Yao Qi <yao.qi@linaro.org>
9796
9797 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
9798 set_gdbarch_wchar_bit.
9799 * arm-tdep.c (arm_gdbarch_init): Likewise.
9800
9801 2017-04-25 Pedro Alves <palves@redhat.com>
9802
9803 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
9804 (BothAreRelocatable, memcopy, memmove): Don't define.
9805 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
9806 macros.
9807
9808 2017-04-25 Pedro Alves <palves@redhat.com>
9809
9810 * common/common-defs.h: Include "common/poison.h".
9811 * common/function-view.h: (Not, Or, Requires): Move to traits.h
9812 and adjust.
9813 * common/poison.h: New file.
9814 * common/traits.h: Include <type_traits>.
9815 (Not, Or, Requires): New, moved from common/function-view.h.
9816
9817 2017-04-25 Pedro Alves <palves@redhat.com>
9818
9819 * breakpoint.h (struct breakpoint): In-class initialize all
9820 fields. Make boolean fields "bool".
9821 * breakpoint.c (init_raw_breakpoint_without_location): Remove
9822 memset call and initializations no longer necessary.
9823
9824 2017-04-25 Pedro Alves <palves@redhat.com>
9825
9826 * btrace.c (pt_btrace_insn_flags): Change parameter type to
9827 reference.
9828 (pt_btrace_insn): New function.
9829 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
9830
9831 2017-04-25 Pedro Alves <palves@redhat.com>
9832
9833 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
9834 "base" field and inherit from "bp_location" instead. Add
9835 non-default ctor.
9836 (allocate_location_exception): Use new non-default ctor.
9837 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
9838 (init_bp_location): Convert to ...
9839 (bp_location::bp_location): ... this new ctor, and remove memset
9840 call.
9841 (base_breakpoint_allocate_location): Use the new non-default ctor.
9842 * breakpoint.h (bp_location): Now a class. Declare default and
9843 non-default ctors. In-class initialize all members.
9844 (init_bp_location): Remove declaration.
9845
9846 2017-04-25 Pedro Alves <palves@redhat.com>
9847
9848 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
9849 assignment operator.
9850
9851 2017-04-24 Yao Qi <yao.qi@linaro.org>
9852
9853 * doublest.c (convert_doublest_to_floatformat): Call
9854 floatformat_totalsize_bytes.
9855
9856 2017-04-22 Tom Tromey <tom@tromey.com>
9857
9858 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
9859 ui_out_emit_list.
9860 * stack.c (print_frame): Use ui_out_emit_list.
9861 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9862 ui_out_emit_list.
9863 * mi/mi-main.c (print_one_inferior)
9864 (mi_cmd_data_list_register_names)
9865 (mi_cmd_data_list_register_values, mi_cmd_list_features)
9866 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
9867 ui_out_emit_list.
9868 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
9869 (mi_output_solib_attribs): Use ui_out_emit_list,
9870 ui_out_emit_tuple.
9871 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
9872 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
9873 (mi_cmd_stack_list_args, list_args_or_locals): Use
9874 ui_out_emit_list.
9875 * disasm.c (do_assembly_only): Use ui_out_emit_list.
9876 * breakpoint.c (print_solib_event, output_thread_groups): Use
9877 ui_out_emit_list.
9878
9879 2017-04-22 Tom Tromey <tom@tromey.com>
9880
9881 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
9882 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
9883 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
9884
9885 2017-04-22 Tom Tromey <tom@tromey.com>
9886
9887 * tracepoint.c (tvariables_info_1)
9888 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
9889
9890 2017-04-22 Tom Tromey <tom@tromey.com>
9891
9892 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
9893 annotate_arg_emitter.
9894 * breakpoint.c (print_mention_watchpoint)
9895 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
9896 * annotate.h (struct annotate_arg_emitter): New.
9897
9898 2017-04-22 Tom Tromey <tom@tromey.com>
9899
9900 * record-btrace.c (record_btrace_insn_history)
9901 (record_btrace_insn_history_range, record_btrace_call_history)
9902 (record_btrace_call_history_range): Use ui_out_emit_tuple.
9903 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
9904 ui_out_emit_tuple.
9905 * stack.c (print_frame_info): Use ui_out_emit_tuple.
9906 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
9907 * skip.c (skip_info): Use ui_out_emit_tuple.
9908 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
9909 * progspace.c (print_program_space): Use ui_out_emit_tuple.
9910 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
9911 * osdata.c (info_osdata): Use ui_out_emit_tuple.
9912 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
9913 ui_out_emit_tuple.
9914 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
9915 (output_register, mi_cmd_data_read_memory)
9916 (mi_cmd_data_read_memory_bytes, mi_load_progress)
9917 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
9918 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
9919 Use ui_out_emit_tuple.
9920 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
9921 ui_out_emit_tuple.
9922 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
9923 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
9924 * linux-thread-db.c (info_auto_load_libthread_db): Use
9925 ui_out_emit_tuple.
9926 * inferior.c (print_inferior): Use ui_out_emit_tuple.
9927 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
9928 * disasm.c (do_mixed_source_and_assembly_deprecated)
9929 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
9930 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
9931 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
9932 * breakpoint.c (print_one_breakpoint_location)
9933 (print_one_breakpoint): Use ui_out_emit_tuple.
9934 * auto-load.c (print_script, info_auto_load_cmd): Use
9935 ui_out_emit_tuple.
9936 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
9937
9938 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
9939
9940 * thread.c (print_thread_info_1): Remove dead code.
9941
9942 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
9943
9944 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
9945 GDB_SELF_TEST.
9946 * arm-tdep.c (selftests::arm_record_test): Likewise.
9947
9948 2017-04-21 Yao Qi <yao.qi@linaro.org>
9949
9950 * regcache.c (regcache_restore): Remove argument 2. Replace
9951 argument 3 with regcache. Get register status from
9952 src->register_status and get register contents from
9953 register_buffer (src, regnum).
9954 (regcache_cpy): Update.
9955
9956 2017-04-19 Pedro Alves <palves@redhat.com>
9957
9958 * gdbthread.h (thread): Add missing closing parenthesis in
9959 comment.
9960
9961 2017-04-19 Pedro Alves <palves@redhat.com>
9962
9963 * common/refcounted-object.h: New file.
9964 * gdbthread.h: Include "common/refcounted-object.h".
9965 (thread_info): Inherit from refcounted_object and add comments.
9966 (thread_info::incref, thread_info::decref)
9967 (thread_info::m_refcount): Delete.
9968 (thread_info::deletable): Use the refcounted_object::refcount()
9969 method.
9970 * inferior.c (current_inferior_): Add comment.
9971 (set_current_inferior): Increment/decrement refcounts.
9972 (prune_inferiors, remove_inferior_command): Skip inferiors marked
9973 not-deletable instead of comparing with the current inferior.
9974 (initialize_inferiors): Increment the initial inferior's refcount.
9975 * inferior.h (struct inferior): Forward declare.
9976 Include "common/refcounted-object.h".
9977 (current_inferior, set_current_inferior): Move declaration to
9978 before struct inferior's definition, and fix comment.
9979 (inferior): Inherit from refcounted_object. Add comments.
9980 * thread.c (switch_to_thread_no_regs): Reference the thread's
9981 inferior pointer directly instead of doing a ptid lookup.
9982 (switch_to_no_thread): New function.
9983 (switch_to_thread(thread_info *)): New function, factored out
9984 from ...
9985 (switch_to_thread(ptid_t)): ... this.
9986 (restore_current_thread): Delete.
9987 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
9988 fields, and add 'inf' field.
9989 (do_restore_current_thread_cleanup): Check whether old->inf is
9990 alive instead of looking up an inferior by ptid. Use
9991 switch_to_thread and switch_to_no_thread.
9992 (restore_current_thread_cleanup_dtor): Use old->inf directly
9993 instead of lookup up an inferior by id. Decref the inferior.
9994 Don't restore 'removable'.
9995 (make_cleanup_restore_current_thread): Same the inferior pointer
9996 in old, instead of the inferior number. Incref the inferior.
9997 Don't save/clear 'removable'.
9998
9999 2017-04-19 Pedro Alves <palves@redhat.com>
10000
10001 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10002 unittests/scoped_restore-selftests.c.
10003 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
10004 * common/scoped_restore.h (scoped_restore_base): Make "class".
10005 (scoped_restore_base::release): New public method.
10006 (scoped_restore_base::scoped_restore_base): New protected ctor.
10007 (scoped_restore_base::m_saved_var): New protected field.
10008 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
10009 scoped_restore_base base class instead of m_saved_var directly.
10010 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
10011 (scoped_restore_tmpl::scoped_restore_tmpl(const
10012 scoped_restore_tmpl<T>&)): Likewise.
10013 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
10014 method.
10015 (scoped_restore_tmpl::saved_var): New method.
10016 (scoped_restore_tmpl::m_saved_var): Delete.
10017 * inferior.h (inferior::detaching): Now a bool.
10018 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
10019 cleanup.
10020 * unittests/scoped_restore-selftests.c: New file.
10021
10022 2017-04-19 Pedro Alves <palves@redhat.com>
10023
10024 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
10025 Re-sort in alphabetic order.
10026
10027 2017-04-18 Pedro Alves <palves@redhat.com>
10028
10029 * xml-support.c (obstack_xml_printf): Delete.
10030 * xml-support.h (obstack_xml_printf): Delete.
10031
10032 2017-04-18 Pedro Alves <palves@redhat.com>
10033
10034 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
10035 vdebug, verror, body_text, start_element, end_element, name,
10036 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
10037 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
10038 is_xinclude>: Make private and add m_ prefix.
10039 (gdb_xml_parser::body_text): New method, based on ...
10040 (gdb_xml_body_text): ... this. Adjust.
10041 (gdb_xml_parser::vdebug): New method, based on ...
10042 (gdb_xml_debug): ... this. Adjust.
10043 (gdb_xml_parser::verror): New method, based on ...
10044 (gdb_xml_error): ... this. Adjust.
10045 (gdb_xml_parser::start_element): New method, based on ...
10046 (gdb_xml_start_element): ... this. Adjust.
10047 (gdb_xml_start_element_wrapper): Defer to
10048 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
10049 (gdb_xml_parser::end_element): New method, based on ...
10050 (gdb_xml_end_element_wrapper): ... this. Adjust.
10051 (gdb_xml_parser::~gdb_xml_parser): Adjust.
10052 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
10053 (gdb_xml_parser::use_dtd): New method, based on ...
10054 (gdb_xml_use_dtd): ... this. Adjust.
10055 (gdb_xml_parser::parse): New method, based on ...
10056 (gdb_xml_parse): ... this. Adjust.
10057 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
10058 (xinclude_start_include): Adjust to call the parser's name method.
10059 (xml_xinclude_default, xml_xinclude_start_doctype)
10060 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
10061 method.
10062 (xml_process_xincludes): Adjust to call parser methods.
10063 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
10064 declarations.
10065
10066 2017-04-18 Pedro Alves <palves@redhat.com>
10067
10068 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
10069 gdb::optional<std::string>.
10070 * xml-support.c: Include <string>.
10071 (scope_level::scope_level(scope_level &&))
10072 (scope_level::~scope_level): Delete.
10073 (scope_level::body): Now a std::string.
10074 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
10075 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
10076 parameter.
10077 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
10078 (xinclude_parsing_data::output): Now a std::string reference.
10079 (xinclude_start_include): Adjust.
10080 (xml_xinclude_default): Adjust.
10081 (xml_process_xincludes): Add 'output' parameter, and return bool.
10082 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
10083 and return bool.
10084 * xml-tdesc.c: Include <unordered_map> and <string>.
10085 (tdesc_xml_cache): Delete.
10086 (tdesc_xml_cache_s): Delete.
10087 (xml_cache): Now an std::unordered_map.
10088 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
10089 (target_fetch_description_xml): Change return type to
10090 gdb::optional<std::string>, and adjust.
10091 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
10092 (target_fetch_description_xml): Change return type to
10093 gdb::optional<std::string>.
10094
10095 2017-04-18 Pedro Alves <palves@redhat.com>
10096
10097 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10098 unittests/optional-selftests.c.
10099 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
10100 * unittests/optional-selftests.c: New file.
10101 * unittests/optional/assignment/1.cc: New file.
10102 * unittests/optional/assignment/2.cc: New file.
10103 * unittests/optional/assignment/3.cc: New file.
10104 * unittests/optional/assignment/4.cc: New file.
10105 * unittests/optional/assignment/5.cc: New file.
10106 * unittests/optional/assignment/6.cc: New file.
10107 * unittests/optional/assignment/7.cc: New file.
10108 * unittests/optional/cons/copy.cc: New file.
10109 * unittests/optional/cons/default.cc: New file.
10110 * unittests/optional/cons/move.cc: New file.
10111 * unittests/optional/cons/value.cc: New file.
10112 * unittests/optional/in_place.cc: New file.
10113 * unittests/optional/observers/1.cc: New file.
10114 * unittests/optional/observers/2.cc: New file.
10115
10116 2017-04-18 Pedro Alves <palves@redhat.com>
10117
10118 * common/gdb_optional.h: Include common/traits.h.
10119 (in_place_t): New type.
10120 (in_place): New constexpr variable.
10121 (optional::optional): Remove member initialization of
10122 m_instantiated.
10123 (optional::optional(in_place_t...)): New constructor.
10124 (optional::~optional): Use reset.
10125 (optional::optional(const optional&)): New.
10126 (optional::optional(const optional&&)): New.
10127 (optional::optional(T &)): New.
10128 (optional::optional(T &&)): New.
10129 (operator::operator=(const optional &)): New.
10130 (operator::operator=(optional &&)): New.
10131 (operator::operator= (const T &))
10132 (operator::operator= (T &&))
10133 (operator::emplace (Args &&... args)): Return a T&. Use reset.
10134 (operator::reset): New.
10135 (operator::m_instantiated):: Add in-class initializer.
10136 * common/traits.h: Include <type_traits>.
10137 (struct And): New types.
10138
10139 2017-04-18 Pedro Alves <palves@redhat.com>
10140
10141 * xml-support.c: Include <vector>.
10142 (scope_level::scope_level(const gdb_xml_element *))
10143 (scope_level::scope_level(scope_level&&)): New.
10144 (scope_level::~scope_level): New.
10145 (scope_level_s): Delete.
10146 (gdb_xml_parser::scopes): Now a std::vector.
10147 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10148 Use std::vector.
10149 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
10150 scope cleanup code.
10151 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
10152 of the scopes member. Use std::vector::emplace_back.
10153
10154 2017-04-18 Pedro Alves <palves@redhat.com>
10155
10156 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
10157 a bool.
10158 (gdb_xml_end_element): Change type of first parameter.
10159 (gdb_xml_cleanup): Rename to ...
10160 (gdb_xml_parser::~gdb_xml_parser): ... this.
10161 (gdb_xml_create_parser_and_cleanup): Delete with ...
10162 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
10163 to this new ctor.
10164 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
10165 using gdb_xml_create_parser_and_cleanup.
10166 (xinclude_parsing_data): Add ctor/dtor.
10167 (xml_xinclude_cleanup): Delete.
10168 (xml_process_xincludes): Create a local xinclude_parsing_data
10169 instead of heap-allocating one. Create a local gdb_xml_parser
10170 instead of heap-allocating one with
10171 gdb_xml_create_parser_and_cleanup.
10172
10173 2017-04-18 John Baldwin <jhb@FreeBSD.org>
10174
10175 PR threads/20743
10176 * fbsd-nat.c (resume_one_thread_cb): Remove.
10177 (resume_all_threads_cb): Remove.
10178 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
10179 iterate_over_threads.
10180
10181 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10182
10183 * NEWS: Create a new section for the next release branch.
10184 Rename the section of the current branch, now that it has
10185 been cut.
10186
10187 2017-04-17 Joel Brobecker <brobecker@adacore.com>
10188
10189 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
10190 * version.in: Bump version to 8.0.50.DATE-git.
10191
10192 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
10193
10194 PR gdb/21385
10195 * windows-nat.c (windows_create_inferior): Declare 'allargs'
10196 independently of the host, and fix build breakage on Cygwin.
10197
10198 2017-04-13 Pedro Alves <palves@redhat.com>
10199
10200 * inferior.c (free_inferior): Convert to ...
10201 (inferior::~inferior): ... this dtor.
10202 (inferior::inferior): New ctor, factored out from ...
10203 (add_inferior_silent): ... here. Allocate the inferior with a new
10204 expression.
10205 (delete_inferior): Call delete instead of free_inferior.
10206 * inferior.h (gdb_environ, continuation): Forward declare.
10207 (inferior): Now a class. Add in-class initialization to all
10208 members. Make boolean fields bool, except 'detaching'.
10209 (inferior::inferior): New explicit ctor.
10210 (inferior::~inferior): New.
10211
10212 2017-04-13 Pedro Alves <palves@redhat.com>
10213
10214 * inferior.c (init_inferior_list): Delete.
10215 * inferior.h (init_inferior_list): Delete.
10216
10217 2017-04-13 Pedro Alves <palves@redhat.com>
10218
10219 PR threads/13217
10220 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
10221 (top level): Call it twice, with different thread sets.
10222
10223 2017-04-13 Pedro Alves <palves@redhat.com>
10224
10225 * thread.c: Include <algorithm>.
10226 (thread_array_cleanup): Delete.
10227 (scoped_inc_dec_ref): New class.
10228 (live_threads_count): New function.
10229 (set_thread_refcount): Delete.
10230 (tp_array_compar_ascending): Now a bool.
10231 (tp_array_compar): Convert to a std::sort comparison function.
10232 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
10233 and live_threads_count.
10234
10235 2017-04-13 Pedro Alves <palves@redhat.com>
10236
10237 * infrun.c (follow_fork_inferior): Also switch the current
10238 inferior.
10239
10240 2017-04-13 Pedro Alves <palves@redhat.com>
10241
10242 * breakpoint.c (watch_command_1): Save watchpoint-frame info
10243 before calling create_internal_breakpoint.
10244
10245 2017-04-13 Pedro Alves <palves@redhat.com>
10246
10247 * fork-child.c (execv_argv): New class.
10248 (breakup_args): Refactored as ...
10249 (execv_argv::init_for_no_shell): .. this method of execv_argv.
10250 Copy arguments to storage and replace separators with NULL
10251 terminators in place.
10252 (escape_bang_in_quoted_argument): Adjust to return bool.
10253 (execv_argv::execv_argv): New ctor.
10254 (execv_argv::init_for_shell): New method, factored out from
10255 fork_inferior. Don't strdup strings into the vector.
10256 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
10257 Remove free_vector_argv call.
10258
10259 2017-04-13 Yao Qi <yao.qi@linaro.org>
10260
10261 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
10262 tdep->rx_psw_type.
10263
10264 2017-04-13 Yao Qi <yao.qi@linaro.org>
10265
10266 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
10267 * rx-tdep.c (rx_gdbarch_init): Likewise.
10268
10269 2017-04-13 Pedro Alves <palves@redhat.com>
10270
10271 * breakpoint.h (struct breakpoint): Reindent.
10272
10273 2017-04-13 Pedro Alves <palves@redhat.com>
10274
10275 * breakpoint.c (bp_location): Rename to ...
10276 (bp_locations): ... this. All references updated.
10277 (bp_location_count): Rename to ...
10278 (bp_locations_count): ... this. All references updated.
10279 (bp_location_placed_address_before_address_max): Rename to ...
10280 (bp_locations_placed_address_before_address_max): ... this. All
10281 references updated.
10282 (bp_location_shadow_len_after_address_max): Rename to ...
10283 (bp_locations_shadow_len_after_address_max): ... this. All
10284 references updated.
10285 (bp_location_compare_addrs): Rename to ...
10286 (bp_locations_compare_addrs): ... this. All references updated.
10287 (bp_location_compare):Rename to ...
10288 (bp_locations_compare): ... this. All references updated.
10289 (bp_location_target_extensions_update): Rename to ...
10290 (bp_locations_target_extensions_update): ... this. All references
10291 updated.
10292
10293 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10294
10295 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
10296 * common/common.m4: Check headers 'termios.h', 'termio.h' and
10297 'sgtty.h'.
10298 * common/gdb_termios.h: New file, with parts of "terminal.h".
10299 * inflow.c: Include "gdb_termios.h".
10300 * ser-unix.c: Include "gdb_termios.h".
10301 * terminal.h: Move terminal-related defines to
10302 "common/gdb_termios.h".
10303
10304 2017-04-12 Tom Tromey <tom@tromey.com>
10305
10306 * probe.c (parse_probes): Update.
10307 * location.h (delete_event_location): Don't declare.
10308 (event_location_deleter::operator()): Update.
10309 * location.c (event_location_deleter::operator()): Rename from
10310 delete_event_location.
10311 * linespec.h (linespec_result) <location>: Change type to
10312 event_location_up.
10313 * linespec.c (canonicalize_linespec, event_location_to_sals)
10314 (decode_objc): Update.
10315 (linespec_result): Don't call delete_event_location.
10316 * breakpoint.c (create_breakpoints_sal)
10317 (bkpt_probe_create_sals_from_location)
10318 (strace_marker_create_sals_from_location): Update.
10319
10320 2017-04-12 Tom Tromey <tom@tromey.com>
10321
10322 * linespec.h (struct linespec_result): Add constructor and
10323 destructor.
10324 (init_linespec_result, destroy_linespec_result)
10325 (make_cleanup_destroy_linespec_result): Don't declare.
10326 * linespec.c (init_linespec_result): Remove.
10327 (linespec_result::~linespec_result): Rename from
10328 destroy_linespec_result. Update.
10329 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
10330 Remove.
10331 * breakpoint.c (create_breakpoint, break_range_command)
10332 (decode_location_default): Update.
10333 * ax-gdb.c (agent_command_1): Update.
10334
10335 2017-04-12 Tom Tromey <tom@tromey.com>
10336
10337 * remote.c (remote_download_tracepoint): Update.
10338 * python/py-breakpoint.c (bppy_get_location): Update.
10339 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
10340 (gdbscm_breakpoint_location): Update.
10341 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
10342 * breakpoint.h (struct breakpoint) <location, location_range_end>:
10343 Change type to event_location_up.
10344 * breakpoint.c (create_overlay_event_breakpoint)
10345 (create_longjmp_master_breakpoint)
10346 (create_std_terminate_master_breakpoint)
10347 (create_exception_master_breakpoint)
10348 (breakpoint_event_location_empty_p, print_breakpoint_location)
10349 (print_one_breakpoint_location, create_thread_event_breakpoint)
10350 (init_breakpoint_sal, create_breakpoint)
10351 (print_recreate_ranged_breakpoint, break_range_command)
10352 (init_ada_exception_breakpoint, say_where): Update.
10353 (base_breakpoint_dtor): Don't call delete_event_location.
10354 (bkpt_print_recreate, tracepoint_print_recreate)
10355 (dprintf_print_recreate, update_static_tracepoint)
10356 (breakpoint_re_set_default): Update.
10357
10358 2017-04-12 Tom Tromey <tom@tromey.com>
10359
10360 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
10361 type of "to_do". Update.
10362 (compute_stack_depth): Use std::vector.
10363
10364 2017-04-12 Tom Tromey <tom@tromey.com>
10365
10366 * printcmd.c (find_instruction_backward): Use std::vector.
10367
10368 2017-04-12 Tom Tromey <tom@tromey.com>
10369
10370 * symfile.c (objfilep): Remove typedef.
10371 (reread_symbols): Use a std::vector.
10372
10373 2017-04-12 Tom Tromey <tom@tromey.com>
10374
10375 * mi/mi-main.c (exec_direction_forward): Remove.
10376 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
10377 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
10378 scoped_restore.
10379 * guile/guile.c (guile_repl_command, guile_command)
10380 (gdbscm_execute_gdb_command): Use scoped_restore.
10381 * go-exp.y (go_parse): Use scoped_restore.
10382 * d-exp.y (d_parse): Use scoped_restore.
10383 * cli/cli-decode.c (cmd_func): Use scoped_restore.
10384 * c-exp.y (c_parse): Use scoped_restore.
10385
10386 2017-04-12 Tom Tromey <tom@tromey.com>
10387
10388 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
10389 (mi_parse): Update return type.
10390 (mi_parse_free): Remove.
10391 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
10392 (mi_parse::~mi_parse): Rename from mi_parse_free.
10393 (mi_parse_cleanup): Remove.
10394 (mi_parse): Return a unique_ptr. Use new.
10395 * mi/mi-main.c (mi_execute_command): Update.
10396
10397 2017-04-12 Tom Tromey <tom@tromey.com>
10398
10399 * location.c (explicit_location_lex_one): Return a
10400 unique_xmalloc_ptr.
10401 (string_to_explicit_location): Update. Remove cleanups.
10402
10403 2017-04-12 Tom Tromey <tom@tromey.com>
10404
10405 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
10406 (compare_value_and_voffset): Change type. Update.
10407 (compute_vtable_size): Change type of "offset_vec".
10408 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
10409 (gnuv3_get_typeid): Remove extraneous declaration.
10410
10411 2017-04-12 Tom Tromey <tom@tromey.com>
10412
10413 * charset.h (wchar_iterator): Fix comment.
10414
10415 2017-04-12 Tom Tromey <tom@tromey.com>
10416
10417 * charset.c (iconv_wrapper): New class.
10418 (cleanup_iconv): Remove.
10419 (convert_between_encodings): Use it.
10420
10421 2017-04-12 Tom Tromey <tom@tromey.com>
10422
10423 * symfile.h (increment_reading_symtab): Update type.
10424 * symfile.c (decrement_reading_symtab): Remove.
10425 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
10426 * psymtab.c (psymtab_to_symtab): Update.
10427 * dwarf2read.c (dw2_instantiate_symtab): Update.
10428
10429 2017-04-12 Tom Tromey <tom@tromey.com>
10430
10431 * jit.c (struct jit_reader): Declare separately. Add constructor
10432 and destructor. Change type of "handle".
10433 (loaded_jit_reader): Define separately.
10434 (jit_reader_load): Update. New "new".
10435 (jit_reader_unload_command): Use "delete".
10436 * gdb-dlfcn.h (struct dlclose_deleter): New.
10437 (gdb_dlhandle_up): New typedef.
10438 (gdb_dlopen, gdb_dlsym): Update types.
10439 (gdb_dlclose): Remove.
10440 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
10441 (gdb_dlsym): Change type of "handle".
10442 (make_cleanup_dlclose): Remove.
10443 (dlclose_deleter::operator()): Rename from gdb_dlclose.
10444 * compile/compile-c-support.c (load_libcc): Update.
10445
10446 2017-04-12 Tom Tromey <tom@tromey.com>
10447
10448 * symtab.h (find_pcs_for_symtab_line): Change return type.
10449 * symtab.c (find_pcs_for_symtab_line): Change return type.
10450 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
10451 type of "vec". Update.
10452 (ltpy_get_pcs_for_line): Update.
10453 * linespec.c (decode_digits_ordinary): Update.
10454
10455 2017-04-12 Tom Tromey <tom@tromey.com>
10456
10457 * tracepoint.c (actions_command): Update.
10458 * python/python.c (python_command, python_interactive_command):
10459 Update.
10460 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
10461 * guile/guile.c (guile_command): Update.
10462 * defs.h (read_command_lines, read_command_lines_1): Return
10463 command_line_up.
10464 (command_lines_deleter): New struct.
10465 (command_line_up): New typedef.
10466 * compile/compile.c (compile_code_command)
10467 (compile_print_command): Update.
10468 * cli/cli-script.h (get_command_line, copy_command_lines): Return
10469 command_line_up.
10470 (make_cleanup_free_command_lines): Remove.
10471 * cli/cli-script.c (get_command_line, read_command_lines_1)
10472 (copy_command_lines): Return command_line_up.
10473 (while_command, if_command, read_command_lines, define_command)
10474 (document_command): Update.
10475 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
10476 Remove.
10477 * breakpoint.h (breakpoint_set_commands): Change type of
10478 "commands".
10479 * breakpoint.c (breakpoint_set_commands): Change type of
10480 "commands". Update.
10481 (do_map_commands_command, update_dprintf_command_list)
10482 (create_tracepoint_from_upload): Update.
10483
10484 2017-04-12 Tom Tromey <tom@tromey.com>
10485
10486 * tracepoint.c (scope_info): Update.
10487 * spu-tdep.c (spu_catch_start): Update.
10488 * python/python.c (gdbpy_decode_line): Update.
10489 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
10490 * python/py-breakpoint.c (bppy_init): Update.
10491 * probe.c (parse_probes): Update.
10492 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
10493 * location.h (event_location_deleter): New struct.
10494 (event_location_up): New typedef.
10495 (new_linespec_location, new_address_location, new_probe_location)
10496 (new_explicit_location, copy_event_location)
10497 (string_to_event_location, string_to_event_location_basic)
10498 (string_to_explicit_location): Update return type.
10499 (make_cleanup_delete_event_location): Remove.
10500 * location.c (new_linespec_location, new_address_location)
10501 (new_probe_location, new_explicit_location, copy_event_location):
10502 Return event_location_up.
10503 (delete_event_location_cleanup)
10504 (make_cleanup_delete_event_location): Remove.
10505 (string_to_explicit_location, string_to_event_location_basic)
10506 (string_to_event_location): Return event_location_up.
10507 * linespec.c (canonicalize_linespec, event_location_to_sals)
10508 (decode_line_with_current_source)
10509 (decode_line_with_last_displayed, decode_objc): Update.
10510 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
10511 * completer.c (location_completer): Update.
10512 * cli/cli-cmds.c (edit_command, list_command): Update.
10513 * breakpoint.c (create_overlay_event_breakpoint)
10514 (create_longjmp_master_breakpoint)
10515 (create_std_terminate_master_breakpoint)
10516 (create_exception_master_breakpoint)
10517 (create_thread_event_breakpoint): Update.
10518 (init_breakpoint_sal): Update. Remove some dead code.
10519 (create_breakpoint_sal): Change type of "location". Update.
10520 (create_breakpoints_sal, create_breakpoint, break_command_1)
10521 (dprintf_command, break_range_command, until_break_command)
10522 (init_ada_exception_breakpoint)
10523 (strace_marker_create_sals_from_location)
10524 (update_static_tracepoint, trace_command, ftrace_command)
10525 (strace_command, create_tracepoint_from_upload): Update.
10526 * break-catch-throw.c (re_set_exception_catchpoint): Update.
10527 * ax-gdb.c (agent_command_1): Update.
10528
10529 2017-04-12 Pedro Alves <palves@redhat.com>
10530
10531 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
10532 * configure.tgt: Handle i[34567]86-*-go32* and
10533 i[34567]86-*-msdosdjgpp*.
10534 * i386-tdep.c (i386_svr4_reg_to_regnum):
10535 Make extern.
10536 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
10537 i386-go32-tdep.c.
10538 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
10539 * i386-go32-tdep.c: New file.
10540 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
10541 declarations.
10542
10543 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
10544
10545 * aix-thread.c (pd_status2str): Change return type to const char *.
10546
10547 2017-04-12 Pedro Alves <palves@redhat.com>
10548
10549 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
10550 calls to set_gdbarch_gnu_triplet_regexp.
10551
10552 2017-04-12 Pedro Alves <palves@redhat.com>
10553
10554 PR gdb/21323
10555 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
10556 New enum value.
10557 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
10558 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
10559 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
10560 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
10561 * gdbarch.h, gdbarch.c: Regenerate.
10562 * aarch64-tdep.c (aarch64_gdbarch_init): Override
10563 gdbarch_wchar_bit and gdbarch_wchar_signed.
10564 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
10565 * arm-tdep.c (arm_gdbarch_init): Likewise.
10566 * avr-tdep.c (avr_gdbarch_init): Likewise.
10567 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
10568 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
10569 * i386-tdep.c (i386_go32_init_abi): Likewise.
10570 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10571 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10572 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10573 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
10574 * sh-tdep.c (sh_gdbarch_init): Likewise.
10575 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10576 * sparc64-tdep.c (sparc64_init_abi): Likewise.
10577 * windows-tdep.c (windows_init_abi): Likewise.
10578 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10579
10580 2017-04-12 Pedro Alves <palves@redhat.com>
10581
10582 PR c++/21323
10583 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
10584 cplus_primitive_type_char32_t>: New enum values.
10585 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
10586 and cplus_primitive_type_char32_t.
10587 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
10588 32, use the archtecture's built-in type for char16_t and char32_t,
10589 respectively. Otherwise, fallback to init_integer_type as before,
10590 but make the type unsigned, and issue a complaint.
10591 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
10592
10593 2017-04-12 Alan Hayward <alan.hayward@arm.com>
10594
10595 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
10596 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
10597
10598 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10599
10600 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
10601 'const char *'.
10602
10603 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
10604
10605 * common/common-utils.c (free_vector_argv): New function.
10606 * common/common-utils.h: Include <vector>.
10607 (free_vector_argv): New prototype.
10608 * darwin-nat.c (darwin_create_inferior): Rewrite function
10609 prototype in order to constify "exec_file" and accept a
10610 "std::string" for "allargs".
10611 * fork-child.c: Include <vector>.
10612 (breakup_args): Rewrite function, using C++.
10613 (fork_inferior): Rewrite function header, constify "exec_file_arg"
10614 and accept "std::string" for "allargs". Update the code to
10615 calculate "argv" based on "allargs". Update calls to "exec_fun"
10616 and "execvp".
10617 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
10618 order to constify "exec_file" and accept a "std::string" for
10619 "allargs".
10620 * go32-nat.c (go32_create_inferior): Likewise.
10621 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
10622 * infcmd.c (run_command_1): Constify "exec_file". Use
10623 "std::string" for inferior arguments.
10624 * inferior.h (fork_inferior): Update prototype.
10625 * linux-nat.c (linux_nat_create_inferior): Rewrite function
10626 prototype in order to constify "exec_file" and accept a
10627 "std::string" for "allargs".
10628 * nto-procfs.c (procfs_create_inferior): Likewise.
10629 * procfs.c (procfs_create_inferior): Likewise.
10630 * remote-sim.c (gdbsim_create_inferior): Likewise.
10631 * remote.c (extended_remote_run): Update code to accept
10632 "std::string" as argument.
10633 (extended_remote_create_inferior): Rewrite function prototype in
10634 order to constify "exec_file" and accept a "std::string" for
10635 "allargs".
10636 * rs6000-nat.c (super_create_inferior): Likewise.
10637 (rs6000_create_inferior): Likewise.
10638 * target.h (struct target_ops) <to_create_inferior>: Likewise.
10639 * windows-nat.c (windows_create_inferior): Likewise.
10640
10641 2017-04-11 Pedro Alves <palves@redhat.com>
10642
10643 * thread.c: Fix whitespace throughout.
10644
10645 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
10646
10647 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
10648
10649 2017-04-11 Alan Hayward <alan.hayward@arm.com>
10650
10651 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
10652
10653 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
10654
10655 PR gdb/21364
10656 * osdata.c (info_osdata): Check if 'type' is an empty string
10657 instead of NULL.
10658
10659 2017-04-10 Pedro Alves <palves@redhat.com>
10660
10661 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
10662 (ptid_to_global_thread_id, in_thread_list)
10663 (do_captured_list_thread_ids, set_resumed, set_running)
10664 (set_executing, set_stop_requested, finish_thread_state)
10665 (validate_registers_access, can_access_registers_ptid)
10666 (print_thread_info_1, switch_to_thread)
10667 (do_restore_current_thread_cleanup)
10668 (make_cleanup_restore_current_thread, thread_command)
10669 (thread_name_command): Use operator== instead of ptid_equal.
10670
10671 2017-04-10 Pedro Alves <palves@redhat.com>
10672
10673 * thread.c (struct current_thread_cleanup) <next>: Delete field.
10674 (current_thread_cleanup_chain): Delete.
10675 (restore_current_thread_cleanup_dtor)
10676 (make_cleanup_restore_current_thread): Remove references to
10677 current_thread_cleanup_chain.
10678
10679 2017-04-10 Alan Hayward <alan.hayward@arm.com>
10680
10681 * msp430-tdep.c (msp430_pseudo_register_read): Never return
10682 REG_UNKNOWN.
10683
10684 2017-04-10 Yao Qi <yao.qi@linaro.org>
10685
10686 PR gdb/19942
10687 * gdbthread.h (thread_info::deletable): New method.
10688 (thread_info::incref): New method.
10689 (thread_info::decref): New method.
10690 (thread_info::refcount): Move it to private.
10691 * infrun.c (save_stop_context): Call inc_refcount.
10692 (release_stop_context_cleanup): Likewise.
10693 * thread.c (set_thread_exited): New function.
10694 (init_thread_list): Delete "tp" only it is deletable, otherwise
10695 call set_thread_exited.
10696 (delete_thread_1): Call set_thread_exited.
10697 (current_thread_cleanup) <inferior_pid>: Remove.
10698 <thread>: New field.
10699 (restore_current_thread_ptid_changed): Removed.
10700 (do_restore_current_thread_cleanup): Adjust.
10701 (restore_current_thread_cleanup_dtor): Don't call
10702 find_thread_ptid.
10703 (set_thread_refcount): Use dec_refcount.
10704 (make_cleanup_restore_current_thread): Adjust.
10705 (thread_apply_all_command): Call inc_refcount.
10706 (_initialize_thread): Don't call
10707 observer_attach_thread_ptid_changed.
10708
10709 2017-04-10 Yao Qi <yao.qi@linaro.org>
10710
10711 * thread.c (delete_thread_1): Hoist code on marking thread as
10712 exited.
10713
10714 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
10715
10716 * windows-nat.c (windows_detach): Initialize ptid with
10717 minus_one_ptid.
10718
10719 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
10720
10721 * unittests/ptid-selftests.c: Fix erroneous assert messages.
10722
10723 2017-04-07 Alan Hayward <alan.hayward@arm.com>
10724
10725 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
10726 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
10727 (bfin_pseudo_register_write): Likewise
10728
10729 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
10730
10731 * common/ptid.h (struct ptid): Change to...
10732 (class ptid_t): ... this.
10733 <ptid_t>: New constructors.
10734 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
10735 matches>: New methods.
10736 <make_null, make_minus_one>: New static methods.
10737 <pid>: Rename to...
10738 <m_pid>: ...this.
10739 <lwp>: Rename to...
10740 <m_lwp>: ...this.
10741 <tid>: Rename to...
10742 <m_tid>: ...this.
10743 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
10744 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
10745 as references, move comment to class ptid_t.
10746 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
10747 ptid_t static methods.
10748 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
10749 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
10750 Take ptid arguments as references, implement using ptid_t methods.
10751 * unittests/ptid-selftests.c: New file.
10752 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10753 unittests/ptid-selftests.c.
10754 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
10755
10756 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
10757
10758 * python/python.c (python_run_simple_file): Cast mode literal to
10759 non-const char pointer as expected by PyFile_FromString.
10760
10761 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
10762
10763 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
10764 minus_one_ptid and null_ptid.
10765
10766 2017-04-05 Pedro Alves <palves@redhat.com>
10767
10768 * warning.m4 (build_warnings): Remove -Wno-write-strings.
10769 * configure: Regenerate.
10770
10771 2017-04-05 Pedro Alves <palves@redhat.com>
10772
10773 * ada-exp.y (yyerror): Constify.
10774 * ada-lang.c (bound_name, get_selections)
10775 (ada_variant_discrim_type)
10776 (ada_variant_discrim_name, ada_value_struct_elt)
10777 (ada_lookup_struct_elt_type, is_unchecked_variant)
10778 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
10779 (catch_ada_exception_command_split)
10780 (catch_ada_assert_command_split, catch_assert_command)
10781 (ada_op_name): Constify.
10782 * ada-lang.h (ada_yyerror, get_selections)
10783 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
10784 * arc-tdep.c (arc_print_frame_cache): Constify.
10785 * arm-tdep.c (arm_skip_stub): Constify.
10786 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
10787 (gen_aggregate_elt_ref): Constify.
10788 * bcache.c (print_bcache_statistics): Constify.
10789 * bcache.h (print_bcache_statistics): Constify.
10790 * break-catch-throw.c (catch_exception_command_1):
10791 * breakpoint.c (struct ep_type_description::description):
10792 Constify.
10793 (add_solib_catchpoint): Constify.
10794 (catch_fork_command_1): Add cast.
10795 (add_catch_command): Constify.
10796 * breakpoint.h (add_catch_command, add_solib_catchpoint):
10797 Constify.
10798 * bsd-uthread.c (bsd_uthread_state): Constify.
10799 * buildsym.c (patch_subfile_names): Constify.
10800 * buildsym.h (next_symbol_text_func, patch_subfile_names):
10801 Constify.
10802 * c-exp.y (yyerror): Constify.
10803 (token::oper): Constify.
10804 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
10805 * c-varobj.c (cplus_describe_child): Constify.
10806 * charset.c (find_charset_names): Add cast.
10807 (find_charset_names): Constify array and add const_cast.
10808 * cli/cli-cmds.c (complete_command, cd_command): Constify.
10809 (edit_command): Constify.
10810 * cli/cli-decode.c (lookup_cmd): Constify.
10811 * cli/cli-dump.c (dump_memory_command, dump_value_command):
10812 Constify.
10813 (struct dump_context): Constify.
10814 (add_dump_command, restore_command): Constify.
10815 * cli/cli-script.c (get_command_line): Constify.
10816 * cli/cli-script.h (get_command_line): Constify.
10817 * cli/cli-utils.c (check_for_argument): Constify.
10818 * cli/cli-utils.h (check_for_argument): Constify.
10819 * coff-pe-read.c (struct read_pe_section_data): Constify.
10820 * command.h (lookup_cmd): Constify.
10821 * common/print-utils.c (decimal2str): Constify.
10822 * completer.c (gdb_print_filename): Constify.
10823 * corefile.c (set_gnutarget): Constify.
10824 * cp-name-parser.y (yyerror): Constify.
10825 * cp-valprint.c (cp_print_class_member): Constify.
10826 * cris-tdep.c (cris_register_name, crisv32_register_name):
10827 Constify.
10828 * d-exp.y (yyerror): Constify.
10829 (struct token::oper): Constify.
10830 * d-lang.h (d_yyerror): Constify.
10831 * dbxread.c (struct header_file_location::name): Constify.
10832 (add_old_header_file, add_new_header_file, last_function_name)
10833 (dbx_next_symbol_text, add_bincl_to_list)
10834 (find_corresponding_bincl_psymtab, set_namestring)
10835 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
10836 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
10837 * defs.h (command_line_input, print_address_symbolic)
10838 (deprecated_readline_begin_hook): Constify.
10839 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
10840 Constify.
10841 * event-top.c (handle_line_of_input): Constify and add cast.
10842 * exceptions.c (catch_errors): Constify.
10843 * exceptions.h (catch_errors): Constify.
10844 * expprint.c (print_subexp_standard, op_string, op_name)
10845 (op_name_standard, dump_raw_expression, dump_raw_expression):
10846 * expression.h (op_name, op_string, dump_raw_expression):
10847 Constify.
10848 * f-exp.y (yyerror): Constify.
10849 (struct token::oper): Constify.
10850 (struct f77_boolean_val::name): Constify.
10851 * f-lang.c (f_word_break_characters): Constify.
10852 * f-lang.h (f_yyerror): Constify.
10853 * fork-child.c (fork_inferior): Add cast.
10854 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
10855 (new_variant): Constify.
10856 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
10857 * gdbarch.c: Regenerate.
10858 * gdbcore.h (set_gnutarget): Constify.
10859 * go-exp.y (yyerror): Constify.
10860 (token::oper): Constify.
10861 * go-lang.h (go_yyerror): Constify.
10862 * go32-nat.c (go32_sysinfo): Constify.
10863 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
10864 * guile/scm-cmd.c (cmdscm_function): Constify.
10865 * guile/scm-param.c (pascm_param_value): Constify.
10866 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
10867 (h8300sx_register_name): Constify.
10868 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
10869 Constify.
10870 * ia64-tdep.c (ia64_register_names): Constify.
10871 * infcmd.c (construct_inferior_arguments): Constify.
10872 (path_command, attach_post_wait): Constify.
10873 * language.c (show_range_command, show_case_command)
10874 (unk_lang_error): Constify.
10875 * language.h (language_defn::la_error)
10876 (language_defn::la_name_of_this): Constify.
10877 * linespec.c (decode_line_2): Constify.
10878 * linux-thread-db.c (thread_db_err_str): Constify.
10879 * lm32-tdep.c (lm32_register_name): Constify.
10880 * m2-exp.y (yyerror): Constify.
10881 * m2-lang.h (m2_yyerror): Constify.
10882 * m32r-tdep.c (m32r_register_names): Constify and make static.
10883 * m68hc11-tdep.c (m68hc11_register_names): Constify.
10884 * m88k-tdep.c (m88k_register_name): Constify.
10885 * macroexp.c (appendmem): Constify.
10886 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
10887 (upgrade_type, parse_external, parse_partial_symbols)
10888 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
10889 (new_symbol): Constify.
10890 * memattr.c (mem_info_command): Constify.
10891 * mep-tdep.c (register_name_from_keyword): Constify.
10892 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
10893 Constify.
10894 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
10895 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
10896 * mi/mi-main.c (captured_mi_execute_command): Constify and add
10897 cast.
10898 (mi_execute_async_cli_command): Constify.
10899 * mips-tdep.c (mips_register_name): Constify.
10900 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
10901 (am33_register_name, am33_2_register_name)
10902 * moxie-tdep.c (moxie_register_names): Constify.
10903 * nat/linux-osdata.c (osdata_type): Constify fields.
10904 * nto-tdep.c (nto_parse_redirection): Constify.
10905 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
10906 (lookup_child_selector): Constify.
10907 (objc_methcall::name): Constify.
10908 * objc-lang.h (lookup_objc_class, lookup_child_selector)
10909 (lookup_struct_typedef): Constify.
10910 * objfiles.c (pc_in_section): Constify.
10911 * objfiles.h (pc_in_section): Constify.
10912 * p-exp.y (struct token::oper): Constify.
10913 (yyerror): Constify.
10914 * p-lang.h (pascal_yyerror): Constify.
10915 * parser-defs.h (op_name_standard): Constify.
10916 (op_print::string): Constify.
10917 (exp_descriptor::op_name): Constify.
10918 * printcmd.c (print_address_symbolic): Constify.
10919 * psymtab.c (print_partial_symbols): Constify.
10920 * python/py-breakpoint.c (stop_func): Constify.
10921 (bppy_get_expression): Constify.
10922 * python/py-cmd.c (cmdpy_completer::name): Constify.
10923 (cmdpy_function): Constify.
10924 * python/py-event.c (evpy_add_attribute)
10925 (gdbpy_initialize_event_generic): Constify.
10926 * python/py-event.h (evpy_add_attribute)
10927 (gdbpy_initialize_event_generic): Constify.
10928 * python/py-evts.c (add_new_registry): Constify.
10929 * python/py-finishbreakpoint.c (outofscope_func): Constify.
10930 * python/py-framefilter.c (get_py_iter_from_func): Constify.
10931 * python/py-inferior.c (get_buffer): Add cast.
10932 * python/py-param.c (parm_constant::name): Constify.
10933 * python/py-unwind.c (fprint_frame_id): Constify.
10934 * python/python.c (gdbpy_parameter_value): Constify.
10935 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
10936 * remote.c (memory_packet_config::name): Constify.
10937 (show_packet_config_cmd, remote_write_bytes)
10938 (remote_buffer_add_string):
10939 * reverse.c (exec_reverse_once): Constify.
10940 * rs6000-tdep.c (variant::name, variant::description): Constify.
10941 * rust-exp.y (rustyyerror): Constify.
10942 * rust-lang.c (rust_op_name): Constify.
10943 * rust-lang.h (rustyyerror): Constify.
10944 * serial.h (serial_ops::name): Constify.
10945 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
10946 (sh_sh3e_register_name, sh_sh2e_register_name)
10947 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
10948 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
10949 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
10950 (sh_sh4al_dsp_register_name): Constify.
10951 * sh64-tdep.c (sh64_register_name): Constify.
10952 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
10953 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
10954 * stabsread.c (patch_block_stabs, read_type_number)
10955 (ref_map::stabs, ref_add, process_reference)
10956 (symbol_reference_defined, define_symbol, define_symbol)
10957 (error_type, read_type, read_member_functions, read_cpp_abbrev)
10958 (read_one_struct_field, read_struct_fields, read_baseclasses)
10959 (read_tilde_fields, read_struct_type, read_array_type)
10960 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
10961 (read_huge_number, read_range_type, read_args, common_block_start)
10962 (find_name_end): Constify.
10963 * stabsread.h (common_block_start, define_symbol)
10964 (process_one_symbol, symbol_reference_defined, ref_add):
10965 * symfile.c (get_section_index, add_symbol_file_command):
10966 * symfile.h (get_section_index): Constify.
10967 * target-descriptions.c (tdesc_type::name): Constify.
10968 (tdesc_free_type): Add cast.
10969 * target.c (find_default_run_target):
10970 (add_deprecated_target_alias, find_default_run_target)
10971 (target_announce_detach): Constify.
10972 (do_option): Constify.
10973 * target.h (add_deprecated_target_alias): Constify.
10974 * thread.c (print_thread_info_1): Constify.
10975 * top.c (deprecated_readline_begin_hook, command_line_input):
10976 Constify.
10977 (init_main): Add casts.
10978 * top.h (handle_line_of_input): Constify.
10979 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
10980 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
10981 (tfind_command): Rename to ...
10982 (tfind_command_1): ... this and constify.
10983 (tfind_command): New function.
10984 (tfind_end_command, tfind_start_command): Adjust.
10985 (encode_source_string): Constify.
10986 * tracepoint.h (encode_source_string): Constify.
10987 * tui/tui-data.c (tui_partial_win_by_name): Constify.
10988 * tui/tui-data.h (tui_partial_win_by_name): Constify.
10989 * tui/tui-source.c (tui_set_source_content_nil): Constify.
10990 * tui/tui-source.h (tui_set_source_content_nil): Constify.
10991 * tui/tui-win.c (parse_scrolling_args): Constify.
10992 * tui/tui-windata.c (tui_erase_data_content): Constify.
10993 * tui/tui-windata.h (tui_erase_data_content): Constify.
10994 * tui/tui-winsource.c (tui_erase_source_content): Constify.
10995 * tui/tui.c (tui_enable): Add cast.
10996 * utils.c (defaulted_query): Constify.
10997 (init_page_info): Add cast.
10998 (puts_debug, subset_compare): Constify.
10999 * utils.h (subset_compare): Constify.
11000 * varobj.c (varobj_format_string): Constify.
11001 * varobj.h (varobj_format_string): Constify.
11002 * vax-tdep.c (vax_register_name): Constify.
11003 * windows-nat.c (windows_detach): Constify.
11004 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
11005 * xml-support.c (gdb_xml_end_element): Constify.
11006 * xml-tdesc.c (tdesc_start_reg): Constify.
11007 * xstormy16-tdep.c (xstormy16_register_name): Constify.
11008 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
11009 * xtensa-tdep.h (xtensa_register_t::name): Constify.
11010
11011 2017-04-05 Pedro Alves <palves@redhat.com>
11012
11013 * proc-api.c (struct trans): Constify.
11014 (procfs_note): Constify.
11015 * proc-events.c (struct trans, syscall_table):
11016 * proc-flags.c (struct trans): Constify.
11017 * proc-utils.h (procfs_note): Constify.
11018 * proc-why.c (struct trans): Constify.
11019 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
11020 (procfs_detach): Constify.
11021 * sol-thread.c (struct string_map): Constify.
11022 (td_err_string, td_state_string): Constify.
11023
11024 2017-04-05 Pedro Alves <palves@redhat.com>
11025
11026 * proc-api.c (procfs_filename): Don't initialize
11027 procfs_filename.
11028 (prepare_to_trace): Assume procfs_filename is non-NULL.
11029 (_initialize_proc_api): Give procfs_filename a default value here.
11030
11031 2017-04-05 Pedro Alves <palves@redhat.com>
11032
11033 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
11034 'cond_string' parameter.
11035 (extract_exception_regexp): Constify 'string' parameter.
11036 (catch_exception_command_1): Constify.
11037 * breakpoint.c (init_catchpoint)
11038 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
11039 parameter.
11040 (ep_parse_optional_if_clause, catch_fork_command_1)
11041 (catch_exec_command_1): Constify.
11042 * breakpoint.h (init_catchpoint): Constify 'cond_string'
11043 parameter.
11044 (ep_parse_optional_if_clause): Constify.
11045 * cli/cli-utils.c (remove_trailing_whitespace)
11046 (check_for_argument): Constify.
11047 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
11048 non-const overload.
11049 (check_for_argument): Likewise.
11050
11051 2017-04-05 Pedro Alves <palves@redhat.com>
11052
11053 * event-top.c (command_line_handler): Add cast to execute_command
11054 call.
11055 * record-btrace.c (cmd_record_btrace_bts_start)
11056 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
11057 (cmd_record_btrace_start): Add cast to execute_command call.
11058 * record-full.c (record_full_goto_insn):
11059 * record.c (record_start, record_stop): Add cast to
11060 execute_command_to_string calls.
11061 (cmd_record_start): Add cast to execute_command calls.
11062
11063 2017-04-05 Pedro Alves <palves@redhat.com>
11064
11065 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
11066 static inline function.
11067 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
11068 array and use gdb_PyArg_ParseTupleAndKeywords.
11069 * python/py-cmd.c (cmdpy_init): Likewise.
11070 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
11071 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
11072 (infpy_search_memory): Likewise.
11073 * python/py-objfile.c (objfpy_add_separate_debug_file)
11074 (gdbpy_lookup_objfile): Likewise.
11075 * python/py-symbol.c (gdbpy_lookup_symbol)
11076 (gdbpy_lookup_global_symbol): Likewise.
11077 * python/py-type.c (gdbpy_lookup_type): Likewise.
11078 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
11079 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
11080 Likewise.
11081
11082 2017-04-05 Pedro Alves <palves@redhat.com>
11083
11084 * python/python-internal.h (gdb_PyGetSetDef): New type.
11085 * python/py-block.c (block_object_getset)
11086 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
11087 * python/py-event.c (event_object_getset)
11088 (finish_breakpoint_object_getset): Likewise.
11089 * python/py-inferior.c (inferior_object_getset): Likewise.
11090 * python/py-infthread.c (thread_object_getset): Likewise.
11091 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
11092 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
11093 * python/py-objfile.c (objfile_getset): Likewise.
11094 * python/py-progspace.c (pspace_getset): Likewise.
11095 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
11096 Likewise.
11097 * python/py-record.c (recpy_record_getset): Likewise.
11098 * python/py-symbol.c (symbol_object_getset): Likewise.
11099 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
11100 Likewise.
11101 * python/py-type.c (type_object_getset, field_object_getset):
11102 Likewise.
11103 * python/py-value.c (value_object_getset): Likewise.
11104
11105 2017-04-05 Pedro Alves <palves@redhat.com>
11106
11107 * python/python-internal.h (gdb_PyObject_CallMethod)
11108 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
11109 New functions.
11110 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
11111 (PySys_GetObject, PySys_SetPath): New macros.
11112
11113 2017-04-05 Pedro Alves <palves@redhat.com>
11114
11115 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
11116 info_osdata_command.
11117 * osdata.c (info_osdata_command): Rename to ...
11118 (info_osdata): ... this. Constify 'type' parameter, and remove
11119 the 'from_tty' parameter. Accept NULL TYPE.
11120 (info_osdata_command): New function.
11121 * osdata.h (info_osdata_command): Remove declaration.
11122 (info_osdata): New declaration.
11123
11124 2017-04-05 Pedro Alves <palves@redhat.com>
11125
11126 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
11127 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
11128 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
11129 parameter.
11130 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
11131 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
11132 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
11133 parameter.
11134 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
11135 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
11136 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
11137 (mi_cmd_file_list_exec_source_files)
11138 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
11139 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11140 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
11141 parameter.
11142 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
11143 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
11144 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
11145 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
11146 (mi_cmd_stack_info_frame): Constify 'command' parameter.
11147 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
11148 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
11149 'command' parameter.
11150 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
11151 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
11152 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
11153 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
11154 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
11155 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
11156 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
11157 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
11158 (mi_cmd_var_set_update_range): Constify 'command' parameter.
11159 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
11160 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
11161 parameter.
11162 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
11163 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
11164 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
11165 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
11166 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
11167 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
11168 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
11169 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
11170 (mi_cmd_data_list_changed_registers)
11171 (mi_cmd_data_write_register_values)
11172 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
11173 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
11174 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
11175 (mi_cmd_list_features, mi_cmd_list_target_features)
11176 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
11177 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
11178 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
11179 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
11180 (mi_cmd_trace_frame_collected): Constify 'command'
11181 parameter.
11182 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
11183 'command' parameter.
11184
11185 2017-04-05 Pedro Alves <palves@redhat.com>
11186
11187 * ada-lang.c (ada_completer_word_break_characters): Now a const
11188 array.
11189 (ada_get_gdb_completer_word_break_characters): Constify.
11190 * completer.c (gdb_completer_command_word_break_characters)
11191 (gdb_completer_file_name_break_characters)
11192 (gdb_completer_quote_characters): Now const arrays.
11193 (get_gdb_completer_quote_characters): Constify.
11194 (set_rl_completer_word_break_characters): New function.
11195 (set_gdb_completion_word_break_characters)
11196 (complete_line_internal): Use it.
11197 * completer.h (get_gdb_completer_quote_characters): Constify.
11198 (set_rl_completer_word_break_characters): Declare.
11199 * f-lang.c (f_word_break_characters): Constify.
11200 * language.c (default_word_break_characters): Constify.
11201 * language.h (language_defn::la_word_break_characters): Constify.
11202 (default_word_break_characters): Constify.
11203 * top.c (init_main): Use set_rl_completer_word_break_characters.
11204
11205 2017-04-05 Pedro Alves <palves@redhat.com>
11206
11207 * aix-thread.c (aix_thread_pid_to_str)
11208 (aix_thread_extra_thread_info): Constify.
11209 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
11210 * bsd-uthread.c (bsd_uthread_extra_thread_info)
11211 (bsd_uthread_pid_to_str): Constify.
11212 * corelow.c (core_pid_to_str): Constify.
11213 * darwin-nat.c (darwin_pid_to_str): Constify.
11214 * fbsd-nat.c (fbsd_pid_to_str): Constify.
11215 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
11216 Constify.
11217 * gnu-nat.c (gnu_pid_to_str): Constify.
11218 * go32-nat.c (go32_pid_to_str): Constify.
11219 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
11220 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
11221 * inferior.c (inferior_pid_to_str): Constify.
11222 * linux-nat.c (linux_nat_pid_to_str): Constify.
11223 * linux-tdep.c (linux_core_pid_to_str): Constify.
11224 * linux-thread-db.c (thread_db_pid_to_str)
11225 (thread_db_extra_thread_info): Constify.
11226 * nto-tdep.c (nto_extra_thread_info): Constify.
11227 * nto-tdep.h (nto_extra_thread_info): Constify.
11228 * obsd-nat.c (obsd_pid_to_str): Constify.
11229 * procfs.c (procfs_pid_to_str): Constify.
11230 * ravenscar-thread.c (ravenscar_extra_thread_info)
11231 (ravenscar_pid_to_str): Constify.
11232 * remote-sim.c (gdbsim_pid_to_str): Constify.
11233 * remote.c (remote_threads_extra_info, remote_pid_to_str):
11234 Constify.
11235 * sol-thread.c (solaris_pid_to_str): Constify.
11236 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
11237 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
11238 * target.c (default_pid_to_str, target_pid_to_str)
11239 (normal_pid_to_str, default_pid_to_str): Constify.
11240 * target.h (target_ops::to_pid_to_str)
11241 (target_ops::to_extra_thread_info): Constify.
11242 (target_pid_to_str, normal_pid_to_str): Constify.
11243 * windows-nat.c (windows_pid_to_str): Constify.
11244 * gdbarch.sh (core_pid_to_str): Constify.
11245 * target-delegates.c: Regenerate.
11246 * gdbarch.h, gdbarch.c: Regenerate.
11247
11248 2017-04-05 Pedro Alves <palves@redhat.com>
11249
11250 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
11251 the memory of the temporary warning_pre_print override.
11252 * utils.c (warning_pre_print): Constify.
11253 * utils.h (warning_pre_print): Constify.
11254
11255 2017-04-05 Pedro Alves <palves@redhat.com>
11256
11257 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
11258 (shell_command): New function.
11259 (make_command): Use std::string.
11260 (init_cli_cmds): Register shell_command instead of shell_escape.
11261
11262 2017-04-05 Pedro Alves <palves@redhat.com>
11263
11264 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
11265 * tracepoint.c (default_collect): Don't initialize.
11266
11267 2017-04-05 Pedro Alves <palves@redhat.com>
11268
11269 * macroexp.c (macro_buffer::shared): Now a bool.
11270 (init_buffer): Update.
11271 (init_shared_buffer): Constify 'addr' parameter.
11272 (substitute_args, expand, macro_expand, macro_expand_next): Remove
11273 casts.
11274
11275 2017-04-05 Pedro Alves <palves@redhat.com>
11276
11277 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
11278 * disasm.c (set_disassembler_options): Constify local.
11279 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
11280
11281 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
11282
11283 PR gdb/21352
11284 * tracefile.c (tsave_command): Fix argument parsing for '-r'
11285 option.
11286
11287 2017-04-05 Yao Qi <yao.qi@linaro.org>
11288
11289 * frame.c (frame_unwind_register_unsigned): Call
11290 frame_unwind_register_value.
11291
11292 2017-04-05 Yao Qi <yao.qi@linaro.org>
11293
11294 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
11295 Use gdb_test_multiple, and don't match anchor.
11296
11297 2017-04-05 Pedro Alves <palves@redhat.com>
11298
11299 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
11300 (Write After Approval): Remove Simon Marchi.
11301
11302 2017-04-05 Pedro Alves <palves@redhat.com>
11303
11304 * common/gdb_optional.h (optional::optional): Make constexpr and
11305 initialize m_dummy.
11306
11307 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11308
11309 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11310 (amd64fbsd_jmp_buf_reg_offset): Remove.
11311 (amd64fbsd_supply_uthread): Remove function.
11312 (amd64fbsd_collect_uthread): Remove function.
11313 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
11314 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
11315 (x86_64-*-freebsd*): Remove bsd-uthread.o.
11316 (fbsd-nat.c): Update comment.
11317 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
11318 (i386fbsd_jmp_buf_reg_offset): Remove.
11319 (i386fbsd_supply_uthread): Remove function.
11320 (i386fbsd_collect_uthread): Remove function.
11321 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
11322
11323 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11324
11325 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
11326 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
11327 * NEWS: Mention that support for FreeBSD/alpha was removed.
11328 * alpha-fbsd-tdep.c: Delete file.
11329 * config/alpha/fbsd.mh: Delete file.
11330 * configure.host: Delete alpha*-*-freebsd* and
11331 alpha*-*-kfreebsd*-gnu.
11332 * configure.tgt: Delete alpha*-*-freebsd* and
11333 alpha*-*-kfreebsd*-gnu.
11334
11335 2017-04-04 John Baldwin <jhb@FreeBSD.org>
11336
11337 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
11338 amd64bsd_store_inferior_registers): Use ptid from regcache.
11339
11340 2017-04-04 Pedro Alves <palves@redhat.com>
11341
11342 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
11343 data fields, make them private and add "m_" prefixes.
11344 (lnp_state_machine::lnp_state_machine): New ctor.
11345 (record_line, check_line_address, handle_set_discriminator)
11346 (handle_set_address, handle_advance_pc, handle_special_opcode)
11347 (handle_advance_line, handle_set_file, handle_negate_stmt)
11348 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
11349 (end_sequence, advance_line): New methods.
11350 (m_gdbarch, m_record_lines_p): New fields.
11351 (lnp_reader_state): Delete.
11352 (dwarf_record_line): Rename to ...
11353 (lnp_state_machine::record_line): ... adjust.
11354 (init_lnp_state_machine): Delete.
11355 (lnp_state_machine::lnp_state_machine): New.
11356 (check_line_address): Rename to ...
11357 (lnp_state_machine::check_line_address): This.
11358 (dwarf_decode_lines_1): Remove reference to "reader_state".
11359 Adjust lnp_state_machine having a non-default ctor. Use bool.
11360 State machine internal state manipulation moved to
11361 lnp_state_machine methods.
11362
11363 2017-04-04 Pedro Alves <palves@redhat.com>
11364
11365 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11366 unittests/offset-type-selftests.c.
11367 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
11368 * common/offset-type.h: New file.
11369 * common/preprocessor.h: New file.
11370 * common/traits.h: New file.
11371 * common/valid-expr.h: New file.
11372 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
11373 sect_offset and cu_offset strong typedefs throughout.
11374 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
11375 typedefs throughout.
11376 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
11377 sect_offset and cu_offset strong typedefs throughout.
11378 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
11379 typedefs throughout.
11380 * gdbtypes.h: Include "common/offset-type.h".
11381 (cu_offset): Now an offset type (strong typedef) instead of a
11382 struct.
11383 (sect_offset): Likewise.
11384 (union call_site_parameter_u): Rename "param_offset" field to
11385 "param_cu_off".
11386 * unittests/offset-type-selftests.c: New file.
11387
11388 2017-04-04 Pedro Alves <palves@redhat.com>
11389
11390 * common/underlying.h: New file.
11391 * dwarf2read.c: Include "common/gdb_optional.h" and
11392 "common/underlying.h".
11393 (dir_index, file_name_index): New types.
11394 (file_entry): Use them.
11395 (file_entry::include): Use to_underlying.
11396 (line_header::add_file_name): Use dir_index.
11397 (read_formatted_entries): Use gdb::optional. Read form before
11398 writting to file_entry.
11399 (dwarf_decode_line_header): Use dir_index.
11400 (lnp_state_machine::current_file): Use to_underlying.
11401 (lnp_state_machine::file): Change type to file_name_index.
11402 (dwarf_record_line): Use to_underlying.
11403 (init_lnp_state_machine): Use file_name_index.
11404 (dwarf_decode_lines_1): Use dir_index and file_name_index.
11405
11406 2017-04-04 Pedro Alves <palves@redhat.com>
11407
11408 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
11409 operator bool, has_value and get methods.
11410
11411 2017-04-04 Pedro Alves <palves@redhat.com>
11412
11413 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
11414 fields.
11415 (line_header): Initialize all data fields. Change type of
11416 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
11417 Change type of include_dirs to std::vector<const char *>. Remove
11418 num_include_dirs, include_dirs_size. Change type of file_names to
11419 std::vector<file_entry>. Remove num_file_names, file_names_size.
11420 (line_header::line_header): New.
11421 (line_header::add_include_dir, line_header::add_file_name): New
11422 methods.
11423 (line_header::include_dir_at): Remove NULL check.
11424 (line_header::file_name_at): Add const overload.
11425 (line_header_up): New unique_ptr typedef.
11426 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
11427 std::vector. Remove free_line_header call.
11428 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
11429 free_line_header call.
11430 (free_cu_line_header): Delete.
11431 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
11432 (setup_type_unit_groups): Use line_header_up instead of cleanups.
11433 Adjust to use std::vector.
11434 (free_line_header): Delete.
11435 (free_line_header_voidp): Use delete.
11436 (add_include_dir): Replace with ...
11437 (line_header::add_include_dir): ... this method. Use std::vector.
11438 (add_file_name): Replace with ...
11439 (line_header::add_file_name): ... this method. Use std::vector.
11440 (add_include_dir_stub): Delete.
11441 (read_formatted_entries): Remove memset.
11442 (dwarf_decode_line_header): Return a line_header_up instead of a
11443 raw pointer. Remove cleanup handling. Pass lambdas to
11444 read_formatted_entries. Adjust to use line_header methods.
11445 (dwarf_decode_lines_1): Adjust to use line_header methods.
11446 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
11447 use std::vector.
11448
11449 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
11450
11451 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
11452 instead of struct ptid.
11453
11454 2017-05-04 Alan Hayward <alan.hayward@arm.com>
11455
11456 * frame.c (get_frame_register_bytes): Unwind using value.
11457 (put_frame_register_bytes): Likewise.
11458
11459 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
11460
11461 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
11462 aggregate-like.
11463
11464 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
11465
11466 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
11467
11468 2017-03-29 Yao Qi <yao.qi@linaro.org>
11469
11470 * gdbthread.h (struct thread_info): Declare constructor and
11471 destructor. Add some in-class member initializers.
11472 * thread.c (free_thread): Remove.
11473 (init_thread_list): Call delete instead of free_thread.
11474 (new_thread): Call thread_info constructor.
11475 (thread_info::thread_info): New function.
11476 (thread_info::~thread_info): New function.
11477 (delete_thread_1): Call delete instead of free_thread.
11478 (make_cleanup_restore_current_thread): Move tp and frame to
11479 inner block.
11480
11481 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11482
11483 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
11484 (arc_skip_prologue): Likewise.
11485 (arc_make_frame_cache): Likewise.
11486 (arc_pv_get_operand): New function.
11487 (arc_is_in_prologue): Likewise.
11488 (arc_analyze_prologue): Likewise.
11489 (arc_print_frame_cache): Likewise.
11490 (MAX_PROLOGUE_LENGTH): New constant.
11491
11492 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11493
11494 * configure.tgt: Add arc-insn.o.
11495 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
11496 (dump_arc_instruction_command): New function.
11497 (arc_fprintf_disasm): Likewise.
11498 (arc_disassemble_info): Likewise.
11499 (arc_insn_get_operand_value): Likewise.
11500 (arc_insn_get_operand_value_signed): Likewise.
11501 (arc_insn_get_memory_base_reg): Likewise.
11502 (arc_insn_get_memory_offset): Likewise.
11503 (arc_insn_get_branch_target): Likewise.
11504 (arc_insn_dump): Likewise.
11505 (arc_insn_get_linear_next_pc): Likewise.
11506 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
11507 (arc_disassemble_info): Likewise.
11508 (arc_insn_get_branch_target): Likewise.
11509 (arc_insn_get_linear_next_pc): Likewise.
11510 * NEWS: Mention new "maint print arc arc-instruction".
11511
11512 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11513
11514 * arc-tdep (maintenance_print_arc_list): New variable.
11515 (maintenance_print_arc_command): New function.
11516
11517 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
11518
11519 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
11520 Add "limm" and "reserved".
11521 (arc_cannot_fetch_register, arc_cannot_store_register): Add
11522 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
11523 * arc-tdep.h (arc_regnum): Likewise.
11524
11525 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11526
11527 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11528 for THREADPTR register.
11529 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
11530 register.
11531 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
11532 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
11533 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
11534
11535 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11536
11537 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
11538 registers above gdbarch_num_regs (gdbarch) as privileged in
11539 call0 ABI.
11540
11541 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11542
11543 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
11544 for a single specified register or for all registers in
11545 a0_base..a0_base + C0_NREGS range.
11546 (supply_gregset_reg): Call regcache_raw_supply for a single
11547 specified register or for all registers in a0_base..a0_base +
11548 C0_NREGS range.
11549
11550 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11551
11552 * arch/xtensa.h (C0_NREGS): Add definition.
11553 * xtensa-tdep.c (C0_NREGS): Remove definition.
11554
11555 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
11556
11557 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
11558 Drop xtensa_default_isa initialization.
11559 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
11560
11561 2017-03-27 Pedro Alves <palves@redhat.com>
11562
11563 * dwarf2read.c (file_entry) <dir_index>: Add comment.
11564 (file_entry::include_dir): New method.
11565 (line_header::include_dir_at, line_header::file_name_at): New
11566 methods.
11567 (setup_type_unit_groups, setup_type_unit_groups)
11568 (psymtab_include_file_name): Simplify using the new methods.
11569 (lnp_state_machine) <the_line_header>: New field.
11570 <file>: Add comment.
11571 (lnp_state_machine::current_file): New method.
11572 (dwarf_record_line): Simplify using the new methods.
11573 (init_lnp_state_machine): Initialize the "the_line_header" field.
11574 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
11575 Simplify using the new methods.
11576
11577 2017-03-27 Pedro Alves <palves@redhat.com>
11578
11579 * cp-name-parser.y (make_empty): Delete.
11580 (demangler_special, nested_name, ptr_operator, array_indicator)
11581 (direct_declarator, declarator_1): Use fill_comp instead of
11582 make_empty.
11583
11584 2017-03-27 Pedro Alves <palves@redhat.com>
11585
11586 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
11587 to ATTRIBUTE_PRINTF.
11588 * solib-target.c (library_list_start_list): Print "string" not
11589 "version".
11590 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
11591 gdb_xml_error call.
11592
11593 2017-03-27 Pedro Alves <palves@redhat.com>
11594
11595 * dwarf2read.c (struct file_and_directory): New.
11596 (dwarf2_get_dwz_file): Adjust to use std::string.
11597 (dw2_get_file_names_reader): Adjust to use file_and_directory.
11598 (find_file_and_directory): Adjust to return a file_and_directory
11599 object.
11600 (read_file_scope): Adjust to use file_and_directory. Remove
11601 make_cleanup/do_cleanups calls.
11602 (open_and_init_dwp_file): Adjust to use std::string. Remove
11603 make_cleanup/do_cleanups calls.
11604 * python/python.c (do_start_initialization): Adjust to ldirname
11605 returning a std::string.
11606 * utils.c (ldirname): Now returns a std::string.
11607 * utils.h (ldirname): Change return type to std::string.
11608 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
11609 returning a std::string.
11610 * xml-tdesc.c (file_read_description_xml): Likewise.
11611
11612 2017-03-24 Alan Hayward <alan.hayward@arm.com>
11613
11614 * regcache.c (regcache_debug_print_register): New function.
11615 * regcache.h (regcache_debug_print_register): New declaration.
11616 * target.c (debug_print_register): Remove.
11617 (target_fetch_registers): Call regcache_debug_print_register.
11618 (target_store_registers): Likewise.
11619
11620 2017-03-24 Pádraig Brady <pbrady@fb.com>
11621
11622 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
11623 reference beyond the 'lh->include_dirs' array before accessing to
11624 it.
11625 (psymtab_include_file_name): Likewise.
11626 (dwarf_decode_lines_1): Likewise.
11627 (dwarf_decode_lines): Likewise.
11628 (file_file_name): Likewise.
11629
11630 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
11631
11632 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
11633 inferior_ptid.
11634 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11635 ps_lsetfpregs): Likewise.
11636 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
11637 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
11638 ps_lsetfpregs): Likewise.
11639 * target.c (target_fetch_registers, target_store_registers):
11640 Remove asserts.
11641
11642 2017-03-23 Alan Hayward <alan.hayward@arm.com>
11643
11644 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
11645
11646 2017-03-23 Yao Qi <yao.qi@linaro.org>
11647
11648 * aarch64-tdep.c (aarch64_process_record_test): Declare.
11649 (_initialize_aarch64_tdep): Register it.
11650 (aarch64_record_load_store): Handle PRFM instruction.
11651 (aarch64_process_record_test): New function.
11652
11653 2017-03-23 Yao Qi <yao.qi@linaro.org>
11654
11655 * aarch64-tdep.c (aarch64_record_load_store): Fix code
11656 indentation.
11657
11658 2017-03-23 Yao Qi <yao.qi@linaro.org>
11659
11660 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
11661
11662 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11663
11664 python/python.c (do_start_initialization): Fix memory leak.
11665
11666 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
11667
11668 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
11669 using get_ptrace_pid.
11670 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
11671 inferior_ptid.
11672 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
11673 inferior_ptid instead of pid.
11674
11675 2017-03-22 Yao Qi <yao.qi@linaro.org>
11676
11677 * aarch64-tdep.c: Wrap locally used classes in anonymous
11678 namespace.
11679 * arm-tdep.c: Likewise.
11680 * linespec.c: Likewise.
11681 * ui-out.c: Likewise.
11682
11683 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
11684
11685 PR gdb/19637
11686 * python/lib/gdb/printer/bound_registers.py: Import sys.
11687
11688 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11689
11690 * windows-nat.c (do_windows_fetch_inferior_registers): Add
11691 windows_thread_info parameter and use it instead of
11692 current_thread.
11693 (windows_fetch_inferior_registers): Don't set current_thread,
11694 pass the thread to do_windows_fetch_inferior_registers. Use
11695 ptid from regcache instead of inferior_ptid.
11696 (do_windows_store_inferior_registers): Add windows_thread_info
11697 parameter and use it instead of current_thread.
11698 (windows_store_inferior_registers): Don't set current_thread,
11699 pass the thread to do_windows_store_inferior_registers. Use
11700 ptid from regcache instead of inferior_ptid.
11701
11702 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
11703
11704 * ser-mingw.c (ser_windows_raw): Remove reference to
11705 struct serial::current_timeout.
11706
11707 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
11708
11709 PR tdep/20928
11710 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
11711 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
11712 (sparc64_fsr_type): Fix %fsr decoding.
11713
11714 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
11715
11716 * python/py-record-btrace.c (btpy_insn_data): Change return type
11717 for Python 2.
11718
11719 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11720
11721 * spu-linux-nat.c (spu_fetch_inferior_registers,
11722 spu_store_inferior_registers): Use ptid from regcache, set and
11723 restore inferior_ptid.
11724 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
11725 Likewise.
11726
11727 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
11728
11729 * i386-linux-nat.c (fetch_register, store_register,
11730 i386_linux_fetch_inferior_registers,
11731 i386_linux_store_inferior_registers): Use ptid from regcache.
11732 * ia64-linux-nat.c (ia64_linux_fetch_register,
11733 ia64_linux_store_register): Likewise.
11734 * inf-ptrace.c (inf_ptrace_fetch_register,
11735 inf_ptrace_store_register): Likewise.
11736 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
11737 m32r_linux_store_inferior_registers): Likewise.
11738 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
11739 m68kbsd_store_inferior_registers): Likewise.
11740 * m68k-linux-nat.c (fetch_register, store_register,
11741 m68k_linux_fetch_inferior_registers,
11742 m68k_linux_store_inferior_registers): Likewise.
11743 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
11744 m88kbsd_store_inferior_registers): Likewise.
11745 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
11746 mips_fbsd_store_inferior_registers): Likewise.
11747 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
11748 mips64_linux_regsets_store_registers): Likewise.
11749 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
11750 mipsnbsd_store_inferior_registers): Likewise.
11751 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
11752 mips64obsd_store_inferior_registers): Likewise.
11753 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
11754 Likewise.
11755 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
11756 ppcfbsd_store_inferior_registers): Likewise.
11757 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
11758 ppc_linux_store_inferior_registers): Likewise.
11759 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
11760 ppcnbsd_store_inferior_registers): Likewise.
11761 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
11762 ppcobsd_store_registers): Likewise.
11763 * procfs.c (procfs_fetch_registers, procfs_store_registers):
11764 Likewise.
11765 * ravenscar-thread.c (ravenscar_fetch_registers,
11766 ravenscar_store_registers, ravenscar_prepare_to_store):
11767 Likewise.
11768 * record-btrace.c (record_btrace_fetch_registers,
11769 record_btrace_store_registers, record_btrace_prepare_to_store):
11770 Likewise.
11771 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
11772 Lookup inferior using ptid from regcache, instead of
11773 current_inferior.
11774 * remote.c (remote_fetch_registers, remote_store_registers): Use
11775 ptid from regcache.
11776 * rs6000-nat.c (fetch_register, store_register): Likewise.
11777 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
11778 s390_linux_store_inferior_registers): Likewise.
11779 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
11780 shnbsd_store_inferior_registers): Likewise.
11781 * sol-thread.c (sol_thread_fetch_registers,
11782 sol_thread_store_registers): Likewise.
11783 * sparc-nat.c (sparc_fetch_inferior_registers,
11784 sparc_store_inferior_registers): Likewise.
11785 * tilegx-linux-nat.c (fetch_inferior_registers,
11786 store_inferior_registers): Likewise.
11787 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
11788 vaxbsd_store_inferior_registers): Likewise.
11789 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
11790 store_xtregs): Likewise.
11791
11792 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11793
11794 PR gdb/14441
11795 * NEWS: Mention support for rvalue references in GDB and python.
11796 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
11797 supports both lvalue and rvalue references.
11798
11799 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11800
11801 PR gdb/14441
11802 * gdbtypes.c (rank_one_type): Implement overloading
11803 resolution rules regarding rvalue references.
11804
11805 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11806
11807 PR gdb/14441
11808 * aarch64-tdep.c (aarch64_type_align)
11809 (aarch64_extract_return_value, aarch64_store_return_value): Change
11810 lvalue reference type checks to general reference type checks.
11811 * amd64-tdep.c (amd64_classify): Likewise.
11812 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
11813 Likewise.
11814 * arm-tdep.c (arm_type_align, arm_extract_return_value)
11815 (arm_store_return_value): Likewise.
11816 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
11817 * c-typeprint.c (c_print_type): Likewise.
11818 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
11819 (cplus_number_of_children, cplus_describe_child): Likewise.
11820 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
11821 * completer.c (expression_completer): Likewise.
11822 * cp-support.c (make_symbol_overload_list_adl_namespace):
11823 Likewise.
11824 * darwin-nat-info.c (info_mach_region_command): Likewise.
11825 * dwarf2loc.c (entry_data_value_coerce_ref)
11826 (value_of_dwarf_reg_entry): Likewise.
11827 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
11828 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
11829 Likewise.
11830 * findvar.c (extract_typed_address, store_typed_address):
11831 Likewise.
11832 * gdbtypes.c (rank_one_type): Likewise.
11833 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
11834 * infcall.c (value_arg_coerce): Likewise.
11835 * language.c (pointer_type): Likewise.
11836 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
11837 Likewise.
11838 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
11839 * mn10300-tdep.c (mn10300_type_align): Likewise.
11840 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
11841 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
11842 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
11843 Likewise.
11844 * printcmd.c (print_formatted, x_command): Likewise.
11845 * python/py-type.c (typy_get_composite, typy_template_argument):
11846 Likewise.
11847 * python/py-value.c (valpy_referenced_value)
11848 (valpy_get_dynamic_type, value_has_field): Likewise.
11849 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
11850 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
11851 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
11852 * spu-tdep.c (spu_scalar_value_p): Likewise.
11853 * symtab.c (lookup_symbol_aux): Likewise.
11854 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
11855 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
11856 Likewise.
11857 * valops.c (value_cast_pointers, value_cast)
11858 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
11859 (value_struct_elt, value_struct_elt_bitpos)
11860 (value_find_oload_method_list, find_overload_match)
11861 (value_rtti_indirect_type): Likewise.
11862 * valprint.c (val_print_scalar_type_p, generic_val_print):
11863 Likewise.
11864 * value.c (value_actual_type, value_as_address, unpack_long)
11865 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
11866 (coerce_ref): Likewise.
11867 * varobj.c (varobj_get_value_type): Likewise.
11868
11869 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11870
11871 PR gdb/14441
11872 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
11873 table of constants.
11874 * python/lib/gdb/command/explore.py: Support exploring values
11875 of rvalue reference types.
11876 * python/lib/gdb/types.py: Implement get_basic_type() for
11877 rvalue reference types.
11878 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
11879 constant.
11880 * python/py-value.c (valpy_getitem): Add an rvalue reference
11881 check.
11882 (valpy_reference_value): Add new parameter "refcode".
11883 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
11884 New wrappers for valpy_reference_value().
11885 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11886 (gdbpy_invoke_xmethod): Likewise.
11887
11888 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11889
11890 PR gdb/14441
11891 * dwarf2read.c (process_die, read_type_die_1): Handle the
11892 DW_TAG_rvalue_reference_type DIE.
11893 (read_tag_reference_type): Add new parameter "refcode".
11894
11895 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11896
11897 PR gdb/14441
11898 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
11899 (c_type_print_modifier, c_type_print_varspec_suffix)
11900 (c_type_print_base): Support printing rvalue reference types.
11901 * c-valprint.c (c_val_print, c_value_print): Support printing
11902 rvalue reference values.
11903
11904 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11905
11906 PR gdb/14441
11907 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
11908 typename.
11909 * cp-support.c (replace_typedefs): Handle
11910 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
11911 * python/py-type.c (typy_lookup_type): Likewise.
11912
11913 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11914
11915 PR gdb/14441
11916 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
11917 * parse.c (insert_type): Change assert statement.
11918 (follow_types): Handle rvalue reference types.
11919 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
11920 constant.
11921
11922 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11923
11924 PR gdb/14441
11925 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
11926 value_ref() interface.
11927 * c-valprint.c (c_value_print): Likewise.
11928 * infcall.c (value_arg_coerce): Likewise.
11929 * python/py-value.c (valpy_reference_value): Likewise.
11930 * valops.c (value_cast, value_reinterpret_cast)
11931 (value_dynamic_cast, typecmp): Likewise.
11932 (value_ref): Parameterize by kind of return value reference type.
11933 * value.h (value_ref): Add new parameter "refcode".
11934
11935 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11936
11937 PR gdb/14441
11938 * dwarf2read.c (read_tag_reference_type): Use
11939 lookup_lvalue_reference_type() instead of lookup_reference_type().
11940 * eval.c (evaluate_subexp_standard): Likewise.
11941 * f-exp.y: Likewise.
11942 * gdbtypes.c (make_reference_type, lookup_reference_type):
11943 Generalize with rvalue reference types.
11944 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
11945 convenience wrappers for lookup_reference_type().
11946 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
11947 reference kind parameter.
11948 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
11949 wrappers for lookup_reference_type().
11950 * guile/scm-type.c (gdbscm_type_reference): Use
11951 lookup_lvalue_reference_type() instead of lookup_reference_type().
11952 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
11953 * parse.c (follow_types): Likewise.
11954 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
11955 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
11956 Likewise.
11957 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
11958 (gdbpy_invoke_xmethod): Likewise.
11959 * stabsread.c: Provide extra argument to make_reference_type()
11960 call.
11961 * valops.c (value_ref, value_rtti_indirect_type): Use
11962 lookup_lvalue_reference_type() instead of lookup_reference_type().
11963
11964 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
11965
11966 PR gdb/14441
11967 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
11968 (TYPE_IS_REFERENCE): New macro.
11969 (struct type): Add rvalue_reference_type field.
11970 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
11971
11972 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11973
11974 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
11975 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
11976 New function definition.
11977 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
11978 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
11979 New function declaration.
11980 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
11981 * mi/mi-interp.h: New file.
11982 * solib.c (info_sharedlibrary_command): Replace for loop with
11983 ALL_SO_LIBS macro
11984 * solib.h (update_solib_list): New function declaration.
11985 (so_list_head): Move macro.
11986 * solist.h (ALL_SO_LIBS): New macro.
11987
11988 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
11989
11990 * infcmd.c (post_create_inferior): Remove unused argument in
11991 call to solib_add.
11992 * remote.c (remote_start_remote): Likewise.
11993 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
11994 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
11995 (enable_break): Likewise.
11996 * solib.c (update_solib_list): Remove unused target argument
11997 and its documentation.
11998 (solib_add): Remove unused target argument. Remove unused
11999 argument in call to update_solib_list.
12000 (info_sharedlibrary_command): Remove unused argument in call
12001 to update_solib_list.
12002 (sharedlibrary_command): Remove unused argument in call to
12003 solib_add.
12004 (handle_solib_event): Likewise.
12005 (reload_shared_libraries): Likewise.
12006 * solib.h (solib_add): Remove unused target argument.
12007
12008 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
12009
12010 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
12011 (s390_displaced_step_fixup): Cover relative branches with the
12012 default fixup handling. This fixes lack of support for some
12013 relative branch instructions.
12014
12015 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12016
12017 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
12018 ptid from regcache.
12019
12020 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12021
12022 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
12023 i386_darwin_store_inferior_registers): Use ptid from regcache.
12024
12025 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12026
12027 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
12028 i386bsd_store_inferior_registers): Use ptid from regcache.
12029
12030 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12031
12032 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
12033 hppaobsd_store_registers): Use ptid from regcache.
12034
12035 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12036
12037 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
12038 hppanbsd_store_registers): Use ptid from regcache.
12039
12040 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12041
12042 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
12043 from regcache. Use get_ptrace_pid.
12044
12045 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12046
12047 * corelow.c (get_core_register_section): Use ptid from regcache,
12048 update doc.
12049
12050 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12051
12052 * bsd-uthread.c (bsd_uthread_fetch_registers,
12053 bsd_uthread_store_registers): Use ptid from regcache, set and
12054 restore inferior_ptid.
12055
12056 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12057
12058 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
12059 fetch_fp_regs, store_register, store_regs, store_fp_register,
12060 store_fp_regs): Use ptid from regcache.
12061
12062 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
12063
12064 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
12065 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
12066 store_vfp_regs): Use ptid from regcache.
12067
12068 2017-03-17 Pedro Alves <palves@redhat.com>
12069
12070 PR remote/21188
12071 * ser-base.c (ser_base_wait_for): Add comment.
12072 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
12073 version.
12074 * ser-unix.c (hardwire_raw): Remove reference to
12075 scb->current_timeout.
12076 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
12077 (hardwire_ops): Install ser_base_readchar instead of
12078 hardwire_readchar.
12079 * serial.h (struct serial) <current_timeout, timeout_remaining>:
12080 Remove fields.
12081
12082 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
12083
12084 PR gdb/19637
12085 * python/lib/gdb/printer/bound_registers.py: Add support for
12086 Python 3.
12087
12088 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
12089
12090 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
12091 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
12092 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
12093 byte_offset to subobj_byte_offset. Fix the handling of
12094 DWARF_VALUE_STACK on big-endian targets when coming via an
12095 implicit pointer.
12096 (dwarf2_evaluate_loc_desc): Adjust call to
12097 dwarf2_evaluate_loc_desc_full.
12098 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
12099 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
12100
12101 2017-03-16 Yao Qi <yao.qi@linaro.org>
12102
12103 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
12104 and REVSH instructions.
12105
12106 2017-03-16 Yao Qi <yao.qi@linaro.org>
12107
12108 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
12109 (arm_record_test): Declare.
12110 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
12111 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
12112 align with the manual.
12113 (thumb_record_misc): Adjust the code order to align with the
12114 manual.
12115 (thumb2_record_decode_insn_handler): Fix instruction matching.
12116 (instruction_reader_thumb): New class.
12117 (arm_record_test): New function.
12118
12119 2017-03-16 Yao Qi <yao.qi@linaro.org>
12120
12121 * arm-tdep.c (abstract_memory_reader): New class.
12122 (instruction_reader): New class.
12123 (extract_arm_insn): Add argument 'reader'. Callers updated.
12124 (decode_insn): Likewise.
12125
12126 2017-03-16 Doug Evans <dje@google.com>
12127
12128 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
12129 member. Change type of TYPE member to SCM. All uses updated.
12130 (lsscm_make_lazy_string_smob): Add assert.
12131 (lsscm_make_lazy_string): Flag bad length values.
12132 (lsscm_elt_type): New function.
12133 (gdbscm_lazy_string_to_value): Rewrite to use
12134 lsscm_safe_lazy_string_to_value.
12135 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
12136 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
12137 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
12138 in incoming type.
12139 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12140 * guile/scm-type.c (tyscm_scm_to_type): New function.
12141
12142 2017-03-15 Doug Evans <dje@google.com>
12143
12144 PR python/17728, python/18439, python/18779
12145 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
12146 member. Change type of TYPE member to PyObject *. All uses updated.
12147 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
12148 (gdbpy_create_lazy_string_object): Flag bad length values.
12149 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
12150 Handle typedefs in incoming type.
12151 (stpy_lazy_string_elt_type): New function.
12152 (gdbpy_extract_lazy_string): Call it.
12153 * python/py-value.c (valpy_lazy_string): Flag bad length values.
12154 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
12155 typedefs in incoming type.
12156
12157 2017-03-16 Doug Evans <dje@google.com>
12158
12159 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
12160 * guile/scm-type.c (tyscm_scm_to_type): New function.
12161
12162 2017-03-16 Jiong Wang <jiong.wang@arm.com>
12163
12164 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
12165 "ULONGEST" for "skip".
12166
12167 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12168
12169 PR gdb/21220
12170 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
12171 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
12172 (inf_ptrace_peek_poke): ...here. New function. Now also loop
12173 over ptrace peek/poke until end of buffer or error.
12174
12175 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
12176
12177 * parse.c (length_of_subexp): Make static.
12178 * parser-defs.h (length_of_subexp): Remove.
12179
12180 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
12181
12182 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
12183 as well.
12184
12185 2017-03-14 Pedro Alves <palves@redhat.com>
12186
12187 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
12188 (main): Use std::unique_ptr. Remove calls to
12189 cp_demangled_name_parse_free.
12190
12191 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12192
12193 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
12194 alphabsd_store_inferior_registers): Use regcache->ptid instead
12195 of inferior_ptid.
12196
12197 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12198
12199 * aix-thread.c (aix_thread_fetch_registers,
12200 aix_thread_store_registers): Use regcache->ptid instead of
12201 inferior_ptid.
12202
12203 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12204
12205 * aarch64-linux-nat.c (fetch_gregs_from_thread,
12206 store_gregs_to_thread, fetch_fpregs_from_thread,
12207 store_fpregs_to_thread): Use regcache->ptid instead of
12208 inferior_ptid.
12209
12210 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12211
12212 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
12213 amd64_linux_fetch_inferior_registers): Use regcache->ptid
12214 instead of inferior_ptid.
12215
12216 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12217
12218 * target.c (target_fetch_registers, target_store_registers): Add
12219 assert.
12220
12221 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
12222
12223 * regcache.h (regcache_get_ptid): New function.
12224 * regcache.c (regcache_get_ptid): New function.
12225
12226 2017-03-13 Mark Wielaard <mark@klomp.org>
12227
12228 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
12229
12230 2017-03-10 Keith Seitz <keiths@redhat.com>
12231
12232 PR c++/8218
12233 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
12234
12235 2017-03-08 Pedro Alves <palves@redhat.com>
12236
12237 PR gdb/18360
12238 * infrun.c (start_step_over, do_target_resume, resume)
12239 (restart_threads): Assert we're not resuming a thread that is
12240 meant to be stopped.
12241 (infrun_thread_stop_requested_callback): Delete.
12242 (infrun_thread_stop_requested): If the thread is internally
12243 stopped, queue a pending stop event and clear the thread's
12244 inline-frame state.
12245 (handle_stop_requested): New function.
12246 (handle_syscall_event, handle_inferior_event_1): Use
12247 handle_stop_requested.
12248 (handle_stop_requested): New function.
12249 (handle_signal_stop): Set the thread's stop_signal here instead of
12250 at caller.
12251 (finish_step_over): Clear step over info unconditionally.
12252 (handle_signal_stop): If the user had interrupted the event
12253 thread, consider the stop a random signal.
12254 (handle_signal_stop) <signal arrived while stepping over
12255 breakpoint>: Don't restart threads here.
12256 (stop_waiting): Don't clear step-over info here.
12257
12258 2017-03-08 Pedro Alves <palves@redhat.com>
12259
12260 PR 21206
12261 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
12262 goes to argument 2, not 1.
12263
12264 2017-03-08 Pedro Alves <palves@redhat.com>
12265
12266 PR cli/21218
12267 * top.c (gdb_readline_wrapper): Avoid passing NULL to
12268 display_gdb_prompt.
12269 (command_line_input): Add comment.
12270
12271 2017-03-08 Pedro Alves <palves@redhat.com>
12272
12273 PR tui/21216
12274 * tui/tui-file.c (tui_file::write): New.
12275 * tui/tui-file.h (tui_file): Override "write".
12276 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
12277 factored out from ...
12278 (tui_puts): ... here.
12279 (tui_putc): Use them.
12280 (tui_write): New function.
12281 * tui/tui-io.h (tui_write): Declare.
12282
12283 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
12284
12285 * Makefile.in (SFILES): Replace "environ.c" with
12286 "common/environ.c".
12287 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
12288 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
12289 to...
12290 * common/environ.c: ... here.
12291 * environ.h: Moved to...
12292 * common/environ.h: ... here.
12293
12294 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12295
12296 * gdbarch.sh (pstring_ptr): New static function.
12297 (gdbarch_disassembler_options): Use it.
12298 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
12299 not valid_disassembler_option->name.
12300 * gdbarch.c: Regenerate.
12301
12302 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
12303
12304 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
12305
12306 2017-03-07 Pedro Alves <palves@redhat.com>
12307
12308 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
12309
12310 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
12311
12312 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
12313 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
12314 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
12315 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
12316
12317 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
12318
12319 * xtensa-linux-nat.c (fetch_gregs): Remove const.
12320
12321 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
12322
12323 * remote.c (remote_add_target_side_commands): Use range-based
12324 for loop.
12325
12326 2017-03-03 Yao Qi <yao.qi@linaro.org>
12327
12328 PR gdb/21165
12329 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
12330 value is lazy.
12331 * valprint.c (common_val_print): Likewise.
12332
12333 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
12334
12335 * NEWS: Mention new set/show disassembler-options commands.
12336 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
12337 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
12338 (prospective_options): New static variable.
12339 (gdb_disassembler::gdb_disassembler): Initialize
12340 m_di.disassembler_options.
12341 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
12342 (get_disassembler_options): New function.
12343 (set_disassembler_options): Likewise.
12344 (set_disassembler_options_sfunc): Likewise.
12345 (show_disassembler_options_sfunc): Likewise.
12346 (disassembler_options_completer): Likewise.
12347 (_initialize_disasm): Likewise.
12348 * disasm.h (get_disassembler_options): New prototype.
12349 (set_disassembler_options): Likewise.
12350 * gdbarch.sh (gdbarch_disassembler_options): New variable.
12351 (gdbarch_verify_disassembler_options): Likewise.
12352 * gdbarch.c: Regenerate.
12353 * gdbarch.h: Likewise.
12354 * arm-tdep.c (num_disassembly_options): Delete.
12355 (set_disassembly_style): Likewise.
12356 (arm_disassembler_options): New static variable.
12357 (set_disassembly_style_sfunc): Convert short style name into long
12358 option name. Call set_disassembler_options.
12359 (show_disassembly_style_sfunc): New function.
12360 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
12361 set_gdbarch_verify_disassembler_options.
12362 (_initialize_arm_tdep): Delete regnames variable and update callers.
12363 (arm_disassembler_options): Initialize.
12364 (disasm_options): New variable.
12365 (num_disassembly_options): Rename from this...
12366 (num_disassembly_styles): ...to this. Compute by scanning through
12367 disasm_options.
12368 (valid_disassembly_styles): Initialize using disasm_options.
12369 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
12370 set_arm_regname_option.
12371 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
12372 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
12373 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
12374 set_gdbarch_verify_disassembler_options.
12375 * s390-tdep.c (s390_disassembler_options): New static variable.
12376 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
12377 set_gdbarch_verify_disassembler_options.
12378
12379 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12380
12381 * remote.c (remote_add_target_side_condition): Remove "struct"
12382 keyword from range-based for loop.
12383
12384 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
12385
12386 * remote.c (remote_add_target_side_condition): Use range-based
12387 for loop. Update comment.
12388
12389 2017-02-27 Yao Qi <yao.qi@linaro.org>
12390
12391 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
12392
12393 2017-02-26 Alan Hayward <alan.hayward@arm.com>
12394
12395 * regcache.c (regcache_raw_update): New function.
12396 (regcache_raw_read): Move code to regcache_raw_update.
12397 * regcache.h (regcache_raw_update): New declaration.
12398 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
12399
12400 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
12401
12402 * dwarf2read.c (create_debug_type_hash_table): Initialize
12403 header.signature and header.type_offset_in_tu.
12404
12405 2017-02-24 Pedro Alves <palves@redhat.com>
12406
12407 * symtab.c (make_file_symbol_completion_list_1): Use
12408 add_symtab_completions.
12409
12410 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12411
12412 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
12413
12414 2017-02-24 Alan Hayward <alan.hayward@arm.com>
12415
12416 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
12417 I386_MAX_REGISTER_SIZE.
12418 (i386_pseudo_register_write): Likewise.
12419 (i386_process_record): Likewise.
12420 * i387-tdep.c (i387_supply_xsave): Likewise.
12421 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
12422 (store_register): Likewise.
12423
12424 2017-02-23 Pedro Alves <palves@redhat.com>
12425
12426 * ada-lang.c: Include "common/function-view.h".
12427 (ada_iterate_over_symbols): Adjust to use function_view as
12428 callback type.
12429 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
12430 (ada_make_symbol_completion_list): Use a lambda.
12431 (ada_exc_search_name_matches): Delete.
12432 (name_matches_regex): New.
12433 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
12434 * compile/compile-c-support.c: Include "common/function-view.h".
12435 (print_one_macro): Change prototype to accept a ui_file pointer.
12436 (write_macro_definitions): Use a lambda.
12437 * dwarf2read.c: Include "common/function-view.h".
12438 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
12439 (dw2_expand_symtabs_matching): Adjust to use function_view as
12440 callback type.
12441 * language.h: Include "common/function-view.h".
12442 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
12443 function_view as callback type.
12444 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
12445 * linespec.c: Include "common/function-view.h".
12446 (collect_info::add_symbol): New method.
12447 (struct symbol_and_data_callback, iterate_inline_only, struct
12448 symbol_matcher_data, iterate_name_matcher): Delete.
12449 (iterate_over_all_matching_symtabs): Adjust to use function_view
12450 as callback type and lambdas.
12451 (iterate_over_file_blocks): Adjust to use function_view as
12452 callback type.
12453 (decode_compound_collector): Now a class with private fields.
12454 (decode_compound_collector::release_symbols): New method.
12455 (collect_one_symbol): Rename to...
12456 (decode_compound_collector::operator()): ... this and adjust.
12457 (lookup_prefix_sym): decode_compound_collector construction bits
12458 move to decode_compound_collector ctor. Pass the
12459 decode_compound_collector object directly as callback. Remove
12460 cleanups and use decode_compound_collector::release_symbols
12461 instead.
12462 (symtab_collector): Now a class with private fields.
12463 (symtab_collector::release_symtabs): New method.
12464 (add_symtabs_to_list): Rename to...
12465 (symtab_collector::operator()): ... this and adjust.
12466 (collect_symtabs_from_filename): symtab_collector construction
12467 bits move to symtab_collector ctor. Pass the symtab_collector
12468 object directly as callback. Remove cleanups and use
12469 symtab_collector::release_symtabs instead.
12470 (collect_symbols): Delete.
12471 (add_matching_symbols_to_info): Use lambdas.
12472 * macrocmd.c (print_macro_callback): Delete.
12473 (info_macro_command): Use a lambda.
12474 (info_macros_command): Pass print_macro_definition as callable
12475 directly.
12476 (print_one_macro): Remove 'ignore' parameter.
12477 (macro_list_command): Adjust.
12478 * macrotab.c (macro_for_each_data::fn): Now a function_view.
12479 (macro_for_each_data::user_data): Delete field.
12480 (foreach_macro): Adjust to call the function_view.
12481 (macro_for_each): Adjust to use function_view as callback type.
12482 (foreach_macro_in_scope): Adjust to call the function_view.
12483 (macro_for_each_in_scope): Adjust to use function_view as callback
12484 type.
12485 * macrotab.h: Include "common/function-view.h".
12486 (macro_callback_fn): Declare a prototype instead of a pointer.
12487 Remove "user_data" parameter.
12488 (macro_for_each, macro_for_each_in_scope): Adjust to use
12489 function_view as callback type.
12490 * psymtab.c (partial_map_expand_apply)
12491 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
12492 Adjust to use function_view as callback type and to return bool.
12493 (psym_expand_symtabs_matching): Adjust to use function_view as
12494 callback types.
12495 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
12496 to use function_view as callback type and to return bool.
12497 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
12498 callback types.
12499 * symfile.c (expand_symtabs_matching): Adjust to use function_view
12500 as callback types.
12501 * symfile.h: Include "common/function-view.h".
12502 (expand_symtabs_file_matcher_ftype)
12503 (expand_symtabs_symbol_matcher_ftype)
12504 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
12505 return bool.
12506 (quick_symbol_functions::map_symtabs_matching_filename)
12507 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
12508 function_view as callback type and return bool.
12509 (expand_symtabs_matching): Adjust to use function_view as callback
12510 type.
12511 (maintenance_expand_name_matcher)
12512 (maintenance_expand_file_matcher): Delete.
12513 (maintenance_expand_symtabs): Use lambdas.
12514 * symtab.c (iterate_over_some_symtabs): Adjust to use
12515 function_view as callback types and return bool.
12516 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
12517 of a cleanup.
12518 (lookup_symtab_callback): Delete.
12519 (lookup_symtab): Use a lambda.
12520 (iterate_over_symbols): Adjust to use function_view as callback
12521 type.
12522 (struct search_symbols_data, search_symbols_file_matches)
12523 (search_symbols_name_matches): Delete.
12524 (search_symbols): Use a pair of lambdas.
12525 (struct add_name_data, add_macro_name, symbol_completion_matcher)
12526 (symtab_expansion_callback): Delete.
12527 (default_make_symbol_completion_list_break_on_1): Use lambdas.
12528 * symtab.h: Include "common/function-view.h".
12529 (iterate_over_some_symtabs): Adjust to use function_view as
12530 callback type and return bool.
12531 (iterate_over_symtabs): Adjust to use function_view as callback
12532 type.
12533 (symbol_found_callback_ftype): Remove 'data' parameter and return
12534 bool.
12535 (iterate_over_symbols): Adjust to use function_view as callback
12536 type.
12537
12538 2017-02-23 Pedro Alves <palves@redhat.com>
12539
12540 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
12541 (%.o) <unittests/%.c>: New pattern.
12542 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
12543 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
12544 * common/function-view.h: New file.
12545 * unittests/function-view-selftests.c: New file.
12546 * configure: Regenerate.
12547
12548 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
12549
12550 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
12551 inferior_ptid.
12552 * go32-nat.c (go32_thread_alive): Likewise.
12553
12554 2017-02-23 Yao Qi <yao.qi@linaro.org>
12555
12556 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
12557 delete.
12558
12559 2017-02-23 Yao Qi <yao.qi@linaro.org>
12560
12561 * varobj.c (varobj_clear_saved_item): Use delete instead of
12562 xfree.
12563 (update_dynamic_varobj_children): Likewise.
12564
12565 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12566
12567 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
12568
12569 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
12570
12571 * common/enum-flags.h (enum_flags::enum_flags): Initialize
12572 m_enum_value to 0 in default constructor.
12573
12574 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12575
12576 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
12577 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
12578 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
12579 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
12580 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
12581 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
12582 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
12583 IS_STORE_CONDITIONAL_INSN.
12584
12585 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12586
12587 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
12588
12589 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12590
12591 * NEWS (Changes since GDB 7.12): Add DWARF-5.
12592
12593 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12594
12595 * dwarf2read.c (skip_one_die, read_attribute_value)
12596 (dwarf2_const_value_attr, dump_die_shallow)
12597 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
12598 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
12599
12600 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12601
12602 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
12603 (dwarf_parse_macro_header): Accept DWARF version 5.
12604 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
12605
12606 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12607
12608 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
12609 DW_AT_GNU_*.
12610 * common/common-exceptions.h (enum errors): Likewise.
12611 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
12612 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
12613 (dwarf_expr_context::execute_stack_op): Likewise.
12614 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
12615 Likewise.
12616 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
12617 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
12618 (show_entry_values_debug, call_site_to_target_addr)
12619 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
12620 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
12621 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
12622 (value_of_dwarf_block_entry, indirect_pieced_value)
12623 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
12624 (disassemble_dwarf_expression): Likewise.
12625 * dwarf2read.c (process_die, inherit_abstract_dies)
12626 (read_call_site_scope): Likewise.
12627 * gdbtypes.h (struct func_type, struct call_site_parameter)
12628 (struct call_site): Likewise.
12629 * stack.c (read_frame_arg): Likewise.
12630 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
12631
12632 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12633
12634 * defs.h (read_unsigned_leb128): New declaration.
12635 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
12636 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
12637 (dwarf2_find_location_expression): Call also
12638 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
12639 * dwarf2loc.h (dwarf2_version): New declaration.
12640 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
12641 rnglists.
12642 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
12643 .debug_rnglists.
12644 (struct dwop_section_names): Add loclists_dwo.
12645 (dwop_section_names): Add .debug_loclists.dwo.
12646 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
12647 (struct dwarf2_per_cu_data): Add dwarf_version.
12648 (struct dwo_sections): Add loclists.
12649 (struct attr_abbrev): Add implicit_const.
12650 (read_indirect_line_string): New declaration.
12651 (read_unsigned_leb128): Delete declaration.
12652 (rcuh_kind): New definition.
12653 (read_and_check_comp_unit_head): Change parameter
12654 is_debug_types_section to section_kind.
12655 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
12656 (read_comp_unit_head): Change parameter abfd to section, add parameter
12657 section_kind. Handle DWARF-5.
12658 (error_check_comp_unit_head): Accept also DWARF version 5.
12659 (read_and_check_comp_unit_head): Change parameter
12660 is_debug_types_section to section_kind.
12661 (read_and_check_type_unit_head): Delete function.
12662 (read_abbrev_offset): Handle DWARF-5.
12663 (create_debug_type_hash_table): Add parameter section_kind. Process
12664 only DW_UT_type. Use signature and type_offset_in_tu from struct
12665 comp_unit_head.
12666 (create_debug_types_hash_table): Update create_debug_type_hash_table
12667 caller.
12668 (create_all_type_units): Call create_debug_type_hash_table.
12669 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
12670 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
12671 caller.
12672 (skip_one_die): Handle DW_FORM_implicit_const.
12673 (dwarf2_rnglists_process): New function.
12674 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
12675 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
12676 (read_attribute_value): Handle DW_FORM_implicit_const,
12677 DW_FORM_line_strp.
12678 (read_attribute): Handle DW_FORM_implicit_const.
12679 (read_indirect_string_at_offset_from): New function from
12680 read_indirect_string_at_offset.
12681 (read_indirect_string_at_offset): Call
12682 read_indirect_string_at_offset_from.
12683 (read_indirect_line_string_at_offset): New function.
12684 (read_indirect_string): New function comment.
12685 (read_indirect_line_string): New function.
12686 (read_unsigned_leb128): Make it global.
12687 (dwarf2_string_attr): Handle DWARF-5.
12688 (add_include_dir_stub, read_formatted_entries): New functions.
12689 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
12690 Handle DWARF-5.
12691 (per_cu_header_read_in): Update read_comp_unit_head caller.
12692 (dwarf2_version): New function.
12693 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
12694 rnglists.
12695 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
12696 fields.
12697
12698 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12699
12700 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
12701
12702 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12703
12704 * dwarf2read.c (dwarf2_ranges_process): New function from
12705 dwarf2_ranges_read.
12706 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
12707 dwarf2_ranges_process.
12708
12709 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
12710
12711 * dwarf2read.c (create_debug_type_hash_table): New function from
12712 create_debug_types_hash_table.
12713 (create_debug_types_hash_table): Call create_debug_type_hash_table.
12714 (create_all_type_units, open_and_init_dwo_file): Update
12715 create_debug_types_hash_table callers.
12716
12717 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12718
12719 PR gdb/16188
12720 * fork-child.c (trace_start_error): Fix thinko. va_end should
12721 refer to 'ap', not 'args'.
12722
12723 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
12724 Pedro Alves <palves@redhat.com>
12725
12726 PR gdb/16188
12727 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
12728 calls succeeded.
12729 * fork-child.c (trace_start_error): New function.
12730 (trace_start_error_with_name): Likewise.
12731 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
12732 * inf-ptrace.c (inf_ptrace_me): Likewise.
12733 * inferior.h (trace_start_error): New prototype.
12734 (trace_start_error_with_name): Likewise.
12735
12736 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
12737
12738 PR gdb/21164
12739 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
12740 NULL before using it.
12741 * symmisc.c (maintenance_print_symbols): Likewise.
12742 (maintenance_print_msymbols): Likewise.
12743
12744 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12745
12746 * NEWS: Add record Python bindings entry.
12747
12748 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12749
12750 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
12751 py-record-full.o.
12752 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
12753 * python/py-record-btrace.c, python/py-record-btrace.h,
12754 python/py-record-full.c, python/py-record-full.h: New file.
12755 * python/py-record.c: Add include for py-record-btrace.h and
12756 py-record-full.h.
12757 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
12758 recpy_instruction_history, recpy_function_call_history, recpy_begin,
12759 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
12760 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
12761 New definition.
12762 (gdbpy_initialize_btrace): New export.
12763 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
12764
12765 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12766
12767 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
12768 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
12769 * python/py-record.c: New file.
12770 * python/python-internal.h (gdbpy_start_recording,
12771 gdbpy_current_recording, gdpy_stop_recording,
12772 gdbpy_initialize_record): New export.
12773 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
12774 (python_GdbMethods): Add gdbpy_start_recording,
12775 gdbpy_current_recording and gdbpy_stop_recording.
12776
12777 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12778
12779 * record-btrace.c (record_btrace_record_method): New function.
12780 (init_record_btrace_ops): Initialize to_record_method.
12781 * record-full.c (record_full_record_method): New function.
12782 (init_record_full_ops, init_record_full_core_ops): Add
12783 record_full_record_method.
12784 * record.h (enum record_method): New enum.
12785 * target-debug.h (target_debug_print_enum_record_method: New define.
12786 * target-delegates.c: Regenerate.
12787 * target.c (target_record_method): New function.
12788 * target.h: Include record.h.
12789 (struct target_ops) <to_record_method>: New field.
12790 (target_record_method): New export.
12791
12792 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12793
12794 * record.h (record_start, record_stop): New export.
12795 * record.c (record_start, record_stop): New function.
12796
12797 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12798
12799 * btrace.c (btrace_fetch): Copy function call segments pointer
12800 into a vector.
12801 (btrace_clear): Clear the vector.
12802 (btrace_find_insn_by_number): Use binary search to find the correct
12803 function call segment.
12804 * btrace.h (brace_fun_p): New typedef.
12805 (struct btrace_thread_info) <functions>: New field.
12806
12807 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12808
12809 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
12810 * btrace.c (btrace_decode_error): ... here. New function.
12811 * btrace.h (btrace_decode_error): New export.
12812
12813 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
12814
12815 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
12816 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
12817 btrace_find_insn_by_number): Remove special case for gaps.
12818 * btrace.h (btrace_insn_get_error): New export.
12819 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
12820 * record-btrace.c (btrace_insn_history): Print number for gaps.
12821 (record_btrace_info, record_btrace_goto): Handle gaps.
12822
12823 2017-02-14 Tom Tromey <tom@tromey.com>
12824
12825 PR python/13598:
12826 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
12827 event.
12828 * python/py-evts.c (gdbpy_initialize_py_events): Add
12829 before_prompt registry.
12830 * python/py-events.h (events_object) <before_prompt>: New field.
12831
12832 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
12833
12834 * btrace.c (ftrace_new_switch): Preserve up link and flags.
12835
12836 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
12837
12838 * symfile (_initialize_symfile): Add usage text to the load command's
12839 help text.
12840
12841 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
12842
12843 * utils.c (defaulted_query): Don't query on secondary UIs.
12844
12845 2017-02-10 Tom Tromey <tom@tromey.com>
12846
12847 * rust-lang.c (rust_get_disr_info): Remove unused variable.
12848
12849 2017-02-10 Tom Tromey <tom@tromey.com>
12850
12851 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
12852 "cleanup" local.
12853 * python/py-type.c (typy_legacy_template_argument): Remove
12854 unnecessary "cleanup" local.
12855
12856 2017-02-10 Tom Tromey <tom@tromey.com>
12857
12858 * python/python.c (do_start_initialization): New function, from
12859 _initialize_python.
12860 (_initialize_python): Call do_start_initialization.
12861 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
12862 goto.
12863
12864 2017-02-10 Tom Tromey <tom@tromey.com>
12865
12866 * python/py-prettyprint.c (pretty_print_one_value): Use
12867 gdbpy_ref.
12868
12869 2017-02-10 Tom Tromey <tom@tromey.com>
12870
12871 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
12872 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
12873 gdbpy_ref.
12874 * python/py-type.c (field_new): Use gdbpy_ref.
12875 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
12876 gdbpy_ref.
12877 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
12878 (py_free_pspace): Likewise.
12879 (pspace_to_pspace_object): Likewise.
12880 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
12881 (py_free_objfile): Likewise.
12882 (objfile_to_objfile_object): Likewise.
12883 * python/py-inferior.c (delete_thread_object): Use
12884 gdbpy_ref.
12885 (infpy_read_memory): Likewise.
12886 (py_free_inferior): Likewise.
12887 * python/py-evtregistry.c (create_eventregistry_object): Use
12888 gdbpy_ref.
12889 * python/py-event.c (create_event_object): Use gdbpy_ref.
12890
12891 2017-02-10 Tom Tromey <tom@tromey.com>
12892
12893 * python/py-ref.h (gdbpy_ref_policy): Now a template.
12894 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
12895 used.
12896 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
12897 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
12898 python/py-exitedevent.c, python/py-finishbreakpoint.c,
12899 python/py-framefilter.c, python/py-function.c,
12900 python/py-inferior.c, python/py-infevents.c,
12901 python/py-linetable.c, python/py-newobjfileevent.c,
12902 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
12903 python/py-signalevent.c, python/py-stopevent.c,
12904 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
12905 python/py-unwind.c, python/py-utils.c, python/py-value.c,
12906 python/py-varobj.c, python/py-xmethods.c, python/python.c,
12907 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
12908
12909 2017-02-10 Tom Tromey <tom@tromey.com>
12910
12911 * ui-out.h (ui_out_emit_type): New class.
12912 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
12913 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
12914 and ui_out_emit_tuple.
12915 (enumerate_locals): Likewise.
12916 (py_mi_print_variables, py_print_locals, py_print_args): Use
12917 ui_out_emit_list.
12918 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
12919 ui_out_emit_list.
12920 * common/gdb_optional.h: New file.
12921
12922 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12923
12924 * MAINTAINERS (Write After Approval): Update my e-mail address.
12925
12926 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
12927
12928 PR gdb/21122
12929 * breakpoint.c (_initialize_breakpoint): Update the help description
12930 of the 'commands' command to indicate that it takes a list argument.
12931
12932 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
12933
12934 * interps.c (current_interp_set_logging): Remove "return".
12935
12936 2017-02-09 Gary Benson <gbenson@redhat.com>
12937
12938 * symtab.c (add_symtab_completions): Prevent NULL pointer
12939 dereference.
12940
12941 2017-02-08 Pedro Alves <palves@redhat.com>
12942
12943 * interps.c (interp::interp): Remove reference to quiet_p.
12944 (interp_set): Make static. Remove dead "Switching to" output
12945 code.
12946 (interp_quiet_p, interp_set_quiet): Delete.
12947 (interpreter_exec_cmd): Don't set the interpreter quiet.
12948 * interps.h (interp_quiet_p): Make static.
12949 (class interp) <quiet_p>: Remove field
12950
12951 2017-02-08 Jerome Guitton <guitton@adacore.com>
12952
12953 * cli/cli-decode.c (find_command_name_length): Make it extern.
12954 * cli/cli-decode.h (find_command_name_length): Declare.
12955 * cli/cli-script.c (command_name_equals, line_first_arg):
12956 New functions.
12957 (process_next_line): Use cli-decode to parse command names.
12958 (build_command_line): Make args a constant pointer.
12959
12960 2017-02-08 Jerome Guitton <guitton@adacore.com>
12961
12962 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
12963 Remove case-insensitive search.
12964
12965 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
12966
12967 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
12968 at the end of the line. Avoids an ARI warning.
12969
12970 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
12971
12972 * NEWS: Mention support for record/replay of Intel 64 rdrand and
12973 rdseed instructions.
12974 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
12975
12976 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
12977
12978 PR tdep/20936
12979 Provide and use sparc32 and sparc64 target description XML files.
12980 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
12981 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
12982 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
12983 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
12984 * features/sparc/sparc32-solaris.xml: New file.
12985 * features/sparc/sparc64-solaris.xml: New file.
12986 * features/sparc/sparc32-solaris.c: Generated.
12987 * features/sparc/sparc64-solaris.c: Generated.
12988 * sparc-tdep.h: Account for differences in target descriptions.
12989 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
12990 (sparc32_register_type): Use target provided registers.
12991 (validate_tdesc_registers): New function.
12992 (sparc32_gdbarch_init): Use tdesc_has_registers.
12993 Set pseudoregister functions.
12994 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
12995 (sparc64_register_type): Use target provided registers.
12996 (sparc64_init_abi): Set pseudoregister functions.
12997
12998 2017-02-03 Tom Tromey <tom@tromey.com>
12999
13000 PR rust/21097:
13001 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
13002 with a single member.
13003
13004 2017-02-03 Pedro Alves <palves@redhat.com>
13005
13006 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
13007 (cli_interp_base::~cli_interp_base): New.
13008 (cli_interp): New struct.
13009 (as_cli_interp): Cast the interp itself to cli_interp.
13010 (cli_interpreter_pre_command_loop): Rename to ...
13011 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
13012 parameter.
13013 (cli_interpreter_init): Rename to ...
13014 (cli_interp::init): ... this. Remove 'self' parameter. Use
13015 boolean. Make extern.
13016 (cli_interpreter_resume): Rename to ...
13017 (cli_interp::resume): ... this. Remove 'data' parameter. Make
13018 extern.
13019 (cli_interpreter_suspend): Rename to ...
13020 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
13021 extern.
13022 (cli_interpreter_exec): Rename to ...
13023 (cli_interp::exec): ... this. Remove 'data' parameter. Make
13024 extern.
13025 (cli_interpreter_supports_command_editing): Rename to ...
13026 (cli_interp_base::supports_command_editing): ... this. Remove
13027 'interp' parameter. Make extern.
13028 (cli_ui_out): Rename to ...
13029 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
13030 Make extern.
13031 (cli_set_logging): Rename to ...
13032 (cli_interp_base::set_logging): ... this. Remove 'interp'
13033 parameter. Make extern.
13034 (cli_interp_procs): Delete.
13035 (cli_interp_factory): Adjust to use "new".
13036 * cli/cli-interp.h: Include "interps.h".
13037 (struct cli_interp_base): New struct.
13038 * interps.c (struct interp): Delete. Fields moved to interps.h.
13039 (interp_new): Delete.
13040 (interp::interp, interp::~interp): New.
13041 (interp_set): Use bool, and return void. Assume the interpreter
13042 has suspend, init and resume methods, and that the all return
13043 void.
13044 (set_top_level_interpreter): interp_set returns void.
13045 (interp_ui_out): Adapt.
13046 (current_interp_set_logging): Adapt.
13047 (interp_data): Delete.
13048 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
13049 (interp_exec): Adapt.
13050 (top_level_interpreter_data): Delete.
13051 * interps.h (interp_init_ftype, interp_resume_ftype)
13052 (interp_suspend_ftype, interp_exec_ftype)
13053 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
13054 (class interp): New.
13055 (interp_new): Delete.
13056 (interp_set): Now returns void. Use bool.
13057 (interp_data, top_level_interpreter_data): Delete.
13058 * mi/mi-common.h: Include interps.h.
13059 (class mi_interp): Inherit from interp. Define a ctor. Declare
13060 init, resume, suspect, exec, interp_ui_out, set_logging and
13061 pre_command_loop methods.
13062 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
13063 (mi_interpreter_init): Rename to ...
13064 (mi_interp::init): ... this. Remove the 'interp' parameter, use
13065 bool, return void and make extern. Adjust.
13066 (mi_interpreter_resume): ... Rename to ...
13067 (mi_interp::resume): ... this. Remove the 'data' parameter,
13068 return void and make extern. Adjust.
13069 (mi_interpreter_suspend): ... Rename to ...
13070 (mi_interp::suspend): ... this. Remove the 'data' parameter,
13071 return void and make extern. Adjust.
13072 (mi_interpreter_exec): ... Rename to ...
13073 (mi_interp::exec): ... this. Remove the 'data' parameter and make
13074 extern. Adjust.
13075 (mi_interpreter_pre_command_loop): ... Rename to ...
13076 (mi_interp::pre_command_loop): ... this. Remove the 'self'
13077 parameter and make extern.
13078 (mi_on_normal_stop_1): Adjust.
13079 (mi_ui_out): Rename to ...
13080 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
13081 parameter and make extern. Adjust.
13082 (mi_set_logging): Rename to ...
13083 (mi_interp::set_logging): ... this. Remove the 'interp'
13084 parameter and make extern. Adjust.
13085 (mi_interp_procs): Delete.
13086 (mi_interp_factory): Adjust to use 'new'.
13087 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
13088 (mi_print_exception, mi_execute_command, mi_load_progress):
13089 Adjust.
13090 * tui/tui-interp.c (tui_interp): New class.
13091 (as_tui_interp): Return a tui_interp pointer.
13092 (tui_on_normal_stop, tui_on_signal_received)
13093 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
13094 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
13095 to use interp::interp_ui_out.
13096 (tui_init): Rename to ...
13097 (tui_interp::init): ... this. Remove the 'self' parameter, use
13098 bool, return void and make extern. Adjust.
13099 (tui_resume): Rename to ...
13100 (tui_interp::resume): ... this. Remove the 'data' parameter,
13101 return void and make extern. Adjust.
13102 (tui_suspend): Rename to ...
13103 (tui_interp::suspend): ... this. Remove the 'data' parameter,
13104 return void and make extern. Adjust.
13105 (tui_ui_out): Rename to ...
13106 (tui_interp::interp_ui_out): ... this. Remove the 'self'
13107 parameter, and make extern. Adjust.
13108 (tui_exec): Rename to ...
13109 (tui_interp::exec): ... this. Remove the 'data' parameter and
13110 make extern.
13111 (tui_interp_procs): Delete.
13112 (tui_interp_factory): Use "new".
13113
13114 2017-02-02 Tom Tromey <tom@tromey.com>
13115
13116 * rust-exp.y (ends_raw_string, space_then_number)
13117 (rust_identifier_start_p): Return bool.
13118 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
13119 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
13120 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
13121 (rust_chartype_p): Return bool.
13122 (val_print_struct, rust_print_struct_def, rust_print_type):
13123 Update.
13124 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
13125 Return bool.
13126
13127 2017-02-02 Tom Tromey <tom@tromey.com>
13128
13129 * rust-lang.c: Reindent.
13130
13131 2017-02-02 Tom Tromey <tom@tromey.com>
13132
13133 * rust-lang.h (rust_crate_for_block): Update.
13134 * rust-lang.c (rust_crate_for_block): Return std::string.
13135 (rust_get_disr_info): Use std:;string, not
13136 gdb::unique_xmalloc_ptr.
13137 * rust-exp.y (crate_name): Update.
13138
13139 2017-02-02 Pedro Alves <palves@redhat.com>
13140
13141 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
13142 field out of gdb_disassembler_test and make it static.
13143
13144 2017-02-02 Pedro Alves <palves@redhat.com>
13145
13146 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
13147 mi1_interp and mi_interp fields.
13148
13149 2017-02-02 Pedro Alves <palves@redhat.com>
13150
13151 * cli/cli-interp.c (struct saved_output_files, saved_output):
13152 Moved from cli/cli-logging.c.
13153 (cli_set_logging): New function.
13154 (cli_interp_procs): Install cli_set_logging.
13155 * cli/cli-interp.h (make_logging_output, cli_set_logging):
13156 Declare.
13157 * cli/cli-logging.c (struct saved_output_files, saved_output):
13158 Moved to cli/cli-interp.c.
13159 (pop_output_files): Don't save outputs here.
13160 (make_logging_output): New function.
13161 (handle_redirections): Don't build tee nor save previous outputs
13162 here.
13163 * interps.c (current_interp_set_logging): Change prototype.
13164 Assume there's always a set_logging_proc method installed.
13165 * interps.h (interp_set_logging_ftype): Change prototype.
13166 (current_interp_set_logging): Change prototype and adjust comment.
13167 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
13168 use make_logging_output.
13169 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
13170 2017-02-02 Pedro Alves <palves@redhat.com>
13171
13172 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
13173 from ...
13174 (set_logging_overwrite): ... here.
13175 (logging_no_redirect_file): Delete.
13176 (set_logging_redirect): Don't handle redirection on the fly.
13177 Instead warn that "logging off" / "logging on" is necessary.
13178 (pop_output_files): Delete references to logging_no_redirect_file.
13179 (show_logging_command): Always speak in terms of what will happen
13180 once logging is reenabled.
13181
13182 2017-02-02 Pedro Alves <palves@redhat.com>
13183
13184 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
13185
13186 2017-02-02 Pedro Alves <palves@redhat.com>
13187
13188 * disasm.c (gdb_pretty_print_insn): Rename to ...
13189 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
13190 Remove gdbarch parameter. Adapt to clear the object's buffers
13191 instead of allocating new buffers, and to print using the object's
13192 gdb_disassembler instead of calling gdb_print_insn.
13193 (dump_insns): Use gdb_pretty_print_disassembler.
13194 * disasm.h (gdb_pretty_print_insn): Delete declaration.
13195 (gdb_pretty_print_disassembler): New class.
13196 * record-btrace.c (btrace_insn_history): Use
13197 gdb_pretty_print_disassembler.
13198
13199 2017-02-02 Pedro Alves <palves@redhat.com>
13200
13201 * ada-lang.c (type_as_string): Use string_file.
13202 * ada-valprint.c (ada_print_floating): Use string_file.
13203 * ada-varobj.c (ada_varobj_scalar_image)
13204 (ada_varobj_get_value_image): Use string_file.
13205 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
13206 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
13207 * breakpoint.c (update_inserted_breakpoint_locations)
13208 (insert_breakpoint_locations, reattach_breakpoints)
13209 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
13210 (print_it_watchpoint): Use string_file.
13211 (save_breakpoints): Use stdio_file.
13212 * c-exp.y (oper): Use string_file.
13213 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
13214 tee_file.
13215 (pop_output_files): Use delete.
13216 (handle_redirections): Use stdio_file and tee_file.
13217 * cli/cli-setshow.c (do_show_command): Use string_file.
13218 * compile/compile-c-support.c (c_compute_program): Use
13219 string_file.
13220 * compile/compile-c-symbols.c (generate_vla_size): Take a
13221 'string_file &' instead of a 'ui_file *'.
13222 (generate_c_for_for_one_variable): Take a 'string_file &' instead
13223 of a 'ui_file *'. Use string_file.
13224 (generate_c_for_variable_locations): Take a 'string_file &'
13225 instead of a 'ui_file *'.
13226 * compile/compile-internal.h (generate_c_for_for_one_variable):
13227 Take a 'string_file &' instead of a 'ui_file *'.
13228 * compile/compile-loc2c.c (push, pushf, unary, binary)
13229 (print_label, pushf_register_address, pushf_register)
13230 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
13231 'ui_file *'. Adjust.
13232 * compile/compile.c (compile_to_object): Use string_file.
13233 * compile/compile.h (compile_dwarf_expr_to_c)
13234 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
13235 'ui_file *'.
13236 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
13237 (replace_typedefs_qualified_name): Use string_file and
13238 obstack_copy0.
13239 * disasm.c (gdb_pretty_print_insn): Use string_file.
13240 (gdb_disassembly): Adjust reference the null_stream global.
13241 (do_ui_file_delete): Delete.
13242 (gdb_insn_length): Use null_stream.
13243 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
13244 * dwarf2loc.c (dwarf2_compile_property_to_c)
13245 (locexpr_generate_c_location, loclist_generate_c_location): Take a
13246 'string_file &' instead of a 'ui_file *'.
13247 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
13248 * dwarf2read.c (do_ui_file_peek_last): Delete.
13249 (dwarf2_compute_name): Use string_file.
13250 * event-top.c (gdb_setup_readline): Use stdio_file.
13251 * gdbarch.sh (verify_gdbarch): Use string_file.
13252 * gdbtypes.c (safe_parse_type): Use null_stream.
13253 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
13254 string_file.
13255 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
13256 'string_file *' instead of a 'ui_file *'.
13257 (gdbscm_arch_disassemble): Use string_file.
13258 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
13259 * guile/scm-ports.c (class ioscm_file_port): Now a class that
13260 inherits from ui_file.
13261 (ioscm_file_port_delete, ioscm_file_port_rewind)
13262 (ioscm_file_port_put): Delete.
13263 (ioscm_file_port_write): Rename to ...
13264 (ioscm_file_port::write): ... this. Remove file_port_magic
13265 checks.
13266 (ioscm_file_port_new): Delete.
13267 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
13268 ui_file_up.
13269 * guile/scm-type.c (tyscm_type_name): Use string_file.
13270 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
13271 Use string_file.
13272 * infcmd.c (print_return_value_1): Use string_file.
13273 * infrun.c (print_target_wait_results): Use string_file.
13274 * language.c (add_language): Use string_file.
13275 * location.c (explicit_to_string_internal): Use string_file.
13276 * main.c (captured_main_1): Use null_file.
13277 * maint.c (maintenance_print_architecture): Use stdio_file.
13278 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
13279 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
13280 event_channel>: Change type to mi_console_file pointer.
13281 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
13282 (mi_console_file_delete): Delete.
13283 (struct mi_console_file): Delete.
13284 (mi_console_file_magic): Delete.
13285 (mi_console_file_new): Delete.
13286 (mi_console_file::mi_console_file): New.
13287 (mi_console_file_delete): Delete.
13288 (mi_console_file_fputs): Delete.
13289 (mi_console_file::write): New.
13290 (mi_console_raw_packet): Delete.
13291 (mi_console_file::flush): New.
13292 (mi_console_file_flush): Delete.
13293 (mi_console_set_raw): Rename to ...
13294 (mi_console_file::set_raw): ... this.
13295 * mi/mi-console.h (class mi_console_file): New class.
13296 (mi_console_file_new, mi_console_set_raw): Delete.
13297 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
13298 (mi_set_logging): Use delete and tee_file. Adjust.
13299 * mi/mi-main.c (output_register): Use string_file.
13300 (mi_cmd_data_evaluate_expression): Use string_file.
13301 (mi_cmd_data_read_memory): Use string_file.
13302 (mi_cmd_execute, print_variable_or_computed): Use string_file.
13303 * mi/mi-out.c (mi_ui_out::main_stream): New.
13304 (mi_ui_out::rewind): Use main_stream and
13305 string_file.
13306 (mi_ui_out::put): Use main_stream and string_file.
13307 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13308 Allocate a 'string_file' instead.
13309 (mi_out_new): Don't allocate a mem_fileopen stream here.
13310 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
13311 (mi_ui_out::main_stream): Declare method.
13312 * printcmd.c (eval_command): Use string_file.
13313 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
13314 * python/py-arch.c (archpy_disassemble): Use string_file.
13315 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
13316 * python/py-frame.c (frapy_str): Use string_file.
13317 * python/py-framefilter.c (py_print_type, py_print_single_arg):
13318 Use string_file.
13319 * python/py-type.c (typy_str): Use string_file.
13320 * python/py-unwind.c (unwind_infopy_str): Use string_file.
13321 * python/py-value.c (valpy_str): Use string_file.
13322 * record-btrace.c (btrace_insn_history): Use string_file.
13323 * regcache.c (regcache_print): Use stdio_file.
13324 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
13325 * remote.c (escape_buffer): Use string_file.
13326 * rust-lang.c (rust_get_disr_info): Use string_file.
13327 * serial.c (serial_open_ops_1): Use stdio_file.
13328 (do_serial_close): Use delete.
13329 * stack.c (print_frame_arg): Use string_file.
13330 (print_frame_args): Remove local mem_fileopen stream, not used.
13331 (print_frame): Use string_file.
13332 * symmisc.c (maintenance_print_symbols): Use stdio_file.
13333 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
13334 Take a 'string_file *' instead of a 'ui_file *'.
13335 * top.c (new_ui): Use stdio_file and stderr_file.
13336 (free_ui): Use delete.
13337 (execute_command_to_string): Use string_file.
13338 (quit_confirm): Use string_file.
13339 * tracepoint.c (collection_list::append_exp): Use string_file.
13340 * tui/tui-disasm.c (tui_disassemble): Use string_file.
13341 * tui/tui-file.c: Don't include "ui-file.h".
13342 (enum streamtype, struct tui_stream): Delete.
13343 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
13344 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
13345 (tui_file::tui_file): New method.
13346 (tui_file_fputs): Delete.
13347 (tui_file_get_strbuf): Delete.
13348 (tui_file::puts): New method.
13349 (tui_file_adjust_strbuf): Delete.
13350 (tui_file_flush): Delete.
13351 (tui_file::flush): New method.
13352 * tui/tui-file.h: Tweak intro comment.
13353 Include ui-file.h.
13354 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
13355 (tui_file_adjust_strbuf): Delete declarations.
13356 (class tui_file): New class.
13357 * tui/tui-io.c (tui_initialize_io): Use tui_file.
13358 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
13359 (tui_register_format): Use string_stream.
13360 * tui/tui-stack.c (tui_make_status_line): Use string_file.
13361 (tui_get_function_from_frame): Use string_file.
13362 * typeprint.c (type_to_string): Use string_file.
13363 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
13364 (null_stream): New global.
13365 (ui_file_delete): Delete.
13366 (ui_file::ui_file): New.
13367 (null_file_isatty): Delete.
13368 (ui_file::~ui_file): New.
13369 (null_file_rewind): Delete.
13370 (ui_file::printf): New.
13371 (null_file_put): Delete.
13372 (null_file_flush): Delete.
13373 (ui_file::putstr): New.
13374 (null_file_write): Delete.
13375 (ui_file::putstrn): New.
13376 (null_file_read): Delete.
13377 (ui_file::putc): New.
13378 (null_file_fputs): Delete.
13379 (null_file_write_async_safe): Delete.
13380 (ui_file::vprintf): New.
13381 (null_file_delete): Delete.
13382 (null_file::write): New.
13383 (null_file_fseek): Delete.
13384 (null_file::puts): New.
13385 (ui_file_data): Delete.
13386 (null_file::write_async_safe): New.
13387 (gdb_flush, ui_file_isatty): Adjust.
13388 (ui_file_put, ui_file_rewind): Delete.
13389 (ui_file_write): Adjust.
13390 (ui_file_write_for_put): Delete.
13391 (ui_file_write_async_safe, ui_file_read): Adjust.
13392 (ui_file_fseek): Delete.
13393 (fputs_unfiltered): Adjust.
13394 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
13395 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
13396 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
13397 (set_ui_file_data): Delete.
13398 (string_file::~string_file, string_file::write)
13399 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
13400 (do_ui_file_as_string, ui_file_as_string): Delete.
13401 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
13402 (struct mem_file): Delete.
13403 (mem_file_new): Delete.
13404 (stdio_file::stdio_file): New.
13405 (mem_file_delete): Delete.
13406 (stdio_file::stdio_file): New.
13407 (mem_fileopen): Delete.
13408 (stdio_file::~stdio_file): New.
13409 (mem_file_rewind): Delete.
13410 (stdio_file::set_stream): New.
13411 (mem_file_put): Delete.
13412 (stdio_file::open): New.
13413 (mem_file_write): Delete.
13414 (stdio_file_magic, struct stdio_file): Delete.
13415 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
13416 (stdio_file::flush): New.
13417 (stdio_file_read): Rename to ...
13418 (stdio_file::read): ... this. Adjust.
13419 (stdio_file_write): Rename to ...
13420 (stdio_file::write): ... this. Adjust.
13421 (stdio_file_write_async_safe): Rename to ...
13422 (stdio_file::write_async_safe) ... this. Adjust.
13423 (stdio_file_fputs): Rename to ...
13424 (stdio_file::puts) ... this. Adjust.
13425 (stdio_file_isatty): Delete.
13426 (stdio_file_fseek): Delete.
13427 (stdio_file::isatty): New.
13428 (stderr_file_write): Rename to ...
13429 (stderr_file::write) ... this. Adjust.
13430 (stderr_file_fputs): Rename to ...
13431 (stderr_file::puts) ... this. Adjust.
13432 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
13433 (stderr_file::stderr_file): New.
13434 (tee_file_magic): Delete.
13435 (struct tee_file): Delete.
13436 (tee_file::tee_file): New.
13437 (tee_file_new): Delete.
13438 (tee_file::~tee_file): New.
13439 (tee_file_delete): Delete.
13440 (tee_file_flush): Rename to ...
13441 (tee_file::flush): ... this. Adjust.
13442 (tee_file_write): Rename to ...
13443 (tee_file::write): ... this. Adjust.
13444 (tee_file::write_async_safe): New.
13445 (tee_file_fputs): Rename to ...
13446 (tee_file::puts): ... this. Adjust.
13447 (tee_file_isatty): Rename to ...
13448 (tee_file::isatty): ... this. Adjust.
13449 * ui-file.h (struct obstack, struct ui_file): Don't
13450 forward-declare.
13451 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
13452 (ui_file_write_ftype)
13453 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
13454 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
13455 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
13456 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
13457 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
13458 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
13459 (set_ui_file_fseek): Delete.
13460 (ui_file_data, ui_file_delete, ui_file_rewind)
13461 (struct ui_file): New.
13462 (ui_file_up): New.
13463 (class null_file): New.
13464 (null_stream): Declare.
13465 (ui_file_write_for_put, ui_file_put): Delete.
13466 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
13467 Delete.
13468 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
13469 (gdb_fopen, tee_file_new): Delete.
13470 (struct string_file): New.
13471 (struct stdio_file): New.
13472 (stdio_file_up): New.
13473 (struct stderr_file): New.
13474 (class tee_file): New.
13475 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
13476 of a 'ui_file *'. Adjust.
13477 * ui-out.h (class ui_out) <field_stream>: Likewise.
13478 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
13479 (null_stream): Delete.
13480 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
13481 Adjust.
13482 * utils.h (struct ui_file): Delete forward declaration..
13483 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
13484 (error_stream): Take a 'string_file &' instead of a
13485 'ui_file *'.
13486 * varobj.c (varobj_value_get_print_value): Use string_file.
13487 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
13488 * gdbarch.c: Regenerate.
13489
13490 2017-02-02 Pedro Alves <palves@redhat.com>
13491
13492 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
13493 (gdb_pretty_print_insn): ... this. Now a free function. Add back
13494 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
13495 Adjust to call gdb_print_insn instead of
13496 gdb_disassembler::print_insn.
13497 (dump_insns, do_mixed_source_and_assembly_deprecated)
13498 (do_mixed_source_and_assembly, do_assembly_only): Add back a
13499 'gdbarch' parameter. Remove gdb_disassembler parameter.
13500 (gdb_disassembly): Don't allocate a gdb_disassembler here.
13501 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
13502 declaration.
13503 (gdb_pretty_print_insn): Re-add declaration.
13504 * record-btrace.c (btrace_insn_history): Don't allocate a
13505 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
13506
13507 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
13508
13509 * disasm.h (gdb_disassembly): Remove file_string parameter.
13510 * disasm.c (gdb_disassembly): Likewise.
13511 * cli/cli-cmds.c (print_disassembly): Adapt.
13512 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
13513 * stack.c (do_gdb_disassembly): Likewise.
13514
13515 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
13516
13517 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
13518 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
13519 targets. And if the implicit value is longer than needed, extract
13520 the first bytes instead of the "least significant" ones.
13521
13522 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13523
13524 * btrace.c (btrace_enable): Do not call btrace_add_pc for
13525 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
13526 (btrace_fetch): Assert can_access_registers_ptid.
13527 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
13528 validate_registers_access.
13529
13530 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
13531
13532 * gdbthread.h (can_access_registers_ptid): New.
13533 * thread.c (can_access_registers_ptid): New.
13534
13535 2017-02-01 Pedro Alves <palves@redhat.com>
13536
13537 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
13538
13539 2017-01-31 Pedro Alves <palves@redhat.com>
13540
13541 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
13542 Fix typos.
13543
13544 2017-01-31 Pedro Alves <palves@redhat.com>
13545
13546 * stack.c (print_frame_args): Remove local mem_fileopen stream,
13547 not used.
13548
13549 2017-01-31 Pedro Alves <palves@redhat.com>
13550
13551 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
13552
13553 2017-01-31 Pedro Alves <palves@redhat.com>
13554
13555 * common/scoped_restore.h
13556 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
13557 change the value's parameter type to T2.
13558 (make_scoped_restore): Likewise.
13559
13560 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13561 Richard Henderson <rth@redhat.com>
13562
13563 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
13564 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
13565 GS_BASE for older kernels.
13566 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
13567 GS_BASE for older kernels.
13568 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
13569 and GS_BASE to the offset table.
13570 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
13571 system register group.
13572 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
13573 for older kernels.
13574 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
13575 amd64 ABI.
13576 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
13577 AMD64_GSBASE_REGNUM.
13578 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
13579 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
13580 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
13581 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
13582 i386/64bit-segments.xml in those rules.
13583 * features/i386/64bit-segments.xml: New file.
13584 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
13585 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
13586 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
13587 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
13588 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
13589 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
13590 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
13591 * features/i386/amd64-avx-linux.c: Regenerated.
13592 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
13593 * features/i386/amd64-avx-mpx.c: Regenerated.
13594 * features/i386/amd64-avx512-linux.c: Regenerated.
13595 * features/i386/amd64-linux.c: Regenerated.
13596 * features/i386/amd64-mpx-linux.c: Regenerated.
13597 * features/i386/i386-avx-mpx-linux.c: Regenerated.
13598 * features/i386/i386-avx-mpx.c: Regenerated.
13599 * features/i386/x32-avx-linux.c: Regenerated.
13600 * features/i386/x32-avx512-linux.c: Regenerated.
13601 * regformats/i386/amd64-avx-linux.dat: Regenerated.
13602 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
13603 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
13604 * regformats/i386/amd64-linux.dat: Regenerated.
13605 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
13606 * regformats/i386/x32-avx-linux.dat: Regenerated.
13607 * regformats/i386/x32-avx512-linux.dat: Regenerated.
13608 * regformats/i386/x32-linux.dat: Regenerated.
13609
13610 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13611
13612 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
13613 Set to AMD64_NUM_REGS.
13614
13615 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
13616
13617 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
13618 that checks validity of a register number.
13619
13620 2017-01-27 Kees Cook <keescook@google.com>
13621
13622 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
13623 fetch_fpregs if target has fpa registers.
13624 (arm_linux_store_inferior_registers): Call store_fpregs if target
13625 has fpa registers.
13626
13627 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
13628
13629 * cris-tdep.c (cris_gdbarch_init): Remove check for
13630 info.byte_order and force it to BFD_ENDIAN_LITTLE.
13631
13632 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
13633
13634 * corelow.c (get_core_register_section): Check for regset
13635 existence before checking for REGSET_VARIABLE_SIZE.
13636
13637 2017-01-26 Yao Qi <yao.qi@linaro.org>
13638 Pedro Alves <palves@redhat.com>
13639
13640 PR gdb/20939
13641 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
13642 call memory_error, save memaddr instead.
13643 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
13644 negative, cal memory_error.
13645 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
13646
13647 2017-01-26 Yao Qi <yao.qi@linaro.org>
13648
13649 * disasm-selftests.c (memory_error_test): New function.
13650 (_initialize_disasm_selftests): Register memory_error_test.
13651
13652 2017-01-26 Yao Qi <yao.qi@linaro.org>
13653
13654 * Makefile.in (SFILES): Add disasm-selftests.c and
13655 selftest-arch.c.
13656 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
13657 * disasm-selftests.c: New file.
13658 * selftest-arch.c: New file.
13659 * selftest-arch.h: New file.
13660
13661 2017-01-26 Yao Qi <yao.qi@linaro.org>
13662
13663 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
13664 to bfd_arch_mep. Don't return 0 if section is not
13665 found. Call print_insn_mep.
13666
13667 2017-01-26 Pedro Alves <palves@redhat.com>
13668 Yao Qi <yao.qi@linaro.org>
13669
13670 * arm-tdep.c: Include "disasm.h".
13671 (gdb_print_insn_arm): Update code to get gdbarch.
13672 * disasm.c (dis_asm_read_memory): Change it to
13673 gdb_disassembler::dis_asm_read_memory.
13674 (dis_asm_memory_error): Likewise.
13675 (dis_asm_print_address): Likewise.
13676 (gdb_pretty_print_insn): Change it to
13677 gdb_disassembler::pretty_print_insn.
13678 (dump_insns): Add one argument gdb_disassemlber. All
13679 callers updated.
13680 (do_mixed_source_and_assembly_deprecated): Likewise.
13681 (do_mixed_source_and_assembly): Likewise.
13682 (do_assembly_only): Likewise.
13683 (gdb_disassembler::gdb_disassembler): New.
13684 (gdb_disassembler::print_insn): New.
13685 * disasm.h (class gdb_disassembler): New.
13686 (gdb_pretty_print_insn): Remove declaration.
13687 (gdb_disassemble_info): Likewise.
13688 * guile/scm-disasm.c (class gdbscm_disassembler): New.
13689 (gdbscm_disasm_read_memory_worker): Update.
13690 (gdbscm_disasm_read_memory): Update.
13691 (gdbscm_disasm_memory_error): Remove.
13692 (gdbscm_disasm_print_address): Remove.
13693 (gdbscm_disassembler::gdbscm_disassembler): New.
13694 (gdbscm_print_insn_from_port): Update.
13695 * mips-tdep.c: Include disasm.h.
13696 (gdb_print_insn_mips): Update code to get gdbarch.
13697 * record-btrace.c (btrace_insn_history): Update.
13698 * spu-tdep.c: Include disasm.h.
13699 (struct spu_dis_asm_data): Remove.
13700 (struct spu_dis_asm_info): New.
13701 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
13702 SPU id.
13703 (gdb_print_insn_spu): Cast disassemble_info to
13704 spu_dis_asm_info.
13705
13706 2017-01-26 Yao Qi <yao.qi@linaro.org>
13707
13708 * disasm.c (do_ui_file_delete): Delete.
13709 (gdb_insn_length): Move code creating stream to ...
13710 * utils.c (null_stream): ... here. New function.
13711 * utils.h (null_stream): Declare.
13712
13713 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
13714
13715 * python/py-inferior.c (find_thread_object): Return directly
13716 from the loop. Remove "found" variable.
13717
13718 2017-01-21 Joel Brobecker <brobecker@adacore.com>
13719
13720 GDB 7.12.1 released.
13721
13722 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13723
13724 * python/py-function.c (fnpy_call): Reorder declarations to have
13725 the gdbpy_enter object declared first.
13726 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
13727
13728 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
13729
13730 PR python/21068
13731 * python/python-internal.h (PyMem_RawMalloc): Define for
13732 Python < 3.4.
13733 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
13734 PyMem_RawMalloc instead of PyMem_Malloc.
13735
13736 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
13737 Luis Machado <lgustavo@codesourcery.com>
13738
13739 * NEWS (New commands): Mention flash-erase.
13740 (New MI commands): Mention target-flash-erase.
13741 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
13742 command.
13743 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
13744 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
13745 * target.c (flash_erase_command): New function.
13746 (initialize_targets): Add new flash-erase command.
13747 * target.h (flash_erase_command): New declaration.
13748
13749 2017-01-20 Joel Brobecker <brobecker@adacore.com>
13750
13751 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
13752 HAVE_SYS_PROCFS_H is defined.
13753
13754 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13755
13756 * remote.c (struct cached_reg): Change data into a pointer.
13757 * (stop_reply_dtr): Free data pointers before deleting vector.
13758 (process_stop_reply): Likewise.
13759 (remote_parse_stop_reply): Allocate space for data
13760
13761 2017-01-18 Alan Hayward <alan.hayward@arm.com>
13762
13763 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
13764 MAX_REGISTER_SIZE.
13765 (amd64_pseudo_register_read_value): Likewise.
13766 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
13767 (store_register_using_P): Likewise.
13768 * regcache.c (regcache_xfer_part): Likewise.
13769
13770 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
13771
13772 Split real and pseudo registers.
13773 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
13774 (sparc32_pseudo_regnum): New enum.
13775 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
13776 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
13777 (SPARC32_CP0_REGISTERS): New macro.
13778 (sparc32_pseudo_register_name): New function.
13779 (sparc32_register_name): Use sparc32_pseudo_register_name.
13780 (sparc32_pseudo_register_type): New function.
13781 (sparc32_register_type): Use sparc32_pseudo_register_type.
13782 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
13783 pseudo register numbers.
13784 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
13785 (SPARC64_CP0_REGISTERS): New macro.
13786 (sparc64_pseudo_register_name): New function.
13787 (sparc64_register_name): Use sparc64_pseudo_register_name.
13788 (sparc64_pseudo_register_type): New function.
13789 (sparc64_register_type): Use sparc64_pseudo_register_type.
13790 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
13791 pseudo register numbers.
13792 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
13793 sparc64_store_arguments): Handle pseudo register numbers.
13794
13795 2017-01-13 Yao Qi <yao.qi@linaro.org>
13796
13797 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
13798 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
13799 output.
13800 (getpkt_or_notif_sane_1): Likewise.
13801
13802 2017-01-13 Yao Qi <yao.qi@linaro.org>
13803
13804 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
13805 of CC. Pass "-x c++-header" instead of "-x c".
13806
13807 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13808
13809 * remote.c (remote_can_async_p): Update comment.
13810
13811 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13812
13813 * linux-nat.c (linux_nat_can_async_p): Update comment.
13814
13815 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
13816
13817 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
13818
13819 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
13820
13821 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
13822
13823 2017-01-10 Tom Tromey <tom@tromey.com>
13824
13825 * python/py-type.c (typy_legacy_template_argument): Update.
13826 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
13827 ~demangle_parse_info): Declare new members.
13828 (cp_demangled_name_to_comp): Return unique_ptr.
13829 (cp_demangled_name_parse_free)
13830 (make_cleanup_cp_demangled_name_parse_free)
13831 (cp_new_demangle_parse_info): Remove.
13832 * cp-support.c (do_demangled_name_parse_free_cleanup)
13833 (make_cleanup_cp_demangled_name_parse_free): Remove.
13834 (inspect_type, cp_canonicalize_string_full)
13835 (cp_canonicalize_string): Update.
13836 (mangled_name_to_comp): Change return type.
13837 (cp_class_name_from_physname, method_name_from_physname)
13838 (cp_func_name, cp_remove_params): Update.
13839 * cp-name-parser.y (demangle_parse_info): New constructor, from
13840 cp_new_demangle_parse_info.
13841 (~demangle_parse_info): New destructor, from
13842 cp_demangled_name_parse_free.
13843 (cp_merge_demangle_parse_infos): Update.
13844 (cp_demangled_name_to_comp): Change return type.
13845
13846 2017-01-10 Tom Tromey <tom@tromey.com>
13847
13848 * top.c (prevent_dont_repeat): Change return type.
13849 * python/python.c (execute_gdb_command): Use std::string.
13850 Update.
13851 * guile/guile.c (gdbscm_execute_gdb_command): Update.
13852 * command.h (prevent_dont_repeat): Change return type.
13853 * breakpoint.c (bpstat_do_actions_1): Update.
13854
13855 2017-01-10 Tom Tromey <tom@tromey.com>
13856
13857 * value.h (scoped_value_mark::~scoped_value_mark): Call
13858 free_to_mark.
13859 (scoped_value_mark::free_to_mark): New method.
13860 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
13861 scoped_value_mark.
13862
13863 2017-01-10 Tom Tromey <tom@tromey.com>
13864
13865 * python/py-value.c (valpy_dereference, valpy_referenced_value)
13866 (valpy_reference_value, valpy_const_value, valpy_get_address)
13867 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
13868 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
13869 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
13870 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
13871 scoped_value_mark.
13872 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
13873 * value.h (scoped_value_mark): New class.
13874
13875 2017-01-10 Tom Tromey <tom@tromey.com>
13876
13877 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
13878 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
13879 * psymtab.c (discard_psymtabs_upto): Remove.
13880 (make_cleanup_discard_psymtabs): Remove.
13881 (struct psymtab_state): Remove.
13882
13883 2017-01-10 Tom Tromey <tom@tromey.com>
13884
13885 * record-full.c (record_full_save_cleanups): Remove.
13886 (record_full_save): Use gdb::unlinker.
13887 * gcore.c (do_bfd_delete_cleanup): Remove.
13888 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
13889 cleanups.
13890 * dwarf2read.c (unlink_if_set): Remove.
13891 (write_psymtabs_to_index): Use gdb::unlinker.
13892 * common/gdb_unlinker.h: New file.
13893
13894 2017-01-10 Tom Tromey <tom@tromey.com>
13895
13896 * windows-tdep.c (windows_xfer_shared_library): Update.
13897 * windows-nat.c (windows_make_so): Update.
13898 * utils.h (make_cleanup_bfd_unref): Remove.
13899 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
13900 * symfile.h (symfile_bfd_open)
13901 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
13902 * symfile.c (read_symbols, symbol_file_add)
13903 (separate_debug_file_exists): Update.
13904 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
13905 (generic_load, reread_symbols): Update.
13906 * symfile-mem.c (symbol_file_add_from_memory): Update.
13907 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
13908 (spu_symbol_file_add_from_memory): Update.
13909 * solist.h (struct target_so_ops) <bfd_open>: Return
13910 gdb_bfd_ref_ptr.
13911 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
13912 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
13913 gdb_bfd_ref_ptr.
13914 (solib_map_sections, reload_shared_libraries_1): Update.
13915 * solib-svr4.c (enable_break): Update.
13916 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
13917 * solib-frv.c (enable_break2): Update.
13918 * solib-dsbt.c (enable_break): Update.
13919 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
13920 gdb_bfd_ref_ptr.
13921 (darwin_solib_get_all_image_info_addr_at_init): Update.
13922 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
13923 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
13924 * record-full.c (record_full_save): Update.
13925 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
13926 * procfs.c (insert_dbx_link_bpt_in_file): Update.
13927 * minidebug.c (find_separate_debug_file_in_section): Return
13928 gdb_bfd_ref_ptr.
13929 * machoread.c (macho_add_oso_symfile): Change abfd to
13930 gdb_bfd_ref_ptr.
13931 (macho_symfile_read_all_oso): Update.
13932 (macho_check_dsym): Return gdb_bfd_ref_ptr.
13933 (macho_symfile_read): Update.
13934 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
13935 (jit_bfd_try_read_symtab): Update.
13936 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13937 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13938 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13939 gdb_bfd_ref_ptr.
13940 (gdb_bfd_ref_policy): New struct.
13941 (gdb_bfd_ref_ptr): New typedef.
13942 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
13943 (gdb_bfd_openw, gdb_bfd_openr_iovec)
13944 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
13945 gdb_bfd_ref_ptr.
13946 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13947 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
13948 (gcore_command): Update.
13949 * exec.c (exec_file_attach): Update.
13950 * elfread.c (elf_symfile_read): Update.
13951 * dwarf2read.c (dwarf2_get_dwz_file): Update.
13952 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
13953 (open_and_init_dwo_file): Update.
13954 (open_dwp_file): Return gdb_bfd_ref_ptr.
13955 (open_and_init_dwp_file): Update.
13956 * corelow.c (core_open): Update.
13957 * compile/compile-object-load.c (compile_object_load): Update.
13958 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
13959 * coffread.c (coff_symfile_read): Update.
13960 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
13961 gdb_bfd_ref_ptr. Rename.
13962 (dump_bfd_file, restore_command): Update.
13963 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13964 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
13965 (find_separate_debug_file_by_buildid): Update.
13966
13967 2017-01-10 Tom Tromey <tom@tromey.com>
13968
13969 * common/gdb_ref_ptr.h: New file.
13970 * python/py-ref.h (struct gdbpy_ref_policy): New.
13971 (gdbpy_ref): Now a typedef.
13972
13973 2017-01-10 Tom Tromey <tom@tromey.com>
13974
13975 * utils.h (make_cleanup_htab_delete): Don't declare.
13976 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
13977 Remove.
13978 * linespec.c (decode_compound_collector): Add constructor,
13979 destructor.
13980 (lookup_prefix_sym): Remove cleanup.
13981 (symtab_collector): Add constructor, destructor.
13982 (collect_symtabs_from_filename): Remove cleanup.
13983 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
13984 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
13985 Use htab_up.
13986 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
13987 * dwarf2read.c (dw2_expand_symtabs_matching)
13988 (dw2_map_symbol_filenames, dwarf_decode_macros)
13989 (write_psymtabs_to_index): Use htab_up.
13990 * dwarf2loc.c (func_verify_no_selftailcall)
13991 (call_site_find_chain_1, func_verify_no_selftailcall)
13992 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
13993 std::vector, gdb::unique_xmalloc_ptr.
13994 (call_sitep): Remove typedef.
13995 (dwarf2_locexpr_baton_eval): Remove unused variable.
13996
13997 2017-01-10 Tom Tromey <tom@tromey.com>
13998
13999 * python/python-internal.h (make_cleanup_py_decref)
14000 (make_cleanup_py_xdecref): Don't declare.
14001 * python/py-utils.c (py_decref, make_cleanup_py_decref)
14002 (py_xdecref, make_cleanup_py_xdecref): Remove.
14003
14004 2017-01-10 Tom Tromey <tom@tromey.com>
14005
14006 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
14007 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
14008
14009 2017-01-10 Tom Tromey <tom@tromey.com>
14010
14011 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
14012
14013 2017-01-10 Tom Tromey <tom@tromey.com>
14014
14015 * python/py-utils.c (unicode_to_encoded_string)
14016 (python_string_to_target_string)
14017 (python_string_to_target_python_string)
14018 (python_string_to_host_string, gdbpy_obj_to_string)
14019 (get_addr_from_python): Use gdbpy_ref.
14020
14021 2017-01-10 Tom Tromey <tom@tromey.com>
14022
14023 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
14024 gdbpy_ref.
14025
14026 2017-01-10 Tom Tromey <tom@tromey.com>
14027
14028 * python/python.c (eval_python_command, gdbpy_decode_line)
14029 (gdbpy_run_events, gdbpy_start_type_printers)
14030 (gdbpy_apply_type_printers): Use gdbpy_ref.
14031
14032 2017-01-10 Tom Tromey <tom@tromey.com>
14033
14034 * python/py-param.c (get_doc_string, compute_enum_values): Use
14035 gdbpy_ref.
14036
14037 2017-01-10 Tom Tromey <tom@tromey.com>
14038
14039 * python/py-inferior.c (find_thread_object, build_inferior_list):
14040 Use gdbpy_ref.
14041
14042 2017-01-10 Tom Tromey <tom@tromey.com>
14043
14044 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14045
14046 2017-01-10 Tom Tromey <tom@tromey.com>
14047
14048 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
14049 gdbpy_ref.
14050
14051 2017-01-10 Tom Tromey <tom@tromey.com>
14052
14053 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
14054 extra incref.
14055 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
14056 Use gdbpy_ref.
14057
14058 2017-01-10 Tom Tromey <tom@tromey.com>
14059
14060 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14061 gdbpy_ref.
14062
14063 2017-01-10 Tom Tromey <tom@tromey.com>
14064
14065 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
14066 decref results of PyArg_ParseTupleAndKeywords.
14067
14068 2017-01-10 Tom Tromey <tom@tromey.com>
14069
14070 * python/python.c (python_run_simple_file): Use
14071 unique_xmalloc_ptr, gdbpy_ref.
14072
14073 2017-01-10 Tom Tromey <tom@tromey.com>
14074
14075 * python/py-prettyprint.c (print_stack_unless_memory_error)
14076 (print_string_repr, print_children): Use gdbpy_ref.
14077 (dummy_python_frame): New class.
14078 (dummy_python_frame::dummy_python_frame): Rename from
14079 push_dummy_python_frame.
14080 (py_restore_tstate): Remove.
14081
14082 2017-01-10 Tom Tromey <tom@tromey.com>
14083
14084 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
14085
14086 2017-01-10 Tom Tromey <tom@tromey.com>
14087
14088 * python/python.c (ensure_python_env, restore_python_env):
14089 Remove.
14090 * python/python-internal.h (ensure_python_env): Don't declare.
14091 * varobj.h (varobj_ensure_python_env): Don't declare.
14092 * varobj.c (varobj_ensure_python_env): Remove.
14093
14094 2017-01-10 Tom Tromey <tom@tromey.com>
14095
14096 * varobj.c (varobj_value_get_print_value): Use
14097 gdbpy_enter_varobj.
14098
14099 2017-01-10 Tom Tromey <tom@tromey.com>
14100
14101 * python/py-prettyprint.c (print_string_repr, print_children):
14102 Update.
14103 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
14104 of "encoding".
14105 * varobj.c (varobj_value_get_print_value): Update.
14106 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
14107
14108 2017-01-10 Tom Tromey <tom@tromey.com>
14109
14110 * varobj.c (varobj_get_display_hint)
14111 (dynamic_varobj_has_child_method, install_new_value_visualizer)
14112 (varobj_set_visualizer, free_variable): Use
14113 gdbpy_enter_varobj.
14114
14115 2017-01-10 Tom Tromey <tom@tromey.com>
14116
14117 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
14118 (do_finish_initialization): New function. Use gdbpy_ref.
14119 (gdbpy_finish_initialization): Use gdbpy_enter. Call
14120 do_finish_initialization.
14121
14122 2017-01-10 Tom Tromey <tom@tromey.com>
14123
14124 * python/py-param.c (get_set_value, get_show_value): Use
14125 gdbpy_enter, gdbpy_ref.
14126
14127 2017-01-10 Tom Tromey <tom@tromey.com>
14128
14129 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
14130
14131 2017-01-10 Tom Tromey <tom@tromey.com>
14132
14133 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
14134
14135 2017-01-10 Tom Tromey <tom@tromey.com>
14136
14137 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
14138 Use gdbpy_enter_varobj.
14139
14140 2017-01-10 Tom Tromey <tom@tromey.com>
14141
14142 * varobj.c (gdbpy_enter_varobj): New constructor.
14143 * python/python-internal.h (gdbpy_enter_varobj): New class.
14144 * python/py-varobj.c (py_varobj_get_iterator): Use
14145 gdbpy_enter_varobj.
14146
14147 2017-01-10 Tom Tromey <tom@tromey.com>
14148
14149 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
14150 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14151 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
14152 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
14153 unique_xmalloc_ptr.
14154 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
14155
14156 2017-01-10 Tom Tromey <tom@tromey.com>
14157
14158 * python/py-xmethods.c (invoke_match_method): Use
14159 gdbpy_ref.
14160
14161 2017-01-10 Tom Tromey <tom@tromey.com>
14162
14163 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
14164 gdbpy_enter, gdbpy_ref.
14165
14166 2017-01-10 Tom Tromey <tom@tromey.com>
14167
14168 * python/python.c (python_interactive_command): Use gdbpy_enter.
14169
14170 2017-01-10 Tom Tromey <tom@tromey.com>
14171
14172 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
14173 gdbpy_ref.
14174
14175 2017-01-10 Tom Tromey <tom@tromey.com>
14176
14177 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
14178 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
14179
14180 2017-01-10 Tom Tromey <tom@tromey.com>
14181
14182 * utils.h (htab_deleter): New struct.
14183 (htab_up): New typedef.
14184 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
14185 gdbpy_enter, gdbpy_ref, htab_up.
14186
14187 2017-01-10 Tom Tromey <tom@tromey.com>
14188
14189 * python/py-unwind.c (pending_frame_invalidate): Remove.
14190 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
14191
14192 2017-01-10 Tom Tromey <tom@tromey.com>
14193
14194 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
14195 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
14196
14197 2017-01-10 Tom Tromey <tom@tromey.com>
14198
14199 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
14200
14201 2017-01-10 Tom Tromey <tom@tromey.com>
14202
14203 * python/python.c (gdbpy_eval_from_control_command)
14204 (gdbpy_source_script, gdbpy_run_events)
14205 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
14206 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
14207 gdbpy_enter.
14208
14209 2017-01-10 Tom Tromey <tom@tromey.com>
14210
14211 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
14212
14213 2017-01-10 Tom Tromey <tom@tromey.com>
14214
14215 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
14216
14217 2017-01-10 Tom Tromey <tom@tromey.com>
14218
14219 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
14220 (python_on_inferior_call_pre, python_on_inferior_call_post)
14221 (python_on_memory_change, python_on_register_change)
14222 (python_inferior_exit, python_new_objfile, add_thread_object)
14223 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
14224
14225 2017-01-10 Tom Tromey <tom@tromey.com>
14226
14227 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
14228 (bpfinishpy_handle_exit): Use gdbpy_enter.
14229
14230 2017-01-10 Tom Tromey <tom@tromey.com>
14231
14232 * python/py-cmd.c (cmdpy_destroyer)
14233 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
14234 gdbpy_enter.
14235
14236 2017-01-10 Tom Tromey <tom@tromey.com>
14237
14238 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
14239 gdbpy_enter.
14240 (gdbpy_breakpoint_has_cond): Likewise.
14241
14242 2017-01-10 Tom Tromey <tom@tromey.com>
14243
14244 * python/python.c (gdbpy_enter): New constructor.
14245 (~gdbpy_enter): New destructor.
14246 (restore_python_env, ensure_python_env): Rewrite.
14247 * python/python-internal.h (gdbpy_enter): New class.
14248
14249 2017-01-10 Tom Tromey <tom@tromey.com>
14250
14251 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
14252
14253 2017-01-10 Tom Tromey <tom@tromey.com>
14254
14255 * python/py-value.c (value_has_field, get_field_flag)
14256 (get_field_type, valpy_getitem, convert_value_from_python): Use
14257 gdbpy_ref.
14258
14259 2017-01-10 Tom Tromey <tom@tromey.com>
14260
14261 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
14262 gdbpy_ref.
14263
14264 2017-01-10 Tom Tromey <tom@tromey.com>
14265
14266 * python/py-prettyprint.c (search_pp_list)
14267 (find_pretty_printer_from_objfiles)
14268 (find_pretty_printer_from_progspace)
14269 (find_pretty_printer_from_gdb, find_pretty_printer)
14270 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
14271 gdbpy_ref.
14272
14273 2017-01-10 Tom Tromey <tom@tromey.com>
14274
14275 * python/py-param.c (call_doc_function): Use gdbpy_ref.
14276
14277 2017-01-10 Tom Tromey <tom@tromey.com>
14278
14279 * python/py-linetable.c (build_line_table_tuple_from_pcs)
14280 (ltpy_get_all_source_lines): Use gdbpy_ref.
14281
14282 2017-01-10 Tom Tromey <tom@tromey.com>
14283
14284 * python/py-framefilter.c (extract_sym, extract_value)
14285 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
14286 gdbpy_ref.
14287
14288 2017-01-10 Tom Tromey <tom@tromey.com>
14289
14290 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
14291
14292 2017-01-10 Tom Tromey <tom@tromey.com>
14293
14294 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
14295
14296 2017-01-10 Tom Tromey <tom@tromey.com>
14297
14298 * python/py-function.c (convert_values_to_python, fnpy_init): Use
14299 gdbpy_ref.
14300
14301 2017-01-10 Tom Tromey <tom@tromey.com>
14302
14303 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
14304
14305 2017-01-10 Tom Tromey <tom@tromey.com>
14306
14307 * python/py-type.c (convert_field, make_fielditem, typy_fields)
14308 (typy_range): Use gdbpy_ref.
14309
14310 2017-01-10 Tom Tromey <tom@tromey.com>
14311
14312 * python/py-threadevent.c (create_thread_event_object): Use
14313 gdbpy_ref.
14314 * python/py-stopevent.c (create_stop_event_object): Simplify.
14315 (emit_stop_event): Use gdbpy_ref.
14316 * python/py-signalevent.c (create_signal_event_object): Use
14317 gdbpy_ref.
14318 * python/py-newobjfileevent.c (create_new_objfile_event_object)
14319 (emit_new_objfile_event, create_clear_objfiles_event_object)
14320 (emit_clear_objfiles_event): Use gdbpy_ref.
14321 * python/py-infevents.c (create_inferior_call_event_object)
14322 (create_register_changed_event_object)
14323 (create_memory_changed_event_object, emit_inferior_call_event)
14324 (emit_memory_changed_event, emit_register_changed_event): Use
14325 gdbpy_ref.
14326 * python/py-exitedevent.c (create_exited_event_object)
14327 (emit_exited_event): Use gdbpy_ref.
14328 * python/py-event.h (evpy_emit_event): Remove
14329 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
14330 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
14331 * python/py-continueevent.c (emit_continue_event): Use
14332 gdbpy_ref.
14333 * python/py-breakpoint.c (gdbpy_breakpoint_created)
14334 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
14335 gdbpy_ref.
14336 * python/py-bpevent.c (create_breakpoint_event_object): Use
14337 gdbpy_ref.
14338
14339 2017-01-10 Tom Tromey <tom@tromey.com>
14340
14341 * python/py-ref.h: New file.
14342
14343 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14344
14345 * cli-out.c (cli_ui_out::do_redirect): Change return type to
14346 void.
14347 * cli-out.h (cli_ui_out::do_redirect): Likewise.
14348 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
14349 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
14350 * ui-out.c (ui_out::redirect): Likewise.
14351 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
14352 * cli/cli-logging.c (set_logging_redirect): Update call site of
14353 ui_out::redirect.
14354 (handle_redirections): Likewise.
14355 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
14356 * top.c (execute_command_to_string): Likewise.
14357 * utils.c (do_ui_out_redirect_pop): Likewise.
14358
14359 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
14360
14361 * stack.c (_initialize_stack): Update "frame" command help message.
14362
14363 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
14364
14365 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
14366
14367 2017-01-06 Yao Qi <yao.qi@linaro.org>
14368
14369 * x86-linux-nat.h: Include gdb_proc_service.h.
14370
14371 2017-01-06 Yao Qi <yao.qi@linaro.org>
14372
14373 * ser-base.h: Include serial.h.
14374
14375 2017-01-06 Yao Qi <yao.qi@linaro.org>
14376
14377 * ppc-linux-tdep.h: Include ppc-tdep.h.
14378
14379 2017-01-06 Yao Qi <yao.qi@linaro.org>
14380
14381 * nat/amd64-linux-siginfo.h: Include signal.h.
14382
14383 2017-01-06 Yao Qi <yao.qi@linaro.org>
14384
14385 * nat/aarch64-linux-hw-point.h: Include break-common.h.
14386
14387 2017-01-06 Yao Qi <yao.qi@linaro.org>
14388
14389 * mi/mi-parse.h: Include mi-cmds.h.
14390
14391 2017-01-06 Yao Qi <yao.qi@linaro.org>
14392
14393 * inf-loop.c: Don't include "target.h".
14394 * inf-loop.h: Include it here.
14395
14396 2017-01-06 Yao Qi <yao.qi@linaro.org>
14397
14398 * dfp.h: Include "dboulest.h" and "expression.h".
14399
14400 2017-01-06 Yao Qi <yao.qi@linaro.org>
14401
14402 * ax-gdb.h: Include "ax.h".
14403
14404 2017-01-06 Yao Qi <yao.qi@linaro.org>
14405
14406 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
14407 with nat/gdb_ptrace.h.
14408
14409 2017-01-05 Yao Qi <yao.qi@linaro.org>
14410
14411 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
14412 new line.
14413 (mips64_fbsd_sigframe_init): Likewise.
14414
14415 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14416
14417 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
14418 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
14419
14420 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14421
14422 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
14423 * NEWS: Mention new FreeBSD/mips native configuration.
14424 * config/mips/fbsd.mh: New file.
14425 * configure.host: Add mips*-*-freebsd*.
14426 * mips-fbsd-nat.c: New file.
14427
14428 2017-01-04 John Baldwin <jhb@FreeBSD.org>
14429
14430 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
14431 (ALLDEPFILES): Add mips-fbsd-tdep.c.
14432 * NEWS: Mention new FreeBSD/mips target.
14433 * configure.tgt: Add mips*-*-freebsd*.
14434 * mips-fbsd-tdep.c: New file.
14435 * mips-fbsd-tdep.h: New file.
14436
14437 2017-01-04 Yao Qi <yao.qi@linaro.org>
14438
14439 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
14440 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
14441
14442 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14443
14444 Update copyright year range in all GDB files.
14445
14446 2017-01-01 Joel Brobecker <brobecker@adacore.com>
14447
14448 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
14449
14450 For older changes see ChangeLog-2016.
14451 \f
14452 Local Variables:
14453 mode: change-log
14454 left-margin: 8
14455 fill-column: 74
14456 version-control: never
14457 coding: utf-8
14458 End: